@nizam-os/carrier-sdk 1.0.1 → 2.1.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 +3 -3
- package/dist/Client.js +7 -7
- package/dist/api/resources/index.d.ts +1 -1
- package/dist/api/resources/index.js +5 -5
- package/dist/api/resources/lookups/client/Client.d.ts +45 -1
- package/dist/api/resources/lookups/client/Client.js +192 -1
- package/dist/api/resources/{identity → users}/client/Client.d.ts +8 -8
- package/dist/api/resources/{identity → users}/client/Client.js +6 -6
- package/dist/api/resources/users/exports.d.ts +2 -0
- package/dist/api/resources/{identity → users}/exports.js +2 -2
- package/dist/api/types/BusinessCategory.d.ts +18 -0
- package/dist/api/types/BusinessCategory.js +11 -0
- package/dist/api/types/Country.d.ts +20 -0
- package/dist/api/types/Country.js +11 -0
- package/dist/api/types/CreateInviteRequest.d.ts +2 -2
- package/dist/api/types/CreateInviteRequest.js +1 -1
- package/dist/api/types/Currency.d.ts +22 -0
- package/dist/api/types/Currency.js +11 -0
- package/dist/api/types/Language.d.ts +20 -0
- package/dist/api/types/Language.js +11 -0
- package/dist/api/types/ListResponseBusinessCategory.d.ts +27 -0
- package/dist/api/types/ListResponseBusinessCategory.js +11 -0
- package/dist/api/types/ListResponseCountry.d.ts +27 -0
- package/dist/api/types/{ListResponse.js → ListResponseCountry.js} +5 -5
- package/dist/api/types/ListResponseCurrency.d.ts +27 -0
- package/dist/api/types/ListResponseCurrency.js +11 -0
- package/dist/api/types/ListResponseLanguage.d.ts +27 -0
- package/dist/api/types/ListResponseLanguage.js +11 -0
- package/dist/api/types/ListResponseMembership.d.ts +27 -0
- package/dist/api/types/ListResponseMembership.js +11 -0
- package/dist/api/types/ListResponseTimezone.d.ts +27 -0
- package/dist/api/types/ListResponseTimezone.js +11 -0
- package/dist/api/types/{ListResponse.d.ts → ListResponseUserResource.d.ts} +7 -3
- package/dist/api/types/ListResponseUserResource.js +11 -0
- package/dist/api/types/{OrganizationMembership.d.ts → Membership.d.ts} +5 -5
- package/dist/api/types/{OrganizationMembership.js → Membership.js} +7 -7
- package/dist/api/types/Timezone.d.ts +20 -0
- package/dist/api/types/Timezone.js +11 -0
- package/dist/api/types/index.d.ts +13 -2
- package/dist/api/types/index.js +13 -2
- package/package.json +1 -1
- package/dist/api/resources/identity/exports.d.ts +0 -2
- /package/dist/api/resources/{identity → users}/client/index.d.ts +0 -0
- /package/dist/api/resources/{identity → users}/client/index.js +0 -0
- /package/dist/api/resources/{identity → users}/index.d.ts +0 -0
- /package/dist/api/resources/{identity → users}/index.js +0 -0
package/dist/Client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IdentityClient } from "./api/resources/identity/client/Client.js";
|
|
2
1
|
import { InvitesClient } from "./api/resources/invites/client/Client.js";
|
|
3
2
|
import { LookupsClient } from "./api/resources/lookups/client/Client.js";
|
|
3
|
+
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
4
4
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
5
5
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
6
6
|
import * as core from "./core/index.js";
|
|
@@ -13,11 +13,11 @@ export declare class NizamCarrierClient {
|
|
|
13
13
|
protected readonly _options: NormalizedClientOptionsWithAuth<NizamCarrierClient.Options>;
|
|
14
14
|
protected _invites: InvitesClient | undefined;
|
|
15
15
|
protected _lookups: LookupsClient | undefined;
|
|
16
|
-
protected
|
|
16
|
+
protected _users: UsersClient | undefined;
|
|
17
17
|
constructor(options: NizamCarrierClient.Options);
|
|
18
18
|
get invites(): InvitesClient;
|
|
19
19
|
get lookups(): LookupsClient;
|
|
20
|
-
get
|
|
20
|
+
get users(): UsersClient;
|
|
21
21
|
/**
|
|
22
22
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
23
23
|
* This is useful for making requests to endpoints not yet supported in the SDK.
|
package/dist/Client.js
CHANGED
|
@@ -35,9 +35,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.NizamCarrierClient = void 0;
|
|
38
|
-
const Client_js_1 = require("./api/resources/
|
|
39
|
-
const Client_js_2 = require("./api/resources/
|
|
40
|
-
const Client_js_3 = require("./api/resources/
|
|
38
|
+
const Client_js_1 = require("./api/resources/invites/client/Client.js");
|
|
39
|
+
const Client_js_2 = require("./api/resources/lookups/client/Client.js");
|
|
40
|
+
const Client_js_3 = require("./api/resources/users/client/Client.js");
|
|
41
41
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
42
42
|
const core = __importStar(require("./core/index.js"));
|
|
43
43
|
class NizamCarrierClient {
|
|
@@ -45,13 +45,13 @@ class NizamCarrierClient {
|
|
|
45
45
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
46
46
|
}
|
|
47
47
|
get invites() {
|
|
48
|
-
return (this._invites ?? (this._invites = new
|
|
48
|
+
return (this._invites ?? (this._invites = new Client_js_1.InvitesClient(this._options)));
|
|
49
49
|
}
|
|
50
50
|
get lookups() {
|
|
51
|
-
return (this._lookups ?? (this._lookups = new
|
|
51
|
+
return (this._lookups ?? (this._lookups = new Client_js_2.LookupsClient(this._options)));
|
|
52
52
|
}
|
|
53
|
-
get
|
|
54
|
-
return (this.
|
|
53
|
+
get users() {
|
|
54
|
+
return (this._users ?? (this._users = new Client_js_3.UsersClient(this._options)));
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
@@ -15,6 +15,9 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
18
21
|
var __importStar = (this && this.__importStar) || (function () {
|
|
19
22
|
var ownKeys = function(o) {
|
|
20
23
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
@@ -32,12 +35,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
35
|
return result;
|
|
33
36
|
};
|
|
34
37
|
})();
|
|
35
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
-
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.identity = __importStar(require("./identity/index.js"));
|
|
39
|
+
exports.users = exports.lookups = exports.invites = void 0;
|
|
41
40
|
__exportStar(require("./invites/client/requests/index.js"), exports);
|
|
42
41
|
exports.invites = __importStar(require("./invites/index.js"));
|
|
43
42
|
exports.lookups = __importStar(require("./lookups/index.js"));
|
|
43
|
+
exports.users = __importStar(require("./users/index.js"));
|
|
@@ -22,6 +22,50 @@ export declare class LookupsClient {
|
|
|
22
22
|
* @example
|
|
23
23
|
* await client.lookups.listBusinessCategories()
|
|
24
24
|
*/
|
|
25
|
-
listBusinessCategories(requestOptions?: LookupsClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.
|
|
25
|
+
listBusinessCategories(requestOptions?: LookupsClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.ListResponseBusinessCategory>;
|
|
26
26
|
private __listBusinessCategories;
|
|
27
|
+
/**
|
|
28
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
31
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.lookups.listCountries()
|
|
35
|
+
*/
|
|
36
|
+
listCountries(requestOptions?: LookupsClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.ListResponseCountry>;
|
|
37
|
+
private __listCountries;
|
|
38
|
+
/**
|
|
39
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
42
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.lookups.listCurrencies()
|
|
46
|
+
*/
|
|
47
|
+
listCurrencies(requestOptions?: LookupsClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.ListResponseCurrency>;
|
|
48
|
+
private __listCurrencies;
|
|
49
|
+
/**
|
|
50
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
53
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.lookups.listLanguages()
|
|
57
|
+
*/
|
|
58
|
+
listLanguages(requestOptions?: LookupsClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.ListResponseLanguage>;
|
|
59
|
+
private __listLanguages;
|
|
60
|
+
/**
|
|
61
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
64
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.lookups.listTimezones()
|
|
68
|
+
*/
|
|
69
|
+
listTimezones(requestOptions?: LookupsClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.ListResponseTimezone>;
|
|
70
|
+
private __listTimezones;
|
|
27
71
|
}
|
|
@@ -78,7 +78,10 @@ class LookupsClient {
|
|
|
78
78
|
logging: this._options.logging,
|
|
79
79
|
});
|
|
80
80
|
if (_response.ok) {
|
|
81
|
-
return {
|
|
81
|
+
return {
|
|
82
|
+
data: _response.body,
|
|
83
|
+
rawResponse: _response.rawResponse,
|
|
84
|
+
};
|
|
82
85
|
}
|
|
83
86
|
if (_response.error.reason === "status-code") {
|
|
84
87
|
switch (_response.error.statusCode) {
|
|
@@ -96,5 +99,193 @@ class LookupsClient {
|
|
|
96
99
|
}
|
|
97
100
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/lookups/business-categories");
|
|
98
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
106
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.lookups.listCountries()
|
|
110
|
+
*/
|
|
111
|
+
listCountries(requestOptions) {
|
|
112
|
+
return core.HttpResponsePromise.fromPromise(this.__listCountries(requestOptions));
|
|
113
|
+
}
|
|
114
|
+
async __listCountries(requestOptions) {
|
|
115
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
116
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
117
|
+
const _response = await core.fetcher({
|
|
118
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
119
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
120
|
+
environments.NizamCarrierEnvironment.Production, "v1/lookups/countries"),
|
|
121
|
+
method: "GET",
|
|
122
|
+
headers: _headers,
|
|
123
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
124
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
125
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
126
|
+
abortSignal: requestOptions?.abortSignal,
|
|
127
|
+
fetchFn: this._options?.fetch,
|
|
128
|
+
logging: this._options.logging,
|
|
129
|
+
});
|
|
130
|
+
if (_response.ok) {
|
|
131
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
132
|
+
}
|
|
133
|
+
if (_response.error.reason === "status-code") {
|
|
134
|
+
switch (_response.error.statusCode) {
|
|
135
|
+
case 401:
|
|
136
|
+
throw new NizamCarrier.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
137
|
+
case 500:
|
|
138
|
+
throw new NizamCarrier.InternalServerError(_response.error.body, _response.rawResponse);
|
|
139
|
+
default:
|
|
140
|
+
throw new errors.NizamCarrierError({
|
|
141
|
+
statusCode: _response.error.statusCode,
|
|
142
|
+
body: _response.error.body,
|
|
143
|
+
rawResponse: _response.rawResponse,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/lookups/countries");
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
|
+
*
|
|
152
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
153
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* await client.lookups.listCurrencies()
|
|
157
|
+
*/
|
|
158
|
+
listCurrencies(requestOptions) {
|
|
159
|
+
return core.HttpResponsePromise.fromPromise(this.__listCurrencies(requestOptions));
|
|
160
|
+
}
|
|
161
|
+
async __listCurrencies(requestOptions) {
|
|
162
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
163
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
164
|
+
const _response = await core.fetcher({
|
|
165
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
166
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
167
|
+
environments.NizamCarrierEnvironment.Production, "v1/lookups/currencies"),
|
|
168
|
+
method: "GET",
|
|
169
|
+
headers: _headers,
|
|
170
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
171
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
172
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
173
|
+
abortSignal: requestOptions?.abortSignal,
|
|
174
|
+
fetchFn: this._options?.fetch,
|
|
175
|
+
logging: this._options.logging,
|
|
176
|
+
});
|
|
177
|
+
if (_response.ok) {
|
|
178
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
179
|
+
}
|
|
180
|
+
if (_response.error.reason === "status-code") {
|
|
181
|
+
switch (_response.error.statusCode) {
|
|
182
|
+
case 401:
|
|
183
|
+
throw new NizamCarrier.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
184
|
+
case 500:
|
|
185
|
+
throw new NizamCarrier.InternalServerError(_response.error.body, _response.rawResponse);
|
|
186
|
+
default:
|
|
187
|
+
throw new errors.NizamCarrierError({
|
|
188
|
+
statusCode: _response.error.statusCode,
|
|
189
|
+
body: _response.error.body,
|
|
190
|
+
rawResponse: _response.rawResponse,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/lookups/currencies");
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
198
|
+
*
|
|
199
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
200
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* await client.lookups.listLanguages()
|
|
204
|
+
*/
|
|
205
|
+
listLanguages(requestOptions) {
|
|
206
|
+
return core.HttpResponsePromise.fromPromise(this.__listLanguages(requestOptions));
|
|
207
|
+
}
|
|
208
|
+
async __listLanguages(requestOptions) {
|
|
209
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
210
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
211
|
+
const _response = await core.fetcher({
|
|
212
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
213
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
214
|
+
environments.NizamCarrierEnvironment.Production, "v1/lookups/languages"),
|
|
215
|
+
method: "GET",
|
|
216
|
+
headers: _headers,
|
|
217
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
218
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
219
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
220
|
+
abortSignal: requestOptions?.abortSignal,
|
|
221
|
+
fetchFn: this._options?.fetch,
|
|
222
|
+
logging: this._options.logging,
|
|
223
|
+
});
|
|
224
|
+
if (_response.ok) {
|
|
225
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
226
|
+
}
|
|
227
|
+
if (_response.error.reason === "status-code") {
|
|
228
|
+
switch (_response.error.statusCode) {
|
|
229
|
+
case 401:
|
|
230
|
+
throw new NizamCarrier.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
231
|
+
case 500:
|
|
232
|
+
throw new NizamCarrier.InternalServerError(_response.error.body, _response.rawResponse);
|
|
233
|
+
default:
|
|
234
|
+
throw new errors.NizamCarrierError({
|
|
235
|
+
statusCode: _response.error.statusCode,
|
|
236
|
+
body: _response.error.body,
|
|
237
|
+
rawResponse: _response.rawResponse,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/lookups/languages");
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
245
|
+
*
|
|
246
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
247
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* await client.lookups.listTimezones()
|
|
251
|
+
*/
|
|
252
|
+
listTimezones(requestOptions) {
|
|
253
|
+
return core.HttpResponsePromise.fromPromise(this.__listTimezones(requestOptions));
|
|
254
|
+
}
|
|
255
|
+
async __listTimezones(requestOptions) {
|
|
256
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
257
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
258
|
+
const _response = await core.fetcher({
|
|
259
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
260
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
261
|
+
environments.NizamCarrierEnvironment.Production, "v1/lookups/timezones"),
|
|
262
|
+
method: "GET",
|
|
263
|
+
headers: _headers,
|
|
264
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
265
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
266
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
267
|
+
abortSignal: requestOptions?.abortSignal,
|
|
268
|
+
fetchFn: this._options?.fetch,
|
|
269
|
+
logging: this._options.logging,
|
|
270
|
+
});
|
|
271
|
+
if (_response.ok) {
|
|
272
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
273
|
+
}
|
|
274
|
+
if (_response.error.reason === "status-code") {
|
|
275
|
+
switch (_response.error.statusCode) {
|
|
276
|
+
case 401:
|
|
277
|
+
throw new NizamCarrier.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
278
|
+
case 500:
|
|
279
|
+
throw new NizamCarrier.InternalServerError(_response.error.body, _response.rawResponse);
|
|
280
|
+
default:
|
|
281
|
+
throw new errors.NizamCarrierError({
|
|
282
|
+
statusCode: _response.error.statusCode,
|
|
283
|
+
body: _response.error.body,
|
|
284
|
+
rawResponse: _response.rawResponse,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/lookups/timezones");
|
|
289
|
+
}
|
|
99
290
|
}
|
|
100
291
|
exports.LookupsClient = LookupsClient;
|
|
@@ -2,17 +2,17 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as NizamCarrier from "../../../index.js";
|
|
5
|
-
export declare namespace
|
|
5
|
+
export declare namespace UsersClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* User aggregate — current session (`/me`) and user-entity operations (invite, list, lifecycle, platform-staff admin).
|
|
12
12
|
*/
|
|
13
|
-
export declare class
|
|
14
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<
|
|
15
|
-
constructor(options:
|
|
13
|
+
export declare class UsersClient {
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<UsersClient.Options>;
|
|
15
|
+
constructor(options: UsersClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Returns the authenticated user merged with profile claims from their JWT.
|
|
18
18
|
*
|
|
@@ -24,7 +24,7 @@ export declare class IdentityClient {
|
|
|
24
24
|
* client roles (prefixed, e.g. `dashboard:dispatcher`). The frontend usually drops the
|
|
25
25
|
* portal prefix when rendering since it knows its own portal.
|
|
26
26
|
*
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
30
30
|
* @throws {@link NizamCarrier.ForbiddenError}
|
|
@@ -32,8 +32,8 @@ export declare class IdentityClient {
|
|
|
32
32
|
* @throws {@link NizamCarrier.InternalServerError}
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
* await client.
|
|
35
|
+
* await client.users.me()
|
|
36
36
|
*/
|
|
37
|
-
me(requestOptions?:
|
|
37
|
+
me(requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.User>;
|
|
38
38
|
private __me;
|
|
39
39
|
}
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.
|
|
37
|
+
exports.UsersClient = void 0;
|
|
38
38
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
39
39
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
40
40
|
const core = __importStar(require("../../../../core/index.js"));
|
|
@@ -43,9 +43,9 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
43
43
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
44
44
|
const NizamCarrier = __importStar(require("../../../index.js"));
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* User aggregate — current session (`/me`) and user-entity operations (invite, list, lifecycle, platform-staff admin).
|
|
47
47
|
*/
|
|
48
|
-
class
|
|
48
|
+
class UsersClient {
|
|
49
49
|
constructor(options) {
|
|
50
50
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
51
51
|
}
|
|
@@ -60,7 +60,7 @@ class IdentityClient {
|
|
|
60
60
|
* client roles (prefixed, e.g. `dashboard:dispatcher`). The frontend usually drops the
|
|
61
61
|
* portal prefix when rendering since it knows its own portal.
|
|
62
62
|
*
|
|
63
|
-
* @param {
|
|
63
|
+
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
64
|
*
|
|
65
65
|
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
66
66
|
* @throws {@link NizamCarrier.ForbiddenError}
|
|
@@ -68,7 +68,7 @@ class IdentityClient {
|
|
|
68
68
|
* @throws {@link NizamCarrier.InternalServerError}
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
|
-
* await client.
|
|
71
|
+
* await client.users.me()
|
|
72
72
|
*/
|
|
73
73
|
me(requestOptions) {
|
|
74
74
|
return core.HttpResponsePromise.fromPromise(this.__me(requestOptions));
|
|
@@ -113,4 +113,4 @@ class IdentityClient {
|
|
|
113
113
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/me");
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
exports.
|
|
116
|
+
exports.UsersClient = UsersClient;
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.UsersClient = void 0;
|
|
19
19
|
var Client_js_1 = require("./client/Client.js");
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "UsersClient", { enumerable: true, get: function () { return Client_js_1.UsersClient; } });
|
|
21
21
|
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-selected vertical an organization operates in. Picker option for the onboarding flow.
|
|
3
|
+
*/
|
|
4
|
+
export interface BusinessCategory {
|
|
5
|
+
/** Stable slug — matches the DB CHECK constraint on `organizations.business_category`. */
|
|
6
|
+
slug?: string | undefined;
|
|
7
|
+
/** Human-readable label for picker UIs. */
|
|
8
|
+
display_name?: string | undefined;
|
|
9
|
+
/** Object type discriminator (Stripe pattern). */
|
|
10
|
+
object?: BusinessCategory.Object_ | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace BusinessCategory {
|
|
13
|
+
/** Object type discriminator (Stripe pattern). */
|
|
14
|
+
const Object_: {
|
|
15
|
+
readonly BusinessCategory: "business_category";
|
|
16
|
+
};
|
|
17
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
18
|
+
}
|
|
@@ -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.BusinessCategory = void 0;
|
|
5
|
+
var BusinessCategory;
|
|
6
|
+
(function (BusinessCategory) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). */
|
|
8
|
+
BusinessCategory.Object_ = {
|
|
9
|
+
BusinessCategory: "business_category",
|
|
10
|
+
};
|
|
11
|
+
})(BusinessCategory || (exports.BusinessCategory = BusinessCategory = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO 3166-1 alpha-2 country with localized name + E.164 calling code.
|
|
3
|
+
*/
|
|
4
|
+
export interface Country {
|
|
5
|
+
/** ISO 3166-1 alpha-2 code. */
|
|
6
|
+
code?: string | undefined;
|
|
7
|
+
/** Display name in the Accept-Language locale. */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** E.164 country calling code with `+` prefix, or null if not allocated. */
|
|
10
|
+
calling_code?: string | undefined;
|
|
11
|
+
/** Object type discriminator (Stripe pattern). */
|
|
12
|
+
object?: Country.Object_ | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace Country {
|
|
15
|
+
/** Object type discriminator (Stripe pattern). */
|
|
16
|
+
const Object_: {
|
|
17
|
+
readonly Country: "country";
|
|
18
|
+
};
|
|
19
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
20
|
+
}
|
|
@@ -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.Country = void 0;
|
|
5
|
+
var Country;
|
|
6
|
+
(function (Country) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). */
|
|
8
|
+
Country.Object_ = {
|
|
9
|
+
Country: "country",
|
|
10
|
+
};
|
|
11
|
+
})(Country || (exports.Country = Country = {}));
|
|
@@ -3,13 +3,13 @@ export interface CreateInviteRequest {
|
|
|
3
3
|
organization_id: string;
|
|
4
4
|
/** Recipient email. */
|
|
5
5
|
email: string;
|
|
6
|
-
/** Role the recipient will hold after acceptance. Lowercase enum names from
|
|
6
|
+
/** Role the recipient will hold after acceptance. Lowercase enum names from MembershipRole. */
|
|
7
7
|
role: CreateInviteRequest.Role;
|
|
8
8
|
/** TTL in days. Defaults to 7. */
|
|
9
9
|
ttl_days?: number | undefined;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace CreateInviteRequest {
|
|
12
|
-
/** Role the recipient will hold after acceptance. Lowercase enum names from
|
|
12
|
+
/** Role the recipient will hold after acceptance. Lowercase enum names from MembershipRole. */
|
|
13
13
|
const Role: {
|
|
14
14
|
readonly SuperAdmin: "super_admin";
|
|
15
15
|
readonly Admin: "admin";
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.CreateInviteRequest = void 0;
|
|
5
5
|
var CreateInviteRequest;
|
|
6
6
|
(function (CreateInviteRequest) {
|
|
7
|
-
/** Role the recipient will hold after acceptance. Lowercase enum names from
|
|
7
|
+
/** Role the recipient will hold after acceptance. Lowercase enum names from MembershipRole. */
|
|
8
8
|
CreateInviteRequest.Role = {
|
|
9
9
|
SuperAdmin: "super_admin",
|
|
10
10
|
Admin: "admin",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO 4217 currency with localized name + symbol.
|
|
3
|
+
*/
|
|
4
|
+
export interface Currency {
|
|
5
|
+
/** ISO 4217 code. */
|
|
6
|
+
code?: string | undefined;
|
|
7
|
+
/** Display name in the Accept-Language locale. */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** Short symbol in the Accept-Language locale. */
|
|
10
|
+
symbol?: string | undefined;
|
|
11
|
+
/** Default number of fractional digits per ISO 4217. */
|
|
12
|
+
fraction_digits?: number | undefined;
|
|
13
|
+
/** Object type discriminator (Stripe pattern). */
|
|
14
|
+
object?: Currency.Object_ | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace Currency {
|
|
17
|
+
/** Object type discriminator (Stripe pattern). */
|
|
18
|
+
const Object_: {
|
|
19
|
+
readonly Currency: "currency";
|
|
20
|
+
};
|
|
21
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
22
|
+
}
|
|
@@ -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.Currency = void 0;
|
|
5
|
+
var Currency;
|
|
6
|
+
(function (Currency) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). */
|
|
8
|
+
Currency.Object_ = {
|
|
9
|
+
Currency: "currency",
|
|
10
|
+
};
|
|
11
|
+
})(Currency || (exports.Currency = Currency = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO 639-1 language with localized + native names.
|
|
3
|
+
*/
|
|
4
|
+
export interface Language {
|
|
5
|
+
/** ISO 639-1 two-letter code. */
|
|
6
|
+
code?: string | undefined;
|
|
7
|
+
/** Display name in the Accept-Language locale. */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** Name in the language itself, useful in language pickers. */
|
|
10
|
+
native_name?: string | undefined;
|
|
11
|
+
/** Object type discriminator (Stripe pattern). */
|
|
12
|
+
object?: Language.Object_ | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace Language {
|
|
15
|
+
/** Object type discriminator (Stripe pattern). */
|
|
16
|
+
const Object_: {
|
|
17
|
+
readonly Language: "language";
|
|
18
|
+
};
|
|
19
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
20
|
+
}
|
|
@@ -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.Language = void 0;
|
|
5
|
+
var Language;
|
|
6
|
+
(function (Language) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). */
|
|
8
|
+
Language.Object_ = {
|
|
9
|
+
Language: "language",
|
|
10
|
+
};
|
|
11
|
+
})(Language || (exports.Language = Language = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseBusinessCategory {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseBusinessCategory.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamCarrier.BusinessCategory[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseBusinessCategory {
|
|
22
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -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.ListResponseBusinessCategory = void 0;
|
|
5
|
+
var ListResponseBusinessCategory;
|
|
6
|
+
(function (ListResponseBusinessCategory) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseBusinessCategory.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseBusinessCategory || (exports.ListResponseBusinessCategory = ListResponseBusinessCategory = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseCountry {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseCountry.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamCarrier.Country[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseCountry {
|
|
22
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
(function (
|
|
4
|
+
exports.ListResponseCountry = void 0;
|
|
5
|
+
var ListResponseCountry;
|
|
6
|
+
(function (ListResponseCountry) {
|
|
7
7
|
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
-
|
|
8
|
+
ListResponseCountry.Object_ = {
|
|
9
9
|
List: "list",
|
|
10
10
|
};
|
|
11
|
-
})(
|
|
11
|
+
})(ListResponseCountry || (exports.ListResponseCountry = ListResponseCountry = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseCurrency {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseCurrency.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamCarrier.Currency[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseCurrency {
|
|
22
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -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.ListResponseCurrency = void 0;
|
|
5
|
+
var ListResponseCurrency;
|
|
6
|
+
(function (ListResponseCurrency) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseCurrency.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseCurrency || (exports.ListResponseCurrency = ListResponseCurrency = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseLanguage {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseLanguage.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamCarrier.Language[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseLanguage {
|
|
22
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -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.ListResponseLanguage = void 0;
|
|
5
|
+
var ListResponseLanguage;
|
|
6
|
+
(function (ListResponseLanguage) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseLanguage.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseLanguage || (exports.ListResponseLanguage = ListResponseLanguage = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseMembership {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseMembership.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamCarrier.Membership[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseMembership {
|
|
22
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -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.ListResponseMembership = void 0;
|
|
5
|
+
var ListResponseMembership;
|
|
6
|
+
(function (ListResponseMembership) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseMembership.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseMembership || (exports.ListResponseMembership = ListResponseMembership = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseTimezone {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseTimezone.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamCarrier.Timezone[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseTimezone {
|
|
22
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -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.ListResponseTimezone = void 0;
|
|
5
|
+
var ListResponseTimezone;
|
|
6
|
+
(function (ListResponseTimezone) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseTimezone.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseTimezone || (exports.ListResponseTimezone = ListResponseTimezone = {}));
|
|
@@ -2,19 +2,23 @@ import type * as NizamCarrier from "../index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface ListResponseUserResource {
|
|
6
6
|
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
-
object?:
|
|
7
|
+
object?: ListResponseUserResource.Object_ | undefined;
|
|
8
8
|
/** Page of resources. Empty array when there are no matches. */
|
|
9
9
|
data?: NizamCarrier.UserResource[] | undefined;
|
|
10
10
|
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
11
|
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
12
14
|
/** Opaque cursor for the next page. `null` on the last page. */
|
|
13
15
|
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
14
18
|
/** Page size that produced this response. */
|
|
15
19
|
limit?: number | undefined;
|
|
16
20
|
}
|
|
17
|
-
export declare namespace
|
|
21
|
+
export declare namespace ListResponseUserResource {
|
|
18
22
|
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
19
23
|
const Object_: {
|
|
20
24
|
readonly List: "list";
|
|
@@ -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.ListResponseUserResource = void 0;
|
|
5
|
+
var ListResponseUserResource;
|
|
6
|
+
(function (ListResponseUserResource) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseUserResource.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseUserResource || (exports.ListResponseUserResource = ListResponseUserResource = {}));
|
|
@@ -2,14 +2,14 @@ import type * as NizamCarrier from "../index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* An organization the current user belongs to, with their role inside it.
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface Membership {
|
|
6
6
|
organization?: NizamCarrier.Organization | undefined;
|
|
7
7
|
/** The user's role in this organization. */
|
|
8
|
-
role?:
|
|
8
|
+
role?: Membership.Role | undefined;
|
|
9
9
|
/** Object type discriminator (Stripe pattern). */
|
|
10
|
-
object?:
|
|
10
|
+
object?: Membership.Object_ | undefined;
|
|
11
11
|
}
|
|
12
|
-
export declare namespace
|
|
12
|
+
export declare namespace Membership {
|
|
13
13
|
/** The user's role in this organization. */
|
|
14
14
|
const Role: {
|
|
15
15
|
readonly SuperAdmin: "super_admin";
|
|
@@ -23,7 +23,7 @@ export declare namespace OrganizationMembership {
|
|
|
23
23
|
type Role = (typeof Role)[keyof typeof Role];
|
|
24
24
|
/** Object type discriminator (Stripe pattern). */
|
|
25
25
|
const Object_: {
|
|
26
|
-
readonly
|
|
26
|
+
readonly Membership: "membership";
|
|
27
27
|
};
|
|
28
28
|
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
29
29
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
(function (
|
|
4
|
+
exports.Membership = void 0;
|
|
5
|
+
var Membership;
|
|
6
|
+
(function (Membership) {
|
|
7
7
|
/** The user's role in this organization. */
|
|
8
|
-
|
|
8
|
+
Membership.Role = {
|
|
9
9
|
SuperAdmin: "super_admin",
|
|
10
10
|
Admin: "admin",
|
|
11
11
|
Dispatcher: "dispatcher",
|
|
@@ -15,7 +15,7 @@ var OrganizationMembership;
|
|
|
15
15
|
BillingAdmin: "billing_admin",
|
|
16
16
|
};
|
|
17
17
|
/** Object type discriminator (Stripe pattern). */
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Membership.Object_ = {
|
|
19
|
+
Membership: "membership",
|
|
20
20
|
};
|
|
21
|
-
})(
|
|
21
|
+
})(Membership || (exports.Membership = Membership = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IANA timezone with localized display name + current GMT offset.
|
|
3
|
+
*/
|
|
4
|
+
export interface Timezone {
|
|
5
|
+
/** IANA timezone id (e.g. `America/New_York`). */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Long display name in the Accept-Language locale. */
|
|
8
|
+
display_name?: string | undefined;
|
|
9
|
+
/** Current offset from UTC in minutes (DST-aware). */
|
|
10
|
+
gmt_offset_minutes?: number | undefined;
|
|
11
|
+
/** Object type discriminator (Stripe pattern). */
|
|
12
|
+
object?: Timezone.Object_ | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace Timezone {
|
|
15
|
+
/** Object type discriminator (Stripe pattern). */
|
|
16
|
+
const Object_: {
|
|
17
|
+
readonly Timezone: "timezone";
|
|
18
|
+
};
|
|
19
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
20
|
+
}
|
|
@@ -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.Timezone = void 0;
|
|
5
|
+
var Timezone;
|
|
6
|
+
(function (Timezone) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). */
|
|
8
|
+
Timezone.Object_ = {
|
|
9
|
+
Timezone: "timezone",
|
|
10
|
+
};
|
|
11
|
+
})(Timezone || (exports.Timezone = Timezone = {}));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from "./ApiFieldError.js";
|
|
2
2
|
export * from "./Asset.js";
|
|
3
3
|
export * from "./Assignment.js";
|
|
4
|
+
export * from "./BusinessCategory.js";
|
|
4
5
|
export * from "./CloseAssignmentRequest.js";
|
|
6
|
+
export * from "./Country.js";
|
|
5
7
|
export * from "./CreateAssetRequest.js";
|
|
6
8
|
export * from "./CreateAutonomousOperatorRequest.js";
|
|
7
9
|
export * from "./CreateHumanOperatorRequest.js";
|
|
@@ -9,15 +11,24 @@ export * from "./CreateInviteRequest.js";
|
|
|
9
11
|
export * from "./CreateOperatorRequest.js";
|
|
10
12
|
export * from "./CreateOrganizationRequest.js";
|
|
11
13
|
export * from "./CreateTeleoperatedOperatorRequest.js";
|
|
14
|
+
export * from "./Currency.js";
|
|
12
15
|
export * from "./InternalUserUpdateRequest.js";
|
|
13
16
|
export * from "./Invite.js";
|
|
14
17
|
export * from "./InviteUserRequest.js";
|
|
15
|
-
export * from "./
|
|
18
|
+
export * from "./Language.js";
|
|
19
|
+
export * from "./ListResponseBusinessCategory.js";
|
|
20
|
+
export * from "./ListResponseCountry.js";
|
|
21
|
+
export * from "./ListResponseCurrency.js";
|
|
22
|
+
export * from "./ListResponseLanguage.js";
|
|
23
|
+
export * from "./ListResponseMembership.js";
|
|
24
|
+
export * from "./ListResponseTimezone.js";
|
|
25
|
+
export * from "./ListResponseUserResource.js";
|
|
26
|
+
export * from "./Membership.js";
|
|
16
27
|
export * from "./OpenAssignmentRequest.js";
|
|
17
28
|
export * from "./Operator.js";
|
|
18
29
|
export * from "./Organization.js";
|
|
19
|
-
export * from "./OrganizationMembership.js";
|
|
20
30
|
export * from "./ProblemDetail.js";
|
|
31
|
+
export * from "./Timezone.js";
|
|
21
32
|
export * from "./UpdateOrganizationRequest.js";
|
|
22
33
|
export * from "./User.js";
|
|
23
34
|
export * from "./UserResource.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -17,7 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ApiFieldError.js"), exports);
|
|
18
18
|
__exportStar(require("./Asset.js"), exports);
|
|
19
19
|
__exportStar(require("./Assignment.js"), exports);
|
|
20
|
+
__exportStar(require("./BusinessCategory.js"), exports);
|
|
20
21
|
__exportStar(require("./CloseAssignmentRequest.js"), exports);
|
|
22
|
+
__exportStar(require("./Country.js"), exports);
|
|
21
23
|
__exportStar(require("./CreateAssetRequest.js"), exports);
|
|
22
24
|
__exportStar(require("./CreateAutonomousOperatorRequest.js"), exports);
|
|
23
25
|
__exportStar(require("./CreateHumanOperatorRequest.js"), exports);
|
|
@@ -25,15 +27,24 @@ __exportStar(require("./CreateInviteRequest.js"), exports);
|
|
|
25
27
|
__exportStar(require("./CreateOperatorRequest.js"), exports);
|
|
26
28
|
__exportStar(require("./CreateOrganizationRequest.js"), exports);
|
|
27
29
|
__exportStar(require("./CreateTeleoperatedOperatorRequest.js"), exports);
|
|
30
|
+
__exportStar(require("./Currency.js"), exports);
|
|
28
31
|
__exportStar(require("./InternalUserUpdateRequest.js"), exports);
|
|
29
32
|
__exportStar(require("./Invite.js"), exports);
|
|
30
33
|
__exportStar(require("./InviteUserRequest.js"), exports);
|
|
31
|
-
__exportStar(require("./
|
|
34
|
+
__exportStar(require("./Language.js"), exports);
|
|
35
|
+
__exportStar(require("./ListResponseBusinessCategory.js"), exports);
|
|
36
|
+
__exportStar(require("./ListResponseCountry.js"), exports);
|
|
37
|
+
__exportStar(require("./ListResponseCurrency.js"), exports);
|
|
38
|
+
__exportStar(require("./ListResponseLanguage.js"), exports);
|
|
39
|
+
__exportStar(require("./ListResponseMembership.js"), exports);
|
|
40
|
+
__exportStar(require("./ListResponseTimezone.js"), exports);
|
|
41
|
+
__exportStar(require("./ListResponseUserResource.js"), exports);
|
|
42
|
+
__exportStar(require("./Membership.js"), exports);
|
|
32
43
|
__exportStar(require("./OpenAssignmentRequest.js"), exports);
|
|
33
44
|
__exportStar(require("./Operator.js"), exports);
|
|
34
45
|
__exportStar(require("./Organization.js"), exports);
|
|
35
|
-
__exportStar(require("./OrganizationMembership.js"), exports);
|
|
36
46
|
__exportStar(require("./ProblemDetail.js"), exports);
|
|
47
|
+
__exportStar(require("./Timezone.js"), exports);
|
|
37
48
|
__exportStar(require("./UpdateOrganizationRequest.js"), exports);
|
|
38
49
|
__exportStar(require("./User.js"), exports);
|
|
39
50
|
__exportStar(require("./UserResource.js"), exports);
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|