@nizam-os/customer-sdk 2.3.2 → 2.4.1
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/errors/TooManyRequestsError.d.ts +6 -0
- package/dist/api/errors/TooManyRequestsError.js +54 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/resources/lookups/client/Client.d.ts +5 -0
- package/dist/api/resources/lookups/client/Client.js +15 -0
- package/dist/api/resources/realtime/client/Client.d.ts +1 -0
- package/dist/api/resources/realtime/client/Client.js +3 -0
- package/dist/api/resources/users/client/Client.d.ts +1 -0
- package/dist/api/resources/users/client/Client.js +3 -0
- package/dist/api/types/AssetListItem.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as NizamCustomer from "../index.js";
|
|
4
|
+
export declare class TooManyRequestsError extends errors.NizamCustomerError {
|
|
5
|
+
constructor(body: NizamCustomer.ProblemDetail, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.TooManyRequestsError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class TooManyRequestsError extends errors.NizamCustomerError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "TooManyRequestsError",
|
|
43
|
+
statusCode: 429,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.TooManyRequestsError = TooManyRequestsError;
|
package/dist/api/errors/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ConflictError.js"), exports);
|
|
18
18
|
__exportStar(require("./ForbiddenError.js"), exports);
|
|
19
19
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
20
|
+
__exportStar(require("./TooManyRequestsError.js"), exports);
|
|
20
21
|
__exportStar(require("./UnauthorizedError.js"), exports);
|
|
@@ -17,6 +17,7 @@ export declare class LookupsClient {
|
|
|
17
17
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
18
|
*
|
|
19
19
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
20
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
20
21
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
21
22
|
*
|
|
22
23
|
* @example
|
|
@@ -28,6 +29,7 @@ export declare class LookupsClient {
|
|
|
28
29
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
30
|
*
|
|
30
31
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
32
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
31
33
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
32
34
|
*
|
|
33
35
|
* @example
|
|
@@ -39,6 +41,7 @@ export declare class LookupsClient {
|
|
|
39
41
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
42
|
*
|
|
41
43
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
44
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
42
45
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
43
46
|
*
|
|
44
47
|
* @example
|
|
@@ -50,6 +53,7 @@ export declare class LookupsClient {
|
|
|
50
53
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
54
|
*
|
|
52
55
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
56
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
53
57
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
54
58
|
*
|
|
55
59
|
* @example
|
|
@@ -61,6 +65,7 @@ export declare class LookupsClient {
|
|
|
61
65
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
66
|
*
|
|
63
67
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
68
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
64
69
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
65
70
|
*
|
|
66
71
|
* @example
|
|
@@ -53,6 +53,7 @@ class LookupsClient {
|
|
|
53
53
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
54
|
*
|
|
55
55
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
56
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
56
57
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
57
58
|
*
|
|
58
59
|
* @example
|
|
@@ -87,6 +88,8 @@ class LookupsClient {
|
|
|
87
88
|
switch (_response.error.statusCode) {
|
|
88
89
|
case 401:
|
|
89
90
|
throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
91
|
+
case 429:
|
|
92
|
+
throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
90
93
|
case 500:
|
|
91
94
|
throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
|
|
92
95
|
default:
|
|
@@ -103,6 +106,7 @@ class LookupsClient {
|
|
|
103
106
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
107
|
*
|
|
105
108
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
109
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
106
110
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
107
111
|
*
|
|
108
112
|
* @example
|
|
@@ -134,6 +138,8 @@ class LookupsClient {
|
|
|
134
138
|
switch (_response.error.statusCode) {
|
|
135
139
|
case 401:
|
|
136
140
|
throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
141
|
+
case 429:
|
|
142
|
+
throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
137
143
|
case 500:
|
|
138
144
|
throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
|
|
139
145
|
default:
|
|
@@ -150,6 +156,7 @@ class LookupsClient {
|
|
|
150
156
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
157
|
*
|
|
152
158
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
159
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
153
160
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
154
161
|
*
|
|
155
162
|
* @example
|
|
@@ -181,6 +188,8 @@ class LookupsClient {
|
|
|
181
188
|
switch (_response.error.statusCode) {
|
|
182
189
|
case 401:
|
|
183
190
|
throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
191
|
+
case 429:
|
|
192
|
+
throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
184
193
|
case 500:
|
|
185
194
|
throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
|
|
186
195
|
default:
|
|
@@ -197,6 +206,7 @@ class LookupsClient {
|
|
|
197
206
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
198
207
|
*
|
|
199
208
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
209
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
200
210
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
201
211
|
*
|
|
202
212
|
* @example
|
|
@@ -228,6 +238,8 @@ class LookupsClient {
|
|
|
228
238
|
switch (_response.error.statusCode) {
|
|
229
239
|
case 401:
|
|
230
240
|
throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
241
|
+
case 429:
|
|
242
|
+
throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
231
243
|
case 500:
|
|
232
244
|
throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
|
|
233
245
|
default:
|
|
@@ -244,6 +256,7 @@ class LookupsClient {
|
|
|
244
256
|
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
245
257
|
*
|
|
246
258
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
259
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
247
260
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
248
261
|
*
|
|
249
262
|
* @example
|
|
@@ -275,6 +288,8 @@ class LookupsClient {
|
|
|
275
288
|
switch (_response.error.statusCode) {
|
|
276
289
|
case 401:
|
|
277
290
|
throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
291
|
+
case 429:
|
|
292
|
+
throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
278
293
|
case 500:
|
|
279
294
|
throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
|
|
280
295
|
default:
|
|
@@ -20,6 +20,7 @@ export declare class RealtimeClient {
|
|
|
20
20
|
*
|
|
21
21
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
22
22
|
* @throws {@link NizamCustomer.ForbiddenError}
|
|
23
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
23
24
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
24
25
|
*
|
|
25
26
|
* @example
|
|
@@ -56,6 +56,7 @@ class RealtimeClient {
|
|
|
56
56
|
*
|
|
57
57
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
58
58
|
* @throws {@link NizamCustomer.ForbiddenError}
|
|
59
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
59
60
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
60
61
|
*
|
|
61
62
|
* @example
|
|
@@ -89,6 +90,8 @@ class RealtimeClient {
|
|
|
89
90
|
throw new NizamCustomer.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
90
91
|
case 403:
|
|
91
92
|
throw new NizamCustomer.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
93
|
+
case 429:
|
|
94
|
+
throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
92
95
|
case 500:
|
|
93
96
|
throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
|
|
94
97
|
default:
|
|
@@ -30,6 +30,7 @@ export declare class UsersClient {
|
|
|
30
30
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
31
31
|
* @throws {@link NizamCustomer.ForbiddenError}
|
|
32
32
|
* @throws {@link NizamCustomer.ConflictError}
|
|
33
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
33
34
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
34
35
|
*
|
|
35
36
|
* @example
|
|
@@ -66,6 +66,7 @@ class UsersClient {
|
|
|
66
66
|
* @throws {@link NizamCustomer.UnauthorizedError}
|
|
67
67
|
* @throws {@link NizamCustomer.ForbiddenError}
|
|
68
68
|
* @throws {@link NizamCustomer.ConflictError}
|
|
69
|
+
* @throws {@link NizamCustomer.TooManyRequestsError}
|
|
69
70
|
* @throws {@link NizamCustomer.InternalServerError}
|
|
70
71
|
*
|
|
71
72
|
* @example
|
|
@@ -101,6 +102,8 @@ class UsersClient {
|
|
|
101
102
|
throw new NizamCustomer.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
102
103
|
case 409:
|
|
103
104
|
throw new NizamCustomer.ConflictError(_response.error.body, _response.rawResponse);
|
|
105
|
+
case 429:
|
|
106
|
+
throw new NizamCustomer.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
104
107
|
case 500:
|
|
105
108
|
throw new NizamCustomer.InternalServerError(_response.error.body, _response.rawResponse);
|
|
106
109
|
default:
|
|
@@ -22,6 +22,8 @@ export interface AssetListItem {
|
|
|
22
22
|
organization_id?: string | undefined;
|
|
23
23
|
/** Current primary operator (active assignment, role=primary). */
|
|
24
24
|
current_primary_operator_id?: string | undefined;
|
|
25
|
+
/** Creation timestamp (ISO-8601 UTC). */
|
|
26
|
+
created_at?: string | undefined;
|
|
25
27
|
/** Relevance score (descending) when the request carried `q`; 0 for plain listings. Scores are only comparable within a single response. */
|
|
26
28
|
rank?: number | undefined;
|
|
27
29
|
/** Highlighted match fragment when the request carried `q&highlight=true`. Matched terms are wrapped in `<mark>…</mark>`. */
|