@nizam-os/dashboard-sdk 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/resources/activeOrganization/client/Client.d.ts +5 -0
- package/dist/api/resources/activeOrganization/client/Client.js +5 -0
- package/dist/api/resources/activeOrganization/client/requests/SetActiveOrganizationRequest.d.ts +5 -0
- package/dist/api/resources/assets/client/Client.d.ts +39 -0
- package/dist/api/resources/assets/client/Client.js +94 -0
- package/dist/api/resources/assets/client/requests/CreateAssetRequest.d.ts +19 -0
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.d.ts +20 -0
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/api/resources/assignments/client/Client.d.ts +13 -0
- package/dist/api/resources/assignments/client/Client.js +13 -0
- package/dist/api/resources/assignments/client/requests/CloseAssignmentRequest.d.ts +6 -0
- package/dist/api/resources/assignments/client/requests/OpenAssignmentRequest.d.ts +7 -0
- package/dist/api/resources/invites/client/Client.d.ts +16 -1
- package/dist/api/resources/invites/client/Client.js +16 -1
- package/dist/api/resources/invites/client/requests/CreateInviteRequest.d.ts +16 -1
- package/dist/api/resources/organizations/client/Client.d.ts +14 -6
- package/dist/api/resources/organizations/client/Client.js +14 -6
- package/dist/api/resources/organizations/client/requests/CreateOrganizationRequest.d.ts +5 -0
- package/dist/api/resources/organizations/client/requests/UpdateOrganizationRequest.d.ts +9 -6
- package/dist/api/resources/users/client/Client.d.ts +5 -0
- package/dist/api/resources/users/client/Client.js +5 -0
- package/dist/api/resources/users/client/requests/InviteUserRequest.d.ts +5 -0
- package/dist/api/types/AssetListItem.d.ts +62 -0
- package/dist/api/types/AssetListItem.js +33 -0
- package/dist/api/types/ListResponseAssetListItem.d.ts +27 -0
- package/dist/api/types/ListResponseAssetListItem.js +11 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/package.json +1 -1
|
@@ -55,6 +55,11 @@ export declare class ActiveOrganizationClient {
|
|
|
55
55
|
* await client.activeOrganization.setActiveOrganization({
|
|
56
56
|
* slug: "acme-logistics"
|
|
57
57
|
* })
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.activeOrganization.setActiveOrganization({
|
|
61
|
+
* slug: "globex-freight"
|
|
62
|
+
* })
|
|
58
63
|
*/
|
|
59
64
|
setActiveOrganization(request: NizamDashboard.SetActiveOrganizationRequest, requestOptions?: ActiveOrganizationClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.ActiveOrganization>;
|
|
60
65
|
private __setActiveOrganization;
|
|
@@ -129,6 +129,11 @@ class ActiveOrganizationClient {
|
|
|
129
129
|
* await client.activeOrganization.setActiveOrganization({
|
|
130
130
|
* slug: "acme-logistics"
|
|
131
131
|
* })
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* await client.activeOrganization.setActiveOrganization({
|
|
135
|
+
* slug: "globex-freight"
|
|
136
|
+
* })
|
|
132
137
|
*/
|
|
133
138
|
setActiveOrganization(request, requestOptions) {
|
|
134
139
|
return core.HttpResponsePromise.fromPromise(this.__setActiveOrganization(request, requestOptions));
|
|
@@ -13,6 +13,26 @@ export declare namespace AssetsClient {
|
|
|
13
13
|
export declare class AssetsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<AssetsClient.Options>;
|
|
15
15
|
constructor(options: AssetsClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* Without `q`: the org's assets ordered by `created_at` descending. With `q`: ranked full-text search across name, VIN, code, plate, serial, call sign, make, model and sub-kind — accent-insensitive, language-agnostic (epic #97). Search results are ordered by relevance and support forward-only cursors (`starting_after`). `highlight=true` adds a `<mark>`-wrapped match snippet.
|
|
18
|
+
*
|
|
19
|
+
* @param {NizamDashboard.ListAssetsRequest} request
|
|
20
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
|
+
*
|
|
22
|
+
* @throws {@link NizamDashboard.BadRequestError}
|
|
23
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
24
|
+
* @throws {@link NizamDashboard.ForbiddenError}
|
|
25
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.assets.listAssets({
|
|
29
|
+
* q: "<string>",
|
|
30
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
31
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
32
|
+
* })
|
|
33
|
+
*/
|
|
34
|
+
listAssets(request?: NizamDashboard.ListAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.ListResponseAssetListItem>;
|
|
35
|
+
private __listAssets;
|
|
16
36
|
/**
|
|
17
37
|
* Creates a new asset (vehicle, drone, robot, container, equipment, ...) owned by the active organization.
|
|
18
38
|
*
|
|
@@ -31,6 +51,25 @@ export declare class AssetsClient {
|
|
|
31
51
|
* name: "Truck 7",
|
|
32
52
|
* autonomy_level: 0
|
|
33
53
|
* })
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.assets.createAsset({
|
|
57
|
+
* kind: "aerial_vehicle",
|
|
58
|
+
* name: "Delivery Drone D-12",
|
|
59
|
+
* autonomy_level: 4
|
|
60
|
+
* })
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.assets.createAsset({
|
|
64
|
+
* kind: "robot",
|
|
65
|
+
* name: "Picker Bot 3",
|
|
66
|
+
* autonomy_level: 5
|
|
67
|
+
* })
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.assets.createAsset({
|
|
71
|
+
* kind: "container"
|
|
72
|
+
* })
|
|
34
73
|
*/
|
|
35
74
|
createAsset(request: NizamDashboard.CreateAssetRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Asset>;
|
|
36
75
|
private __createAsset;
|
|
@@ -49,6 +49,81 @@ class AssetsClient {
|
|
|
49
49
|
constructor(options) {
|
|
50
50
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Without `q`: the org's assets ordered by `created_at` descending. With `q`: ranked full-text search across name, VIN, code, plate, serial, call sign, make, model and sub-kind — accent-insensitive, language-agnostic (epic #97). Search results are ordered by relevance and support forward-only cursors (`starting_after`). `highlight=true` adds a `<mark>`-wrapped match snippet.
|
|
54
|
+
*
|
|
55
|
+
* @param {NizamDashboard.ListAssetsRequest} request
|
|
56
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link NizamDashboard.BadRequestError}
|
|
59
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
60
|
+
* @throws {@link NizamDashboard.ForbiddenError}
|
|
61
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await client.assets.listAssets({
|
|
65
|
+
* q: "<string>",
|
|
66
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
67
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
68
|
+
* })
|
|
69
|
+
*/
|
|
70
|
+
listAssets(request = {}, requestOptions) {
|
|
71
|
+
return core.HttpResponsePromise.fromPromise(this.__listAssets(request, requestOptions));
|
|
72
|
+
}
|
|
73
|
+
async __listAssets(request = {}, requestOptions) {
|
|
74
|
+
const { q, highlight, limit, starting_after: startingAfter, ending_before: endingBefore } = request;
|
|
75
|
+
const _queryParams = {
|
|
76
|
+
q,
|
|
77
|
+
highlight,
|
|
78
|
+
limit,
|
|
79
|
+
starting_after: startingAfter,
|
|
80
|
+
ending_before: endingBefore,
|
|
81
|
+
};
|
|
82
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
83
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
84
|
+
const _response = await core.fetcher({
|
|
85
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
86
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
87
|
+
environments.NizamDashboardEnvironment.Production, "v1/assets"),
|
|
88
|
+
method: "GET",
|
|
89
|
+
headers: _headers,
|
|
90
|
+
queryString: core.url
|
|
91
|
+
.queryBuilder()
|
|
92
|
+
.addMany(_queryParams)
|
|
93
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
94
|
+
.build(),
|
|
95
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
96
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
97
|
+
abortSignal: requestOptions?.abortSignal,
|
|
98
|
+
fetchFn: this._options?.fetch,
|
|
99
|
+
logging: this._options.logging,
|
|
100
|
+
});
|
|
101
|
+
if (_response.ok) {
|
|
102
|
+
return {
|
|
103
|
+
data: _response.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (_response.error.reason === "status-code") {
|
|
108
|
+
switch (_response.error.statusCode) {
|
|
109
|
+
case 400:
|
|
110
|
+
throw new NizamDashboard.BadRequestError(_response.error.body, _response.rawResponse);
|
|
111
|
+
case 401:
|
|
112
|
+
throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
113
|
+
case 403:
|
|
114
|
+
throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
115
|
+
case 500:
|
|
116
|
+
throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
|
|
117
|
+
default:
|
|
118
|
+
throw new errors.NizamDashboardError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.body,
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/assets");
|
|
126
|
+
}
|
|
52
127
|
/**
|
|
53
128
|
* Creates a new asset (vehicle, drone, robot, container, equipment, ...) owned by the active organization.
|
|
54
129
|
*
|
|
@@ -67,6 +142,25 @@ class AssetsClient {
|
|
|
67
142
|
* name: "Truck 7",
|
|
68
143
|
* autonomy_level: 0
|
|
69
144
|
* })
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* await client.assets.createAsset({
|
|
148
|
+
* kind: "aerial_vehicle",
|
|
149
|
+
* name: "Delivery Drone D-12",
|
|
150
|
+
* autonomy_level: 4
|
|
151
|
+
* })
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* await client.assets.createAsset({
|
|
155
|
+
* kind: "robot",
|
|
156
|
+
* name: "Picker Bot 3",
|
|
157
|
+
* autonomy_level: 5
|
|
158
|
+
* })
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* await client.assets.createAsset({
|
|
162
|
+
* kind: "container"
|
|
163
|
+
* })
|
|
70
164
|
*/
|
|
71
165
|
createAsset(request, requestOptions) {
|
|
72
166
|
return core.HttpResponsePromise.fromPromise(this.__createAsset(request, requestOptions));
|
|
@@ -5,6 +5,25 @@
|
|
|
5
5
|
* name: "Truck 7",
|
|
6
6
|
* autonomy_level: 0
|
|
7
7
|
* }
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* kind: "aerial_vehicle",
|
|
12
|
+
* name: "Delivery Drone D-12",
|
|
13
|
+
* autonomy_level: 4
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* {
|
|
18
|
+
* kind: "robot",
|
|
19
|
+
* name: "Picker Bot 3",
|
|
20
|
+
* autonomy_level: 5
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* {
|
|
25
|
+
* kind: "container"
|
|
26
|
+
* }
|
|
8
27
|
*/
|
|
9
28
|
export interface CreateAssetRequest {
|
|
10
29
|
/** Top-level kind. */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* q: "<string>",
|
|
5
|
+
* starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
|
|
6
|
+
* ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface ListAssetsRequest {
|
|
10
|
+
/** Free-text search query (max 200 chars). */
|
|
11
|
+
q?: string;
|
|
12
|
+
/** Include a highlighted match snippet per hit (search mode only). */
|
|
13
|
+
highlight?: boolean;
|
|
14
|
+
/** Page size. Default 20, maximum 100. Out-of-range values are silently clamped; the response body's `limit` field reflects what was applied. */
|
|
15
|
+
limit?: number;
|
|
16
|
+
/** Opaque cursor — return the page starting strictly after this entity in the sort order. Mutually exclusive with `ending_before`. */
|
|
17
|
+
starting_after?: string;
|
|
18
|
+
/** Opaque cursor — return the page ending strictly before this entity in the sort order. Mutually exclusive with `starting_after`. */
|
|
19
|
+
ending_before?: string;
|
|
20
|
+
}
|
|
@@ -32,6 +32,13 @@ export declare class AssignmentsClient {
|
|
|
32
32
|
* operator_id: "c1d2e3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
|
|
33
33
|
* role: "primary"
|
|
34
34
|
* })
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* await client.assignments.openAssignment({
|
|
38
|
+
* asset_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
39
|
+
* operator_id: "d2e3f4a5-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
|
|
40
|
+
* role: "safety_monitor"
|
|
41
|
+
* })
|
|
35
42
|
*/
|
|
36
43
|
openAssignment(request: NizamDashboard.OpenAssignmentRequest, requestOptions?: AssignmentsClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Assignment>;
|
|
37
44
|
private __openAssignment;
|
|
@@ -69,6 +76,12 @@ export declare class AssignmentsClient {
|
|
|
69
76
|
* id: "00000000-0000-0000-0000-000000000000",
|
|
70
77
|
* reason: "shift_end"
|
|
71
78
|
* })
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.assignments.closeAssignment({
|
|
82
|
+
* id: "00000000-0000-0000-0000-000000000000",
|
|
83
|
+
* reason: "incident"
|
|
84
|
+
* })
|
|
72
85
|
*/
|
|
73
86
|
closeAssignment(request: NizamDashboard.CloseAssignmentRequest, requestOptions?: AssignmentsClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Assignment>;
|
|
74
87
|
private __closeAssignment;
|
|
@@ -68,6 +68,13 @@ class AssignmentsClient {
|
|
|
68
68
|
* operator_id: "c1d2e3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
|
|
69
69
|
* role: "primary"
|
|
70
70
|
* })
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.assignments.openAssignment({
|
|
74
|
+
* asset_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
75
|
+
* operator_id: "d2e3f4a5-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
|
|
76
|
+
* role: "safety_monitor"
|
|
77
|
+
* })
|
|
71
78
|
*/
|
|
72
79
|
openAssignment(request, requestOptions) {
|
|
73
80
|
return core.HttpResponsePromise.fromPromise(this.__openAssignment(request, requestOptions));
|
|
@@ -193,6 +200,12 @@ class AssignmentsClient {
|
|
|
193
200
|
* id: "00000000-0000-0000-0000-000000000000",
|
|
194
201
|
* reason: "shift_end"
|
|
195
202
|
* })
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* await client.assignments.closeAssignment({
|
|
206
|
+
* id: "00000000-0000-0000-0000-000000000000",
|
|
207
|
+
* reason: "incident"
|
|
208
|
+
* })
|
|
196
209
|
*/
|
|
197
210
|
closeAssignment(request, requestOptions) {
|
|
198
211
|
return core.HttpResponsePromise.fromPromise(this.__closeAssignment(request, requestOptions));
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
* operator_id: "c1d2e3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
|
|
6
6
|
* role: "primary"
|
|
7
7
|
* }
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* asset_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
12
|
+
* operator_id: "d2e3f4a5-6b7c-8d9e-0f1a-2b3c4d5e6f7a",
|
|
13
|
+
* role: "safety_monitor"
|
|
14
|
+
* }
|
|
8
15
|
*/
|
|
9
16
|
export interface OpenAssignmentRequest {
|
|
10
17
|
/** Asset id. */
|
|
@@ -28,8 +28,23 @@ export declare class InvitesClient {
|
|
|
28
28
|
* await client.invites.createInvite({
|
|
29
29
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
30
30
|
* email: "ali@nizam.ai",
|
|
31
|
+
* role: "admin"
|
|
32
|
+
* })
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.invites.createInvite({
|
|
36
|
+
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
37
|
+
* email: "jordan@example.com",
|
|
31
38
|
* role: "dispatcher",
|
|
32
|
-
* ttl_days:
|
|
39
|
+
* ttl_days: 14
|
|
40
|
+
* })
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.invites.createInvite({
|
|
44
|
+
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
45
|
+
* email: "auditor@partner.example",
|
|
46
|
+
* role: "viewer",
|
|
47
|
+
* ttl_days: 3
|
|
33
48
|
* })
|
|
34
49
|
*/
|
|
35
50
|
createInvite(request: NizamDashboard.CreateInviteRequest, requestOptions?: InvitesClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Invite>;
|
|
@@ -64,8 +64,23 @@ class InvitesClient {
|
|
|
64
64
|
* await client.invites.createInvite({
|
|
65
65
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
66
66
|
* email: "ali@nizam.ai",
|
|
67
|
+
* role: "admin"
|
|
68
|
+
* })
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.invites.createInvite({
|
|
72
|
+
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
73
|
+
* email: "jordan@example.com",
|
|
67
74
|
* role: "dispatcher",
|
|
68
|
-
* ttl_days:
|
|
75
|
+
* ttl_days: 14
|
|
76
|
+
* })
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* await client.invites.createInvite({
|
|
80
|
+
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
81
|
+
* email: "auditor@partner.example",
|
|
82
|
+
* role: "viewer",
|
|
83
|
+
* ttl_days: 3
|
|
69
84
|
* })
|
|
70
85
|
*/
|
|
71
86
|
createInvite(request, requestOptions) {
|
|
@@ -3,8 +3,23 @@
|
|
|
3
3
|
* {
|
|
4
4
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
5
5
|
* email: "ali@nizam.ai",
|
|
6
|
+
* role: "admin"
|
|
7
|
+
* }
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
12
|
+
* email: "jordan@example.com",
|
|
6
13
|
* role: "dispatcher",
|
|
7
|
-
* ttl_days:
|
|
14
|
+
* ttl_days: 14
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* {
|
|
19
|
+
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
20
|
+
* email: "auditor@partner.example",
|
|
21
|
+
* role: "viewer",
|
|
22
|
+
* ttl_days: 3
|
|
8
23
|
* }
|
|
9
24
|
*/
|
|
10
25
|
export interface CreateInviteRequest {
|
|
@@ -47,6 +47,11 @@ export declare class OrganizationsClient {
|
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
49
|
* await client.organizations.createOrganization({
|
|
50
|
+
* name: "Acme Logistics"
|
|
51
|
+
* })
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* await client.organizations.createOrganization({
|
|
50
55
|
* name: "Acme Logistics",
|
|
51
56
|
* slug: "acme-logistics",
|
|
52
57
|
* primary_domain: "acme.com",
|
|
@@ -114,12 +119,15 @@ export declare class OrganizationsClient {
|
|
|
114
119
|
* @example
|
|
115
120
|
* await client.organizations.updateOrganization({
|
|
116
121
|
* id: "00000000-0000-0000-0000-000000000000",
|
|
117
|
-
* name: "Acme
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
122
|
+
* name: "Acme Freight"
|
|
123
|
+
* })
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* await client.organizations.updateOrganization({
|
|
127
|
+
* id: "00000000-0000-0000-0000-000000000000",
|
|
128
|
+
* business_category: "courier",
|
|
129
|
+
* phone: "+15557654321",
|
|
130
|
+
* timezone: "America/New_York"
|
|
123
131
|
* })
|
|
124
132
|
*/
|
|
125
133
|
updateOrganization(request: NizamDashboard.UpdateOrganizationRequest, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.Organization>;
|
|
@@ -135,6 +135,11 @@ class OrganizationsClient {
|
|
|
135
135
|
*
|
|
136
136
|
* @example
|
|
137
137
|
* await client.organizations.createOrganization({
|
|
138
|
+
* name: "Acme Logistics"
|
|
139
|
+
* })
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* await client.organizations.createOrganization({
|
|
138
143
|
* name: "Acme Logistics",
|
|
139
144
|
* slug: "acme-logistics",
|
|
140
145
|
* primary_domain: "acme.com",
|
|
@@ -329,12 +334,15 @@ class OrganizationsClient {
|
|
|
329
334
|
* @example
|
|
330
335
|
* await client.organizations.updateOrganization({
|
|
331
336
|
* id: "00000000-0000-0000-0000-000000000000",
|
|
332
|
-
* name: "Acme
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
337
|
+
* name: "Acme Freight"
|
|
338
|
+
* })
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* await client.organizations.updateOrganization({
|
|
342
|
+
* id: "00000000-0000-0000-0000-000000000000",
|
|
343
|
+
* business_category: "courier",
|
|
344
|
+
* phone: "+15557654321",
|
|
345
|
+
* timezone: "America/New_York"
|
|
338
346
|
* })
|
|
339
347
|
*/
|
|
340
348
|
updateOrganization(request, requestOptions) {
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* id: "00000000-0000-0000-0000-000000000000",
|
|
5
|
-
* name: "Acme
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* name: "Acme Freight"
|
|
6
|
+
* }
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* {
|
|
10
|
+
* id: "00000000-0000-0000-0000-000000000000",
|
|
11
|
+
* business_category: "courier",
|
|
12
|
+
* phone: "+15557654321",
|
|
13
|
+
* timezone: "America/New_York"
|
|
11
14
|
* }
|
|
12
15
|
*/
|
|
13
16
|
export interface UpdateOrganizationRequest {
|
|
@@ -72,6 +72,11 @@ export declare class UsersClient {
|
|
|
72
72
|
* email: "newhire@acme.example",
|
|
73
73
|
* name: "New Hire"
|
|
74
74
|
* })
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* await client.users.inviteUser({
|
|
78
|
+
* email: "newhire@acme.example"
|
|
79
|
+
* })
|
|
75
80
|
*/
|
|
76
81
|
inviteUser(request: NizamDashboard.InviteUserRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.UserResource>;
|
|
77
82
|
private __inviteUser;
|
|
@@ -202,6 +202,11 @@ class UsersClient {
|
|
|
202
202
|
* email: "newhire@acme.example",
|
|
203
203
|
* name: "New Hire"
|
|
204
204
|
* })
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* await client.users.inviteUser({
|
|
208
|
+
* email: "newhire@acme.example"
|
|
209
|
+
* })
|
|
205
210
|
*/
|
|
206
211
|
inviteUser(request, requestOptions) {
|
|
207
212
|
return core.HttpResponsePromise.fromPromise(this.__inviteUser(request, requestOptions));
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An asset as returned by the list/search endpoint — the asset fields plus relevance metadata when the request was a search.
|
|
3
|
+
*/
|
|
4
|
+
export interface AssetListItem {
|
|
5
|
+
/** Stable UUID. */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Top-level kind. */
|
|
8
|
+
kind?: AssetListItem.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?: AssetListItem.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
|
+
/** Relevance score (descending) when the request carried `q`; 0 for plain listings. Scores are only comparable within a single response. */
|
|
26
|
+
rank?: number | undefined;
|
|
27
|
+
/** Highlighted match fragment when the request carried `q&highlight=true`. Matched terms are wrapped in `<mark>…</mark>`. */
|
|
28
|
+
snippet?: string | undefined;
|
|
29
|
+
/** Object type discriminator (Stripe pattern). */
|
|
30
|
+
object?: AssetListItem.Object_ | undefined;
|
|
31
|
+
}
|
|
32
|
+
export declare namespace AssetListItem {
|
|
33
|
+
/** Top-level kind. */
|
|
34
|
+
const Kind: {
|
|
35
|
+
readonly GroundVehicle: "ground_vehicle";
|
|
36
|
+
readonly AerialVehicle: "aerial_vehicle";
|
|
37
|
+
readonly MarineVehicle: "marine_vehicle";
|
|
38
|
+
readonly Robot: "robot";
|
|
39
|
+
readonly Agv: "agv";
|
|
40
|
+
readonly Trailer: "trailer";
|
|
41
|
+
readonly Container: "container";
|
|
42
|
+
readonly Pallet: "pallet";
|
|
43
|
+
readonly Equipment: "equipment";
|
|
44
|
+
};
|
|
45
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
46
|
+
/** Lifecycle status. */
|
|
47
|
+
const Status: {
|
|
48
|
+
readonly Active: "active";
|
|
49
|
+
readonly Maintenance: "maintenance";
|
|
50
|
+
readonly OutOfService: "out_of_service";
|
|
51
|
+
readonly Retired: "retired";
|
|
52
|
+
readonly Sold: "sold";
|
|
53
|
+
readonly Inactive: "inactive";
|
|
54
|
+
readonly Lost: "lost";
|
|
55
|
+
};
|
|
56
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
57
|
+
/** Object type discriminator (Stripe pattern). */
|
|
58
|
+
const Object_: {
|
|
59
|
+
readonly Asset: "asset";
|
|
60
|
+
};
|
|
61
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
62
|
+
}
|
|
@@ -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.AssetListItem = void 0;
|
|
5
|
+
var AssetListItem;
|
|
6
|
+
(function (AssetListItem) {
|
|
7
|
+
/** Top-level kind. */
|
|
8
|
+
AssetListItem.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
|
+
AssetListItem.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
|
+
AssetListItem.Object_ = {
|
|
31
|
+
Asset: "asset",
|
|
32
|
+
};
|
|
33
|
+
})(AssetListItem || (exports.AssetListItem = AssetListItem = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseAssetListItem {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseAssetListItem.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamDashboard.AssetListItem[] | 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 ListResponseAssetListItem {
|
|
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.ListResponseAssetListItem = void 0;
|
|
5
|
+
var ListResponseAssetListItem;
|
|
6
|
+
(function (ListResponseAssetListItem) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseAssetListItem.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseAssetListItem || (exports.ListResponseAssetListItem = ListResponseAssetListItem = {}));
|
|
@@ -2,6 +2,7 @@ export * from "./ActiveOrganization.js";
|
|
|
2
2
|
export * from "./ActivityResource.js";
|
|
3
3
|
export * from "./ApiFieldError.js";
|
|
4
4
|
export * from "./Asset.js";
|
|
5
|
+
export * from "./AssetListItem.js";
|
|
5
6
|
export * from "./Assignment.js";
|
|
6
7
|
export * from "./BusinessCategory.js";
|
|
7
8
|
export * from "./Country.js";
|
|
@@ -14,6 +15,7 @@ export * from "./InternalUserUpdateRequest.js";
|
|
|
14
15
|
export * from "./Invite.js";
|
|
15
16
|
export * from "./Language.js";
|
|
16
17
|
export * from "./ListResponseActivityResource.js";
|
|
18
|
+
export * from "./ListResponseAssetListItem.js";
|
|
17
19
|
export * from "./ListResponseBusinessCategory.js";
|
|
18
20
|
export * from "./ListResponseCountry.js";
|
|
19
21
|
export * from "./ListResponseCurrency.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -18,6 +18,7 @@ __exportStar(require("./ActiveOrganization.js"), exports);
|
|
|
18
18
|
__exportStar(require("./ActivityResource.js"), exports);
|
|
19
19
|
__exportStar(require("./ApiFieldError.js"), exports);
|
|
20
20
|
__exportStar(require("./Asset.js"), exports);
|
|
21
|
+
__exportStar(require("./AssetListItem.js"), exports);
|
|
21
22
|
__exportStar(require("./Assignment.js"), exports);
|
|
22
23
|
__exportStar(require("./BusinessCategory.js"), exports);
|
|
23
24
|
__exportStar(require("./Country.js"), exports);
|
|
@@ -30,6 +31,7 @@ __exportStar(require("./InternalUserUpdateRequest.js"), exports);
|
|
|
30
31
|
__exportStar(require("./Invite.js"), exports);
|
|
31
32
|
__exportStar(require("./Language.js"), exports);
|
|
32
33
|
__exportStar(require("./ListResponseActivityResource.js"), exports);
|
|
34
|
+
__exportStar(require("./ListResponseAssetListItem.js"), exports);
|
|
33
35
|
__exportStar(require("./ListResponseBusinessCategory.js"), exports);
|
|
34
36
|
__exportStar(require("./ListResponseCountry.js"), exports);
|
|
35
37
|
__exportStar(require("./ListResponseCurrency.js"), exports);
|