@scalemule/sdk 0.0.44 → 0.0.47
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 +29 -8
- package/dist/index.d.ts +29 -8
- package/dist/index.js +43 -12
- package/dist/index.mjs +43 -12
- 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.
|
|
@@ -2859,13 +2880,13 @@ declare class BillingService extends ServiceModule {
|
|
|
2859
2880
|
metadata?: Record<string, unknown>;
|
|
2860
2881
|
}, options?: RequestOptions): Promise<ApiResponse<Transfer>>;
|
|
2861
2882
|
syncPaymentStatus(id: string, options?: RequestOptions): Promise<ApiResponse<PaymentStatusResponse>>;
|
|
2862
|
-
/** @
|
|
2883
|
+
/** @removed Use subscribe() instead. */
|
|
2863
2884
|
createSubscription(data: {
|
|
2864
2885
|
customer_id: string;
|
|
2865
2886
|
plan_id: string;
|
|
2866
|
-
}): Promise<
|
|
2867
|
-
/** @
|
|
2868
|
-
getInvoices(params?: PaginationParams): Promise<
|
|
2887
|
+
}): Promise<never>;
|
|
2888
|
+
/** @removed Use listInvoices() instead. */
|
|
2889
|
+
getInvoices(params?: PaginationParams): Promise<never>;
|
|
2869
2890
|
}
|
|
2870
2891
|
|
|
2871
2892
|
/**
|
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.
|
|
@@ -2859,13 +2880,13 @@ declare class BillingService extends ServiceModule {
|
|
|
2859
2880
|
metadata?: Record<string, unknown>;
|
|
2860
2881
|
}, options?: RequestOptions): Promise<ApiResponse<Transfer>>;
|
|
2861
2882
|
syncPaymentStatus(id: string, options?: RequestOptions): Promise<ApiResponse<PaymentStatusResponse>>;
|
|
2862
|
-
/** @
|
|
2883
|
+
/** @removed Use subscribe() instead. */
|
|
2863
2884
|
createSubscription(data: {
|
|
2864
2885
|
customer_id: string;
|
|
2865
2886
|
plan_id: string;
|
|
2866
|
-
}): Promise<
|
|
2867
|
-
/** @
|
|
2868
|
-
getInvoices(params?: PaginationParams): Promise<
|
|
2887
|
+
}): Promise<never>;
|
|
2888
|
+
/** @removed Use listInvoices() instead. */
|
|
2889
|
+
getInvoices(params?: PaginationParams): Promise<never>;
|
|
2869
2890
|
}
|
|
2870
2891
|
|
|
2871
2892
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2459,14 +2459,25 @@ var StorageService = class extends ServiceModule {
|
|
|
2459
2459
|
},
|
|
2460
2460
|
requestOpts
|
|
2461
2461
|
);
|
|
2462
|
-
|
|
2463
|
-
telemetry?.emit(sessionId, "upload.completed", {
|
|
2464
|
-
file_id,
|
|
2465
|
-
size_bytes: file.size,
|
|
2466
|
-
duration_ms: Date.now() - directStart
|
|
2467
|
-
});
|
|
2462
|
+
return { data: null, error: completeResult.error };
|
|
2468
2463
|
}
|
|
2469
|
-
|
|
2464
|
+
telemetry?.emit(sessionId, "upload.completed", {
|
|
2465
|
+
file_id,
|
|
2466
|
+
size_bytes: file.size,
|
|
2467
|
+
duration_ms: Date.now() - directStart
|
|
2468
|
+
});
|
|
2469
|
+
const d = completeResult.data;
|
|
2470
|
+
return {
|
|
2471
|
+
data: {
|
|
2472
|
+
id: d.file_id,
|
|
2473
|
+
filename: d.filename,
|
|
2474
|
+
content_type: d.content_type,
|
|
2475
|
+
size_bytes: d.size_bytes,
|
|
2476
|
+
url: d.url,
|
|
2477
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2478
|
+
},
|
|
2479
|
+
error: null
|
|
2480
|
+
};
|
|
2470
2481
|
}
|
|
2471
2482
|
// --------------------------------------------------------------------------
|
|
2472
2483
|
// Multipart Upload
|
|
@@ -2988,6 +2999,20 @@ var StorageService = class extends ServiceModule {
|
|
|
2988
2999
|
async getFileStatus(fileId, options) {
|
|
2989
3000
|
return this._get(`/files/${fileId}/status`, options);
|
|
2990
3001
|
}
|
|
3002
|
+
/**
|
|
3003
|
+
* Read the application's active media policy. Lightweight endpoint
|
|
3004
|
+
* (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
|
|
3005
|
+
* platform-default `media_policy` without requiring app-admin auth.
|
|
3006
|
+
*
|
|
3007
|
+
* @example
|
|
3008
|
+
* ```ts
|
|
3009
|
+
* const { data } = await client.storage.getPolicy();
|
|
3010
|
+
* console.log(data?.media_policy); // 'safe_visible'
|
|
3011
|
+
* ```
|
|
3012
|
+
*/
|
|
3013
|
+
async getPolicy(options) {
|
|
3014
|
+
return this._get(`/policy`, options);
|
|
3015
|
+
}
|
|
2991
3016
|
/**
|
|
2992
3017
|
* Get a signed view URL for inline display (img src, thumbnails).
|
|
2993
3018
|
* Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
|
|
@@ -5038,15 +5063,21 @@ var BillingService = class extends ServiceModule {
|
|
|
5038
5063
|
return this.retiredSurface(`/v1/money/billing/payments/${id}/sync`);
|
|
5039
5064
|
}
|
|
5040
5065
|
// --------------------------------------------------------------------------
|
|
5041
|
-
//
|
|
5066
|
+
// Removed aliases (Phase 6 — billing-v2 retirement)
|
|
5067
|
+
//
|
|
5068
|
+
// These were soft-deprecated wrappers in earlier SDK versions. They now
|
|
5069
|
+
// throw at runtime so any caller still using them gets an immediate signal.
|
|
5070
|
+
// Replacements: createSubscription → subscribe(); getInvoices → listInvoices().
|
|
5042
5071
|
// --------------------------------------------------------------------------
|
|
5043
|
-
/** @
|
|
5072
|
+
/** @removed Use subscribe() instead. */
|
|
5044
5073
|
async createSubscription(data) {
|
|
5045
|
-
|
|
5074
|
+
void data;
|
|
5075
|
+
throw new Error("BillingService.createSubscription was removed in Phase 6. Use subscribe() instead.");
|
|
5046
5076
|
}
|
|
5047
|
-
/** @
|
|
5077
|
+
/** @removed Use listInvoices() instead. */
|
|
5048
5078
|
async getInvoices(params) {
|
|
5049
|
-
|
|
5079
|
+
void params;
|
|
5080
|
+
throw new Error("BillingService.getInvoices was removed in Phase 6. Use listInvoices() instead.");
|
|
5050
5081
|
}
|
|
5051
5082
|
};
|
|
5052
5083
|
|
package/dist/index.mjs
CHANGED
|
@@ -2089,14 +2089,25 @@ var StorageService = class extends ServiceModule {
|
|
|
2089
2089
|
},
|
|
2090
2090
|
requestOpts
|
|
2091
2091
|
);
|
|
2092
|
-
|
|
2093
|
-
telemetry?.emit(sessionId, "upload.completed", {
|
|
2094
|
-
file_id,
|
|
2095
|
-
size_bytes: file.size,
|
|
2096
|
-
duration_ms: Date.now() - directStart
|
|
2097
|
-
});
|
|
2092
|
+
return { data: null, error: completeResult.error };
|
|
2098
2093
|
}
|
|
2099
|
-
|
|
2094
|
+
telemetry?.emit(sessionId, "upload.completed", {
|
|
2095
|
+
file_id,
|
|
2096
|
+
size_bytes: file.size,
|
|
2097
|
+
duration_ms: Date.now() - directStart
|
|
2098
|
+
});
|
|
2099
|
+
const d = completeResult.data;
|
|
2100
|
+
return {
|
|
2101
|
+
data: {
|
|
2102
|
+
id: d.file_id,
|
|
2103
|
+
filename: d.filename,
|
|
2104
|
+
content_type: d.content_type,
|
|
2105
|
+
size_bytes: d.size_bytes,
|
|
2106
|
+
url: d.url,
|
|
2107
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2108
|
+
},
|
|
2109
|
+
error: null
|
|
2110
|
+
};
|
|
2100
2111
|
}
|
|
2101
2112
|
// --------------------------------------------------------------------------
|
|
2102
2113
|
// Multipart Upload
|
|
@@ -2618,6 +2629,20 @@ var StorageService = class extends ServiceModule {
|
|
|
2618
2629
|
async getFileStatus(fileId, options) {
|
|
2619
2630
|
return this._get(`/files/${fileId}/status`, options);
|
|
2620
2631
|
}
|
|
2632
|
+
/**
|
|
2633
|
+
* Read the application's active media policy. Lightweight endpoint
|
|
2634
|
+
* (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
|
|
2635
|
+
* platform-default `media_policy` without requiring app-admin auth.
|
|
2636
|
+
*
|
|
2637
|
+
* @example
|
|
2638
|
+
* ```ts
|
|
2639
|
+
* const { data } = await client.storage.getPolicy();
|
|
2640
|
+
* console.log(data?.media_policy); // 'safe_visible'
|
|
2641
|
+
* ```
|
|
2642
|
+
*/
|
|
2643
|
+
async getPolicy(options) {
|
|
2644
|
+
return this._get(`/policy`, options);
|
|
2645
|
+
}
|
|
2621
2646
|
/**
|
|
2622
2647
|
* Get a signed view URL for inline display (img src, thumbnails).
|
|
2623
2648
|
* Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
|
|
@@ -4665,15 +4690,21 @@ var BillingService = class extends ServiceModule {
|
|
|
4665
4690
|
return this.retiredSurface(`/v1/money/billing/payments/${id}/sync`);
|
|
4666
4691
|
}
|
|
4667
4692
|
// --------------------------------------------------------------------------
|
|
4668
|
-
//
|
|
4693
|
+
// Removed aliases (Phase 6 — billing-v2 retirement)
|
|
4694
|
+
//
|
|
4695
|
+
// These were soft-deprecated wrappers in earlier SDK versions. They now
|
|
4696
|
+
// throw at runtime so any caller still using them gets an immediate signal.
|
|
4697
|
+
// Replacements: createSubscription → subscribe(); getInvoices → listInvoices().
|
|
4669
4698
|
// --------------------------------------------------------------------------
|
|
4670
|
-
/** @
|
|
4699
|
+
/** @removed Use subscribe() instead. */
|
|
4671
4700
|
async createSubscription(data) {
|
|
4672
|
-
|
|
4701
|
+
void data;
|
|
4702
|
+
throw new Error("BillingService.createSubscription was removed in Phase 6. Use subscribe() instead.");
|
|
4673
4703
|
}
|
|
4674
|
-
/** @
|
|
4704
|
+
/** @removed Use listInvoices() instead. */
|
|
4675
4705
|
async getInvoices(params) {
|
|
4676
|
-
|
|
4706
|
+
void params;
|
|
4707
|
+
throw new Error("BillingService.getInvoices was removed in Phase 6. Use listInvoices() instead.");
|
|
4677
4708
|
}
|
|
4678
4709
|
};
|
|
4679
4710
|
|