@oxy.so/contracts 5.8.0 → 6.0.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/accountAccess.js +6 -5
- package/dist/cjs/accountEmail.js +13 -5
- package/dist/cjs/accountGraph.js +10 -9
- package/dist/cjs/accountName.js +3 -2
- package/dist/cjs/agency.js +91 -34
- package/dist/cjs/agentKeys.js +21 -17
- package/dist/cjs/appAssertions.js +14 -13
- package/dist/cjs/applicationRoles.js +19 -12
- package/dist/cjs/civic.js +10 -9
- package/dist/cjs/client/check.js +61 -53
- package/dist/cjs/consoleOnboarding.js +9 -4
- package/dist/cjs/contentClaims.js +23 -14
- package/dist/cjs/deviceDirectory.js +11 -9
- package/dist/cjs/deviceSession.js +27 -25
- package/dist/cjs/email/messages.js +20 -18
- package/dist/cjs/emailAgentContext.js +11 -9
- package/dist/cjs/externalIdentity.js +15 -11
- package/dist/cjs/federationInstanceFetch.js +12 -7
- package/dist/cjs/identity.js +19 -17
- package/dist/cjs/identityLink.js +6 -4
- package/dist/cjs/identityProof.js +6 -4
- package/dist/cjs/inboxPush.js +5 -4
- package/dist/cjs/index.js +15 -6
- package/dist/cjs/inference/accountBilling.js +35 -33
- package/dist/cjs/inference/aliaModelRelease.js +9 -7
- package/dist/cjs/inference/attribution.js +14 -12
- package/dist/cjs/inference/catalogue.js +35 -29
- package/dist/cjs/inference/economics.js +24 -19
- package/dist/cjs/inference/embeddings.js +9 -7
- package/dist/cjs/inference/entitlement.js +17 -15
- package/dist/cjs/inference/errors.js +15 -8
- package/dist/cjs/inference/identifiers.js +33 -21
- package/dist/cjs/inference/inbox.js +37 -35
- package/dist/cjs/inference/modelDocumentation.js +16 -14
- package/dist/cjs/inference/money.js +5 -4
- package/dist/cjs/inference/priceVersion.js +10 -5
- package/dist/cjs/inference/providerConnection.js +21 -14
- package/dist/cjs/inference/realtime.js +88 -47
- package/dist/cjs/inference/request.js +27 -25
- package/dist/cjs/inference/routingPolicy.js +12 -10
- package/dist/cjs/inference/streamEvents.js +22 -16
- package/dist/cjs/inference/usage.js +32 -15
- package/dist/cjs/keyRecovery.js +8 -6
- package/dist/cjs/keyRotation.js +5 -4
- package/dist/cjs/linkedAccounts.js +22 -18
- package/dist/cjs/moderationReputation.js +29 -27
- package/dist/cjs/notifications.js +25 -9
- package/dist/cjs/numberChecks.js +45 -0
- package/dist/cjs/oauth.js +14 -12
- package/dist/cjs/organizations.js +23 -21
- package/dist/cjs/products/access.js +10 -8
- package/dist/cjs/products/billing.js +10 -8
- package/dist/cjs/products/checkout.js +22 -10
- package/dist/cjs/products/plans.js +15 -10
- package/dist/cjs/protocol.js +6 -5
- package/dist/cjs/recommendations.js +27 -19
- package/dist/cjs/reputation.js +15 -13
- package/dist/cjs/safety.js +43 -27
- package/dist/cjs/serviceToken.js +81 -2
- package/dist/cjs/sessionRevocation.js +8 -6
- package/dist/cjs/signIn.js +42 -24
- package/dist/cjs/stickers.js +19 -15
- package/dist/cjs/stringChecks.js +70 -0
- package/dist/cjs/transparency.js +14 -12
- package/dist/cjs/updates.js +24 -22
- package/dist/cjs/userInvalidation.js +7 -5
- package/dist/cjs/userResponse.js +8 -7
- package/dist/cjs/username.js +7 -6
- package/dist/esm/accountAccess.js +4 -3
- package/dist/esm/accountEmail.js +13 -5
- package/dist/esm/accountGraph.js +8 -7
- package/dist/esm/accountName.js +3 -2
- package/dist/esm/agency.js +90 -33
- package/dist/esm/agentKeys.js +21 -17
- package/dist/esm/appAssertions.js +11 -10
- package/dist/esm/applicationRoles.js +16 -9
- package/dist/esm/civic.js +8 -7
- package/dist/esm/client/check.js +61 -53
- package/dist/esm/consoleOnboarding.js +7 -2
- package/dist/esm/contentClaims.js +23 -14
- package/dist/esm/deviceDirectory.js +11 -9
- package/dist/esm/deviceSession.js +27 -25
- package/dist/esm/email/messages.js +18 -16
- package/dist/esm/emailAgentContext.js +11 -9
- package/dist/esm/externalIdentity.js +15 -11
- package/dist/esm/federationInstanceFetch.js +10 -5
- package/dist/esm/identity.js +17 -15
- package/dist/esm/identityLink.js +6 -4
- package/dist/esm/identityProof.js +6 -4
- package/dist/esm/inboxPush.js +3 -2
- package/dist/esm/index.js +4 -2
- package/dist/esm/inference/accountBilling.js +33 -31
- package/dist/esm/inference/aliaModelRelease.js +7 -5
- package/dist/esm/inference/attribution.js +14 -12
- package/dist/esm/inference/catalogue.js +33 -27
- package/dist/esm/inference/economics.js +22 -17
- package/dist/esm/inference/embeddings.js +9 -7
- package/dist/esm/inference/entitlement.js +15 -13
- package/dist/esm/inference/errors.js +13 -6
- package/dist/esm/inference/identifiers.js +31 -19
- package/dist/esm/inference/inbox.js +37 -35
- package/dist/esm/inference/modelDocumentation.js +14 -12
- package/dist/esm/inference/money.js +3 -2
- package/dist/esm/inference/priceVersion.js +8 -3
- package/dist/esm/inference/providerConnection.js +19 -12
- package/dist/esm/inference/realtime.js +85 -44
- package/dist/esm/inference/request.js +25 -23
- package/dist/esm/inference/routingPolicy.js +9 -7
- package/dist/esm/inference/streamEvents.js +20 -14
- package/dist/esm/inference/usage.js +30 -13
- package/dist/esm/keyRecovery.js +8 -6
- package/dist/esm/keyRotation.js +5 -4
- package/dist/esm/linkedAccounts.js +20 -16
- package/dist/esm/moderationReputation.js +27 -25
- package/dist/esm/notifications.js +23 -7
- package/dist/esm/numberChecks.js +41 -0
- package/dist/esm/oauth.js +14 -12
- package/dist/esm/organizations.js +23 -21
- package/dist/esm/products/access.js +10 -8
- package/dist/esm/products/billing.js +10 -8
- package/dist/esm/products/checkout.js +22 -10
- package/dist/esm/products/plans.js +15 -10
- package/dist/esm/protocol.js +4 -3
- package/dist/esm/recommendations.js +25 -17
- package/dist/esm/reputation.js +13 -11
- package/dist/esm/safety.js +43 -27
- package/dist/esm/serviceToken.js +80 -1
- package/dist/esm/sessionRevocation.js +6 -4
- package/dist/esm/signIn.js +42 -24
- package/dist/esm/stickers.js +17 -13
- package/dist/esm/stringChecks.js +63 -0
- package/dist/esm/transparency.js +14 -12
- package/dist/esm/updates.js +22 -20
- package/dist/esm/userInvalidation.js +4 -2
- package/dist/esm/userResponse.js +4 -3
- package/dist/esm/username.js +3 -2
- package/dist/types/accountAccess.d.ts +29 -70
- package/dist/types/accountEmail.d.ts +2 -14
- package/dist/types/accountGraph.d.ts +179 -171
- package/dist/types/accountName.d.ts +1 -1
- package/dist/types/accountSubject.d.ts +20 -93
- package/dist/types/agency.d.ts +528 -2924
- package/dist/types/agentKeys.d.ts +48 -421
- package/dist/types/appAssertions.d.ts +56 -210
- package/dist/types/applicationRoles.d.ts +30 -276
- package/dist/types/avatarCharacter.d.ts +1 -1
- package/dist/types/civic.d.ts +1 -13
- package/dist/types/client/agentKeys.d.ts +18 -18
- package/dist/types/client/appAssertions.d.ts +3 -3
- package/dist/types/client/check.d.ts +13 -13
- package/dist/types/client/deviceDirectory.d.ts +51 -51
- package/dist/types/client/deviceSession.d.ts +14 -14
- package/dist/types/client/organizations.d.ts +25 -25
- package/dist/types/client/products.d.ts +33 -33
- package/dist/types/client/recommendations.d.ts +2 -2
- package/dist/types/client/safety.d.ts +45 -45
- package/dist/types/client/sessionStatus.d.ts +4 -4
- package/dist/types/client/signIn.d.ts +1 -1
- package/dist/types/commonsSignIn.d.ts +4 -1
- package/dist/types/consoleOnboarding.d.ts +24 -44
- package/dist/types/contentClaims.d.ts +24 -180
- package/dist/types/deviceDirectory.d.ts +109 -1040
- package/dist/types/deviceSession.d.ts +36 -298
- package/dist/types/email/messages.d.ts +212 -1793
- package/dist/types/emailAgentContext.d.ts +10 -194
- package/dist/types/externalIdentity.d.ts +121 -615
- package/dist/types/federationInstanceFetch.d.ts +3 -32
- package/dist/types/identity.d.ts +15 -92
- package/dist/types/identityLink.d.ts +6 -84
- package/dist/types/identityProof.d.ts +5 -17
- package/dist/types/inboxPush.d.ts +1 -9
- package/dist/types/index.d.ts +5 -3
- package/dist/types/inference/accountBilling.d.ts +151 -488
- package/dist/types/inference/aliaModelRelease.d.ts +42 -439
- package/dist/types/inference/attribution.d.ts +75 -104
- package/dist/types/inference/catalogue.d.ts +417 -1599
- package/dist/types/inference/economics.d.ts +69 -276
- package/dist/types/inference/embeddings.d.ts +110 -406
- package/dist/types/inference/entitlement.d.ts +80 -335
- package/dist/types/inference/errors.d.ts +90 -102
- package/dist/types/inference/identifiers.d.ts +12 -4
- package/dist/types/inference/inbox.d.ts +105 -420
- package/dist/types/inference/modelDocumentation.d.ts +201 -1390
- package/dist/types/inference/money.d.ts +65 -32
- package/dist/types/inference/priceVersion.d.ts +53 -120
- package/dist/types/inference/providerConnection.d.ts +253 -710
- package/dist/types/inference/realtime.d.ts +954 -6825
- package/dist/types/inference/request.d.ts +300 -2572
- package/dist/types/inference/routingPolicy.d.ts +95 -503
- package/dist/types/inference/streamEvents.d.ts +253 -721
- package/dist/types/inference/usage.d.ts +317 -950
- package/dist/types/keyRecovery.d.ts +3 -51
- package/dist/types/keyRotation.d.ts +3 -38
- package/dist/types/linkedAccounts.d.ts +50 -236
- package/dist/types/moderationReputation.d.ts +81 -14
- package/dist/types/notifications.d.ts +19 -51
- package/dist/types/numberChecks.d.ts +9 -0
- package/dist/types/oauth.d.ts +101 -809
- package/dist/types/organizations.d.ts +268 -921
- package/dist/types/oxyRecordTypes.d.ts +11 -1
- package/dist/types/products/access.d.ts +125 -775
- package/dist/types/products/billing.d.ts +67 -503
- package/dist/types/products/checkout.d.ts +16 -69
- package/dist/types/products/plans.d.ts +33 -366
- package/dist/types/recommendations.d.ts +76 -389
- package/dist/types/reputation.d.ts +37 -5
- package/dist/types/safety.d.ts +408 -2048
- package/dist/types/serviceToken.d.ts +247 -7
- package/dist/types/sessionRevocation.d.ts +2 -17
- package/dist/types/sessionStatus.d.ts +27 -115
- package/dist/types/signIn.d.ts +53 -553
- package/dist/types/stickers.d.ts +67 -819
- package/dist/types/stringChecks.d.ts +16 -0
- package/dist/types/transparency.d.ts +14 -302
- package/dist/types/updates.d.ts +60 -316
- package/dist/types/userInvalidation.d.ts +4 -13
- package/dist/types/userResponse.d.ts +302 -2400
- package/dist/types/username.d.ts +3 -3
- package/package.json +2 -2
|
@@ -51,10 +51,17 @@ import { z } from 'zod';
|
|
|
51
51
|
* draws from once the prepaid and granted balances are exhausted.
|
|
52
52
|
*/
|
|
53
53
|
export declare const BILLING_MODES: readonly ["prepaid", "invoiced"];
|
|
54
|
-
export declare const billingModeSchema: z.ZodEnum<
|
|
54
|
+
export declare const billingModeSchema: z.ZodEnum<{
|
|
55
|
+
prepaid: "prepaid";
|
|
56
|
+
invoiced: "invoiced";
|
|
57
|
+
}>;
|
|
55
58
|
/** Whether the profile may currently spend at all. */
|
|
56
59
|
export declare const BILLING_PROFILE_STATUSES: readonly ["active", "suspended", "closed"];
|
|
57
|
-
export declare const billingProfileStatusSchema: z.ZodEnum<
|
|
60
|
+
export declare const billingProfileStatusSchema: z.ZodEnum<{
|
|
61
|
+
active: "active";
|
|
62
|
+
suspended: "suspended";
|
|
63
|
+
closed: "closed";
|
|
64
|
+
}>;
|
|
58
65
|
/**
|
|
59
66
|
* Automatic top-up settings.
|
|
60
67
|
*
|
|
@@ -63,29 +70,11 @@ export declare const billingProfileStatusSchema: z.ZodEnum<["active", "suspended
|
|
|
63
70
|
* `enabled` recharge with either missing is a setting that reads as "on" and can
|
|
64
71
|
* never fire — the shape a customer discovers only when their traffic stops.
|
|
65
72
|
*/
|
|
66
|
-
export declare const autoRechargeSchema: z.
|
|
73
|
+
export declare const autoRechargeSchema: z.ZodObject<{
|
|
67
74
|
enabled: z.ZodBoolean;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
amount: z.ZodOptional<z.ZodBranded<z.ZodString, "ExactDecimal">>;
|
|
72
|
-
}, "strict", z.ZodTypeAny, {
|
|
73
|
-
enabled: boolean;
|
|
74
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
75
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
76
|
-
}, {
|
|
77
|
-
enabled: boolean;
|
|
78
|
-
amount?: string | undefined;
|
|
79
|
-
threshold?: string | undefined;
|
|
80
|
-
}>, {
|
|
81
|
-
enabled: boolean;
|
|
82
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
83
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
84
|
-
}, {
|
|
85
|
-
enabled: boolean;
|
|
86
|
-
amount?: string | undefined;
|
|
87
|
-
threshold?: string | undefined;
|
|
88
|
-
}>;
|
|
75
|
+
threshold: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
76
|
+
amount: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
77
|
+
}, z.core.$strict>;
|
|
89
78
|
/**
|
|
90
79
|
* Which account pays for a workload, and on what terms.
|
|
91
80
|
*
|
|
@@ -95,71 +84,27 @@ export declare const autoRechargeSchema: z.ZodEffects<z.ZodObject<{
|
|
|
95
84
|
* substituted for it anywhere in this contract.
|
|
96
85
|
*/
|
|
97
86
|
export declare const billingProfileSchema: z.ZodObject<{
|
|
98
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
99
87
|
schemaVersion: z.ZodLiteral<1>;
|
|
100
|
-
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
88
|
+
accountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
|
|
101
89
|
currency: z.ZodString;
|
|
102
|
-
billingMode: z.ZodEnum<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
enabled: z.ZodBoolean;
|
|
111
|
-
/** Recharge when the spendable balance falls below this. */
|
|
112
|
-
threshold: z.ZodOptional<z.ZodBranded<z.ZodString, "ExactDecimal">>;
|
|
113
|
-
/** How much to add. */
|
|
114
|
-
amount: z.ZodOptional<z.ZodBranded<z.ZodString, "ExactDecimal">>;
|
|
115
|
-
}, "strict", z.ZodTypeAny, {
|
|
116
|
-
enabled: boolean;
|
|
117
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
118
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
119
|
-
}, {
|
|
120
|
-
enabled: boolean;
|
|
121
|
-
amount?: string | undefined;
|
|
122
|
-
threshold?: string | undefined;
|
|
123
|
-
}>, {
|
|
124
|
-
enabled: boolean;
|
|
125
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
126
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
127
|
-
}, {
|
|
128
|
-
enabled: boolean;
|
|
129
|
-
amount?: string | undefined;
|
|
130
|
-
threshold?: string | undefined;
|
|
90
|
+
billingMode: z.ZodEnum<{
|
|
91
|
+
prepaid: "prepaid";
|
|
92
|
+
invoiced: "invoiced";
|
|
93
|
+
}>;
|
|
94
|
+
status: z.ZodEnum<{
|
|
95
|
+
active: "active";
|
|
96
|
+
suspended: "suspended";
|
|
97
|
+
closed: "closed";
|
|
131
98
|
}>;
|
|
99
|
+
creditLimit: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
100
|
+
autoRecharge: z.ZodObject<{
|
|
101
|
+
enabled: z.ZodBoolean;
|
|
102
|
+
threshold: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
103
|
+
amount: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
104
|
+
}, z.core.$strict>;
|
|
132
105
|
createdAt: z.ZodString;
|
|
133
106
|
updatedAt: z.ZodString;
|
|
134
|
-
},
|
|
135
|
-
status: "active" | "suspended" | "closed";
|
|
136
|
-
accountId: string & z.BRAND<"OxyAccountId">;
|
|
137
|
-
createdAt: string;
|
|
138
|
-
updatedAt: string;
|
|
139
|
-
schemaVersion: 1;
|
|
140
|
-
currency: string;
|
|
141
|
-
billingMode: "prepaid" | "invoiced";
|
|
142
|
-
creditLimit: string & z.BRAND<"ExactDecimal">;
|
|
143
|
-
autoRecharge: {
|
|
144
|
-
enabled: boolean;
|
|
145
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
146
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
147
|
-
};
|
|
148
|
-
}, {
|
|
149
|
-
status: "active" | "suspended" | "closed";
|
|
150
|
-
accountId: string;
|
|
151
|
-
createdAt: string;
|
|
152
|
-
updatedAt: string;
|
|
153
|
-
schemaVersion: 1;
|
|
154
|
-
currency: string;
|
|
155
|
-
billingMode: "prepaid" | "invoiced";
|
|
156
|
-
creditLimit: string;
|
|
157
|
-
autoRecharge: {
|
|
158
|
-
enabled: boolean;
|
|
159
|
-
amount?: string | undefined;
|
|
160
|
-
threshold?: string | undefined;
|
|
161
|
-
};
|
|
162
|
-
}>;
|
|
107
|
+
}, z.core.$strict>;
|
|
163
108
|
/**
|
|
164
109
|
* WHO pays for an account and on what TERMS. Deliberately not how much they
|
|
165
110
|
* have.
|
|
@@ -178,120 +123,40 @@ export declare const billingProfileSchema: z.ZodObject<{
|
|
|
178
123
|
* with no indication whose it is would be worse than showing nothing.
|
|
179
124
|
*/
|
|
180
125
|
export declare const accountBillingStateSchema: z.ZodObject<{
|
|
181
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
182
126
|
schemaVersion: z.ZodLiteral<1>;
|
|
183
|
-
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
184
|
-
billingAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
127
|
+
accountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
|
|
128
|
+
billingAccountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
|
|
185
129
|
inherited: z.ZodBoolean;
|
|
186
130
|
profile: z.ZodObject<{
|
|
187
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
188
131
|
schemaVersion: z.ZodLiteral<1>;
|
|
189
|
-
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
132
|
+
accountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
|
|
190
133
|
currency: z.ZodString;
|
|
191
|
-
billingMode: z.ZodEnum<
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
enabled: z.ZodBoolean;
|
|
200
|
-
/** Recharge when the spendable balance falls below this. */
|
|
201
|
-
threshold: z.ZodOptional<z.ZodBranded<z.ZodString, "ExactDecimal">>;
|
|
202
|
-
/** How much to add. */
|
|
203
|
-
amount: z.ZodOptional<z.ZodBranded<z.ZodString, "ExactDecimal">>;
|
|
204
|
-
}, "strict", z.ZodTypeAny, {
|
|
205
|
-
enabled: boolean;
|
|
206
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
207
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
208
|
-
}, {
|
|
209
|
-
enabled: boolean;
|
|
210
|
-
amount?: string | undefined;
|
|
211
|
-
threshold?: string | undefined;
|
|
212
|
-
}>, {
|
|
213
|
-
enabled: boolean;
|
|
214
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
215
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
216
|
-
}, {
|
|
217
|
-
enabled: boolean;
|
|
218
|
-
amount?: string | undefined;
|
|
219
|
-
threshold?: string | undefined;
|
|
134
|
+
billingMode: z.ZodEnum<{
|
|
135
|
+
prepaid: "prepaid";
|
|
136
|
+
invoiced: "invoiced";
|
|
137
|
+
}>;
|
|
138
|
+
status: z.ZodEnum<{
|
|
139
|
+
active: "active";
|
|
140
|
+
suspended: "suspended";
|
|
141
|
+
closed: "closed";
|
|
220
142
|
}>;
|
|
143
|
+
creditLimit: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
144
|
+
autoRecharge: z.ZodObject<{
|
|
145
|
+
enabled: z.ZodBoolean;
|
|
146
|
+
threshold: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
147
|
+
amount: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
148
|
+
}, z.core.$strict>;
|
|
221
149
|
createdAt: z.ZodString;
|
|
222
150
|
updatedAt: z.ZodString;
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
accountId: string & z.BRAND<"OxyAccountId">;
|
|
226
|
-
createdAt: string;
|
|
227
|
-
updatedAt: string;
|
|
228
|
-
schemaVersion: 1;
|
|
229
|
-
currency: string;
|
|
230
|
-
billingMode: "prepaid" | "invoiced";
|
|
231
|
-
creditLimit: string & z.BRAND<"ExactDecimal">;
|
|
232
|
-
autoRecharge: {
|
|
233
|
-
enabled: boolean;
|
|
234
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
235
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
236
|
-
};
|
|
237
|
-
}, {
|
|
238
|
-
status: "active" | "suspended" | "closed";
|
|
239
|
-
accountId: string;
|
|
240
|
-
createdAt: string;
|
|
241
|
-
updatedAt: string;
|
|
242
|
-
schemaVersion: 1;
|
|
243
|
-
currency: string;
|
|
244
|
-
billingMode: "prepaid" | "invoiced";
|
|
245
|
-
creditLimit: string;
|
|
246
|
-
autoRecharge: {
|
|
247
|
-
enabled: boolean;
|
|
248
|
-
amount?: string | undefined;
|
|
249
|
-
threshold?: string | undefined;
|
|
250
|
-
};
|
|
251
|
-
}>;
|
|
252
|
-
}, "strict", z.ZodTypeAny, {
|
|
253
|
-
accountId: string & z.BRAND<"OxyAccountId">;
|
|
254
|
-
inherited: boolean;
|
|
255
|
-
schemaVersion: 1;
|
|
256
|
-
profile: {
|
|
257
|
-
status: "active" | "suspended" | "closed";
|
|
258
|
-
accountId: string & z.BRAND<"OxyAccountId">;
|
|
259
|
-
createdAt: string;
|
|
260
|
-
updatedAt: string;
|
|
261
|
-
schemaVersion: 1;
|
|
262
|
-
currency: string;
|
|
263
|
-
billingMode: "prepaid" | "invoiced";
|
|
264
|
-
creditLimit: string & z.BRAND<"ExactDecimal">;
|
|
265
|
-
autoRecharge: {
|
|
266
|
-
enabled: boolean;
|
|
267
|
-
amount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
268
|
-
threshold?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
billingAccountId: string & z.BRAND<"OxyAccountId">;
|
|
272
|
-
}, {
|
|
273
|
-
accountId: string;
|
|
274
|
-
inherited: boolean;
|
|
275
|
-
schemaVersion: 1;
|
|
276
|
-
profile: {
|
|
277
|
-
status: "active" | "suspended" | "closed";
|
|
278
|
-
accountId: string;
|
|
279
|
-
createdAt: string;
|
|
280
|
-
updatedAt: string;
|
|
281
|
-
schemaVersion: 1;
|
|
282
|
-
currency: string;
|
|
283
|
-
billingMode: "prepaid" | "invoiced";
|
|
284
|
-
creditLimit: string;
|
|
285
|
-
autoRecharge: {
|
|
286
|
-
enabled: boolean;
|
|
287
|
-
amount?: string | undefined;
|
|
288
|
-
threshold?: string | undefined;
|
|
289
|
-
};
|
|
290
|
-
};
|
|
291
|
-
billingAccountId: string;
|
|
292
|
-
}>;
|
|
151
|
+
}, z.core.$strict>;
|
|
152
|
+
}, z.core.$strict>;
|
|
293
153
|
export declare const BILLING_INVOICE_STATUSES: readonly ["draft", "open", "paid", "void"];
|
|
294
|
-
export declare const billingInvoiceStatusSchema: z.ZodEnum<
|
|
154
|
+
export declare const billingInvoiceStatusSchema: z.ZodEnum<{
|
|
155
|
+
void: "void";
|
|
156
|
+
paid: "paid";
|
|
157
|
+
draft: "draft";
|
|
158
|
+
open: "open";
|
|
159
|
+
}>;
|
|
295
160
|
/**
|
|
296
161
|
* A period's charges, aggregated — the invoiced-enterprise settlement document.
|
|
297
162
|
*
|
|
@@ -305,56 +170,31 @@ export declare const billingInvoiceStatusSchema: z.ZodEnum<["draft", "open", "pa
|
|
|
305
170
|
* database knows. Storing what was used keeps the invoice reproducible.
|
|
306
171
|
*/
|
|
307
172
|
export declare const billingInvoiceSchema: z.ZodObject<{
|
|
308
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
309
173
|
schemaVersion: z.ZodLiteral<1>;
|
|
310
174
|
id: z.ZodString;
|
|
311
|
-
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
175
|
+
accountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
|
|
312
176
|
currency: z.ZodString;
|
|
313
177
|
periodStart: z.ZodString;
|
|
314
178
|
periodEnd: z.ZodString;
|
|
315
|
-
status: z.ZodEnum<
|
|
316
|
-
|
|
317
|
-
|
|
179
|
+
status: z.ZodEnum<{
|
|
180
|
+
void: "void";
|
|
181
|
+
paid: "paid";
|
|
182
|
+
draft: "draft";
|
|
183
|
+
open: "open";
|
|
184
|
+
}>;
|
|
185
|
+
subtotalAmount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
186
|
+
totalAmount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
318
187
|
minorUnitExponent: z.ZodNumber;
|
|
319
|
-
/** The processor's own invoice id, for reconciliation. Never an authority. */
|
|
320
188
|
externalInvoiceRef: z.ZodOptional<z.ZodString>;
|
|
321
189
|
issuedAt: z.ZodOptional<z.ZodString>;
|
|
322
190
|
paidAt: z.ZodOptional<z.ZodString>;
|
|
323
191
|
receiptCount: z.ZodNumber;
|
|
324
|
-
},
|
|
325
|
-
status: "void" | "paid" | "draft" | "open";
|
|
326
|
-
accountId: string & z.BRAND<"OxyAccountId">;
|
|
327
|
-
id: string;
|
|
328
|
-
schemaVersion: 1;
|
|
329
|
-
currency: string;
|
|
330
|
-
periodEnd: string;
|
|
331
|
-
periodStart: string;
|
|
332
|
-
subtotalAmount: string & z.BRAND<"ExactDecimal">;
|
|
333
|
-
totalAmount: string & z.BRAND<"ExactDecimal">;
|
|
334
|
-
minorUnitExponent: number;
|
|
335
|
-
receiptCount: number;
|
|
336
|
-
issuedAt?: string | undefined;
|
|
337
|
-
externalInvoiceRef?: string | undefined;
|
|
338
|
-
paidAt?: string | undefined;
|
|
339
|
-
}, {
|
|
340
|
-
status: "void" | "paid" | "draft" | "open";
|
|
341
|
-
accountId: string;
|
|
342
|
-
id: string;
|
|
343
|
-
schemaVersion: 1;
|
|
344
|
-
currency: string;
|
|
345
|
-
periodEnd: string;
|
|
346
|
-
periodStart: string;
|
|
347
|
-
subtotalAmount: string;
|
|
348
|
-
totalAmount: string;
|
|
349
|
-
minorUnitExponent: number;
|
|
350
|
-
receiptCount: number;
|
|
351
|
-
issuedAt?: string | undefined;
|
|
352
|
-
externalInvoiceRef?: string | undefined;
|
|
353
|
-
paidAt?: string | undefined;
|
|
354
|
-
}>;
|
|
192
|
+
}, z.core.$strict>;
|
|
355
193
|
/** The processors this platform records payments from. */
|
|
356
194
|
export declare const EXTERNAL_PAYMENT_PROVIDERS: readonly ["stripe"];
|
|
357
|
-
export declare const externalPaymentProviderSchema: z.ZodEnum<
|
|
195
|
+
export declare const externalPaymentProviderSchema: z.ZodEnum<{
|
|
196
|
+
stripe: "stripe";
|
|
197
|
+
}>;
|
|
358
198
|
/**
|
|
359
199
|
* What kind of processor record `externalRef` names.
|
|
360
200
|
*
|
|
@@ -363,7 +203,10 @@ export declare const externalPaymentProviderSchema: z.ZodEnum<["stripe"]>;
|
|
|
363
203
|
* both would double the external total.
|
|
364
204
|
*/
|
|
365
205
|
export declare const EXTERNAL_PAYMENT_KINDS: readonly ["payment_intent", "invoice"];
|
|
366
|
-
export declare const externalPaymentKindSchema: z.ZodEnum<
|
|
206
|
+
export declare const externalPaymentKindSchema: z.ZodEnum<{
|
|
207
|
+
payment_intent: "payment_intent";
|
|
208
|
+
invoice: "invoice";
|
|
209
|
+
}>;
|
|
367
210
|
/**
|
|
368
211
|
* A processor payment that funded an Oxy balance.
|
|
369
212
|
*
|
|
@@ -374,41 +217,28 @@ export declare const externalPaymentKindSchema: z.ZodEnum<["payment_intent", "in
|
|
|
374
217
|
*/
|
|
375
218
|
export declare const externalPaymentSchema: z.ZodObject<{
|
|
376
219
|
id: z.ZodString;
|
|
377
|
-
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
378
|
-
provider: z.ZodEnum<
|
|
379
|
-
|
|
220
|
+
accountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
|
|
221
|
+
provider: z.ZodEnum<{
|
|
222
|
+
stripe: "stripe";
|
|
223
|
+
}>;
|
|
224
|
+
externalKind: z.ZodEnum<{
|
|
225
|
+
payment_intent: "payment_intent";
|
|
226
|
+
invoice: "invoice";
|
|
227
|
+
}>;
|
|
380
228
|
externalRef: z.ZodString;
|
|
381
|
-
amount: z.ZodBranded<z.ZodString, "ExactDecimal">;
|
|
229
|
+
amount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
382
230
|
currency: z.ZodString;
|
|
383
231
|
ledgerEntryId: z.ZodString;
|
|
384
232
|
occurredAt: z.ZodString;
|
|
385
233
|
createdAt: z.ZodString;
|
|
386
|
-
},
|
|
387
|
-
accountId: string & z.BRAND<"OxyAccountId">;
|
|
388
|
-
createdAt: string;
|
|
389
|
-
id: string;
|
|
390
|
-
occurredAt: string;
|
|
391
|
-
currency: string;
|
|
392
|
-
amount: string & z.BRAND<"ExactDecimal">;
|
|
393
|
-
provider: "stripe";
|
|
394
|
-
externalKind: "payment_intent" | "invoice";
|
|
395
|
-
externalRef: string;
|
|
396
|
-
ledgerEntryId: string;
|
|
397
|
-
}, {
|
|
398
|
-
accountId: string;
|
|
399
|
-
createdAt: string;
|
|
400
|
-
id: string;
|
|
401
|
-
occurredAt: string;
|
|
402
|
-
currency: string;
|
|
403
|
-
amount: string;
|
|
404
|
-
provider: "stripe";
|
|
405
|
-
externalKind: "payment_intent" | "invoice";
|
|
406
|
-
externalRef: string;
|
|
407
|
-
ledgerEntryId: string;
|
|
408
|
-
}>;
|
|
234
|
+
}, z.core.$strict>;
|
|
409
235
|
/** Lifecycle of one automatic top-up. */
|
|
410
236
|
export declare const AUTO_RECHARGE_STATUSES: readonly ["pending", "succeeded", "failed"];
|
|
411
|
-
export declare const autoRechargeStatusSchema: z.ZodEnum<
|
|
237
|
+
export declare const autoRechargeStatusSchema: z.ZodEnum<{
|
|
238
|
+
pending: "pending";
|
|
239
|
+
succeeded: "succeeded";
|
|
240
|
+
failed: "failed";
|
|
241
|
+
}>;
|
|
412
242
|
/**
|
|
413
243
|
* One attempt to top an account up automatically.
|
|
414
244
|
*
|
|
@@ -418,45 +248,22 @@ export declare const autoRechargeStatusSchema: z.ZodEnum<["pending", "succeeded"
|
|
|
418
248
|
* this surface where a duplicate is not merely a wrong number in a report.
|
|
419
249
|
*/
|
|
420
250
|
export declare const autoRechargeAttemptSchema: z.ZodObject<{
|
|
421
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
422
251
|
schemaVersion: z.ZodLiteral<1>;
|
|
423
252
|
id: z.ZodString;
|
|
424
|
-
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
253
|
+
accountId: z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">;
|
|
425
254
|
currency: z.ZodString;
|
|
426
|
-
requestedAmount: z.ZodBranded<z.ZodString, "ExactDecimal">;
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
255
|
+
requestedAmount: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
256
|
+
balanceAtTrigger: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
257
|
+
status: z.ZodEnum<{
|
|
258
|
+
pending: "pending";
|
|
259
|
+
succeeded: "succeeded";
|
|
260
|
+
failed: "failed";
|
|
261
|
+
}>;
|
|
430
262
|
externalRef: z.ZodOptional<z.ZodString>;
|
|
431
|
-
/** The processor's own decline code. Never a free-form message. */
|
|
432
263
|
failureCode: z.ZodOptional<z.ZodString>;
|
|
433
264
|
createdAt: z.ZodString;
|
|
434
265
|
updatedAt: z.ZodString;
|
|
435
|
-
},
|
|
436
|
-
status: "pending" | "succeeded" | "failed";
|
|
437
|
-
accountId: string & z.BRAND<"OxyAccountId">;
|
|
438
|
-
createdAt: string;
|
|
439
|
-
updatedAt: string;
|
|
440
|
-
id: string;
|
|
441
|
-
schemaVersion: 1;
|
|
442
|
-
currency: string;
|
|
443
|
-
requestedAmount: string & z.BRAND<"ExactDecimal">;
|
|
444
|
-
balanceAtTrigger: string & z.BRAND<"ExactDecimal">;
|
|
445
|
-
failureCode?: string | undefined;
|
|
446
|
-
externalRef?: string | undefined;
|
|
447
|
-
}, {
|
|
448
|
-
status: "pending" | "succeeded" | "failed";
|
|
449
|
-
accountId: string;
|
|
450
|
-
createdAt: string;
|
|
451
|
-
updatedAt: string;
|
|
452
|
-
id: string;
|
|
453
|
-
schemaVersion: 1;
|
|
454
|
-
currency: string;
|
|
455
|
-
requestedAmount: string;
|
|
456
|
-
balanceAtTrigger: string;
|
|
457
|
-
failureCode?: string | undefined;
|
|
458
|
-
externalRef?: string | undefined;
|
|
459
|
-
}>;
|
|
266
|
+
}, z.core.$strict>;
|
|
460
267
|
/**
|
|
461
268
|
* How an Oxy record and a processor record fail to agree.
|
|
462
269
|
*
|
|
@@ -474,49 +281,36 @@ export declare const autoRechargeAttemptSchema: z.ZodObject<{
|
|
|
474
281
|
* reconciliation report a number nobody acts on.
|
|
475
282
|
*/
|
|
476
283
|
export declare const RECONCILIATION_DISCREPANCY_KINDS: readonly ["missing_in_ledger", "missing_in_external", "amount_mismatch", "account_unresolved"];
|
|
477
|
-
export declare const reconciliationDiscrepancyKindSchema: z.ZodEnum<
|
|
284
|
+
export declare const reconciliationDiscrepancyKindSchema: z.ZodEnum<{
|
|
285
|
+
missing_in_ledger: "missing_in_ledger";
|
|
286
|
+
missing_in_external: "missing_in_external";
|
|
287
|
+
amount_mismatch: "amount_mismatch";
|
|
288
|
+
account_unresolved: "account_unresolved";
|
|
289
|
+
}>;
|
|
478
290
|
export declare const RECONCILIATION_RUN_STATUSES: readonly ["running", "completed", "failed"];
|
|
479
|
-
export declare const reconciliationRunStatusSchema: z.ZodEnum<
|
|
291
|
+
export declare const reconciliationRunStatusSchema: z.ZodEnum<{
|
|
292
|
+
failed: "failed";
|
|
293
|
+
completed: "completed";
|
|
294
|
+
running: "running";
|
|
295
|
+
}>;
|
|
480
296
|
export declare const reconciliationDiscrepancySchema: z.ZodObject<{
|
|
481
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
482
297
|
schemaVersion: z.ZodLiteral<1>;
|
|
483
298
|
id: z.ZodString;
|
|
484
299
|
runId: z.ZodString;
|
|
485
|
-
kind: z.ZodEnum<
|
|
486
|
-
|
|
300
|
+
kind: z.ZodEnum<{
|
|
301
|
+
missing_in_ledger: "missing_in_ledger";
|
|
302
|
+
missing_in_external: "missing_in_external";
|
|
303
|
+
amount_mismatch: "amount_mismatch";
|
|
304
|
+
account_unresolved: "account_unresolved";
|
|
305
|
+
}>;
|
|
306
|
+
accountId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">>;
|
|
487
307
|
externalRef: z.ZodOptional<z.ZodString>;
|
|
488
308
|
ledgerEntryId: z.ZodOptional<z.ZodString>;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
/** What the processor recorded. Absent for `missing_in_external`. */
|
|
492
|
-
externalAmount: z.ZodOptional<z.ZodBranded<z.ZodString, "ExactDecimal">>;
|
|
309
|
+
ledgerAmount: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
310
|
+
externalAmount: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
493
311
|
currency: z.ZodString;
|
|
494
312
|
createdAt: z.ZodString;
|
|
495
|
-
},
|
|
496
|
-
kind: "missing_in_ledger" | "missing_in_external" | "amount_mismatch" | "account_unresolved";
|
|
497
|
-
createdAt: string;
|
|
498
|
-
id: string;
|
|
499
|
-
schemaVersion: 1;
|
|
500
|
-
runId: string;
|
|
501
|
-
currency: string;
|
|
502
|
-
accountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
503
|
-
externalRef?: string | undefined;
|
|
504
|
-
ledgerEntryId?: string | undefined;
|
|
505
|
-
ledgerAmount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
506
|
-
externalAmount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
507
|
-
}, {
|
|
508
|
-
kind: "missing_in_ledger" | "missing_in_external" | "amount_mismatch" | "account_unresolved";
|
|
509
|
-
createdAt: string;
|
|
510
|
-
id: string;
|
|
511
|
-
schemaVersion: 1;
|
|
512
|
-
runId: string;
|
|
513
|
-
currency: string;
|
|
514
|
-
accountId?: string | undefined;
|
|
515
|
-
externalRef?: string | undefined;
|
|
516
|
-
ledgerEntryId?: string | undefined;
|
|
517
|
-
ledgerAmount?: string | undefined;
|
|
518
|
-
externalAmount?: string | undefined;
|
|
519
|
-
}>;
|
|
313
|
+
}, z.core.$strict>;
|
|
520
314
|
/**
|
|
521
315
|
* One reconciliation pass over a window.
|
|
522
316
|
*
|
|
@@ -526,199 +320,68 @@ export declare const reconciliationDiscrepancySchema: z.ZodObject<{
|
|
|
526
320
|
* would call it clean.
|
|
527
321
|
*/
|
|
528
322
|
export declare const reconciliationRunSchema: z.ZodObject<{
|
|
529
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
530
323
|
schemaVersion: z.ZodLiteral<1>;
|
|
531
324
|
id: z.ZodString;
|
|
532
|
-
provider: z.ZodEnum<
|
|
533
|
-
|
|
534
|
-
|
|
325
|
+
provider: z.ZodEnum<{
|
|
326
|
+
stripe: "stripe";
|
|
327
|
+
}>;
|
|
328
|
+
accountId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">>;
|
|
535
329
|
currency: z.ZodString;
|
|
536
330
|
periodStart: z.ZodString;
|
|
537
331
|
periodEnd: z.ZodString;
|
|
538
|
-
status: z.ZodEnum<
|
|
539
|
-
|
|
540
|
-
|
|
332
|
+
status: z.ZodEnum<{
|
|
333
|
+
failed: "failed";
|
|
334
|
+
completed: "completed";
|
|
335
|
+
running: "running";
|
|
336
|
+
}>;
|
|
337
|
+
ledgerTotal: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
338
|
+
externalTotal: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
541
339
|
discrepancyCount: z.ZodNumber;
|
|
542
340
|
startedAt: z.ZodString;
|
|
543
341
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
544
|
-
},
|
|
545
|
-
status: "failed" | "completed" | "running";
|
|
546
|
-
id: string;
|
|
547
|
-
schemaVersion: 1;
|
|
548
|
-
currency: string;
|
|
549
|
-
periodEnd: string;
|
|
550
|
-
provider: "stripe";
|
|
551
|
-
startedAt: string;
|
|
552
|
-
periodStart: string;
|
|
553
|
-
ledgerTotal: string & z.BRAND<"ExactDecimal">;
|
|
554
|
-
externalTotal: string & z.BRAND<"ExactDecimal">;
|
|
555
|
-
discrepancyCount: number;
|
|
556
|
-
accountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
557
|
-
completedAt?: string | undefined;
|
|
558
|
-
}, {
|
|
559
|
-
status: "failed" | "completed" | "running";
|
|
560
|
-
id: string;
|
|
561
|
-
schemaVersion: 1;
|
|
562
|
-
currency: string;
|
|
563
|
-
periodEnd: string;
|
|
564
|
-
provider: "stripe";
|
|
565
|
-
startedAt: string;
|
|
566
|
-
periodStart: string;
|
|
567
|
-
ledgerTotal: string;
|
|
568
|
-
externalTotal: string;
|
|
569
|
-
discrepancyCount: number;
|
|
570
|
-
accountId?: string | undefined;
|
|
571
|
-
completedAt?: string | undefined;
|
|
572
|
-
}>;
|
|
342
|
+
}, z.core.$strict>;
|
|
573
343
|
export declare const reconciliationReportSchema: z.ZodObject<{
|
|
574
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
575
344
|
schemaVersion: z.ZodLiteral<1>;
|
|
576
345
|
run: z.ZodObject<{
|
|
577
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
578
346
|
schemaVersion: z.ZodLiteral<1>;
|
|
579
347
|
id: z.ZodString;
|
|
580
|
-
provider: z.ZodEnum<
|
|
581
|
-
|
|
582
|
-
|
|
348
|
+
provider: z.ZodEnum<{
|
|
349
|
+
stripe: "stripe";
|
|
350
|
+
}>;
|
|
351
|
+
accountId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">>;
|
|
583
352
|
currency: z.ZodString;
|
|
584
353
|
periodStart: z.ZodString;
|
|
585
354
|
periodEnd: z.ZodString;
|
|
586
|
-
status: z.ZodEnum<
|
|
587
|
-
|
|
588
|
-
|
|
355
|
+
status: z.ZodEnum<{
|
|
356
|
+
failed: "failed";
|
|
357
|
+
completed: "completed";
|
|
358
|
+
running: "running";
|
|
359
|
+
}>;
|
|
360
|
+
ledgerTotal: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
361
|
+
externalTotal: z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">;
|
|
589
362
|
discrepancyCount: z.ZodNumber;
|
|
590
363
|
startedAt: z.ZodString;
|
|
591
364
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
592
|
-
},
|
|
593
|
-
status: "failed" | "completed" | "running";
|
|
594
|
-
id: string;
|
|
595
|
-
schemaVersion: 1;
|
|
596
|
-
currency: string;
|
|
597
|
-
periodEnd: string;
|
|
598
|
-
provider: "stripe";
|
|
599
|
-
startedAt: string;
|
|
600
|
-
periodStart: string;
|
|
601
|
-
ledgerTotal: string & z.BRAND<"ExactDecimal">;
|
|
602
|
-
externalTotal: string & z.BRAND<"ExactDecimal">;
|
|
603
|
-
discrepancyCount: number;
|
|
604
|
-
accountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
605
|
-
completedAt?: string | undefined;
|
|
606
|
-
}, {
|
|
607
|
-
status: "failed" | "completed" | "running";
|
|
608
|
-
id: string;
|
|
609
|
-
schemaVersion: 1;
|
|
610
|
-
currency: string;
|
|
611
|
-
periodEnd: string;
|
|
612
|
-
provider: "stripe";
|
|
613
|
-
startedAt: string;
|
|
614
|
-
periodStart: string;
|
|
615
|
-
ledgerTotal: string;
|
|
616
|
-
externalTotal: string;
|
|
617
|
-
discrepancyCount: number;
|
|
618
|
-
accountId?: string | undefined;
|
|
619
|
-
completedAt?: string | undefined;
|
|
620
|
-
}>;
|
|
365
|
+
}, z.core.$strict>;
|
|
621
366
|
discrepancies: z.ZodArray<z.ZodObject<{
|
|
622
|
-
/** See `version.ts`: this shape is served to Console and to Alia. */
|
|
623
367
|
schemaVersion: z.ZodLiteral<1>;
|
|
624
368
|
id: z.ZodString;
|
|
625
369
|
runId: z.ZodString;
|
|
626
|
-
kind: z.ZodEnum<
|
|
627
|
-
|
|
370
|
+
kind: z.ZodEnum<{
|
|
371
|
+
missing_in_ledger: "missing_in_ledger";
|
|
372
|
+
missing_in_external: "missing_in_external";
|
|
373
|
+
amount_mismatch: "amount_mismatch";
|
|
374
|
+
account_unresolved: "account_unresolved";
|
|
375
|
+
}>;
|
|
376
|
+
accountId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OxyAccountId", "out">>;
|
|
628
377
|
externalRef: z.ZodOptional<z.ZodString>;
|
|
629
378
|
ledgerEntryId: z.ZodOptional<z.ZodString>;
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
/** What the processor recorded. Absent for `missing_in_external`. */
|
|
633
|
-
externalAmount: z.ZodOptional<z.ZodBranded<z.ZodString, "ExactDecimal">>;
|
|
379
|
+
ledgerAmount: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
380
|
+
externalAmount: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ExactDecimal", "out">>;
|
|
634
381
|
currency: z.ZodString;
|
|
635
382
|
createdAt: z.ZodString;
|
|
636
|
-
},
|
|
637
|
-
|
|
638
|
-
createdAt: string;
|
|
639
|
-
id: string;
|
|
640
|
-
schemaVersion: 1;
|
|
641
|
-
runId: string;
|
|
642
|
-
currency: string;
|
|
643
|
-
accountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
644
|
-
externalRef?: string | undefined;
|
|
645
|
-
ledgerEntryId?: string | undefined;
|
|
646
|
-
ledgerAmount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
647
|
-
externalAmount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
648
|
-
}, {
|
|
649
|
-
kind: "missing_in_ledger" | "missing_in_external" | "amount_mismatch" | "account_unresolved";
|
|
650
|
-
createdAt: string;
|
|
651
|
-
id: string;
|
|
652
|
-
schemaVersion: 1;
|
|
653
|
-
runId: string;
|
|
654
|
-
currency: string;
|
|
655
|
-
accountId?: string | undefined;
|
|
656
|
-
externalRef?: string | undefined;
|
|
657
|
-
ledgerEntryId?: string | undefined;
|
|
658
|
-
ledgerAmount?: string | undefined;
|
|
659
|
-
externalAmount?: string | undefined;
|
|
660
|
-
}>, "many">;
|
|
661
|
-
}, "strict", z.ZodTypeAny, {
|
|
662
|
-
schemaVersion: 1;
|
|
663
|
-
run: {
|
|
664
|
-
status: "failed" | "completed" | "running";
|
|
665
|
-
id: string;
|
|
666
|
-
schemaVersion: 1;
|
|
667
|
-
currency: string;
|
|
668
|
-
periodEnd: string;
|
|
669
|
-
provider: "stripe";
|
|
670
|
-
startedAt: string;
|
|
671
|
-
periodStart: string;
|
|
672
|
-
ledgerTotal: string & z.BRAND<"ExactDecimal">;
|
|
673
|
-
externalTotal: string & z.BRAND<"ExactDecimal">;
|
|
674
|
-
discrepancyCount: number;
|
|
675
|
-
accountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
676
|
-
completedAt?: string | undefined;
|
|
677
|
-
};
|
|
678
|
-
discrepancies: {
|
|
679
|
-
kind: "missing_in_ledger" | "missing_in_external" | "amount_mismatch" | "account_unresolved";
|
|
680
|
-
createdAt: string;
|
|
681
|
-
id: string;
|
|
682
|
-
schemaVersion: 1;
|
|
683
|
-
runId: string;
|
|
684
|
-
currency: string;
|
|
685
|
-
accountId?: (string & z.BRAND<"OxyAccountId">) | undefined;
|
|
686
|
-
externalRef?: string | undefined;
|
|
687
|
-
ledgerEntryId?: string | undefined;
|
|
688
|
-
ledgerAmount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
689
|
-
externalAmount?: (string & z.BRAND<"ExactDecimal">) | undefined;
|
|
690
|
-
}[];
|
|
691
|
-
}, {
|
|
692
|
-
schemaVersion: 1;
|
|
693
|
-
run: {
|
|
694
|
-
status: "failed" | "completed" | "running";
|
|
695
|
-
id: string;
|
|
696
|
-
schemaVersion: 1;
|
|
697
|
-
currency: string;
|
|
698
|
-
periodEnd: string;
|
|
699
|
-
provider: "stripe";
|
|
700
|
-
startedAt: string;
|
|
701
|
-
periodStart: string;
|
|
702
|
-
ledgerTotal: string;
|
|
703
|
-
externalTotal: string;
|
|
704
|
-
discrepancyCount: number;
|
|
705
|
-
accountId?: string | undefined;
|
|
706
|
-
completedAt?: string | undefined;
|
|
707
|
-
};
|
|
708
|
-
discrepancies: {
|
|
709
|
-
kind: "missing_in_ledger" | "missing_in_external" | "amount_mismatch" | "account_unresolved";
|
|
710
|
-
createdAt: string;
|
|
711
|
-
id: string;
|
|
712
|
-
schemaVersion: 1;
|
|
713
|
-
runId: string;
|
|
714
|
-
currency: string;
|
|
715
|
-
accountId?: string | undefined;
|
|
716
|
-
externalRef?: string | undefined;
|
|
717
|
-
ledgerEntryId?: string | undefined;
|
|
718
|
-
ledgerAmount?: string | undefined;
|
|
719
|
-
externalAmount?: string | undefined;
|
|
720
|
-
}[];
|
|
721
|
-
}>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
}, z.core.$strict>;
|
|
722
385
|
export type BillingMode = z.infer<typeof billingModeSchema>;
|
|
723
386
|
export type BillingProfileStatus = z.infer<typeof billingProfileStatusSchema>;
|
|
724
387
|
export type AutoRecharge = z.infer<typeof autoRechargeSchema>;
|