@talqing/sdk 0.4.2 → 0.4.4

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.
@@ -627,6 +627,10 @@ export type AvatarCatalogEntryResponse = {
627
627
  * Label
628
628
  */
629
629
  label: string | null;
630
+ /**
631
+ * Logo Url
632
+ */
633
+ logo_url: string | null;
630
634
  /**
631
635
  * Model
632
636
  */
@@ -2567,7 +2571,9 @@ export type CreateEmailBatchRequest = {
2567
2571
  *
2568
2572
  * Send these rows. **This is the call that mails real people.**
2569
2573
  *
2570
- * Name ``recipient_ids`` or pass ``selection: "all_drafts"``. Everything else
2574
+ * ``scope: "selected"`` sends exactly ``recipient_ids``. ``scope: "all"`` is a
2575
+ * standing send: every row of the batch as it reaches `draft`, including rows
2576
+ * not drafted yet — so it mails drafts nobody has read. Everything else
2571
2577
  * defaults to the batch's own setting; ``window`` and ``send_daily_cap`` accept
2572
2578
  * an explicit ``null`` to mean "no window" and "uncapped" rather than
2573
2579
  * "inherit", so the service reads ``model_fields_set``.
@@ -2592,9 +2598,11 @@ export type CreateEmailSendRequest = {
2592
2598
  */
2593
2599
  reply_to?: string | null;
2594
2600
  /**
2595
- * Selection
2601
+ * Scope
2602
+ *
2603
+ * `selected` sends `recipient_ids`; `all` sends every row as it is drafted.
2596
2604
  */
2597
- selection?: 'all_drafts' | null;
2605
+ scope: 'all' | 'selected';
2598
2606
  /**
2599
2607
  * Send Attempts
2600
2608
  */
@@ -3107,6 +3115,21 @@ export type DeliveryResultResponse = {
3107
3115
  */
3108
3116
  webhook_id: string;
3109
3117
  };
3118
+ /**
3119
+ * DraftFailure
3120
+ *
3121
+ * One reason drafts failed, and how many rows it holds.
3122
+ */
3123
+ export type DraftFailure = {
3124
+ /**
3125
+ * Count
3126
+ */
3127
+ count: number;
3128
+ /**
3129
+ * Reason
3130
+ */
3131
+ reason: string;
3132
+ };
3110
3133
  /**
3111
3134
  * DraftedVersion
3112
3135
  *
@@ -3128,6 +3151,9 @@ export type DraftedVersion = {
3128
3151
  };
3129
3152
  /**
3130
3153
  * EmailBatchCounts
3154
+ *
3155
+ * Rows by the status a reader sees. `draft` is drafts no live send covers
3156
+ * yet; `queued` is drafts one does.
3131
3157
  */
3132
3158
  export type EmailBatchCounts = {
3133
3159
  /**
@@ -3196,6 +3222,10 @@ export type EmailBatchResponse = {
3196
3222
  * Draft Concurrency
3197
3223
  */
3198
3224
  draft_concurrency: number;
3225
+ /**
3226
+ * Draft Failures
3227
+ */
3228
+ draft_failures: Array<DraftFailure>;
3199
3229
  /**
3200
3230
  * Draft Gap Seconds
3201
3231
  */
@@ -3289,10 +3319,15 @@ export type EmailBatchResponse = {
3289
3319
  * Sent Today
3290
3320
  */
3291
3321
  sent_today: number;
3322
+ skips: EmailBatchSkips;
3292
3323
  /**
3293
3324
  * Stale Redraftable
3294
3325
  */
3295
3326
  stale_redraftable: number;
3327
+ /**
3328
+ * Stale Sent
3329
+ */
3330
+ stale_sent: number;
3296
3331
  /**
3297
3332
  * Start At
3298
3333
  */
@@ -3319,6 +3354,25 @@ export type EmailBatchResponse = {
3319
3354
  timezone: string;
3320
3355
  window: TimeWindow | null;
3321
3356
  };
3357
+ /**
3358
+ * EmailBatchSkips
3359
+ *
3360
+ * `counts.skipped`, by who decided it.
3361
+ */
3362
+ export type EmailBatchSkips = {
3363
+ /**
3364
+ * Duplicate Recipient
3365
+ */
3366
+ duplicate_recipient: number;
3367
+ /**
3368
+ * Operator
3369
+ */
3370
+ operator: number;
3371
+ /**
3372
+ * Unfillable
3373
+ */
3374
+ unfillable: number;
3375
+ };
3322
3376
  /**
3323
3377
  * EmailRecipientInput
3324
3378
  *
@@ -3410,11 +3464,11 @@ export type EmailRecipientResponse = {
3410
3464
  /**
3411
3465
  * Skip Reason
3412
3466
  */
3413
- skip_reason: string | null;
3467
+ skip_reason: 'operator' | 'duplicate_recipient' | 'unfillable' | null;
3414
3468
  /**
3415
3469
  * Status
3416
3470
  */
3417
- status: 'pending' | 'drafting' | 'draft' | 'draft_failed' | 'skipped' | 'queued' | 'sending' | 'sent' | 'send_failed';
3471
+ status: 'pending' | 'drafting' | 'draft' | 'draft_failed' | 'skipped' | 'sending' | 'sent' | 'send_failed' | 'queued' | 'canceled';
3418
3472
  /**
3419
3473
  * Task Run Id
3420
3474
  */
@@ -3437,19 +3491,20 @@ export type EmailRecipientResponse = {
3437
3491
  *
3438
3492
  * Where this send's rows are.
3439
3493
  *
3440
- * ``total`` is what the send was created with and never changes — a send's row
3441
- * set is immutable — so ``returned`` is what is left once every other bucket is
3442
- * accounted for: the rows a cancel or a failure handed back as drafts.
3494
+ * ``total`` is the rows a `selected` send was created with, and null for an
3495
+ * `all` send, which cannot know it while drafting runs. ``queued`` and
3496
+ * ``drafting`` are what it still covers — drafts ready to go, and rows still
3497
+ * being written — so both are 0 once it has ended.
3443
3498
  */
3444
3499
  export type EmailSendCounts = {
3445
3500
  /**
3446
- * Queued
3501
+ * Drafting
3447
3502
  */
3448
- queued: number;
3503
+ drafting: number;
3449
3504
  /**
3450
- * Returned
3505
+ * Queued
3451
3506
  */
3452
- returned: number;
3507
+ queued: number;
3453
3508
  /**
3454
3509
  * Send Failed
3455
3510
  */
@@ -3469,7 +3524,7 @@ export type EmailSendCounts = {
3469
3524
  /**
3470
3525
  * Total
3471
3526
  */
3472
- total: number;
3527
+ total: number | null;
3473
3528
  };
3474
3529
  /**
3475
3530
  * EmailSendResponse
@@ -3511,11 +3566,15 @@ export type EmailSendResponse = {
3511
3566
  /**
3512
3567
  * Next Send Reason
3513
3568
  */
3514
- next_send_reason: 'start' | 'window' | 'daily_cap' | 'retry' | 'gap' | null;
3569
+ next_send_reason: 'start' | 'window' | 'daily_cap' | 'retry' | 'gap' | 'drafting' | null;
3515
3570
  /**
3516
3571
  * Reply To
3517
3572
  */
3518
3573
  reply_to: string | null;
3574
+ /**
3575
+ * Scope
3576
+ */
3577
+ scope: 'all' | 'selected';
3519
3578
  /**
3520
3579
  * Send Attempts
3521
3580
  */
@@ -3890,7 +3949,12 @@ export type HandoffTarget = {
3890
3949
  * Liveness of the API process itself.
3891
3950
  */
3892
3951
  export type HealthResponse = {
3893
- model_registry?: ModelRegistryHealth | null;
3952
+ /**
3953
+ * Model Registry
3954
+ */
3955
+ model_registry?: {
3956
+ [key: string]: ModelRegistryHealth;
3957
+ } | null;
3894
3958
  /**
3895
3959
  * Status
3896
3960
  */
@@ -5196,6 +5260,10 @@ export type LLMCatalogEntryResponse = {
5196
5260
  * Label
5197
5261
  */
5198
5262
  label: string | null;
5263
+ /**
5264
+ * Logo Url
5265
+ */
5266
+ logo_url: string | null;
5199
5267
  /**
5200
5268
  * Model
5201
5269
  */
@@ -5225,6 +5293,30 @@ export type LLMCatalogEntryResponse = {
5225
5293
  vision: boolean;
5226
5294
  [key: string]: unknown;
5227
5295
  };
5296
+ /**
5297
+ * LLMModelSearchResponse
5298
+ *
5299
+ * One page of a searched provider's language models — never the whole
5300
+ * registry.
5301
+ *
5302
+ * Ordered by real-world popularity when `q` is empty (OpenRouter ranks its own
5303
+ * list by tokens processed, so the first screen is the models people actually
5304
+ * run) and by match quality when it is not, popularity breaking the ties.
5305
+ */
5306
+ export type LLMModelSearchResponse = {
5307
+ /**
5308
+ * Kind
5309
+ */
5310
+ kind: 'llm';
5311
+ /**
5312
+ * Models
5313
+ */
5314
+ models: Array<LLMCatalogEntryResponse>;
5315
+ /**
5316
+ * Next Cursor
5317
+ */
5318
+ next_cursor: string | null;
5319
+ };
5228
5320
  /**
5229
5321
  * LLMModelSpec
5230
5322
  */
@@ -5233,6 +5325,12 @@ export type LLMModelSpec = {
5233
5325
  * Builtin Tools
5234
5326
  */
5235
5327
  builtin_tools?: Array<BuiltinToolSpec>;
5328
+ /**
5329
+ * Hosts
5330
+ *
5331
+ * OpenRouter only: the hosts allowed to serve this model, from list_model_hosts; the fastest of them answers. Unset lets OpenRouter use any host.
5332
+ */
5333
+ hosts?: Array<string> | null;
5236
5334
  /**
5237
5335
  * Model
5238
5336
  */
@@ -5264,6 +5362,12 @@ export type LLMModelSpecOverride = {
5264
5362
  * Builtin Tools
5265
5363
  */
5266
5364
  builtin_tools?: Array<BuiltinToolSpec> | null;
5365
+ /**
5366
+ * Hosts
5367
+ *
5368
+ * OpenRouter only: the hosts allowed to serve this model, from list_model_hosts; the fastest of them answers. Unset lets OpenRouter use any host.
5369
+ */
5370
+ hosts?: Array<string> | null;
5267
5371
  /**
5268
5372
  * Model
5269
5373
  */
@@ -5365,6 +5469,12 @@ export type LLMSpec = {
5365
5469
  */
5366
5470
  builtin_tools?: Array<BuiltinToolSpec>;
5367
5471
  fallback?: LLMModelSpec | null;
5472
+ /**
5473
+ * Hosts
5474
+ *
5475
+ * OpenRouter only: the hosts allowed to serve this model, from list_model_hosts; the fastest of them answers. Unset lets OpenRouter use any host.
5476
+ */
5477
+ hosts?: Array<string> | null;
5368
5478
  /**
5369
5479
  * Model
5370
5480
  */
@@ -5397,6 +5507,12 @@ export type LLMSpecOverride = {
5397
5507
  */
5398
5508
  builtin_tools?: Array<BuiltinToolSpec> | null;
5399
5509
  fallback?: LLMModelSpecOverride | null;
5510
+ /**
5511
+ * Hosts
5512
+ *
5513
+ * OpenRouter only: the hosts allowed to serve this model, from list_model_hosts; the fastest of them answers. Unset lets OpenRouter use any host.
5514
+ */
5515
+ hosts?: Array<string> | null;
5400
5516
  /**
5401
5517
  * Model
5402
5518
  */
@@ -5545,6 +5661,63 @@ export type McpSelection = {
5545
5661
  integration_id?: string | null;
5546
5662
  mcp?: InlineMcpServer | null;
5547
5663
  };
5664
+ /**
5665
+ * ModelHostResponse
5666
+ *
5667
+ * One endpoint that can serve an OpenRouter language model.
5668
+ */
5669
+ export type ModelHostResponse = {
5670
+ /**
5671
+ * All Endpoints
5672
+ */
5673
+ all_endpoints: boolean;
5674
+ /**
5675
+ * Context Length
5676
+ */
5677
+ context_length: number | null;
5678
+ /**
5679
+ * Host
5680
+ */
5681
+ host: string;
5682
+ /**
5683
+ * Latency P50 Ms
5684
+ */
5685
+ latency_p50_ms: number | null;
5686
+ /**
5687
+ * Logo Url
5688
+ */
5689
+ logo_url: string | null;
5690
+ /**
5691
+ * Name
5692
+ */
5693
+ name: string;
5694
+ pricing: LLMPricing;
5695
+ /**
5696
+ * Quantization
5697
+ */
5698
+ quantization: string | null;
5699
+ /**
5700
+ * Throughput P50
5701
+ */
5702
+ throughput_p50: number | null;
5703
+ /**
5704
+ * Uptime 30M
5705
+ */
5706
+ uptime_30m: number | null;
5707
+ };
5708
+ /**
5709
+ * ModelHostsResponse
5710
+ */
5711
+ export type ModelHostsResponse = {
5712
+ /**
5713
+ * Hosts
5714
+ */
5715
+ hosts: Array<ModelHostResponse>;
5716
+ /**
5717
+ * Model
5718
+ */
5719
+ model: string;
5720
+ };
5548
5721
  /**
5549
5722
  * ModelMetadata
5550
5723
  *
@@ -5564,7 +5737,7 @@ export type ModelMetadata = {
5564
5737
  /**
5565
5738
  * ModelRegistryHealth
5566
5739
  *
5567
- * How fresh this process's searched-provider model list is.
5740
+ * How fresh one kind of this process's searched-provider model list is.
5568
5741
  *
5569
5742
  * A silently stale registry is the one failure this design trades for
5570
5743
  * freshness — a refresh that keeps failing holds the last good snapshot
@@ -5586,25 +5759,6 @@ export type ModelRegistryHealth = {
5586
5759
  */
5587
5760
  models: number;
5588
5761
  };
5589
- /**
5590
- * ModelSearchResponse
5591
- *
5592
- * One page of a searched provider's models — never the whole registry.
5593
- *
5594
- * Ordered by real-world popularity when `q` is empty (OpenRouter ranks its own
5595
- * list by tokens processed, so the first screen is the models people actually
5596
- * run) and by match quality when it is not, popularity breaking the ties.
5597
- */
5598
- export type ModelSearchResponse = {
5599
- /**
5600
- * Models
5601
- */
5602
- models: Array<LLMCatalogEntryResponse>;
5603
- /**
5604
- * Next Cursor
5605
- */
5606
- next_cursor: string | null;
5607
- };
5608
5762
  /**
5609
5763
  * NodeContentResponse
5610
5764
  */
@@ -5654,6 +5808,10 @@ export type NoiseCancellationCatalogEntryResponse = {
5654
5808
  * Label
5655
5809
  */
5656
5810
  label: string | null;
5811
+ /**
5812
+ * Logo Url
5813
+ */
5814
+ logo_url: string | null;
5657
5815
  /**
5658
5816
  * Model
5659
5817
  */
@@ -7132,11 +7290,10 @@ export type PatchEmailRecipientRequest = {
7132
7290
  *
7133
7291
  * Re-steer one send: its pacing, its hours, its ceiling, its start time.
7134
7292
  *
7135
- * It never edits the sender, and it never edits the row set in either
7136
- * direction. To change what a scheduled send contains, cancel it — every unsent
7137
- * row comes back as a draft — and create another. A second way to move a row
7138
- * out of a send would be a second state machine to keep correct for something
7139
- * cancel already covers.
7293
+ * Never its sender and never its scope — "re-steer the pacing, never the
7294
+ * contents". Widening a send is another send; narrowing one has no defensible
7295
+ * answer to "which rows does it keep?". To change what a send covers, cancel it
7296
+ * — its unsent rows simply stay drafts — and create another.
7140
7297
  */
7141
7298
  export type PatchEmailSendRequest = {
7142
7299
  /**
@@ -7699,6 +7856,10 @@ export type ProviderEntryResponse = {
7699
7856
  * Logo Url
7700
7857
  */
7701
7858
  logo_url: string;
7859
+ /**
7860
+ * Searched Kinds
7861
+ */
7862
+ searched_kinds: Array<'llm' | 'stt'>;
7702
7863
  };
7703
7864
  /**
7704
7865
  * ProviderKeyResponse
@@ -7919,6 +8080,10 @@ export type RealtimeCatalogEntryResponse = {
7919
8080
  * Languages
7920
8081
  */
7921
8082
  languages: Array<LanguageOption>;
8083
+ /**
8084
+ * Logo Url
8085
+ */
8086
+ logo_url: string | null;
7922
8087
  /**
7923
8088
  * Model
7924
8089
  */
@@ -7945,6 +8110,10 @@ export type RealtimeCatalogEntryResponse = {
7945
8110
  * Speed Min
7946
8111
  */
7947
8112
  speed_min: number;
8113
+ /**
8114
+ * Supports Instruction Update
8115
+ */
8116
+ supports_instruction_update: boolean;
7948
8117
  /**
7949
8118
  * Supports Speed
7950
8119
  */
@@ -8326,11 +8495,10 @@ export type RecordingState = 'none' | 'available' | 'pending' | 'expired' | 'fai
8326
8495
  * Four selections, and they differ in what they REFUSE as much as in what they
8327
8496
  * move, because a redraft discards a draft the tenant has already paid for:
8328
8497
  *
8329
- * - ``all`` — every row in the batch. Rows already sent or queued come back in
8498
+ * - ``all`` — every row in the batch. Rows already sent or mid-send come back in
8330
8499
  * ``rejected``, by name, so a bulk press cannot quietly do less than it said.
8331
8500
  * - ``failed`` — rows whose drafting failed.
8332
- * - ``not_sent`` — every row that has not left and is not about to, with
8333
- * nothing rejected.
8501
+ * - ``not_sent`` — every row that has not left, with nothing rejected.
8334
8502
  * - ``stale_version`` — rows drafted by a task version older than the one
8335
8503
  * published now. The selection that makes "watch the output, improve the
8336
8504
  * task, publish, redraft the rest" a workflow rather than a wish.
@@ -8559,6 +8727,10 @@ export type STTCatalogEntryResponse = {
8559
8727
  * Languages
8560
8728
  */
8561
8729
  languages: Array<LanguageOption>;
8730
+ /**
8731
+ * Logo Url
8732
+ */
8733
+ logo_url: string | null;
8562
8734
  /**
8563
8735
  * Model
8564
8736
  */
@@ -8583,6 +8755,26 @@ export type STTCatalogEntryResponse = {
8583
8755
  streaming: boolean;
8584
8756
  [key: string]: unknown;
8585
8757
  };
8758
+ /**
8759
+ * STTModelSearchResponse
8760
+ *
8761
+ * One page of a searched provider's speech-to-text models, ordered as the
8762
+ * provider lists them.
8763
+ */
8764
+ export type STTModelSearchResponse = {
8765
+ /**
8766
+ * Kind
8767
+ */
8768
+ kind: 'stt';
8769
+ /**
8770
+ * Models
8771
+ */
8772
+ models: Array<STTCatalogEntryResponse>;
8773
+ /**
8774
+ * Next Cursor
8775
+ */
8776
+ next_cursor: string | null;
8777
+ };
8586
8778
  /**
8587
8779
  * STTModelSpec
8588
8780
  */
@@ -8643,6 +8835,10 @@ export type STTPriceLine = {
8643
8835
  * Provider
8644
8836
  */
8645
8837
  provider: string;
8838
+ /**
8839
+ * Provider Reported
8840
+ */
8841
+ provider_reported: boolean;
8646
8842
  rates: STTPricing | null;
8647
8843
  };
8648
8844
  /**
@@ -8716,6 +8912,10 @@ export type STTUsage = {
8716
8912
  * Provider
8717
8913
  */
8718
8914
  provider: string;
8915
+ /**
8916
+ * Reported Cost
8917
+ */
8918
+ reported_cost: string | null;
8719
8919
  };
8720
8920
  /**
8721
8921
  * STTUsageResponse
@@ -8826,7 +9026,7 @@ export type SelectRecipientsRequest = {
8826
9026
  /**
8827
9027
  * Selection
8828
9028
  *
8829
- * Every row this verb can act on: `draft` for skip, `skipped` for restore.
9029
+ * Every row this verb can act on: drafts for skip, rows a person skipped for restore.
8830
9030
  */
8831
9031
  selection?: 'all_eligible' | null;
8832
9032
  };
@@ -9249,6 +9449,10 @@ export type TTSCatalogEntryResponse = {
9249
9449
  * Languages
9250
9450
  */
9251
9451
  languages: Array<LanguageOption>;
9452
+ /**
9453
+ * Logo Url
9454
+ */
9455
+ logo_url: string | null;
9252
9456
  /**
9253
9457
  * Model
9254
9458
  */
@@ -12813,6 +13017,10 @@ export type CatalogModelsSearchData = {
12813
13017
  * Cursor
12814
13018
  */
12815
13019
  cursor?: string;
13020
+ /**
13021
+ * Kind
13022
+ */
13023
+ kind?: 'llm' | 'stt';
12816
13024
  };
12817
13025
  url: '/v1/catalog/models';
12818
13026
  };
@@ -12833,11 +13041,50 @@ export type CatalogModelsSearchErrors = {
12833
13041
  export type CatalogModelsSearchError = CatalogModelsSearchErrors[keyof CatalogModelsSearchErrors];
12834
13042
  export type CatalogModelsSearchResults = {
12835
13043
  /**
13044
+ * Response Catalog.Models.Search
13045
+ *
12836
13046
  * Successful Response
12837
13047
  */
12838
- 200: ModelSearchResponse;
13048
+ 200: ({
13049
+ kind: 'llm';
13050
+ } & LLMModelSearchResponse) | ({
13051
+ kind: 'stt';
13052
+ } & STTModelSearchResponse);
12839
13053
  };
12840
13054
  export type CatalogModelsSearchResult = CatalogModelsSearchResults[keyof CatalogModelsSearchResults];
13055
+ export type CatalogModelsHostsData = {
13056
+ body?: never;
13057
+ path?: never;
13058
+ query: {
13059
+ /**
13060
+ * Model
13061
+ */
13062
+ model: string;
13063
+ };
13064
+ url: '/v1/catalog/models/hosts';
13065
+ };
13066
+ export type CatalogModelsHostsErrors = {
13067
+ /**
13068
+ * Missing credential, or one that is revoked or no longer a member of this organization.
13069
+ */
13070
+ 401: ErrorResponse;
13071
+ /**
13072
+ * The request did not match this operation's schema; `detail.errors` lists each field.
13073
+ */
13074
+ 422: ErrorResponse;
13075
+ /**
13076
+ * Unexpected error. Every error this API returns carries this body.
13077
+ */
13078
+ default: ErrorResponse;
13079
+ };
13080
+ export type CatalogModelsHostsError = CatalogModelsHostsErrors[keyof CatalogModelsHostsErrors];
13081
+ export type CatalogModelsHostsResults = {
13082
+ /**
13083
+ * Successful Response
13084
+ */
13085
+ 200: ModelHostsResponse;
13086
+ };
13087
+ export type CatalogModelsHostsResult = CatalogModelsHostsResults[keyof CatalogModelsHostsResults];
12841
13088
  export type CatalogVoicesListData = {
12842
13089
  body?: never;
12843
13090
  path?: never;