@nizam-os/carrier-sdk 2.5.3 → 2.7.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.
Files changed (86) hide show
  1. package/dist/Client.d.ts +6 -0
  2. package/dist/Client.js +16 -8
  3. package/dist/api/errors/BadRequestError.d.ts +6 -0
  4. package/dist/api/errors/BadRequestError.js +54 -0
  5. package/dist/api/errors/ContentTooLargeError.d.ts +6 -0
  6. package/dist/api/errors/ContentTooLargeError.js +54 -0
  7. package/dist/api/errors/index.d.ts +2 -0
  8. package/dist/api/errors/index.js +2 -0
  9. package/dist/api/resources/files/client/Client.d.ts +188 -0
  10. package/dist/api/resources/files/client/Client.js +608 -0
  11. package/dist/api/resources/files/client/index.d.ts +1 -0
  12. package/dist/api/resources/files/client/index.js +17 -0
  13. package/dist/api/resources/files/client/requests/CancelFileUploadRequest.d.ts +9 -0
  14. package/dist/api/resources/files/client/requests/CancelFileUploadRequest.js +3 -0
  15. package/dist/api/resources/files/client/requests/CompleteFileUploadRequest.d.ts +15 -0
  16. package/dist/api/resources/files/client/requests/CompleteFileUploadRequest.js +3 -0
  17. package/dist/api/resources/files/client/requests/CreateFileDownloadUrlRequest.d.ts +9 -0
  18. package/dist/api/resources/files/client/requests/CreateFileDownloadUrlRequest.js +3 -0
  19. package/dist/api/resources/files/client/requests/DeleteFileRequest.d.ts +9 -0
  20. package/dist/api/resources/files/client/requests/DeleteFileRequest.js +3 -0
  21. package/dist/api/resources/files/client/requests/GetFileRequest.d.ts +9 -0
  22. package/dist/api/resources/files/client/requests/GetFileRequest.js +3 -0
  23. package/dist/api/resources/files/client/requests/InitiateFileUploadRequest.d.ts +41 -0
  24. package/dist/api/resources/files/client/requests/InitiateFileUploadRequest.js +17 -0
  25. package/dist/api/resources/files/client/requests/ListFilesRequest.d.ts +27 -0
  26. package/dist/api/resources/files/client/requests/ListFilesRequest.js +3 -0
  27. package/dist/api/resources/files/client/requests/ResumeFileUploadRequest.d.ts +9 -0
  28. package/dist/api/resources/files/client/requests/ResumeFileUploadRequest.js +3 -0
  29. package/dist/api/resources/files/client/requests/index.d.ts +8 -0
  30. package/dist/api/resources/files/client/requests/index.js +5 -0
  31. package/dist/api/resources/files/exports.d.ts +2 -0
  32. package/dist/api/resources/files/exports.js +21 -0
  33. package/dist/api/resources/files/index.d.ts +1 -0
  34. package/dist/api/resources/files/index.js +17 -0
  35. package/dist/api/resources/index.d.ts +5 -0
  36. package/dist/api/resources/index.js +6 -1
  37. package/dist/api/resources/taskAttempts/client/Client.d.ts +65 -0
  38. package/dist/api/resources/taskAttempts/client/Client.js +208 -0
  39. package/dist/api/resources/taskAttempts/client/index.d.ts +1 -0
  40. package/dist/api/resources/taskAttempts/client/index.js +17 -0
  41. package/dist/api/resources/taskAttempts/client/requests/CaptureTaskAttemptPhotoRequest.d.ts +49 -0
  42. package/dist/api/resources/taskAttempts/client/requests/CaptureTaskAttemptPhotoRequest.js +20 -0
  43. package/dist/api/resources/taskAttempts/client/requests/ListTaskAttemptPhotosRequest.d.ts +17 -0
  44. package/dist/api/resources/taskAttempts/client/requests/ListTaskAttemptPhotosRequest.js +3 -0
  45. package/dist/api/resources/taskAttempts/client/requests/index.d.ts +2 -0
  46. package/dist/api/resources/taskAttempts/client/requests/index.js +5 -0
  47. package/dist/api/resources/taskAttempts/exports.d.ts +2 -0
  48. package/dist/api/resources/taskAttempts/exports.js +21 -0
  49. package/dist/api/resources/taskAttempts/index.d.ts +1 -0
  50. package/dist/api/resources/taskAttempts/index.js +17 -0
  51. package/dist/api/resources/users/client/Client.d.ts +43 -0
  52. package/dist/api/resources/users/client/Client.js +142 -0
  53. package/dist/api/resources/users/client/index.d.ts +1 -1
  54. package/dist/api/resources/users/client/index.js +15 -0
  55. package/dist/api/resources/users/client/requests/GetUserProfilePictureRequest.d.ts +11 -0
  56. package/dist/api/resources/users/client/requests/GetUserProfilePictureRequest.js +3 -0
  57. package/dist/api/resources/users/client/requests/InitiateProfilePictureUploadRequest.d.ts +19 -0
  58. package/dist/api/resources/users/client/requests/InitiateProfilePictureUploadRequest.js +3 -0
  59. package/dist/api/resources/users/client/requests/index.d.ts +2 -0
  60. package/dist/api/resources/users/client/requests/index.js +2 -0
  61. package/dist/api/types/FileDownloadUrl.d.ts +16 -0
  62. package/dist/api/types/FileDownloadUrl.js +10 -0
  63. package/dist/api/types/FileUploadPart.d.ts +13 -0
  64. package/dist/api/types/FileUploadPart.js +3 -0
  65. package/dist/api/types/FileUploadPartReport.d.ts +9 -0
  66. package/dist/api/types/FileUploadPartReport.js +3 -0
  67. package/dist/api/types/FileUploadSession.d.ts +51 -0
  68. package/dist/api/types/FileUploadSession.js +28 -0
  69. package/dist/api/types/File_.d.ts +86 -0
  70. package/dist/api/types/File_.js +40 -0
  71. package/dist/api/types/Job.d.ts +2 -0
  72. package/dist/api/types/Job.js +2 -0
  73. package/dist/api/types/ListResponseFile.d.ts +27 -0
  74. package/dist/api/types/ListResponseFile.js +11 -0
  75. package/dist/api/types/TaskAttemptPhoto.d.ts +30 -0
  76. package/dist/api/types/TaskAttemptPhoto.js +10 -0
  77. package/dist/api/types/TaskAttemptPhotoThumbnail.d.ts +9 -0
  78. package/dist/api/types/TaskAttemptPhotoThumbnail.js +3 -0
  79. package/dist/api/types/UploadInitiation.d.ts +22 -0
  80. package/dist/api/types/UploadInitiation.js +10 -0
  81. package/dist/api/types/UploadInitiationPart.d.ts +13 -0
  82. package/dist/api/types/UploadInitiationPart.js +3 -0
  83. package/dist/api/types/User.d.ts +2 -0
  84. package/dist/api/types/index.d.ts +10 -0
  85. package/dist/api/types/index.js +10 -0
  86. package/package.json +1 -1
package/dist/Client.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ import { FilesClient } from "./api/resources/files/client/Client.js";
1
2
  import { InvitesClient } from "./api/resources/invites/client/Client.js";
2
3
  import { LookupsClient } from "./api/resources/lookups/client/Client.js";
3
4
  import { RealtimeClient } from "./api/resources/realtime/client/Client.js";
5
+ import { TaskAttemptsClient } from "./api/resources/taskAttempts/client/Client.js";
4
6
  import { UsersClient } from "./api/resources/users/client/Client.js";
5
7
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
6
8
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
@@ -12,15 +14,19 @@ export declare namespace NizamCarrierClient {
12
14
  }
13
15
  export declare class NizamCarrierClient {
14
16
  protected readonly _options: NormalizedClientOptionsWithAuth<NizamCarrierClient.Options>;
17
+ protected _files: FilesClient | undefined;
15
18
  protected _invites: InvitesClient | undefined;
16
19
  protected _lookups: LookupsClient | undefined;
17
20
  protected _users: UsersClient | undefined;
18
21
  protected _realtime: RealtimeClient | undefined;
22
+ protected _taskAttempts: TaskAttemptsClient | undefined;
19
23
  constructor(options: NizamCarrierClient.Options);
24
+ get files(): FilesClient;
20
25
  get invites(): InvitesClient;
21
26
  get lookups(): LookupsClient;
22
27
  get users(): UsersClient;
23
28
  get realtime(): RealtimeClient;
29
+ get taskAttempts(): TaskAttemptsClient;
24
30
  /**
25
31
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
26
32
  * This is useful for making requests to endpoints not yet supported in the SDK.
package/dist/Client.js CHANGED
@@ -35,27 +35,35 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.NizamCarrierClient = void 0;
38
- const Client_js_1 = require("./api/resources/invites/client/Client.js");
39
- const Client_js_2 = require("./api/resources/lookups/client/Client.js");
40
- const Client_js_3 = require("./api/resources/realtime/client/Client.js");
41
- const Client_js_4 = require("./api/resources/users/client/Client.js");
38
+ const Client_js_1 = require("./api/resources/files/client/Client.js");
39
+ const Client_js_2 = require("./api/resources/invites/client/Client.js");
40
+ const Client_js_3 = require("./api/resources/lookups/client/Client.js");
41
+ const Client_js_4 = require("./api/resources/realtime/client/Client.js");
42
+ const Client_js_5 = require("./api/resources/taskAttempts/client/Client.js");
43
+ const Client_js_6 = require("./api/resources/users/client/Client.js");
42
44
  const BaseClient_js_1 = require("./BaseClient.js");
43
45
  const core = __importStar(require("./core/index.js"));
44
46
  class NizamCarrierClient {
45
47
  constructor(options) {
46
48
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
47
49
  }
50
+ get files() {
51
+ return (this._files ?? (this._files = new Client_js_1.FilesClient(this._options)));
52
+ }
48
53
  get invites() {
49
- return (this._invites ?? (this._invites = new Client_js_1.InvitesClient(this._options)));
54
+ return (this._invites ?? (this._invites = new Client_js_2.InvitesClient(this._options)));
50
55
  }
51
56
  get lookups() {
52
- return (this._lookups ?? (this._lookups = new Client_js_2.LookupsClient(this._options)));
57
+ return (this._lookups ?? (this._lookups = new Client_js_3.LookupsClient(this._options)));
53
58
  }
54
59
  get users() {
55
- return (this._users ?? (this._users = new Client_js_4.UsersClient(this._options)));
60
+ return (this._users ?? (this._users = new Client_js_6.UsersClient(this._options)));
56
61
  }
57
62
  get realtime() {
58
- return (this._realtime ?? (this._realtime = new Client_js_3.RealtimeClient(this._options)));
63
+ return (this._realtime ?? (this._realtime = new Client_js_4.RealtimeClient(this._options)));
64
+ }
65
+ get taskAttempts() {
66
+ return (this._taskAttempts ?? (this._taskAttempts = new Client_js_5.TaskAttemptsClient(this._options)));
59
67
  }
60
68
  /**
61
69
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as NizamCarrier from "../index.js";
4
+ export declare class BadRequestError extends errors.NizamCarrierError {
5
+ constructor(body: NizamCarrier.ProblemDetail, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.BadRequestError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class BadRequestError extends errors.NizamCarrierError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "BadRequestError",
43
+ statusCode: 400,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.BadRequestError = BadRequestError;
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as NizamCarrier from "../index.js";
4
+ export declare class ContentTooLargeError extends errors.NizamCarrierError {
5
+ constructor(body: NizamCarrier.ProblemDetail, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ContentTooLargeError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class ContentTooLargeError extends errors.NizamCarrierError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "ContentTooLargeError",
43
+ statusCode: 413,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.ContentTooLargeError = ContentTooLargeError;
@@ -1,4 +1,6 @@
1
+ export * from "./BadRequestError.js";
1
2
  export * from "./ConflictError.js";
3
+ export * from "./ContentTooLargeError.js";
2
4
  export * from "./ForbiddenError.js";
3
5
  export * from "./GoneError.js";
4
6
  export * from "./InternalServerError.js";
@@ -14,7 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BadRequestError.js"), exports);
17
18
  __exportStar(require("./ConflictError.js"), exports);
19
+ __exportStar(require("./ContentTooLargeError.js"), exports);
18
20
  __exportStar(require("./ForbiddenError.js"), exports);
19
21
  __exportStar(require("./GoneError.js"), exports);
20
22
  __exportStar(require("./InternalServerError.js"), exports);
@@ -0,0 +1,188 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as NizamCarrier from "../../../index.js";
5
+ export declare namespace FilesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class FilesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<FilesClient.Options>;
12
+ constructor(options: FilesClient.Options);
13
+ /**
14
+ * The active organization's files ordered by `created_at` descending (pass `sort=created_at` for ascending). `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
+ *
16
+ * @param {NizamCarrier.ListFilesRequest} request
17
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link NizamCarrier.BadRequestError}
20
+ * @throws {@link NizamCarrier.UnauthorizedError}
21
+ * @throws {@link NizamCarrier.ForbiddenError}
22
+ * @throws {@link NizamCarrier.TooManyRequestsError}
23
+ * @throws {@link NizamCarrier.InternalServerError}
24
+ *
25
+ * @example
26
+ * await client.files.listFiles({
27
+ * subject_type: "<string>",
28
+ * subject_id: "00000000-0000-0000-0000-000000000000",
29
+ * starting_after: "Y3Vyc29yX25leHRfMDFKNVE=",
30
+ * ending_before: "Y3Vyc29yX25leHRfMDFKNVE="
31
+ * })
32
+ */
33
+ listFiles(request?: NizamCarrier.ListFilesRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.ListResponseFile>;
34
+ private __listFiles;
35
+ /**
36
+ * Validates the declaration against the kind's policy (allowed portals, content types, size ceiling, organization quota), pre-reserves the final file id, and returns presigned part URLs. PUT each part's bytes directly to its URL (repeating the part's `headers` verbatim) and keep each response's `ETag` for completion. Sessions expire after 24h; the part URLs sooner — re-issue them via the resume endpoint.
37
+ *
38
+ * @param {NizamCarrier.InitiateFileUploadRequest} request
39
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link NizamCarrier.BadRequestError}
42
+ * @throws {@link NizamCarrier.UnauthorizedError}
43
+ * @throws {@link NizamCarrier.ForbiddenError}
44
+ * @throws {@link NizamCarrier.ContentTooLargeError}
45
+ * @throws {@link NizamCarrier.UnprocessableEntityError}
46
+ * @throws {@link NizamCarrier.TooManyRequestsError}
47
+ * @throws {@link NizamCarrier.InternalServerError}
48
+ *
49
+ * @example
50
+ * await client.files.initiateFileUpload({
51
+ * kind: "profile_picture",
52
+ * subject_type: "task_attempt",
53
+ * subject_id: "b3c4d5e6-7f8a-9b0c-1d2e-3f4a5b6c7d8e",
54
+ * filename: "pod-photo.jpg",
55
+ * content_type: "image/jpeg",
56
+ * size_bytes: 2048576,
57
+ * checksum_sha256: "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
58
+ * })
59
+ */
60
+ initiateFileUpload(request: NizamCarrier.InitiateFileUploadRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.FileUploadSession>;
61
+ private __initiateFileUpload;
62
+ /**
63
+ * Returns the session state — which parts are already confirmed — plus fresh presigned URLs for the parts still missing. The IndexedDB-persisted ETags from before the interruption stay valid; only re-upload the missing parts. Uploader-only: other members' sessions read as 404.
64
+ *
65
+ * @param {NizamCarrier.ResumeFileUploadRequest} request
66
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link NizamCarrier.UnauthorizedError}
69
+ * @throws {@link NizamCarrier.ForbiddenError}
70
+ * @throws {@link NizamCarrier.NotFoundError}
71
+ * @throws {@link NizamCarrier.ConflictError}
72
+ * @throws {@link NizamCarrier.GoneError}
73
+ * @throws {@link NizamCarrier.TooManyRequestsError}
74
+ * @throws {@link NizamCarrier.InternalServerError}
75
+ *
76
+ * @example
77
+ * await client.files.resumeFileUpload({
78
+ * id: "00000000-0000-0000-0000-000000000000"
79
+ * })
80
+ */
81
+ resumeFileUpload(request: NizamCarrier.ResumeFileUploadRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.FileUploadSession>;
82
+ private __resumeFileUpload;
83
+ /**
84
+ * Aborts the storage-side multipart upload and marks the session aborted. Idempotent: cancelling an already-terminal session is a no-op.
85
+ *
86
+ * @param {NizamCarrier.CancelFileUploadRequest} request
87
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
88
+ *
89
+ * @throws {@link NizamCarrier.UnauthorizedError}
90
+ * @throws {@link NizamCarrier.ForbiddenError}
91
+ * @throws {@link NizamCarrier.NotFoundError}
92
+ * @throws {@link NizamCarrier.TooManyRequestsError}
93
+ * @throws {@link NizamCarrier.InternalServerError}
94
+ *
95
+ * @example
96
+ * await client.files.cancelFileUpload({
97
+ * id: "00000000-0000-0000-0000-000000000000"
98
+ * })
99
+ */
100
+ cancelFileUpload(request: NizamCarrier.CancelFileUploadRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<void>;
101
+ private __cancelFileUpload;
102
+ /**
103
+ * Assembles the file from the reported part ETags, verifies the declared size against storage, detects the real content type from the bytes, creates the file record under the pre-reserved id and enqueues the malware-scan / thumbnail pipeline. Scanned kinds stay undownloadable until the verdict lands (`virus_scan_status: clean`).
104
+ *
105
+ * @param {NizamCarrier.CompleteFileUploadRequest} request
106
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
107
+ *
108
+ * @throws {@link NizamCarrier.BadRequestError}
109
+ * @throws {@link NizamCarrier.UnauthorizedError}
110
+ * @throws {@link NizamCarrier.ForbiddenError}
111
+ * @throws {@link NizamCarrier.NotFoundError}
112
+ * @throws {@link NizamCarrier.ConflictError}
113
+ * @throws {@link NizamCarrier.GoneError}
114
+ * @throws {@link NizamCarrier.UnprocessableEntityError}
115
+ * @throws {@link NizamCarrier.TooManyRequestsError}
116
+ * @throws {@link NizamCarrier.InternalServerError}
117
+ *
118
+ * @example
119
+ * await client.files.completeFileUpload({
120
+ * id: "00000000-0000-0000-0000-000000000000",
121
+ * parts: [{
122
+ * part_number: 1,
123
+ * etag: "9bb58f26192e4ba00f01e2e7b136bbd8"
124
+ * }]
125
+ * })
126
+ */
127
+ completeFileUpload(request: NizamCarrier.CompleteFileUploadRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.File_>;
128
+ private __completeFileUpload;
129
+ /**
130
+ * Single file view: kind, integrity, lifecycle, scan verdict, subject. Org-scoped: any member of the owning organization can read it. Bytes are served only through the download-url endpoint.
131
+ *
132
+ * @param {NizamCarrier.GetFileRequest} request
133
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
134
+ *
135
+ * @throws {@link NizamCarrier.UnauthorizedError}
136
+ * @throws {@link NizamCarrier.ForbiddenError}
137
+ * @throws {@link NizamCarrier.NotFoundError}
138
+ * @throws {@link NizamCarrier.TooManyRequestsError}
139
+ * @throws {@link NizamCarrier.InternalServerError}
140
+ *
141
+ * @example
142
+ * await client.files.getFile({
143
+ * id: "00000000-0000-0000-0000-000000000000"
144
+ * })
145
+ */
146
+ getFile(request: NizamCarrier.GetFileRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.File_>;
147
+ private __getFile;
148
+ /**
149
+ * Soft-deletes the file: it disappears from listings immediately; the bytes are purged later by the lifecycle sweep once the grace period passes. Refused while a regulatory retention hold is in force (409).
150
+ *
151
+ * @param {NizamCarrier.DeleteFileRequest} request
152
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
153
+ *
154
+ * @throws {@link NizamCarrier.UnauthorizedError}
155
+ * @throws {@link NizamCarrier.ForbiddenError}
156
+ * @throws {@link NizamCarrier.NotFoundError}
157
+ * @throws {@link NizamCarrier.ConflictError}
158
+ * @throws {@link NizamCarrier.TooManyRequestsError}
159
+ * @throws {@link NizamCarrier.InternalServerError}
160
+ *
161
+ * @example
162
+ * await client.files.deleteFile({
163
+ * id: "00000000-0000-0000-0000-000000000000"
164
+ * })
165
+ */
166
+ deleteFile(request: NizamCarrier.DeleteFileRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<void>;
167
+ private __deleteFile;
168
+ /**
169
+ * Authorizes the caller (org membership + the kind's portal allow-list + the scan verdict) and issues a short-lived URL for the bytes — presigned storage, or a signed CDN URL for public kinds when the CDN is enabled. Sensitive kinds append an access-audit row in the same transaction; POST because issuing a grant is an audited action, not a cacheable read.
170
+ *
171
+ * @param {NizamCarrier.CreateFileDownloadUrlRequest} request
172
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
173
+ *
174
+ * @throws {@link NizamCarrier.UnauthorizedError}
175
+ * @throws {@link NizamCarrier.ForbiddenError}
176
+ * @throws {@link NizamCarrier.NotFoundError}
177
+ * @throws {@link NizamCarrier.ConflictError}
178
+ * @throws {@link NizamCarrier.TooManyRequestsError}
179
+ * @throws {@link NizamCarrier.InternalServerError}
180
+ *
181
+ * @example
182
+ * await client.files.createFileDownloadUrl({
183
+ * id: "00000000-0000-0000-0000-000000000000"
184
+ * })
185
+ */
186
+ createFileDownloadUrl(request: NizamCarrier.CreateFileDownloadUrlRequest, requestOptions?: FilesClient.RequestOptions): core.HttpResponsePromise<NizamCarrier.FileDownloadUrl>;
187
+ private __createFileDownloadUrl;
188
+ }