@unbound-app/api 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbound-app/api",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "author": {
5
5
  "name": "Mario P.",
6
6
  "email": "contact@marioparaschiv.com",
@@ -27,8 +27,11 @@ export type CatalogQuery = {
27
27
  /** The result order; `name` when omitted. */
28
28
  sort?: CatalogSort;
29
29
  };
30
- /** `name` sorts alphabetically, `updated` puts the most recently published versions first. */
31
- export type CatalogSort = 'name' | 'updated';
30
+ /**
31
+ * `name` sorts alphabetically, `popular` puts the most installed addons first, `updated` the most
32
+ * recently published versions.
33
+ */
34
+ export type CatalogSort = 'name' | 'popular' | 'updated';
32
35
  /** One addon the marketplace lists, at its newest version. */
33
36
  export type MarketplaceListing = {
34
37
  /** The addon's id from its manifest, which installs and updates key on. */
@@ -45,6 +48,8 @@ export type MarketplaceListing = {
45
48
  version: string;
46
49
  /** When the newest version was published, as an ISO 8601 date-time. */
47
50
  publishedAt: string;
51
+ /** How many times the addon was installed from the marketplace; 0 when the catalog predates counts. */
52
+ installs: number;
48
53
  };
49
54
 
50
55
  export {};
@@ -6,8 +6,8 @@ export declare const ActionSheets: any;
6
6
  export declare const AsyncUsers: any;
7
7
  /** Discord's invite actions module, with `acceptInviteAndTransitionToInviteChannel`; found on first access. */
8
8
  export declare const Invites: any;
9
- /** Discord's link opener module, with `openURL` and `openSettings`; found on first access. */
10
- export declare const Linking: any;
9
+ /** React Native's `Linking`, with `openURL` and `openSettings`; read directly, as a search on a cold metro cache costs ~15 ms. */
10
+ export declare const Linking: import('react-native').LinkingImpl;
11
11
  /** Discord's message actions module, with `sendMessage` and `receiveMessage`; found on first access. */
12
12
  export declare const Messages: any;
13
13
  /** Discord's module with `openOAuth2Modal`, which opens the app authorize screen; found on first access. */
@@ -184,6 +184,7 @@ export declare const data: {
184
184
  filePaths: Map<string, number>;
185
185
  origToString: any;
186
186
  listeners: Set<MetroModuleLoadListener>;
187
+ initialized: number[];
187
188
  };
188
189
  /**
189
190
  * @description Runs several filters in a single registry pass, returning one result per item.
package/src/sync.d.ts CHANGED
@@ -31,10 +31,12 @@ export declare function now(strategy?: SyncStrategy): Promise<boolean>;
31
31
  */
32
32
  export declare function resolveFirstSync(strategy: SyncStrategy): Promise<boolean>;
33
33
  /**
34
- * @description Turns automatic syncing on or off, syncing right away when turned on.
34
+ * @description Turns automatic syncing on or off. Turning it on syncs right away, or first asks how to
35
+ * combine this device with a cloud setup it has never synced with.
35
36
  * @param enabled Whether to sync automatically.
37
+ * @returns Whether turning it on could read the cloud; always true when turning it off.
36
38
  */
37
- export declare function setEnabled(enabled: boolean): void;
39
+ export declare function setEnabled(enabled: boolean): Promise<boolean>;
38
40
  /**
39
41
  * @description Sets which way automatic syncs move changes, syncing right away when sync is on.
40
42
  * @param mode The new mode.