@zyphr-dev/node-sdk 0.1.16 → 0.1.17
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/dist/index.cjs +50 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -1
- package/dist/index.d.ts +47 -1
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/src/apis/InboxApi.ts +95 -0
package/package.json
CHANGED
package/src/src/apis/InboxApi.ts
CHANGED
|
@@ -102,6 +102,15 @@ export interface InboxApiGetUnreadCountRequest {
|
|
|
102
102
|
externalId?: string;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
export interface InboxApiListAllInboxRequest {
|
|
106
|
+
subscriberId?: string;
|
|
107
|
+
status?: ListAllInboxStatusEnum;
|
|
108
|
+
category?: string;
|
|
109
|
+
search?: string;
|
|
110
|
+
limit?: number;
|
|
111
|
+
offset?: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
105
114
|
export interface InboxApiListInboxRequest {
|
|
106
115
|
subscriberId?: string;
|
|
107
116
|
externalId?: string;
|
|
@@ -319,6 +328,27 @@ export interface InboxApiInterface {
|
|
|
319
328
|
*/
|
|
320
329
|
getUnreadCount(subscriberId?: string, externalId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnreadCountResponse>;
|
|
321
330
|
|
|
331
|
+
/**
|
|
332
|
+
* List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
333
|
+
* @summary List all project notifications
|
|
334
|
+
* @param {string} [subscriberId] Optional subscriber filter
|
|
335
|
+
* @param {'unread' | 'read' | 'archived'} [status] Filter by notification status
|
|
336
|
+
* @param {string} [category] Filter by category
|
|
337
|
+
* @param {string} [search] Search by title or body
|
|
338
|
+
* @param {number} [limit]
|
|
339
|
+
* @param {number} [offset]
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
* @memberof InboxApiInterface
|
|
343
|
+
*/
|
|
344
|
+
listAllInboxRaw(requestParameters: InboxApiListAllInboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
348
|
+
* List all project notifications
|
|
349
|
+
*/
|
|
350
|
+
listAllInbox(subscriberId?: string, status?: ListAllInboxStatusEnum, category?: string, search?: string, limit?: number, offset?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
351
|
+
|
|
322
352
|
/**
|
|
323
353
|
* Retrieve in-app notifications for a subscriber. Requires subscriber_id or external_id.
|
|
324
354
|
* @summary List inbox notifications
|
|
@@ -889,6 +919,61 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
|
|
|
889
919
|
return await response.value();
|
|
890
920
|
}
|
|
891
921
|
|
|
922
|
+
/**
|
|
923
|
+
* List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
924
|
+
* List all project notifications
|
|
925
|
+
*/
|
|
926
|
+
async listAllInboxRaw(requestParameters: InboxApiListAllInboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
927
|
+
const queryParameters: any = {};
|
|
928
|
+
|
|
929
|
+
if (requestParameters['subscriberId'] != null) {
|
|
930
|
+
queryParameters['subscriber_id'] = requestParameters['subscriberId'];
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
if (requestParameters['status'] != null) {
|
|
934
|
+
queryParameters['status'] = requestParameters['status'];
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
if (requestParameters['category'] != null) {
|
|
938
|
+
queryParameters['category'] = requestParameters['category'];
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
if (requestParameters['search'] != null) {
|
|
942
|
+
queryParameters['search'] = requestParameters['search'];
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
if (requestParameters['limit'] != null) {
|
|
946
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
if (requestParameters['offset'] != null) {
|
|
950
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
954
|
+
|
|
955
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
956
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
const response = await this.request({
|
|
960
|
+
path: `/inbox/all`,
|
|
961
|
+
method: 'GET',
|
|
962
|
+
headers: headerParameters,
|
|
963
|
+
query: queryParameters,
|
|
964
|
+
}, initOverrides);
|
|
965
|
+
|
|
966
|
+
return new runtime.VoidApiResponse(response);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* List all in-app notifications for the current project. Used by the dashboard to display all notifications without requiring a subscriber selection.
|
|
971
|
+
* List all project notifications
|
|
972
|
+
*/
|
|
973
|
+
async listAllInbox(subscriberId?: string, status?: ListAllInboxStatusEnum, category?: string, search?: string, limit?: number, offset?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
974
|
+
await this.listAllInboxRaw({ subscriberId: subscriberId, status: status, category: category, search: search, limit: limit, offset: offset }, initOverrides);
|
|
975
|
+
}
|
|
976
|
+
|
|
892
977
|
/**
|
|
893
978
|
* Retrieve in-app notifications for a subscriber. Requires subscriber_id or external_id.
|
|
894
979
|
* List inbox notifications
|
|
@@ -1298,3 +1383,13 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
|
|
|
1298
1383
|
}
|
|
1299
1384
|
|
|
1300
1385
|
}
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* @export
|
|
1389
|
+
*/
|
|
1390
|
+
export const ListAllInboxStatusEnum = {
|
|
1391
|
+
UNREAD: 'unread',
|
|
1392
|
+
READ: 'read',
|
|
1393
|
+
ARCHIVED: 'archived'
|
|
1394
|
+
} as const;
|
|
1395
|
+
export type ListAllInboxStatusEnum = typeof ListAllInboxStatusEnum[keyof typeof ListAllInboxStatusEnum];
|