@oxy.so/contracts 4.8.0 → 4.9.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.
Files changed (58) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/accountGraph.js +13 -5
  3. package/dist/cjs/accountSubject.js +189 -0
  4. package/dist/cjs/agency.js +56 -4
  5. package/dist/cjs/agentKeys.js +67 -0
  6. package/dist/cjs/capabilityBindings.js +72 -0
  7. package/dist/cjs/index.js +60 -13
  8. package/dist/cjs/inference/economics.js +135 -0
  9. package/dist/cjs/products/access.js +60 -0
  10. package/dist/cjs/products/billing.js +32 -0
  11. package/dist/cjs/signIn.js +1 -1
  12. package/dist/esm/.tsbuildinfo +1 -1
  13. package/dist/esm/accountGraph.js +13 -5
  14. package/dist/esm/accountSubject.js +182 -0
  15. package/dist/esm/agency.js +55 -3
  16. package/dist/esm/agentKeys.js +63 -0
  17. package/dist/esm/capabilityBindings.js +67 -0
  18. package/dist/esm/index.js +10 -1
  19. package/dist/esm/inference/economics.js +132 -0
  20. package/dist/esm/products/access.js +57 -0
  21. package/dist/esm/products/billing.js +29 -0
  22. package/dist/esm/signIn.js +1 -1
  23. package/dist/types/.tsbuildinfo +1 -1
  24. package/dist/types/accountGraph.d.ts +23 -8
  25. package/dist/types/accountSubject.d.ts +210 -0
  26. package/dist/types/agency.d.ts +956 -190
  27. package/dist/types/agentKeys.d.ts +525 -0
  28. package/dist/types/capabilityBindings.d.ts +6 -0
  29. package/dist/types/deviceDirectory.d.ts +50 -50
  30. package/dist/types/deviceSession.d.ts +14 -14
  31. package/dist/types/externalIdentity.d.ts +4 -4
  32. package/dist/types/identity.d.ts +2 -2
  33. package/dist/types/index.d.ts +12 -2
  34. package/dist/types/inference/accountBilling.d.ts +30 -30
  35. package/dist/types/inference/aliaModelRelease.d.ts +83 -83
  36. package/dist/types/inference/catalogue.d.ts +180 -180
  37. package/dist/types/inference/economics.d.ts +376 -0
  38. package/dist/types/inference/entitlement.d.ts +47 -47
  39. package/dist/types/inference/inbox.d.ts +12 -12
  40. package/dist/types/inference/modelDocumentation.d.ts +231 -231
  41. package/dist/types/inference/priceVersion.d.ts +4 -4
  42. package/dist/types/inference/providerConnection.d.ts +38 -38
  43. package/dist/types/inference/realtime.d.ts +802 -802
  44. package/dist/types/inference/request.d.ts +844 -844
  45. package/dist/types/inference/routingPolicy.d.ts +4 -4
  46. package/dist/types/inference/scopedExecution.d.ts +38 -38
  47. package/dist/types/inference/streamEvents.d.ts +4 -4
  48. package/dist/types/inference/usage.d.ts +12 -12
  49. package/dist/types/keyRotation.d.ts +2 -2
  50. package/dist/types/notifications.d.ts +4 -4
  51. package/dist/types/oauth.d.ts +30 -30
  52. package/dist/types/products/access.d.ts +487 -0
  53. package/dist/types/products/billing.d.ts +563 -0
  54. package/dist/types/recommendations.d.ts +2 -2
  55. package/dist/types/sessionStatus.d.ts +10 -10
  56. package/dist/types/signIn.d.ts +6 -6
  57. package/dist/types/transparency.d.ts +2 -2
  58. package/package.json +1 -1
@@ -253,8 +253,8 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
253
253
  dedicatedCapacity: z.ZodEnum<["disabled", "prefer", "require"]>;
254
254
  updatedAt: z.ZodString;
255
255
  }, "strip", z.ZodTypeAny, {
256
- updatedAt: string;
257
256
  schemaVersion: 2;
257
+ updatedAt: string;
258
258
  scope: {
259
259
  kind: "account";
260
260
  accountId: string & z.BRAND<"OxyAccountId">;
@@ -301,8 +301,8 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
301
301
  amount: string & z.BRAND<"ExactDecimal">;
302
302
  } | undefined;
303
303
  }, {
304
- updatedAt: string;
305
304
  schemaVersion: 2;
305
+ updatedAt: string;
306
306
  scope: {
307
307
  kind: "account";
308
308
  accountId: string;
@@ -349,8 +349,8 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
349
349
  allowedLicenseIds?: string[] | undefined;
350
350
  allowedRoutingProfileIds?: string[] | undefined;
351
351
  }>, {
352
- updatedAt: string;
353
352
  schemaVersion: 2;
353
+ updatedAt: string;
354
354
  scope: {
355
355
  kind: "account";
356
356
  accountId: string & z.BRAND<"OxyAccountId">;
@@ -397,8 +397,8 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
397
397
  amount: string & z.BRAND<"ExactDecimal">;
398
398
  } | undefined;
399
399
  }, {
400
- updatedAt: string;
401
400
  schemaVersion: 2;
401
+ updatedAt: string;
402
402
  scope: {
403
403
  kind: "account";
404
404
  accountId: string;
@@ -15,15 +15,15 @@ export declare const scopedExecutionAudienceSchema: z.ZodObject<{
15
15
  credentialId: z.ZodString;
16
16
  environment: z.ZodEnum<["development", "staging", "production"]>;
17
17
  }, "strict", z.ZodTypeAny, {
18
+ environment: "development" | "staging" | "production";
18
19
  accountId: string;
19
20
  applicationId: string;
20
21
  credentialId: string;
21
- environment: "development" | "staging" | "production";
22
22
  }, {
23
+ environment: "development" | "staging" | "production";
23
24
  accountId: string;
24
25
  applicationId: string;
25
26
  credentialId: string;
26
- environment: "development" | "staging" | "production";
27
27
  }>;
28
28
  policy: z.ZodObject<{
29
29
  routingPolicyId: z.ZodString;
@@ -45,50 +45,50 @@ export declare const scopedExecutionAudienceSchema: z.ZodObject<{
45
45
  providerSourceVersion: z.ZodString;
46
46
  maxCostUsd: z.ZodEffects<z.ZodBranded<z.ZodString, "ExactDecimal">, string & z.BRAND<"ExactDecimal">, string>;
47
47
  }, "strict", z.ZodTypeAny, {
48
- permitId: string;
49
- idempotencyKey: string;
50
- fixtureSha256: string;
51
48
  expiresAt: string;
49
+ keyId: string;
50
+ idempotencyKey: string;
52
51
  principal: {
52
+ environment: "development" | "staging" | "production";
53
53
  accountId: string;
54
54
  applicationId: string;
55
55
  credentialId: string;
56
- environment: "development" | "staging" | "production";
57
56
  };
57
+ provider: string;
58
+ priceVersionId: string;
59
+ modelReference: string;
60
+ permitId: string;
61
+ fixtureSha256: string;
58
62
  policy: {
59
63
  routingPolicyId: string;
60
64
  policyVersion: number;
61
65
  };
62
66
  deploymentId: string;
63
- provider: string;
64
- keyId: string;
65
- modelReference: string;
66
67
  upstreamModelId: string;
67
- priceVersionId: string;
68
68
  providerRateCardVersionId: string;
69
69
  providerSourceVersion: string;
70
70
  maxCostUsd: string & z.BRAND<"ExactDecimal">;
71
71
  }, {
72
- permitId: string;
73
- idempotencyKey: string;
74
- fixtureSha256: string;
75
72
  expiresAt: string;
73
+ keyId: string;
74
+ idempotencyKey: string;
76
75
  principal: {
76
+ environment: "development" | "staging" | "production";
77
77
  accountId: string;
78
78
  applicationId: string;
79
79
  credentialId: string;
80
- environment: "development" | "staging" | "production";
81
80
  };
81
+ provider: string;
82
+ priceVersionId: string;
83
+ modelReference: string;
84
+ permitId: string;
85
+ fixtureSha256: string;
82
86
  policy: {
83
87
  routingPolicyId: string;
84
88
  policyVersion: number;
85
89
  };
86
90
  deploymentId: string;
87
- provider: string;
88
- keyId: string;
89
- modelReference: string;
90
91
  upstreamModelId: string;
91
- priceVersionId: string;
92
92
  providerRateCardVersionId: string;
93
93
  providerSourceVersion: string;
94
94
  maxCostUsd: string;
@@ -104,15 +104,15 @@ export declare const scopedExecutionSchema: z.ZodObject<{
104
104
  credentialId: z.ZodString;
105
105
  environment: z.ZodEnum<["development", "staging", "production"]>;
106
106
  }, "strict", z.ZodTypeAny, {
107
+ environment: "development" | "staging" | "production";
107
108
  accountId: string;
108
109
  applicationId: string;
109
110
  credentialId: string;
110
- environment: "development" | "staging" | "production";
111
111
  }, {
112
+ environment: "development" | "staging" | "production";
112
113
  accountId: string;
113
114
  applicationId: string;
114
115
  credentialId: string;
115
- environment: "development" | "staging" | "production";
116
116
  }>;
117
117
  policy: z.ZodObject<{
118
118
  routingPolicyId: z.ZodString;
@@ -138,57 +138,57 @@ export declare const scopedExecutionSchema: z.ZodObject<{
138
138
  snapshotId: z.ZodString;
139
139
  catalogueEvidenceHash: z.ZodString;
140
140
  }, "strict", z.ZodTypeAny, {
141
- permitId: string;
142
- idempotencyKey: string;
143
- fixtureSha256: string;
144
141
  expiresAt: string;
142
+ requestId: string;
143
+ keyId: string;
144
+ idempotencyKey: string;
145
145
  principal: {
146
+ environment: "development" | "staging" | "production";
146
147
  accountId: string;
147
148
  applicationId: string;
148
149
  credentialId: string;
149
- environment: "development" | "staging" | "production";
150
150
  };
151
+ provider: string;
152
+ priceVersionId: string;
153
+ modelReference: string;
154
+ permitId: string;
155
+ fixtureSha256: string;
151
156
  policy: {
152
157
  routingPolicyId: string;
153
158
  policyVersion: number;
154
159
  };
155
160
  deploymentId: string;
156
- provider: string;
157
- keyId: string;
158
- modelReference: string;
159
161
  upstreamModelId: string;
160
- priceVersionId: string;
161
162
  providerRateCardVersionId: string;
162
163
  providerSourceVersion: string;
163
164
  maxCostUsd: string & z.BRAND<"ExactDecimal">;
164
- requestId: string;
165
165
  snapshotId: string;
166
166
  catalogueEvidenceHash: string;
167
167
  }, {
168
- permitId: string;
169
- idempotencyKey: string;
170
- fixtureSha256: string;
171
168
  expiresAt: string;
169
+ requestId: string;
170
+ keyId: string;
171
+ idempotencyKey: string;
172
172
  principal: {
173
+ environment: "development" | "staging" | "production";
173
174
  accountId: string;
174
175
  applicationId: string;
175
176
  credentialId: string;
176
- environment: "development" | "staging" | "production";
177
177
  };
178
+ provider: string;
179
+ priceVersionId: string;
180
+ modelReference: string;
181
+ permitId: string;
182
+ fixtureSha256: string;
178
183
  policy: {
179
184
  routingPolicyId: string;
180
185
  policyVersion: number;
181
186
  };
182
187
  deploymentId: string;
183
- provider: string;
184
- keyId: string;
185
- modelReference: string;
186
188
  upstreamModelId: string;
187
- priceVersionId: string;
188
189
  providerRateCardVersionId: string;
189
190
  providerSourceVersion: string;
190
191
  maxCostUsd: string;
191
- requestId: string;
192
192
  snapshotId: string;
193
193
  catalogueEvidenceHash: string;
194
194
  }>;
@@ -361,9 +361,9 @@ export declare const inferenceStreamRouteSwitchEventSchema: z.ZodObject<{
361
361
  occurredAt: z.ZodString;
362
362
  }, "strip", z.ZodTypeAny, {
363
363
  type: "route_switch";
364
+ schemaVersion: 1;
364
365
  reason: "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "capacity" | "policy_preference";
365
366
  occurredAt: string;
366
- schemaVersion: 1;
367
367
  requestId: string;
368
368
  detail: {
369
369
  scope: "deployment";
@@ -381,9 +381,9 @@ export declare const inferenceStreamRouteSwitchEventSchema: z.ZodObject<{
381
381
  sequence: number;
382
382
  }, {
383
383
  type: "route_switch";
384
+ schemaVersion: 1;
384
385
  reason: "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "capacity" | "policy_preference";
385
386
  occurredAt: string;
386
- schemaVersion: 1;
387
387
  requestId: string;
388
388
  detail: {
389
389
  scope: "deployment";
@@ -802,9 +802,9 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
802
802
  occurredAt: z.ZodString;
803
803
  }, "strip", z.ZodTypeAny, {
804
804
  type: "route_switch";
805
+ schemaVersion: 1;
805
806
  reason: "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "capacity" | "policy_preference";
806
807
  occurredAt: string;
807
- schemaVersion: 1;
808
808
  requestId: string;
809
809
  detail: {
810
810
  scope: "deployment";
@@ -822,9 +822,9 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
822
822
  sequence: number;
823
823
  }, {
824
824
  type: "route_switch";
825
+ schemaVersion: 1;
825
826
  reason: "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "capacity" | "policy_preference";
826
827
  occurredAt: string;
827
- schemaVersion: 1;
828
828
  requestId: string;
829
829
  detail: {
830
830
  scope: "deployment";
@@ -259,8 +259,8 @@ export declare const usageReservationSchema: z.ZodEffects<z.ZodObject<{
259
259
  }, "strip", z.ZodTypeAny, {
260
260
  status: "expired" | "held" | "settled" | "released";
261
261
  expiresAt: string;
262
- createdAt: string;
263
262
  schemaVersion: 1;
263
+ createdAt: string;
264
264
  currency: string;
265
265
  reservationId: string;
266
266
  reservedAmount: string & z.BRAND<"ExactDecimal">;
@@ -284,8 +284,8 @@ export declare const usageReservationSchema: z.ZodEffects<z.ZodObject<{
284
284
  }, {
285
285
  status: "expired" | "held" | "settled" | "released";
286
286
  expiresAt: string;
287
- createdAt: string;
288
287
  schemaVersion: 1;
288
+ createdAt: string;
289
289
  currency: string;
290
290
  reservationId: string;
291
291
  reservedAmount: string;
@@ -309,8 +309,8 @@ export declare const usageReservationSchema: z.ZodEffects<z.ZodObject<{
309
309
  }>, {
310
310
  status: "expired" | "held" | "settled" | "released";
311
311
  expiresAt: string;
312
- createdAt: string;
313
312
  schemaVersion: 1;
313
+ createdAt: string;
314
314
  currency: string;
315
315
  reservationId: string;
316
316
  reservedAmount: string & z.BRAND<"ExactDecimal">;
@@ -334,8 +334,8 @@ export declare const usageReservationSchema: z.ZodEffects<z.ZodObject<{
334
334
  }, {
335
335
  status: "expired" | "held" | "settled" | "released";
336
336
  expiresAt: string;
337
- createdAt: string;
338
337
  schemaVersion: 1;
338
+ createdAt: string;
339
339
  currency: string;
340
340
  reservationId: string;
341
341
  reservedAmount: string;
@@ -1037,9 +1037,8 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1037
1037
  currency: z.ZodString;
1038
1038
  createdAt: z.ZodString;
1039
1039
  }, "strip", z.ZodTypeAny, {
1040
- createdAt: string;
1041
- reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1042
1040
  schemaVersion: 1;
1041
+ createdAt: string;
1043
1042
  subject: {
1044
1043
  kind: "reservation";
1045
1044
  reservationId: string;
@@ -1047,6 +1046,7 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1047
1046
  kind: "receipt";
1048
1047
  receiptId: string;
1049
1048
  };
1049
+ reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1050
1050
  currency: string;
1051
1051
  attribution: {
1052
1052
  requestId: string;
@@ -1066,9 +1066,8 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1066
1066
  amount: string & z.BRAND<"ExactDecimal">;
1067
1067
  refundId: string;
1068
1068
  }, {
1069
- createdAt: string;
1070
- reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1071
1069
  schemaVersion: 1;
1070
+ createdAt: string;
1072
1071
  subject: {
1073
1072
  kind: "reservation";
1074
1073
  reservationId: string;
@@ -1076,6 +1075,7 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1076
1075
  kind: "receipt";
1077
1076
  receiptId: string;
1078
1077
  };
1078
+ reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1079
1079
  currency: string;
1080
1080
  attribution: {
1081
1081
  requestId: string;
@@ -1095,9 +1095,8 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1095
1095
  amount: string;
1096
1096
  refundId: string;
1097
1097
  }>, {
1098
- createdAt: string;
1099
- reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1100
1098
  schemaVersion: 1;
1099
+ createdAt: string;
1101
1100
  subject: {
1102
1101
  kind: "reservation";
1103
1102
  reservationId: string;
@@ -1105,6 +1104,7 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1105
1104
  kind: "receipt";
1106
1105
  receiptId: string;
1107
1106
  };
1107
+ reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1108
1108
  currency: string;
1109
1109
  attribution: {
1110
1110
  requestId: string;
@@ -1124,9 +1124,8 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1124
1124
  amount: string & z.BRAND<"ExactDecimal">;
1125
1125
  refundId: string;
1126
1126
  }, {
1127
- createdAt: string;
1128
- reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1129
1127
  schemaVersion: 1;
1128
+ createdAt: string;
1130
1129
  subject: {
1131
1130
  kind: "reservation";
1132
1131
  reservationId: string;
@@ -1134,6 +1133,7 @@ export declare const usageRefundSchema: z.ZodEffects<z.ZodObject<{
1134
1133
  kind: "receipt";
1135
1134
  receiptId: string;
1136
1135
  };
1136
+ reason: "unused_reservation" | "client_cancelled" | "upstream_failure" | "partial_stream" | "usage_unavailable" | "billing_correction" | "duplicate_charge";
1137
1137
  currency: string;
1138
1138
  attribution: {
1139
1139
  requestId: string;
@@ -73,16 +73,16 @@ export declare const rotateKeyCompleteRequestSchema: z.ZodObject<{
73
73
  }, "strip", z.ZodTypeAny, {
74
74
  signature: string;
75
75
  challenge: string;
76
+ timestamp: number;
76
77
  newPublicKey: string;
77
78
  newKeyProof: string;
78
- timestamp: number;
79
79
  signOutEverywhere?: boolean | undefined;
80
80
  }, {
81
81
  signature: string;
82
82
  challenge: string;
83
+ timestamp: number;
83
84
  newPublicKey: string;
84
85
  newKeyProof: string;
85
- timestamp: number;
86
86
  signOutEverywhere?: boolean | undefined;
87
87
  }>;
88
88
  export type RotateKeyCompleteRequest = z.infer<typeof rotateKeyCompleteRequestSchema>;
@@ -51,8 +51,8 @@ export declare const createOxyNotificationRequestSchema: z.ZodEffects<z.ZodObjec
51
51
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
52
52
  }, "strip", z.ZodTypeAny, {
53
53
  type: "system" | "like" | "reply" | "follow" | "mention" | "quote" | "repost" | "welcome";
54
- recipientId: string;
55
54
  actorId: string;
55
+ recipientId: string;
56
56
  entityId: string;
57
57
  entityType: "profile" | "reply" | "post" | "app";
58
58
  message?: string | undefined;
@@ -61,8 +61,8 @@ export declare const createOxyNotificationRequestSchema: z.ZodEffects<z.ZodObjec
61
61
  title?: string | undefined;
62
62
  }, {
63
63
  type: "system" | "like" | "reply" | "follow" | "mention" | "quote" | "repost" | "welcome";
64
- recipientId: string;
65
64
  actorId: string;
65
+ recipientId: string;
66
66
  entityId: string;
67
67
  entityType: "profile" | "reply" | "post" | "app";
68
68
  message?: string | undefined;
@@ -71,8 +71,8 @@ export declare const createOxyNotificationRequestSchema: z.ZodEffects<z.ZodObjec
71
71
  title?: string | undefined;
72
72
  }>, {
73
73
  type: "system" | "like" | "reply" | "follow" | "mention" | "quote" | "repost" | "welcome";
74
- recipientId: string;
75
74
  actorId: string;
75
+ recipientId: string;
76
76
  entityId: string;
77
77
  entityType: "profile" | "reply" | "post" | "app";
78
78
  message?: string | undefined;
@@ -81,8 +81,8 @@ export declare const createOxyNotificationRequestSchema: z.ZodEffects<z.ZodObjec
81
81
  title?: string | undefined;
82
82
  }, {
83
83
  type: "system" | "like" | "reply" | "follow" | "mention" | "quote" | "repost" | "welcome";
84
- recipientId: string;
85
84
  actorId: string;
85
+ recipientId: string;
86
86
  entityId: string;
87
87
  entityType: "profile" | "reply" | "post" | "app";
88
88
  message?: string | undefined;