@rendobar/sdk 2.0.0 → 2.1.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/README.md +4 -4
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +13 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +13 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ import { createClient } from "@rendobar/sdk";
|
|
|
111
111
|
const client = createClient({ apiKey: process.env.RENDOBAR_API_KEY });
|
|
112
112
|
|
|
113
113
|
const job = await client.jobs.create({
|
|
114
|
-
type: "
|
|
114
|
+
type: "ffmpeg",
|
|
115
115
|
params: {
|
|
116
116
|
command:
|
|
117
117
|
"ffmpeg -i https://cdn.example.com/source.mp4 " +
|
|
@@ -127,15 +127,15 @@ Prefer named inputs? Pass them in the top-level `inputs` map and reference the k
|
|
|
127
127
|
|
|
128
128
|
```ts
|
|
129
129
|
await client.jobs.create({
|
|
130
|
-
type: "
|
|
130
|
+
type: "ffmpeg",
|
|
131
131
|
inputs: { source: "https://cdn.example.com/source.mp4" },
|
|
132
132
|
params: { command: "ffmpeg -i source -vf scale=1280:720 output.mp4" },
|
|
133
133
|
});
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
Need a typed params object? Import `
|
|
136
|
+
Need a typed params object? Import `FfmpegParams` — optional fields (`outputFormat`, `timeout`) have server-side defaults.
|
|
137
137
|
|
|
138
|
-
See the [FFmpeg guide](https://rendobar.com/docs/guides/
|
|
138
|
+
See the [FFmpeg guide](https://rendobar.com/docs/guides/ffmpeg) for the full security model and supported flags.
|
|
139
139
|
|
|
140
140
|
## Billing
|
|
141
141
|
|
package/dist/index.cjs
CHANGED
|
@@ -388,6 +388,13 @@ function createApiKeysResource(request) {
|
|
|
388
388
|
method: "DELETE",
|
|
389
389
|
signal: options?.signal
|
|
390
390
|
});
|
|
391
|
+
},
|
|
392
|
+
async update(id, params, options) {
|
|
393
|
+
return request(`/api-keys/${id}`, {
|
|
394
|
+
method: "PATCH",
|
|
395
|
+
body: params,
|
|
396
|
+
signal: options?.signal
|
|
397
|
+
});
|
|
391
398
|
}
|
|
392
399
|
};
|
|
393
400
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -2275,6 +2275,7 @@ declare const apiKeySchema: ZodObject<{
|
|
|
2275
2275
|
id: ZodString;
|
|
2276
2276
|
name: ZodString;
|
|
2277
2277
|
prefix: ZodString;
|
|
2278
|
+
enabled: ZodBoolean;
|
|
2278
2279
|
createdAt: ZodNumber;
|
|
2279
2280
|
lastUsedAt: ZodNullable<ZodNumber>;
|
|
2280
2281
|
expiresAt: ZodNullable<ZodNumber>;
|
|
@@ -2614,6 +2615,12 @@ declare function createClient(config?: ClientConfig): {
|
|
|
2614
2615
|
id: string;
|
|
2615
2616
|
revoked: boolean;
|
|
2616
2617
|
}>;
|
|
2618
|
+
update(id: string, params: {
|
|
2619
|
+
name?: string;
|
|
2620
|
+
enabled?: boolean;
|
|
2621
|
+
}, options?: {
|
|
2622
|
+
signal?: AbortSignal;
|
|
2623
|
+
}): Promise<ApiKey>;
|
|
2617
2624
|
};
|
|
2618
2625
|
orgs: {
|
|
2619
2626
|
list(options?: {
|
|
@@ -2748,9 +2755,9 @@ interface JobSubscription {
|
|
|
2748
2755
|
unsubscribe: () => void;
|
|
2749
2756
|
}
|
|
2750
2757
|
//#endregion
|
|
2751
|
-
//#region src/jobs/
|
|
2758
|
+
//#region src/jobs/ffmpeg.d.ts
|
|
2752
2759
|
/**
|
|
2753
|
-
* Public params type for the `
|
|
2760
|
+
* Public params type for the `ffmpeg` job.
|
|
2754
2761
|
*
|
|
2755
2762
|
* Declared as a plain interface here (rather than re-exported from
|
|
2756
2763
|
* `@rendobar/shared`) so the SDK's dts bundler does not have to follow
|
|
@@ -2759,12 +2766,12 @@ interface JobSubscription {
|
|
|
2759
2766
|
* and causes tsdown to OOM.
|
|
2760
2767
|
*
|
|
2761
2768
|
* The canonical runtime shape is the Zod schema in
|
|
2762
|
-
* `packages/shared/src/jobs/definitions/
|
|
2769
|
+
* `packages/shared/src/jobs/definitions/ffmpeg.job.ts` — keep this
|
|
2763
2770
|
* interface in sync with it. Optional fields match `.default(...)`
|
|
2764
2771
|
* semantics on the schema side.
|
|
2765
2772
|
*/
|
|
2766
|
-
interface
|
|
2767
|
-
/**
|
|
2773
|
+
interface FfmpegParams {
|
|
2774
|
+
/** FFmpeg command. The leading "ffmpeg" is stripped if present. */
|
|
2768
2775
|
command: string;
|
|
2769
2776
|
/** Output container/format. Inferred from the trailing filename if omitted. */
|
|
2770
2777
|
outputFormat?: "mp4" | "mkv" | "webm" | "mov" | "avi" | "ts" | "gif" | "png" | "jpg" | "mp3" | "wav" | "flac" | "ogg" | "aac" | "opus" | "m4a" | "srt" | "vtt";
|
|
@@ -2884,5 +2891,5 @@ type Asset = {
|
|
|
2884
2891
|
updatedAt: number;
|
|
2885
2892
|
};
|
|
2886
2893
|
//#endregion
|
|
2887
|
-
export { ApiError, type ApiKey, type Asset, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type CreateJobParams, type CreateWebhookParams, type JobResponse as Job, type JobCreatedResponse, type JobListPage, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type Organization, type PaginationMeta, type PaymentMethod, type
|
|
2894
|
+
export { ApiError, type ApiKey, type Asset, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type CreateJobParams, type CreateWebhookParams, type FfmpegParams, type JobResponse as Job, type JobCreatedResponse, type JobListPage, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type Organization, type PaginationMeta, type PaymentMethod, type RealtimeConnectOptions, type RealtimeConnection, type RendobarClient, type Transaction, type TransactionListParams, type UpdateWebhookParams, type UploadResult, type UsageParams, type UsageSummary, type WaitOptions, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError };
|
|
2888
2895
|
//# sourceMappingURL=index.d.cts.map
|