starti.app 2.0.145 → 2.0.146

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.
@@ -62,13 +62,18 @@ export declare class PushNotification extends EventTargetWithType<{
62
62
  *
63
63
  * @param topics List of topics to subscribe to
64
64
  * @param shouldCheckAccess Boolean indicating whether to check for push notification permissions
65
+ * @returns Array of successfully subscribed topics with their actual server-assigned topic IDs and names
65
66
  *
66
67
  * @example
67
68
  * ```typescript
68
- * await pushNotification.subscribeToTopics(["topic1", "topic2"]);
69
+ * const subscribedTopics = await pushNotification.subscribeToTopics(["topic1", "topic2"]);
70
+ * console.log(subscribedTopics); // [{ topic: "topic1", name: "Topic 1" }, { topic: "topic2", name: "Topic 2" }]
69
71
  * ```
70
72
  */
71
- subscribeToTopics(topics: string[], shouldCheckAccess?: boolean): Promise<void>;
73
+ subscribeToTopics(topics: string[], shouldCheckAccess?: boolean): Promise<Array<{
74
+ topic: string;
75
+ name: string;
76
+ }>>;
72
77
  /**
73
78
  * This method unsubscribes to a list of topics.
74
79
  *
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "starti.app",
3
3
  "author": "starti.app",
4
4
  "license": "MIT",
5
- "version": "2.0.145",
5
+ "version": "2.0.146",
6
6
  "description": "Use this package for easy communication with the starti.app API.",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",