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

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.
@@ -8633,6 +8633,76 @@ export const zCredentialLifecycleRestoreCredentialResponse = z.object({
8633
8633
  success: z.boolean()
8634
8634
  });
8635
8635
 
8636
+ export const zCredentialRotateRotateCredentialBody = z.object({
8637
+ disposition: z.enum([
8638
+ 'keep',
8639
+ 'archive',
8640
+ 'delete'
8641
+ ]),
8642
+ newCredentialId: z.string().min(1),
8643
+ reason: z.string().min(1)
8644
+ });
8645
+
8646
+ export const zCredentialRotateRotateCredentialPath = z.object({
8647
+ projectId: z.string(),
8648
+ providerId: z.string().min(1),
8649
+ credentialId: z.string().min(1)
8650
+ });
8651
+
8652
+ /**
8653
+ * Success
8654
+ */
8655
+ export const zCredentialRotateRotateCredentialResponse = z.object({
8656
+ code: z.number(),
8657
+ data: z.object({
8658
+ disposition: z.enum([
8659
+ 'keep',
8660
+ 'archive',
8661
+ 'delete',
8662
+ 'skipped_due_to_failures',
8663
+ 'skipped_due_to_test_failure',
8664
+ 'skipped_due_to_pending_approval',
8665
+ 'skipped_due_to_shared_credential'
8666
+ ]),
8667
+ failedEnvs: z.array(z.object({
8668
+ environmentId: z.string(),
8669
+ failureReason: z.string()
8670
+ })),
8671
+ movedEnvs: z.array(z.object({
8672
+ environmentId: z.string()
8673
+ })),
8674
+ pendingApprovalEnvs: z.array(z.object({
8675
+ environmentId: z.string()
8676
+ })),
8677
+ testOutcome: z.enum([
8678
+ 'passed',
8679
+ 'deferred',
8680
+ 'failed'
8681
+ ])
8682
+ }).nullable(),
8683
+ error: z.object({
8684
+ code: z.string(),
8685
+ details: z.unknown().nullish(),
8686
+ message: z.string(),
8687
+ rowErrors: z.array(z.object({
8688
+ code: z.string(),
8689
+ message: z.string(),
8690
+ path: z.array(z.union([z.string(), z.number()]))
8691
+ })).nullish()
8692
+ }).nullable(),
8693
+ pagination: z.object({
8694
+ limit: z.int().gte(1).lte(100),
8695
+ page: z.int().gte(1),
8696
+ total: z.int().gte(0),
8697
+ totalPages: z.int().gte(0)
8698
+ }).nullable(),
8699
+ sdkBehavior: z.object({
8700
+ flags: z.record(z.string(), z.unknown()),
8701
+ v: z.int().gte(1)
8702
+ }).nullish(),
8703
+ success: z.boolean()
8704
+ });
8705
+
8636
8706
  export const zProviderDisconnectDisconnectProviderBody = z.object({
8637
8707
  environmentIds: z.array(z.string().min(1)).min(1).max(50),
8638
8708
  reason: z.string().min(1).nullish()
@@ -8837,6 +8907,7 @@ export const zProviderEmergencyRotationEmergencyRotateProviderCredentialResponse
8837
8907
  envSlug: z.string(),
8838
8908
  environmentId: z.string(),
8839
8909
  id: z.string(),
8910
+ modelAllowlistCleared: z.boolean().nullish(),
8840
8911
  providerId: z.string(),
8841
8912
  reason: z.string().nullable(),
8842
8913
  state: z.enum(['current', 'pending'])
@@ -8898,6 +8969,7 @@ export const zProviderRollbackRollbackProviderEnvActivationResponse = z.object({
8898
8969
  envSlug: z.string(),
8899
8970
  environmentId: z.string(),
8900
8971
  id: z.string(),
8972
+ modelAllowlistCleared: z.boolean().nullish(),
8901
8973
  providerId: z.string(),
8902
8974
  reason: z.string().nullable(),
8903
8975
  state: z.enum(['current', 'pending'])
@@ -10769,6 +10841,225 @@ export const zRoutingProvidersTestRoutingCredentialResponse = z.object({
10769
10841
  success: z.boolean()
10770
10842
  });
10771
10843
 
10844
+ export const zProviderConfigDraftsDiscardProviderDraftPath = z.object({
10845
+ projectId: z.string(),
10846
+ providerId: z.string().min(1)
10847
+ });
10848
+
10849
+ /**
10850
+ * Success
10851
+ */
10852
+ export const zProviderConfigDraftsDiscardProviderDraftResponse = z.object({
10853
+ code: z.number(),
10854
+ data: z.object({
10855
+ discarded: z.literal(true)
10856
+ }).nullable(),
10857
+ error: z.object({
10858
+ code: z.string(),
10859
+ details: z.unknown().nullish(),
10860
+ message: z.string(),
10861
+ rowErrors: z.array(z.object({
10862
+ code: z.string(),
10863
+ message: z.string(),
10864
+ path: z.array(z.union([z.string(), z.number()]))
10865
+ })).nullish()
10866
+ }).nullable(),
10867
+ pagination: z.object({
10868
+ limit: z.int().gte(1).lte(100),
10869
+ page: z.int().gte(1),
10870
+ total: z.int().gte(0),
10871
+ totalPages: z.int().gte(0)
10872
+ }).nullable(),
10873
+ sdkBehavior: z.object({
10874
+ flags: z.record(z.string(), z.unknown()),
10875
+ v: z.int().gte(1)
10876
+ }).nullish(),
10877
+ success: z.boolean()
10878
+ });
10879
+
10880
+ export const zProviderConfigDraftsGetProviderDraftPath = z.object({
10881
+ projectId: z.string(),
10882
+ providerId: z.string().min(1)
10883
+ });
10884
+
10885
+ /**
10886
+ * Success
10887
+ */
10888
+ export const zProviderConfigDraftsGetProviderDraftResponse = z.object({
10889
+ code: z.number(),
10890
+ data: z.object({
10891
+ configSnapshot: z.record(z.string(), z.unknown()),
10892
+ createdAt: z.iso.datetime(),
10893
+ createdBy: z.string().nullable(),
10894
+ fromVersionId: z.string(),
10895
+ id: z.string(),
10896
+ providerId: z.string()
10897
+ }).nullable(),
10898
+ error: z.object({
10899
+ code: z.string(),
10900
+ details: z.unknown().nullish(),
10901
+ message: z.string(),
10902
+ rowErrors: z.array(z.object({
10903
+ code: z.string(),
10904
+ message: z.string(),
10905
+ path: z.array(z.union([z.string(), z.number()]))
10906
+ })).nullish()
10907
+ }).nullable(),
10908
+ pagination: z.object({
10909
+ limit: z.int().gte(1).lte(100),
10910
+ page: z.int().gte(1),
10911
+ total: z.int().gte(0),
10912
+ totalPages: z.int().gte(0)
10913
+ }).nullable(),
10914
+ sdkBehavior: z.object({
10915
+ flags: z.record(z.string(), z.unknown()),
10916
+ v: z.int().gte(1)
10917
+ }).nullish(),
10918
+ success: z.boolean()
10919
+ });
10920
+
10921
+ export const zProviderConfigDraftsEnsureProviderDraftPath = z.object({
10922
+ projectId: z.string(),
10923
+ providerId: z.string().min(1)
10924
+ });
10925
+
10926
+ /**
10927
+ * Success
10928
+ */
10929
+ export const zProviderConfigDraftsEnsureProviderDraftResponse = z.object({
10930
+ code: z.number(),
10931
+ data: z.object({
10932
+ configSnapshot: z.record(z.string(), z.unknown()),
10933
+ createdAt: z.iso.datetime(),
10934
+ createdBy: z.string().nullable(),
10935
+ fromVersionId: z.string(),
10936
+ id: z.string(),
10937
+ providerId: z.string()
10938
+ }).nullable(),
10939
+ error: z.object({
10940
+ code: z.string(),
10941
+ details: z.unknown().nullish(),
10942
+ message: z.string(),
10943
+ rowErrors: z.array(z.object({
10944
+ code: z.string(),
10945
+ message: z.string(),
10946
+ path: z.array(z.union([z.string(), z.number()]))
10947
+ })).nullish()
10948
+ }).nullable(),
10949
+ pagination: z.object({
10950
+ limit: z.int().gte(1).lte(100),
10951
+ page: z.int().gte(1),
10952
+ total: z.int().gte(0),
10953
+ totalPages: z.int().gte(0)
10954
+ }).nullable(),
10955
+ sdkBehavior: z.object({
10956
+ flags: z.record(z.string(), z.unknown()),
10957
+ v: z.int().gte(1)
10958
+ }).nullish(),
10959
+ success: z.boolean()
10960
+ });
10961
+
10962
+ export const zProviderConfigDraftsCommitProviderDraftBody = z.object({
10963
+ environments: z.array(z.object({
10964
+ envSlug: z.string().min(1),
10965
+ environmentId: z.string().min(1)
10966
+ })).max(20),
10967
+ reason: z.string().nullish()
10968
+ });
10969
+
10970
+ export const zProviderConfigDraftsCommitProviderDraftPath = z.object({
10971
+ projectId: z.string(),
10972
+ providerId: z.string().min(1)
10973
+ });
10974
+
10975
+ /**
10976
+ * Success
10977
+ */
10978
+ export const zProviderConfigDraftsCommitProviderDraftResponse = z.object({
10979
+ code: z.number(),
10980
+ data: z.object({
10981
+ deployResults: z.array(z.object({
10982
+ envSlug: z.string(),
10983
+ environmentId: z.string(),
10984
+ errorTag: z.string().nullish(),
10985
+ outcome: z.enum([
10986
+ 'deployed',
10987
+ 'pending',
10988
+ 'failed'
10989
+ ])
10990
+ })),
10991
+ version: z.number(),
10992
+ versionId: z.string()
10993
+ }).nullable(),
10994
+ error: z.object({
10995
+ code: z.string(),
10996
+ details: z.unknown().nullish(),
10997
+ message: z.string(),
10998
+ rowErrors: z.array(z.object({
10999
+ code: z.string(),
11000
+ message: z.string(),
11001
+ path: z.array(z.union([z.string(), z.number()]))
11002
+ })).nullish()
11003
+ }).nullable(),
11004
+ pagination: z.object({
11005
+ limit: z.int().gte(1).lte(100),
11006
+ page: z.int().gte(1),
11007
+ total: z.int().gte(0),
11008
+ totalPages: z.int().gte(0)
11009
+ }).nullable(),
11010
+ sdkBehavior: z.object({
11011
+ flags: z.record(z.string(), z.unknown()),
11012
+ v: z.int().gte(1)
11013
+ }).nullish(),
11014
+ success: z.boolean()
11015
+ });
11016
+
11017
+ export const zProviderConfigDraftsRestoreProviderVersionBody = z.object({
11018
+ confirmDiscard: z.boolean().nullish(),
11019
+ version: z.int().gt(0)
11020
+ });
11021
+
11022
+ export const zProviderConfigDraftsRestoreProviderVersionPath = z.object({
11023
+ projectId: z.string(),
11024
+ providerId: z.string().min(1)
11025
+ });
11026
+
11027
+ /**
11028
+ * Success
11029
+ */
11030
+ export const zProviderConfigDraftsRestoreProviderVersionResponse = z.object({
11031
+ code: z.number(),
11032
+ data: z.object({
11033
+ configSnapshot: z.record(z.string(), z.unknown()),
11034
+ createdAt: z.iso.datetime(),
11035
+ createdBy: z.string().nullable(),
11036
+ fromVersionId: z.string(),
11037
+ id: z.string(),
11038
+ providerId: z.string()
11039
+ }).nullable(),
11040
+ error: z.object({
11041
+ code: z.string(),
11042
+ details: z.unknown().nullish(),
11043
+ message: z.string(),
11044
+ rowErrors: z.array(z.object({
11045
+ code: z.string(),
11046
+ message: z.string(),
11047
+ path: z.array(z.union([z.string(), z.number()]))
11048
+ })).nullish()
11049
+ }).nullable(),
11050
+ pagination: z.object({
11051
+ limit: z.int().gte(1).lte(100),
11052
+ page: z.int().gte(1),
11053
+ total: z.int().gte(0),
11054
+ totalPages: z.int().gte(0)
11055
+ }).nullable(),
11056
+ sdkBehavior: z.object({
11057
+ flags: z.record(z.string(), z.unknown()),
11058
+ v: z.int().gte(1)
11059
+ }).nullish(),
11060
+ success: z.boolean()
11061
+ });
11062
+
10772
11063
  export const zProviderPromoteVersionPromoteProviderEnvVersionBody = z.object({
10773
11064
  reason: z.string().nullish(),
10774
11065
  version: z.int().gt(0)
@@ -10803,6 +11094,7 @@ export const zProviderPromoteVersionPromoteProviderEnvVersionResponse = z.object
10803
11094
  envSlug: z.string(),
10804
11095
  environmentId: z.string(),
10805
11096
  id: z.string(),
11097
+ modelAllowlistCleared: z.boolean().nullish(),
10806
11098
  providerId: z.string(),
10807
11099
  reason: z.string().nullable(),
10808
11100
  state: z.enum(['current', 'pending'])
@@ -10830,6 +11122,48 @@ export const zProviderPromoteVersionPromoteProviderEnvVersionResponse = z.object
10830
11122
  success: z.boolean()
10831
11123
  });
10832
11124
 
11125
+ export const zProviderModelUsageGetProviderModelUsagePath = z.object({
11126
+ projectId: z.string(),
11127
+ providerId: z.string().min(1)
11128
+ });
11129
+
11130
+ /**
11131
+ * Success
11132
+ */
11133
+ export const zProviderModelUsageGetProviderModelUsageResponse = z.object({
11134
+ code: z.number(),
11135
+ data: z.array(z.object({
11136
+ day: z.string(),
11137
+ errorCount: z.number(),
11138
+ model: z.string(),
11139
+ p50TtftMs: z.number().nullable(),
11140
+ requests: z.number(),
11141
+ spendUsd: z.number().nullable(),
11142
+ totalTokens: z.number()
11143
+ })).nullable(),
11144
+ error: z.object({
11145
+ code: z.string(),
11146
+ details: z.unknown().nullish(),
11147
+ message: z.string(),
11148
+ rowErrors: z.array(z.object({
11149
+ code: z.string(),
11150
+ message: z.string(),
11151
+ path: z.array(z.union([z.string(), z.number()]))
11152
+ })).nullish()
11153
+ }).nullable(),
11154
+ pagination: z.object({
11155
+ limit: z.int().gte(1).lte(100),
11156
+ page: z.int().gte(1),
11157
+ total: z.int().gte(0),
11158
+ totalPages: z.int().gte(0)
11159
+ }).nullable(),
11160
+ sdkBehavior: z.object({
11161
+ flags: z.record(z.string(), z.unknown()),
11162
+ v: z.int().gte(1)
11163
+ }).nullish(),
11164
+ success: z.boolean()
11165
+ });
11166
+
10833
11167
  export const zRoutingProvidersListRoutingModelsPath = z.object({
10834
11168
  projectId: z.string(),
10835
11169
  providerId: z.string().min(1)
@@ -11156,6 +11490,7 @@ export const zProviderConfigVersionsListProviderConfigVersionsResponse = z.objec
11156
11490
  contentHash: z.string(),
11157
11491
  createdAt: z.iso.datetime(),
11158
11492
  createdBy: z.string().nullable(),
11493
+ id: z.string(),
11159
11494
  liveInEnvSlugs: z.array(z.string()),
11160
11495
  version: z.int()
11161
11496
  })).nullable(),