@rendobar/sdk 3.3.0 → 3.4.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/dist/index.cjs CHANGED
@@ -249,6 +249,12 @@ function createJobsResource(request) {
249
249
  },
250
250
  async types(options) {
251
251
  return request("/jobs/types", { signal: options?.signal });
252
+ },
253
+ async stats(params, options) {
254
+ return request("/jobs/stats", {
255
+ query: params,
256
+ signal: options?.signal
257
+ });
252
258
  }
253
259
  };
254
260
  }
package/dist/index.d.cts CHANGED
@@ -2243,6 +2243,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2243
2243
  id: ZodString;
2244
2244
  orgId: ZodString;
2245
2245
  type: ZodString;
2246
+ source: ZodString;
2247
+ client: ZodNullable<ZodString>;
2248
+ batchId: ZodNullable<ZodString>;
2249
+ retryCount: ZodNumber;
2250
+ idempotencyKey: ZodNullable<ZodString>;
2251
+ mediaType: ZodNullable<ZodString>;
2246
2252
  inputs: ZodRecord<ZodString, ZodUnknown>;
2247
2253
  params: ZodRecord<ZodString, ZodUnknown>;
2248
2254
  cost: ZodNullable<ZodObject<{
@@ -2281,6 +2287,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2281
2287
  id: ZodString;
2282
2288
  orgId: ZodString;
2283
2289
  type: ZodString;
2290
+ source: ZodString;
2291
+ client: ZodNullable<ZodString>;
2292
+ batchId: ZodNullable<ZodString>;
2293
+ retryCount: ZodNumber;
2294
+ idempotencyKey: ZodNullable<ZodString>;
2295
+ mediaType: ZodNullable<ZodString>;
2284
2296
  inputs: ZodRecord<ZodString, ZodUnknown>;
2285
2297
  params: ZodRecord<ZodString, ZodUnknown>;
2286
2298
  cost: ZodNullable<ZodObject<{
@@ -2321,6 +2333,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2321
2333
  id: ZodString;
2322
2334
  orgId: ZodString;
2323
2335
  type: ZodString;
2336
+ source: ZodString;
2337
+ client: ZodNullable<ZodString>;
2338
+ batchId: ZodNullable<ZodString>;
2339
+ retryCount: ZodNumber;
2340
+ idempotencyKey: ZodNullable<ZodString>;
2341
+ mediaType: ZodNullable<ZodString>;
2324
2342
  inputs: ZodRecord<ZodString, ZodUnknown>;
2325
2343
  params: ZodRecord<ZodString, ZodUnknown>;
2326
2344
  cost: ZodNullable<ZodObject<{
@@ -2361,6 +2379,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2361
2379
  id: ZodString;
2362
2380
  orgId: ZodString;
2363
2381
  type: ZodString;
2382
+ source: ZodString;
2383
+ client: ZodNullable<ZodString>;
2384
+ batchId: ZodNullable<ZodString>;
2385
+ retryCount: ZodNumber;
2386
+ idempotencyKey: ZodNullable<ZodString>;
2387
+ mediaType: ZodNullable<ZodString>;
2364
2388
  inputs: ZodRecord<ZodString, ZodUnknown>;
2365
2389
  params: ZodRecord<ZodString, ZodUnknown>;
2366
2390
  cost: ZodNullable<ZodObject<{
@@ -2443,6 +2467,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2443
2467
  id: ZodString;
2444
2468
  orgId: ZodString;
2445
2469
  type: ZodString;
2470
+ source: ZodString;
2471
+ client: ZodNullable<ZodString>;
2472
+ batchId: ZodNullable<ZodString>;
2473
+ retryCount: ZodNumber;
2474
+ idempotencyKey: ZodNullable<ZodString>;
2475
+ mediaType: ZodNullable<ZodString>;
2446
2476
  inputs: ZodRecord<ZodString, ZodUnknown>;
2447
2477
  params: ZodRecord<ZodString, ZodUnknown>;
2448
2478
  cost: ZodNullable<ZodObject<{
@@ -2487,6 +2517,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2487
2517
  id: ZodString;
2488
2518
  orgId: ZodString;
2489
2519
  type: ZodString;
2520
+ source: ZodString;
2521
+ client: ZodNullable<ZodString>;
2522
+ batchId: ZodNullable<ZodString>;
2523
+ retryCount: ZodNumber;
2524
+ idempotencyKey: ZodNullable<ZodString>;
2525
+ mediaType: ZodNullable<ZodString>;
2490
2526
  inputs: ZodRecord<ZodString, ZodUnknown>;
2491
2527
  params: ZodRecord<ZodString, ZodUnknown>;
2492
2528
  cost: ZodNullable<ZodObject<{
@@ -2526,6 +2562,34 @@ declare const jobCreatedResponseSchema: ZodObject<{
2526
2562
  id: ZodString;
2527
2563
  status: ZodLiteral<"waiting">;
2528
2564
  }, $strip>;
2565
+ declare const jobStatsResponseSchema: ZodObject<{
2566
+ data: ZodObject<{
2567
+ window: ZodObject<{
2568
+ from: ZodNumber;
2569
+ to: ZodNumber;
2570
+ }, $strip>;
2571
+ totals: ZodObject<{
2572
+ jobs: ZodNumber;
2573
+ succeeded: ZodNumber;
2574
+ failed: ZodNumber;
2575
+ cancelled: ZodNumber;
2576
+ running: ZodNumber;
2577
+ }, $strip>;
2578
+ successRate: ZodNullable<ZodNumber>;
2579
+ avgDurationMs: ZodNullable<ZodNumber>;
2580
+ spend: ZodObject<{
2581
+ amount: ZodNumber;
2582
+ formatted: ZodString;
2583
+ }, $strip>;
2584
+ activity: ZodArray<ZodObject<{
2585
+ bucketStart: ZodNumber;
2586
+ succeeded: ZodNumber;
2587
+ failed: ZodNumber;
2588
+ other: ZodNumber;
2589
+ }, $strip>>;
2590
+ }, $strip>;
2591
+ }, $strip>;
2592
+ type JobStats = output<typeof jobStatsResponseSchema>["data"];
2529
2593
  declare const jobTypeSchema: ZodObject<{
2530
2594
  type: ZodString;
2531
2595
  tag: ZodString;
@@ -3065,6 +3129,9 @@ declare function createClient(config?: ClientConfig): {
3065
3129
  types(options?: {
3066
3130
  signal?: AbortSignal;
3067
3131
  }): Promise<JobType[]>;
3132
+ stats(params?: StatsParams, options?: {
3133
+ signal?: AbortSignal;
3134
+ }): Promise<JobStats>;
3068
3135
  };
3069
3136
  billing: {
3070
3137
  state(options?: {
@@ -3401,7 +3468,15 @@ type ListJobsParams = {
3401
3468
  status?: string;
3402
3469
  type?: string;
3403
3470
  limit?: number;
3404
- offset?: number;
3471
+ offset?: number; /** Sort field. Default: created. */
3472
+ sort?: "created" | "duration" | "cost"; /** Sort direction. Default: desc. */
3473
+ order?: "asc" | "desc"; /** Filter by originating client (sdk | cli | mcp | dashboard | ...). */
3474
+ client?: string; /** Filter jobs created at or after this Unix ms timestamp. */
3475
+ from?: number; /** Filter jobs created at or before this Unix ms timestamp. */
3476
+ to?: number;
3477
+ };
3478
+ type StatsParams = {
3479
+ /** Time window for the aggregate. Default: 24h. */window?: "24h" | "7d" | "30d";
3405
3480
  };
3406
3481
  type WaitOptions = {
3407
3482
  /** Max wait time in ms. Default: 300_000 (5 minutes). */timeout?: number; /** Initial poll interval in ms. Default: 2_000. Grows with exponential backoff. */
@@ -3513,4 +3588,4 @@ type AssetListPage = {
3513
3588
  meta: AssetListMeta;
3514
3589
  };
3515
3590
  //#endregion
3516
- export { ApiError, type ApiKey, type AssetResponse as Asset, type AssetDownloadResponse, type AssetInitResponse, type AssetListMeta, type AssetListPage, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type Cost, type CreateJobParams, type CreateUploadOptions, type CreateWebhookParams, type FfmpegParams, type FileType, type JobResponse as Job, type JobCreatedResponse, type JobError, JobFailedError, type JobListPage, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListAssetsParams, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type OrgSettings, type Organization, type Output, type OutputFile, type PaginationMeta, type PaymentMethod, type RealtimeConnectOptions, type RealtimeConnection, type RendobarClient, type Transaction, type TransactionListParams, type UpdateWebhookParams, type UploadProgress, type UsageParams, type UsageSummary, type WaitOptions, WaitTimeoutError, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError, jobData, outputUrl };
3591
+ export { ApiError, type ApiKey, type AssetResponse as Asset, type AssetDownloadResponse, type AssetInitResponse, type AssetListMeta, type AssetListPage, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type Cost, type CreateJobParams, type CreateUploadOptions, type CreateWebhookParams, type FfmpegParams, type FileType, type JobResponse as Job, type JobCreatedResponse, type JobError, JobFailedError, type JobListPage, type JobStats, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListAssetsParams, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type OrgSettings, type Organization, type Output, type OutputFile, type PaginationMeta, type PaymentMethod, type RealtimeConnectOptions, type RealtimeConnection, type RendobarClient, type StatsParams, type Transaction, type TransactionListParams, type UpdateWebhookParams, type UploadProgress, type UsageParams, type UsageSummary, type WaitOptions, WaitTimeoutError, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError, jobData, outputUrl };
package/dist/index.d.mts CHANGED
@@ -2243,6 +2243,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2243
2243
  id: ZodString;
2244
2244
  orgId: ZodString;
2245
2245
  type: ZodString;
2246
+ source: ZodString;
2247
+ client: ZodNullable<ZodString>;
2248
+ batchId: ZodNullable<ZodString>;
2249
+ retryCount: ZodNumber;
2250
+ idempotencyKey: ZodNullable<ZodString>;
2251
+ mediaType: ZodNullable<ZodString>;
2246
2252
  inputs: ZodRecord<ZodString, ZodUnknown>;
2247
2253
  params: ZodRecord<ZodString, ZodUnknown>;
2248
2254
  cost: ZodNullable<ZodObject<{
@@ -2281,6 +2287,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2281
2287
  id: ZodString;
2282
2288
  orgId: ZodString;
2283
2289
  type: ZodString;
2290
+ source: ZodString;
2291
+ client: ZodNullable<ZodString>;
2292
+ batchId: ZodNullable<ZodString>;
2293
+ retryCount: ZodNumber;
2294
+ idempotencyKey: ZodNullable<ZodString>;
2295
+ mediaType: ZodNullable<ZodString>;
2284
2296
  inputs: ZodRecord<ZodString, ZodUnknown>;
2285
2297
  params: ZodRecord<ZodString, ZodUnknown>;
2286
2298
  cost: ZodNullable<ZodObject<{
@@ -2321,6 +2333,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2321
2333
  id: ZodString;
2322
2334
  orgId: ZodString;
2323
2335
  type: ZodString;
2336
+ source: ZodString;
2337
+ client: ZodNullable<ZodString>;
2338
+ batchId: ZodNullable<ZodString>;
2339
+ retryCount: ZodNumber;
2340
+ idempotencyKey: ZodNullable<ZodString>;
2341
+ mediaType: ZodNullable<ZodString>;
2324
2342
  inputs: ZodRecord<ZodString, ZodUnknown>;
2325
2343
  params: ZodRecord<ZodString, ZodUnknown>;
2326
2344
  cost: ZodNullable<ZodObject<{
@@ -2361,6 +2379,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2361
2379
  id: ZodString;
2362
2380
  orgId: ZodString;
2363
2381
  type: ZodString;
2382
+ source: ZodString;
2383
+ client: ZodNullable<ZodString>;
2384
+ batchId: ZodNullable<ZodString>;
2385
+ retryCount: ZodNumber;
2386
+ idempotencyKey: ZodNullable<ZodString>;
2387
+ mediaType: ZodNullable<ZodString>;
2364
2388
  inputs: ZodRecord<ZodString, ZodUnknown>;
2365
2389
  params: ZodRecord<ZodString, ZodUnknown>;
2366
2390
  cost: ZodNullable<ZodObject<{
@@ -2443,6 +2467,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2443
2467
  id: ZodString;
2444
2468
  orgId: ZodString;
2445
2469
  type: ZodString;
2470
+ source: ZodString;
2471
+ client: ZodNullable<ZodString>;
2472
+ batchId: ZodNullable<ZodString>;
2473
+ retryCount: ZodNumber;
2474
+ idempotencyKey: ZodNullable<ZodString>;
2475
+ mediaType: ZodNullable<ZodString>;
2446
2476
  inputs: ZodRecord<ZodString, ZodUnknown>;
2447
2477
  params: ZodRecord<ZodString, ZodUnknown>;
2448
2478
  cost: ZodNullable<ZodObject<{
@@ -2487,6 +2517,12 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2487
2517
  id: ZodString;
2488
2518
  orgId: ZodString;
2489
2519
  type: ZodString;
2520
+ source: ZodString;
2521
+ client: ZodNullable<ZodString>;
2522
+ batchId: ZodNullable<ZodString>;
2523
+ retryCount: ZodNumber;
2524
+ idempotencyKey: ZodNullable<ZodString>;
2525
+ mediaType: ZodNullable<ZodString>;
2490
2526
  inputs: ZodRecord<ZodString, ZodUnknown>;
2491
2527
  params: ZodRecord<ZodString, ZodUnknown>;
2492
2528
  cost: ZodNullable<ZodObject<{
@@ -2526,6 +2562,34 @@ declare const jobCreatedResponseSchema: ZodObject<{
2526
2562
  id: ZodString;
2527
2563
  status: ZodLiteral<"waiting">;
2528
2564
  }, $strip>;
2565
+ declare const jobStatsResponseSchema: ZodObject<{
2566
+ data: ZodObject<{
2567
+ window: ZodObject<{
2568
+ from: ZodNumber;
2569
+ to: ZodNumber;
2570
+ }, $strip>;
2571
+ totals: ZodObject<{
2572
+ jobs: ZodNumber;
2573
+ succeeded: ZodNumber;
2574
+ failed: ZodNumber;
2575
+ cancelled: ZodNumber;
2576
+ running: ZodNumber;
2577
+ }, $strip>;
2578
+ successRate: ZodNullable<ZodNumber>;
2579
+ avgDurationMs: ZodNullable<ZodNumber>;
2580
+ spend: ZodObject<{
2581
+ amount: ZodNumber;
2582
+ formatted: ZodString;
2583
+ }, $strip>;
2584
+ activity: ZodArray<ZodObject<{
2585
+ bucketStart: ZodNumber;
2586
+ succeeded: ZodNumber;
2587
+ failed: ZodNumber;
2588
+ other: ZodNumber;
2589
+ }, $strip>>;
2590
+ }, $strip>;
2591
+ }, $strip>;
2592
+ type JobStats = output<typeof jobStatsResponseSchema>["data"];
2529
2593
  declare const jobTypeSchema: ZodObject<{
2530
2594
  type: ZodString;
2531
2595
  tag: ZodString;
@@ -3065,6 +3129,9 @@ declare function createClient(config?: ClientConfig): {
3065
3129
  types(options?: {
3066
3130
  signal?: AbortSignal;
3067
3131
  }): Promise<JobType[]>;
3132
+ stats(params?: StatsParams, options?: {
3133
+ signal?: AbortSignal;
3134
+ }): Promise<JobStats>;
3068
3135
  };
3069
3136
  billing: {
3070
3137
  state(options?: {
@@ -3401,7 +3468,15 @@ type ListJobsParams = {
3401
3468
  status?: string;
3402
3469
  type?: string;
3403
3470
  limit?: number;
3404
- offset?: number;
3471
+ offset?: number; /** Sort field. Default: created. */
3472
+ sort?: "created" | "duration" | "cost"; /** Sort direction. Default: desc. */
3473
+ order?: "asc" | "desc"; /** Filter by originating client (sdk | cli | mcp | dashboard | ...). */
3474
+ client?: string; /** Filter jobs created at or after this Unix ms timestamp. */
3475
+ from?: number; /** Filter jobs created at or before this Unix ms timestamp. */
3476
+ to?: number;
3477
+ };
3478
+ type StatsParams = {
3479
+ /** Time window for the aggregate. Default: 24h. */window?: "24h" | "7d" | "30d";
3405
3480
  };
3406
3481
  type WaitOptions = {
3407
3482
  /** Max wait time in ms. Default: 300_000 (5 minutes). */timeout?: number; /** Initial poll interval in ms. Default: 2_000. Grows with exponential backoff. */
@@ -3513,4 +3588,4 @@ type AssetListPage = {
3513
3588
  meta: AssetListMeta;
3514
3589
  };
3515
3590
  //#endregion
3516
- export { ApiError, type ApiKey, type AssetResponse as Asset, type AssetDownloadResponse, type AssetInitResponse, type AssetListMeta, type AssetListPage, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type Cost, type CreateJobParams, type CreateUploadOptions, type CreateWebhookParams, type FfmpegParams, type FileType, type JobResponse as Job, type JobCreatedResponse, type JobError, JobFailedError, type JobListPage, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListAssetsParams, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type OrgSettings, type Organization, type Output, type OutputFile, type PaginationMeta, type PaymentMethod, type RealtimeConnectOptions, type RealtimeConnection, type RendobarClient, type Transaction, type TransactionListParams, type UpdateWebhookParams, type UploadProgress, type UsageParams, type UsageSummary, type WaitOptions, WaitTimeoutError, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError, jobData, outputUrl };
3591
+ export { ApiError, type ApiKey, type AssetResponse as Asset, type AssetDownloadResponse, type AssetInitResponse, type AssetListMeta, type AssetListPage, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type Cost, type CreateJobParams, type CreateUploadOptions, type CreateWebhookParams, type FfmpegParams, type FileType, type JobResponse as Job, type JobCreatedResponse, type JobError, JobFailedError, type JobListPage, type JobStats, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListAssetsParams, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type OrgSettings, type Organization, type Output, type OutputFile, type PaginationMeta, type PaymentMethod, type RealtimeConnectOptions, type RealtimeConnection, type RendobarClient, type StatsParams, type Transaction, type TransactionListParams, type UpdateWebhookParams, type UploadProgress, type UsageParams, type UsageSummary, type WaitOptions, WaitTimeoutError, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError, jobData, outputUrl };
package/dist/index.mjs CHANGED
@@ -248,6 +248,12 @@ function createJobsResource(request) {
248
248
  },
249
249
  async types(options) {
250
250
  return request("/jobs/types", { signal: options?.signal });
251
+ },
252
+ async stats(params, options) {
253
+ return request("/jobs/stats", {
254
+ query: params,
255
+ signal: options?.signal
256
+ });
251
257
  }
252
258
  };
253
259
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendobar/sdk",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript client for the Rendobar media processing API",
6
6
  "main": "./dist/index.cjs",