@oxy.so/contracts 4.10.0 → 4.11.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 (100) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/accountGraph.js +5 -3
  3. package/dist/cjs/agency.js +178 -96
  4. package/dist/cjs/agentKeys.js +80 -26
  5. package/dist/cjs/capabilityBindings.js +2 -2
  6. package/dist/cjs/capabilityInvocation.js +3 -1
  7. package/dist/cjs/commonsSignIn.js +2 -2
  8. package/dist/cjs/deviceSession.js +5 -1
  9. package/dist/cjs/email/messages.js +70 -4
  10. package/dist/cjs/emailAgentContext.js +16 -8
  11. package/dist/cjs/externalIdentity.js +30 -12
  12. package/dist/cjs/identity.js +14 -6
  13. package/dist/cjs/identityLink.js +7 -2
  14. package/dist/cjs/identityProof.js +2 -1
  15. package/dist/cjs/index.js +23 -15
  16. package/dist/cjs/inference/catalogue.js +2 -12
  17. package/dist/cjs/inference/decisions.js +102 -83
  18. package/dist/cjs/inference/economics.js +15 -5
  19. package/dist/cjs/inference/embeddings.js +44 -6
  20. package/dist/cjs/inference/inbox.js +33 -2
  21. package/dist/cjs/inference/providerConnection.js +21 -6
  22. package/dist/cjs/inference/realtime.js +114 -107
  23. package/dist/cjs/inference/scopedExecution.js +12 -12
  24. package/dist/cjs/inference/usage.js +2 -9
  25. package/dist/cjs/notifications.js +25 -5
  26. package/dist/cjs/oauth.js +30 -14
  27. package/dist/cjs/oxyRecordTypes.js +2 -2
  28. package/dist/cjs/products/access.js +161 -41
  29. package/dist/cjs/products/billing.js +71 -17
  30. package/dist/cjs/products/checkout.js +35 -0
  31. package/dist/cjs/products/plans.js +38 -0
  32. package/dist/cjs/recommendations.js +4 -6
  33. package/dist/cjs/reputation.js +3 -6
  34. package/dist/cjs/sessionStatus.js +1 -6
  35. package/dist/cjs/signIn.js +17 -4
  36. package/dist/cjs/transparency.js +3 -1
  37. package/dist/cjs/updates.js +2 -4
  38. package/dist/cjs/userResponse.js +32 -9
  39. package/dist/cjs/username.js +3 -1
  40. package/dist/esm/.tsbuildinfo +1 -1
  41. package/dist/esm/accountGraph.js +5 -3
  42. package/dist/esm/agency.js +178 -96
  43. package/dist/esm/agentKeys.js +80 -26
  44. package/dist/esm/capabilityBindings.js +2 -2
  45. package/dist/esm/capabilityInvocation.js +3 -1
  46. package/dist/esm/commonsSignIn.js +2 -2
  47. package/dist/esm/deviceSession.js +5 -1
  48. package/dist/esm/email/messages.js +69 -3
  49. package/dist/esm/emailAgentContext.js +16 -8
  50. package/dist/esm/externalIdentity.js +30 -12
  51. package/dist/esm/identity.js +14 -6
  52. package/dist/esm/identityLink.js +7 -2
  53. package/dist/esm/identityProof.js +2 -1
  54. package/dist/esm/index.js +10 -8
  55. package/dist/esm/inference/aliaModelRelease.js +1 -1
  56. package/dist/esm/inference/catalogue.js +3 -13
  57. package/dist/esm/inference/decisions.js +108 -89
  58. package/dist/esm/inference/economics.js +16 -6
  59. package/dist/esm/inference/embeddings.js +44 -6
  60. package/dist/esm/inference/inbox.js +32 -1
  61. package/dist/esm/inference/providerConnection.js +21 -6
  62. package/dist/esm/inference/realtime.js +123 -116
  63. package/dist/esm/inference/scopedExecution.js +15 -15
  64. package/dist/esm/inference/usage.js +2 -9
  65. package/dist/esm/notifications.js +25 -5
  66. package/dist/esm/oauth.js +30 -14
  67. package/dist/esm/oxyRecordTypes.js +2 -2
  68. package/dist/esm/products/access.js +160 -40
  69. package/dist/esm/products/billing.js +71 -17
  70. package/dist/esm/products/checkout.js +32 -0
  71. package/dist/esm/products/plans.js +35 -0
  72. package/dist/esm/recommendations.js +4 -6
  73. package/dist/esm/reputation.js +3 -6
  74. package/dist/esm/sessionStatus.js +1 -6
  75. package/dist/esm/signIn.js +17 -4
  76. package/dist/esm/transparency.js +3 -1
  77. package/dist/esm/updates.js +2 -4
  78. package/dist/esm/userResponse.js +28 -5
  79. package/dist/esm/username.js +3 -1
  80. package/dist/types/.tsbuildinfo +1 -1
  81. package/dist/types/accountGraph.d.ts +1 -1
  82. package/dist/types/commonsSignIn.d.ts +2 -2
  83. package/dist/types/email/messages.d.ts +208 -2
  84. package/dist/types/externalIdentity.d.ts +90 -0
  85. package/dist/types/identity.d.ts +1 -1
  86. package/dist/types/index.d.ts +12 -10
  87. package/dist/types/inference/decisions.d.ts +1 -1
  88. package/dist/types/inference/inbox.d.ts +129 -5
  89. package/dist/types/inference/realtime.d.ts +1 -1
  90. package/dist/types/inference/scopedExecution.d.ts +1 -1
  91. package/dist/types/moderationReputation.d.ts +1 -1
  92. package/dist/types/oxyRecordTypes.d.ts +2 -2
  93. package/dist/types/products/access.d.ts +405 -0
  94. package/dist/types/products/billing.d.ts +3 -0
  95. package/dist/types/products/checkout.d.ts +60 -0
  96. package/dist/types/products/plans.d.ts +319 -0
  97. package/dist/types/reputation.d.ts +4 -4
  98. package/dist/types/updates.d.ts +1 -1
  99. package/dist/types/userResponse.d.ts +388 -23
  100. package/package.json +1 -2
@@ -0,0 +1,319 @@
1
+ import { z } from 'zod';
2
+ /** Approved display terms never identify or activate a billing-provider price. */
3
+ export declare const personalPlanDisplayPriceSchema: z.ZodObject<{
4
+ currency: z.ZodString;
5
+ amountMinorUnits: z.ZodNumber;
6
+ interval: z.ZodLiteral<"month">;
7
+ trial: z.ZodLiteral<"none">;
8
+ taxTreatment: z.ZodLiteral<"inclusive">;
9
+ merchantTotal: z.ZodLiteral<"final">;
10
+ }, "strict", z.ZodTypeAny, {
11
+ currency: string;
12
+ amountMinorUnits: number;
13
+ interval: "month";
14
+ trial: "none";
15
+ taxTreatment: "inclusive";
16
+ merchantTotal: "final";
17
+ }, {
18
+ currency: string;
19
+ amountMinorUnits: number;
20
+ interval: "month";
21
+ trial: "none";
22
+ taxTreatment: "inclusive";
23
+ merchantTotal: "final";
24
+ }>;
25
+ /** Public discovery is separate from customer access. No provider or owner IDs. */
26
+ export declare const personalPlanCatalogueSchema: z.ZodEffects<z.ZodObject<{
27
+ schemaVersion: z.ZodLiteral<1>;
28
+ state: z.ZodEnum<["unconfigured", "configured"]>;
29
+ purchase: z.ZodLiteral<"unavailable">;
30
+ plans: z.ZodArray<z.ZodObject<{
31
+ offerId: z.ZodString;
32
+ offerVersion: z.ZodNumber;
33
+ displayName: z.ZodString;
34
+ audience: z.ZodLiteral<"personal">;
35
+ kind: z.ZodLiteral<"oxy_one">;
36
+ price: z.ZodOptional<z.ZodObject<{
37
+ currency: z.ZodString;
38
+ amountMinorUnits: z.ZodNumber;
39
+ interval: z.ZodLiteral<"month">;
40
+ trial: z.ZodLiteral<"none">;
41
+ taxTreatment: z.ZodLiteral<"inclusive">;
42
+ merchantTotal: z.ZodLiteral<"final">;
43
+ }, "strict", z.ZodTypeAny, {
44
+ currency: string;
45
+ amountMinorUnits: number;
46
+ interval: "month";
47
+ trial: "none";
48
+ taxTreatment: "inclusive";
49
+ merchantTotal: "final";
50
+ }, {
51
+ currency: string;
52
+ amountMinorUnits: number;
53
+ interval: "month";
54
+ trial: "none";
55
+ taxTreatment: "inclusive";
56
+ merchantTotal: "final";
57
+ }>>;
58
+ benefits: z.ZodArray<z.ZodObject<{
59
+ displayName: z.ZodString;
60
+ benefit: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
61
+ kind: z.ZodLiteral<"capability">;
62
+ productId: z.ZodString;
63
+ key: z.ZodString;
64
+ }, "strict", z.ZodTypeAny, {
65
+ kind: "capability";
66
+ key: string;
67
+ productId: string;
68
+ }, {
69
+ kind: "capability";
70
+ key: string;
71
+ productId: string;
72
+ }>, z.ZodObject<{
73
+ kind: z.ZodLiteral<"quota">;
74
+ productId: z.ZodString;
75
+ key: z.ZodString;
76
+ unit: z.ZodString;
77
+ included: z.ZodNumber;
78
+ combination: z.ZodEnum<["maximum", "sum", "exclusive"]>;
79
+ }, "strict", z.ZodTypeAny, {
80
+ kind: "quota";
81
+ key: string;
82
+ unit: string;
83
+ included: number;
84
+ productId: string;
85
+ combination: "maximum" | "sum" | "exclusive";
86
+ }, {
87
+ kind: "quota";
88
+ key: string;
89
+ unit: string;
90
+ included: number;
91
+ productId: string;
92
+ combination: "maximum" | "sum" | "exclusive";
93
+ }>]>;
94
+ }, "strict", z.ZodTypeAny, {
95
+ displayName: string;
96
+ benefit: {
97
+ kind: "capability";
98
+ key: string;
99
+ productId: string;
100
+ } | {
101
+ kind: "quota";
102
+ key: string;
103
+ unit: string;
104
+ included: number;
105
+ productId: string;
106
+ combination: "maximum" | "sum" | "exclusive";
107
+ };
108
+ }, {
109
+ displayName: string;
110
+ benefit: {
111
+ kind: "capability";
112
+ key: string;
113
+ productId: string;
114
+ } | {
115
+ kind: "quota";
116
+ key: string;
117
+ unit: string;
118
+ included: number;
119
+ productId: string;
120
+ combination: "maximum" | "sum" | "exclusive";
121
+ };
122
+ }>, "many">;
123
+ }, "strict", z.ZodTypeAny, {
124
+ displayName: string;
125
+ kind: "oxy_one";
126
+ audience: "personal";
127
+ benefits: {
128
+ displayName: string;
129
+ benefit: {
130
+ kind: "capability";
131
+ key: string;
132
+ productId: string;
133
+ } | {
134
+ kind: "quota";
135
+ key: string;
136
+ unit: string;
137
+ included: number;
138
+ productId: string;
139
+ combination: "maximum" | "sum" | "exclusive";
140
+ };
141
+ }[];
142
+ offerId: string;
143
+ offerVersion: number;
144
+ price?: {
145
+ currency: string;
146
+ amountMinorUnits: number;
147
+ interval: "month";
148
+ trial: "none";
149
+ taxTreatment: "inclusive";
150
+ merchantTotal: "final";
151
+ } | undefined;
152
+ }, {
153
+ displayName: string;
154
+ kind: "oxy_one";
155
+ audience: "personal";
156
+ benefits: {
157
+ displayName: string;
158
+ benefit: {
159
+ kind: "capability";
160
+ key: string;
161
+ productId: string;
162
+ } | {
163
+ kind: "quota";
164
+ key: string;
165
+ unit: string;
166
+ included: number;
167
+ productId: string;
168
+ combination: "maximum" | "sum" | "exclusive";
169
+ };
170
+ }[];
171
+ offerId: string;
172
+ offerVersion: number;
173
+ price?: {
174
+ currency: string;
175
+ amountMinorUnits: number;
176
+ interval: "month";
177
+ trial: "none";
178
+ taxTreatment: "inclusive";
179
+ merchantTotal: "final";
180
+ } | undefined;
181
+ }>, "many">;
182
+ }, "strict", z.ZodTypeAny, {
183
+ schemaVersion: 1;
184
+ state: "unconfigured" | "configured";
185
+ purchase: "unavailable";
186
+ plans: {
187
+ displayName: string;
188
+ kind: "oxy_one";
189
+ audience: "personal";
190
+ benefits: {
191
+ displayName: string;
192
+ benefit: {
193
+ kind: "capability";
194
+ key: string;
195
+ productId: string;
196
+ } | {
197
+ kind: "quota";
198
+ key: string;
199
+ unit: string;
200
+ included: number;
201
+ productId: string;
202
+ combination: "maximum" | "sum" | "exclusive";
203
+ };
204
+ }[];
205
+ offerId: string;
206
+ offerVersion: number;
207
+ price?: {
208
+ currency: string;
209
+ amountMinorUnits: number;
210
+ interval: "month";
211
+ trial: "none";
212
+ taxTreatment: "inclusive";
213
+ merchantTotal: "final";
214
+ } | undefined;
215
+ }[];
216
+ }, {
217
+ schemaVersion: 1;
218
+ state: "unconfigured" | "configured";
219
+ purchase: "unavailable";
220
+ plans: {
221
+ displayName: string;
222
+ kind: "oxy_one";
223
+ audience: "personal";
224
+ benefits: {
225
+ displayName: string;
226
+ benefit: {
227
+ kind: "capability";
228
+ key: string;
229
+ productId: string;
230
+ } | {
231
+ kind: "quota";
232
+ key: string;
233
+ unit: string;
234
+ included: number;
235
+ productId: string;
236
+ combination: "maximum" | "sum" | "exclusive";
237
+ };
238
+ }[];
239
+ offerId: string;
240
+ offerVersion: number;
241
+ price?: {
242
+ currency: string;
243
+ amountMinorUnits: number;
244
+ interval: "month";
245
+ trial: "none";
246
+ taxTreatment: "inclusive";
247
+ merchantTotal: "final";
248
+ } | undefined;
249
+ }[];
250
+ }>, {
251
+ schemaVersion: 1;
252
+ state: "unconfigured" | "configured";
253
+ purchase: "unavailable";
254
+ plans: {
255
+ displayName: string;
256
+ kind: "oxy_one";
257
+ audience: "personal";
258
+ benefits: {
259
+ displayName: string;
260
+ benefit: {
261
+ kind: "capability";
262
+ key: string;
263
+ productId: string;
264
+ } | {
265
+ kind: "quota";
266
+ key: string;
267
+ unit: string;
268
+ included: number;
269
+ productId: string;
270
+ combination: "maximum" | "sum" | "exclusive";
271
+ };
272
+ }[];
273
+ offerId: string;
274
+ offerVersion: number;
275
+ price?: {
276
+ currency: string;
277
+ amountMinorUnits: number;
278
+ interval: "month";
279
+ trial: "none";
280
+ taxTreatment: "inclusive";
281
+ merchantTotal: "final";
282
+ } | undefined;
283
+ }[];
284
+ }, {
285
+ schemaVersion: 1;
286
+ state: "unconfigured" | "configured";
287
+ purchase: "unavailable";
288
+ plans: {
289
+ displayName: string;
290
+ kind: "oxy_one";
291
+ audience: "personal";
292
+ benefits: {
293
+ displayName: string;
294
+ benefit: {
295
+ kind: "capability";
296
+ key: string;
297
+ productId: string;
298
+ } | {
299
+ kind: "quota";
300
+ key: string;
301
+ unit: string;
302
+ included: number;
303
+ productId: string;
304
+ combination: "maximum" | "sum" | "exclusive";
305
+ };
306
+ }[];
307
+ offerId: string;
308
+ offerVersion: number;
309
+ price?: {
310
+ currency: string;
311
+ amountMinorUnits: number;
312
+ interval: "month";
313
+ trial: "none";
314
+ taxTreatment: "inclusive";
315
+ merchantTotal: "final";
316
+ } | undefined;
317
+ }[];
318
+ }>;
319
+ export type PersonalPlanCatalogue = z.infer<typeof personalPlanCatalogueSchema>;
@@ -24,8 +24,8 @@
24
24
  * - **The balance has two views, and the union is the contract.** See
25
25
  * {@link ReputationBalanceView} — the compile-time assertions below are what
26
26
  * stop the private view's fields becoming reachable on a stranger's balance.
27
- * - **The closed value sets live here, not beside the mongoose models.** The
28
- * API's model enums and the SDK's unions are the same `as const` tuple, so a
27
+ * - **The closed value sets live here, not beside the database schema.** The
28
+ * API's column enums and the SDK's unions are the same `as const` tuple, so a
29
29
  * seventh category cannot be added on one side only.
30
30
  *
31
31
  * The response entities are declared as explicit `interface`s with their runtime
@@ -93,7 +93,7 @@ export declare const reputationInfluenceContextSchema: z.ZodEnum<["default", "re
93
93
  * appended), written only by policy-driven code — never by a person.
94
94
  */
95
95
  export interface ReputationTransaction {
96
- /** The transaction's Mongo `_id` as a string. */
96
+ /** The transaction's id, as a string. */
97
97
  id: string;
98
98
  /** Subject of the reputation change — the user whose balance moves. */
99
99
  userId: string;
@@ -298,7 +298,7 @@ export declare const reputationRulesResponseSchema: z.ZodType<ReputationRulesRes
298
298
  * real name — fall back to the handle when it is absent, never recompose.
299
299
  */
300
300
  export interface ReputationLeaderboardUser {
301
- /** The user's Mongo `_id` as a string. */
301
+ /** The user's id, as a string. */
302
302
  id: string;
303
303
  username: string;
304
304
  name: UserNameResponse;
@@ -11,7 +11,7 @@
11
11
  * CLI, the console hook) validates its INPUT against the same definitions, so
12
12
  * producer and consumers cannot drift.
13
13
  *
14
- * Domain model (mirrors the Mongoose models in `@oxy.so/api`):
14
+ * Domain model (mirrors the update tables in `@oxy.so/api`):
15
15
  * - A `channel` (e.g. `production`, `preview`, `pr-123`) is a named release
16
16
  * track for one application.
17
17
  * - An `update` is one published bundle for a single `(channel, runtimeVersion,