@nizam-os/customer-sdk 2.6.3 → 3.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.
Files changed (149) hide show
  1. package/dist/Client.d.ts +9 -0
  2. package/dist/Client.js +20 -8
  3. package/dist/api/resources/devices/client/Client.d.ts +71 -0
  4. package/dist/api/resources/devices/client/Client.js +238 -0
  5. package/dist/api/resources/devices/client/index.d.ts +1 -0
  6. package/dist/api/resources/devices/client/index.js +17 -0
  7. package/dist/api/resources/devices/client/requests/DeregisterDeviceRequest.d.ts +9 -0
  8. package/dist/api/resources/devices/client/requests/DeregisterDeviceRequest.js +3 -0
  9. package/dist/api/resources/devices/client/requests/RegisterDevice.d.ts +22 -0
  10. package/dist/api/resources/devices/client/requests/RegisterDevice.js +13 -0
  11. package/dist/api/resources/devices/client/requests/index.d.ts +2 -0
  12. package/dist/api/resources/devices/client/requests/index.js +5 -0
  13. package/dist/api/resources/devices/exports.d.ts +2 -0
  14. package/dist/api/resources/devices/exports.js +21 -0
  15. package/dist/api/resources/devices/index.d.ts +1 -0
  16. package/dist/api/resources/devices/index.js +17 -0
  17. package/dist/api/resources/index.d.ts +6 -0
  18. package/dist/api/resources/index.js +7 -1
  19. package/dist/api/resources/notificationPreferences/client/Client.d.ts +49 -0
  20. package/dist/api/resources/notificationPreferences/client/Client.js +175 -0
  21. package/dist/api/resources/notificationPreferences/client/index.d.ts +1 -0
  22. package/dist/api/resources/notificationPreferences/client/index.js +17 -0
  23. package/dist/api/resources/notificationPreferences/client/requests/UpdateNotificationPreferences.d.ts +11 -0
  24. package/dist/api/resources/notificationPreferences/client/requests/UpdateNotificationPreferences.js +3 -0
  25. package/dist/api/resources/notificationPreferences/client/requests/index.d.ts +1 -0
  26. package/dist/api/resources/notificationPreferences/client/requests/index.js +2 -0
  27. package/dist/api/resources/notificationPreferences/exports.d.ts +2 -0
  28. package/dist/api/resources/notificationPreferences/exports.js +21 -0
  29. package/dist/api/resources/notificationPreferences/index.d.ts +1 -0
  30. package/dist/api/resources/notificationPreferences/index.js +17 -0
  31. package/dist/api/resources/notifications/client/Client.d.ts +179 -0
  32. package/dist/api/resources/notifications/client/Client.js +623 -0
  33. package/dist/api/resources/notifications/client/index.d.ts +1 -0
  34. package/dist/api/resources/notifications/client/index.js +17 -0
  35. package/dist/api/resources/notifications/client/requests/ArchiveNotificationRequest.d.ts +9 -0
  36. package/dist/api/resources/notifications/client/requests/ArchiveNotificationRequest.js +3 -0
  37. package/dist/api/resources/notifications/client/requests/ListNotificationsRequest.d.ts +30 -0
  38. package/dist/api/resources/notifications/client/requests/ListNotificationsRequest.js +3 -0
  39. package/dist/api/resources/notifications/client/requests/MarkNotificationReadRequest.d.ts +9 -0
  40. package/dist/api/resources/notifications/client/requests/MarkNotificationReadRequest.js +3 -0
  41. package/dist/api/resources/notifications/client/requests/MarkNotificationUnreadRequest.d.ts +9 -0
  42. package/dist/api/resources/notifications/client/requests/MarkNotificationUnreadRequest.js +3 -0
  43. package/dist/api/resources/notifications/client/requests/UnarchiveNotificationRequest.d.ts +9 -0
  44. package/dist/api/resources/notifications/client/requests/UnarchiveNotificationRequest.js +3 -0
  45. package/dist/api/resources/notifications/client/requests/index.d.ts +5 -0
  46. package/dist/api/resources/notifications/client/requests/index.js +2 -0
  47. package/dist/api/resources/notifications/exports.d.ts +2 -0
  48. package/dist/api/resources/notifications/exports.js +21 -0
  49. package/dist/api/resources/notifications/index.d.ts +1 -0
  50. package/dist/api/resources/notifications/index.js +17 -0
  51. package/dist/api/types/ActiveOrganization.d.ts +2 -2
  52. package/dist/api/types/ActiveOrganization.js +1 -1
  53. package/dist/api/types/ActivityResource.d.ts +2 -2
  54. package/dist/api/types/ActivityResource.js +1 -1
  55. package/dist/api/types/Asset.d.ts +2 -2
  56. package/dist/api/types/Asset.js +1 -1
  57. package/dist/api/types/AssetListItem.d.ts +2 -2
  58. package/dist/api/types/AssetListItem.js +1 -1
  59. package/dist/api/types/Assignment.d.ts +2 -2
  60. package/dist/api/types/Assignment.js +1 -1
  61. package/dist/api/types/BusinessCategory.d.ts +2 -2
  62. package/dist/api/types/BusinessCategory.js +1 -1
  63. package/dist/api/types/Country.d.ts +2 -2
  64. package/dist/api/types/Country.js +1 -1
  65. package/dist/api/types/Currency.d.ts +2 -2
  66. package/dist/api/types/Currency.js +1 -1
  67. package/dist/api/types/Device.d.ts +24 -0
  68. package/dist/api/types/Device.js +11 -0
  69. package/dist/api/types/Devices.d.ts +17 -0
  70. package/dist/api/types/Devices.js +11 -0
  71. package/dist/api/types/Invite.d.ts +2 -2
  72. package/dist/api/types/Invite.js +1 -1
  73. package/dist/api/types/Language.d.ts +2 -2
  74. package/dist/api/types/Language.js +1 -1
  75. package/dist/api/types/ListResponseActivityResource.d.ts +3 -3
  76. package/dist/api/types/ListResponseActivityResource.js +1 -1
  77. package/dist/api/types/ListResponseAssetListItem.d.ts +3 -3
  78. package/dist/api/types/ListResponseAssetListItem.js +1 -1
  79. package/dist/api/types/ListResponseBusinessCategory.d.ts +3 -3
  80. package/dist/api/types/ListResponseBusinessCategory.js +1 -1
  81. package/dist/api/types/ListResponseCountry.d.ts +3 -3
  82. package/dist/api/types/ListResponseCountry.js +1 -1
  83. package/dist/api/types/ListResponseCurrency.d.ts +3 -3
  84. package/dist/api/types/ListResponseCurrency.js +1 -1
  85. package/dist/api/types/ListResponseFile.d.ts +3 -3
  86. package/dist/api/types/ListResponseFile.js +1 -1
  87. package/dist/api/types/ListResponseHeatmapCell.d.ts +3 -3
  88. package/dist/api/types/ListResponseHeatmapCell.js +1 -1
  89. package/dist/api/types/ListResponseJob.d.ts +3 -3
  90. package/dist/api/types/ListResponseJob.js +1 -1
  91. package/dist/api/types/ListResponseLanguage.d.ts +3 -3
  92. package/dist/api/types/ListResponseLanguage.js +1 -1
  93. package/dist/api/types/ListResponseMembership.d.ts +3 -3
  94. package/dist/api/types/ListResponseMembership.js +1 -1
  95. package/dist/api/types/ListResponseNotification.d.ts +27 -0
  96. package/dist/api/types/ListResponseNotification.js +11 -0
  97. package/dist/api/types/ListResponseNotificationDeadLetter.d.ts +27 -0
  98. package/dist/api/types/ListResponseNotificationDeadLetter.js +11 -0
  99. package/dist/api/types/ListResponseOperatorPosition.d.ts +3 -3
  100. package/dist/api/types/ListResponseOperatorPosition.js +1 -1
  101. package/dist/api/types/ListResponseOrganization.d.ts +3 -3
  102. package/dist/api/types/ListResponseOrganization.js +1 -1
  103. package/dist/api/types/ListResponsePosition.d.ts +3 -3
  104. package/dist/api/types/ListResponsePosition.js +1 -1
  105. package/dist/api/types/ListResponseTimezone.d.ts +3 -3
  106. package/dist/api/types/ListResponseTimezone.js +1 -1
  107. package/dist/api/types/ListResponseUserResource.d.ts +3 -3
  108. package/dist/api/types/ListResponseUserResource.js +1 -1
  109. package/dist/api/types/Membership.d.ts +2 -2
  110. package/dist/api/types/Membership.js +1 -1
  111. package/dist/api/types/Notification.d.ts +52 -0
  112. package/dist/api/types/Notification.js +27 -0
  113. package/dist/api/types/NotificationCategoryCount.d.ts +23 -0
  114. package/dist/api/types/NotificationCategoryCount.js +16 -0
  115. package/dist/api/types/NotificationCounts.d.ts +23 -0
  116. package/dist/api/types/NotificationCounts.js +11 -0
  117. package/dist/api/types/NotificationDeadLetter.d.ts +36 -0
  118. package/dist/api/types/NotificationDeadLetter.js +11 -0
  119. package/dist/api/types/NotificationPreference.d.ts +13 -0
  120. package/dist/api/types/NotificationPreference.js +3 -0
  121. package/dist/api/types/NotificationPreferenceItem.d.ts +13 -0
  122. package/dist/api/types/NotificationPreferenceItem.js +3 -0
  123. package/dist/api/types/NotificationPreferences.d.ts +17 -0
  124. package/dist/api/types/NotificationPreferences.js +11 -0
  125. package/dist/api/types/NotificationUnreadCount.d.ts +16 -0
  126. package/dist/api/types/NotificationUnreadCount.js +11 -0
  127. package/dist/api/types/NotificationsArchived.d.ts +16 -0
  128. package/dist/api/types/NotificationsArchived.js +11 -0
  129. package/dist/api/types/NotificationsMarkedRead.d.ts +16 -0
  130. package/dist/api/types/NotificationsMarkedRead.js +11 -0
  131. package/dist/api/types/Operator.d.ts +2 -2
  132. package/dist/api/types/Operator.js +1 -1
  133. package/dist/api/types/Organization.d.ts +2 -2
  134. package/dist/api/types/Organization.js +1 -1
  135. package/dist/api/types/QuietHours.d.ts +11 -0
  136. package/dist/api/types/QuietHours.js +3 -0
  137. package/dist/api/types/RealtimeTicket.d.ts +2 -2
  138. package/dist/api/types/RealtimeTicket.js +1 -1
  139. package/dist/api/types/ReconcileResponse.d.ts +2 -2
  140. package/dist/api/types/ReconcileResponse.js +1 -1
  141. package/dist/api/types/Timezone.d.ts +2 -2
  142. package/dist/api/types/Timezone.js +1 -1
  143. package/dist/api/types/User.d.ts +2 -2
  144. package/dist/api/types/User.js +1 -1
  145. package/dist/api/types/UserResource.d.ts +2 -2
  146. package/dist/api/types/UserResource.js +1 -1
  147. package/dist/api/types/index.d.ts +15 -0
  148. package/dist/api/types/index.js +15 -0
  149. package/package.json +1 -1
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.NotificationPreferencesClient = void 0;
38
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
39
+ const headers_js_1 = require("../../../../core/headers.js");
40
+ const core = __importStar(require("../../../../core/index.js"));
41
+ const environments = __importStar(require("../../../../environments.js"));
42
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
43
+ const errors = __importStar(require("../../../../errors/index.js"));
44
+ const NizamCustomer = __importStar(require("../../../index.js"));
45
+ /**
46
+ * The authenticated user's per-kind × channel delivery preferences.
47
+ */
48
+ class NotificationPreferencesClient {
49
+ constructor(options) {
50
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
51
+ }
52
+ /**
53
+ * The user's explicit per-kind × channel overrides. A (kind, channel) with no row uses the kind's coded default (so an empty list means 'all defaults').
54
+ *
55
+ * @param {NotificationPreferencesClient.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link NizamCustomer.UnauthorizedError}
58
+ * @throws {@link NizamCustomer.ForbiddenError}
59
+ * @throws {@link NizamCustomer.TooManyRequestsError}
60
+ * @throws {@link NizamCustomer.InternalServerError}
61
+ *
62
+ * @example
63
+ * await client.notificationPreferences.getNotificationPreferences()
64
+ */
65
+ getNotificationPreferences(requestOptions) {
66
+ return core.HttpResponsePromise.fromPromise(this.__getNotificationPreferences(requestOptions));
67
+ }
68
+ async __getNotificationPreferences(requestOptions) {
69
+ const _authRequest = await this._options.authProvider.getAuthRequest();
70
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
71
+ const _response = await core.fetcher({
72
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
73
+ (await core.Supplier.get(this._options.environment)) ??
74
+ environments.NizamCustomerEnvironment.Production, "v1/me/notification-preferences"),
75
+ method: "GET",
76
+ headers: _headers,
77
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
78
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
79
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
80
+ abortSignal: requestOptions?.abortSignal,
81
+ fetchFn: this._options?.fetch,
82
+ logging: this._options.logging,
83
+ });
84
+ if (_response.ok) {
85
+ return {
86
+ data: _response.body,
87
+ rawResponse: _response.rawResponse,
88
+ };
89
+ }
90
+ if (_response.error.reason === "status-code") {
91
+ switch (_response.error.statusCode) {
92
+ case 401:
93
+ throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
94
+ case 403:
95
+ throw new NizamCustomer.ForbiddenError(_response.error.body, _response.rawResponse);
96
+ case 429:
97
+ throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
98
+ case 500:
99
+ throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
100
+ default:
101
+ throw new errors.NizamCustomerError({
102
+ statusCode: _response.error.statusCode,
103
+ body: _response.error.body,
104
+ rawResponse: _response.rawResponse,
105
+ });
106
+ }
107
+ }
108
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/me/notification-preferences");
109
+ }
110
+ /**
111
+ * Upserts the supplied overrides — each item fully declares the desired state of one (kind, channel). Unlisted preferences are untouched. Returns the full resulting set.
112
+ *
113
+ * @param {NizamCustomer.UpdateNotificationPreferences} request
114
+ * @param {NotificationPreferencesClient.RequestOptions} requestOptions - Request-specific configuration.
115
+ *
116
+ * @throws {@link NizamCustomer.UnauthorizedError}
117
+ * @throws {@link NizamCustomer.ForbiddenError}
118
+ * @throws {@link NizamCustomer.TooManyRequestsError}
119
+ * @throws {@link NizamCustomer.InternalServerError}
120
+ *
121
+ * @example
122
+ * await client.notificationPreferences.updateNotificationPreferences({
123
+ * preferences: [{}]
124
+ * })
125
+ */
126
+ updateNotificationPreferences(request = {}, requestOptions) {
127
+ return core.HttpResponsePromise.fromPromise(this.__updateNotificationPreferences(request, requestOptions));
128
+ }
129
+ async __updateNotificationPreferences(request = {}, requestOptions) {
130
+ const _authRequest = await this._options.authProvider.getAuthRequest();
131
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
132
+ const _response = await core.fetcher({
133
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
134
+ (await core.Supplier.get(this._options.environment)) ??
135
+ environments.NizamCustomerEnvironment.Production, "v1/me/notification-preferences"),
136
+ method: "PATCH",
137
+ headers: _headers,
138
+ contentType: "application/json",
139
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
140
+ requestType: "json",
141
+ body: request,
142
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
143
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
144
+ abortSignal: requestOptions?.abortSignal,
145
+ fetchFn: this._options?.fetch,
146
+ logging: this._options.logging,
147
+ });
148
+ if (_response.ok) {
149
+ return {
150
+ data: _response.body,
151
+ rawResponse: _response.rawResponse,
152
+ };
153
+ }
154
+ if (_response.error.reason === "status-code") {
155
+ switch (_response.error.statusCode) {
156
+ case 401:
157
+ throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
158
+ case 403:
159
+ throw new NizamCustomer.ForbiddenError(_response.error.body, _response.rawResponse);
160
+ case 429:
161
+ throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
162
+ case 500:
163
+ throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
164
+ default:
165
+ throw new errors.NizamCustomerError({
166
+ statusCode: _response.error.statusCode,
167
+ body: _response.error.body,
168
+ rawResponse: _response.rawResponse,
169
+ });
170
+ }
171
+ }
172
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v1/me/notification-preferences");
173
+ }
174
+ }
175
+ exports.NotificationPreferencesClient = NotificationPreferencesClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,11 @@
1
+ import type * as NizamCustomer from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * preferences: [{}]
6
+ * }
7
+ */
8
+ export interface UpdateNotificationPreferences {
9
+ /** The overrides to apply; each fully declares one (kind, channel). */
10
+ preferences?: NizamCustomer.NotificationPreferenceItem[];
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { UpdateNotificationPreferences } from "./UpdateNotificationPreferences.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { NotificationPreferencesClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.NotificationPreferencesClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "NotificationPreferencesClient", { enumerable: true, get: function () { return Client_js_1.NotificationPreferencesClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,179 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as NizamCustomer from "../../../index.js";
5
+ export declare namespace NotificationsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ /**
11
+ * The authenticated user's notification inbox.
12
+ */
13
+ export declare class NotificationsClient {
14
+ protected readonly _options: NormalizedClientOptionsWithAuth<NotificationsClient.Options>;
15
+ constructor(options: NotificationsClient.Options);
16
+ /**
17
+ * The caller's own notifications ordered by `created_at` descending (pass `sort=created_at` for ascending). `status` selects the segment — `all` (default; the active inbox, non-archived), `unread`, `read`, or `archived`. `category` and `kind` accept comma-separated values and AND on top of the segment; `q` matches the notification title/body. `since=` (RFC 3339) returns only items at/after the instant for incremental catch-up after a reconnect. Pagination is bidirectional (`starting_after` / `ending_before`); cursors are bound to the sort direction that minted them.
18
+ *
19
+ * @param {NizamCustomer.ListNotificationsRequest} request
20
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
21
+ *
22
+ * @throws {@link NizamCustomer.BadRequestError}
23
+ * @throws {@link NizamCustomer.UnauthorizedError}
24
+ * @throws {@link NizamCustomer.ForbiddenError}
25
+ * @throws {@link NizamCustomer.TooManyRequestsError}
26
+ * @throws {@link NizamCustomer.InternalServerError}
27
+ *
28
+ * @example
29
+ * await client.notifications.listNotifications({
30
+ * status: "<string>",
31
+ * q: "<string>",
32
+ * since: "2026-05-20T14:00:00Z",
33
+ * starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
34
+ * ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
35
+ * })
36
+ */
37
+ listNotifications(request?: NizamCustomer.ListNotificationsRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.ListResponseNotification>;
38
+ private __listNotifications;
39
+ /**
40
+ * Archives every active notification of the caller in one operation. Returns the number archived (zero when the active inbox was already empty).
41
+ *
42
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
43
+ *
44
+ * @throws {@link NizamCustomer.BadRequestError}
45
+ * @throws {@link NizamCustomer.UnauthorizedError}
46
+ * @throws {@link NizamCustomer.ForbiddenError}
47
+ * @throws {@link NizamCustomer.TooManyRequestsError}
48
+ * @throws {@link NizamCustomer.InternalServerError}
49
+ *
50
+ * @example
51
+ * await client.notifications.archiveAllNotifications()
52
+ */
53
+ archiveAllNotifications(requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.NotificationsArchived>;
54
+ private __archiveAllNotifications;
55
+ /**
56
+ * The segment-badge roll-up for the active organization: total + unread (active, non-archived), archived, and per-category active total/unread. Computed server-side in one pass so segment badges stay accurate across cursor pages (never inferred from the loaded page). Excludes dismissed (soft-deleted) notifications.
57
+ *
58
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link NizamCustomer.BadRequestError}
61
+ * @throws {@link NizamCustomer.UnauthorizedError}
62
+ * @throws {@link NizamCustomer.ForbiddenError}
63
+ * @throws {@link NizamCustomer.TooManyRequestsError}
64
+ * @throws {@link NizamCustomer.InternalServerError}
65
+ *
66
+ * @example
67
+ * await client.notifications.getNotificationCounts()
68
+ */
69
+ getNotificationCounts(requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.NotificationCounts>;
70
+ private __getNotificationCounts;
71
+ /**
72
+ * Flips every unread notification of the caller to read in one operation. Returns the number of notifications that were flipped (zero when the inbox was already clear).
73
+ *
74
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
75
+ *
76
+ * @throws {@link NizamCustomer.BadRequestError}
77
+ * @throws {@link NizamCustomer.UnauthorizedError}
78
+ * @throws {@link NizamCustomer.ForbiddenError}
79
+ * @throws {@link NizamCustomer.TooManyRequestsError}
80
+ * @throws {@link NizamCustomer.InternalServerError}
81
+ *
82
+ * @example
83
+ * await client.notifications.markAllNotificationsRead()
84
+ */
85
+ markAllNotificationsRead(requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.NotificationsMarkedRead>;
86
+ private __markAllNotificationsRead;
87
+ /**
88
+ * The unread badge count for the active organization. Counts active (non-archived) unread notifications; excludes dismissed (soft-deleted) and archived ones.
89
+ *
90
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
91
+ *
92
+ * @throws {@link NizamCustomer.BadRequestError}
93
+ * @throws {@link NizamCustomer.UnauthorizedError}
94
+ * @throws {@link NizamCustomer.ForbiddenError}
95
+ * @throws {@link NizamCustomer.TooManyRequestsError}
96
+ * @throws {@link NizamCustomer.InternalServerError}
97
+ *
98
+ * @example
99
+ * await client.notifications.getUnreadNotificationCount()
100
+ */
101
+ getUnreadNotificationCount(requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.NotificationUnreadCount>;
102
+ private __getUnreadNotificationCount;
103
+ /**
104
+ * Moves a single notification to the archive ("Done") — reversible, not a delete: it leaves the active inbox but stays listable under `status=archived`. Idempotent. 404 if the notification is not the caller's.
105
+ *
106
+ * @param {NizamCustomer.ArchiveNotificationRequest} request
107
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
108
+ *
109
+ * @throws {@link NizamCustomer.UnauthorizedError}
110
+ * @throws {@link NizamCustomer.ForbiddenError}
111
+ * @throws {@link NizamCustomer.NotFoundError}
112
+ * @throws {@link NizamCustomer.TooManyRequestsError}
113
+ * @throws {@link NizamCustomer.InternalServerError}
114
+ *
115
+ * @example
116
+ * await client.notifications.archiveNotification({
117
+ * id: "00000000-0000-0000-0000-000000000000"
118
+ * })
119
+ */
120
+ archiveNotification(request: NizamCustomer.ArchiveNotificationRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.Notification>;
121
+ private __archiveNotification;
122
+ /**
123
+ * Flips a single notification to read. Idempotent — a second call is a no-op that preserves the original read timestamp. 404 if the notification is not the caller's.
124
+ *
125
+ * @param {NizamCustomer.MarkNotificationReadRequest} request
126
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
127
+ *
128
+ * @throws {@link NizamCustomer.UnauthorizedError}
129
+ * @throws {@link NizamCustomer.ForbiddenError}
130
+ * @throws {@link NizamCustomer.NotFoundError}
131
+ * @throws {@link NizamCustomer.TooManyRequestsError}
132
+ * @throws {@link NizamCustomer.InternalServerError}
133
+ *
134
+ * @example
135
+ * await client.notifications.markNotificationRead({
136
+ * id: "00000000-0000-0000-0000-000000000000"
137
+ * })
138
+ */
139
+ markNotificationRead(request: NizamCustomer.MarkNotificationReadRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.Notification>;
140
+ private __markNotificationRead;
141
+ /**
142
+ * Restores an archived notification to the active inbox — the inverse of archive. Idempotent. 404 if the notification is not the caller's.
143
+ *
144
+ * @param {NizamCustomer.UnarchiveNotificationRequest} request
145
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
146
+ *
147
+ * @throws {@link NizamCustomer.UnauthorizedError}
148
+ * @throws {@link NizamCustomer.ForbiddenError}
149
+ * @throws {@link NizamCustomer.NotFoundError}
150
+ * @throws {@link NizamCustomer.TooManyRequestsError}
151
+ * @throws {@link NizamCustomer.InternalServerError}
152
+ *
153
+ * @example
154
+ * await client.notifications.unarchiveNotification({
155
+ * id: "00000000-0000-0000-0000-000000000000"
156
+ * })
157
+ */
158
+ unarchiveNotification(request: NizamCustomer.UnarchiveNotificationRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.Notification>;
159
+ private __unarchiveNotification;
160
+ /**
161
+ * Flips a single notification back to unread — the inverse of mark-read. Idempotent. 404 if the notification is not the caller's.
162
+ *
163
+ * @param {NizamCustomer.MarkNotificationUnreadRequest} request
164
+ * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
165
+ *
166
+ * @throws {@link NizamCustomer.UnauthorizedError}
167
+ * @throws {@link NizamCustomer.ForbiddenError}
168
+ * @throws {@link NizamCustomer.NotFoundError}
169
+ * @throws {@link NizamCustomer.TooManyRequestsError}
170
+ * @throws {@link NizamCustomer.InternalServerError}
171
+ *
172
+ * @example
173
+ * await client.notifications.markNotificationUnread({
174
+ * id: "00000000-0000-0000-0000-000000000000"
175
+ * })
176
+ */
177
+ markNotificationUnread(request: NizamCustomer.MarkNotificationUnreadRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.Notification>;
178
+ private __markNotificationUnread;
179
+ }