@bytescale/sdk 3.52.0 → 3.55.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.
@@ -2,5 +2,6 @@ import { AuthSwHeaderDto } from "./AuthSwHeaderDto";
2
2
  export interface AuthSwConfigEntryDto {
3
3
  expires: number | undefined;
4
4
  headers: AuthSwHeaderDto[];
5
+ sourceUrlPrefixes?: string[];
5
6
  urlPrefix: string;
6
7
  }
@@ -64,6 +64,12 @@ export interface BeginAuthSessionParams {
64
64
  * script must be hosted on your website's domain in the root directory.
65
65
  */
66
66
  serviceWorkerScript?: string;
67
+ /**
68
+ * Restricts service-worker authorization to pages and iframes whose URL starts with one of these prefixes.
69
+ * An empty array matches no clients. Omit this field to preserve the existing service-worker behavior.
70
+ * Applies only with `serviceWorkerScript`; History API changes do not update the matched client URL.
71
+ */
72
+ sourceUrlPrefixes?: string[];
67
73
  }
68
74
  export interface AuthManagerInterface {
69
75
  /**
@@ -12,6 +12,7 @@ declare class AuthManagerImpl implements AuthManagerInterface {
12
12
  private readonly retryAuthAfterErrorSeconds;
13
13
  private readonly refreshBeforeExpirySeconds;
14
14
  private readonly scheduler;
15
+ private readonly sourceScopedUrlPrefixMarker;
15
16
  constructor(serviceWorkerUtils: ServiceWorkerUtils<AuthSwSetConfigDto>);
16
17
  isAuthSessionActive(): boolean;
17
18
  isAuthSessionReady(): boolean;
@@ -10,8 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from "../runtime";
13
- import type { AsyncResponse, CopyFileBatchRequest, CopyFileRequest, CopyFileResponse, DeleteFileBatchRequest, FileDetails, ProcessFileAndSaveRequest, ProcessFileAndSaveResponse } from "../models";
14
- import type { TransformationParams } from "../models";
13
+ import type { AsyncResponse, CopyFileBatchRequest, CopyFileRequest, CopyFileResponse, DeleteFileBatchRequest, FileDetails, ProcessFileAndSaveRequest, ProcessFileAndSaveResponse, TransformationParams, DownloadFileExpParameter } from "../models";
15
14
  export interface CopyFileOperationParams {
16
15
  accountId: string;
17
16
  copyFileRequest: CopyFileRequest;
@@ -50,15 +49,17 @@ export interface DownloadFileParams {
50
49
  */
51
50
  cacheTtl404?: number;
52
51
  /**
53
- * Expires the URL at the given Unix epoch timestamp.
52
+ * Expires the URL at the given time.
54
53
  *
55
- * The value can be provided in either milliseconds or seconds since January 1, 1970, 00:00:00 UTC.
54
+ * Accepted values:
56
55
  *
57
- * Must less than 7 days in the future.
56
+ * - An `integer` (in milliseconds or seconds since January 1, 1970, 00:00:00 UTC)
58
57
  *
59
- * See: Secure URLs
58
+ * - The literal string `inf` to indicate that the URL should never expire (the default)
59
+ *
60
+ * See: Expiring URLs
60
61
  */
61
- exp?: number;
62
+ exp?: DownloadFileExpParameter;
62
63
  /**
63
64
  * Downloads the latest version of your file (if you have overwritten it) when added to the URL with a unique value.
64
65
  *
@@ -150,15 +151,17 @@ export interface ProcessFileParams {
150
151
  */
151
152
  cacheTtl404?: number;
152
153
  /**
153
- * Expires the URL at the given Unix epoch timestamp.
154
+ * Expires the URL at the given time.
155
+ *
156
+ * Accepted values:
154
157
  *
155
- * The value can be provided in either milliseconds or seconds since January 1, 1970, 00:00:00 UTC.
158
+ * - An `integer` (in milliseconds or seconds since January 1, 1970, 00:00:00 UTC)
156
159
  *
157
- * Must less than 7 days in the future.
160
+ * - The literal string `inf` to indicate that the URL should never expire (the default)
158
161
  *
159
- * See: Secure URLs
162
+ * See: Expiring URLs
160
163
  */
161
- exp?: number;
164
+ exp?: DownloadFileExpParameter;
162
165
  /**
163
166
  * Add this parameter and increment its value to force the file to be reprocessed.
164
167
  *
@@ -444,9 +444,9 @@ export interface CopyFolderRequest {
444
444
  */
445
445
  export interface CopyableFileDataFileMetadata {
446
446
  /**
447
- * If `true` then merges `value` with the settings from the original file, giving precedence to `value`.
447
+ * If `true` then merges `value` with the original data, giving precedence to `value`.
448
448
  *
449
- * If `false` then uses `value` as-is, ignoring the settings from the original file.
449
+ * If `false` then uses `value` as-is, ignoring the original data.
450
450
  *
451
451
  * Default: false
452
452
  * @type {boolean}
@@ -469,9 +469,9 @@ export interface CopyableFileDataFileMetadata {
469
469
  */
470
470
  export interface CopyableFileDataFileTagNameArray {
471
471
  /**
472
- * If `true` then merges `value` with the settings from the original file, giving precedence to `value`.
472
+ * If `true` then merges `value` with the original data, giving precedence to `value`.
473
473
  *
474
- * If `false` then uses `value` as-is, ignoring the settings from the original file.
474
+ * If `false` then uses `value` as-is, ignoring the original data.
475
475
  *
476
476
  * Default: false
477
477
  * @type {boolean}
@@ -494,9 +494,9 @@ export interface CopyableFileDataFileTagNameArray {
494
494
  */
495
495
  export interface CopyableFileDataForArtifactsFileMetadata {
496
496
  /**
497
- * If `true` then merges `value` with the settings from the original file, giving precedence to `value`.
497
+ * If `true` then merges `value` with the original data, giving precedence to `value`.
498
498
  *
499
- * If `false` then uses `value` as-is, ignoring the settings from the original file.
499
+ * If `false` then uses `value` as-is, ignoring the original data.
500
500
  *
501
501
  * Default: false
502
502
  * @type {boolean}
@@ -527,9 +527,9 @@ export interface CopyableFileDataForArtifactsFileMetadata {
527
527
  */
528
528
  export interface CopyableFileDataForArtifactsFileTagNameArray {
529
529
  /**
530
- * If `true` then merges `value` with the settings from the original file, giving precedence to `value`.
530
+ * If `true` then merges `value` with the original data, giving precedence to `value`.
531
531
  *
532
- * If `false` then uses `value` as-is, ignoring the settings from the original file.
532
+ * If `false` then uses `value` as-is, ignoring the original data.
533
533
  *
534
534
  * Default: false
535
535
  * @type {boolean}
@@ -680,6 +680,17 @@ export interface DigitalOceanStorageCredentials {
680
680
  */
681
681
  spacesAccessKey: string;
682
682
  }
683
+ /**
684
+ * @type DownloadFileExpParameter
685
+ *
686
+ * @export
687
+ */
688
+ export type DownloadFileExpParameter = DownloadFileExpParameterOneOf | number;
689
+ /**
690
+ *
691
+ * @export
692
+ */
693
+ export type DownloadFileExpParameterOneOf = "inf";
683
694
  /**
684
695
  * An object containing a `fileName` and/or `folderPath` field.
685
696
  *
@@ -853,11 +864,11 @@ export interface FileDetails {
853
864
  */
854
865
  fileUrl: string;
855
866
  /**
856
- * Epoch milliseconds (since midnight 1 January 1970, UTC).
857
- * @type {number}
867
+ *
868
+ * @type {OpaqueNumberEpochMillis}
858
869
  * @memberof FileDetails
859
870
  */
860
- lastModified: number;
871
+ lastModified: OpaqueNumberEpochMillis;
861
872
  /**
862
873
  * Size in bytes.
863
874
  * @type {number}
@@ -915,11 +926,11 @@ export interface FileSummary {
915
926
  */
916
927
  fileUrl: string;
917
928
  /**
918
- * Epoch milliseconds (since midnight 1 January 1970, UTC).
919
- * @type {number}
929
+ *
930
+ * @type {OpaqueNumberEpochMillis}
920
931
  * @memberof FileSummary
921
932
  */
922
- lastModified: number;
933
+ lastModified: OpaqueNumberEpochMillis;
923
934
  /**
924
935
  * Size in bytes.
925
936
  * @type {number}
@@ -1067,6 +1078,60 @@ export interface FolderSummary {
1067
1078
  * @export
1068
1079
  */
1069
1080
  export type FolderSummaryTypeEnum = "Folder";
1081
+ /**
1082
+ *
1083
+ * @export
1084
+ * @interface GenericS3Storage
1085
+ */
1086
+ export interface GenericS3Storage {
1087
+ /**
1088
+ *
1089
+ * @type {PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket}
1090
+ * @memberof GenericS3Storage
1091
+ */
1092
+ bucket: PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket;
1093
+ /**
1094
+ *
1095
+ * @type {GenericS3StorageCredentials}
1096
+ * @memberof GenericS3Storage
1097
+ */
1098
+ credentials: GenericS3StorageCredentials;
1099
+ /**
1100
+ *
1101
+ * @type {string}
1102
+ * @memberof GenericS3Storage
1103
+ */
1104
+ type: GenericS3StorageTypeEnum;
1105
+ /**
1106
+ *
1107
+ * @type {boolean}
1108
+ * @memberof GenericS3Storage
1109
+ */
1110
+ useAbsolutePaths: boolean;
1111
+ }
1112
+ /**
1113
+ * @export
1114
+ */
1115
+ export type GenericS3StorageTypeEnum = "GenericS3";
1116
+ /**
1117
+ *
1118
+ * @export
1119
+ * @interface GenericS3StorageCredentials
1120
+ */
1121
+ export interface GenericS3StorageCredentials {
1122
+ /**
1123
+ * AWS Secret Access Key.
1124
+ * @type {string}
1125
+ * @memberof GenericS3StorageCredentials
1126
+ */
1127
+ secretKey: string;
1128
+ /**
1129
+ * AWS Access Key.
1130
+ * @type {string}
1131
+ * @memberof GenericS3StorageCredentials
1132
+ */
1133
+ accessKey: string;
1134
+ }
1070
1135
  /**
1071
1136
  * Storage layer used for storing files in Google Storage, as opposed to Bytescale's built-in storage.
1072
1137
  *
@@ -1214,11 +1279,11 @@ export interface JobSummary {
1214
1279
  */
1215
1280
  accountId: string;
1216
1281
  /**
1217
- * Epoch milliseconds (since midnight 1 January 1970, UTC).
1218
- * @type {number}
1282
+ *
1283
+ * @type {OpaqueNumberEpochMillis}
1219
1284
  * @memberof JobSummary
1220
1285
  */
1221
- created: number;
1286
+ created: OpaqueNumberEpochMillis;
1222
1287
  /**
1223
1288
  *
1224
1289
  * @type {JobSummaryError}
@@ -1226,11 +1291,11 @@ export interface JobSummary {
1226
1291
  */
1227
1292
  error: JobSummaryError | null;
1228
1293
  /**
1229
- * Epoch milliseconds (since midnight 1 January 1970, UTC).
1230
- * @type {number}
1294
+ *
1295
+ * @type {OpaqueNumberEpochMillis}
1231
1296
  * @memberof JobSummary
1232
1297
  */
1233
- lastUpdated: number;
1298
+ lastUpdated: OpaqueNumberEpochMillis;
1234
1299
  /**
1235
1300
  *
1236
1301
  * @type {AccountJobStatus}
@@ -1340,6 +1405,40 @@ export type MultipartUploadProtocol = "1.0" | "1.1";
1340
1405
  * @export
1341
1406
  */
1342
1407
  export type ObjectSummary = FileSummary | FolderSummary;
1408
+ /**
1409
+ * Easily create opaque types ie. types that are subset of their original types (ex: positive numbers, uppercased string)
1410
+ * @export
1411
+ * @interface OpaqueNumberEpochMillis
1412
+ */
1413
+ export interface OpaqueNumberEpochMillis {
1414
+ /**
1415
+ *
1416
+ * @type {string}
1417
+ * @memberof OpaqueNumberEpochMillis
1418
+ */
1419
+ tYPE: OpaqueNumberEpochMillisTYPEEnum;
1420
+ }
1421
+ /**
1422
+ * @export
1423
+ */
1424
+ export type OpaqueNumberEpochMillisTYPEEnum = "EpochMillis";
1425
+ /**
1426
+ *
1427
+ * @export
1428
+ * @interface OpaqueNumberEpochMillisAllOf
1429
+ */
1430
+ export interface OpaqueNumberEpochMillisAllOf {
1431
+ /**
1432
+ *
1433
+ * @type {string}
1434
+ * @memberof OpaqueNumberEpochMillisAllOf
1435
+ */
1436
+ tYPE: OpaqueNumberEpochMillisAllOfTYPEEnum;
1437
+ }
1438
+ /**
1439
+ * @export
1440
+ */
1441
+ export type OpaqueNumberEpochMillisAllOfTYPEEnum = "EpochMillis";
1343
1442
  /**
1344
1443
  * Specifies the folder settings to use when creating or updating a folder.
1345
1444
  * @export
@@ -1486,6 +1585,80 @@ export interface PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentia
1486
1585
  */
1487
1586
  bucketName: string;
1488
1587
  }
1588
+ /**
1589
+ * From T, pick a set of properties whose keys are in the union K
1590
+ * @export
1591
+ * @interface PickGenericS3StorageExcludeKeyofGenericS3StorageCredentials
1592
+ */
1593
+ export interface PickGenericS3StorageExcludeKeyofGenericS3StorageCredentials {
1594
+ /**
1595
+ *
1596
+ * @type {string}
1597
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentials
1598
+ */
1599
+ type: PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsTypeEnum;
1600
+ /**
1601
+ *
1602
+ * @type {boolean}
1603
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentials
1604
+ */
1605
+ useAbsolutePaths: boolean;
1606
+ /**
1607
+ *
1608
+ * @type {PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket}
1609
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentials
1610
+ */
1611
+ bucket: PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket;
1612
+ }
1613
+ /**
1614
+ * @export
1615
+ */
1616
+ export type PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsTypeEnum = "GenericS3";
1617
+ /**
1618
+ *
1619
+ * @export
1620
+ * @interface PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket
1621
+ */
1622
+ export interface PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket {
1623
+ /**
1624
+ *
1625
+ * @type {Array<S3OperationName>}
1626
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket
1627
+ */
1628
+ unsupportedOperations: Array<S3OperationName>;
1629
+ /**
1630
+ * AWS S3 Object Key.
1631
+ * @type {string}
1632
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket
1633
+ */
1634
+ objectKeyPrefix: string;
1635
+ /**
1636
+ * Controls how URLs are constructed when making HTTP requests to the S3-compatible API hosted at `bucketEndpoint`.
1637
+ * - If `true` then `bucketName` will be added to the URL path.
1638
+ * - If `false` then `bucketName` will be added as a subdomain of `bucketEndpoint`, assuming `bucketName` does not contain '.' and is DNS-compatible, else it will be added to the URL path.
1639
+ * @type {boolean}
1640
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket
1641
+ */
1642
+ forcePathStyle: boolean;
1643
+ /**
1644
+ * Generic S3 Region.
1645
+ * @type {string}
1646
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket
1647
+ */
1648
+ bucketRegion: string;
1649
+ /**
1650
+ * AWS S3 Bucket Name.
1651
+ * @type {string}
1652
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket
1653
+ */
1654
+ bucketName: string;
1655
+ /**
1656
+ * URL for an http(s) resource.
1657
+ * @type {string}
1658
+ * @memberof PickGenericS3StorageExcludeKeyofGenericS3StorageCredentialsBucket
1659
+ */
1660
+ bucketEndpoint: string;
1661
+ }
1489
1662
  /**
1490
1663
  * From T, pick a set of properties whose keys are in the union K
1491
1664
  * @export
@@ -1738,11 +1911,11 @@ export interface ProcessFileAndSaveResponseAsync {
1738
1911
  */
1739
1912
  accountId: string;
1740
1913
  /**
1741
- * Epoch milliseconds (since midnight 1 January 1970, UTC).
1742
- * @type {number}
1914
+ *
1915
+ * @type {OpaqueNumberEpochMillis}
1743
1916
  * @memberof ProcessFileAndSaveResponseAsync
1744
1917
  */
1745
- created: number;
1918
+ created: OpaqueNumberEpochMillis;
1746
1919
  /**
1747
1920
  *
1748
1921
  * @type {JobSummaryError}
@@ -1750,11 +1923,11 @@ export interface ProcessFileAndSaveResponseAsync {
1750
1923
  */
1751
1924
  error: JobSummaryError | null;
1752
1925
  /**
1753
- * Epoch milliseconds (since midnight 1 January 1970, UTC).
1754
- * @type {number}
1926
+ *
1927
+ * @type {OpaqueNumberEpochMillis}
1755
1928
  * @memberof ProcessFileAndSaveResponseAsync
1756
1929
  */
1757
- lastUpdated: number;
1930
+ lastUpdated: OpaqueNumberEpochMillis;
1758
1931
  /**
1759
1932
  *
1760
1933
  * @type {AccountJobStatus}
@@ -2010,6 +2183,11 @@ export interface ResetCacheRequest {
2010
2183
  */
2011
2184
  resetPermanentCache: boolean;
2012
2185
  }
2186
+ /**
2187
+ *
2188
+ * @export
2189
+ */
2190
+ export type S3OperationName = "DeleteObjects";
2013
2191
  /**
2014
2192
  * Storage layer used for storing files in custom S3 buckets, as opposed to Bytescale's built-in storage.
2015
2193
  *
@@ -2152,7 +2330,7 @@ export type SpecifiedFieldValueEmptiableStorageLayerUpdateSetEnum = true;
2152
2330
  * This data type does not contain credentials.
2153
2331
  * @export
2154
2332
  */
2155
- export type StorageLayerSummary = InternalStorageV1 | InternalStorageV2 | PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentials | PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentials | PickGoogleStorageExcludeKeyofGoogleStorageCredentials | PickR2StorageExcludeKeyofR2StorageCredentials | PickS3StorageExcludeKeyofS3StorageCredentials | WebStorage;
2333
+ export type StorageLayerSummary = InternalStorageV1 | InternalStorageV2 | PickAzureReadOnlyStorageExcludeKeyofAzureReadOnlyStorageCredentials | PickDigitalOceanStorageExcludeKeyofDigitalOceanStorageCredentials | PickGenericS3StorageExcludeKeyofGenericS3StorageCredentials | PickGoogleStorageExcludeKeyofGoogleStorageCredentials | PickR2StorageExcludeKeyofR2StorageCredentials | PickS3StorageExcludeKeyofS3StorageCredentials | WebStorage;
2156
2334
  /**
2157
2335
  * @type StorageLayerUpdate
2158
2336
  * Data type used to update or create a folder's storage layer.
@@ -2160,7 +2338,7 @@ export type StorageLayerSummary = InternalStorageV1 | InternalStorageV2 | PickAz
2160
2338
  * This data type may contain credentials.
2161
2339
  * @export
2162
2340
  */
2163
- export type StorageLayerUpdate = AzureReadOnlyStorage | DigitalOceanStorage | GoogleStorage | InternalStorageV2 | R2Storage | S3Storage | WebStorage;
2341
+ export type StorageLayerUpdate = AzureReadOnlyStorage | DigitalOceanStorage | GenericS3Storage | GoogleStorage | InternalStorageV2 | R2Storage | S3Storage | WebStorage;
2164
2342
  /**
2165
2343
  * @type TransformationParamValue
2166
2344
  * A single transformation parameter provided to a Bytescale File Processing API.
@@ -2282,6 +2460,14 @@ export interface UploadFromUrlRequest {
2282
2460
  * @memberof UploadFromUrlRequest
2283
2461
  */
2284
2462
  tags?: Array<string>;
2463
+ /**
2464
+ * The maximum time (in milliseconds) the entire operation is allowed to run before being aborted.
2465
+ *
2466
+ * The default value is `30000` (30 seconds).
2467
+ * @type {number}
2468
+ * @memberof UploadFromUrlRequest
2469
+ */
2470
+ timeout?: number;
2285
2471
  /**
2286
2472
  * Source URL to upload.
2287
2473
  * @type {string}