@to11ai/sdk 2.0.0-rc.7 → 2.0.0-rc.9

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.
@@ -8459,6 +8459,7 @@ export const zCredentialLifecycleRenameCredentialPath = z.object({
8459
8459
  export const zCredentialLifecycleRenameCredentialResponse = z.object({
8460
8460
  code: z.number(),
8461
8461
  data: z.object({
8462
+ attachedElsewhere: z.boolean().nullish(),
8462
8463
  createdAt: z.iso.datetime(),
8463
8464
  credentialType: z.enum([
8464
8465
  'api-key',
@@ -8593,6 +8594,7 @@ export const zCredentialLifecycleRestoreCredentialResponse = z.object({
8593
8594
  code: z.number(),
8594
8595
  data: z.object({
8595
8596
  credential: z.object({
8597
+ attachedElsewhere: z.boolean().nullish(),
8596
8598
  createdAt: z.iso.datetime(),
8597
8599
  credentialType: z.enum([
8598
8600
  'api-key',
@@ -8633,6 +8635,76 @@ export const zCredentialLifecycleRestoreCredentialResponse = z.object({
8633
8635
  success: z.boolean()
8634
8636
  });
8635
8637
 
8638
+ export const zCredentialRotateRotateCredentialBody = z.object({
8639
+ disposition: z.enum([
8640
+ 'keep',
8641
+ 'archive',
8642
+ 'delete'
8643
+ ]),
8644
+ newCredentialId: z.string().min(1),
8645
+ reason: z.string().min(1)
8646
+ });
8647
+
8648
+ export const zCredentialRotateRotateCredentialPath = z.object({
8649
+ projectId: z.string(),
8650
+ providerId: z.string().min(1),
8651
+ credentialId: z.string().min(1)
8652
+ });
8653
+
8654
+ /**
8655
+ * Success
8656
+ */
8657
+ export const zCredentialRotateRotateCredentialResponse = z.object({
8658
+ code: z.number(),
8659
+ data: z.object({
8660
+ disposition: z.enum([
8661
+ 'keep',
8662
+ 'archive',
8663
+ 'delete',
8664
+ 'skipped_due_to_failures',
8665
+ 'skipped_due_to_test_failure',
8666
+ 'skipped_due_to_pending_approval',
8667
+ 'skipped_due_to_shared_credential'
8668
+ ]),
8669
+ failedEnvs: z.array(z.object({
8670
+ environmentId: z.string(),
8671
+ failureReason: z.string()
8672
+ })),
8673
+ movedEnvs: z.array(z.object({
8674
+ environmentId: z.string()
8675
+ })),
8676
+ pendingApprovalEnvs: z.array(z.object({
8677
+ environmentId: z.string()
8678
+ })),
8679
+ testOutcome: z.enum([
8680
+ 'passed',
8681
+ 'deferred',
8682
+ 'failed'
8683
+ ])
8684
+ }).nullable(),
8685
+ error: z.object({
8686
+ code: z.string(),
8687
+ details: z.unknown().nullish(),
8688
+ message: z.string(),
8689
+ rowErrors: z.array(z.object({
8690
+ code: z.string(),
8691
+ message: z.string(),
8692
+ path: z.array(z.union([z.string(), z.number()]))
8693
+ })).nullish()
8694
+ }).nullable(),
8695
+ pagination: z.object({
8696
+ limit: z.int().gte(1).lte(100),
8697
+ page: z.int().gte(1),
8698
+ total: z.int().gte(0),
8699
+ totalPages: z.int().gte(0)
8700
+ }).nullable(),
8701
+ sdkBehavior: z.object({
8702
+ flags: z.record(z.string(), z.unknown()),
8703
+ v: z.int().gte(1)
8704
+ }).nullish(),
8705
+ success: z.boolean()
8706
+ });
8707
+
8636
8708
  export const zProviderDisconnectDisconnectProviderBody = z.object({
8637
8709
  environmentIds: z.array(z.string().min(1)).min(1).max(50),
8638
8710
  reason: z.string().min(1).nullish()
@@ -8837,6 +8909,7 @@ export const zProviderEmergencyRotationEmergencyRotateProviderCredentialResponse
8837
8909
  envSlug: z.string(),
8838
8910
  environmentId: z.string(),
8839
8911
  id: z.string(),
8912
+ modelAllowlistCleared: z.boolean().nullish(),
8840
8913
  providerId: z.string(),
8841
8914
  reason: z.string().nullable(),
8842
8915
  state: z.enum(['current', 'pending'])
@@ -8898,6 +8971,7 @@ export const zProviderRollbackRollbackProviderEnvActivationResponse = z.object({
8898
8971
  envSlug: z.string(),
8899
8972
  environmentId: z.string(),
8900
8973
  id: z.string(),
8974
+ modelAllowlistCleared: z.boolean().nullish(),
8901
8975
  providerId: z.string(),
8902
8976
  reason: z.string().nullable(),
8903
8977
  state: z.enum(['current', 'pending'])
@@ -10541,6 +10615,7 @@ export const zRoutingProvidersListRoutingCredentialsQuery = z.object({
10541
10615
  export const zRoutingProvidersListRoutingCredentialsResponse = z.object({
10542
10616
  code: z.number(),
10543
10617
  data: z.array(z.object({
10618
+ attachedElsewhere: z.boolean().nullish(),
10544
10619
  createdAt: z.iso.datetime(),
10545
10620
  credentialType: z.enum([
10546
10621
  'api-key',
@@ -10626,6 +10701,7 @@ export const zRoutingProvidersCreateRoutingCredentialPath = z.object({
10626
10701
  export const zRoutingProvidersCreateRoutingCredentialResponse = z.object({
10627
10702
  code: z.number(),
10628
10703
  data: z.object({
10704
+ attachedElsewhere: z.boolean().nullish(),
10629
10705
  createdAt: z.iso.datetime(),
10630
10706
  credentialType: z.enum([
10631
10707
  'api-key',
@@ -10769,6 +10845,279 @@ export const zRoutingProvidersTestRoutingCredentialResponse = z.object({
10769
10845
  success: z.boolean()
10770
10846
  });
10771
10847
 
10848
+ export const zProviderConfigDraftsDiscardProviderDraftPath = z.object({
10849
+ projectId: z.string(),
10850
+ providerId: z.string().min(1)
10851
+ });
10852
+
10853
+ /**
10854
+ * Success
10855
+ */
10856
+ export const zProviderConfigDraftsDiscardProviderDraftResponse = z.object({
10857
+ code: z.number(),
10858
+ data: z.object({
10859
+ discarded: z.literal(true)
10860
+ }).nullable(),
10861
+ error: z.object({
10862
+ code: z.string(),
10863
+ details: z.unknown().nullish(),
10864
+ message: z.string(),
10865
+ rowErrors: z.array(z.object({
10866
+ code: z.string(),
10867
+ message: z.string(),
10868
+ path: z.array(z.union([z.string(), z.number()]))
10869
+ })).nullish()
10870
+ }).nullable(),
10871
+ pagination: z.object({
10872
+ limit: z.int().gte(1).lte(100),
10873
+ page: z.int().gte(1),
10874
+ total: z.int().gte(0),
10875
+ totalPages: z.int().gte(0)
10876
+ }).nullable(),
10877
+ sdkBehavior: z.object({
10878
+ flags: z.record(z.string(), z.unknown()),
10879
+ v: z.int().gte(1)
10880
+ }).nullish(),
10881
+ success: z.boolean()
10882
+ });
10883
+
10884
+ export const zProviderConfigDraftsGetProviderDraftPath = z.object({
10885
+ projectId: z.string(),
10886
+ providerId: z.string().min(1)
10887
+ });
10888
+
10889
+ /**
10890
+ * Success
10891
+ */
10892
+ export const zProviderConfigDraftsGetProviderDraftResponse = z.object({
10893
+ code: z.number(),
10894
+ data: z.object({
10895
+ configSnapshot: z.record(z.string(), z.unknown()),
10896
+ createdAt: z.iso.datetime(),
10897
+ createdBy: z.string().nullable(),
10898
+ fromVersionId: z.string(),
10899
+ id: z.string(),
10900
+ providerId: z.string()
10901
+ }).nullable(),
10902
+ error: z.object({
10903
+ code: z.string(),
10904
+ details: z.unknown().nullish(),
10905
+ message: z.string(),
10906
+ rowErrors: z.array(z.object({
10907
+ code: z.string(),
10908
+ message: z.string(),
10909
+ path: z.array(z.union([z.string(), z.number()]))
10910
+ })).nullish()
10911
+ }).nullable(),
10912
+ pagination: z.object({
10913
+ limit: z.int().gte(1).lte(100),
10914
+ page: z.int().gte(1),
10915
+ total: z.int().gte(0),
10916
+ totalPages: z.int().gte(0)
10917
+ }).nullable(),
10918
+ sdkBehavior: z.object({
10919
+ flags: z.record(z.string(), z.unknown()),
10920
+ v: z.int().gte(1)
10921
+ }).nullish(),
10922
+ success: z.boolean()
10923
+ });
10924
+
10925
+ export const zProviderConfigDraftsUpdateProviderDraftBody = z.object({
10926
+ configSnapshotPatch: z.object({
10927
+ baseUrl: z.string().nullish(),
10928
+ models: z.array(z.string()).nullish(),
10929
+ passthroughMode: z.enum([
10930
+ 'managed_precedence',
10931
+ 'caller_precedence',
10932
+ 'disabled'
10933
+ ]).nullish(),
10934
+ providerRegion: z.string().nullish()
10935
+ })
10936
+ });
10937
+
10938
+ export const zProviderConfigDraftsUpdateProviderDraftPath = z.object({
10939
+ projectId: z.string(),
10940
+ providerId: z.string().min(1)
10941
+ });
10942
+
10943
+ /**
10944
+ * Success
10945
+ */
10946
+ export const zProviderConfigDraftsUpdateProviderDraftResponse = z.object({
10947
+ code: z.number(),
10948
+ data: z.object({
10949
+ configSnapshot: z.record(z.string(), z.unknown()),
10950
+ createdAt: z.iso.datetime(),
10951
+ createdBy: z.string().nullable(),
10952
+ fromVersionId: z.string(),
10953
+ id: z.string(),
10954
+ providerId: z.string()
10955
+ }).nullable(),
10956
+ error: z.object({
10957
+ code: z.string(),
10958
+ details: z.unknown().nullish(),
10959
+ message: z.string(),
10960
+ rowErrors: z.array(z.object({
10961
+ code: z.string(),
10962
+ message: z.string(),
10963
+ path: z.array(z.union([z.string(), z.number()]))
10964
+ })).nullish()
10965
+ }).nullable(),
10966
+ pagination: z.object({
10967
+ limit: z.int().gte(1).lte(100),
10968
+ page: z.int().gte(1),
10969
+ total: z.int().gte(0),
10970
+ totalPages: z.int().gte(0)
10971
+ }).nullable(),
10972
+ sdkBehavior: z.object({
10973
+ flags: z.record(z.string(), z.unknown()),
10974
+ v: z.int().gte(1)
10975
+ }).nullish(),
10976
+ success: z.boolean()
10977
+ });
10978
+
10979
+ export const zProviderConfigDraftsEnsureProviderDraftPath = z.object({
10980
+ projectId: z.string(),
10981
+ providerId: z.string().min(1)
10982
+ });
10983
+
10984
+ /**
10985
+ * Success
10986
+ */
10987
+ export const zProviderConfigDraftsEnsureProviderDraftResponse = z.object({
10988
+ code: z.number(),
10989
+ data: z.object({
10990
+ configSnapshot: z.record(z.string(), z.unknown()),
10991
+ createdAt: z.iso.datetime(),
10992
+ createdBy: z.string().nullable(),
10993
+ fromVersionId: z.string(),
10994
+ id: z.string(),
10995
+ providerId: z.string()
10996
+ }).nullable(),
10997
+ error: z.object({
10998
+ code: z.string(),
10999
+ details: z.unknown().nullish(),
11000
+ message: z.string(),
11001
+ rowErrors: z.array(z.object({
11002
+ code: z.string(),
11003
+ message: z.string(),
11004
+ path: z.array(z.union([z.string(), z.number()]))
11005
+ })).nullish()
11006
+ }).nullable(),
11007
+ pagination: z.object({
11008
+ limit: z.int().gte(1).lte(100),
11009
+ page: z.int().gte(1),
11010
+ total: z.int().gte(0),
11011
+ totalPages: z.int().gte(0)
11012
+ }).nullable(),
11013
+ sdkBehavior: z.object({
11014
+ flags: z.record(z.string(), z.unknown()),
11015
+ v: z.int().gte(1)
11016
+ }).nullish(),
11017
+ success: z.boolean()
11018
+ });
11019
+
11020
+ export const zProviderConfigDraftsCommitProviderDraftBody = z.object({
11021
+ environments: z.array(z.object({
11022
+ envSlug: z.string().min(1),
11023
+ environmentId: z.string().min(1)
11024
+ })).max(20),
11025
+ reason: z.string().nullish()
11026
+ });
11027
+
11028
+ export const zProviderConfigDraftsCommitProviderDraftPath = z.object({
11029
+ projectId: z.string(),
11030
+ providerId: z.string().min(1)
11031
+ });
11032
+
11033
+ /**
11034
+ * Success
11035
+ */
11036
+ export const zProviderConfigDraftsCommitProviderDraftResponse = z.object({
11037
+ code: z.number(),
11038
+ data: z.object({
11039
+ deployResults: z.array(z.object({
11040
+ envSlug: z.string(),
11041
+ environmentId: z.string(),
11042
+ errorTag: z.string().nullish(),
11043
+ outcome: z.enum([
11044
+ 'deployed',
11045
+ 'pending',
11046
+ 'failed'
11047
+ ])
11048
+ })),
11049
+ version: z.number(),
11050
+ versionId: z.string()
11051
+ }).nullable(),
11052
+ error: z.object({
11053
+ code: z.string(),
11054
+ details: z.unknown().nullish(),
11055
+ message: z.string(),
11056
+ rowErrors: z.array(z.object({
11057
+ code: z.string(),
11058
+ message: z.string(),
11059
+ path: z.array(z.union([z.string(), z.number()]))
11060
+ })).nullish()
11061
+ }).nullable(),
11062
+ pagination: z.object({
11063
+ limit: z.int().gte(1).lte(100),
11064
+ page: z.int().gte(1),
11065
+ total: z.int().gte(0),
11066
+ totalPages: z.int().gte(0)
11067
+ }).nullable(),
11068
+ sdkBehavior: z.object({
11069
+ flags: z.record(z.string(), z.unknown()),
11070
+ v: z.int().gte(1)
11071
+ }).nullish(),
11072
+ success: z.boolean()
11073
+ });
11074
+
11075
+ export const zProviderConfigDraftsRestoreProviderVersionBody = z.object({
11076
+ confirmDiscard: z.boolean().nullish(),
11077
+ version: z.int().gt(0)
11078
+ });
11079
+
11080
+ export const zProviderConfigDraftsRestoreProviderVersionPath = z.object({
11081
+ projectId: z.string(),
11082
+ providerId: z.string().min(1)
11083
+ });
11084
+
11085
+ /**
11086
+ * Success
11087
+ */
11088
+ export const zProviderConfigDraftsRestoreProviderVersionResponse = z.object({
11089
+ code: z.number(),
11090
+ data: z.object({
11091
+ configSnapshot: z.record(z.string(), z.unknown()),
11092
+ createdAt: z.iso.datetime(),
11093
+ createdBy: z.string().nullable(),
11094
+ fromVersionId: z.string(),
11095
+ id: z.string(),
11096
+ providerId: z.string()
11097
+ }).nullable(),
11098
+ error: z.object({
11099
+ code: z.string(),
11100
+ details: z.unknown().nullish(),
11101
+ message: z.string(),
11102
+ rowErrors: z.array(z.object({
11103
+ code: z.string(),
11104
+ message: z.string(),
11105
+ path: z.array(z.union([z.string(), z.number()]))
11106
+ })).nullish()
11107
+ }).nullable(),
11108
+ pagination: z.object({
11109
+ limit: z.int().gte(1).lte(100),
11110
+ page: z.int().gte(1),
11111
+ total: z.int().gte(0),
11112
+ totalPages: z.int().gte(0)
11113
+ }).nullable(),
11114
+ sdkBehavior: z.object({
11115
+ flags: z.record(z.string(), z.unknown()),
11116
+ v: z.int().gte(1)
11117
+ }).nullish(),
11118
+ success: z.boolean()
11119
+ });
11120
+
10772
11121
  export const zProviderPromoteVersionPromoteProviderEnvVersionBody = z.object({
10773
11122
  reason: z.string().nullish(),
10774
11123
  version: z.int().gt(0)
@@ -10803,6 +11152,7 @@ export const zProviderPromoteVersionPromoteProviderEnvVersionResponse = z.object
10803
11152
  envSlug: z.string(),
10804
11153
  environmentId: z.string(),
10805
11154
  id: z.string(),
11155
+ modelAllowlistCleared: z.boolean().nullish(),
10806
11156
  providerId: z.string(),
10807
11157
  reason: z.string().nullable(),
10808
11158
  state: z.enum(['current', 'pending'])
@@ -10830,6 +11180,48 @@ export const zProviderPromoteVersionPromoteProviderEnvVersionResponse = z.object
10830
11180
  success: z.boolean()
10831
11181
  });
10832
11182
 
11183
+ export const zProviderModelUsageGetProviderModelUsagePath = z.object({
11184
+ projectId: z.string(),
11185
+ providerId: z.string().min(1)
11186
+ });
11187
+
11188
+ /**
11189
+ * Success
11190
+ */
11191
+ export const zProviderModelUsageGetProviderModelUsageResponse = z.object({
11192
+ code: z.number(),
11193
+ data: z.array(z.object({
11194
+ day: z.string(),
11195
+ errorCount: z.number(),
11196
+ model: z.string(),
11197
+ p50TtftMs: z.number().nullable(),
11198
+ requests: z.number(),
11199
+ spendUsd: z.number().nullable(),
11200
+ totalTokens: z.number()
11201
+ })).nullable(),
11202
+ error: z.object({
11203
+ code: z.string(),
11204
+ details: z.unknown().nullish(),
11205
+ message: z.string(),
11206
+ rowErrors: z.array(z.object({
11207
+ code: z.string(),
11208
+ message: z.string(),
11209
+ path: z.array(z.union([z.string(), z.number()]))
11210
+ })).nullish()
11211
+ }).nullable(),
11212
+ pagination: z.object({
11213
+ limit: z.int().gte(1).lte(100),
11214
+ page: z.int().gte(1),
11215
+ total: z.int().gte(0),
11216
+ totalPages: z.int().gte(0)
11217
+ }).nullable(),
11218
+ sdkBehavior: z.object({
11219
+ flags: z.record(z.string(), z.unknown()),
11220
+ v: z.int().gte(1)
11221
+ }).nullish(),
11222
+ success: z.boolean()
11223
+ });
11224
+
10833
11225
  export const zRoutingProvidersListRoutingModelsPath = z.object({
10834
11226
  projectId: z.string(),
10835
11227
  providerId: z.string().min(1)
@@ -11156,6 +11548,7 @@ export const zProviderConfigVersionsListProviderConfigVersionsResponse = z.objec
11156
11548
  contentHash: z.string(),
11157
11549
  createdAt: z.iso.datetime(),
11158
11550
  createdBy: z.string().nullable(),
11551
+ id: z.string(),
11159
11552
  liveInEnvSlugs: z.array(z.string()),
11160
11553
  version: z.int()
11161
11554
  })).nullable(),