@ikatec/digisac-api-sdk 4.11.0 → 4.13.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.
Files changed (142) hide show
  1. package/dist/apis/absence/AbsenceApi.cjs +46 -2
  2. package/dist/apis/absence/AbsenceApi.cjs.map +1 -1
  3. package/dist/apis/absence/AbsenceApi.d.ts +38 -4
  4. package/dist/apis/absence/AbsenceApi.d.ts.map +1 -1
  5. package/dist/apis/absence/AbsenceApi.mjs +46 -2
  6. package/dist/apis/absence/AbsenceApi.mjs.map +1 -1
  7. package/dist/apis/absence/types.d.ts +51 -2
  8. package/dist/apis/absence/types.d.ts.map +1 -1
  9. package/dist/apis/activityLog/ActivityLogApi.cjs +10 -1
  10. package/dist/apis/activityLog/ActivityLogApi.cjs.map +1 -1
  11. package/dist/apis/activityLog/ActivityLogApi.d.ts +10 -3
  12. package/dist/apis/activityLog/ActivityLogApi.d.ts.map +1 -1
  13. package/dist/apis/activityLog/ActivityLogApi.mjs +10 -1
  14. package/dist/apis/activityLog/ActivityLogApi.mjs.map +1 -1
  15. package/dist/apis/activityLog/types.d.ts +48 -8
  16. package/dist/apis/activityLog/types.d.ts.map +1 -1
  17. package/dist/apis/categories/types.d.ts +1 -0
  18. package/dist/apis/categories/types.d.ts.map +1 -1
  19. package/dist/apis/creditMovements/CreditMovementsApi.cjs +31 -2
  20. package/dist/apis/creditMovements/CreditMovementsApi.cjs.map +1 -1
  21. package/dist/apis/creditMovements/CreditMovementsApi.d.ts +21 -3
  22. package/dist/apis/creditMovements/CreditMovementsApi.d.ts.map +1 -1
  23. package/dist/apis/creditMovements/CreditMovementsApi.mjs +31 -2
  24. package/dist/apis/creditMovements/CreditMovementsApi.mjs.map +1 -1
  25. package/dist/apis/creditMovements/types.d.ts +73 -2
  26. package/dist/apis/creditMovements/types.d.ts.map +1 -1
  27. package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs +15 -0
  28. package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs.map +1 -1
  29. package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts +13 -0
  30. package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts.map +1 -1
  31. package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs +15 -0
  32. package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs.map +1 -1
  33. package/dist/apis/interactiveMessages/types.d.ts +8 -2
  34. package/dist/apis/interactiveMessages/types.d.ts.map +1 -1
  35. package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs +27 -0
  36. package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs.map +1 -1
  37. package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts +22 -1
  38. package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts.map +1 -1
  39. package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs +27 -0
  40. package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs.map +1 -1
  41. package/dist/apis/knowledgeBase/types.d.ts +56 -2
  42. package/dist/apis/knowledgeBase/types.d.ts.map +1 -1
  43. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs +26 -0
  44. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs.map +1 -1
  45. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts +24 -0
  46. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts.map +1 -1
  47. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs +26 -0
  48. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs.map +1 -1
  49. package/dist/apis/knowledgeBaseItem/types.d.ts +23 -6
  50. package/dist/apis/knowledgeBaseItem/types.d.ts.map +1 -1
  51. package/dist/apis/me/MeApi.cjs +36 -29
  52. package/dist/apis/me/MeApi.cjs.map +1 -1
  53. package/dist/apis/me/MeApi.d.ts +33 -22
  54. package/dist/apis/me/MeApi.d.ts.map +1 -1
  55. package/dist/apis/me/MeApi.mjs +36 -29
  56. package/dist/apis/me/MeApi.mjs.map +1 -1
  57. package/dist/apis/me/types.d.ts +67 -4
  58. package/dist/apis/me/types.d.ts.map +1 -1
  59. package/dist/apis/notifications/NotificationsApi.cjs +50 -2
  60. package/dist/apis/notifications/NotificationsApi.cjs.map +1 -1
  61. package/dist/apis/notifications/NotificationsApi.d.ts +41 -3
  62. package/dist/apis/notifications/NotificationsApi.d.ts.map +1 -1
  63. package/dist/apis/notifications/NotificationsApi.mjs +50 -2
  64. package/dist/apis/notifications/NotificationsApi.mjs.map +1 -1
  65. package/dist/apis/notifications/types.d.ts +54 -8
  66. package/dist/apis/notifications/types.d.ts.map +1 -1
  67. package/dist/apis/serviceAccessManagement/ServiceAccessManagementApi.cjs.map +1 -1
  68. package/dist/apis/serviceAccessManagement/ServiceAccessManagementApi.d.ts +4 -1
  69. package/dist/apis/serviceAccessManagement/ServiceAccessManagementApi.d.ts.map +1 -1
  70. package/dist/apis/serviceAccessManagement/ServiceAccessManagementApi.mjs.map +1 -1
  71. package/dist/apis/serviceAccessManagement/types.d.ts +3 -0
  72. package/dist/apis/serviceAccessManagement/types.d.ts.map +1 -1
  73. package/dist/apis/stickerUsers/StickerUsersApi.cjs.map +1 -1
  74. package/dist/apis/stickerUsers/StickerUsersApi.d.ts +3 -1
  75. package/dist/apis/stickerUsers/StickerUsersApi.d.ts.map +1 -1
  76. package/dist/apis/stickerUsers/StickerUsersApi.mjs.map +1 -1
  77. package/dist/apis/stickerUsers/types.d.ts +4 -0
  78. package/dist/apis/stickerUsers/types.d.ts.map +1 -1
  79. package/dist/apis/stickers/StickersApi.cjs +27 -3
  80. package/dist/apis/stickers/StickersApi.cjs.map +1 -1
  81. package/dist/apis/stickers/StickersApi.d.ts +24 -4
  82. package/dist/apis/stickers/StickersApi.d.ts.map +1 -1
  83. package/dist/apis/stickers/StickersApi.mjs +27 -3
  84. package/dist/apis/stickers/StickersApi.mjs.map +1 -1
  85. package/dist/apis/stickers/types.d.ts +28 -4
  86. package/dist/apis/stickers/types.d.ts.map +1 -1
  87. package/dist/apis/transcripts/TranscriptsApi.cjs +12 -2
  88. package/dist/apis/transcripts/TranscriptsApi.cjs.map +1 -1
  89. package/dist/apis/transcripts/TranscriptsApi.d.ts +11 -5
  90. package/dist/apis/transcripts/TranscriptsApi.d.ts.map +1 -1
  91. package/dist/apis/transcripts/TranscriptsApi.mjs +12 -2
  92. package/dist/apis/transcripts/TranscriptsApi.mjs.map +1 -1
  93. package/dist/apis/transcripts/types.d.ts +4 -0
  94. package/dist/apis/transcripts/types.d.ts.map +1 -1
  95. package/dist/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.cjs +51 -0
  96. package/dist/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.cjs.map +1 -1
  97. package/dist/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.d.ts +44 -2
  98. package/dist/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.d.ts.map +1 -1
  99. package/dist/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.mjs +51 -0
  100. package/dist/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.mjs.map +1 -1
  101. package/dist/apis/whatsappBusinessTemplates/types.d.ts +34 -1
  102. package/dist/apis/whatsappBusinessTemplates/types.d.ts.map +1 -1
  103. package/package.json +1 -1
  104. package/src/apis/absence/AbsenceApi.test.ts +65 -0
  105. package/src/apis/absence/AbsenceApi.ts +77 -4
  106. package/src/apis/absence/types.ts +53 -2
  107. package/src/apis/activityLog/ActivityLogApi.test.ts +44 -0
  108. package/src/apis/activityLog/ActivityLogApi.ts +22 -3
  109. package/src/apis/activityLog/types.ts +47 -8
  110. package/src/apis/categories/types.ts +1 -0
  111. package/src/apis/creditMovements/CreditMovementsApi.test.ts +88 -0
  112. package/src/apis/creditMovements/CreditMovementsApi.ts +73 -2
  113. package/src/apis/creditMovements/types.ts +74 -2
  114. package/src/apis/interactiveMessages/InteractiveMessagesApi.test.ts +59 -0
  115. package/src/apis/interactiveMessages/InteractiveMessagesApi.ts +26 -0
  116. package/src/apis/interactiveMessages/types.ts +8 -2
  117. package/src/apis/knowledgeBase/KnowledgeBaseApi.test.ts +54 -0
  118. package/src/apis/knowledgeBase/KnowledgeBaseApi.ts +61 -1
  119. package/src/apis/knowledgeBase/types.ts +62 -2
  120. package/src/apis/knowledgeBaseItem/KnowledgeBaseItemApi.test.ts +57 -0
  121. package/src/apis/knowledgeBaseItem/KnowledgeBaseItemApi.ts +45 -0
  122. package/src/apis/knowledgeBaseItem/types.ts +23 -6
  123. package/src/apis/me/MeApi.test.ts +45 -1
  124. package/src/apis/me/MeApi.ts +83 -28
  125. package/src/apis/me/types.ts +75 -4
  126. package/src/apis/notifications/NotificationsApi.test.ts +74 -0
  127. package/src/apis/notifications/NotificationsApi.ts +88 -3
  128. package/src/apis/notifications/types.ts +65 -7
  129. package/src/apis/payloads.test-d.ts +82 -2
  130. package/src/apis/serviceAccessManagement/ServiceAccessManagementApi.ts +4 -1
  131. package/src/apis/serviceAccessManagement/types.ts +3 -0
  132. package/src/apis/stickerUsers/StickerUsersApi.ts +3 -1
  133. package/src/apis/stickerUsers/types.ts +4 -0
  134. package/src/apis/stickers/StickersApi.test.ts +58 -0
  135. package/src/apis/stickers/StickersApi.ts +46 -4
  136. package/src/apis/stickers/types.ts +29 -4
  137. package/src/apis/transcripts/TranscriptsApi.test.ts +14 -21
  138. package/src/apis/transcripts/TranscriptsApi.ts +15 -6
  139. package/src/apis/transcripts/types.ts +4 -0
  140. package/src/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.test.ts +86 -0
  141. package/src/apis/whatsappBusinessTemplates/WhatsappBusinessTemplatesApi.ts +74 -1
  142. package/src/apis/whatsappBusinessTemplates/types.ts +38 -1
@@ -1,9 +1,54 @@
1
1
  import type { AccountSettings } from '../accounts/types';
2
2
  import type { UserPreferences } from '../users/types';
3
3
  import type { UserStatus } from '../users/types';
4
+ /** The client of the session that sets the status: the web app or the mobile app. */
5
+ export type MeClient = 'web' | 'app';
6
+ /** Query of `GET /me`: without `include`, the user comes without relations. */
7
+ export type MeQuery = {
8
+ include?: ('roles' | 'departments' | 'timetable' | 'account' | 'permissions' | 'organizations' | (string & {}))[];
9
+ attributes?: string[];
10
+ };
11
+ /** Query of `GET /me/account`: `where.id` is the id of the account of the user (`accountId` of `getMe`). */
12
+ export type MeAccountQuery = {
13
+ where: {
14
+ id: string;
15
+ };
16
+ include?: string[];
17
+ attributes?: string[];
18
+ };
19
+ export type AccountAmountsFilter = 'services.amounts' | 'users.amounts';
20
+ /** Query of `GET /me/get-account-amounts`: which amounts to answer (the credit amounts are never answered). */
21
+ export type AccountAmountsQuery = {
22
+ filter: AccountAmountsFilter[];
23
+ };
24
+ export type UsersAmounts = {
25
+ planBase: number;
26
+ additional: number;
27
+ totalContracted: number;
28
+ planBaseConsumed: number;
29
+ additionalConsumed: number;
30
+ totalConsumed: number;
31
+ available: number;
32
+ };
33
+ export type AccountAmounts = {
34
+ accountId: string;
35
+ servicesAmounts?: Record<string, unknown>;
36
+ usersAmounts?: UsersAmounts;
37
+ };
38
+ /** What `updateStatus` answers: the status fields of the user, not the whole user. */
39
+ export type MeStatusResponse = {
40
+ id: string;
41
+ updatedAt: string;
42
+ status: UserStatus;
43
+ clientsStatus: Partial<Record<MeClient, UserStatus>>;
44
+ language: string;
45
+ account?: unknown;
46
+ };
4
47
  export type UpdateMePayload = {
5
48
  name?: string;
6
49
  password?: string;
50
+ /** Required with `password`: the current password of the user. */
51
+ currentPassword?: string;
7
52
  language?: string;
8
53
  preferences?: UserPreferences;
9
54
  otpAuthActive?: boolean;
@@ -12,19 +57,37 @@ export type UpdateMePayload = {
12
57
  };
13
58
  export type UpdateMeStatusPayload = {
14
59
  status: UserStatus;
15
- client?: string;
60
+ /** Required by the backend (400 without it). */
61
+ client?: MeClient;
16
62
  };
63
+ /**
64
+ * Merged over the account. The default department is required while the tickets are enabled
65
+ * (`settings.ticketsEnabled`; 400 `DEFAULT_DEPARTMENT_REQUIRED`).
66
+ */
17
67
  export type UpdateMeAccountPayload = {
18
68
  name?: string;
19
69
  settings?: Partial<AccountSettings>;
20
- wizardProgress?: string;
70
+ wizardProgress?: 'notStarted' | 'started' | 'finished' | (string & {});
21
71
  defaultDepartmentId?: string;
72
+ defaultDepartment?: {
73
+ id: string;
74
+ };
22
75
  };
23
76
  export type TakeoverPayload = {
24
- client?: string;
77
+ /** Defaults to `'web'`. */
78
+ client?: MeClient;
25
79
  };
26
80
  export type SetOtpSecretKeyPayload = {
27
81
  secretKey: string;
28
82
  };
29
- export type RegisterTokenPayload = Record<string, unknown>;
83
+ /** The push tokens of the user. `data` REPLACES the whole `data` of the user (it is not merged). */
84
+ export type RegisterTokenPayload = {
85
+ data?: {
86
+ oneSignalToken?: string;
87
+ expoPushToken?: string | null;
88
+ fromApp?: boolean;
89
+ };
90
+ /** The backend ignores the call when it is `true`. */
91
+ isClientUser?: boolean;
92
+ };
30
93
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/me/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC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;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,UAAU,CAAA;IAClB,gDAAgD;IAChD,MAAM,CAAC,EAAE,QAAQ,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IACnC,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACtE,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iBAAiB,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B;IAC3B,MAAM,CAAC,EAAE,QAAQ,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,oGAAoG;AACpG,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACpF,sDAAsD;IACtD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA"}
@@ -2,17 +2,65 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_core_BaseCrudApi = require('../../core/BaseCrudApi.cjs');
3
3
 
4
4
  //#region src/apis/notifications/NotificationsApi.ts
5
+ /**
6
+ * Notifications of the current user (all of the account with `notification.view.all`). Some types open a modal in the web app as soon as they arrive (`announcement`, `credits-90`,
7
+ * `credits-100`, `smart-summary`, `warn-service-reconnect`).
8
+ */
5
9
  var NotificationsApi = class extends require_core_BaseCrudApi.BaseCrudApi {
6
10
  constructor(client) {
7
11
  super(client, "/notifications");
8
12
  }
9
13
  /**
10
- * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500. The route checks
11
- * no permission.
14
+ * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500.
12
15
  */
13
16
  deleteById(id, headers) {
14
17
  return super.deleteById(id, headers);
15
18
  }
19
+ /**
20
+ * Counts the notifications the user sees: `{ count: { total, read, unread } }`, as TEXT.
21
+ */
22
+ count(headers) {
23
+ return this.client.post(`${this.basePath}/count`, void 0, headers);
24
+ }
25
+ /**
26
+ * Marks a notification as read for the current user and resolves the new counts. An unknown id answers
27
+ * 400 `Notification not found.`.
28
+ */
29
+ read(id, headers) {
30
+ return this.client.put(`${this.basePath}/${id}/read`, void 0, headers);
31
+ }
32
+ /**
33
+ * Marks a notification as unread for the current user and resolves the new counts. An unknown id
34
+ * answers 400 `Notification not found.`.
35
+ */
36
+ unread(id, headers) {
37
+ return this.client.put(`${this.basePath}/${id}/unread`, void 0, headers);
38
+ }
39
+ /**
40
+ * Marks the notifications of `ids` as read. Resolves with no body; a body that is not an array answers
41
+ * 500 `Body must be an array of notification IDs`.
42
+ */
43
+ readMany(ids, headers) {
44
+ return this.client.post(`${this.basePath}/read-many`, ids, headers);
45
+ }
46
+ /**
47
+ * Marks every notification the user sees as read (a GET that writes: it recreates the read receipts of
48
+ * the user) and resolves the counts, as numbers.
49
+ */
50
+ readAll(headers) {
51
+ return this.client.get(`${this.basePath}/read-all`, headers);
52
+ }
53
+ /** Clears the push badge counter of the current user. Resolves `{ success: true }`. */
54
+ resetBadgeCount(headers) {
55
+ return this.client.post(`${this.basePath}/reset-badge-count`, void 0, headers);
56
+ }
57
+ /**
58
+ * SENDS an announcement (`type: 'announcement'`, which opens a modal in the web app) to every user of
59
+ * the account, or only to the admins with `to: 'admin'`. Resolves `{ message: 'Notificações enviadas' }` before the notifications are created.
60
+ */
61
+ sendAll(body, headers) {
62
+ return this.client.post(`${this.basePath}/send-all`, body, headers);
63
+ }
16
64
  };
17
65
 
18
66
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/notifications/NotificationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Notification, CreateNotificationPayload, UpdateNotificationPayload } from './types'\n\nexport class NotificationsApi extends BaseCrudApi<\n Notification,\n CreateNotificationPayload,\n UpdateNotificationPayload,\n ListQuery<Notification>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/notifications')\n }\n\n /**\n * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500. The route checks\n * no permission.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;AAKA,IAAa,mBAAb,cAAsCA,qCAMpC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB;;;;;;CAOjC,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
1
+ {"version":3,"file":"NotificationsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/notifications/NotificationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type {\n Notification,\n CreateNotificationPayload,\n UpdateNotificationPayload,\n NotificationCountsResponse,\n NotificationReadAllResponse,\n SendAllNotificationsPayload,\n} from './types'\n\n/**\n * Notifications of the current user (all of the account with `notification.view.all`). Some types open a modal in the web app as soon as they arrive (`announcement`, `credits-90`,\n * `credits-100`, `smart-summary`, `warn-service-reconnect`).\n */\nexport class NotificationsApi extends BaseCrudApi<\n Notification,\n CreateNotificationPayload,\n UpdateNotificationPayload,\n ListQuery<Notification>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/notifications')\n }\n\n /**\n * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Counts the notifications the user sees: `{ count: { total, read, unread } }`, as TEXT.\n */\n count(headers?: Record<string, string>): Promise<NotificationCountsResponse> {\n return this.client.post<NotificationCountsResponse>(\n `${this.basePath}/count`,\n undefined,\n headers,\n )\n }\n\n /**\n * Marks a notification as read for the current user and resolves the new counts. An unknown id answers\n * 400 `Notification not found.`.\n */\n read(id: string, headers?: Record<string, string>): Promise<NotificationCountsResponse> {\n return this.client.put<NotificationCountsResponse>(\n `${this.basePath}/${id}/read`,\n undefined,\n headers,\n )\n }\n\n /**\n * Marks a notification as unread for the current user and resolves the new counts. An unknown id\n * answers 400 `Notification not found.`.\n */\n unread(id: string, headers?: Record<string, string>): Promise<NotificationCountsResponse> {\n return this.client.put<NotificationCountsResponse>(\n `${this.basePath}/${id}/unread`,\n undefined,\n headers,\n )\n }\n\n /**\n * Marks the notifications of `ids` as read. Resolves with no body; a body that is not an array answers\n * 500 `Body must be an array of notification IDs`.\n */\n readMany(ids: string[], headers?: Record<string, string>): Promise<void> {\n return this.client.post<void, string[]>(`${this.basePath}/read-many`, ids, headers)\n }\n\n /**\n * Marks every notification the user sees as read (a GET that writes: it recreates the read receipts of\n * the user) and resolves the counts, as numbers.\n */\n readAll(headers?: Record<string, string>): Promise<NotificationReadAllResponse> {\n return this.client.get<NotificationReadAllResponse>(`${this.basePath}/read-all`, headers)\n }\n\n /** Clears the push badge counter of the current user. Resolves `{ success: true }`. */\n resetBadgeCount(headers?: Record<string, string>): Promise<{ success: true }> {\n return this.client.post<{ success: true }>(\n `${this.basePath}/reset-badge-count`,\n undefined,\n headers,\n )\n }\n\n /**\n * SENDS an announcement (`type: 'announcement'`, which opens a modal in the web app) to every user of\n * the account, or only to the admins with `to: 'admin'`. Resolves `{ message: 'Notificações enviadas' }` before the notifications are created.\n */\n sendAll(\n body: SendAllNotificationsPayload,\n headers?: Record<string, string>,\n ): Promise<{ message: string }> {\n return this.client.post<{ message: string }, SendAllNotificationsPayload>(\n `${this.basePath}/send-all`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;;;;;;AAgBA,IAAa,mBAAb,cAAsCA,qCAMpC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB;;;;;CAMjC,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;CAMtC,MAAM,SAAuE;AAC3E,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,SACjB,QACA,QACD;;;;;;CAOH,KAAK,IAAY,SAAuE;AACtF,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,GAAG,GAAG,QACvB,QACA,QACD;;;;;;CAOH,OAAO,IAAY,SAAuE;AACxF,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,GAAG,GAAG,UACvB,QACA,QACD;;;;;;CAOH,SAAS,KAAe,SAAiD;AACvE,SAAO,KAAK,OAAO,KAAqB,GAAG,KAAK,SAAS,aAAa,KAAK,QAAQ;;;;;;CAOrF,QAAQ,SAAwE;AAC9E,SAAO,KAAK,OAAO,IAAiC,GAAG,KAAK,SAAS,YAAY,QAAQ;;;CAI3F,gBAAgB,SAA8D;AAC5E,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,qBACjB,QACA,QACD;;;;;;CAOH,QACE,MACA,SAC8B;AAC9B,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,YACjB,MACA,QACD"}
@@ -1,13 +1,51 @@
1
1
  import type { ApiClient } from '../../core/ApiClient';
2
2
  import type { ListQuery } from '../../core/types';
3
3
  import { BaseCrudApi } from '../../core/BaseCrudApi';
4
- import type { Notification, CreateNotificationPayload, UpdateNotificationPayload } from './types';
4
+ import type { Notification, CreateNotificationPayload, UpdateNotificationPayload, NotificationCountsResponse, NotificationReadAllResponse, SendAllNotificationsPayload } from './types';
5
+ /**
6
+ * Notifications of the current user (all of the account with `notification.view.all`). Some types open a modal in the web app as soon as they arrive (`announcement`, `credits-90`,
7
+ * `credits-100`, `smart-summary`, `warn-service-reconnect`).
8
+ */
5
9
  export declare class NotificationsApi extends BaseCrudApi<Notification, CreateNotificationPayload, UpdateNotificationPayload, ListQuery<Notification>, 'OK'> {
6
10
  constructor(client: ApiClient);
7
11
  /**
8
- * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500. The route checks
9
- * no permission.
12
+ * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500.
10
13
  */
11
14
  deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
15
+ /**
16
+ * Counts the notifications the user sees: `{ count: { total, read, unread } }`, as TEXT.
17
+ */
18
+ count(headers?: Record<string, string>): Promise<NotificationCountsResponse>;
19
+ /**
20
+ * Marks a notification as read for the current user and resolves the new counts. An unknown id answers
21
+ * 400 `Notification not found.`.
22
+ */
23
+ read(id: string, headers?: Record<string, string>): Promise<NotificationCountsResponse>;
24
+ /**
25
+ * Marks a notification as unread for the current user and resolves the new counts. An unknown id
26
+ * answers 400 `Notification not found.`.
27
+ */
28
+ unread(id: string, headers?: Record<string, string>): Promise<NotificationCountsResponse>;
29
+ /**
30
+ * Marks the notifications of `ids` as read. Resolves with no body; a body that is not an array answers
31
+ * 500 `Body must be an array of notification IDs`.
32
+ */
33
+ readMany(ids: string[], headers?: Record<string, string>): Promise<void>;
34
+ /**
35
+ * Marks every notification the user sees as read (a GET that writes: it recreates the read receipts of
36
+ * the user) and resolves the counts, as numbers.
37
+ */
38
+ readAll(headers?: Record<string, string>): Promise<NotificationReadAllResponse>;
39
+ /** Clears the push badge counter of the current user. Resolves `{ success: true }`. */
40
+ resetBadgeCount(headers?: Record<string, string>): Promise<{
41
+ success: true;
42
+ }>;
43
+ /**
44
+ * SENDS an announcement (`type: 'announcement'`, which opens a modal in the web app) to every user of
45
+ * the account, or only to the admins with `to: 'admin'`. Resolves `{ message: 'Notificações enviadas' }` before the notifications are created.
46
+ */
47
+ sendAll(body: SendAllNotificationsPayload, headers?: Record<string, string>): Promise<{
48
+ message: string;
49
+ }>;
12
50
  }
13
51
  //# sourceMappingURL=NotificationsApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/notifications/NotificationsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAEjG,qBAAa,gBAAiB,SAAQ,WAAW,CAC/C,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,SAAS,CAAC,YAAY,CAAC,EACvB,IAAI,CACL;gBACa,MAAM,EAAE,SAAS;IAI7B;;;OAGG;IACM,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjF"}
1
+ {"version":3,"file":"NotificationsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/notifications/NotificationsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EACV,YAAY,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;OAGG;IACH,OAAO,CACL,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAOhC"}
@@ -1,17 +1,65 @@
1
1
  import { BaseCrudApi } from "../../core/BaseCrudApi.mjs";
2
2
 
3
3
  //#region src/apis/notifications/NotificationsApi.ts
4
+ /**
5
+ * Notifications of the current user (all of the account with `notification.view.all`). Some types open a modal in the web app as soon as they arrive (`announcement`, `credits-90`,
6
+ * `credits-100`, `smart-summary`, `warn-service-reconnect`).
7
+ */
4
8
  var NotificationsApi = class extends BaseCrudApi {
5
9
  constructor(client) {
6
10
  super(client, "/notifications");
7
11
  }
8
12
  /**
9
- * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500. The route checks
10
- * no permission.
13
+ * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500.
11
14
  */
12
15
  deleteById(id, headers) {
13
16
  return super.deleteById(id, headers);
14
17
  }
18
+ /**
19
+ * Counts the notifications the user sees: `{ count: { total, read, unread } }`, as TEXT.
20
+ */
21
+ count(headers) {
22
+ return this.client.post(`${this.basePath}/count`, void 0, headers);
23
+ }
24
+ /**
25
+ * Marks a notification as read for the current user and resolves the new counts. An unknown id answers
26
+ * 400 `Notification not found.`.
27
+ */
28
+ read(id, headers) {
29
+ return this.client.put(`${this.basePath}/${id}/read`, void 0, headers);
30
+ }
31
+ /**
32
+ * Marks a notification as unread for the current user and resolves the new counts. An unknown id
33
+ * answers 400 `Notification not found.`.
34
+ */
35
+ unread(id, headers) {
36
+ return this.client.put(`${this.basePath}/${id}/unread`, void 0, headers);
37
+ }
38
+ /**
39
+ * Marks the notifications of `ids` as read. Resolves with no body; a body that is not an array answers
40
+ * 500 `Body must be an array of notification IDs`.
41
+ */
42
+ readMany(ids, headers) {
43
+ return this.client.post(`${this.basePath}/read-many`, ids, headers);
44
+ }
45
+ /**
46
+ * Marks every notification the user sees as read (a GET that writes: it recreates the read receipts of
47
+ * the user) and resolves the counts, as numbers.
48
+ */
49
+ readAll(headers) {
50
+ return this.client.get(`${this.basePath}/read-all`, headers);
51
+ }
52
+ /** Clears the push badge counter of the current user. Resolves `{ success: true }`. */
53
+ resetBadgeCount(headers) {
54
+ return this.client.post(`${this.basePath}/reset-badge-count`, void 0, headers);
55
+ }
56
+ /**
57
+ * SENDS an announcement (`type: 'announcement'`, which opens a modal in the web app) to every user of
58
+ * the account, or only to the admins with `to: 'admin'`. Resolves `{ message: 'Notificações enviadas' }` before the notifications are created.
59
+ */
60
+ sendAll(body, headers) {
61
+ return this.client.post(`${this.basePath}/send-all`, body, headers);
62
+ }
15
63
  };
16
64
 
17
65
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsApi.mjs","names":[],"sources":["../../../src/apis/notifications/NotificationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Notification, CreateNotificationPayload, UpdateNotificationPayload } from './types'\n\nexport class NotificationsApi extends BaseCrudApi<\n Notification,\n CreateNotificationPayload,\n UpdateNotificationPayload,\n ListQuery<Notification>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/notifications')\n }\n\n /**\n * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500. The route checks\n * no permission.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;AAKA,IAAa,mBAAb,cAAsC,YAMpC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB;;;;;;CAOjC,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
1
+ {"version":3,"file":"NotificationsApi.mjs","names":[],"sources":["../../../src/apis/notifications/NotificationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type {\n Notification,\n CreateNotificationPayload,\n UpdateNotificationPayload,\n NotificationCountsResponse,\n NotificationReadAllResponse,\n SendAllNotificationsPayload,\n} from './types'\n\n/**\n * Notifications of the current user (all of the account with `notification.view.all`). Some types open a modal in the web app as soon as they arrive (`announcement`, `credits-90`,\n * `credits-100`, `smart-summary`, `warn-service-reconnect`).\n */\nexport class NotificationsApi extends BaseCrudApi<\n Notification,\n CreateNotificationPayload,\n UpdateNotificationPayload,\n ListQuery<Notification>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/notifications')\n }\n\n /**\n * Deletes a notification. Resolves the text `'OK'`; an unknown id answers 500.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Counts the notifications the user sees: `{ count: { total, read, unread } }`, as TEXT.\n */\n count(headers?: Record<string, string>): Promise<NotificationCountsResponse> {\n return this.client.post<NotificationCountsResponse>(\n `${this.basePath}/count`,\n undefined,\n headers,\n )\n }\n\n /**\n * Marks a notification as read for the current user and resolves the new counts. An unknown id answers\n * 400 `Notification not found.`.\n */\n read(id: string, headers?: Record<string, string>): Promise<NotificationCountsResponse> {\n return this.client.put<NotificationCountsResponse>(\n `${this.basePath}/${id}/read`,\n undefined,\n headers,\n )\n }\n\n /**\n * Marks a notification as unread for the current user and resolves the new counts. An unknown id\n * answers 400 `Notification not found.`.\n */\n unread(id: string, headers?: Record<string, string>): Promise<NotificationCountsResponse> {\n return this.client.put<NotificationCountsResponse>(\n `${this.basePath}/${id}/unread`,\n undefined,\n headers,\n )\n }\n\n /**\n * Marks the notifications of `ids` as read. Resolves with no body; a body that is not an array answers\n * 500 `Body must be an array of notification IDs`.\n */\n readMany(ids: string[], headers?: Record<string, string>): Promise<void> {\n return this.client.post<void, string[]>(`${this.basePath}/read-many`, ids, headers)\n }\n\n /**\n * Marks every notification the user sees as read (a GET that writes: it recreates the read receipts of\n * the user) and resolves the counts, as numbers.\n */\n readAll(headers?: Record<string, string>): Promise<NotificationReadAllResponse> {\n return this.client.get<NotificationReadAllResponse>(`${this.basePath}/read-all`, headers)\n }\n\n /** Clears the push badge counter of the current user. Resolves `{ success: true }`. */\n resetBadgeCount(headers?: Record<string, string>): Promise<{ success: true }> {\n return this.client.post<{ success: true }>(\n `${this.basePath}/reset-badge-count`,\n undefined,\n headers,\n )\n }\n\n /**\n * SENDS an announcement (`type: 'announcement'`, which opens a modal in the web app) to every user of\n * the account, or only to the admins with `to: 'admin'`. Resolves `{ message: 'Notificações enviadas' }` before the notifications are created.\n */\n sendAll(\n body: SendAllNotificationsPayload,\n headers?: Record<string, string>,\n ): Promise<{ message: string }> {\n return this.client.post<{ message: string }, SendAllNotificationsPayload>(\n `${this.basePath}/send-all`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;;;;;AAgBA,IAAa,mBAAb,cAAsC,YAMpC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB;;;;;CAMjC,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;CAMtC,MAAM,SAAuE;AAC3E,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,SACjB,QACA,QACD;;;;;;CAOH,KAAK,IAAY,SAAuE;AACtF,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,GAAG,GAAG,QACvB,QACA,QACD;;;;;;CAOH,OAAO,IAAY,SAAuE;AACxF,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,GAAG,GAAG,UACvB,QACA,QACD;;;;;;CAOH,SAAS,KAAe,SAAiD;AACvE,SAAO,KAAK,OAAO,KAAqB,GAAG,KAAK,SAAS,aAAa,KAAK,QAAQ;;;;;;CAOrF,QAAQ,SAAwE;AAC9E,SAAO,KAAK,OAAO,IAAiC,GAAG,KAAK,SAAS,YAAY,QAAQ;;;CAI3F,gBAAgB,SAA8D;AAC5E,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,qBACjB,QACA,QACD;;;;;;CAOH,QACE,MACA,SAC8B;AAC9B,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,YACjB,MACA,QACD"}
@@ -1,42 +1,88 @@
1
1
  import type { Contact } from '../contacts/types';
2
2
  import type { Schedule } from '../schedule/types';
3
3
  import type { User } from '../users/types';
4
- export type NotificationType = 'schedule' | 'distribution' | 'info' | 'warn' | 'error' | 'announcement' | 'copilot' | 'undefined' | 'waba-health-warning' | 'waba-health-block';
5
- /** Present on pipeline-related notifications. */
4
+ export type NotificationType = 'schedule' | 'distribution' | 'info' | 'warn' | 'error' | 'announcement' | 'copilot' | 'undefined' | 'waba-health-warning' | 'waba-health-block' | 'kanban-board-initialized' | 'users-bulk-archive-blocked' | 'user-import' | 'credits-90' | 'credits-100' | 'smart-summary' | 'warn-service-reconnect';
5
+ /** Extra data of the notification; the pipeline notifications carry the pipeline ids. */
6
6
  export type NotificationConfig = {
7
- pipelineId: string;
8
- pipelineAutomationId: string;
7
+ pipelineId?: string;
8
+ pipelineAutomationId?: string;
9
+ [key: string]: unknown;
10
+ };
11
+ /** The read receipt of a notification for the current user. */
12
+ export type NotificationRead = {
13
+ id: string;
14
+ notificationId: string;
15
+ userId: string;
16
+ readAt: string | null;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ };
20
+ /**
21
+ * Counts of the notifications the user sees (all of the account with `notification.view.all`).
22
+ * They come as TEXT: the backend answers the `COUNT` of the database as is (e.g. `"43"`).
23
+ */
24
+ export type NotificationCounts = {
25
+ total: string;
26
+ read: string;
27
+ unread: string;
28
+ };
29
+ /** What `read`, `unread` and `count` answer. */
30
+ export type NotificationCountsResponse = {
31
+ count: NotificationCounts;
32
+ };
33
+ /** What `readAll` answers: the counts after marking everything as read, as numbers. */
34
+ export type NotificationReadAllResponse = {
35
+ total: number;
36
+ read: number;
37
+ unread: number;
38
+ };
39
+ /** The body of `sendAll`: `to: 'admin'` sends only to the admins; any other value sends to every user. */
40
+ export type SendAllNotificationsPayload = {
41
+ /** Up to 255 characters. */
42
+ text: string;
43
+ to: 'admin' | 'all' | (string & {});
44
+ image?: string;
9
45
  };
10
46
  export type Notification = {
11
47
  id: string;
12
48
  text: string;
13
49
  type: NotificationType | null;
14
- read: boolean;
50
+ /** `null` on the announcements of `sendAll` until they are read. */
51
+ read: boolean | null;
15
52
  image: string | null;
16
53
  label: string | null;
17
54
  config: NotificationConfig | null;
18
55
  attachedType: string | null;
56
+ attachedId: string | null;
57
+ notificationReadId: string | null;
19
58
  contactId: string | null;
20
59
  userId: string;
21
60
  accountId: string;
22
61
  scheduleId: string | null;
23
62
  createdAt: string;
24
63
  updatedAt: string;
25
- deletedAt: string | null;
64
+ /** @deprecated Not answered: the transformer of the backend does not send it. */
65
+ deletedAt?: string | null;
26
66
  user?: User;
27
67
  schedule?: Schedule | null;
68
+ /** @deprecated Not served: the model has no such association, so it never comes. */
28
69
  contact?: Contact | null;
70
+ notificationRead?: NotificationRead | null;
29
71
  };
30
- export type NotificationRelationships = 'user' | 'schedule' | 'contact';
72
+ /** The backend serves `user`, `schedule` and `notificationRead` (`contact` is never answered). */
73
+ export type NotificationRelationships = 'user' | 'schedule' | 'contact' | 'notificationRead';
31
74
  export type CreateNotificationPayload = {
75
+ /** Up to 255 characters. */
32
76
  text: string;
33
- userId: string;
77
+ /** Ignored: the backend creates the notification for the current user. */
78
+ userId?: string;
34
79
  type?: NotificationType;
35
80
  label?: string;
36
81
  config?: NotificationConfig;
37
82
  attachedType?: string;
38
83
  contactId?: string;
39
84
  scheduleId?: string;
85
+ image?: string;
40
86
  };
41
87
  export type UpdateNotificationPayload = {
42
88
  text?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/notifications/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mB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;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEzB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC1B,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC3C,CAAA;AAED,kGAAkG;AAClG,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,kBAAkB,CAAA;AAE5F,MAAM,MAAM,yBAAyB,GAAG;IACtC,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceAccessManagementApi.cjs","names":["BaseApi"],"sources":["../../../src/apis/serviceAccessManagement/ServiceAccessManagementApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { ServiceAccessManagement } from './types'\n\nexport class ServiceAccessManagementApi\n extends BaseApi\n implements HasGetMany<ServiceAccessManagement>\n{\n /** Returns a paginated list of which users have access to which services. */\n getMany(\n query: ListQuery<ServiceAccessManagement> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement>>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>(\n `/service-access-management${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAIA,IAAa,6BAAb,cACUA,6BAEV;CAcE,QACE,OACA,SACyE;EACzE,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,6BAA6B,eAC7B,QACD"}
1
+ {"version":3,"file":"ServiceAccessManagementApi.cjs","names":["BaseApi"],"sources":["../../../src/apis/serviceAccessManagement/ServiceAccessManagementApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { ServiceAccessManagement } from './types'\n\nexport class ServiceAccessManagementApi\n extends BaseApi\n implements HasGetMany<ServiceAccessManagement>\n{\n /**\n * The connections denied to each user (one row per user × connection, written by\n * `POST /services/:id/access-management`), raw. Filter by the `serviceId` or `userId` you want.\n */\n getMany(\n query: ListQuery<ServiceAccessManagement> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement>>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>(\n `/service-access-management${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAIA,IAAa,6BAAb,cACUA,6BAEV;CAiBE,QACE,OACA,SACyE;EACzE,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,6BAA6B,eAC7B,QACD"}
@@ -2,7 +2,10 @@ import { BaseApi } from '../../core/BaseApi';
2
2
  import type { ListQuery, Paginated, HasGetMany } from '../../core/types';
3
3
  import type { ServiceAccessManagement } from './types';
4
4
  export declare class ServiceAccessManagementApi extends BaseApi implements HasGetMany<ServiceAccessManagement> {
5
- /** Returns a paginated list of which users have access to which services. */
5
+ /**
6
+ * The connections denied to each user (one row per user × connection, written by
7
+ * `POST /services/:id/access-management`), raw. Filter by the `serviceId` or `userId` you want.
8
+ */
6
9
  getMany(query: ListQuery<ServiceAccessManagement> & {
7
10
  paginate: false;
8
11
  }, headers?: Record<string, string>): Promise<ServiceAccessManagement[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceAccessManagementApi.d.ts","sourceRoot":"","sources":["../../../src/apis/serviceAccessManagement/ServiceAccessManagementApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,KAAK,EAAE,uBA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C,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,uBAAuB,EAAE,CAAC;IACrC,OAAO,CACL,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,IAAI,CAAA;KAAE,EAChE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;IAC9C,OAAO,CACL,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,CAAC,EAC1C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,SAAS,CAAC,uBAAuB,CAAC,GAAG,uBAAuB,EAAE,CAAC;CAW3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceAccessManagementApi.mjs","names":[],"sources":["../../../src/apis/serviceAccessManagement/ServiceAccessManagementApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { ServiceAccessManagement } from './types'\n\nexport class ServiceAccessManagementApi\n extends BaseApi\n implements HasGetMany<ServiceAccessManagement>\n{\n /** Returns a paginated list of which users have access to which services. */\n getMany(\n query: ListQuery<ServiceAccessManagement> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement>>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>(\n `/service-access-management${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;AAIA,IAAa,6BAAb,cACU,QAEV;CAcE,QACE,OACA,SACyE;EACzE,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,6BAA6B,eAC7B,QACD"}
1
+ {"version":3,"file":"ServiceAccessManagementApi.mjs","names":[],"sources":["../../../src/apis/serviceAccessManagement/ServiceAccessManagementApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { ServiceAccessManagement } from './types'\n\nexport class ServiceAccessManagementApi\n extends BaseApi\n implements HasGetMany<ServiceAccessManagement>\n{\n /**\n * The connections denied to each user (one row per user × connection, written by\n * `POST /services/:id/access-management`), raw. Filter by the `serviceId` or `userId` you want.\n */\n getMany(\n query: ListQuery<ServiceAccessManagement> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement>>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>\n getMany(\n query?: ListQuery<ServiceAccessManagement>,\n headers?: Record<string, string>,\n ): Promise<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<ServiceAccessManagement> | ServiceAccessManagement[]>(\n `/service-access-management${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;AAIA,IAAa,6BAAb,cACU,QAEV;CAiBE,QACE,OACA,SACyE;EACzE,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,6BAA6B,eAC7B,QACD"}
@@ -4,8 +4,11 @@ export type ServiceAccessManagement = {
4
4
  userId: string;
5
5
  serviceId: string;
6
6
  createdAt: string;
7
+ /** @deprecated Not served: the backend drops every include of this route. */
7
8
  user?: User;
9
+ /** @deprecated Not served: the backend drops every include of this route. */
8
10
  service?: Service;
9
11
  };
12
+ /** None is served: the backend drops every include of this route. */
10
13
  export type ServiceAccessManagementRelationships = 'user' | 'service';
11
14
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/serviceAccessManagement/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,oCAAoC,GAAG,MAAM,GAAG,SAAS,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/serviceAccessManagement/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,qEAAqE;AACrE,MAAM,MAAM,oCAAoC,GAAG,MAAM,GAAG,SAAS,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"StickerUsersApi.cjs","names":["BaseApi"],"sources":["../../../src/apis/stickerUsers/StickerUsersApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { StickerUser } from './types'\n\nexport class StickerUsersApi extends BaseApi implements HasGetMany<StickerUser> {\n /**\n * Returns a paginated list of sticker-user associations with their related file.\n * @permissions stickers.send\n */\n getMany(\n query: ListQuery<StickerUser> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser>>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<StickerUser> | StickerUser[]>(\n `/sticker-users${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAIA,IAAa,kBAAb,cAAqCA,6BAA2C;CAiB9E,QACE,OACA,SACiD;EACjD,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,iBAAiB,eACjB,QACD"}
1
+ {"version":3,"file":"StickerUsersApi.cjs","names":["BaseApi"],"sources":["../../../src/apis/stickerUsers/StickerUsersApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { StickerUser } from './types'\n\nexport class StickerUsersApi extends BaseApi implements HasGetMany<StickerUser> {\n /**\n * The stickers the current user sent recently (`lastSendAt`), paginated; only the `file` include is\n * served. A row is written when the user sends a message of type `sticker` (in the background, after the\n * send).\n * @permissions stickers.send\n */\n getMany(\n query: ListQuery<StickerUser> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser>>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<StickerUser> | StickerUser[]>(\n `/sticker-users${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAIA,IAAa,kBAAb,cAAqCA,6BAA2C;CAmB9E,QACE,OACA,SACiD;EACjD,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,iBAAiB,eACjB,QACD"}
@@ -3,7 +3,9 @@ import type { ListQuery, Paginated, HasGetMany } from '../../core/types';
3
3
  import type { StickerUser } from './types';
4
4
  export declare class StickerUsersApi extends BaseApi implements HasGetMany<StickerUser> {
5
5
  /**
6
- * Returns a paginated list of sticker-user associations with their related file.
6
+ * The stickers the current user sent recently (`lastSendAt`), paginated; only the `file` include is
7
+ * served. A row is written when the user sends a message of type `sticker` (in the background, after the
8
+ * send).
7
9
  * @permissions stickers.send
8
10
  */
9
11
  getMany(query: ListQuery<StickerUser> & {
@@ -1 +1 @@
1
- {"version":3,"file":"StickerUsersApi.d.ts","sourceRoot":"","sources":["../../../src/apis/stickerUsers/StickerUsersApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,qBAAa,eAAgB,SAAQ,OAAQ,YAAW,UAAU,CAAC,WAAW,CAAC;IAC7E;;;OAGG;IACH,OAAO,CACL,KAAK,EAAE,SAAS,CA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;KAAE,EACpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAClC,OAAO,CACL,KAAK,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,EAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,WAAW,EAAE,CAAC;CAWnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"StickerUsersApi.mjs","names":[],"sources":["../../../src/apis/stickerUsers/StickerUsersApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { StickerUser } from './types'\n\nexport class StickerUsersApi extends BaseApi implements HasGetMany<StickerUser> {\n /**\n * Returns a paginated list of sticker-user associations with their related file.\n * @permissions stickers.send\n */\n getMany(\n query: ListQuery<StickerUser> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser>>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<StickerUser> | StickerUser[]>(\n `/sticker-users${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;AAIA,IAAa,kBAAb,cAAqC,QAA2C;CAiB9E,QACE,OACA,SACiD;EACjD,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,iBAAiB,eACjB,QACD"}
1
+ {"version":3,"file":"StickerUsersApi.mjs","names":[],"sources":["../../../src/apis/stickerUsers/StickerUsersApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type { ListQuery, Paginated, HasGetMany } from '../../core/types'\nimport type { StickerUser } from './types'\n\nexport class StickerUsersApi extends BaseApi implements HasGetMany<StickerUser> {\n /**\n * The stickers the current user sent recently (`lastSendAt`), paginated; only the `file` include is\n * served. A row is written when the user sends a message of type `sticker` (in the background, after the\n * send).\n * @permissions stickers.send\n */\n getMany(\n query: ListQuery<StickerUser> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser>>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]>\n getMany(\n query?: ListQuery<StickerUser>,\n headers?: Record<string, string>,\n ): Promise<Paginated<StickerUser> | StickerUser[]> {\n const queryString = this.toQueryString(query)\n return this.client.get<Paginated<StickerUser> | StickerUser[]>(\n `/sticker-users${queryString}`,\n headers,\n )\n }\n}\n"],"mappings":";;;AAIA,IAAa,kBAAb,cAAqC,QAA2C;CAmB9E,QACE,OACA,SACiD;EACjD,MAAM,cAAc,KAAK,cAAc,MAAM;AAC7C,SAAO,KAAK,OAAO,IACjB,iBAAiB,eACjB,QACD"}
@@ -8,9 +8,13 @@ export type StickerUser = {
8
8
  lastSendAt: string;
9
9
  createdAt: string;
10
10
  updatedAt: string;
11
+ /** @deprecated Not served: the backend only serves the `file` include. */
11
12
  sticker?: Sticker;
13
+ /** @deprecated Not served: the backend only serves the `file` include. */
12
14
  user?: User;
15
+ /** The image of the sticker. */
13
16
  file?: File;
14
17
  };
18
+ /** The backend serves only `file` (`sticker` and `user` are dropped). */
15
19
  export type StickerUserRelationships = 'sticker' | 'user' | 'file';
16
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/stickerUsers/types.ts"],"names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