@nizam-os/dashboard-sdk 9.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/resources/activity/client/Client.d.ts +1 -1
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/activity/client/requests/ListActivityRequest.d.ts +3 -2
- package/dist/api/resources/activity/index.d.ts +1 -0
- package/dist/api/resources/activity/index.js +1 -0
- package/dist/api/resources/activity/types/ListActivityRequestSortItem.d.ts +5 -0
- package/dist/api/resources/activity/types/ListActivityRequestSortItem.js +8 -0
- package/dist/api/resources/activity/types/index.d.ts +1 -0
- package/dist/api/resources/activity/types/index.js +17 -0
- package/dist/api/resources/assets/client/Client.d.ts +241 -1
- package/dist/api/resources/assets/client/Client.js +754 -7
- package/dist/api/resources/assets/client/requests/ActivateAssetRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/ActivateAssetRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/AllowedTransitionsRequest.d.ts +10 -0
- package/dist/api/resources/assets/client/requests/AllowedTransitionsRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/CreateAssetRequest.d.ts +31 -0
- package/dist/api/resources/assets/client/requests/CreateAssetRequest.js +10 -0
- package/dist/api/resources/assets/client/requests/DeactivateAssetRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/DeactivateAssetRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/DeleteAssetRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/DeleteAssetRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/EnterAssetMaintenanceRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/EnterAssetMaintenanceRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/ExportAssetsRequest.d.ts +44 -0
- package/dist/api/resources/assets/client/requests/ExportAssetsRequest.js +31 -0
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.d.ts +13 -6
- package/dist/api/resources/assets/client/requests/ReportAssetLostRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/ReportAssetLostRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/RetireAssetRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/RetireAssetRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/SellAssetRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/SellAssetRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/TakeAssetOutOfServiceRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/TakeAssetOutOfServiceRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/UpdateAssetRequest.d.ts +36 -0
- package/dist/api/resources/assets/client/requests/UpdateAssetRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +11 -0
- package/dist/api/resources/assets/client/requests/index.js +3 -1
- package/dist/api/resources/assets/index.d.ts +1 -0
- package/dist/api/resources/assets/index.js +1 -0
- package/dist/api/resources/assets/types/ListAssetsRequestKindItem.d.ts +12 -0
- package/dist/api/resources/assets/types/ListAssetsRequestKindItem.js +15 -0
- package/dist/api/resources/assets/types/ListAssetsRequestSortItem.d.ts +25 -0
- package/dist/api/resources/assets/types/ListAssetsRequestSortItem.js +28 -0
- package/dist/api/resources/assets/types/ListAssetsRequestStatusItem.d.ts +10 -0
- package/dist/api/resources/assets/types/ListAssetsRequestStatusItem.js +13 -0
- package/dist/api/resources/assets/types/index.d.ts +3 -0
- package/dist/api/resources/assets/types/index.js +19 -0
- package/dist/api/resources/assignments/client/Client.d.ts +2 -0
- package/dist/api/resources/assignments/client/Client.js +5 -2
- package/dist/api/resources/assignments/client/requests/OpenAssignmentRequest.d.ts +4 -0
- package/dist/api/resources/files/client/Client.d.ts +3 -1
- package/dist/api/resources/files/client/Client.js +11 -6
- package/dist/api/resources/files/client/requests/InitiateFileUploadRequest.d.ts +4 -0
- package/dist/api/resources/files/client/requests/InitiateFileUploadRequest.js +1 -0
- package/dist/api/resources/files/client/requests/ListFilesRequest.d.ts +7 -6
- package/dist/api/resources/files/index.d.ts +1 -0
- package/dist/api/resources/files/index.js +1 -0
- package/dist/api/resources/files/types/ListFilesRequestKindItem.d.ts +11 -0
- package/dist/api/resources/files/types/ListFilesRequestKindItem.js +14 -0
- package/dist/api/resources/files/types/ListFilesRequestSortItem.d.ts +5 -0
- package/dist/api/resources/files/types/ListFilesRequestSortItem.js +8 -0
- package/dist/api/resources/files/types/ListFilesRequestStatusItem.d.ts +6 -0
- package/dist/api/resources/files/types/ListFilesRequestStatusItem.js +9 -0
- package/dist/api/resources/files/types/index.d.ts +3 -0
- package/dist/api/resources/files/types/index.js +19 -0
- package/dist/api/resources/imports/client/Client.d.ts +2 -0
- package/dist/api/resources/imports/client/Client.js +7 -2
- package/dist/api/resources/imports/client/requests/CreateImportRequest.d.ts +3 -0
- package/dist/api/resources/index.d.ts +7 -0
- package/dist/api/resources/index.js +7 -0
- package/dist/api/resources/invites/client/Client.d.ts +5 -0
- package/dist/api/resources/invites/client/Client.js +12 -2
- package/dist/api/resources/invites/client/requests/CreateInviteRequest.d.ts +5 -0
- package/dist/api/resources/jobs/client/Client.d.ts +1 -1
- package/dist/api/resources/jobs/client/Client.js +2 -2
- package/dist/api/resources/jobs/client/requests/ListJobsRequest.d.ts +3 -2
- package/dist/api/resources/jobs/index.d.ts +1 -0
- package/dist/api/resources/jobs/index.js +1 -0
- package/dist/api/resources/jobs/types/ListJobsRequestSortItem.d.ts +5 -0
- package/dist/api/resources/jobs/types/ListJobsRequestSortItem.js +8 -0
- package/dist/api/resources/jobs/types/index.d.ts +1 -0
- package/dist/api/resources/jobs/types/index.js +17 -0
- package/dist/api/resources/notifications/client/Client.d.ts +1 -1
- package/dist/api/resources/notifications/client/Client.js +2 -2
- package/dist/api/resources/notifications/client/requests/ListNotificationsRequest.d.ts +3 -2
- package/dist/api/resources/notifications/index.d.ts +1 -0
- package/dist/api/resources/notifications/index.js +1 -0
- package/dist/api/resources/notifications/types/ListNotificationsRequestSortItem.d.ts +5 -0
- package/dist/api/resources/notifications/types/ListNotificationsRequestSortItem.js +8 -0
- package/dist/api/resources/notifications/types/index.d.ts +1 -0
- package/dist/api/resources/notifications/types/index.js +17 -0
- package/dist/api/resources/operators/client/Client.d.ts +21 -11
- package/dist/api/resources/operators/client/Client.js +25 -12
- package/dist/api/resources/operators/client/requests/CreateOperatorBody.d.ts +37 -0
- package/dist/api/resources/operators/client/requests/CreateOperatorBody.js +3 -0
- package/dist/api/resources/operators/client/requests/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/Client.d.ts +3 -3
- package/dist/api/resources/organizations/client/Client.js +7 -6
- package/dist/api/resources/organizations/client/requests/CreateOrganizationRequest.d.ts +4 -0
- package/dist/api/resources/organizations/client/requests/ListOrganizationsRequest.d.ts +3 -2
- package/dist/api/resources/organizations/index.d.ts +1 -0
- package/dist/api/resources/organizations/index.js +1 -0
- package/dist/api/resources/organizations/types/ListOrganizationsRequestSortItem.d.ts +5 -0
- package/dist/api/resources/organizations/types/ListOrganizationsRequestSortItem.js +8 -0
- package/dist/api/resources/organizations/types/index.d.ts +1 -0
- package/dist/api/resources/organizations/types/index.js +17 -0
- package/dist/api/resources/taskAttempts/client/Client.d.ts +2 -0
- package/dist/api/resources/taskAttempts/client/Client.js +6 -2
- package/dist/api/resources/taskAttempts/client/requests/CaptureTaskAttemptPhotoRequest.d.ts +3 -0
- package/dist/api/resources/users/client/Client.d.ts +4 -1
- package/dist/api/resources/users/client/Client.js +10 -4
- package/dist/api/resources/users/client/requests/InviteUserRequest.d.ts +4 -0
- package/dist/api/resources/users/client/requests/ListUsersRequest.d.ts +3 -2
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +1 -0
- package/dist/api/resources/users/types/ListUsersRequestSortItem.d.ts +7 -0
- package/dist/api/resources/users/types/ListUsersRequestSortItem.js +10 -0
- package/dist/api/resources/users/types/index.d.ts +1 -0
- package/dist/api/resources/users/types/index.js +17 -0
- package/dist/api/types/ActiveOrganization.d.ts +2 -2
- package/dist/api/types/ActivityResource.d.ts +4 -4
- package/dist/api/types/AllowedTransitions.d.ts +28 -0
- package/dist/api/types/AllowedTransitions.js +23 -0
- package/dist/api/types/ApiFieldError.d.ts +1 -1
- package/dist/api/types/Asset.d.ts +26 -4
- package/dist/api/types/Asset.js +13 -0
- package/dist/api/types/AssetListItem.d.ts +11 -5
- package/dist/api/types/Assignment.d.ts +6 -6
- package/dist/api/types/BulkJobSubmission.d.ts +3 -3
- package/dist/api/types/BusinessCategory.d.ts +3 -3
- package/dist/api/types/Country.d.ts +3 -3
- package/dist/api/types/Currency.d.ts +5 -5
- package/dist/api/types/Device.d.ts +21 -6
- package/dist/api/types/Device.js +13 -0
- package/dist/api/types/Devices.d.ts +2 -2
- package/dist/api/types/FileDownloadUrl.d.ts +4 -4
- package/dist/api/types/FileUploadSession.d.ts +12 -11
- package/dist/api/types/FileUploadSession.js +1 -0
- package/dist/api/types/File_.d.ts +14 -13
- package/dist/api/types/File_.js +1 -0
- package/dist/api/types/HeatmapCell.d.ts +4 -4
- package/dist/api/types/ImportError.d.ts +4 -4
- package/dist/api/types/ImportSubmission.d.ts +4 -4
- package/dist/api/types/Invite.d.ts +8 -8
- package/dist/api/types/Job.d.ts +11 -11
- package/dist/api/types/JobSubmission.d.ts +2 -2
- package/dist/api/types/Language.d.ts +4 -4
- package/dist/api/types/Membership.d.ts +3 -3
- package/dist/api/types/MqttToken.d.ts +4 -4
- package/dist/api/types/Notification.d.ts +9 -9
- package/dist/api/types/NotificationCounts.d.ts +5 -5
- package/dist/api/types/NotificationDeadLetter.d.ts +9 -9
- package/dist/api/types/NotificationPreferences.d.ts +2 -2
- package/dist/api/types/NotificationUnreadCount.d.ts +2 -2
- package/dist/api/types/NotificationsArchived.d.ts +2 -2
- package/dist/api/types/NotificationsMarkedRead.d.ts +2 -2
- package/dist/api/types/Operator.d.ts +4 -4
- package/dist/api/types/OperatorPosition.d.ts +5 -5
- package/dist/api/types/Organization.d.ts +7 -7
- package/dist/api/types/Position.d.ts +6 -6
- package/dist/api/types/ProblemDetail.d.ts +1 -1
- package/dist/api/types/RealtimeTicket.d.ts +3 -3
- package/dist/api/types/ReconcileResponse.d.ts +4 -4
- package/dist/api/types/TaskAttemptPhoto.d.ts +7 -7
- package/dist/api/types/Timezone.d.ts +4 -4
- package/dist/api/types/UploadInitiation.d.ts +6 -6
- package/dist/api/types/User.d.ts +5 -5
- package/dist/api/types/UserResource.d.ts +4 -4
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ export declare class FilesClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<FilesClient.Options>;
|
|
12
12
|
constructor(options: FilesClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* The active organization's files ordered by `created_at` descending
|
|
14
|
+
* The active organization's files ordered by `created_at` descending by default. `kind` / `status` accept comma-separated values; `subject_type` + `subject_id` narrow to the files documenting one business entity. Pagination is bidirectional (`starting_after` / `ending_before`).
|
|
15
15
|
*
|
|
16
16
|
* @param {NizamDashboard.ListFilesRequest} request
|
|
17
17
|
* @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -41,6 +41,7 @@ export declare class FilesClient {
|
|
|
41
41
|
* @throws {@link NizamDashboard.BadRequestError}
|
|
42
42
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
43
43
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
44
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
44
45
|
* @throws {@link NizamDashboard.ContentTooLargeError}
|
|
45
46
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
46
47
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
@@ -48,6 +49,7 @@ export declare class FilesClient {
|
|
|
48
49
|
*
|
|
49
50
|
* @example
|
|
50
51
|
* await client.files.initiateFileUpload({
|
|
52
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
51
53
|
* kind: "profile_picture",
|
|
52
54
|
* subject_type: "task_attempt",
|
|
53
55
|
* subject_id: "b3c4d5e6-7f8a-9b0c-1d2e-3f4a5b6c7d8e",
|
|
@@ -47,7 +47,7 @@ class FilesClient {
|
|
|
47
47
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* The active organization's files ordered by `created_at` descending
|
|
50
|
+
* The active organization's files ordered by `created_at` descending by default. `kind` / `status` accept comma-separated values; `subject_type` + `subject_id` narrow to the files documenting one business entity. Pagination is bidirectional (`starting_after` / `ending_before`).
|
|
51
51
|
*
|
|
52
52
|
* @param {NizamDashboard.ListFilesRequest} request
|
|
53
53
|
* @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -72,11 +72,11 @@ class FilesClient {
|
|
|
72
72
|
async __listFiles(request = {}, requestOptions) {
|
|
73
73
|
const { kind, status, subject_type: subjectType, subject_id: subjectId, sort, limit, starting_after: startingAfter, ending_before: endingBefore, } = request;
|
|
74
74
|
const _queryParams = {
|
|
75
|
-
kind,
|
|
76
|
-
status,
|
|
75
|
+
kind: Array.isArray(kind) ? kind.map((item) => item) : kind != null ? kind : undefined,
|
|
76
|
+
status: Array.isArray(status) ? status.map((item) => item) : status != null ? status : undefined,
|
|
77
77
|
subject_type: subjectType,
|
|
78
78
|
subject_id: subjectId,
|
|
79
|
-
sort,
|
|
79
|
+
sort: Array.isArray(sort) ? sort.map((item) => item) : sort != null ? sort : undefined,
|
|
80
80
|
limit,
|
|
81
81
|
starting_after: startingAfter,
|
|
82
82
|
ending_before: endingBefore,
|
|
@@ -134,6 +134,7 @@ class FilesClient {
|
|
|
134
134
|
* @throws {@link NizamDashboard.BadRequestError}
|
|
135
135
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
136
136
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
137
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
137
138
|
* @throws {@link NizamDashboard.ContentTooLargeError}
|
|
138
139
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
139
140
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
@@ -141,6 +142,7 @@ class FilesClient {
|
|
|
141
142
|
*
|
|
142
143
|
* @example
|
|
143
144
|
* await client.files.initiateFileUpload({
|
|
145
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
144
146
|
* kind: "profile_picture",
|
|
145
147
|
* subject_type: "task_attempt",
|
|
146
148
|
* subject_id: "b3c4d5e6-7f8a-9b0c-1d2e-3f4a5b6c7d8e",
|
|
@@ -154,8 +156,9 @@ class FilesClient {
|
|
|
154
156
|
return core.HttpResponsePromise.fromPromise(this.__initiateFileUpload(request, requestOptions));
|
|
155
157
|
}
|
|
156
158
|
async __initiateFileUpload(request, requestOptions) {
|
|
159
|
+
const { "Idempotency-Key": idempotencyKey, ..._body } = request;
|
|
157
160
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
158
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
161
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions?.headers);
|
|
159
162
|
const _response = await core.fetcher({
|
|
160
163
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
161
164
|
(await core.Supplier.get(this._options.environment)) ??
|
|
@@ -165,7 +168,7 @@ class FilesClient {
|
|
|
165
168
|
contentType: "application/json",
|
|
166
169
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
167
170
|
requestType: "json",
|
|
168
|
-
body:
|
|
171
|
+
body: _body,
|
|
169
172
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
170
173
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
171
174
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -183,6 +186,8 @@ class FilesClient {
|
|
|
183
186
|
throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
184
187
|
case 403:
|
|
185
188
|
throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
189
|
+
case 409:
|
|
190
|
+
throw new NizamDashboard.ConflictError(_response.error.body, _response.rawResponse);
|
|
186
191
|
case 413:
|
|
187
192
|
throw new NizamDashboard.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
188
193
|
case 422:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
4
5
|
* kind: "profile_picture",
|
|
5
6
|
* subject_type: "task_attempt",
|
|
6
7
|
* subject_id: "b3c4d5e6-7f8a-9b0c-1d2e-3f4a5b6c7d8e",
|
|
@@ -11,6 +12,8 @@
|
|
|
11
12
|
* }
|
|
12
13
|
*/
|
|
13
14
|
export interface InitiateFileUploadRequest {
|
|
15
|
+
/** Optional. Supply a UUID (canonical 8-4-4-4-12 form; lowercase v4 recommended) to make this operation idempotent: the same key on a retry replays the original outcome instead of creating a second resource. 2xx successes and deliberate 4xx domain rejections are cached and replayed for 24h when the request body matches; transient 5xx responses are never cached, so a retry with the same key re-executes. A malformed key is rejected with 400 `idempotency.invalid_key`; reusing a key with a different request body is 409 `idempotency.key_conflict`; a key still in flight is 409 `idempotency.in_progress`. Omit the header and the operation behaves like any other write. */
|
|
16
|
+
"Idempotency-Key"?: string;
|
|
14
17
|
/** What the bytes are for the platform — fixes the policy applied to them. */
|
|
15
18
|
kind: InitiateFileUploadRequest.Kind;
|
|
16
19
|
/** Type of the business entity this file documents (optional at upload time; can also be attached later). */
|
|
@@ -36,6 +39,7 @@ export declare namespace InitiateFileUploadRequest {
|
|
|
36
39
|
readonly ImportReport: "import_report";
|
|
37
40
|
readonly SignedDocument: "signed_document";
|
|
38
41
|
readonly ProductImage: "product_image";
|
|
42
|
+
readonly DataExport: "data_export";
|
|
39
43
|
};
|
|
40
44
|
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
41
45
|
}
|
|
@@ -13,5 +13,6 @@ var InitiateFileUploadRequest;
|
|
|
13
13
|
ImportReport: "import_report",
|
|
14
14
|
SignedDocument: "signed_document",
|
|
15
15
|
ProductImage: "product_image",
|
|
16
|
+
DataExport: "data_export",
|
|
16
17
|
};
|
|
17
18
|
})(InitiateFileUploadRequest || (exports.InitiateFileUploadRequest = InitiateFileUploadRequest = {}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -8,16 +9,16 @@
|
|
|
8
9
|
* }
|
|
9
10
|
*/
|
|
10
11
|
export interface ListFilesRequest {
|
|
11
|
-
/** Filter by file kind. Comma-separated;
|
|
12
|
-
kind?:
|
|
13
|
-
/** Filter by lifecycle status. Comma-separated;
|
|
14
|
-
status?:
|
|
12
|
+
/** Filter by file kind. Comma-separated; matched case-insensitively. */
|
|
13
|
+
kind?: NizamDashboard.ListFilesRequestKindItem | NizamDashboard.ListFilesRequestKindItem[];
|
|
14
|
+
/** Filter by lifecycle status. Comma-separated; matched case-insensitively. */
|
|
15
|
+
status?: NizamDashboard.ListFilesRequestStatusItem | NizamDashboard.ListFilesRequestStatusItem[];
|
|
15
16
|
/** Filter by the documented entity's type (pairs with `subject_id`). */
|
|
16
17
|
subject_type?: string;
|
|
17
18
|
/** Filter by the documented entity's id (requires `subject_type`). */
|
|
18
19
|
subject_id?: string;
|
|
19
|
-
/** Sort order. Allowed fields: `created_at`.
|
|
20
|
-
sort?:
|
|
20
|
+
/** Sort order. Allowed fields: `created_at`. Append `:asc` or `:desc` to each field (direction required, e.g. `created_at:desc`), comma-separated for multi-sort; unknown fields or directions are rejected with `400 validation_failed`. */
|
|
21
|
+
sort?: NizamDashboard.ListFilesRequestSortItem | NizamDashboard.ListFilesRequestSortItem[];
|
|
21
22
|
/** Page size. Default 20, maximum 100. Out-of-range values are silently clamped; the response body's `limit` field reflects what was applied. */
|
|
22
23
|
limit?: number;
|
|
23
24
|
/** Opaque cursor — return the page starting strictly after this entity in the sort order. Mutually exclusive with `ending_before`. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ListFilesRequestKindItem: {
|
|
2
|
+
readonly ProfilePicture: "profile_picture";
|
|
3
|
+
readonly ChatAttachment: "chat_attachment";
|
|
4
|
+
readonly TaskPodPhoto: "task_pod_photo";
|
|
5
|
+
readonly ImportSource: "import_source";
|
|
6
|
+
readonly ImportReport: "import_report";
|
|
7
|
+
readonly SignedDocument: "signed_document";
|
|
8
|
+
readonly ProductImage: "product_image";
|
|
9
|
+
readonly DataExport: "data_export";
|
|
10
|
+
};
|
|
11
|
+
export type ListFilesRequestKindItem = (typeof ListFilesRequestKindItem)[keyof typeof ListFilesRequestKindItem];
|
|
@@ -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.ListFilesRequestKindItem = void 0;
|
|
5
|
+
exports.ListFilesRequestKindItem = {
|
|
6
|
+
ProfilePicture: "profile_picture",
|
|
7
|
+
ChatAttachment: "chat_attachment",
|
|
8
|
+
TaskPodPhoto: "task_pod_photo",
|
|
9
|
+
ImportSource: "import_source",
|
|
10
|
+
ImportReport: "import_report",
|
|
11
|
+
SignedDocument: "signed_document",
|
|
12
|
+
ProductImage: "product_image",
|
|
13
|
+
DataExport: "data_export",
|
|
14
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListFilesRequestSortItem = void 0;
|
|
5
|
+
exports.ListFilesRequestSortItem = {
|
|
6
|
+
CreatedAtAsc: "created_at:asc",
|
|
7
|
+
CreatedAtDesc: "created_at:desc",
|
|
8
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const ListFilesRequestStatusItem: {
|
|
2
|
+
readonly Active: "active";
|
|
3
|
+
readonly Quarantined: "quarantined";
|
|
4
|
+
readonly Deleted: "deleted";
|
|
5
|
+
};
|
|
6
|
+
export type ListFilesRequestStatusItem = (typeof ListFilesRequestStatusItem)[keyof typeof ListFilesRequestStatusItem];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListFilesRequestStatusItem = void 0;
|
|
5
|
+
exports.ListFilesRequestStatusItem = {
|
|
6
|
+
Active: "active",
|
|
7
|
+
Quarantined: "quarantined",
|
|
8
|
+
Deleted: "deleted",
|
|
9
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./ListFilesRequestKindItem.js"), exports);
|
|
18
|
+
__exportStar(require("./ListFilesRequestSortItem.js"), exports);
|
|
19
|
+
__exportStar(require("./ListFilesRequestStatusItem.js"), exports);
|
|
@@ -19,6 +19,7 @@ export declare class ImportsClient {
|
|
|
19
19
|
* @throws {@link NizamDashboard.BadRequestError}
|
|
20
20
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
21
21
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
22
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
22
23
|
* @throws {@link NizamDashboard.ContentTooLargeError}
|
|
23
24
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
24
25
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
@@ -26,6 +27,7 @@ export declare class ImportsClient {
|
|
|
26
27
|
*
|
|
27
28
|
* @example
|
|
28
29
|
* await client.imports.createImport({
|
|
30
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
29
31
|
* kind: "import_fleet_assets_xlsx",
|
|
30
32
|
* filename: "fleet-assets.xlsx",
|
|
31
33
|
* content_type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -55,6 +55,7 @@ class ImportsClient {
|
|
|
55
55
|
* @throws {@link NizamDashboard.BadRequestError}
|
|
56
56
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
57
57
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
58
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
58
59
|
* @throws {@link NizamDashboard.ContentTooLargeError}
|
|
59
60
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
60
61
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
@@ -62,6 +63,7 @@ class ImportsClient {
|
|
|
62
63
|
*
|
|
63
64
|
* @example
|
|
64
65
|
* await client.imports.createImport({
|
|
66
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
65
67
|
* kind: "import_fleet_assets_xlsx",
|
|
66
68
|
* filename: "fleet-assets.xlsx",
|
|
67
69
|
* content_type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -73,8 +75,9 @@ class ImportsClient {
|
|
|
73
75
|
return core.HttpResponsePromise.fromPromise(this.__createImport(request, requestOptions));
|
|
74
76
|
}
|
|
75
77
|
async __createImport(request, requestOptions) {
|
|
78
|
+
const { "Idempotency-Key": idempotencyKey, ..._body } = request;
|
|
76
79
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
77
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
80
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions?.headers);
|
|
78
81
|
const _response = await core.fetcher({
|
|
79
82
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
80
83
|
(await core.Supplier.get(this._options.environment)) ??
|
|
@@ -84,7 +87,7 @@ class ImportsClient {
|
|
|
84
87
|
contentType: "application/json",
|
|
85
88
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
86
89
|
requestType: "json",
|
|
87
|
-
body:
|
|
90
|
+
body: _body,
|
|
88
91
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
89
92
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
90
93
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -102,6 +105,8 @@ class ImportsClient {
|
|
|
102
105
|
throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
103
106
|
case 403:
|
|
104
107
|
throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
108
|
+
case 409:
|
|
109
|
+
throw new NizamDashboard.ConflictError(_response.error.body, _response.rawResponse);
|
|
105
110
|
case 413:
|
|
106
111
|
throw new NizamDashboard.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
107
112
|
case 422:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
4
5
|
* kind: "import_fleet_assets_xlsx",
|
|
5
6
|
* filename: "fleet-assets.xlsx",
|
|
6
7
|
* content_type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
@@ -9,6 +10,8 @@
|
|
|
9
10
|
* }
|
|
10
11
|
*/
|
|
11
12
|
export interface CreateImportRequest {
|
|
13
|
+
/** Optional. Supply a UUID (canonical 8-4-4-4-12 form; lowercase v4 recommended) to make this operation idempotent: the same key on a retry replays the original outcome instead of creating a second resource. 2xx successes and deliberate 4xx domain rejections are cached and replayed for 24h when the request body matches; transient 5xx responses are never cached, so a retry with the same key re-executes. A malformed key is rejected with 400 `idempotency.invalid_key`; reusing a key with a different request body is 409 `idempotency.key_conflict`; a key still in flight is 409 `idempotency.in_progress`. Omit the header and the operation behaves like any other write. */
|
|
14
|
+
"Idempotency-Key"?: string;
|
|
12
15
|
/** The import kind to run (lowercase). */
|
|
13
16
|
kind: string;
|
|
14
17
|
/** Original filename of the source file. */
|
|
@@ -2,20 +2,24 @@ export * from "./activeOrganization/client/requests/index.js";
|
|
|
2
2
|
export * as activeOrganization from "./activeOrganization/index.js";
|
|
3
3
|
export * from "./activity/client/requests/index.js";
|
|
4
4
|
export * as activity from "./activity/index.js";
|
|
5
|
+
export * from "./activity/types/index.js";
|
|
5
6
|
export * from "./assets/client/requests/index.js";
|
|
6
7
|
export * as assets from "./assets/index.js";
|
|
8
|
+
export * from "./assets/types/index.js";
|
|
7
9
|
export * from "./assignments/client/requests/index.js";
|
|
8
10
|
export * as assignments from "./assignments/index.js";
|
|
9
11
|
export * from "./devices/client/requests/index.js";
|
|
10
12
|
export * as devices from "./devices/index.js";
|
|
11
13
|
export * from "./files/client/requests/index.js";
|
|
12
14
|
export * as files from "./files/index.js";
|
|
15
|
+
export * from "./files/types/index.js";
|
|
13
16
|
export * from "./imports/client/requests/index.js";
|
|
14
17
|
export * as imports from "./imports/index.js";
|
|
15
18
|
export * from "./invites/client/requests/index.js";
|
|
16
19
|
export * as invites from "./invites/index.js";
|
|
17
20
|
export * from "./jobs/client/requests/index.js";
|
|
18
21
|
export * as jobs from "./jobs/index.js";
|
|
22
|
+
export * from "./jobs/types/index.js";
|
|
19
23
|
export * as lookups from "./lookups/index.js";
|
|
20
24
|
export * from "./memberships/client/requests/index.js";
|
|
21
25
|
export * as memberships from "./memberships/index.js";
|
|
@@ -23,10 +27,12 @@ export * from "./notificationPreferences/client/requests/index.js";
|
|
|
23
27
|
export * as notificationPreferences from "./notificationPreferences/index.js";
|
|
24
28
|
export * from "./notifications/client/requests/index.js";
|
|
25
29
|
export * as notifications from "./notifications/index.js";
|
|
30
|
+
export * from "./notifications/types/index.js";
|
|
26
31
|
export * from "./operators/client/requests/index.js";
|
|
27
32
|
export * as operators from "./operators/index.js";
|
|
28
33
|
export * from "./organizations/client/requests/index.js";
|
|
29
34
|
export * as organizations from "./organizations/index.js";
|
|
35
|
+
export * from "./organizations/types/index.js";
|
|
30
36
|
export * from "./positions/client/requests/index.js";
|
|
31
37
|
export * as positions from "./positions/index.js";
|
|
32
38
|
export * as realtime from "./realtime/index.js";
|
|
@@ -34,3 +40,4 @@ export * from "./taskAttempts/client/requests/index.js";
|
|
|
34
40
|
export * as taskAttempts from "./taskAttempts/index.js";
|
|
35
41
|
export * from "./users/client/requests/index.js";
|
|
36
42
|
export * as users from "./users/index.js";
|
|
43
|
+
export * from "./users/types/index.js";
|
|
@@ -41,20 +41,24 @@ __exportStar(require("./activeOrganization/client/requests/index.js"), exports);
|
|
|
41
41
|
exports.activeOrganization = __importStar(require("./activeOrganization/index.js"));
|
|
42
42
|
__exportStar(require("./activity/client/requests/index.js"), exports);
|
|
43
43
|
exports.activity = __importStar(require("./activity/index.js"));
|
|
44
|
+
__exportStar(require("./activity/types/index.js"), exports);
|
|
44
45
|
__exportStar(require("./assets/client/requests/index.js"), exports);
|
|
45
46
|
exports.assets = __importStar(require("./assets/index.js"));
|
|
47
|
+
__exportStar(require("./assets/types/index.js"), exports);
|
|
46
48
|
__exportStar(require("./assignments/client/requests/index.js"), exports);
|
|
47
49
|
exports.assignments = __importStar(require("./assignments/index.js"));
|
|
48
50
|
__exportStar(require("./devices/client/requests/index.js"), exports);
|
|
49
51
|
exports.devices = __importStar(require("./devices/index.js"));
|
|
50
52
|
__exportStar(require("./files/client/requests/index.js"), exports);
|
|
51
53
|
exports.files = __importStar(require("./files/index.js"));
|
|
54
|
+
__exportStar(require("./files/types/index.js"), exports);
|
|
52
55
|
__exportStar(require("./imports/client/requests/index.js"), exports);
|
|
53
56
|
exports.imports = __importStar(require("./imports/index.js"));
|
|
54
57
|
__exportStar(require("./invites/client/requests/index.js"), exports);
|
|
55
58
|
exports.invites = __importStar(require("./invites/index.js"));
|
|
56
59
|
__exportStar(require("./jobs/client/requests/index.js"), exports);
|
|
57
60
|
exports.jobs = __importStar(require("./jobs/index.js"));
|
|
61
|
+
__exportStar(require("./jobs/types/index.js"), exports);
|
|
58
62
|
exports.lookups = __importStar(require("./lookups/index.js"));
|
|
59
63
|
__exportStar(require("./memberships/client/requests/index.js"), exports);
|
|
60
64
|
exports.memberships = __importStar(require("./memberships/index.js"));
|
|
@@ -62,10 +66,12 @@ __exportStar(require("./notificationPreferences/client/requests/index.js"), expo
|
|
|
62
66
|
exports.notificationPreferences = __importStar(require("./notificationPreferences/index.js"));
|
|
63
67
|
__exportStar(require("./notifications/client/requests/index.js"), exports);
|
|
64
68
|
exports.notifications = __importStar(require("./notifications/index.js"));
|
|
69
|
+
__exportStar(require("./notifications/types/index.js"), exports);
|
|
65
70
|
__exportStar(require("./operators/client/requests/index.js"), exports);
|
|
66
71
|
exports.operators = __importStar(require("./operators/index.js"));
|
|
67
72
|
__exportStar(require("./organizations/client/requests/index.js"), exports);
|
|
68
73
|
exports.organizations = __importStar(require("./organizations/index.js"));
|
|
74
|
+
__exportStar(require("./organizations/types/index.js"), exports);
|
|
69
75
|
__exportStar(require("./positions/client/requests/index.js"), exports);
|
|
70
76
|
exports.positions = __importStar(require("./positions/index.js"));
|
|
71
77
|
exports.realtime = __importStar(require("./realtime/index.js"));
|
|
@@ -73,3 +79,4 @@ __exportStar(require("./taskAttempts/client/requests/index.js"), exports);
|
|
|
73
79
|
exports.taskAttempts = __importStar(require("./taskAttempts/index.js"));
|
|
74
80
|
__exportStar(require("./users/client/requests/index.js"), exports);
|
|
75
81
|
exports.users = __importStar(require("./users/index.js"));
|
|
82
|
+
__exportStar(require("./users/types/index.js"), exports);
|
|
@@ -19,14 +19,17 @@ export declare class InvitesClient {
|
|
|
19
19
|
* @param {NizamDashboard.CreateInviteRequest} request
|
|
20
20
|
* @param {InvitesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
21
|
*
|
|
22
|
+
* @throws {@link NizamDashboard.BadRequestError}
|
|
22
23
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
23
24
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
25
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
24
26
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
25
27
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
26
28
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
27
29
|
*
|
|
28
30
|
* @example
|
|
29
31
|
* await client.invites.createInvite({
|
|
32
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
30
33
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
31
34
|
* email: "ali@nizam.ai",
|
|
32
35
|
* role: "admin"
|
|
@@ -34,6 +37,7 @@ export declare class InvitesClient {
|
|
|
34
37
|
*
|
|
35
38
|
* @example
|
|
36
39
|
* await client.invites.createInvite({
|
|
40
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
37
41
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
38
42
|
* email: "jordan@example.com",
|
|
39
43
|
* role: "dispatcher",
|
|
@@ -42,6 +46,7 @@ export declare class InvitesClient {
|
|
|
42
46
|
*
|
|
43
47
|
* @example
|
|
44
48
|
* await client.invites.createInvite({
|
|
49
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
45
50
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
46
51
|
* email: "auditor@partner.example",
|
|
47
52
|
* role: "viewer",
|
|
@@ -55,14 +55,17 @@ class InvitesClient {
|
|
|
55
55
|
* @param {NizamDashboard.CreateInviteRequest} request
|
|
56
56
|
* @param {InvitesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
57
|
*
|
|
58
|
+
* @throws {@link NizamDashboard.BadRequestError}
|
|
58
59
|
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
59
60
|
* @throws {@link NizamDashboard.ForbiddenError}
|
|
61
|
+
* @throws {@link NizamDashboard.ConflictError}
|
|
60
62
|
* @throws {@link NizamDashboard.UnprocessableEntityError}
|
|
61
63
|
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
62
64
|
* @throws {@link NizamDashboard.InternalServerError}
|
|
63
65
|
*
|
|
64
66
|
* @example
|
|
65
67
|
* await client.invites.createInvite({
|
|
68
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
66
69
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
67
70
|
* email: "ali@nizam.ai",
|
|
68
71
|
* role: "admin"
|
|
@@ -70,6 +73,7 @@ class InvitesClient {
|
|
|
70
73
|
*
|
|
71
74
|
* @example
|
|
72
75
|
* await client.invites.createInvite({
|
|
76
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
73
77
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
74
78
|
* email: "jordan@example.com",
|
|
75
79
|
* role: "dispatcher",
|
|
@@ -78,6 +82,7 @@ class InvitesClient {
|
|
|
78
82
|
*
|
|
79
83
|
* @example
|
|
80
84
|
* await client.invites.createInvite({
|
|
85
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
81
86
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
82
87
|
* email: "auditor@partner.example",
|
|
83
88
|
* role: "viewer",
|
|
@@ -88,8 +93,9 @@ class InvitesClient {
|
|
|
88
93
|
return core.HttpResponsePromise.fromPromise(this.__createInvite(request, requestOptions));
|
|
89
94
|
}
|
|
90
95
|
async __createInvite(request, requestOptions) {
|
|
96
|
+
const { "Idempotency-Key": idempotencyKey, ..._body } = request;
|
|
91
97
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
92
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
98
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions?.headers);
|
|
93
99
|
const _response = await core.fetcher({
|
|
94
100
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
95
101
|
(await core.Supplier.get(this._options.environment)) ??
|
|
@@ -99,7 +105,7 @@ class InvitesClient {
|
|
|
99
105
|
contentType: "application/json",
|
|
100
106
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
101
107
|
requestType: "json",
|
|
102
|
-
body:
|
|
108
|
+
body: _body,
|
|
103
109
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
104
110
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
105
111
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -111,10 +117,14 @@ class InvitesClient {
|
|
|
111
117
|
}
|
|
112
118
|
if (_response.error.reason === "status-code") {
|
|
113
119
|
switch (_response.error.statusCode) {
|
|
120
|
+
case 400:
|
|
121
|
+
throw new NizamDashboard.BadRequestError(_response.error.body, _response.rawResponse);
|
|
114
122
|
case 401:
|
|
115
123
|
throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
116
124
|
case 403:
|
|
117
125
|
throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 409:
|
|
127
|
+
throw new NizamDashboard.ConflictError(_response.error.body, _response.rawResponse);
|
|
118
128
|
case 422:
|
|
119
129
|
throw new NizamDashboard.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
120
130
|
case 429:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
4
5
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
5
6
|
* email: "ali@nizam.ai",
|
|
6
7
|
* role: "admin"
|
|
@@ -8,6 +9,7 @@
|
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
11
|
* {
|
|
12
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
11
13
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
12
14
|
* email: "jordan@example.com",
|
|
13
15
|
* role: "dispatcher",
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
*
|
|
17
19
|
* @example
|
|
18
20
|
* {
|
|
21
|
+
* "Idempotency-Key": "9f1e6d2a-7c3b-4e5f-8a91-0b2c3d4e5f60",
|
|
19
22
|
* organization_id: "8f55f0eb-7d3a-4f2c-9c8d-a1b2c3d4e5f6",
|
|
20
23
|
* email: "auditor@partner.example",
|
|
21
24
|
* role: "viewer",
|
|
@@ -23,6 +26,8 @@
|
|
|
23
26
|
* }
|
|
24
27
|
*/
|
|
25
28
|
export interface CreateInviteRequest {
|
|
29
|
+
/** Optional. Supply a UUID (canonical 8-4-4-4-12 form; lowercase v4 recommended) to make this operation idempotent: the same key on a retry replays the original outcome instead of creating a second resource. 2xx successes and deliberate 4xx domain rejections are cached and replayed for 24h when the request body matches; transient 5xx responses are never cached, so a retry with the same key re-executes. A malformed key is rejected with 400 `idempotency.invalid_key`; reusing a key with a different request body is 409 `idempotency.key_conflict`; a key still in flight is 409 `idempotency.in_progress`. Omit the header and the operation behaves like any other write. */
|
|
30
|
+
"Idempotency-Key"?: string;
|
|
26
31
|
/** Organization the invite is for. */
|
|
27
32
|
organization_id: string;
|
|
28
33
|
/** Recipient email. */
|
|
@@ -14,7 +14,7 @@ export declare class JobsClient {
|
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<JobsClient.Options>;
|
|
15
15
|
constructor(options: JobsClient.Options);
|
|
16
16
|
/**
|
|
17
|
-
* The active organization's jobs ordered by `created_at` descending
|
|
17
|
+
* The active organization's jobs ordered by `created_at` descending by default. Org-scoped: every member sees the org's backlog. `kind` / `status` accept comma-separated values. Pagination is bidirectional (`starting_after` / `ending_before`); cursors are bound to the sort direction that minted them.
|
|
18
18
|
*
|
|
19
19
|
* @param {NizamDashboard.ListJobsRequest} request
|
|
20
20
|
* @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -50,7 +50,7 @@ class JobsClient {
|
|
|
50
50
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* The active organization's jobs ordered by `created_at` descending
|
|
53
|
+
* The active organization's jobs ordered by `created_at` descending by default. Org-scoped: every member sees the org's backlog. `kind` / `status` accept comma-separated values. Pagination is bidirectional (`starting_after` / `ending_before`); cursors are bound to the sort direction that minted them.
|
|
54
54
|
*
|
|
55
55
|
* @param {NizamDashboard.ListJobsRequest} request
|
|
56
56
|
* @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -75,7 +75,7 @@ class JobsClient {
|
|
|
75
75
|
const _queryParams = {
|
|
76
76
|
kind,
|
|
77
77
|
status,
|
|
78
|
-
sort,
|
|
78
|
+
sort: Array.isArray(sort) ? sort.map((item) => item) : sort != null ? sort : undefined,
|
|
79
79
|
limit,
|
|
80
80
|
starting_after: startingAfter,
|
|
81
81
|
ending_before: endingBefore,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -10,8 +11,8 @@ export interface ListJobsRequest {
|
|
|
10
11
|
kind?: string | string[];
|
|
11
12
|
/** Filter by lifecycle status. Comma-separated; values: `pending`, `running`, `cancelling`, `completed`, `failed`, `cancelled`. */
|
|
12
13
|
status?: string | string[];
|
|
13
|
-
/** Sort order. Allowed fields: `created_at`.
|
|
14
|
-
sort?:
|
|
14
|
+
/** Sort order. Allowed fields: `created_at`. Append `:asc` or `:desc` to each field (direction required, e.g. `created_at:desc`), comma-separated for multi-sort; unknown fields or directions are rejected with `400 validation_failed`. */
|
|
15
|
+
sort?: NizamDashboard.ListJobsRequestSortItem | NizamDashboard.ListJobsRequestSortItem[];
|
|
15
16
|
/** Page size. Default 20, maximum 100. Out-of-range values are silently clamped; the response body's `limit` field reflects what was applied. */
|
|
16
17
|
limit?: number;
|
|
17
18
|
/** Opaque cursor — return the page starting strictly after this entity in the sort order. Mutually exclusive with `ending_before`. */
|