@nizam-os/customer-sdk 2.4.3 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +10 -6
- package/dist/api/errors/BadRequestError.d.ts +6 -0
- package/dist/api/errors/BadRequestError.js +54 -0
- package/dist/api/errors/ContentTooLargeError.d.ts +6 -0
- package/dist/api/errors/ContentTooLargeError.js +54 -0
- package/dist/api/errors/GoneError.d.ts +6 -0
- package/dist/api/errors/GoneError.js +54 -0
- package/dist/api/errors/NotFoundError.d.ts +6 -0
- package/dist/api/errors/NotFoundError.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 +5 -0
- package/dist/api/errors/index.js +5 -0
- package/dist/api/resources/files/client/Client.d.ts +188 -0
- package/dist/api/resources/files/client/Client.js +608 -0
- package/dist/api/resources/files/client/index.d.ts +1 -0
- package/dist/api/resources/files/client/index.js +17 -0
- package/dist/api/resources/files/client/requests/CancelFileUploadRequest.d.ts +9 -0
- package/dist/api/resources/files/client/requests/CancelFileUploadRequest.js +3 -0
- package/dist/api/resources/files/client/requests/CompleteFileUploadRequest.d.ts +15 -0
- package/dist/api/resources/files/client/requests/CompleteFileUploadRequest.js +3 -0
- package/dist/api/resources/files/client/requests/CreateFileDownloadUrlRequest.d.ts +9 -0
- package/dist/api/resources/files/client/requests/CreateFileDownloadUrlRequest.js +3 -0
- package/dist/api/resources/files/client/requests/DeleteFileRequest.d.ts +9 -0
- package/dist/api/resources/files/client/requests/DeleteFileRequest.js +3 -0
- package/dist/api/resources/files/client/requests/GetFileRequest.d.ts +9 -0
- package/dist/api/resources/files/client/requests/GetFileRequest.js +3 -0
- package/dist/api/resources/files/client/requests/InitiateFileUploadRequest.d.ts +41 -0
- package/dist/api/resources/files/client/requests/InitiateFileUploadRequest.js +17 -0
- package/dist/api/resources/files/client/requests/ListFilesRequest.d.ts +27 -0
- package/dist/api/resources/files/client/requests/ListFilesRequest.js +3 -0
- package/dist/api/resources/files/client/requests/ResumeFileUploadRequest.d.ts +9 -0
- package/dist/api/resources/files/client/requests/ResumeFileUploadRequest.js +3 -0
- package/dist/api/resources/files/client/requests/index.d.ts +8 -0
- package/dist/api/resources/files/client/requests/index.js +5 -0
- package/dist/api/resources/files/exports.d.ts +2 -0
- package/dist/api/resources/files/exports.js +21 -0
- package/dist/api/resources/files/index.d.ts +1 -0
- package/dist/api/resources/files/index.js +17 -0
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +7 -1
- package/dist/api/resources/users/client/Client.d.ts +43 -0
- package/dist/api/resources/users/client/Client.js +142 -0
- package/dist/api/resources/users/client/index.d.ts +1 -1
- package/dist/api/resources/users/client/index.js +15 -0
- package/dist/api/resources/users/client/requests/GetUserProfilePictureRequest.d.ts +11 -0
- package/dist/api/resources/users/client/requests/GetUserProfilePictureRequest.js +3 -0
- package/dist/api/resources/users/client/requests/InitiateProfilePictureUploadRequest.d.ts +19 -0
- package/dist/api/resources/users/client/requests/InitiateProfilePictureUploadRequest.js +3 -0
- package/dist/api/resources/users/client/requests/index.d.ts +2 -0
- package/dist/api/resources/users/client/requests/index.js +2 -0
- package/dist/api/types/CaptureTaskAttemptPhotoRequest.d.ts +37 -0
- package/dist/api/types/CaptureTaskAttemptPhotoRequest.js +20 -0
- package/dist/api/types/FileDownloadUrl.d.ts +16 -0
- package/dist/api/types/FileDownloadUrl.js +10 -0
- package/dist/api/types/FileUploadPart.d.ts +13 -0
- package/dist/api/types/FileUploadPart.js +3 -0
- package/dist/api/types/FileUploadPartReport.d.ts +9 -0
- package/dist/api/types/FileUploadPartReport.js +3 -0
- package/dist/api/types/FileUploadSession.d.ts +51 -0
- package/dist/api/types/FileUploadSession.js +28 -0
- package/dist/api/types/File_.d.ts +86 -0
- package/dist/api/types/File_.js +40 -0
- package/dist/api/types/Job.d.ts +2 -0
- package/dist/api/types/Job.js +2 -0
- package/dist/api/types/ListResponseFile.d.ts +27 -0
- package/dist/api/types/ListResponseFile.js +11 -0
- package/dist/api/types/TaskAttemptPhoto.d.ts +30 -0
- package/dist/api/types/TaskAttemptPhoto.js +10 -0
- package/dist/api/types/TaskAttemptPhotoThumbnail.d.ts +9 -0
- package/dist/api/types/TaskAttemptPhotoThumbnail.js +3 -0
- package/dist/api/types/UploadInitiation.d.ts +22 -0
- package/dist/api/types/UploadInitiation.js +10 -0
- package/dist/api/types/UploadInitiationPart.d.ts +13 -0
- package/dist/api/types/UploadInitiationPart.js +3 -0
- package/dist/api/types/User.d.ts +2 -0
- package/dist/api/types/index.d.ts +11 -0
- package/dist/api/types/index.js +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The storage ETag received for one uploaded part.
|
|
3
|
+
*/
|
|
4
|
+
export interface FileUploadPartReport {
|
|
5
|
+
/** 1-based part number from the initiation layout. */
|
|
6
|
+
part_number?: number | undefined;
|
|
7
|
+
/** The ETag header value returned by the part's PUT (quotes optional). */
|
|
8
|
+
etag: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type * as NizamCustomer from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A resumable multipart upload in flight. The browser PUTs each part directly to the presigned URL (echoing the part's `headers` verbatim), persists the returned ETags, and completes the session with the full part list. `file_id` is the id the finished file WILL carry — safe to build optimistic UI against.
|
|
4
|
+
*/
|
|
5
|
+
export interface FileUploadSession {
|
|
6
|
+
/** Session id — the handle for resume / complete / cancel. */
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
/** Pre-reserved id of the file this upload will become. */
|
|
9
|
+
file_id?: string | undefined;
|
|
10
|
+
/** The kind declared at initiation. */
|
|
11
|
+
kind?: FileUploadSession.Kind | undefined;
|
|
12
|
+
/** Session lifecycle. */
|
|
13
|
+
status?: FileUploadSession.Status | undefined;
|
|
14
|
+
/** Nominal part size; every part except the last must be exactly this size. */
|
|
15
|
+
part_size_bytes?: number | undefined;
|
|
16
|
+
/** Total parts in the layout. */
|
|
17
|
+
part_count?: number | undefined;
|
|
18
|
+
/** Bytes confirmed so far (client-reported, re-verified at completion). */
|
|
19
|
+
bytes_uploaded?: number | undefined;
|
|
20
|
+
completed_part_numbers?: number[] | undefined;
|
|
21
|
+
parts?: NizamCustomer.FileUploadPart[] | undefined;
|
|
22
|
+
/** Deadline: the session expires and is swept if not completed by then. */
|
|
23
|
+
expires_at?: string | undefined;
|
|
24
|
+
object?: FileUploadSession.Object_ | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace FileUploadSession {
|
|
27
|
+
/** The kind declared at initiation. */
|
|
28
|
+
const Kind: {
|
|
29
|
+
readonly ProfilePicture: "profile_picture";
|
|
30
|
+
readonly ChatAttachment: "chat_attachment";
|
|
31
|
+
readonly TaskPodPhoto: "task_pod_photo";
|
|
32
|
+
readonly ImportSource: "import_source";
|
|
33
|
+
readonly ImportReport: "import_report";
|
|
34
|
+
readonly SignedDocument: "signed_document";
|
|
35
|
+
readonly ProductImage: "product_image";
|
|
36
|
+
};
|
|
37
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
38
|
+
/** Session lifecycle. */
|
|
39
|
+
const Status: {
|
|
40
|
+
readonly Initiated: "initiated";
|
|
41
|
+
readonly InProgress: "in_progress";
|
|
42
|
+
readonly Completed: "completed";
|
|
43
|
+
readonly Aborted: "aborted";
|
|
44
|
+
readonly Expired: "expired";
|
|
45
|
+
};
|
|
46
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
47
|
+
const Object_: {
|
|
48
|
+
readonly FileUploadSession: "file_upload_session";
|
|
49
|
+
};
|
|
50
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
51
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.FileUploadSession = void 0;
|
|
5
|
+
var FileUploadSession;
|
|
6
|
+
(function (FileUploadSession) {
|
|
7
|
+
/** The kind declared at initiation. */
|
|
8
|
+
FileUploadSession.Kind = {
|
|
9
|
+
ProfilePicture: "profile_picture",
|
|
10
|
+
ChatAttachment: "chat_attachment",
|
|
11
|
+
TaskPodPhoto: "task_pod_photo",
|
|
12
|
+
ImportSource: "import_source",
|
|
13
|
+
ImportReport: "import_report",
|
|
14
|
+
SignedDocument: "signed_document",
|
|
15
|
+
ProductImage: "product_image",
|
|
16
|
+
};
|
|
17
|
+
/** Session lifecycle. */
|
|
18
|
+
FileUploadSession.Status = {
|
|
19
|
+
Initiated: "initiated",
|
|
20
|
+
InProgress: "in_progress",
|
|
21
|
+
Completed: "completed",
|
|
22
|
+
Aborted: "aborted",
|
|
23
|
+
Expired: "expired",
|
|
24
|
+
};
|
|
25
|
+
FileUploadSession.Object_ = {
|
|
26
|
+
FileUploadSession: "file_upload_session",
|
|
27
|
+
};
|
|
28
|
+
})(FileUploadSession || (exports.FileUploadSession = FileUploadSession = {}));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A stored file's metadata: what it is (kind), who uploaded it, integrity (checksum), lifecycle (status + scan verdict + retention), and what business entity it documents (subject). The bytes themselves are served only through short-lived download URLs.
|
|
3
|
+
*/
|
|
4
|
+
export interface File_ {
|
|
5
|
+
/** Stable file id (pre-reserved at upload initiation). */
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
/** Owning organization. */
|
|
8
|
+
organization_id?: string | undefined;
|
|
9
|
+
/** Uploading user. Null for system-generated artifacts. */
|
|
10
|
+
uploader_id?: string | undefined;
|
|
11
|
+
/** What the bytes are for the platform — fixes the size/type/visibility/scan/retention policy applied to this file. */
|
|
12
|
+
kind?: File_.Kind | undefined;
|
|
13
|
+
/** Type of the business entity this file documents. */
|
|
14
|
+
subject_type?: string | undefined;
|
|
15
|
+
/** Id of the business entity this file documents. */
|
|
16
|
+
subject_id?: string | undefined;
|
|
17
|
+
/** For derived files (thumbnails): the original this one was rendered from. */
|
|
18
|
+
parent_file_id?: string | undefined;
|
|
19
|
+
/** Client-supplied filename, served back via Content-Disposition on download. */
|
|
20
|
+
original_filename?: string | undefined;
|
|
21
|
+
/** MIME type declared by the uploader at initiation. */
|
|
22
|
+
declared_content_type?: string | undefined;
|
|
23
|
+
/** MIME type detected server-side from the bytes (Tika). Null when detection was inconclusive. */
|
|
24
|
+
sniffed_content_type?: string | undefined;
|
|
25
|
+
/** Object size in bytes, storage-confirmed at completion. */
|
|
26
|
+
size_bytes?: number | undefined;
|
|
27
|
+
/** SHA-256 of the content, 64 lowercase hex characters. */
|
|
28
|
+
checksum_sha256?: string | undefined;
|
|
29
|
+
/** Lifecycle: `active` (serving), `quarantined` (malware-positive), `deleted` (bytes purged, row retained under regulatory hold). */
|
|
30
|
+
status?: File_.Status | undefined;
|
|
31
|
+
/** Access posture of the bytes, fixed by the kind's policy. */
|
|
32
|
+
visibility?: File_.Visibility | undefined;
|
|
33
|
+
/** Malware-scan verdict. Bytes are downloadable only on `clean` or `skipped`. */
|
|
34
|
+
virus_scan_status?: File_.VirusScanStatus | undefined;
|
|
35
|
+
/** When the scan verdict was produced. */
|
|
36
|
+
virus_scanned_at?: string | undefined;
|
|
37
|
+
/** When this file becomes eligible for the lifecycle sweep (TTL kinds). */
|
|
38
|
+
expires_at?: string | undefined;
|
|
39
|
+
/** Regulatory hold: the file cannot be deleted before this instant. */
|
|
40
|
+
retention_until?: string | undefined;
|
|
41
|
+
/** Upload completion time. */
|
|
42
|
+
created_at?: string | undefined;
|
|
43
|
+
/** Last lifecycle/scan change. */
|
|
44
|
+
updated_at?: string | undefined;
|
|
45
|
+
object?: File_.Object_ | undefined;
|
|
46
|
+
}
|
|
47
|
+
export declare namespace File_ {
|
|
48
|
+
/** What the bytes are for the platform — fixes the size/type/visibility/scan/retention policy applied to this file. */
|
|
49
|
+
const Kind: {
|
|
50
|
+
readonly ProfilePicture: "profile_picture";
|
|
51
|
+
readonly ChatAttachment: "chat_attachment";
|
|
52
|
+
readonly TaskPodPhoto: "task_pod_photo";
|
|
53
|
+
readonly ImportSource: "import_source";
|
|
54
|
+
readonly ImportReport: "import_report";
|
|
55
|
+
readonly SignedDocument: "signed_document";
|
|
56
|
+
readonly ProductImage: "product_image";
|
|
57
|
+
};
|
|
58
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
59
|
+
/** Lifecycle: `active` (serving), `quarantined` (malware-positive), `deleted` (bytes purged, row retained under regulatory hold). */
|
|
60
|
+
const Status: {
|
|
61
|
+
readonly Active: "active";
|
|
62
|
+
readonly Quarantined: "quarantined";
|
|
63
|
+
readonly Deleted: "deleted";
|
|
64
|
+
};
|
|
65
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
66
|
+
/** Access posture of the bytes, fixed by the kind's policy. */
|
|
67
|
+
const Visibility: {
|
|
68
|
+
readonly Private: "private";
|
|
69
|
+
readonly Public: "public";
|
|
70
|
+
readonly PublicCdn: "public_cdn";
|
|
71
|
+
};
|
|
72
|
+
type Visibility = (typeof Visibility)[keyof typeof Visibility];
|
|
73
|
+
/** Malware-scan verdict. Bytes are downloadable only on `clean` or `skipped`. */
|
|
74
|
+
const VirusScanStatus: {
|
|
75
|
+
readonly Pending: "pending";
|
|
76
|
+
readonly Clean: "clean";
|
|
77
|
+
readonly Infected: "infected";
|
|
78
|
+
readonly Error: "error";
|
|
79
|
+
readonly Skipped: "skipped";
|
|
80
|
+
};
|
|
81
|
+
type VirusScanStatus = (typeof VirusScanStatus)[keyof typeof VirusScanStatus];
|
|
82
|
+
const Object_: {
|
|
83
|
+
readonly File: "file";
|
|
84
|
+
};
|
|
85
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
86
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.File_ = void 0;
|
|
5
|
+
var File_;
|
|
6
|
+
(function (File_) {
|
|
7
|
+
/** What the bytes are for the platform — fixes the size/type/visibility/scan/retention policy applied to this file. */
|
|
8
|
+
File_.Kind = {
|
|
9
|
+
ProfilePicture: "profile_picture",
|
|
10
|
+
ChatAttachment: "chat_attachment",
|
|
11
|
+
TaskPodPhoto: "task_pod_photo",
|
|
12
|
+
ImportSource: "import_source",
|
|
13
|
+
ImportReport: "import_report",
|
|
14
|
+
SignedDocument: "signed_document",
|
|
15
|
+
ProductImage: "product_image",
|
|
16
|
+
};
|
|
17
|
+
/** Lifecycle: `active` (serving), `quarantined` (malware-positive), `deleted` (bytes purged, row retained under regulatory hold). */
|
|
18
|
+
File_.Status = {
|
|
19
|
+
Active: "active",
|
|
20
|
+
Quarantined: "quarantined",
|
|
21
|
+
Deleted: "deleted",
|
|
22
|
+
};
|
|
23
|
+
/** Access posture of the bytes, fixed by the kind's policy. */
|
|
24
|
+
File_.Visibility = {
|
|
25
|
+
Private: "private",
|
|
26
|
+
Public: "public",
|
|
27
|
+
PublicCdn: "public_cdn",
|
|
28
|
+
};
|
|
29
|
+
/** Malware-scan verdict. Bytes are downloadable only on `clean` or `skipped`. */
|
|
30
|
+
File_.VirusScanStatus = {
|
|
31
|
+
Pending: "pending",
|
|
32
|
+
Clean: "clean",
|
|
33
|
+
Infected: "infected",
|
|
34
|
+
Error: "error",
|
|
35
|
+
Skipped: "skipped",
|
|
36
|
+
};
|
|
37
|
+
File_.Object_ = {
|
|
38
|
+
File: "file",
|
|
39
|
+
};
|
|
40
|
+
})(File_ || (exports.File_ = File_ = {}));
|
package/dist/api/types/Job.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export declare namespace Job {
|
|
|
47
47
|
const Kind: {
|
|
48
48
|
readonly MembershipCacheRebuild: "membership_cache_rebuild";
|
|
49
49
|
readonly ServiceAccountApiKeyRegeneration: "service_account_api_key_regeneration";
|
|
50
|
+
readonly FileVirusScan: "file_virus_scan";
|
|
51
|
+
readonly FileThumbnailGeneration: "file_thumbnail_generation";
|
|
50
52
|
};
|
|
51
53
|
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
52
54
|
/** Lifecycle status. Terminal states are `completed`, `failed`, `cancelled`. */
|
package/dist/api/types/Job.js
CHANGED
|
@@ -8,6 +8,8 @@ var Job;
|
|
|
8
8
|
Job.Kind = {
|
|
9
9
|
MembershipCacheRebuild: "membership_cache_rebuild",
|
|
10
10
|
ServiceAccountApiKeyRegeneration: "service_account_api_key_regeneration",
|
|
11
|
+
FileVirusScan: "file_virus_scan",
|
|
12
|
+
FileThumbnailGeneration: "file_thumbnail_generation",
|
|
11
13
|
};
|
|
12
14
|
/** Lifecycle status. Terminal states are `completed`, `failed`, `cancelled`. */
|
|
13
15
|
Job.Status = {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamCustomer from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (Stripe-style cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseFile {
|
|
6
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseFile.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamCustomer.File_[] | 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 ListResponseFile {
|
|
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.ListResponseFile = void 0;
|
|
5
|
+
var ListResponseFile;
|
|
6
|
+
(function (ListResponseFile) {
|
|
7
|
+
/** Object type discriminator (Stripe pattern). Always `list` for this envelope. */
|
|
8
|
+
ListResponseFile.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseFile || (exports.ListResponseFile = ListResponseFile = {}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type * as NizamCustomer from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A proof-of-delivery photo captured during a task attempt.
|
|
4
|
+
*/
|
|
5
|
+
export interface TaskAttemptPhoto {
|
|
6
|
+
/** Photo record id. */
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
/** Central file id — request bytes via the files download-url endpoint. */
|
|
9
|
+
file_id?: string | undefined;
|
|
10
|
+
/** Display order within the attempt. */
|
|
11
|
+
sequence?: number | undefined;
|
|
12
|
+
/** Photo category, when categorised. */
|
|
13
|
+
photo_type?: string | undefined;
|
|
14
|
+
/** Operator-entered caption. */
|
|
15
|
+
caption?: string | undefined;
|
|
16
|
+
/** Device capture time (EXIF), when reported. */
|
|
17
|
+
taken_at?: string | undefined;
|
|
18
|
+
/** May the bytes be served right now (scan verdict + lifecycle)? */
|
|
19
|
+
downloadable?: boolean | undefined;
|
|
20
|
+
thumbnails?: NizamCustomer.TaskAttemptPhotoThumbnail[] | undefined;
|
|
21
|
+
/** When the photo row was recorded. */
|
|
22
|
+
created_at?: string | undefined;
|
|
23
|
+
object?: TaskAttemptPhoto.Object_ | undefined;
|
|
24
|
+
}
|
|
25
|
+
export declare namespace TaskAttemptPhoto {
|
|
26
|
+
const Object_: {
|
|
27
|
+
readonly TaskAttemptPhoto: "task_attempt_photo";
|
|
28
|
+
};
|
|
29
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
30
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TaskAttemptPhoto = void 0;
|
|
5
|
+
var TaskAttemptPhoto;
|
|
6
|
+
(function (TaskAttemptPhoto) {
|
|
7
|
+
TaskAttemptPhoto.Object_ = {
|
|
8
|
+
TaskAttemptPhoto: "task_attempt_photo",
|
|
9
|
+
};
|
|
10
|
+
})(TaskAttemptPhoto || (exports.TaskAttemptPhoto = TaskAttemptPhoto = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One rendered thumbnail variant.
|
|
3
|
+
*/
|
|
4
|
+
export interface TaskAttemptPhotoThumbnail {
|
|
5
|
+
/** Bounding-box size the variant was rendered into (px). */
|
|
6
|
+
max_dimension?: number | undefined;
|
|
7
|
+
/** The variant's file id — request bytes via the files download-url endpoint. */
|
|
8
|
+
file_id?: string | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as NizamCustomer from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A freshly initiated upload: the session handle, the pre-reserved file id and the presigned part URLs. Resume/complete/cancel go through the generic file-uploads endpoints.
|
|
4
|
+
*/
|
|
5
|
+
export interface UploadInitiation {
|
|
6
|
+
/** Upload session id — the handle for resume/complete/cancel. */
|
|
7
|
+
upload_session_id?: string | undefined;
|
|
8
|
+
/** Pre-reserved file id — the id the completed file WILL carry. */
|
|
9
|
+
file_id?: string | undefined;
|
|
10
|
+
/** Fixed size of every part except the last. */
|
|
11
|
+
part_size_bytes?: number | undefined;
|
|
12
|
+
/** Session deadline; the sweep aborts the upload after this. */
|
|
13
|
+
expires_at?: string | undefined;
|
|
14
|
+
parts?: NizamCustomer.UploadInitiationPart[] | undefined;
|
|
15
|
+
object?: UploadInitiation.Object_ | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace UploadInitiation {
|
|
18
|
+
const Object_: {
|
|
19
|
+
readonly FileUploadInitiation: "file_upload_initiation";
|
|
20
|
+
};
|
|
21
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.UploadInitiation = void 0;
|
|
5
|
+
var UploadInitiation;
|
|
6
|
+
(function (UploadInitiation) {
|
|
7
|
+
UploadInitiation.Object_ = {
|
|
8
|
+
FileUploadInitiation: "file_upload_initiation",
|
|
9
|
+
};
|
|
10
|
+
})(UploadInitiation || (exports.UploadInitiation = UploadInitiation = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One presigned part PUT.
|
|
3
|
+
*/
|
|
4
|
+
export interface UploadInitiationPart {
|
|
5
|
+
/** 1-based part number. */
|
|
6
|
+
part_number?: number | undefined;
|
|
7
|
+
/** Presigned URL to PUT the part's bytes to. */
|
|
8
|
+
url?: string | undefined;
|
|
9
|
+
/** Headers that were signed into the URL; repeat them verbatim. */
|
|
10
|
+
headers?: Record<string, string> | undefined;
|
|
11
|
+
/** URL expiry; re-request via resume if it lapses. */
|
|
12
|
+
url_expires_at?: string | undefined;
|
|
13
|
+
}
|
package/dist/api/types/User.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface User {
|
|
|
17
17
|
last_login_at?: string | undefined;
|
|
18
18
|
/** Total logins observed by this service. */
|
|
19
19
|
login_count?: number | undefined;
|
|
20
|
+
/** File id of the current profile picture (epic #151 / #166); null until one is uploaded. Request bytes via the files download-url endpoint, or let `GET /users/{id}/profile-picture` pick the nearest thumbnail. */
|
|
21
|
+
profile_picture_file_id?: string | undefined;
|
|
20
22
|
/** Object type discriminator (Stripe pattern). */
|
|
21
23
|
object?: User.Object_ | undefined;
|
|
22
24
|
}
|
|
@@ -7,6 +7,7 @@ export * from "./AssetListItem.js";
|
|
|
7
7
|
export * from "./Assignment.js";
|
|
8
8
|
export * from "./BulkJobSubmission.js";
|
|
9
9
|
export * from "./BusinessCategory.js";
|
|
10
|
+
export * from "./CaptureTaskAttemptPhotoRequest.js";
|
|
10
11
|
export * from "./CloseAssignmentRequest.js";
|
|
11
12
|
export * from "./Country.js";
|
|
12
13
|
export * from "./CreateAssetRequest.js";
|
|
@@ -17,6 +18,11 @@ export * from "./CreateOperatorRequest.js";
|
|
|
17
18
|
export * from "./CreateOrganizationRequest.js";
|
|
18
19
|
export * from "./CreateTeleoperatedOperatorRequest.js";
|
|
19
20
|
export * from "./Currency.js";
|
|
21
|
+
export * from "./File_.js";
|
|
22
|
+
export * from "./FileDownloadUrl.js";
|
|
23
|
+
export * from "./FileUploadPart.js";
|
|
24
|
+
export * from "./FileUploadPartReport.js";
|
|
25
|
+
export * from "./FileUploadSession.js";
|
|
20
26
|
export * from "./HeatmapCell.js";
|
|
21
27
|
export * from "./InternalUserUpdateRequest.js";
|
|
22
28
|
export * from "./Invite.js";
|
|
@@ -29,6 +35,7 @@ export * from "./ListResponseAssetListItem.js";
|
|
|
29
35
|
export * from "./ListResponseBusinessCategory.js";
|
|
30
36
|
export * from "./ListResponseCountry.js";
|
|
31
37
|
export * from "./ListResponseCurrency.js";
|
|
38
|
+
export * from "./ListResponseFile.js";
|
|
32
39
|
export * from "./ListResponseHeatmapCell.js";
|
|
33
40
|
export * from "./ListResponseJob.js";
|
|
34
41
|
export * from "./ListResponseLanguage.js";
|
|
@@ -51,7 +58,11 @@ export * from "./ProblemDetail.js";
|
|
|
51
58
|
export * from "./RealtimeTicket.js";
|
|
52
59
|
export * from "./ReconcileResponse.js";
|
|
53
60
|
export * from "./SetActiveOrganizationRequest.js";
|
|
61
|
+
export * from "./TaskAttemptPhoto.js";
|
|
62
|
+
export * from "./TaskAttemptPhotoThumbnail.js";
|
|
54
63
|
export * from "./Timezone.js";
|
|
55
64
|
export * from "./UpdateOrganizationRequest.js";
|
|
65
|
+
export * from "./UploadInitiation.js";
|
|
66
|
+
export * from "./UploadInitiationPart.js";
|
|
56
67
|
export * from "./User.js";
|
|
57
68
|
export * from "./UserResource.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./AssetListItem.js"), exports);
|
|
|
23
23
|
__exportStar(require("./Assignment.js"), exports);
|
|
24
24
|
__exportStar(require("./BulkJobSubmission.js"), exports);
|
|
25
25
|
__exportStar(require("./BusinessCategory.js"), exports);
|
|
26
|
+
__exportStar(require("./CaptureTaskAttemptPhotoRequest.js"), exports);
|
|
26
27
|
__exportStar(require("./CloseAssignmentRequest.js"), exports);
|
|
27
28
|
__exportStar(require("./Country.js"), exports);
|
|
28
29
|
__exportStar(require("./CreateAssetRequest.js"), exports);
|
|
@@ -33,6 +34,11 @@ __exportStar(require("./CreateOperatorRequest.js"), exports);
|
|
|
33
34
|
__exportStar(require("./CreateOrganizationRequest.js"), exports);
|
|
34
35
|
__exportStar(require("./CreateTeleoperatedOperatorRequest.js"), exports);
|
|
35
36
|
__exportStar(require("./Currency.js"), exports);
|
|
37
|
+
__exportStar(require("./File_.js"), exports);
|
|
38
|
+
__exportStar(require("./FileDownloadUrl.js"), exports);
|
|
39
|
+
__exportStar(require("./FileUploadPart.js"), exports);
|
|
40
|
+
__exportStar(require("./FileUploadPartReport.js"), exports);
|
|
41
|
+
__exportStar(require("./FileUploadSession.js"), exports);
|
|
36
42
|
__exportStar(require("./HeatmapCell.js"), exports);
|
|
37
43
|
__exportStar(require("./InternalUserUpdateRequest.js"), exports);
|
|
38
44
|
__exportStar(require("./Invite.js"), exports);
|
|
@@ -45,6 +51,7 @@ __exportStar(require("./ListResponseAssetListItem.js"), exports);
|
|
|
45
51
|
__exportStar(require("./ListResponseBusinessCategory.js"), exports);
|
|
46
52
|
__exportStar(require("./ListResponseCountry.js"), exports);
|
|
47
53
|
__exportStar(require("./ListResponseCurrency.js"), exports);
|
|
54
|
+
__exportStar(require("./ListResponseFile.js"), exports);
|
|
48
55
|
__exportStar(require("./ListResponseHeatmapCell.js"), exports);
|
|
49
56
|
__exportStar(require("./ListResponseJob.js"), exports);
|
|
50
57
|
__exportStar(require("./ListResponseLanguage.js"), exports);
|
|
@@ -67,7 +74,11 @@ __exportStar(require("./ProblemDetail.js"), exports);
|
|
|
67
74
|
__exportStar(require("./RealtimeTicket.js"), exports);
|
|
68
75
|
__exportStar(require("./ReconcileResponse.js"), exports);
|
|
69
76
|
__exportStar(require("./SetActiveOrganizationRequest.js"), exports);
|
|
77
|
+
__exportStar(require("./TaskAttemptPhoto.js"), exports);
|
|
78
|
+
__exportStar(require("./TaskAttemptPhotoThumbnail.js"), exports);
|
|
70
79
|
__exportStar(require("./Timezone.js"), exports);
|
|
71
80
|
__exportStar(require("./UpdateOrganizationRequest.js"), exports);
|
|
81
|
+
__exportStar(require("./UploadInitiation.js"), exports);
|
|
82
|
+
__exportStar(require("./UploadInitiationPart.js"), exports);
|
|
72
83
|
__exportStar(require("./User.js"), exports);
|
|
73
84
|
__exportStar(require("./UserResource.js"), exports);
|