@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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/accountGraph.js +5 -3
- package/dist/cjs/agency.js +178 -96
- package/dist/cjs/agentKeys.js +80 -26
- package/dist/cjs/capabilityBindings.js +2 -2
- package/dist/cjs/capabilityInvocation.js +3 -1
- package/dist/cjs/commonsSignIn.js +2 -2
- package/dist/cjs/deviceSession.js +5 -1
- package/dist/cjs/email/messages.js +70 -4
- package/dist/cjs/emailAgentContext.js +16 -8
- package/dist/cjs/externalIdentity.js +30 -12
- package/dist/cjs/identity.js +14 -6
- package/dist/cjs/identityLink.js +7 -2
- package/dist/cjs/identityProof.js +2 -1
- package/dist/cjs/index.js +23 -15
- package/dist/cjs/inference/catalogue.js +2 -12
- package/dist/cjs/inference/decisions.js +102 -83
- package/dist/cjs/inference/economics.js +15 -5
- package/dist/cjs/inference/embeddings.js +44 -6
- package/dist/cjs/inference/inbox.js +33 -2
- package/dist/cjs/inference/providerConnection.js +21 -6
- package/dist/cjs/inference/realtime.js +114 -107
- package/dist/cjs/inference/scopedExecution.js +12 -12
- package/dist/cjs/inference/usage.js +2 -9
- package/dist/cjs/notifications.js +25 -5
- package/dist/cjs/oauth.js +30 -14
- package/dist/cjs/oxyRecordTypes.js +2 -2
- package/dist/cjs/products/access.js +161 -41
- package/dist/cjs/products/billing.js +71 -17
- package/dist/cjs/products/checkout.js +35 -0
- package/dist/cjs/products/plans.js +38 -0
- package/dist/cjs/recommendations.js +4 -6
- package/dist/cjs/reputation.js +3 -6
- package/dist/cjs/sessionStatus.js +1 -6
- package/dist/cjs/signIn.js +17 -4
- package/dist/cjs/transparency.js +3 -1
- package/dist/cjs/updates.js +2 -4
- package/dist/cjs/userResponse.js +32 -9
- package/dist/cjs/username.js +3 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/accountGraph.js +5 -3
- package/dist/esm/agency.js +178 -96
- package/dist/esm/agentKeys.js +80 -26
- package/dist/esm/capabilityBindings.js +2 -2
- package/dist/esm/capabilityInvocation.js +3 -1
- package/dist/esm/commonsSignIn.js +2 -2
- package/dist/esm/deviceSession.js +5 -1
- package/dist/esm/email/messages.js +69 -3
- package/dist/esm/emailAgentContext.js +16 -8
- package/dist/esm/externalIdentity.js +30 -12
- package/dist/esm/identity.js +14 -6
- package/dist/esm/identityLink.js +7 -2
- package/dist/esm/identityProof.js +2 -1
- package/dist/esm/index.js +10 -8
- package/dist/esm/inference/aliaModelRelease.js +1 -1
- package/dist/esm/inference/catalogue.js +3 -13
- package/dist/esm/inference/decisions.js +108 -89
- package/dist/esm/inference/economics.js +16 -6
- package/dist/esm/inference/embeddings.js +44 -6
- package/dist/esm/inference/inbox.js +32 -1
- package/dist/esm/inference/providerConnection.js +21 -6
- package/dist/esm/inference/realtime.js +123 -116
- package/dist/esm/inference/scopedExecution.js +15 -15
- package/dist/esm/inference/usage.js +2 -9
- package/dist/esm/notifications.js +25 -5
- package/dist/esm/oauth.js +30 -14
- package/dist/esm/oxyRecordTypes.js +2 -2
- package/dist/esm/products/access.js +160 -40
- package/dist/esm/products/billing.js +71 -17
- package/dist/esm/products/checkout.js +32 -0
- package/dist/esm/products/plans.js +35 -0
- package/dist/esm/recommendations.js +4 -6
- package/dist/esm/reputation.js +3 -6
- package/dist/esm/sessionStatus.js +1 -6
- package/dist/esm/signIn.js +17 -4
- package/dist/esm/transparency.js +3 -1
- package/dist/esm/updates.js +2 -4
- package/dist/esm/userResponse.js +28 -5
- package/dist/esm/username.js +3 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountGraph.d.ts +1 -1
- package/dist/types/commonsSignIn.d.ts +2 -2
- package/dist/types/email/messages.d.ts +208 -2
- package/dist/types/externalIdentity.d.ts +90 -0
- package/dist/types/identity.d.ts +1 -1
- package/dist/types/index.d.ts +12 -10
- package/dist/types/inference/decisions.d.ts +1 -1
- package/dist/types/inference/inbox.d.ts +129 -5
- package/dist/types/inference/realtime.d.ts +1 -1
- package/dist/types/inference/scopedExecution.d.ts +1 -1
- package/dist/types/moderationReputation.d.ts +1 -1
- package/dist/types/oxyRecordTypes.d.ts +2 -2
- package/dist/types/products/access.d.ts +405 -0
- package/dist/types/products/billing.d.ts +3 -0
- package/dist/types/products/checkout.d.ts +60 -0
- package/dist/types/products/plans.d.ts +319 -0
- package/dist/types/reputation.d.ts +4 -4
- package/dist/types/updates.d.ts +1 -1
- package/dist/types/userResponse.d.ts +388 -23
- package/package.json +1 -2
|
@@ -66,23 +66,24 @@ export declare const inboxComposeRequestSchema: z.ZodDiscriminatedUnion<"operati
|
|
|
66
66
|
export declare const inboxDailyBriefRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
67
67
|
startAt: z.ZodEffects<z.ZodString, string, string>;
|
|
68
68
|
endAt: z.ZodEffects<z.ZodString, string, string>;
|
|
69
|
-
|
|
69
|
+
/** BCP 47 tag of the language the brief is written in; English when absent. */
|
|
70
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
70
71
|
}, "strict", z.ZodTypeAny, {
|
|
71
72
|
startAt: string;
|
|
72
73
|
endAt: string;
|
|
73
|
-
|
|
74
|
+
locale?: string | undefined;
|
|
74
75
|
}, {
|
|
75
76
|
startAt: string;
|
|
76
77
|
endAt: string;
|
|
77
|
-
|
|
78
|
+
locale?: string | undefined;
|
|
78
79
|
}>, {
|
|
79
80
|
startAt: string;
|
|
80
81
|
endAt: string;
|
|
81
|
-
|
|
82
|
+
locale?: string | undefined;
|
|
82
83
|
}, {
|
|
83
84
|
startAt: string;
|
|
84
85
|
endAt: string;
|
|
85
|
-
|
|
86
|
+
locale?: string | undefined;
|
|
86
87
|
}>;
|
|
87
88
|
export declare const inboxNaturalSearchRequestSchema: z.ZodObject<{
|
|
88
89
|
query: z.ZodString;
|
|
@@ -179,6 +180,127 @@ export declare const inboxNaturalSearchResponseSchema: z.ZodObject<{
|
|
|
179
180
|
};
|
|
180
181
|
interpretation: string;
|
|
181
182
|
}>;
|
|
183
|
+
/** Where the brief puts a message: it asks something of the owner, it is today's news, or it is still unread from before. */
|
|
184
|
+
export declare const INBOX_DAILY_BRIEF_SECTIONS: readonly ["needs_you", "today", "earlier"];
|
|
185
|
+
/**
|
|
186
|
+
* The Daily Brief as data, so a client draws it rather than printing a wall of
|
|
187
|
+
* text: a short summary, then the messages it mentions — each with the
|
|
188
|
+
* server's own copy of its sender, subject, time and unread state, so a client
|
|
189
|
+
* can show and open it, and a one-line note of why it matters.
|
|
190
|
+
*/
|
|
191
|
+
export declare const inboxDailyBriefResponseSchema: z.ZodObject<{
|
|
192
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
193
|
+
requestId: z.ZodString;
|
|
194
|
+
generationId: z.ZodOptional<z.ZodString>;
|
|
195
|
+
summary: z.ZodString;
|
|
196
|
+
counts: z.ZodObject<{
|
|
197
|
+
received: z.ZodNumber;
|
|
198
|
+
unread: z.ZodNumber;
|
|
199
|
+
starred: z.ZodNumber;
|
|
200
|
+
earlierUnread: z.ZodNumber;
|
|
201
|
+
}, "strict", z.ZodTypeAny, {
|
|
202
|
+
received: number;
|
|
203
|
+
starred: number;
|
|
204
|
+
unread: number;
|
|
205
|
+
earlierUnread: number;
|
|
206
|
+
}, {
|
|
207
|
+
received: number;
|
|
208
|
+
starred: number;
|
|
209
|
+
unread: number;
|
|
210
|
+
earlierUnread: number;
|
|
211
|
+
}>;
|
|
212
|
+
items: z.ZodArray<z.ZodObject<{
|
|
213
|
+
messageId: z.ZodString;
|
|
214
|
+
section: z.ZodEnum<["needs_you", "today", "earlier"]>;
|
|
215
|
+
note: z.ZodString;
|
|
216
|
+
from: z.ZodObject<{
|
|
217
|
+
name: z.ZodNullable<z.ZodString>;
|
|
218
|
+
address: z.ZodString;
|
|
219
|
+
}, "strict", z.ZodTypeAny, {
|
|
220
|
+
name: string | null;
|
|
221
|
+
address: string;
|
|
222
|
+
}, {
|
|
223
|
+
name: string | null;
|
|
224
|
+
address: string;
|
|
225
|
+
}>;
|
|
226
|
+
subject: z.ZodString;
|
|
227
|
+
receivedAt: z.ZodString;
|
|
228
|
+
unread: z.ZodBoolean;
|
|
229
|
+
hasAttachments: z.ZodBoolean;
|
|
230
|
+
}, "strict", z.ZodTypeAny, {
|
|
231
|
+
subject: string;
|
|
232
|
+
messageId: string;
|
|
233
|
+
from: {
|
|
234
|
+
name: string | null;
|
|
235
|
+
address: string;
|
|
236
|
+
};
|
|
237
|
+
receivedAt: string;
|
|
238
|
+
unread: boolean;
|
|
239
|
+
section: "needs_you" | "today" | "earlier";
|
|
240
|
+
note: string;
|
|
241
|
+
hasAttachments: boolean;
|
|
242
|
+
}, {
|
|
243
|
+
subject: string;
|
|
244
|
+
messageId: string;
|
|
245
|
+
from: {
|
|
246
|
+
name: string | null;
|
|
247
|
+
address: string;
|
|
248
|
+
};
|
|
249
|
+
receivedAt: string;
|
|
250
|
+
unread: boolean;
|
|
251
|
+
section: "needs_you" | "today" | "earlier";
|
|
252
|
+
note: string;
|
|
253
|
+
hasAttachments: boolean;
|
|
254
|
+
}>, "many">;
|
|
255
|
+
}, "strict", z.ZodTypeAny, {
|
|
256
|
+
schemaVersion: 1;
|
|
257
|
+
requestId: string;
|
|
258
|
+
summary: string;
|
|
259
|
+
counts: {
|
|
260
|
+
received: number;
|
|
261
|
+
starred: number;
|
|
262
|
+
unread: number;
|
|
263
|
+
earlierUnread: number;
|
|
264
|
+
};
|
|
265
|
+
items: {
|
|
266
|
+
subject: string;
|
|
267
|
+
messageId: string;
|
|
268
|
+
from: {
|
|
269
|
+
name: string | null;
|
|
270
|
+
address: string;
|
|
271
|
+
};
|
|
272
|
+
receivedAt: string;
|
|
273
|
+
unread: boolean;
|
|
274
|
+
section: "needs_you" | "today" | "earlier";
|
|
275
|
+
note: string;
|
|
276
|
+
hasAttachments: boolean;
|
|
277
|
+
}[];
|
|
278
|
+
generationId?: string | undefined;
|
|
279
|
+
}, {
|
|
280
|
+
schemaVersion: 1;
|
|
281
|
+
requestId: string;
|
|
282
|
+
summary: string;
|
|
283
|
+
counts: {
|
|
284
|
+
received: number;
|
|
285
|
+
starred: number;
|
|
286
|
+
unread: number;
|
|
287
|
+
earlierUnread: number;
|
|
288
|
+
};
|
|
289
|
+
items: {
|
|
290
|
+
subject: string;
|
|
291
|
+
messageId: string;
|
|
292
|
+
from: {
|
|
293
|
+
name: string | null;
|
|
294
|
+
address: string;
|
|
295
|
+
};
|
|
296
|
+
receivedAt: string;
|
|
297
|
+
unread: boolean;
|
|
298
|
+
section: "needs_you" | "today" | "earlier";
|
|
299
|
+
note: string;
|
|
300
|
+
hasAttachments: boolean;
|
|
301
|
+
}[];
|
|
302
|
+
generationId?: string | undefined;
|
|
303
|
+
}>;
|
|
182
304
|
export declare const inboxSmartRepliesResponseSchema: z.ZodObject<{
|
|
183
305
|
replies: z.ZodArray<z.ZodString, "many">;
|
|
184
306
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -367,6 +489,8 @@ export declare const inboxInferenceStreamEventSchema: z.ZodDiscriminatedUnion<"t
|
|
|
367
489
|
}>]>;
|
|
368
490
|
export type InboxComposeRequest = z.infer<typeof inboxComposeRequestSchema>;
|
|
369
491
|
export type InboxDailyBriefRequest = z.infer<typeof inboxDailyBriefRequestSchema>;
|
|
492
|
+
export type InboxDailyBriefResponse = z.infer<typeof inboxDailyBriefResponseSchema>;
|
|
493
|
+
export type InboxDailyBriefSection = (typeof INBOX_DAILY_BRIEF_SECTIONS)[number];
|
|
370
494
|
export type InboxInferenceTextResponse = z.infer<typeof inboxInferenceTextResponseSchema>;
|
|
371
495
|
export type InboxNaturalSearchResponse = z.infer<typeof inboxNaturalSearchResponseSchema>;
|
|
372
496
|
export type InboxSmartRepliesResponse = z.infer<typeof inboxSmartRepliesResponseSchema>;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
*
|
|
84
84
|
* Decided in: OxyHQ/Kaana#90.
|
|
85
85
|
*/
|
|
86
|
-
import { z } from
|
|
86
|
+
import { z } from 'zod';
|
|
87
87
|
/**
|
|
88
88
|
* The most base64 characters one audio frame may carry: 49 152 bytes of audio,
|
|
89
89
|
* about one second of 24 kHz mono PCM16. Bounded so no frame is large enough to
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
/** Explicit extension negotiation; never replaces the legacy 3.5 handshake. */
|
|
3
3
|
export declare const SCOPED_EXECUTION_CONTRACT_VERSION: "3.6.0";
|
|
4
4
|
/** Scoped only; normal envelope v2 and metadata 3.5 remain unchanged. */
|
|
@@ -273,7 +273,7 @@ export declare const reverseModerationEffectSchema: z.ZodType<ReverseModerationE
|
|
|
273
273
|
* are reported so the figure is explainable without re-running the engine.
|
|
274
274
|
*/
|
|
275
275
|
export interface ModerationEffect {
|
|
276
|
-
/** The effect's own id
|
|
276
|
+
/** The effect's own id, as a string. */
|
|
277
277
|
id: string;
|
|
278
278
|
incidentId: string;
|
|
279
279
|
caseId: string;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* is rejected as `invalid_envelope`.
|
|
8
8
|
*
|
|
9
9
|
* `oxySignedRecordTypeSchema` is that runtime gate (the API's `verifyEnvelope`
|
|
10
|
-
* re-narrows with it; the
|
|
11
|
-
*
|
|
10
|
+
* re-narrows with it; the Postgres CHECK on `signed_records.type` is derived
|
|
11
|
+
* from `.options`);
|
|
12
12
|
* `OxySignedRecordType` is the matching compile-time union the SDK
|
|
13
13
|
* identity/civic mixins type against.
|
|
14
14
|
*
|
|
@@ -485,3 +485,408 @@ export type ProductAccessGrant = z.infer<typeof productAccessGrantSchema>;
|
|
|
485
485
|
export type SubjectProductAccess = z.infer<typeof subjectProductAccessSchema>;
|
|
486
486
|
export type ProductDefinition = z.infer<typeof productDefinitionSchema>;
|
|
487
487
|
export type SubjectProductAccessQuery = z.infer<typeof subjectProductAccessQuerySchema>;
|
|
488
|
+
/** Active grant periods for metering adapters; no financial/provider identity. */
|
|
489
|
+
export declare const subjectProductGrantSnapshotSchema: z.ZodEffects<z.ZodObject<{
|
|
490
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
491
|
+
access: z.ZodObject<{
|
|
492
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
493
|
+
subjectAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
494
|
+
productId: z.ZodString;
|
|
495
|
+
evaluatedAt: z.ZodString;
|
|
496
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
497
|
+
key: z.ZodString;
|
|
498
|
+
grantIds: z.ZodArray<z.ZodString, "many">;
|
|
499
|
+
}, "strict", z.ZodTypeAny, {
|
|
500
|
+
key: string;
|
|
501
|
+
grantIds: string[];
|
|
502
|
+
}, {
|
|
503
|
+
key: string;
|
|
504
|
+
grantIds: string[];
|
|
505
|
+
}>, "many">;
|
|
506
|
+
quotas: z.ZodArray<z.ZodObject<{
|
|
507
|
+
key: z.ZodString;
|
|
508
|
+
unit: z.ZodString;
|
|
509
|
+
included: z.ZodNumber;
|
|
510
|
+
combination: z.ZodEnum<["maximum", "sum", "exclusive"]>;
|
|
511
|
+
grantIds: z.ZodArray<z.ZodString, "many">;
|
|
512
|
+
}, "strict", z.ZodTypeAny, {
|
|
513
|
+
key: string;
|
|
514
|
+
unit: string;
|
|
515
|
+
included: number;
|
|
516
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
517
|
+
grantIds: string[];
|
|
518
|
+
}, {
|
|
519
|
+
key: string;
|
|
520
|
+
unit: string;
|
|
521
|
+
included: number;
|
|
522
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
523
|
+
grantIds: string[];
|
|
524
|
+
}>, "many">;
|
|
525
|
+
conflicts: z.ZodArray<z.ZodObject<{
|
|
526
|
+
key: z.ZodString;
|
|
527
|
+
reason: z.ZodEnum<["combination_mismatch", "unit_mismatch", "exclusive_overlap", "unsafe_total"]>;
|
|
528
|
+
grantIds: z.ZodArray<z.ZodString, "many">;
|
|
529
|
+
}, "strict", z.ZodTypeAny, {
|
|
530
|
+
key: string;
|
|
531
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
532
|
+
grantIds: string[];
|
|
533
|
+
}, {
|
|
534
|
+
key: string;
|
|
535
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
536
|
+
grantIds: string[];
|
|
537
|
+
}>, "many">;
|
|
538
|
+
}, "strict", z.ZodTypeAny, {
|
|
539
|
+
schemaVersion: 1;
|
|
540
|
+
subjectAccountId: string & z.BRAND<"OxyAccountId">;
|
|
541
|
+
capabilities: {
|
|
542
|
+
key: string;
|
|
543
|
+
grantIds: string[];
|
|
544
|
+
}[];
|
|
545
|
+
evaluatedAt: string;
|
|
546
|
+
productId: string;
|
|
547
|
+
quotas: {
|
|
548
|
+
key: string;
|
|
549
|
+
unit: string;
|
|
550
|
+
included: number;
|
|
551
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
552
|
+
grantIds: string[];
|
|
553
|
+
}[];
|
|
554
|
+
conflicts: {
|
|
555
|
+
key: string;
|
|
556
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
557
|
+
grantIds: string[];
|
|
558
|
+
}[];
|
|
559
|
+
}, {
|
|
560
|
+
schemaVersion: 1;
|
|
561
|
+
subjectAccountId: string;
|
|
562
|
+
capabilities: {
|
|
563
|
+
key: string;
|
|
564
|
+
grantIds: string[];
|
|
565
|
+
}[];
|
|
566
|
+
evaluatedAt: string;
|
|
567
|
+
productId: string;
|
|
568
|
+
quotas: {
|
|
569
|
+
key: string;
|
|
570
|
+
unit: string;
|
|
571
|
+
included: number;
|
|
572
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
573
|
+
grantIds: string[];
|
|
574
|
+
}[];
|
|
575
|
+
conflicts: {
|
|
576
|
+
key: string;
|
|
577
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
578
|
+
grantIds: string[];
|
|
579
|
+
}[];
|
|
580
|
+
}>;
|
|
581
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
582
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
583
|
+
id: z.ZodString;
|
|
584
|
+
sourceSegmentId: z.ZodString;
|
|
585
|
+
beneficiaryAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
586
|
+
offerId: z.ZodString;
|
|
587
|
+
offerVersion: z.ZodNumber;
|
|
588
|
+
origin: z.ZodEnum<["individual", "bundle"]>;
|
|
589
|
+
benefit: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
590
|
+
kind: z.ZodLiteral<"capability">;
|
|
591
|
+
productId: z.ZodString;
|
|
592
|
+
key: z.ZodString;
|
|
593
|
+
}, "strict", z.ZodTypeAny, {
|
|
594
|
+
kind: "capability";
|
|
595
|
+
key: string;
|
|
596
|
+
productId: string;
|
|
597
|
+
}, {
|
|
598
|
+
kind: "capability";
|
|
599
|
+
key: string;
|
|
600
|
+
productId: string;
|
|
601
|
+
}>, z.ZodObject<{
|
|
602
|
+
kind: z.ZodLiteral<"quota">;
|
|
603
|
+
productId: z.ZodString;
|
|
604
|
+
key: z.ZodString;
|
|
605
|
+
unit: z.ZodString;
|
|
606
|
+
included: z.ZodNumber;
|
|
607
|
+
combination: z.ZodEnum<["maximum", "sum", "exclusive"]>;
|
|
608
|
+
}, "strict", z.ZodTypeAny, {
|
|
609
|
+
kind: "quota";
|
|
610
|
+
key: string;
|
|
611
|
+
unit: string;
|
|
612
|
+
included: number;
|
|
613
|
+
productId: string;
|
|
614
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
615
|
+
}, {
|
|
616
|
+
kind: "quota";
|
|
617
|
+
key: string;
|
|
618
|
+
unit: string;
|
|
619
|
+
included: number;
|
|
620
|
+
productId: string;
|
|
621
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
622
|
+
}>]>;
|
|
623
|
+
period: z.ZodEffects<z.ZodObject<{
|
|
624
|
+
start: z.ZodString;
|
|
625
|
+
end: z.ZodString;
|
|
626
|
+
}, "strict", z.ZodTypeAny, {
|
|
627
|
+
start: string;
|
|
628
|
+
end: string;
|
|
629
|
+
}, {
|
|
630
|
+
start: string;
|
|
631
|
+
end: string;
|
|
632
|
+
}>, {
|
|
633
|
+
start: string;
|
|
634
|
+
end: string;
|
|
635
|
+
}, {
|
|
636
|
+
start: string;
|
|
637
|
+
end: string;
|
|
638
|
+
}>;
|
|
639
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
640
|
+
}, "strict", z.ZodTypeAny, {
|
|
641
|
+
schemaVersion: 1;
|
|
642
|
+
id: string;
|
|
643
|
+
revokedAt: string | null;
|
|
644
|
+
beneficiaryAccountId: string & z.BRAND<"OxyAccountId">;
|
|
645
|
+
period: {
|
|
646
|
+
start: string;
|
|
647
|
+
end: string;
|
|
648
|
+
};
|
|
649
|
+
offerId: string;
|
|
650
|
+
offerVersion: number;
|
|
651
|
+
origin: "bundle" | "individual";
|
|
652
|
+
sourceSegmentId: string;
|
|
653
|
+
benefit: {
|
|
654
|
+
kind: "capability";
|
|
655
|
+
key: string;
|
|
656
|
+
productId: string;
|
|
657
|
+
} | {
|
|
658
|
+
kind: "quota";
|
|
659
|
+
key: string;
|
|
660
|
+
unit: string;
|
|
661
|
+
included: number;
|
|
662
|
+
productId: string;
|
|
663
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
664
|
+
};
|
|
665
|
+
}, {
|
|
666
|
+
schemaVersion: 1;
|
|
667
|
+
id: string;
|
|
668
|
+
revokedAt: string | null;
|
|
669
|
+
beneficiaryAccountId: string;
|
|
670
|
+
period: {
|
|
671
|
+
start: string;
|
|
672
|
+
end: string;
|
|
673
|
+
};
|
|
674
|
+
offerId: string;
|
|
675
|
+
offerVersion: number;
|
|
676
|
+
origin: "bundle" | "individual";
|
|
677
|
+
sourceSegmentId: string;
|
|
678
|
+
benefit: {
|
|
679
|
+
kind: "capability";
|
|
680
|
+
key: string;
|
|
681
|
+
productId: string;
|
|
682
|
+
} | {
|
|
683
|
+
kind: "quota";
|
|
684
|
+
key: string;
|
|
685
|
+
unit: string;
|
|
686
|
+
included: number;
|
|
687
|
+
productId: string;
|
|
688
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
689
|
+
};
|
|
690
|
+
}>, "many">;
|
|
691
|
+
}, "strict", z.ZodTypeAny, {
|
|
692
|
+
schemaVersion: 1;
|
|
693
|
+
access: {
|
|
694
|
+
schemaVersion: 1;
|
|
695
|
+
subjectAccountId: string & z.BRAND<"OxyAccountId">;
|
|
696
|
+
capabilities: {
|
|
697
|
+
key: string;
|
|
698
|
+
grantIds: string[];
|
|
699
|
+
}[];
|
|
700
|
+
evaluatedAt: string;
|
|
701
|
+
productId: string;
|
|
702
|
+
quotas: {
|
|
703
|
+
key: string;
|
|
704
|
+
unit: string;
|
|
705
|
+
included: number;
|
|
706
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
707
|
+
grantIds: string[];
|
|
708
|
+
}[];
|
|
709
|
+
conflicts: {
|
|
710
|
+
key: string;
|
|
711
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
712
|
+
grantIds: string[];
|
|
713
|
+
}[];
|
|
714
|
+
};
|
|
715
|
+
grants: {
|
|
716
|
+
schemaVersion: 1;
|
|
717
|
+
id: string;
|
|
718
|
+
revokedAt: string | null;
|
|
719
|
+
beneficiaryAccountId: string & z.BRAND<"OxyAccountId">;
|
|
720
|
+
period: {
|
|
721
|
+
start: string;
|
|
722
|
+
end: string;
|
|
723
|
+
};
|
|
724
|
+
offerId: string;
|
|
725
|
+
offerVersion: number;
|
|
726
|
+
origin: "bundle" | "individual";
|
|
727
|
+
sourceSegmentId: string;
|
|
728
|
+
benefit: {
|
|
729
|
+
kind: "capability";
|
|
730
|
+
key: string;
|
|
731
|
+
productId: string;
|
|
732
|
+
} | {
|
|
733
|
+
kind: "quota";
|
|
734
|
+
key: string;
|
|
735
|
+
unit: string;
|
|
736
|
+
included: number;
|
|
737
|
+
productId: string;
|
|
738
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
739
|
+
};
|
|
740
|
+
}[];
|
|
741
|
+
}, {
|
|
742
|
+
schemaVersion: 1;
|
|
743
|
+
access: {
|
|
744
|
+
schemaVersion: 1;
|
|
745
|
+
subjectAccountId: string;
|
|
746
|
+
capabilities: {
|
|
747
|
+
key: string;
|
|
748
|
+
grantIds: string[];
|
|
749
|
+
}[];
|
|
750
|
+
evaluatedAt: string;
|
|
751
|
+
productId: string;
|
|
752
|
+
quotas: {
|
|
753
|
+
key: string;
|
|
754
|
+
unit: string;
|
|
755
|
+
included: number;
|
|
756
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
757
|
+
grantIds: string[];
|
|
758
|
+
}[];
|
|
759
|
+
conflicts: {
|
|
760
|
+
key: string;
|
|
761
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
762
|
+
grantIds: string[];
|
|
763
|
+
}[];
|
|
764
|
+
};
|
|
765
|
+
grants: {
|
|
766
|
+
schemaVersion: 1;
|
|
767
|
+
id: string;
|
|
768
|
+
revokedAt: string | null;
|
|
769
|
+
beneficiaryAccountId: string;
|
|
770
|
+
period: {
|
|
771
|
+
start: string;
|
|
772
|
+
end: string;
|
|
773
|
+
};
|
|
774
|
+
offerId: string;
|
|
775
|
+
offerVersion: number;
|
|
776
|
+
origin: "bundle" | "individual";
|
|
777
|
+
sourceSegmentId: string;
|
|
778
|
+
benefit: {
|
|
779
|
+
kind: "capability";
|
|
780
|
+
key: string;
|
|
781
|
+
productId: string;
|
|
782
|
+
} | {
|
|
783
|
+
kind: "quota";
|
|
784
|
+
key: string;
|
|
785
|
+
unit: string;
|
|
786
|
+
included: number;
|
|
787
|
+
productId: string;
|
|
788
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
789
|
+
};
|
|
790
|
+
}[];
|
|
791
|
+
}>, {
|
|
792
|
+
schemaVersion: 1;
|
|
793
|
+
access: {
|
|
794
|
+
schemaVersion: 1;
|
|
795
|
+
subjectAccountId: string & z.BRAND<"OxyAccountId">;
|
|
796
|
+
capabilities: {
|
|
797
|
+
key: string;
|
|
798
|
+
grantIds: string[];
|
|
799
|
+
}[];
|
|
800
|
+
evaluatedAt: string;
|
|
801
|
+
productId: string;
|
|
802
|
+
quotas: {
|
|
803
|
+
key: string;
|
|
804
|
+
unit: string;
|
|
805
|
+
included: number;
|
|
806
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
807
|
+
grantIds: string[];
|
|
808
|
+
}[];
|
|
809
|
+
conflicts: {
|
|
810
|
+
key: string;
|
|
811
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
812
|
+
grantIds: string[];
|
|
813
|
+
}[];
|
|
814
|
+
};
|
|
815
|
+
grants: {
|
|
816
|
+
schemaVersion: 1;
|
|
817
|
+
id: string;
|
|
818
|
+
revokedAt: string | null;
|
|
819
|
+
beneficiaryAccountId: string & z.BRAND<"OxyAccountId">;
|
|
820
|
+
period: {
|
|
821
|
+
start: string;
|
|
822
|
+
end: string;
|
|
823
|
+
};
|
|
824
|
+
offerId: string;
|
|
825
|
+
offerVersion: number;
|
|
826
|
+
origin: "bundle" | "individual";
|
|
827
|
+
sourceSegmentId: string;
|
|
828
|
+
benefit: {
|
|
829
|
+
kind: "capability";
|
|
830
|
+
key: string;
|
|
831
|
+
productId: string;
|
|
832
|
+
} | {
|
|
833
|
+
kind: "quota";
|
|
834
|
+
key: string;
|
|
835
|
+
unit: string;
|
|
836
|
+
included: number;
|
|
837
|
+
productId: string;
|
|
838
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
839
|
+
};
|
|
840
|
+
}[];
|
|
841
|
+
}, {
|
|
842
|
+
schemaVersion: 1;
|
|
843
|
+
access: {
|
|
844
|
+
schemaVersion: 1;
|
|
845
|
+
subjectAccountId: string;
|
|
846
|
+
capabilities: {
|
|
847
|
+
key: string;
|
|
848
|
+
grantIds: string[];
|
|
849
|
+
}[];
|
|
850
|
+
evaluatedAt: string;
|
|
851
|
+
productId: string;
|
|
852
|
+
quotas: {
|
|
853
|
+
key: string;
|
|
854
|
+
unit: string;
|
|
855
|
+
included: number;
|
|
856
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
857
|
+
grantIds: string[];
|
|
858
|
+
}[];
|
|
859
|
+
conflicts: {
|
|
860
|
+
key: string;
|
|
861
|
+
reason: "combination_mismatch" | "unit_mismatch" | "exclusive_overlap" | "unsafe_total";
|
|
862
|
+
grantIds: string[];
|
|
863
|
+
}[];
|
|
864
|
+
};
|
|
865
|
+
grants: {
|
|
866
|
+
schemaVersion: 1;
|
|
867
|
+
id: string;
|
|
868
|
+
revokedAt: string | null;
|
|
869
|
+
beneficiaryAccountId: string;
|
|
870
|
+
period: {
|
|
871
|
+
start: string;
|
|
872
|
+
end: string;
|
|
873
|
+
};
|
|
874
|
+
offerId: string;
|
|
875
|
+
offerVersion: number;
|
|
876
|
+
origin: "bundle" | "individual";
|
|
877
|
+
sourceSegmentId: string;
|
|
878
|
+
benefit: {
|
|
879
|
+
kind: "capability";
|
|
880
|
+
key: string;
|
|
881
|
+
productId: string;
|
|
882
|
+
} | {
|
|
883
|
+
kind: "quota";
|
|
884
|
+
key: string;
|
|
885
|
+
unit: string;
|
|
886
|
+
included: number;
|
|
887
|
+
productId: string;
|
|
888
|
+
combination: "maximum" | "sum" | "exclusive";
|
|
889
|
+
};
|
|
890
|
+
}[];
|
|
891
|
+
}>;
|
|
892
|
+
export type SubjectProductGrantSnapshot = z.infer<typeof subjectProductGrantSnapshotSchema>;
|
|
@@ -530,12 +530,15 @@ export declare const subscriptionCreditGrantsResponseSchema: z.ZodObject<{
|
|
|
530
530
|
}>;
|
|
531
531
|
export declare const cancelProductSubscriptionSchema: z.ZodObject<{
|
|
532
532
|
sourceId: z.ZodString;
|
|
533
|
+
actionId: z.ZodOptional<z.ZodString>;
|
|
533
534
|
expectedSubjectAccountId: z.ZodOptional<z.ZodBranded<z.ZodString, "OxyAccountId">>;
|
|
534
535
|
}, "strict", z.ZodTypeAny, {
|
|
535
536
|
sourceId: string;
|
|
537
|
+
actionId?: string | undefined;
|
|
536
538
|
expectedSubjectAccountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
537
539
|
}, {
|
|
538
540
|
sourceId: string;
|
|
541
|
+
actionId?: string | undefined;
|
|
539
542
|
expectedSubjectAccountId?: string | undefined;
|
|
540
543
|
}>;
|
|
541
544
|
export type ProductSubscriptionSummary = z.infer<typeof productSubscriptionSummarySchema>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const personalPlanCheckoutRequestSchema: z.ZodObject<{
|
|
3
|
+
expectedSubjectAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
4
|
+
offerId: z.ZodString;
|
|
5
|
+
offerVersion: z.ZodNumber;
|
|
6
|
+
idempotencyKey: z.ZodString;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
idempotencyKey: string;
|
|
9
|
+
offerId: string;
|
|
10
|
+
offerVersion: number;
|
|
11
|
+
expectedSubjectAccountId: string & z.BRAND<"OxyAccountId">;
|
|
12
|
+
}, {
|
|
13
|
+
idempotencyKey: string;
|
|
14
|
+
offerId: string;
|
|
15
|
+
offerVersion: number;
|
|
16
|
+
expectedSubjectAccountId: string;
|
|
17
|
+
}>;
|
|
18
|
+
/** No grant or subscription is created by checkout completion in the browser. */
|
|
19
|
+
export declare const personalPlanCheckoutResultSchema: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
|
|
20
|
+
state: z.ZodLiteral<"unconfigured">;
|
|
21
|
+
reason: z.ZodEnum<["provider_unconfigured", "offer_unconfigured", "price_unconfigured"]>;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
reason: "provider_unconfigured" | "offer_unconfigured" | "price_unconfigured";
|
|
24
|
+
state: "unconfigured";
|
|
25
|
+
}, {
|
|
26
|
+
reason: "provider_unconfigured" | "offer_unconfigured" | "price_unconfigured";
|
|
27
|
+
state: "unconfigured";
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
state: z.ZodLiteral<"pending">;
|
|
30
|
+
intentId: z.ZodString;
|
|
31
|
+
checkoutUrl: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
state: "pending";
|
|
34
|
+
intentId: string;
|
|
35
|
+
checkoutUrl?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
state: "pending";
|
|
38
|
+
intentId: string;
|
|
39
|
+
checkoutUrl?: string | undefined;
|
|
40
|
+
}>, z.ZodObject<{
|
|
41
|
+
state: z.ZodLiteral<"closed">;
|
|
42
|
+
intentId: z.ZodString;
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
44
|
+
state: "closed";
|
|
45
|
+
intentId: string;
|
|
46
|
+
}, {
|
|
47
|
+
state: "closed";
|
|
48
|
+
intentId: string;
|
|
49
|
+
}>, z.ZodObject<{
|
|
50
|
+
state: z.ZodLiteral<"fulfilled">;
|
|
51
|
+
intentId: z.ZodString;
|
|
52
|
+
}, "strict", z.ZodTypeAny, {
|
|
53
|
+
state: "fulfilled";
|
|
54
|
+
intentId: string;
|
|
55
|
+
}, {
|
|
56
|
+
state: "fulfilled";
|
|
57
|
+
intentId: string;
|
|
58
|
+
}>]>;
|
|
59
|
+
export type PersonalPlanCheckoutRequest = z.infer<typeof personalPlanCheckoutRequestSchema>;
|
|
60
|
+
export type PersonalPlanCheckoutResult = z.infer<typeof personalPlanCheckoutResultSchema>;
|