squarefi-bff-api-module 1.36.93 → 1.36.94

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.
@@ -88,4 +88,11 @@ export declare const frontend: {
88
88
  get: () => Promise<API.Frontend.NotificationPreferences.Get.Response>;
89
89
  update: (data: API.Frontend.NotificationPreferences.Update.Request) => Promise<API.Frontend.NotificationPreferences.Update.Response>;
90
90
  };
91
+ notifications: {
92
+ list: (params?: API.Frontend.Notifications.List.Request) => Promise<API.Frontend.Notifications.List.Response>;
93
+ unreadCount: () => Promise<API.Frontend.Notifications.UnreadCount.Response>;
94
+ markRead: (data: API.Frontend.Notifications.MarkRead.Request) => Promise<API.Frontend.Notifications.MarkRead.Response>;
95
+ markAllRead: () => Promise<API.Frontend.Notifications.MarkAllRead.Response>;
96
+ realtimeToken: () => Promise<API.Frontend.Notifications.RealtimeToken.Response>;
97
+ };
91
98
  };
@@ -168,4 +168,16 @@ export const frontend = {
168
168
  get: () => apiClientV1Frontend.getRequest('/frontend/notification-preferences'),
169
169
  update: (data) => apiClientV1Frontend.putRequest('/frontend/notification-preferences', { data }),
170
170
  },
171
+ // Server-checked (400 VALIDATION_ERROR): `limit` 1-50 (20 by default), `cursor` up to 200 chars, 1-100 uuid
172
+ // `notification_ids`. The feed ends only on `next_cursor: null`; the count and mark-all-read span every wallet.
173
+ notifications: {
174
+ list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/notifications', {
175
+ params,
176
+ }),
177
+ unreadCount: () => apiClientV1Frontend.getRequest('/frontend/notifications/unread-count'),
178
+ markRead: (data) => apiClientV1Frontend.postRequest('/frontend/notifications/mark-read', { data }),
179
+ markAllRead: () => apiClientV1Frontend.postRequest('/frontend/notifications/mark-all-read'),
180
+ // 503 REALTIME_DISABLED when realtime delivery is off for the deployment.
181
+ realtimeToken: () => apiClientV1Frontend.postRequest('/frontend/notifications/realtime-token'),
182
+ },
171
183
  };
@@ -2572,7 +2572,7 @@ export interface paths {
2572
2572
  "application/json": components["schemas"]["ApiErrorResponse"];
2573
2573
  };
2574
2574
  };
2575
- /** @description Cardholder is live at the vendor, or its review is still running */
2575
+ /** @description Cardholder is live at the vendor, or its review is still running. On a program that issues under the wallet's company: `WALLET_BUSINESS_NOT_ONBOARDED` (the wallet's business has not been registered with the card issuer) or `WALLET_BUSINESS_NOT_APPROVED` (its review is not approved yet). */
2576
2576
  409: {
2577
2577
  headers: {
2578
2578
  [name: string]: unknown;
@@ -6239,7 +6239,7 @@ export interface paths {
6239
6239
  };
6240
6240
  content?: never;
6241
6241
  };
6242
- /** @description Cardholder is live at the vendor, or its review is still running */
6242
+ /** @description Cardholder is live at the vendor, or its review is still running. On a program that issues under the wallet's company: `WALLET_BUSINESS_NOT_ONBOARDED` (the wallet's business has not been registered with the card issuer) or `WALLET_BUSINESS_NOT_APPROVED` (its review is not approved yet). */
6243
6243
  409: {
6244
6244
  headers: {
6245
6245
  [name: string]: unknown;
@@ -6936,7 +6936,7 @@ export interface paths {
6936
6936
  };
6937
6937
  content?: never;
6938
6938
  };
6939
- /** @description Cardholder is live at the vendor, or its review is still running */
6939
+ /** @description Cardholder is live at the vendor, or its review is still running. On a program that issues under the wallet's company: `WALLET_BUSINESS_NOT_ONBOARDED` (the wallet's business has not been registered with the card issuer) or `WALLET_BUSINESS_NOT_APPROVED` (its review is not approved yet). */
6940
6940
  409: {
6941
6941
  headers: {
6942
6942
  [name: string]: unknown;
@@ -916,6 +916,42 @@ export declare namespace API {
916
916
  }
917
917
  export {};
918
918
  }
919
+ namespace Notifications {
920
+ type NotificationsRoot = pathsV1Frontend['/frontend/notifications'];
921
+ type UnreadCountRoot = pathsV1Frontend['/frontend/notifications/unread-count'];
922
+ type MarkReadRoot = pathsV1Frontend['/frontend/notifications/mark-read'];
923
+ type MarkAllReadRoot = pathsV1Frontend['/frontend/notifications/mark-all-read'];
924
+ type RealtimeTokenRoot = pathsV1Frontend['/frontend/notifications/realtime-token'];
925
+ type NotificationView = componentsV1Frontend['schemas']['NotificationView'];
926
+ export type Notification = Omit<NotificationView, 'payload'> & {
927
+ payload: Record<string, unknown>;
928
+ };
929
+ export type Type = NotificationView['type'];
930
+ export namespace List {
931
+ type RawResponse = NotificationsRoot['get']['responses'][200]['content']['application/json'];
932
+ export type Request = NonNullable<NotificationsRoot['get']['parameters']['query']>;
933
+ export type Response = Omit<RawResponse, 'data'> & {
934
+ data?: Omit<NonNullable<RawResponse['data']>, 'items'> & {
935
+ items?: Notification[];
936
+ };
937
+ };
938
+ export {};
939
+ }
940
+ export namespace UnreadCount {
941
+ type Response = UnreadCountRoot['get']['responses'][200]['content']['application/json'];
942
+ }
943
+ export namespace MarkRead {
944
+ type Request = MarkReadRoot['post']['requestBody']['content']['application/json'];
945
+ type Response = MarkReadRoot['post']['responses'][200]['content']['application/json'];
946
+ }
947
+ export namespace MarkAllRead {
948
+ type Response = MarkAllReadRoot['post']['responses'][200]['content']['application/json'];
949
+ }
950
+ export namespace RealtimeToken {
951
+ type Response = RealtimeTokenRoot['post']['responses'][200]['content']['application/json'];
952
+ }
953
+ export {};
954
+ }
919
955
  namespace Issuing {
920
956
  type CardsRoot = pathsV1Frontend['/frontend/issuing/cards'];
921
957
  type CardRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.93",
3
+ "version": "1.36.94",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",