@nizam-os/carrier-sdk 1.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/BaseClient.d.ts +42 -0
- package/dist/BaseClient.js +80 -0
- package/dist/Client.d.ts +32 -0
- package/dist/Client.js +78 -0
- package/dist/api/errors/ConflictError.d.ts +6 -0
- package/dist/api/errors/ConflictError.js +54 -0
- package/dist/api/errors/ForbiddenError.d.ts +6 -0
- package/dist/api/errors/ForbiddenError.js +54 -0
- package/dist/api/errors/GoneError.d.ts +6 -0
- package/dist/api/errors/GoneError.js +54 -0
- package/dist/api/errors/InternalServerError.d.ts +6 -0
- package/dist/api/errors/InternalServerError.js +54 -0
- package/dist/api/errors/NotFoundError.d.ts +6 -0
- package/dist/api/errors/NotFoundError.js +54 -0
- package/dist/api/errors/UnauthorizedError.d.ts +6 -0
- package/dist/api/errors/UnauthorizedError.js +54 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +6 -0
- package/dist/api/errors/UnprocessableEntityError.js +54 -0
- package/dist/api/errors/index.d.ts +7 -0
- package/dist/api/errors/index.js +23 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/identity/client/Client.d.ts +39 -0
- package/dist/api/resources/identity/client/Client.js +116 -0
- package/dist/api/resources/identity/client/index.d.ts +1 -0
- package/dist/api/resources/identity/client/index.js +2 -0
- package/dist/api/resources/identity/exports.d.ts +2 -0
- package/dist/api/resources/identity/exports.js +21 -0
- package/dist/api/resources/identity/index.d.ts +1 -0
- package/dist/api/resources/identity/index.js +17 -0
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +43 -0
- package/dist/api/resources/invites/client/Client.d.ts +37 -0
- package/dist/api/resources/invites/client/Client.js +123 -0
- package/dist/api/resources/invites/client/index.d.ts +1 -0
- package/dist/api/resources/invites/client/index.js +17 -0
- package/dist/api/resources/invites/client/requests/AcceptInviteRequest.d.ts +10 -0
- package/dist/api/resources/invites/client/requests/AcceptInviteRequest.js +3 -0
- package/dist/api/resources/invites/client/requests/index.d.ts +1 -0
- package/dist/api/resources/invites/client/requests/index.js +2 -0
- package/dist/api/resources/invites/exports.d.ts +2 -0
- package/dist/api/resources/invites/exports.js +21 -0
- package/dist/api/resources/invites/index.d.ts +1 -0
- package/dist/api/resources/invites/index.js +17 -0
- package/dist/api/resources/lookups/client/Client.d.ts +27 -0
- package/dist/api/resources/lookups/client/Client.js +100 -0
- package/dist/api/resources/lookups/client/index.d.ts +1 -0
- package/dist/api/resources/lookups/client/index.js +2 -0
- package/dist/api/resources/lookups/exports.d.ts +2 -0
- package/dist/api/resources/lookups/exports.js +21 -0
- package/dist/api/resources/lookups/index.d.ts +1 -0
- package/dist/api/resources/lookups/index.js +17 -0
- package/dist/api/types/ApiFieldError.d.ts +11 -0
- package/dist/api/types/ApiFieldError.js +3 -0
- package/dist/api/types/Asset.d.ts +58 -0
- package/dist/api/types/Asset.js +33 -0
- package/dist/api/types/Assignment.d.ts +49 -0
- package/dist/api/types/Assignment.js +30 -0
- package/dist/api/types/CloseAssignmentRequest.d.ts +21 -0
- package/dist/api/types/CloseAssignmentRequest.js +18 -0
- package/dist/api/types/CreateAssetRequest.d.ts +26 -0
- package/dist/api/types/CreateAssetRequest.js +19 -0
- package/dist/api/types/CreateAutonomousOperatorRequest.d.ts +15 -0
- package/dist/api/types/CreateAutonomousOperatorRequest.js +3 -0
- package/dist/api/types/CreateHumanOperatorRequest.d.ts +17 -0
- package/dist/api/types/CreateHumanOperatorRequest.js +3 -0
- package/dist/api/types/CreateInviteRequest.d.ts +23 -0
- package/dist/api/types/CreateInviteRequest.js +17 -0
- package/dist/api/types/CreateOperatorRequest.d.ts +16 -0
- package/dist/api/types/CreateOperatorRequest.js +3 -0
- package/dist/api/types/CreateOrganizationRequest.d.ts +16 -0
- package/dist/api/types/CreateOrganizationRequest.js +3 -0
- package/dist/api/types/CreateTeleoperatedOperatorRequest.d.ts +11 -0
- package/dist/api/types/CreateTeleoperatedOperatorRequest.js +3 -0
- package/dist/api/types/InternalUserUpdateRequest.d.ts +21 -0
- package/dist/api/types/InternalUserUpdateRequest.js +14 -0
- package/dist/api/types/Invite.d.ts +47 -0
- package/dist/api/types/Invite.js +28 -0
- package/dist/api/types/InviteUserRequest.d.ts +9 -0
- package/dist/api/types/InviteUserRequest.js +3 -0
- package/dist/api/types/ListResponse.d.ts +23 -0
- package/dist/api/types/ListResponse.js +11 -0
- package/dist/api/types/OpenAssignmentRequest.d.ts +22 -0
- package/dist/api/types/OpenAssignmentRequest.js +15 -0
- package/dist/api/types/Operator.d.ts +45 -0
- package/dist/api/types/Operator.js +26 -0
- package/dist/api/types/Organization.d.ts +35 -0
- package/dist/api/types/Organization.js +17 -0
- package/dist/api/types/OrganizationMembership.d.ts +29 -0
- package/dist/api/types/OrganizationMembership.js +21 -0
- package/dist/api/types/ProblemDetail.d.ts +21 -0
- package/dist/api/types/ProblemDetail.js +3 -0
- package/dist/api/types/UpdateOrganizationRequest.d.ts +14 -0
- package/dist/api/types/UpdateOrganizationRequest.js +3 -0
- package/dist/api/types/User.d.ts +40 -0
- package/dist/api/types/User.js +21 -0
- package/dist/api/types/UserResource.d.ts +34 -0
- package/dist/api/types/UserResource.js +18 -0
- package/dist/api/types/UserUpdateRequest.d.ts +9 -0
- package/dist/api/types/UserUpdateRequest.js +3 -0
- package/dist/api/types/index.d.ts +24 -0
- package/dist/api/types/index.js +40 -0
- package/dist/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/auth/BearerAuthProvider.js +68 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +5 -0
- package/dist/core/auth/AuthProvider.d.ts +8 -0
- package/dist/core/auth/AuthProvider.js +9 -0
- package/dist/core/auth/AuthRequest.d.ts +9 -0
- package/dist/core/auth/AuthRequest.js +2 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +32 -0
- package/dist/core/auth/BearerToken.d.ts +7 -0
- package/dist/core/auth/BearerToken.js +16 -0
- package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/core/auth/index.d.ts +5 -0
- package/dist/core/auth/index.js +11 -0
- package/dist/core/base64.d.ts +2 -0
- package/dist/core/base64.js +26 -0
- package/dist/core/exports.d.ts +1 -0
- package/dist/core/exports.js +17 -0
- package/dist/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/core/fetcher/BinaryResponse.js +17 -0
- package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/core/fetcher/EndpointSupplier.js +13 -0
- package/dist/core/fetcher/Fetcher.d.ts +56 -0
- package/dist/core/fetcher/Fetcher.js +310 -0
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +92 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +13 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +8 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +33 -0
- package/dist/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/core/fetcher/getFetchFn.js +6 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +11 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +16 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +58 -0
- package/dist/core/fetcher/index.d.ts +13 -0
- package/dist/core/fetcher/index.js +19 -0
- package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/core/fetcher/makePassthroughRequest.js +122 -0
- package/dist/core/fetcher/makeRequest.d.ts +6 -0
- package/dist/core/fetcher/makeRequest.js +59 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +59 -0
- package/dist/core/fetcher/signals.d.ts +5 -0
- package/dist/core/fetcher/signals.js +24 -0
- package/dist/core/headers.d.ts +2 -0
- package/dist/core/headers.js +31 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +45 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/logging/exports.d.ts +18 -0
- package/dist/core/logging/exports.js +45 -0
- package/dist/core/logging/index.d.ts +1 -0
- package/dist/core/logging/index.js +17 -0
- package/dist/core/logging/logger.d.ts +126 -0
- package/dist/core/logging/logger.js +143 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +103 -0
- package/dist/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/core/url/QueryStringBuilder.js +83 -0
- package/dist/core/url/encodePathParam.d.ts +1 -0
- package/dist/core/url/encodePathParam.js +21 -0
- package/dist/core/url/index.d.ts +4 -0
- package/dist/core/url/index.js +11 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +68 -0
- package/dist/core/url/qs.d.ts +7 -0
- package/dist/core/url/qs.js +79 -0
- package/dist/environments.d.ts +4 -0
- package/dist/environments.js +7 -0
- package/dist/errors/NizamCarrierError.d.ts +14 -0
- package/dist/errors/NizamCarrierError.js +35 -0
- package/dist/errors/NizamCarrierTimeoutError.d.ts +6 -0
- package/dist/errors/NizamCarrierTimeoutError.js +18 -0
- package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/errors/handleNonStatusCodeError.js +68 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +17 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +48 -0
- package/package.json +35 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as NizamCarrier from "../../../index.js";
|
|
5
|
+
export declare namespace LookupsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Static reference data — countries, currencies, languages, timezones.
|
|
12
|
+
*/
|
|
13
|
+
export declare class LookupsClient {
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<LookupsClient.Options>;
|
|
15
|
+
constructor(options: LookupsClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
20
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.lookups.listBusinessCategories()
|
|
24
|
+
*/
|
|
25
|
+
listBusinessCategories(requestOptions?: LookupsClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.ListResponse>;
|
|
26
|
+
private __listBusinessCategories;
|
|
27
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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.LookupsClient = void 0;
|
|
38
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
39
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
40
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
41
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
42
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
43
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
44
|
+
const NizamCarrier = __importStar(require("../../../index.js"));
|
|
45
|
+
/**
|
|
46
|
+
* Static reference data — countries, currencies, languages, timezones.
|
|
47
|
+
*/
|
|
48
|
+
class LookupsClient {
|
|
49
|
+
constructor(options) {
|
|
50
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @param {LookupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link NizamCarrier.UnauthorizedError}
|
|
56
|
+
* @throws {@link NizamCarrier.InternalServerError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.lookups.listBusinessCategories()
|
|
60
|
+
*/
|
|
61
|
+
listBusinessCategories(requestOptions) {
|
|
62
|
+
return core.HttpResponsePromise.fromPromise(this.__listBusinessCategories(requestOptions));
|
|
63
|
+
}
|
|
64
|
+
async __listBusinessCategories(requestOptions) {
|
|
65
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
66
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
67
|
+
const _response = await core.fetcher({
|
|
68
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
69
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
70
|
+
environments.NizamCarrierEnvironment.Production, "v1/lookups/business-categories"),
|
|
71
|
+
method: "GET",
|
|
72
|
+
headers: _headers,
|
|
73
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
74
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
75
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
76
|
+
abortSignal: requestOptions?.abortSignal,
|
|
77
|
+
fetchFn: this._options?.fetch,
|
|
78
|
+
logging: this._options.logging,
|
|
79
|
+
});
|
|
80
|
+
if (_response.ok) {
|
|
81
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
82
|
+
}
|
|
83
|
+
if (_response.error.reason === "status-code") {
|
|
84
|
+
switch (_response.error.statusCode) {
|
|
85
|
+
case 401:
|
|
86
|
+
throw new NizamCarrier.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
87
|
+
case 500:
|
|
88
|
+
throw new NizamCarrier.InternalServerError(_response.error.body, _response.rawResponse);
|
|
89
|
+
default:
|
|
90
|
+
throw new errors.NizamCarrierError({
|
|
91
|
+
statusCode: _response.error.statusCode,
|
|
92
|
+
body: _response.error.body,
|
|
93
|
+
rawResponse: _response.rawResponse,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/lookups/business-categories");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.LookupsClient = LookupsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.LookupsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "LookupsClient", { enumerable: true, get: function () { return Client_js_1.LookupsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One field-level entry inside a 422 validation problem.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiFieldError {
|
|
5
|
+
/** Dot-notated JSON path matching the request shape. */
|
|
6
|
+
field: string;
|
|
7
|
+
/** Stable machine-readable code. */
|
|
8
|
+
code: string;
|
|
9
|
+
/** Human-readable detail (English). */
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A physical asset tracked by the fleet — vehicle, drone, robot, container, etc.
|
|
3
|
+
*/
|
|
4
|
+
export interface Asset {
|
|
5
|
+
/** Stable UUID. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Top-level kind. */
|
|
8
|
+
kind?: Asset.Kind | undefined;
|
|
9
|
+
/** Sub-kind within the kind (free-form). */
|
|
10
|
+
sub_kind?: string | undefined;
|
|
11
|
+
/** SAE J3016 autonomy level 0..5. */
|
|
12
|
+
autonomy_level?: number | undefined;
|
|
13
|
+
/** Lifecycle status. */
|
|
14
|
+
status?: Asset.Status | undefined;
|
|
15
|
+
/** Display name. */
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
/** Vehicle Identification Number. */
|
|
18
|
+
vin?: string | undefined;
|
|
19
|
+
/** License plate. */
|
|
20
|
+
plate_number?: string | undefined;
|
|
21
|
+
/** Owning organization id. */
|
|
22
|
+
organization_id?: string | undefined;
|
|
23
|
+
/** Current primary operator (active assignment, role=primary). */
|
|
24
|
+
current_primary_operator_id?: string | undefined;
|
|
25
|
+
/** Object type discriminator (Stripe pattern). */
|
|
26
|
+
object?: Asset.Object_ | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare namespace Asset {
|
|
29
|
+
/** Top-level kind. */
|
|
30
|
+
const Kind: {
|
|
31
|
+
readonly GroundVehicle: "ground_vehicle";
|
|
32
|
+
readonly AerialVehicle: "aerial_vehicle";
|
|
33
|
+
readonly MarineVehicle: "marine_vehicle";
|
|
34
|
+
readonly Robot: "robot";
|
|
35
|
+
readonly Agv: "agv";
|
|
36
|
+
readonly Trailer: "trailer";
|
|
37
|
+
readonly Container: "container";
|
|
38
|
+
readonly Pallet: "pallet";
|
|
39
|
+
readonly Equipment: "equipment";
|
|
40
|
+
};
|
|
41
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
42
|
+
/** Lifecycle status. */
|
|
43
|
+
const Status: {
|
|
44
|
+
readonly Active: "active";
|
|
45
|
+
readonly Maintenance: "maintenance";
|
|
46
|
+
readonly OutOfService: "out_of_service";
|
|
47
|
+
readonly Retired: "retired";
|
|
48
|
+
readonly Sold: "sold";
|
|
49
|
+
readonly Inactive: "inactive";
|
|
50
|
+
readonly Lost: "lost";
|
|
51
|
+
};
|
|
52
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
53
|
+
/** Object type discriminator (Stripe pattern). */
|
|
54
|
+
const Object_: {
|
|
55
|
+
readonly Asset: "asset";
|
|
56
|
+
};
|
|
57
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
58
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Asset = void 0;
|
|
5
|
+
var Asset;
|
|
6
|
+
(function (Asset) {
|
|
7
|
+
/** Top-level kind. */
|
|
8
|
+
Asset.Kind = {
|
|
9
|
+
GroundVehicle: "ground_vehicle",
|
|
10
|
+
AerialVehicle: "aerial_vehicle",
|
|
11
|
+
MarineVehicle: "marine_vehicle",
|
|
12
|
+
Robot: "robot",
|
|
13
|
+
Agv: "agv",
|
|
14
|
+
Trailer: "trailer",
|
|
15
|
+
Container: "container",
|
|
16
|
+
Pallet: "pallet",
|
|
17
|
+
Equipment: "equipment",
|
|
18
|
+
};
|
|
19
|
+
/** Lifecycle status. */
|
|
20
|
+
Asset.Status = {
|
|
21
|
+
Active: "active",
|
|
22
|
+
Maintenance: "maintenance",
|
|
23
|
+
OutOfService: "out_of_service",
|
|
24
|
+
Retired: "retired",
|
|
25
|
+
Sold: "sold",
|
|
26
|
+
Inactive: "inactive",
|
|
27
|
+
Lost: "lost",
|
|
28
|
+
};
|
|
29
|
+
/** Object type discriminator (Stripe pattern). */
|
|
30
|
+
Asset.Object_ = {
|
|
31
|
+
Asset: "asset",
|
|
32
|
+
};
|
|
33
|
+
})(Asset || (exports.Asset = Asset = {}));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time-bound binding between an asset and an operator in a role.
|
|
3
|
+
*/
|
|
4
|
+
export interface Assignment {
|
|
5
|
+
/** Stable UUID. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Asset id. */
|
|
8
|
+
asset_id?: string | undefined;
|
|
9
|
+
/** Operator id. */
|
|
10
|
+
operator_id?: string | undefined;
|
|
11
|
+
/** Role discriminator for concurrent assignments on the same asset. */
|
|
12
|
+
role?: Assignment.Role | undefined;
|
|
13
|
+
/** Start of validity. */
|
|
14
|
+
valid_from?: string | undefined;
|
|
15
|
+
/** End of validity (null = still active). */
|
|
16
|
+
valid_until?: string | undefined;
|
|
17
|
+
/** Why the assignment was closed (null while active). */
|
|
18
|
+
terminated_reason?: Assignment.TerminatedReason | undefined;
|
|
19
|
+
/** Object type discriminator (Stripe pattern). */
|
|
20
|
+
object?: Assignment.Object_ | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace Assignment {
|
|
23
|
+
/** Role discriminator for concurrent assignments on the same asset. */
|
|
24
|
+
const Role: {
|
|
25
|
+
readonly Primary: "primary";
|
|
26
|
+
readonly CoOperator: "co_operator";
|
|
27
|
+
readonly SafetyMonitor: "safety_monitor";
|
|
28
|
+
readonly RemotePilot: "remote_pilot";
|
|
29
|
+
readonly Supervisor: "supervisor";
|
|
30
|
+
};
|
|
31
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
32
|
+
/** Why the assignment was closed (null while active). */
|
|
33
|
+
const TerminatedReason: {
|
|
34
|
+
readonly ShiftEnd: "shift_end";
|
|
35
|
+
readonly AssetMaintenance: "asset_maintenance";
|
|
36
|
+
readonly OperatorOffDuty: "operator_off_duty";
|
|
37
|
+
readonly Incident: "incident";
|
|
38
|
+
readonly SoftwareUpdate: "software_update";
|
|
39
|
+
readonly Reassigned: "reassigned";
|
|
40
|
+
readonly ContractEnded: "contract_ended";
|
|
41
|
+
readonly ManualClose: "manual_close";
|
|
42
|
+
};
|
|
43
|
+
type TerminatedReason = (typeof TerminatedReason)[keyof typeof TerminatedReason];
|
|
44
|
+
/** Object type discriminator (Stripe pattern). */
|
|
45
|
+
const Object_: {
|
|
46
|
+
readonly Assignment: "assignment";
|
|
47
|
+
};
|
|
48
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
49
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Assignment = void 0;
|
|
5
|
+
var Assignment;
|
|
6
|
+
(function (Assignment) {
|
|
7
|
+
/** Role discriminator for concurrent assignments on the same asset. */
|
|
8
|
+
Assignment.Role = {
|
|
9
|
+
Primary: "primary",
|
|
10
|
+
CoOperator: "co_operator",
|
|
11
|
+
SafetyMonitor: "safety_monitor",
|
|
12
|
+
RemotePilot: "remote_pilot",
|
|
13
|
+
Supervisor: "supervisor",
|
|
14
|
+
};
|
|
15
|
+
/** Why the assignment was closed (null while active). */
|
|
16
|
+
Assignment.TerminatedReason = {
|
|
17
|
+
ShiftEnd: "shift_end",
|
|
18
|
+
AssetMaintenance: "asset_maintenance",
|
|
19
|
+
OperatorOffDuty: "operator_off_duty",
|
|
20
|
+
Incident: "incident",
|
|
21
|
+
SoftwareUpdate: "software_update",
|
|
22
|
+
Reassigned: "reassigned",
|
|
23
|
+
ContractEnded: "contract_ended",
|
|
24
|
+
ManualClose: "manual_close",
|
|
25
|
+
};
|
|
26
|
+
/** Object type discriminator (Stripe pattern). */
|
|
27
|
+
Assignment.Object_ = {
|
|
28
|
+
Assignment: "assignment",
|
|
29
|
+
};
|
|
30
|
+
})(Assignment || (exports.Assignment = Assignment = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Close an active assignment.
|
|
3
|
+
*/
|
|
4
|
+
export interface CloseAssignmentRequest {
|
|
5
|
+
/** Why the assignment is being closed. */
|
|
6
|
+
reason: CloseAssignmentRequest.Reason;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace CloseAssignmentRequest {
|
|
9
|
+
/** Why the assignment is being closed. */
|
|
10
|
+
const Reason: {
|
|
11
|
+
readonly ShiftEnd: "shift_end";
|
|
12
|
+
readonly AssetMaintenance: "asset_maintenance";
|
|
13
|
+
readonly OperatorOffDuty: "operator_off_duty";
|
|
14
|
+
readonly Incident: "incident";
|
|
15
|
+
readonly SoftwareUpdate: "software_update";
|
|
16
|
+
readonly Reassigned: "reassigned";
|
|
17
|
+
readonly ContractEnded: "contract_ended";
|
|
18
|
+
readonly ManualClose: "manual_close";
|
|
19
|
+
};
|
|
20
|
+
type Reason = (typeof Reason)[keyof typeof Reason];
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CloseAssignmentRequest = void 0;
|
|
5
|
+
var CloseAssignmentRequest;
|
|
6
|
+
(function (CloseAssignmentRequest) {
|
|
7
|
+
/** Why the assignment is being closed. */
|
|
8
|
+
CloseAssignmentRequest.Reason = {
|
|
9
|
+
ShiftEnd: "shift_end",
|
|
10
|
+
AssetMaintenance: "asset_maintenance",
|
|
11
|
+
OperatorOffDuty: "operator_off_duty",
|
|
12
|
+
Incident: "incident",
|
|
13
|
+
SoftwareUpdate: "software_update",
|
|
14
|
+
Reassigned: "reassigned",
|
|
15
|
+
ContractEnded: "contract_ended",
|
|
16
|
+
ManualClose: "manual_close",
|
|
17
|
+
};
|
|
18
|
+
})(CloseAssignmentRequest || (exports.CloseAssignmentRequest = CloseAssignmentRequest = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a new asset.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateAssetRequest {
|
|
5
|
+
/** Top-level kind. */
|
|
6
|
+
kind: CreateAssetRequest.Kind;
|
|
7
|
+
/** Display name. */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** SAE J3016 autonomy level 0..5. */
|
|
10
|
+
autonomy_level?: number | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace CreateAssetRequest {
|
|
13
|
+
/** Top-level kind. */
|
|
14
|
+
const Kind: {
|
|
15
|
+
readonly GroundVehicle: "ground_vehicle";
|
|
16
|
+
readonly AerialVehicle: "aerial_vehicle";
|
|
17
|
+
readonly MarineVehicle: "marine_vehicle";
|
|
18
|
+
readonly Robot: "robot";
|
|
19
|
+
readonly Agv: "agv";
|
|
20
|
+
readonly Trailer: "trailer";
|
|
21
|
+
readonly Container: "container";
|
|
22
|
+
readonly Pallet: "pallet";
|
|
23
|
+
readonly Equipment: "equipment";
|
|
24
|
+
};
|
|
25
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CreateAssetRequest = void 0;
|
|
5
|
+
var CreateAssetRequest;
|
|
6
|
+
(function (CreateAssetRequest) {
|
|
7
|
+
/** Top-level kind. */
|
|
8
|
+
CreateAssetRequest.Kind = {
|
|
9
|
+
GroundVehicle: "ground_vehicle",
|
|
10
|
+
AerialVehicle: "aerial_vehicle",
|
|
11
|
+
MarineVehicle: "marine_vehicle",
|
|
12
|
+
Robot: "robot",
|
|
13
|
+
Agv: "agv",
|
|
14
|
+
Trailer: "trailer",
|
|
15
|
+
Container: "container",
|
|
16
|
+
Pallet: "pallet",
|
|
17
|
+
Equipment: "equipment",
|
|
18
|
+
};
|
|
19
|
+
})(CreateAssetRequest || (exports.CreateAssetRequest = CreateAssetRequest = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create an autonomous (software-agent) operator.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateAutonomousOperatorRequest {
|
|
5
|
+
/** Software vendor. */
|
|
6
|
+
vendor: string;
|
|
7
|
+
/** Software product. */
|
|
8
|
+
product: string;
|
|
9
|
+
/** Software version. */
|
|
10
|
+
version: string;
|
|
11
|
+
/** Instance id within the version. */
|
|
12
|
+
instance_id?: string | undefined;
|
|
13
|
+
/** Legal entity accountable for this operator's actions (a user id). */
|
|
14
|
+
responsible_party: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a human operator.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateHumanOperatorRequest {
|
|
5
|
+
/** Display name. */
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
/** Linked user id (when the human has a Nizam login). */
|
|
8
|
+
user_id?: string | undefined;
|
|
9
|
+
/** Driver license number. */
|
|
10
|
+
license_number?: string | undefined;
|
|
11
|
+
/** License class. */
|
|
12
|
+
license_class?: string | undefined;
|
|
13
|
+
/** Expiry date. */
|
|
14
|
+
license_expires_at?: string | undefined;
|
|
15
|
+
/** ISO 3166-1 alpha-2 issuing country. */
|
|
16
|
+
license_country?: string | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface CreateInviteRequest {
|
|
2
|
+
/** Organization the invite is for. */
|
|
3
|
+
organization_id: string;
|
|
4
|
+
/** Recipient email. */
|
|
5
|
+
email: string;
|
|
6
|
+
/** Role the recipient will hold after acceptance. Lowercase enum names from OrgUserRole. */
|
|
7
|
+
role: CreateInviteRequest.Role;
|
|
8
|
+
/** TTL in days. Defaults to 7. */
|
|
9
|
+
ttl_days?: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace CreateInviteRequest {
|
|
12
|
+
/** Role the recipient will hold after acceptance. Lowercase enum names from OrgUserRole. */
|
|
13
|
+
const Role: {
|
|
14
|
+
readonly SuperAdmin: "super_admin";
|
|
15
|
+
readonly Admin: "admin";
|
|
16
|
+
readonly Dispatcher: "dispatcher";
|
|
17
|
+
readonly Manager: "manager";
|
|
18
|
+
readonly Staff: "staff";
|
|
19
|
+
readonly Viewer: "viewer";
|
|
20
|
+
readonly BillingAdmin: "billing_admin";
|
|
21
|
+
};
|
|
22
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CreateInviteRequest = void 0;
|
|
5
|
+
var CreateInviteRequest;
|
|
6
|
+
(function (CreateInviteRequest) {
|
|
7
|
+
/** Role the recipient will hold after acceptance. Lowercase enum names from OrgUserRole. */
|
|
8
|
+
CreateInviteRequest.Role = {
|
|
9
|
+
SuperAdmin: "super_admin",
|
|
10
|
+
Admin: "admin",
|
|
11
|
+
Dispatcher: "dispatcher",
|
|
12
|
+
Manager: "manager",
|
|
13
|
+
Staff: "staff",
|
|
14
|
+
Viewer: "viewer",
|
|
15
|
+
BillingAdmin: "billing_admin",
|
|
16
|
+
};
|
|
17
|
+
})(CreateInviteRequest || (exports.CreateInviteRequest = CreateInviteRequest = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as NizamCarrier from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create a new operator. The kind discriminator selects the variant.
|
|
4
|
+
*/
|
|
5
|
+
export type CreateOperatorRequest = NizamCarrier.CreateOperatorRequest.Human | NizamCarrier.CreateOperatorRequest.Autonomous | NizamCarrier.CreateOperatorRequest.Teleoperated;
|
|
6
|
+
export declare namespace CreateOperatorRequest {
|
|
7
|
+
interface Human extends NizamCarrier.CreateHumanOperatorRequest {
|
|
8
|
+
kind: "human";
|
|
9
|
+
}
|
|
10
|
+
interface Autonomous extends NizamCarrier.CreateAutonomousOperatorRequest {
|
|
11
|
+
kind: "autonomous";
|
|
12
|
+
}
|
|
13
|
+
interface Teleoperated extends NizamCarrier.CreateTeleoperatedOperatorRequest {
|
|
14
|
+
kind: "teleoperated";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface CreateOrganizationRequest {
|
|
2
|
+
/** Display name of the organization. */
|
|
3
|
+
name: string;
|
|
4
|
+
/** Optional URL-safe slug. When omitted, the server derives one from the name. */
|
|
5
|
+
slug?: string | undefined;
|
|
6
|
+
/** Optional primary email domain. When set, Keycloak attaches it to the new Organization so per-domain IdP discovery works. */
|
|
7
|
+
primary_domain?: string | undefined;
|
|
8
|
+
/** Optional self-selected vertical from /v1/lookups/business-categories. Lowercase slug (e.g. 'restaurant', 'third_party_logistics'). Drives downstream personalization. */
|
|
9
|
+
business_category?: string | undefined;
|
|
10
|
+
/** Optional contact phone number in E.164 format (leading +, country code, then digits). */
|
|
11
|
+
phone?: string | undefined;
|
|
12
|
+
/** Optional ISO 3166-1 alpha-2 country code. */
|
|
13
|
+
country?: string | undefined;
|
|
14
|
+
/** Optional IANA timezone identifier. */
|
|
15
|
+
timezone?: string | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a teleoperated (human-via-software) operator.
|
|
3
|
+
*/
|
|
4
|
+
export interface CreateTeleoperatedOperatorRequest {
|
|
5
|
+
/** User id of the human controller at the remote console. */
|
|
6
|
+
controller_user_id: string;
|
|
7
|
+
/** Control platform identifier. */
|
|
8
|
+
control_platform?: string | undefined;
|
|
9
|
+
/** Legal entity accountable. */
|
|
10
|
+
responsible_party: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-staff partial update (contact + lifecycle status).
|
|
3
|
+
*/
|
|
4
|
+
export interface InternalUserUpdateRequest {
|
|
5
|
+
/** New email (optional). */
|
|
6
|
+
email?: string | undefined;
|
|
7
|
+
/** New display name (optional). */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** New lifecycle status (optional). */
|
|
10
|
+
status?: InternalUserUpdateRequest.Status | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace InternalUserUpdateRequest {
|
|
13
|
+
/** New lifecycle status (optional). */
|
|
14
|
+
const Status: {
|
|
15
|
+
readonly Active: "active";
|
|
16
|
+
readonly Suspended: "suspended";
|
|
17
|
+
readonly Deactivated: "deactivated";
|
|
18
|
+
readonly PendingVerification: "pending_verification";
|
|
19
|
+
};
|
|
20
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.InternalUserUpdateRequest = void 0;
|
|
5
|
+
var InternalUserUpdateRequest;
|
|
6
|
+
(function (InternalUserUpdateRequest) {
|
|
7
|
+
/** New lifecycle status (optional). */
|
|
8
|
+
InternalUserUpdateRequest.Status = {
|
|
9
|
+
Active: "active",
|
|
10
|
+
Suspended: "suspended",
|
|
11
|
+
Deactivated: "deactivated",
|
|
12
|
+
PendingVerification: "pending_verification",
|
|
13
|
+
};
|
|
14
|
+
})(InternalUserUpdateRequest || (exports.InternalUserUpdateRequest = InternalUserUpdateRequest = {}));
|