@nizam-os/dashboard-sdk 8.1.0 → 10.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.
- package/dist/api/resources/assets/client/Client.d.ts +5 -0
- package/dist/api/resources/assets/client/Client.js +10 -2
- package/dist/api/resources/assets/client/requests/CreateAssetRequest.d.ts +6 -0
- package/dist/api/resources/assignments/client/Client.d.ts +2 -0
- package/dist/api/resources/assignments/client/Client.js +5 -2
- package/dist/api/resources/assignments/client/requests/OpenAssignmentRequest.d.ts +4 -0
- package/dist/api/resources/files/client/Client.d.ts +2 -0
- package/dist/api/resources/files/client/Client.js +7 -2
- package/dist/api/resources/files/client/requests/InitiateFileUploadRequest.d.ts +3 -0
- package/dist/api/resources/imports/client/Client.d.ts +2 -0
- package/dist/api/resources/imports/client/Client.js +7 -2
- package/dist/api/resources/imports/client/requests/CreateImportRequest.d.ts +3 -0
- package/dist/api/resources/invites/client/Client.d.ts +5 -0
- package/dist/api/resources/invites/client/Client.js +12 -2
- package/dist/api/resources/invites/client/requests/CreateInviteRequest.d.ts +5 -0
- package/dist/api/resources/notifications/client/Client.d.ts +93 -2
- package/dist/api/resources/notifications/client/Client.js +311 -4
- package/dist/api/resources/notifications/client/requests/ArchiveNotificationRequest.d.ts +9 -0
- package/dist/api/resources/notifications/client/requests/ArchiveNotificationRequest.js +3 -0
- package/dist/api/resources/notifications/client/requests/ListNotificationsRequest.d.ts +10 -2
- package/dist/api/resources/notifications/client/requests/MarkNotificationUnreadRequest.d.ts +9 -0
- package/dist/api/resources/notifications/client/requests/MarkNotificationUnreadRequest.js +3 -0
- package/dist/api/resources/notifications/client/requests/UnarchiveNotificationRequest.d.ts +9 -0
- package/dist/api/resources/notifications/client/requests/UnarchiveNotificationRequest.js +3 -0
- package/dist/api/resources/notifications/client/requests/index.d.ts +3 -0
- package/dist/api/resources/operators/client/Client.d.ts +21 -11
- package/dist/api/resources/operators/client/Client.js +25 -12
- package/dist/api/resources/operators/client/requests/CreateOperatorBody.d.ts +37 -0
- package/dist/api/resources/operators/client/requests/CreateOperatorBody.js +3 -0
- package/dist/api/resources/operators/client/requests/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/Client.d.ts +2 -2
- package/dist/api/resources/organizations/client/Client.js +5 -4
- package/dist/api/resources/organizations/client/requests/CreateOrganizationRequest.d.ts +4 -0
- package/dist/api/resources/taskAttempts/client/Client.d.ts +2 -0
- package/dist/api/resources/taskAttempts/client/Client.js +6 -2
- package/dist/api/resources/taskAttempts/client/requests/CaptureTaskAttemptPhotoRequest.d.ts +3 -0
- package/dist/api/resources/users/client/Client.d.ts +3 -0
- package/dist/api/resources/users/client/Client.js +8 -2
- package/dist/api/resources/users/client/requests/InviteUserRequest.d.ts +4 -0
- package/dist/api/types/Device.d.ts +17 -2
- package/dist/api/types/Device.js +13 -0
- package/dist/api/types/Notification.d.ts +4 -0
- package/dist/api/types/NotificationCategoryCount.d.ts +23 -0
- package/dist/api/types/NotificationCategoryCount.js +16 -0
- package/dist/api/types/NotificationCounts.d.ts +23 -0
- package/dist/api/types/NotificationCounts.js +11 -0
- package/dist/api/types/NotificationsArchived.d.ts +16 -0
- package/dist/api/types/NotificationsArchived.js +11 -0
- package/dist/api/types/NotificationsMarkedRead.d.ts +1 -1
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/package.json +1 -1
|
@@ -35,8 +35,6 @@ export declare class OrganizationsClient {
|
|
|
35
35
|
/**
|
|
36
36
|
* Creates a brand-new tenant with the calling user as the founding admin. The id is assigned by Keycloak so the same value identifies the organization in both systems. Slug is derived from the name when not supplied.
|
|
37
37
|
*
|
|
38
|
-
* Supports the standard `Idempotency-Key` header — submit a UUID (v4 recommended) per logical attempt (same value on retry); malformed keys are rejected with 400 `idempotency.invalid_key`. Successful responses and 4xx domain rejections replay for matching request bodies; transient 5xx responses are never cached, so retrying with the same key re-executes. Mismatching fingerprints surface as 409 `idempotency.key_conflict`.
|
|
39
|
-
*
|
|
40
38
|
* @param {NizamDashboard.CreateOrganizationRequest} request
|
|
41
39
|
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
40
|
*
|
|
@@ -50,11 +48,13 @@ export declare class OrganizationsClient {
|
|
|
50
48
|
*
|
|
51
49
|
* @example
|
|
52
50
|
* await client.organizations.createOrganization({
|
|
51
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
53
52
|
* name: "Acme Logistics"
|
|
54
53
|
* })
|
|
55
54
|
*
|
|
56
55
|
* @example
|
|
57
56
|
* await client.organizations.createOrganization({
|
|
57
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
58
58
|
* name: "Acme Logistics",
|
|
59
59
|
* slug: "acme-logistics",
|
|
60
60
|
* primary_domain: "acme.com",
|
|
@@ -125,8 +125,6 @@ class OrganizationsClient {
|
|
|
125
125
|
/**
|
|
126
126
|
* Creates a brand-new tenant with the calling user as the founding admin. The id is assigned by Keycloak so the same value identifies the organization in both systems. Slug is derived from the name when not supplied.
|
|
127
127
|
*
|
|
128
|
-
* Supports the standard `Idempotency-Key` header — submit a UUID (v4 recommended) per logical attempt (same value on retry); malformed keys are rejected with 400 `idempotency.invalid_key`. Successful responses and 4xx domain rejections replay for matching request bodies; transient 5xx responses are never cached, so retrying with the same key re-executes. Mismatching fingerprints surface as 409 `idempotency.key_conflict`.
|
|
129
|
-
*
|
|
130
128
|
* @param {NizamDashboard.CreateOrganizationRequest} request
|
|
131
129
|
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
132
130
|
*
|
|
@@ -140,11 +138,13 @@ class OrganizationsClient {
|
|
|
140
138
|
*
|
|
141
139
|
* @example
|
|
142
140
|
* await client.organizations.createOrganization({
|
|
141
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
143
142
|
* name: "Acme Logistics"
|
|
144
143
|
* })
|
|
145
144
|
*
|
|
146
145
|
* @example
|
|
147
146
|
* await client.organizations.createOrganization({
|
|
147
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
148
148
|
* name: "Acme Logistics",
|
|
149
149
|
* slug: "acme-logistics",
|
|
150
150
|
* primary_domain: "acme.com",
|
|
@@ -158,8 +158,9 @@ class OrganizationsClient {
|
|
|
158
158
|
return core.HttpResponsePromise.fromPromise(this.__createOrganization(request, requestOptions));
|
|
159
159
|
}
|
|
160
160
|
async __createOrganization(request, requestOptions) {
|
|
161
|
+
const { "Idempotency-Key": idempotencyKey, ..._body } = request;
|
|
161
162
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
162
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
163
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions?.headers);
|
|
163
164
|
const _response = await core.fetcher({
|
|
164
165
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
165
166
|
(await core.Supplier.get(this._options.environment)) ??
|
|
@@ -169,7 +170,7 @@ class OrganizationsClient {
|
|
|
169
170
|
contentType: "application/json",
|
|
170
171
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
171
172
|
requestType: "json",
|
|
172
|
-
body:
|
|
173
|
+
body: _body,
|
|
173
174
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
174
175
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
175
176
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
4
5
|
* name: "Acme Logistics"
|
|
5
6
|
* }
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
* {
|
|
10
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
9
11
|
* name: "Acme Logistics",
|
|
10
12
|
* slug: "acme-logistics",
|
|
11
13
|
* primary_domain: "acme.com",
|
|
@@ -16,6 +18,8 @@
|
|
|
16
18
|
* }
|
|
17
19
|
*/
|
|
18
20
|
export interface CreateOrganizationRequest {
|
|
21
|
+
/** Optional. Supply a UUID (canonical 8-4-4-4-12 form; lowercase v4 recommended) to make this operation idempotent: the same key on a retry replays the original outcome instead of creating a second resource. 2xx successes and deliberate 4xx domain rejections are cached and replayed for 24h when the request body matches; transient 5xx responses are never cached, so a retry with the same key re-executes. A malformed key is rejected with 400 `idempotency.invalid_key`; reusing a key with a different request body is 409 `idempotency.key_conflict`; a key still in flight is 409 `idempotency.in_progress`. Omit the header and the operation behaves like any other write. */
|
|
22
|
+
"Idempotency-Key"?: string;
|
|
19
23
|
/** Display name of the organization. */
|
|
20
24
|
name: string;
|
|
21
25
|
/** Optional URL-safe slug. When omitted, the server derives one from the name. */
|
|
@@ -42,6 +42,7 @@ export declare class TaskAttemptsClient {
|
|
|
42
42
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
43
43
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
44
44
|
* @throws {@link NizamDashboard.NotFoundError}
|
|
45
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
45
46
|
* @throws {@link NizamDashboard.ContentTooLargeError}
|
|
46
47
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
47
48
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
@@ -49,6 +50,7 @@ export declare class TaskAttemptsClient {
|
|
|
49
50
|
*
|
|
50
51
|
* @example
|
|
51
52
|
* await client.taskAttempts.captureTaskAttemptPhoto({
|
|
53
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
52
54
|
* attemptId: "00000000-0000-0000-0000-000000000000",
|
|
53
55
|
* filename: "delivery-door.jpg",
|
|
54
56
|
* content_type: "image/jpeg",
|
|
@@ -132,6 +132,7 @@ class TaskAttemptsClient {
|
|
|
132
132
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
133
133
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
134
134
|
* @throws {@link NizamDashboard.NotFoundError}
|
|
135
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
135
136
|
* @throws {@link NizamDashboard.ContentTooLargeError}
|
|
136
137
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
137
138
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
@@ -139,6 +140,7 @@ class TaskAttemptsClient {
|
|
|
139
140
|
*
|
|
140
141
|
* @example
|
|
141
142
|
* await client.taskAttempts.captureTaskAttemptPhoto({
|
|
143
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
142
144
|
* attemptId: "00000000-0000-0000-0000-000000000000",
|
|
143
145
|
* filename: "delivery-door.jpg",
|
|
144
146
|
* content_type: "image/jpeg",
|
|
@@ -154,9 +156,9 @@ class TaskAttemptsClient {
|
|
|
154
156
|
return core.HttpResponsePromise.fromPromise(this.__captureTaskAttemptPhoto(request, requestOptions));
|
|
155
157
|
}
|
|
156
158
|
async __captureTaskAttemptPhoto(request, requestOptions) {
|
|
157
|
-
const { attemptId, ..._body } = request;
|
|
159
|
+
const { attemptId, "Idempotency-Key": idempotencyKey, ..._body } = request;
|
|
158
160
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
159
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
161
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions?.headers);
|
|
160
162
|
const _response = await core.fetcher({
|
|
161
163
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
162
164
|
(await core.Supplier.get(this._options.environment)) ??
|
|
@@ -186,6 +188,8 @@ class TaskAttemptsClient {
|
|
|
186
188
|
throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
187
189
|
case 404:
|
|
188
190
|
throw new NizamDashboard.NotFoundError(_response.error.body, _response.rawResponse);
|
|
191
|
+
case 409:
|
|
192
|
+
throw new NizamDashboard.ConflictError(_response.error.body, _response.rawResponse);
|
|
189
193
|
case 413:
|
|
190
194
|
throw new NizamDashboard.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
191
195
|
case 422:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
4
5
|
* attemptId: "00000000-0000-0000-0000-000000000000",
|
|
5
6
|
* filename: "delivery-door.jpg",
|
|
6
7
|
* content_type: "image/jpeg",
|
|
@@ -14,6 +15,8 @@
|
|
|
14
15
|
*/
|
|
15
16
|
export interface CaptureTaskAttemptPhotoRequest {
|
|
16
17
|
attemptId: string;
|
|
18
|
+
/** Optional. Supply a UUID (canonical 8-4-4-4-12 form; lowercase v4 recommended) to make this operation idempotent: the same key on a retry replays the original outcome instead of creating a second resource. 2xx successes and deliberate 4xx domain rejections are cached and replayed for 24h when the request body matches; transient 5xx responses are never cached, so a retry with the same key re-executes. A malformed key is rejected with 400 `idempotency.invalid_key`; reusing a key with a different request body is 409 `idempotency.key_conflict`; a key still in flight is 409 `idempotency.in_progress`. Omit the header and the operation behaves like any other write. */
|
|
19
|
+
"Idempotency-Key"?: string;
|
|
17
20
|
/** Original filename. */
|
|
18
21
|
filename: string;
|
|
19
22
|
/** Declared MIME type — POD photos accept image/jpeg, image/png, image/webp, image/heic, image/heif. */
|
|
@@ -88,6 +88,7 @@ export declare class UsersClient {
|
|
|
88
88
|
* @param {NizamDashboard.InviteUserRequest} request
|
|
89
89
|
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
90
|
*
|
|
91
|
+
* @throws {@link NizamDashboard.BadRequestError}
|
|
91
92
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
92
93
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
93
94
|
* @throws {@link NizamDashboard.ConflictError}
|
|
@@ -97,12 +98,14 @@ export declare class UsersClient {
|
|
|
97
98
|
*
|
|
98
99
|
* @example
|
|
99
100
|
* await client.users.inviteUser({
|
|
101
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
100
102
|
* email: "newhire@acme.example",
|
|
101
103
|
* name: "New Hire"
|
|
102
104
|
* })
|
|
103
105
|
*
|
|
104
106
|
* @example
|
|
105
107
|
* await client.users.inviteUser({
|
|
108
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
106
109
|
* email: "newhire@acme.example"
|
|
107
110
|
* })
|
|
108
111
|
*/
|
|
@@ -271,6 +271,7 @@ class UsersClient {
|
|
|
271
271
|
* @param {NizamDashboard.InviteUserRequest} request
|
|
272
272
|
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
273
273
|
*
|
|
274
|
+
* @throws {@link NizamDashboard.BadRequestError}
|
|
274
275
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
275
276
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
276
277
|
* @throws {@link NizamDashboard.ConflictError}
|
|
@@ -280,12 +281,14 @@ class UsersClient {
|
|
|
280
281
|
*
|
|
281
282
|
* @example
|
|
282
283
|
* await client.users.inviteUser({
|
|
284
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
283
285
|
* email: "newhire@acme.example",
|
|
284
286
|
* name: "New Hire"
|
|
285
287
|
* })
|
|
286
288
|
*
|
|
287
289
|
* @example
|
|
288
290
|
* await client.users.inviteUser({
|
|
291
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
289
292
|
* email: "newhire@acme.example"
|
|
290
293
|
* })
|
|
291
294
|
*/
|
|
@@ -293,8 +296,9 @@ class UsersClient {
|
|
|
293
296
|
return core.HttpResponsePromise.fromPromise(this.__inviteUser(request, requestOptions));
|
|
294
297
|
}
|
|
295
298
|
async __inviteUser(request, requestOptions) {
|
|
299
|
+
const { "Idempotency-Key": idempotencyKey, ..._body } = request;
|
|
296
300
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
297
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
301
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions?.headers);
|
|
298
302
|
const _response = await core.fetcher({
|
|
299
303
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
300
304
|
(await core.Supplier.get(this._options.environment)) ??
|
|
@@ -304,7 +308,7 @@ class UsersClient {
|
|
|
304
308
|
contentType: "application/json",
|
|
305
309
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
306
310
|
requestType: "json",
|
|
307
|
-
body:
|
|
311
|
+
body: _body,
|
|
308
312
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
309
313
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
310
314
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -316,6 +320,8 @@ class UsersClient {
|
|
|
316
320
|
}
|
|
317
321
|
if (_response.error.reason === "status-code") {
|
|
318
322
|
switch (_response.error.statusCode) {
|
|
323
|
+
case 400:
|
|
324
|
+
throw new NizamDashboard.BadRequestError(_response.error.body, _response.rawResponse);
|
|
319
325
|
case 401:
|
|
320
326
|
throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
321
327
|
case 403:
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
4
5
|
* email: "newhire@acme.example",
|
|
5
6
|
* name: "New Hire"
|
|
6
7
|
* }
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* {
|
|
11
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
10
12
|
* email: "newhire@acme.example"
|
|
11
13
|
* }
|
|
12
14
|
*/
|
|
13
15
|
export interface InviteUserRequest {
|
|
16
|
+
/** Optional. Supply a UUID (canonical 8-4-4-4-12 form; lowercase v4 recommended) to make this operation idempotent: the same key on a retry replays the original outcome instead of creating a second resource. 2xx successes and deliberate 4xx domain rejections are cached and replayed for 24h when the request body matches; transient 5xx responses are never cached, so a retry with the same key re-executes. A malformed key is rejected with 400 `idempotency.invalid_key`; reusing a key with a different request body is 409 `idempotency.key_conflict`; a key still in flight is 409 `idempotency.in_progress`. Omit the header and the operation behaves like any other write. */
|
|
17
|
+
"Idempotency-Key"?: string;
|
|
14
18
|
/** Recipient email. */
|
|
15
19
|
email: string;
|
|
16
20
|
/** Display name (optional). */
|
|
@@ -5,9 +5,9 @@ export interface Device {
|
|
|
5
5
|
/** Device id. */
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
/** Push transport. */
|
|
8
|
-
platform?:
|
|
8
|
+
platform?: Device.Platform | undefined;
|
|
9
9
|
/** Registration lifecycle. */
|
|
10
|
-
status?:
|
|
10
|
+
status?: Device.Status | undefined;
|
|
11
11
|
/** When the device was first registered. */
|
|
12
12
|
registered_at?: string | undefined;
|
|
13
13
|
/** When the registration was last refreshed (last seen). */
|
|
@@ -16,6 +16,21 @@ export interface Device {
|
|
|
16
16
|
object?: Device.Object_ | undefined;
|
|
17
17
|
}
|
|
18
18
|
export declare namespace Device {
|
|
19
|
+
/** Push transport. */
|
|
20
|
+
const Platform: {
|
|
21
|
+
readonly Ios: "ios";
|
|
22
|
+
readonly Android: "android";
|
|
23
|
+
readonly Web: "web";
|
|
24
|
+
};
|
|
25
|
+
type Platform = (typeof Platform)[keyof typeof Platform];
|
|
26
|
+
/** Registration lifecycle. */
|
|
27
|
+
const Status: {
|
|
28
|
+
readonly Active: "active";
|
|
29
|
+
readonly Suspended: "suspended";
|
|
30
|
+
readonly Inactive: "inactive";
|
|
31
|
+
readonly Expired: "expired";
|
|
32
|
+
};
|
|
33
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
19
34
|
/** Object type discriminator. */
|
|
20
35
|
const Object_: {
|
|
21
36
|
readonly Device: "device";
|
package/dist/api/types/Device.js
CHANGED
|
@@ -4,6 +4,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Device = void 0;
|
|
5
5
|
var Device;
|
|
6
6
|
(function (Device) {
|
|
7
|
+
/** Push transport. */
|
|
8
|
+
Device.Platform = {
|
|
9
|
+
Ios: "ios",
|
|
10
|
+
Android: "android",
|
|
11
|
+
Web: "web",
|
|
12
|
+
};
|
|
13
|
+
/** Registration lifecycle. */
|
|
14
|
+
Device.Status = {
|
|
15
|
+
Active: "active",
|
|
16
|
+
Suspended: "suspended",
|
|
17
|
+
Inactive: "inactive",
|
|
18
|
+
Expired: "expired",
|
|
19
|
+
};
|
|
7
20
|
/** Object type discriminator. */
|
|
8
21
|
Device.Object_ = {
|
|
9
22
|
Device: "device",
|
|
@@ -18,6 +18,10 @@ export interface Notification {
|
|
|
18
18
|
read?: boolean | undefined;
|
|
19
19
|
/** When it was read (RFC 3339); null while unread. */
|
|
20
20
|
read_at?: string | undefined;
|
|
21
|
+
/** Whether the recipient has archived ("Done") it. */
|
|
22
|
+
archived?: boolean | undefined;
|
|
23
|
+
/** When it was archived (RFC 3339); null while in the active inbox. */
|
|
24
|
+
archived_at?: string | undefined;
|
|
21
25
|
/** When it was raised (RFC 3339). */
|
|
22
26
|
created_at?: string | undefined;
|
|
23
27
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Active total/unread for one category.
|
|
3
|
+
*/
|
|
4
|
+
export interface NotificationCategoryCount {
|
|
5
|
+
/** Category. */
|
|
6
|
+
category?: NotificationCategoryCount.Category | undefined;
|
|
7
|
+
/** Active notifications in this category. */
|
|
8
|
+
total?: number | undefined;
|
|
9
|
+
/** Active unread notifications in this category. */
|
|
10
|
+
unread?: number | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace NotificationCategoryCount {
|
|
13
|
+
/** Category. */
|
|
14
|
+
const Category: {
|
|
15
|
+
readonly Transactional: "transactional";
|
|
16
|
+
readonly Operational: "operational";
|
|
17
|
+
readonly Alert: "alert";
|
|
18
|
+
readonly Marketing: "marketing";
|
|
19
|
+
readonly Security: "security";
|
|
20
|
+
readonly System: "system";
|
|
21
|
+
};
|
|
22
|
+
type Category = (typeof Category)[keyof typeof Category];
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.NotificationCategoryCount = void 0;
|
|
5
|
+
var NotificationCategoryCount;
|
|
6
|
+
(function (NotificationCategoryCount) {
|
|
7
|
+
/** Category. */
|
|
8
|
+
NotificationCategoryCount.Category = {
|
|
9
|
+
Transactional: "transactional",
|
|
10
|
+
Operational: "operational",
|
|
11
|
+
Alert: "alert",
|
|
12
|
+
Marketing: "marketing",
|
|
13
|
+
Security: "security",
|
|
14
|
+
System: "system",
|
|
15
|
+
};
|
|
16
|
+
})(NotificationCategoryCount || (exports.NotificationCategoryCount = NotificationCategoryCount = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Inbox segment-badge counts (server-derived).
|
|
4
|
+
*/
|
|
5
|
+
export interface NotificationCounts {
|
|
6
|
+
/** Active (non-archived) notifications. */
|
|
7
|
+
total?: number | undefined;
|
|
8
|
+
/** Active unread notifications. */
|
|
9
|
+
unread?: number | undefined;
|
|
10
|
+
/** Archived ("Done") notifications. */
|
|
11
|
+
archived?: number | undefined;
|
|
12
|
+
/** Per-category active counts; categories with no active row are omitted. */
|
|
13
|
+
categories?: NizamDashboard.NotificationCategoryCount[] | undefined;
|
|
14
|
+
/** Object type discriminator. */
|
|
15
|
+
object?: NotificationCounts.Object_ | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace NotificationCounts {
|
|
18
|
+
/** Object type discriminator. */
|
|
19
|
+
const Object_: {
|
|
20
|
+
readonly NotificationCounts: "notification_counts";
|
|
21
|
+
};
|
|
22
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.NotificationCounts = void 0;
|
|
5
|
+
var NotificationCounts;
|
|
6
|
+
(function (NotificationCounts) {
|
|
7
|
+
/** Object type discriminator. */
|
|
8
|
+
NotificationCounts.Object_ = {
|
|
9
|
+
NotificationCounts: "notification_counts",
|
|
10
|
+
};
|
|
11
|
+
})(NotificationCounts || (exports.NotificationCounts = NotificationCounts = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of an archive-all operation.
|
|
3
|
+
*/
|
|
4
|
+
export interface NotificationsArchived {
|
|
5
|
+
/** Number of notifications archived. */
|
|
6
|
+
archived?: number | undefined;
|
|
7
|
+
/** Object type discriminator. */
|
|
8
|
+
object?: NotificationsArchived.Object_ | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace NotificationsArchived {
|
|
11
|
+
/** Object type discriminator. */
|
|
12
|
+
const Object_: {
|
|
13
|
+
readonly NotificationsArchived: "notifications_archived";
|
|
14
|
+
};
|
|
15
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.NotificationsArchived = void 0;
|
|
5
|
+
var NotificationsArchived;
|
|
6
|
+
(function (NotificationsArchived) {
|
|
7
|
+
/** Object type discriminator. */
|
|
8
|
+
NotificationsArchived.Object_ = {
|
|
9
|
+
NotificationsArchived: "notifications_archived",
|
|
10
|
+
};
|
|
11
|
+
})(NotificationsArchived || (exports.NotificationsArchived = NotificationsArchived = {}));
|
|
@@ -49,10 +49,13 @@ export * from "./MembershipChoice.js";
|
|
|
49
49
|
export * from "./MembershipDriftResponse.js";
|
|
50
50
|
export * from "./MqttToken.js";
|
|
51
51
|
export * from "./Notification.js";
|
|
52
|
+
export * from "./NotificationCategoryCount.js";
|
|
53
|
+
export * from "./NotificationCounts.js";
|
|
52
54
|
export * from "./NotificationDeadLetter.js";
|
|
53
55
|
export * from "./NotificationPreference.js";
|
|
54
56
|
export * from "./NotificationPreferenceItem.js";
|
|
55
57
|
export * from "./NotificationPreferences.js";
|
|
58
|
+
export * from "./NotificationsArchived.js";
|
|
56
59
|
export * from "./NotificationsMarkedRead.js";
|
|
57
60
|
export * from "./NotificationUnreadCount.js";
|
|
58
61
|
export * from "./Operator.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -65,10 +65,13 @@ __exportStar(require("./MembershipChoice.js"), exports);
|
|
|
65
65
|
__exportStar(require("./MembershipDriftResponse.js"), exports);
|
|
66
66
|
__exportStar(require("./MqttToken.js"), exports);
|
|
67
67
|
__exportStar(require("./Notification.js"), exports);
|
|
68
|
+
__exportStar(require("./NotificationCategoryCount.js"), exports);
|
|
69
|
+
__exportStar(require("./NotificationCounts.js"), exports);
|
|
68
70
|
__exportStar(require("./NotificationDeadLetter.js"), exports);
|
|
69
71
|
__exportStar(require("./NotificationPreference.js"), exports);
|
|
70
72
|
__exportStar(require("./NotificationPreferenceItem.js"), exports);
|
|
71
73
|
__exportStar(require("./NotificationPreferences.js"), exports);
|
|
74
|
+
__exportStar(require("./NotificationsArchived.js"), exports);
|
|
72
75
|
__exportStar(require("./NotificationsMarkedRead.js"), exports);
|
|
73
76
|
__exportStar(require("./NotificationUnreadCount.js"), exports);
|
|
74
77
|
__exportStar(require("./Operator.js"), exports);
|