@nizam-os/customer-sdk 2.6.2 → 2.7.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.
- package/dist/Client.d.ts +9 -0
- package/dist/Client.js +20 -8
- package/dist/api/resources/devices/client/Client.d.ts +71 -0
- package/dist/api/resources/devices/client/Client.js +238 -0
- package/dist/api/resources/devices/client/index.d.ts +1 -0
- package/dist/api/resources/devices/client/index.js +17 -0
- package/dist/api/resources/devices/client/requests/DeregisterDeviceRequest.d.ts +9 -0
- package/dist/api/resources/devices/client/requests/DeregisterDeviceRequest.js +3 -0
- package/dist/api/resources/devices/client/requests/RegisterDevice.d.ts +22 -0
- package/dist/api/resources/devices/client/requests/RegisterDevice.js +13 -0
- package/dist/api/resources/devices/client/requests/index.d.ts +2 -0
- package/dist/api/resources/devices/client/requests/index.js +5 -0
- package/dist/api/resources/devices/exports.d.ts +2 -0
- package/dist/api/resources/devices/exports.js +21 -0
- package/dist/api/resources/devices/index.d.ts +1 -0
- package/dist/api/resources/devices/index.js +17 -0
- package/dist/api/resources/index.d.ts +6 -0
- package/dist/api/resources/index.js +7 -1
- package/dist/api/resources/notificationPreferences/client/Client.d.ts +49 -0
- package/dist/api/resources/notificationPreferences/client/Client.js +175 -0
- package/dist/api/resources/notificationPreferences/client/index.d.ts +1 -0
- package/dist/api/resources/notificationPreferences/client/index.js +17 -0
- package/dist/api/resources/notificationPreferences/client/requests/UpdateNotificationPreferences.d.ts +11 -0
- package/dist/api/resources/notificationPreferences/client/requests/UpdateNotificationPreferences.js +3 -0
- package/dist/api/resources/notificationPreferences/client/requests/index.d.ts +1 -0
- package/dist/api/resources/notificationPreferences/client/requests/index.js +2 -0
- package/dist/api/resources/notificationPreferences/exports.d.ts +2 -0
- package/dist/api/resources/notificationPreferences/exports.js +21 -0
- package/dist/api/resources/notificationPreferences/index.d.ts +1 -0
- package/dist/api/resources/notificationPreferences/index.js +17 -0
- package/dist/api/resources/notifications/client/Client.d.ts +88 -0
- package/dist/api/resources/notifications/client/Client.js +316 -0
- package/dist/api/resources/notifications/client/index.d.ts +1 -0
- package/dist/api/resources/notifications/client/index.js +17 -0
- package/dist/api/resources/notifications/client/requests/ListNotificationsRequest.d.ts +22 -0
- package/dist/api/resources/notifications/client/requests/ListNotificationsRequest.js +3 -0
- package/dist/api/resources/notifications/client/requests/MarkNotificationReadRequest.d.ts +9 -0
- package/dist/api/resources/notifications/client/requests/MarkNotificationReadRequest.js +3 -0
- package/dist/api/resources/notifications/client/requests/index.d.ts +2 -0
- package/dist/api/resources/notifications/client/requests/index.js +2 -0
- package/dist/api/resources/notifications/exports.d.ts +2 -0
- package/dist/api/resources/notifications/exports.js +21 -0
- package/dist/api/resources/notifications/index.d.ts +1 -0
- package/dist/api/resources/notifications/index.js +17 -0
- package/dist/api/types/ActiveOrganization.d.ts +2 -2
- package/dist/api/types/ActiveOrganization.js +1 -1
- package/dist/api/types/ActivityResource.d.ts +2 -2
- package/dist/api/types/ActivityResource.js +1 -1
- package/dist/api/types/Asset.d.ts +2 -2
- package/dist/api/types/Asset.js +1 -1
- package/dist/api/types/AssetListItem.d.ts +2 -2
- package/dist/api/types/AssetListItem.js +1 -1
- package/dist/api/types/Assignment.d.ts +2 -2
- package/dist/api/types/Assignment.js +1 -1
- package/dist/api/types/BusinessCategory.d.ts +2 -2
- package/dist/api/types/BusinessCategory.js +1 -1
- package/dist/api/types/Country.d.ts +2 -2
- package/dist/api/types/Country.js +1 -1
- package/dist/api/types/Currency.d.ts +2 -2
- package/dist/api/types/Currency.js +1 -1
- package/dist/api/types/Device.d.ts +24 -0
- package/dist/api/types/Device.js +11 -0
- package/dist/api/types/Devices.d.ts +17 -0
- package/dist/api/types/Devices.js +11 -0
- package/dist/api/types/Invite.d.ts +2 -2
- package/dist/api/types/Invite.js +1 -1
- package/dist/api/types/Language.d.ts +2 -2
- package/dist/api/types/Language.js +1 -1
- package/dist/api/types/ListResponseActivityResource.d.ts +3 -3
- package/dist/api/types/ListResponseActivityResource.js +1 -1
- package/dist/api/types/ListResponseAssetListItem.d.ts +3 -3
- package/dist/api/types/ListResponseAssetListItem.js +1 -1
- package/dist/api/types/ListResponseBusinessCategory.d.ts +3 -3
- package/dist/api/types/ListResponseBusinessCategory.js +1 -1
- package/dist/api/types/ListResponseCountry.d.ts +3 -3
- package/dist/api/types/ListResponseCountry.js +1 -1
- package/dist/api/types/ListResponseCurrency.d.ts +3 -3
- package/dist/api/types/ListResponseCurrency.js +1 -1
- package/dist/api/types/ListResponseFile.d.ts +3 -3
- package/dist/api/types/ListResponseFile.js +1 -1
- package/dist/api/types/ListResponseHeatmapCell.d.ts +3 -3
- package/dist/api/types/ListResponseHeatmapCell.js +1 -1
- package/dist/api/types/ListResponseJob.d.ts +3 -3
- package/dist/api/types/ListResponseJob.js +1 -1
- package/dist/api/types/ListResponseLanguage.d.ts +3 -3
- package/dist/api/types/ListResponseLanguage.js +1 -1
- package/dist/api/types/ListResponseMembership.d.ts +3 -3
- package/dist/api/types/ListResponseMembership.js +1 -1
- package/dist/api/types/ListResponseNotification.d.ts +27 -0
- package/dist/api/types/ListResponseNotification.js +11 -0
- package/dist/api/types/ListResponseNotificationDeadLetter.d.ts +27 -0
- package/dist/api/types/ListResponseNotificationDeadLetter.js +11 -0
- package/dist/api/types/ListResponseOperatorPosition.d.ts +3 -3
- package/dist/api/types/ListResponseOperatorPosition.js +1 -1
- package/dist/api/types/ListResponseOrganization.d.ts +3 -3
- package/dist/api/types/ListResponseOrganization.js +1 -1
- package/dist/api/types/ListResponsePosition.d.ts +3 -3
- package/dist/api/types/ListResponsePosition.js +1 -1
- package/dist/api/types/ListResponseTimezone.d.ts +3 -3
- package/dist/api/types/ListResponseTimezone.js +1 -1
- package/dist/api/types/ListResponseUserResource.d.ts +3 -3
- package/dist/api/types/ListResponseUserResource.js +1 -1
- package/dist/api/types/Membership.d.ts +2 -2
- package/dist/api/types/Membership.js +1 -1
- package/dist/api/types/Notification.d.ts +48 -0
- package/dist/api/types/Notification.js +27 -0
- package/dist/api/types/NotificationDeadLetter.d.ts +36 -0
- package/dist/api/types/NotificationDeadLetter.js +11 -0
- package/dist/api/types/NotificationPreference.d.ts +13 -0
- package/dist/api/types/NotificationPreference.js +3 -0
- package/dist/api/types/NotificationPreferenceItem.d.ts +13 -0
- package/dist/api/types/NotificationPreferenceItem.js +3 -0
- package/dist/api/types/NotificationPreferences.d.ts +17 -0
- package/dist/api/types/NotificationPreferences.js +11 -0
- package/dist/api/types/NotificationUnreadCount.d.ts +16 -0
- package/dist/api/types/NotificationUnreadCount.js +11 -0
- package/dist/api/types/NotificationsMarkedRead.d.ts +16 -0
- package/dist/api/types/NotificationsMarkedRead.js +11 -0
- package/dist/api/types/Operator.d.ts +2 -2
- package/dist/api/types/Operator.js +1 -1
- package/dist/api/types/Organization.d.ts +2 -2
- package/dist/api/types/Organization.js +1 -1
- package/dist/api/types/QuietHours.d.ts +11 -0
- package/dist/api/types/QuietHours.js +3 -0
- package/dist/api/types/RealtimeTicket.d.ts +2 -2
- package/dist/api/types/RealtimeTicket.js +1 -1
- package/dist/api/types/ReconcileResponse.d.ts +2 -2
- package/dist/api/types/ReconcileResponse.js +1 -1
- package/dist/api/types/Timezone.d.ts +2 -2
- package/dist/api/types/Timezone.js +1 -1
- package/dist/api/types/User.d.ts +2 -2
- package/dist/api/types/User.js +1 -1
- package/dist/api/types/UserResource.d.ts +2 -2
- package/dist/api/types/UserResource.js +1 -1
- package/dist/api/types/index.d.ts +12 -0
- package/dist/api/types/index.js +12 -0
- 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 @@
|
|
|
1
|
+
export type { UpdateNotificationPreferences } from "./UpdateNotificationPreferences.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,88 @@
|
|
|
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). `unread=true` restricts to unread; `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
|
+
* since: "2026-05-20T14:00:00Z",
|
|
31
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
32
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
33
|
+
* })
|
|
34
|
+
*/
|
|
35
|
+
listNotifications(request?: NizamCustomer.ListNotificationsRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.ListResponseNotification>;
|
|
36
|
+
private __listNotifications;
|
|
37
|
+
/**
|
|
38
|
+
* 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).
|
|
39
|
+
*
|
|
40
|
+
* @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link NizamCustomer.BadRequestError}
|
|
43
|
+
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
44
|
+
* @throws {@link NizamCustomer.ForbiddenError}
|
|
45
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
46
|
+
* @throws {@link NizamCustomer.InternalServerError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.notifications.markAllNotificationsRead()
|
|
50
|
+
*/
|
|
51
|
+
markAllNotificationsRead(requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.NotificationsMarkedRead>;
|
|
52
|
+
private __markAllNotificationsRead;
|
|
53
|
+
/**
|
|
54
|
+
* The unread badge count for the active organization. Excludes dismissed (soft-deleted) notifications.
|
|
55
|
+
*
|
|
56
|
+
* @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link NizamCustomer.BadRequestError}
|
|
59
|
+
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
60
|
+
* @throws {@link NizamCustomer.ForbiddenError}
|
|
61
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
62
|
+
* @throws {@link NizamCustomer.InternalServerError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.notifications.getUnreadNotificationCount()
|
|
66
|
+
*/
|
|
67
|
+
getUnreadNotificationCount(requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.NotificationUnreadCount>;
|
|
68
|
+
private __getUnreadNotificationCount;
|
|
69
|
+
/**
|
|
70
|
+
* 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.
|
|
71
|
+
*
|
|
72
|
+
* @param {NizamCustomer.MarkNotificationReadRequest} request
|
|
73
|
+
* @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
76
|
+
* @throws {@link NizamCustomer.ForbiddenError}
|
|
77
|
+
* @throws {@link NizamCustomer.NotFoundError}
|
|
78
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
79
|
+
* @throws {@link NizamCustomer.InternalServerError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.notifications.markNotificationRead({
|
|
83
|
+
* id: "00000000-0000-0000-0000-000000000000"
|
|
84
|
+
* })
|
|
85
|
+
*/
|
|
86
|
+
markNotificationRead(request: NizamCustomer.MarkNotificationReadRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise<NizamCustomer.Notification>;
|
|
87
|
+
private __markNotificationRead;
|
|
88
|
+
}
|