{"_id":"@aigens2/aigens-sdk-preferences","name":"@aigens2/aigens-sdk-preferences","dist-tags":{"latest":"5.0.1"},"versions":{"5.0.1":{"name":"@aigens2/aigens-sdk-preferences","version":"5.0.1","description":"Aigens SDK preferences","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/aigens/aigens-sdk-core.git"},"bugs":{"url":"https://github.com/aigens/aigens-sdk-core/issues"},"keywords":["capacitor","plugin","native"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","docgen":"docgen --api AigensPreferencesPlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.js","clean":"rimraf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"^5.0.0","@capacitor/core":"^5.0.0","@capacitor/docgen":"^0.2.0","@capacitor/ios":"^5.0.0","@ionic/eslint-config":"^0.3.0","@ionic/prettier-config":"^1.0.1","@ionic/swiftlint-config":"^1.1.2","eslint":"^8.31.0","prettier":"~2.2.0","prettier-plugin-java":"~1.0.0","rimraf":"^3.0.2","rollup":"^2.32.0","swiftlint":"^1.0.1","typescript":"~4.8"},"peerDependencies":{"@capacitor/core":"^5.0.0"},"prettier":"@ionic/prettier-config","swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"_id":"@aigens2/aigens-sdk-preferences@5.0.1","gitHead":"7c1a74694b622f17b433ab8d13359a852f0b5f4b","homepage":"https://github.com/aigens/aigens-sdk-core#readme","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-AJlybHwf9NyV2nFtC/38JSRDTQNXaSQYkzCHqW/QfjExfHdWbWgEdte2Nyc505xdV+4QRXoZM2qJEes1kEp4Pg==","shasum":"0228d820a3f295cf60950b9698740945b1237aa2","tarball":"https://registry.npmjs.org/@aigens2/aigens-sdk-preferences/-/aigens-sdk-preferences-5.0.1.tgz","fileCount":33,"unpackedSize":104058,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIElOmtFIQ8QGv0+Fp9cWkMCgALTUoJnwH+TpmsG2MupSAiBPpA6ijuTKCEH7LGLucvzDUFmChrgIAEurjSQ0l9syBw=="}]},"_npmUser":{"name":"jason_jj","email":"peijuechen@126.com"},"directories":{},"maintainers":[{"name":"jason_jj","email":"peijuechen@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aigens-sdk-preferences_5.0.1_1765952815802_0.8030680949461035"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-17T06:26:55.732Z","5.0.1":"2025-12-17T06:26:55.939Z","modified":"2025-12-17T06:26:56.207Z"},"maintainers":[{"name":"jason_jj","email":"peijuechen@126.com"}],"description":"Aigens SDK preferences","homepage":"https://github.com/aigens/aigens-sdk-core#readme","keywords":["capacitor","plugin","native"],"repository":{"type":"git","url":"git+https://github.com/aigens/aigens-sdk-core.git"},"bugs":{"url":"https://github.com/aigens/aigens-sdk-core/issues"},"license":"MIT","readme":"# aigens-sdk-preferences\n\nAigens SDK Preferences\n\n## Install\n\n```bash\nnpm install @aigens/aigens-sdk-preferences\nnpx cap sync\n```\n\n## API\n\n<docgen-index>\n\n* [`get(...)`](#get)\n* [`set(...)`](#set)\n* [`remove(...)`](#remove)\n* [`clear()`](#clear)\n* [`saveImmediately()`](#saveimmediately)\n* [`setIsAutoSaveNormal(...)`](#setisautosavenormal)\n* [`setIsAutoSaveMember(...)`](#setisautosavemember)\n* [`enableUserDefault(...)`](#enableuserdefault)\n* [`keys()`](#keys)\n* [`log(...)`](#log)\n* [`hasStoragePermission(...)`](#hasstoragepermission)\n* [`deleteLog(...)`](#deletelog)\n* [`isElectronUniversalApp()`](#iselectronuniversalapp)\n* [`isNativeUniversalApp()`](#isnativeuniversalapp)\n* [`generatePath(...)`](#generatepath)\n* [`electronClearNavigationHistory()`](#electronclearnavigationhistory)\n* [`electronLoadURL(...)`](#electronloadurl)\n* [`electronRunMethod(...)`](#electronrunmethod)\n* [Interfaces](#interfaces)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### get(...)\n\n```typescript\nget(options: GetOptions) => Promise<GetResult>\n```\n\n| Param         | Type                                              |\n| ------------- | ------------------------------------------------- |\n| **`options`** | <code><a href=\"#getoptions\">GetOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#getresult\">GetResult</a>&gt;</code>\n\n--------------------\n\n\n### set(...)\n\n```typescript\nset(options: SetOptions) => Promise<void>\n```\n\n| Param         | Type                                              |\n| ------------- | ------------------------------------------------- |\n| **`options`** | <code><a href=\"#setoptions\">SetOptions</a></code> |\n\n--------------------\n\n\n### remove(...)\n\n```typescript\nremove(options: RemoveOptions) => Promise<void>\n```\n\n| Param         | Type                                                    |\n| ------------- | ------------------------------------------------------- |\n| **`options`** | <code><a href=\"#removeoptions\">RemoveOptions</a></code> |\n\n--------------------\n\n\n### clear()\n\n```typescript\nclear() => Promise<void>\n```\n\n--------------------\n\n\n### saveImmediately()\n\n```typescript\nsaveImmediately() => Promise<void>\n```\n\n--------------------\n\n\n### setIsAutoSaveNormal(...)\n\n```typescript\nsetIsAutoSaveNormal(options: { isAutoSave: boolean; }) => Promise<void>\n```\n\n| Param         | Type                                  |\n| ------------- | ------------------------------------- |\n| **`options`** | <code>{ isAutoSave: boolean; }</code> |\n\n--------------------\n\n\n### setIsAutoSaveMember(...)\n\n```typescript\nsetIsAutoSaveMember(options: { isAutoSave: boolean; }) => Promise<void>\n```\n\n| Param         | Type                                  |\n| ------------- | ------------------------------------- |\n| **`options`** | <code>{ isAutoSave: boolean; }</code> |\n\n--------------------\n\n\n### enableUserDefault(...)\n\n```typescript\nenableUserDefault(options: { enable: boolean; }) => Promise<void>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ enable: boolean; }</code> |\n\n--------------------\n\n\n### keys()\n\n```typescript\nkeys() => Promise<KeysResult>\n```\n\n**Returns:** <code>Promise&lt;<a href=\"#keysresult\">KeysResult</a>&gt;</code>\n\n--------------------\n\n\n### log(...)\n\n```typescript\nlog(options: { log: string; logDirName?: string | string[]; toTop?: boolean; }) => Promise<{ result: number; message?: string; }>\n```\n\n| Param         | Type                                                                            |\n| ------------- | ------------------------------------------------------------------------------- |\n| **`options`** | <code>{ log: string; logDirName?: string \\| string[]; toTop?: boolean; }</code> |\n\n**Returns:** <code>Promise&lt;{ result: number; message?: string; }&gt;</code>\n\n--------------------\n\n\n### hasStoragePermission(...)\n\n```typescript\nhasStoragePermission(options?: { logDirName?: string | string[] | undefined; } | undefined) => Promise<{ result: boolean; }>\n```\n\n| Param         | Type                                              |\n| ------------- | ------------------------------------------------- |\n| **`options`** | <code>{ logDirName?: string \\| string[]; }</code> |\n\n**Returns:** <code>Promise&lt;{ result: boolean; }&gt;</code>\n\n--------------------\n\n\n### deleteLog(...)\n\n```typescript\ndeleteLog(options?: { keepMonths?: number | undefined; logDirName?: string | string[] | undefined; } | undefined) => Promise<void>\n```\n\n| Param         | Type                                                                   |\n| ------------- | ---------------------------------------------------------------------- |\n| **`options`** | <code>{ keepMonths?: number; logDirName?: string \\| string[]; }</code> |\n\n--------------------\n\n\n### isElectronUniversalApp()\n\n```typescript\nisElectronUniversalApp() => Promise<{ result: boolean; }>\n```\n\n**Returns:** <code>Promise&lt;{ result: boolean; }&gt;</code>\n\n--------------------\n\n\n### isNativeUniversalApp()\n\n```typescript\nisNativeUniversalApp() => Promise<{ result: boolean; }>\n```\n\n**Returns:** <code>Promise&lt;{ result: boolean; }&gt;</code>\n\n--------------------\n\n\n### generatePath(...)\n\n```typescript\ngeneratePath(options: { path: string[]; }) => Promise<{ result: string; }>\n```\n\n| Param         | Type                             |\n| ------------- | -------------------------------- |\n| **`options`** | <code>{ path: string[]; }</code> |\n\n**Returns:** <code>Promise&lt;{ result: string; }&gt;</code>\n\n--------------------\n\n\n### electronClearNavigationHistory()\n\n```typescript\nelectronClearNavigationHistory() => Promise<any>\n```\n\n**Returns:** <code>Promise&lt;any&gt;</code>\n\n--------------------\n\n\n### electronLoadURL(...)\n\n```typescript\nelectronLoadURL(options: { url: string; }) => Promise<any>\n```\n\n| Param         | Type                          |\n| ------------- | ----------------------------- |\n| **`options`** | <code>{ url: string; }</code> |\n\n**Returns:** <code>Promise&lt;any&gt;</code>\n\n--------------------\n\n\n### electronRunMethod(...)\n\n```typescript\nelectronRunMethod(options: { method: string; args?: any[]; }) => Promise<any>\n```\n\n| Param         | Type                                           |\n| ------------- | ---------------------------------------------- |\n| **`options`** | <code>{ method: string; args?: any[]; }</code> |\n\n**Returns:** <code>Promise&lt;any&gt;</code>\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetResult\n\n| Prop        | Type                        | Description                                                                                                                       | Since |\n| ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`value`** | <code>string \\| null</code> | The value from preferences associated with the given key. If a value was not previously set or was removed, value will be `null`. | 1.0.0 |\n\n\n#### GetOptions\n\n| Prop      | Type                | Description                                       | Since |\n| --------- | ------------------- | ------------------------------------------------- | ----- |\n| **`key`** | <code>string</code> | The key whose value to retrieve from preferences. | 1.0.0 |\n\n\n#### SetOptions\n\n| Prop        | Type                | Description                                                   | Since |\n| ----------- | ------------------- | ------------------------------------------------------------- | ----- |\n| **`key`**   | <code>string</code> | The key to associate with the value being set in preferences. | 1.0.0 |\n| **`value`** | <code>string</code> | The value to set in preferences with the associated key.      | 1.0.0 |\n\n\n#### RemoveOptions\n\n| Prop      | Type                | Description                                     | Since |\n| --------- | ------------------- | ----------------------------------------------- | ----- |\n| **`key`** | <code>string</code> | The key whose value to remove from preferences. | 1.0.0 |\n\n\n#### KeysResult\n\n| Prop       | Type                  | Description                    | Since |\n| ---------- | --------------------- | ------------------------------ | ----- |\n| **`keys`** | <code>string[]</code> | The known keys in preferences. | 1.0.0 |\n\n</docgen-api>\n","readmeFilename":"README.md","_rev":"1-bc8529bd45813bbe8bbecde445d1d3c8"}