@scalemule/sdk 0.0.44 → 0.0.45
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/index.d.mts +25 -4
- package/dist/index.d.ts +25 -4
- package/dist/index.js +14 -0
- package/dist/index.mjs +14 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1170,11 +1170,18 @@ interface FileStatus {
|
|
|
1170
1170
|
manifest_url?: string;
|
|
1171
1171
|
} | null;
|
|
1172
1172
|
urls: {
|
|
1173
|
-
/**
|
|
1174
|
-
|
|
1175
|
-
|
|
1173
|
+
/**
|
|
1174
|
+
* Direct-to-CDN view URL (CloudFront-signed where configured,
|
|
1175
|
+
* S3-presigned otherwise). Absent when scan is `threat` /
|
|
1176
|
+
* `quarantined` / `error` — consumers render a blocked
|
|
1177
|
+
* placeholder when this is null + scan is non-clean.
|
|
1178
|
+
*/
|
|
1179
|
+
original?: string;
|
|
1180
|
+
/** Gateway path for the photo transform — present only when the
|
|
1181
|
+
* photo pipeline reports `optimize.status === 'done'` (image only). */
|
|
1176
1182
|
optimized?: string;
|
|
1177
|
-
/** Gateway path for the HLS master playlist —
|
|
1183
|
+
/** Gateway path for the HLS master playlist — present only when the
|
|
1184
|
+
* transcode worker reports `transcode.status === 'done'` (video only). */
|
|
1178
1185
|
hls?: string;
|
|
1179
1186
|
};
|
|
1180
1187
|
}
|
|
@@ -1301,6 +1308,20 @@ declare class StorageService extends ServiceModule {
|
|
|
1301
1308
|
* ```
|
|
1302
1309
|
*/
|
|
1303
1310
|
getFileStatus(fileId: string, options?: RequestOptions): Promise<ApiResponse<FileStatus>>;
|
|
1311
|
+
/**
|
|
1312
|
+
* Read the application's active media policy. Lightweight endpoint
|
|
1313
|
+
* (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
|
|
1314
|
+
* platform-default `media_policy` without requiring app-admin auth.
|
|
1315
|
+
*
|
|
1316
|
+
* @example
|
|
1317
|
+
* ```ts
|
|
1318
|
+
* const { data } = await client.storage.getPolicy();
|
|
1319
|
+
* console.log(data?.media_policy); // 'safe_visible'
|
|
1320
|
+
* ```
|
|
1321
|
+
*/
|
|
1322
|
+
getPolicy(options?: RequestOptions): Promise<ApiResponse<{
|
|
1323
|
+
media_policy: MediaPolicy;
|
|
1324
|
+
}>>;
|
|
1304
1325
|
/**
|
|
1305
1326
|
* Get a signed view URL for inline display (img src, thumbnails).
|
|
1306
1327
|
* Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
|
package/dist/index.d.ts
CHANGED
|
@@ -1170,11 +1170,18 @@ interface FileStatus {
|
|
|
1170
1170
|
manifest_url?: string;
|
|
1171
1171
|
} | null;
|
|
1172
1172
|
urls: {
|
|
1173
|
-
/**
|
|
1174
|
-
|
|
1175
|
-
|
|
1173
|
+
/**
|
|
1174
|
+
* Direct-to-CDN view URL (CloudFront-signed where configured,
|
|
1175
|
+
* S3-presigned otherwise). Absent when scan is `threat` /
|
|
1176
|
+
* `quarantined` / `error` — consumers render a blocked
|
|
1177
|
+
* placeholder when this is null + scan is non-clean.
|
|
1178
|
+
*/
|
|
1179
|
+
original?: string;
|
|
1180
|
+
/** Gateway path for the photo transform — present only when the
|
|
1181
|
+
* photo pipeline reports `optimize.status === 'done'` (image only). */
|
|
1176
1182
|
optimized?: string;
|
|
1177
|
-
/** Gateway path for the HLS master playlist —
|
|
1183
|
+
/** Gateway path for the HLS master playlist — present only when the
|
|
1184
|
+
* transcode worker reports `transcode.status === 'done'` (video only). */
|
|
1178
1185
|
hls?: string;
|
|
1179
1186
|
};
|
|
1180
1187
|
}
|
|
@@ -1301,6 +1308,20 @@ declare class StorageService extends ServiceModule {
|
|
|
1301
1308
|
* ```
|
|
1302
1309
|
*/
|
|
1303
1310
|
getFileStatus(fileId: string, options?: RequestOptions): Promise<ApiResponse<FileStatus>>;
|
|
1311
|
+
/**
|
|
1312
|
+
* Read the application's active media policy. Lightweight endpoint
|
|
1313
|
+
* (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
|
|
1314
|
+
* platform-default `media_policy` without requiring app-admin auth.
|
|
1315
|
+
*
|
|
1316
|
+
* @example
|
|
1317
|
+
* ```ts
|
|
1318
|
+
* const { data } = await client.storage.getPolicy();
|
|
1319
|
+
* console.log(data?.media_policy); // 'safe_visible'
|
|
1320
|
+
* ```
|
|
1321
|
+
*/
|
|
1322
|
+
getPolicy(options?: RequestOptions): Promise<ApiResponse<{
|
|
1323
|
+
media_policy: MediaPolicy;
|
|
1324
|
+
}>>;
|
|
1304
1325
|
/**
|
|
1305
1326
|
* Get a signed view URL for inline display (img src, thumbnails).
|
|
1306
1327
|
* Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
|
package/dist/index.js
CHANGED
|
@@ -2988,6 +2988,20 @@ var StorageService = class extends ServiceModule {
|
|
|
2988
2988
|
async getFileStatus(fileId, options) {
|
|
2989
2989
|
return this._get(`/files/${fileId}/status`, options);
|
|
2990
2990
|
}
|
|
2991
|
+
/**
|
|
2992
|
+
* Read the application's active media policy. Lightweight endpoint
|
|
2993
|
+
* (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
|
|
2994
|
+
* platform-default `media_policy` without requiring app-admin auth.
|
|
2995
|
+
*
|
|
2996
|
+
* @example
|
|
2997
|
+
* ```ts
|
|
2998
|
+
* const { data } = await client.storage.getPolicy();
|
|
2999
|
+
* console.log(data?.media_policy); // 'safe_visible'
|
|
3000
|
+
* ```
|
|
3001
|
+
*/
|
|
3002
|
+
async getPolicy(options) {
|
|
3003
|
+
return this._get(`/policy`, options);
|
|
3004
|
+
}
|
|
2991
3005
|
/**
|
|
2992
3006
|
* Get a signed view URL for inline display (img src, thumbnails).
|
|
2993
3007
|
* Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
|
package/dist/index.mjs
CHANGED
|
@@ -2618,6 +2618,20 @@ var StorageService = class extends ServiceModule {
|
|
|
2618
2618
|
async getFileStatus(fileId, options) {
|
|
2619
2619
|
return this._get(`/files/${fileId}/status`, options);
|
|
2620
2620
|
}
|
|
2621
|
+
/**
|
|
2622
|
+
* Read the application's active media policy. Lightweight endpoint
|
|
2623
|
+
* (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
|
|
2624
|
+
* platform-default `media_policy` without requiring app-admin auth.
|
|
2625
|
+
*
|
|
2626
|
+
* @example
|
|
2627
|
+
* ```ts
|
|
2628
|
+
* const { data } = await client.storage.getPolicy();
|
|
2629
|
+
* console.log(data?.media_policy); // 'safe_visible'
|
|
2630
|
+
* ```
|
|
2631
|
+
*/
|
|
2632
|
+
async getPolicy(options) {
|
|
2633
|
+
return this._get(`/policy`, options);
|
|
2634
|
+
}
|
|
2621
2635
|
/**
|
|
2622
2636
|
* Get a signed view URL for inline display (img src, thumbnails).
|
|
2623
2637
|
* Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
|