@oxy.so/contracts 1.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/LICENSE +202 -0
- package/NOTICE +16 -0
- package/dist/cjs/.tsbuildinfo +1 -0
- package/dist/cjs/accountGraph.js +489 -0
- package/dist/cjs/agency.js +439 -0
- package/dist/cjs/browserHub.js +215 -0
- package/dist/cjs/civic.js +163 -0
- package/dist/cjs/commonsSignIn.js +59 -0
- package/dist/cjs/deviceBoot.js +50 -0
- package/dist/cjs/deviceDirectory.js +189 -0
- package/dist/cjs/devicePairing.js +138 -0
- package/dist/cjs/deviceSession.js +164 -0
- package/dist/cjs/emailAgentContext.js +32 -0
- package/dist/cjs/followGraph.js +28 -0
- package/dist/cjs/identity.js +258 -0
- package/dist/cjs/inboxPush.js +24 -0
- package/dist/cjs/index.js +618 -0
- package/dist/cjs/inference/accountBilling.js +334 -0
- package/dist/cjs/inference/aliaModelRelease.js +262 -0
- package/dist/cjs/inference/attribution.js +106 -0
- package/dist/cjs/inference/catalogue.js +487 -0
- package/dist/cjs/inference/entitlement.js +217 -0
- package/dist/cjs/inference/errors.js +309 -0
- package/dist/cjs/inference/identifiers.js +224 -0
- package/dist/cjs/inference/inbox.js +105 -0
- package/dist/cjs/inference/modelDocumentation.js +433 -0
- package/dist/cjs/inference/money.js +188 -0
- package/dist/cjs/inference/priceVersion.js +110 -0
- package/dist/cjs/inference/providerConnection.js +455 -0
- package/dist/cjs/inference/request.js +477 -0
- package/dist/cjs/inference/routingPolicy.js +318 -0
- package/dist/cjs/inference/streamEvents.js +258 -0
- package/dist/cjs/inference/usage.js +329 -0
- package/dist/cjs/inference/version.js +105 -0
- package/dist/cjs/keyRecovery.js +91 -0
- package/dist/cjs/keyRotation.js +75 -0
- package/dist/cjs/links.js +68 -0
- package/dist/cjs/moderationReputation.js +298 -0
- package/dist/cjs/oauth.js +66 -0
- package/dist/cjs/oxyRecordTypes.js +71 -0
- package/dist/cjs/protocol.js +53 -0
- package/dist/cjs/recommendations.js +168 -0
- package/dist/cjs/reputation.js +297 -0
- package/dist/cjs/sessionStatus.js +121 -0
- package/dist/cjs/transparency.js +89 -0
- package/dist/cjs/updates.js +252 -0
- package/dist/cjs/userInvalidation.js +89 -0
- package/dist/cjs/userResponse.js +245 -0
- package/dist/cjs/username.js +290 -0
- package/dist/cjs/webauthn.js +71 -0
- package/dist/esm/.tsbuildinfo +1 -0
- package/dist/esm/accountGraph.js +480 -0
- package/dist/esm/agency.js +436 -0
- package/dist/esm/browserHub.js +212 -0
- package/dist/esm/civic.js +160 -0
- package/dist/esm/commonsSignIn.js +56 -0
- package/dist/esm/deviceBoot.js +47 -0
- package/dist/esm/deviceDirectory.js +186 -0
- package/dist/esm/devicePairing.js +135 -0
- package/dist/esm/deviceSession.js +161 -0
- package/dist/esm/emailAgentContext.js +29 -0
- package/dist/esm/followGraph.js +27 -0
- package/dist/esm/identity.js +255 -0
- package/dist/esm/inboxPush.js +21 -0
- package/dist/esm/index.js +172 -0
- package/dist/esm/inference/accountBilling.js +331 -0
- package/dist/esm/inference/aliaModelRelease.js +259 -0
- package/dist/esm/inference/attribution.js +103 -0
- package/dist/esm/inference/catalogue.js +484 -0
- package/dist/esm/inference/entitlement.js +214 -0
- package/dist/esm/inference/errors.js +306 -0
- package/dist/esm/inference/identifiers.js +221 -0
- package/dist/esm/inference/inbox.js +102 -0
- package/dist/esm/inference/modelDocumentation.js +430 -0
- package/dist/esm/inference/money.js +185 -0
- package/dist/esm/inference/priceVersion.js +107 -0
- package/dist/esm/inference/providerConnection.js +452 -0
- package/dist/esm/inference/request.js +474 -0
- package/dist/esm/inference/routingPolicy.js +315 -0
- package/dist/esm/inference/streamEvents.js +255 -0
- package/dist/esm/inference/usage.js +326 -0
- package/dist/esm/inference/version.js +102 -0
- package/dist/esm/keyRecovery.js +88 -0
- package/dist/esm/keyRotation.js +72 -0
- package/dist/esm/links.js +65 -0
- package/dist/esm/moderationReputation.js +295 -0
- package/dist/esm/oauth.js +63 -0
- package/dist/esm/oxyRecordTypes.js +68 -0
- package/dist/esm/protocol.js +50 -0
- package/dist/esm/recommendations.js +165 -0
- package/dist/esm/reputation.js +293 -0
- package/dist/esm/sessionStatus.js +118 -0
- package/dist/esm/transparency.js +86 -0
- package/dist/esm/updates.js +249 -0
- package/dist/esm/userInvalidation.js +85 -0
- package/dist/esm/userResponse.js +240 -0
- package/dist/esm/username.js +283 -0
- package/dist/esm/webauthn.js +68 -0
- package/dist/types/.tsbuildinfo +1 -0
- package/dist/types/accountGraph.d.ts +378 -0
- package/dist/types/agency.d.ts +2162 -0
- package/dist/types/browserHub.d.ts +856 -0
- package/dist/types/civic.d.ts +338 -0
- package/dist/types/commonsSignIn.d.ts +58 -0
- package/dist/types/deviceBoot.d.ts +74 -0
- package/dist/types/deviceDirectory.d.ts +1317 -0
- package/dist/types/devicePairing.d.ts +130 -0
- package/dist/types/deviceSession.d.ts +411 -0
- package/dist/types/emailAgentContext.d.ts +248 -0
- package/dist/types/followGraph.d.ts +150 -0
- package/dist/types/identity.d.ts +402 -0
- package/dist/types/inboxPush.d.ts +30 -0
- package/dist/types/index.d.ts +100 -0
- package/dist/types/inference/accountBilling.d.ts +738 -0
- package/dist/types/inference/aliaModelRelease.d.ts +609 -0
- package/dist/types/inference/attribution.d.ts +176 -0
- package/dist/types/inference/catalogue.d.ts +1618 -0
- package/dist/types/inference/entitlement.d.ts +519 -0
- package/dist/types/inference/errors.d.ts +242 -0
- package/dist/types/inference/identifiers.d.ts +182 -0
- package/dist/types/inference/inbox.d.ts +374 -0
- package/dist/types/inference/modelDocumentation.d.ts +1603 -0
- package/dist/types/inference/money.d.ts +185 -0
- package/dist/types/inference/priceVersion.d.ts +182 -0
- package/dist/types/inference/providerConnection.d.ts +968 -0
- package/dist/types/inference/request.d.ts +2800 -0
- package/dist/types/inference/routingPolicy.d.ts +616 -0
- package/dist/types/inference/streamEvents.d.ts +950 -0
- package/dist/types/inference/usage.d.ts +1164 -0
- package/dist/types/inference/version.d.ts +102 -0
- package/dist/types/keyRecovery.d.ts +138 -0
- package/dist/types/keyRotation.d.ts +103 -0
- package/dist/types/links.d.ts +96 -0
- package/dist/types/moderationReputation.d.ts +487 -0
- package/dist/types/oauth.d.ts +86 -0
- package/dist/types/oxyRecordTypes.d.ts +62 -0
- package/dist/types/protocol.d.ts +86 -0
- package/dist/types/recommendations.d.ts +542 -0
- package/dist/types/reputation.d.ts +457 -0
- package/dist/types/sessionStatus.d.ts +231 -0
- package/dist/types/transparency.d.ts +392 -0
- package/dist/types/updates.d.ts +545 -0
- package/dist/types/userInvalidation.d.ts +94 -0
- package/dist/types/userResponse.d.ts +1706 -0
- package/dist/types/username.d.ts +265 -0
- package/dist/types/webauthn.d.ts +77 -0
- package/package.json +87 -0
|
@@ -0,0 +1,968 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BYOK provider connections — the metadata Oxy holds about a customer's own
|
|
3
|
+
* upstream provider credential.
|
|
4
|
+
*
|
|
5
|
+
* The credential itself is NOT here and cannot be put here. This shape carries
|
|
6
|
+
* an opaque Kaana credential handle, its exact revision and validation state.
|
|
7
|
+
* Three mechanisms
|
|
8
|
+
* make that structural rather than a convention somebody must remember:
|
|
9
|
+
*
|
|
10
|
+
* - The object is `.strict()`. A producer that attaches `apiKey`, `secret`,
|
|
11
|
+
* `token`, `privateKey` or `headers` fails the parse. Nothing is silently
|
|
12
|
+
* stripped, because a stripped field is one that still exists upstream of
|
|
13
|
+
* the parse, in a log line or an error report.
|
|
14
|
+
* - No prefix or digest derived from the credential exists in this contract;
|
|
15
|
+
* even a partial value can make a short credential recoverable by guessing.
|
|
16
|
+
* - `credentialHandle` is an opaque, closed-format identifier minted by Kaana.
|
|
17
|
+
* Oxy cannot resolve it and never stores either plaintext or ciphertext.
|
|
18
|
+
*
|
|
19
|
+
* BYOK does not move the billing relationship: the upstream provider bills the
|
|
20
|
+
* customer's own account directly, and Oxy charges only its platform fee. The
|
|
21
|
+
* record says so explicitly so a receipt against a BYOK route can be read
|
|
22
|
+
* correctly without consulting anything else.
|
|
23
|
+
*
|
|
24
|
+
* Decided in: issue #972 workstream 10.
|
|
25
|
+
*/
|
|
26
|
+
import { z } from 'zod';
|
|
27
|
+
/**
|
|
28
|
+
* How widely a connection applies.
|
|
29
|
+
*
|
|
30
|
+
* In the unified account graph a project IS an account, so `account` and
|
|
31
|
+
* `project` differ by INHERITANCE, not by id space: an `account` connection is
|
|
32
|
+
* inherited by every descendant project and application, a `project` one
|
|
33
|
+
* applies to that project account alone, and an `application` one to a single
|
|
34
|
+
* application. Recording which the customer chose is what makes a later
|
|
35
|
+
* "why did this app use that key" answerable.
|
|
36
|
+
*/
|
|
37
|
+
export declare const providerConnectionScopeSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"account">;
|
|
39
|
+
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
40
|
+
}, "strict", z.ZodTypeAny, {
|
|
41
|
+
kind: "account";
|
|
42
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
43
|
+
}, {
|
|
44
|
+
kind: "account";
|
|
45
|
+
accountId: string;
|
|
46
|
+
}>, z.ZodObject<{
|
|
47
|
+
kind: z.ZodLiteral<"project">;
|
|
48
|
+
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
49
|
+
}, "strict", z.ZodTypeAny, {
|
|
50
|
+
kind: "project";
|
|
51
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
52
|
+
}, {
|
|
53
|
+
kind: "project";
|
|
54
|
+
accountId: string;
|
|
55
|
+
}>, z.ZodObject<{
|
|
56
|
+
kind: z.ZodLiteral<"application">;
|
|
57
|
+
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
58
|
+
applicationId: z.ZodString;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
kind: "application";
|
|
61
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
62
|
+
applicationId: string;
|
|
63
|
+
}, {
|
|
64
|
+
kind: "application";
|
|
65
|
+
accountId: string;
|
|
66
|
+
applicationId: string;
|
|
67
|
+
}>]>;
|
|
68
|
+
/** Opaque reference minted by Kaana. It is not a KMS/Vault/SSM locator. */
|
|
69
|
+
export declare const kaanaCredentialHandleSchema: z.ZodString;
|
|
70
|
+
/** Oxy-minted, case-sensitive replay identity for one exact Kaana mutation. */
|
|
71
|
+
export declare const kaanaCredentialOperationIdSchema: z.ZodString;
|
|
72
|
+
export declare const kaanaCredentialOperationActionSchema: z.ZodEnum<["create", "rotate", "revoke"]>;
|
|
73
|
+
/** Exact immutable Oxy identity repeated by both mutation and reconciliation. */
|
|
74
|
+
export declare const kaanaCredentialIdentitySchema: z.ZodObject<{
|
|
75
|
+
provider: z.ZodString;
|
|
76
|
+
ownerAccountId: z.ZodString;
|
|
77
|
+
connectionId: z.ZodString;
|
|
78
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
environment: "development" | "staging" | "production";
|
|
81
|
+
ownerAccountId: string;
|
|
82
|
+
provider: string;
|
|
83
|
+
connectionId: string;
|
|
84
|
+
}, {
|
|
85
|
+
environment: "development" | "staging" | "production";
|
|
86
|
+
ownerAccountId: string;
|
|
87
|
+
provider: string;
|
|
88
|
+
connectionId: string;
|
|
89
|
+
}>;
|
|
90
|
+
export declare const kaanaCredentialCreateMutationSchema: z.ZodObject<{
|
|
91
|
+
provider: z.ZodString;
|
|
92
|
+
ownerAccountId: z.ZodString;
|
|
93
|
+
connectionId: z.ZodString;
|
|
94
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
95
|
+
} & {
|
|
96
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
97
|
+
action: z.ZodLiteral<"create">;
|
|
98
|
+
operationId: z.ZodString;
|
|
99
|
+
operationActor: z.ZodEffects<z.ZodString, string, string>;
|
|
100
|
+
secretBase64: z.ZodEffects<z.ZodString, string, string>;
|
|
101
|
+
}, "strict", z.ZodTypeAny, {
|
|
102
|
+
environment: "development" | "staging" | "production";
|
|
103
|
+
ownerAccountId: string;
|
|
104
|
+
schemaVersion: 1;
|
|
105
|
+
provider: string;
|
|
106
|
+
connectionId: string;
|
|
107
|
+
action: "create";
|
|
108
|
+
operationId: string;
|
|
109
|
+
operationActor: string;
|
|
110
|
+
secretBase64: string;
|
|
111
|
+
}, {
|
|
112
|
+
environment: "development" | "staging" | "production";
|
|
113
|
+
ownerAccountId: string;
|
|
114
|
+
schemaVersion: 1;
|
|
115
|
+
provider: string;
|
|
116
|
+
connectionId: string;
|
|
117
|
+
action: "create";
|
|
118
|
+
operationId: string;
|
|
119
|
+
operationActor: string;
|
|
120
|
+
secretBase64: string;
|
|
121
|
+
}>;
|
|
122
|
+
export declare const kaanaCredentialRotateMutationSchema: z.ZodObject<{
|
|
123
|
+
provider: z.ZodString;
|
|
124
|
+
ownerAccountId: z.ZodString;
|
|
125
|
+
connectionId: z.ZodString;
|
|
126
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
127
|
+
} & {
|
|
128
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
129
|
+
action: z.ZodLiteral<"rotate">;
|
|
130
|
+
operationId: z.ZodString;
|
|
131
|
+
operationActor: z.ZodEffects<z.ZodString, string, string>;
|
|
132
|
+
credentialHandle: z.ZodString;
|
|
133
|
+
expectedRevision: z.ZodNumber;
|
|
134
|
+
secretBase64: z.ZodEffects<z.ZodString, string, string>;
|
|
135
|
+
}, "strict", z.ZodTypeAny, {
|
|
136
|
+
environment: "development" | "staging" | "production";
|
|
137
|
+
ownerAccountId: string;
|
|
138
|
+
schemaVersion: 1;
|
|
139
|
+
provider: string;
|
|
140
|
+
connectionId: string;
|
|
141
|
+
action: "rotate";
|
|
142
|
+
operationId: string;
|
|
143
|
+
operationActor: string;
|
|
144
|
+
secretBase64: string;
|
|
145
|
+
credentialHandle: string;
|
|
146
|
+
expectedRevision: number;
|
|
147
|
+
}, {
|
|
148
|
+
environment: "development" | "staging" | "production";
|
|
149
|
+
ownerAccountId: string;
|
|
150
|
+
schemaVersion: 1;
|
|
151
|
+
provider: string;
|
|
152
|
+
connectionId: string;
|
|
153
|
+
action: "rotate";
|
|
154
|
+
operationId: string;
|
|
155
|
+
operationActor: string;
|
|
156
|
+
secretBase64: string;
|
|
157
|
+
credentialHandle: string;
|
|
158
|
+
expectedRevision: number;
|
|
159
|
+
}>;
|
|
160
|
+
export declare const kaanaCredentialRevokeMutationSchema: z.ZodObject<{
|
|
161
|
+
provider: z.ZodString;
|
|
162
|
+
ownerAccountId: z.ZodString;
|
|
163
|
+
connectionId: z.ZodString;
|
|
164
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
165
|
+
} & {
|
|
166
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
167
|
+
action: z.ZodLiteral<"revoke">;
|
|
168
|
+
operationId: z.ZodString;
|
|
169
|
+
operationActor: z.ZodEffects<z.ZodString, string, string>;
|
|
170
|
+
credentialHandle: z.ZodString;
|
|
171
|
+
expectedRevision: z.ZodNumber;
|
|
172
|
+
}, "strict", z.ZodTypeAny, {
|
|
173
|
+
environment: "development" | "staging" | "production";
|
|
174
|
+
ownerAccountId: string;
|
|
175
|
+
schemaVersion: 1;
|
|
176
|
+
provider: string;
|
|
177
|
+
connectionId: string;
|
|
178
|
+
action: "revoke";
|
|
179
|
+
operationId: string;
|
|
180
|
+
operationActor: string;
|
|
181
|
+
credentialHandle: string;
|
|
182
|
+
expectedRevision: number;
|
|
183
|
+
}, {
|
|
184
|
+
environment: "development" | "staging" | "production";
|
|
185
|
+
ownerAccountId: string;
|
|
186
|
+
schemaVersion: 1;
|
|
187
|
+
provider: string;
|
|
188
|
+
connectionId: string;
|
|
189
|
+
action: "revoke";
|
|
190
|
+
operationId: string;
|
|
191
|
+
operationActor: string;
|
|
192
|
+
credentialHandle: string;
|
|
193
|
+
expectedRevision: number;
|
|
194
|
+
}>;
|
|
195
|
+
export declare const kaanaCredentialMutationSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
196
|
+
provider: z.ZodString;
|
|
197
|
+
ownerAccountId: z.ZodString;
|
|
198
|
+
connectionId: z.ZodString;
|
|
199
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
200
|
+
} & {
|
|
201
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
202
|
+
action: z.ZodLiteral<"create">;
|
|
203
|
+
operationId: z.ZodString;
|
|
204
|
+
operationActor: z.ZodEffects<z.ZodString, string, string>;
|
|
205
|
+
secretBase64: z.ZodEffects<z.ZodString, string, string>;
|
|
206
|
+
}, "strict", z.ZodTypeAny, {
|
|
207
|
+
environment: "development" | "staging" | "production";
|
|
208
|
+
ownerAccountId: string;
|
|
209
|
+
schemaVersion: 1;
|
|
210
|
+
provider: string;
|
|
211
|
+
connectionId: string;
|
|
212
|
+
action: "create";
|
|
213
|
+
operationId: string;
|
|
214
|
+
operationActor: string;
|
|
215
|
+
secretBase64: string;
|
|
216
|
+
}, {
|
|
217
|
+
environment: "development" | "staging" | "production";
|
|
218
|
+
ownerAccountId: string;
|
|
219
|
+
schemaVersion: 1;
|
|
220
|
+
provider: string;
|
|
221
|
+
connectionId: string;
|
|
222
|
+
action: "create";
|
|
223
|
+
operationId: string;
|
|
224
|
+
operationActor: string;
|
|
225
|
+
secretBase64: string;
|
|
226
|
+
}>, z.ZodObject<{
|
|
227
|
+
provider: z.ZodString;
|
|
228
|
+
ownerAccountId: z.ZodString;
|
|
229
|
+
connectionId: z.ZodString;
|
|
230
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
231
|
+
} & {
|
|
232
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
233
|
+
action: z.ZodLiteral<"rotate">;
|
|
234
|
+
operationId: z.ZodString;
|
|
235
|
+
operationActor: z.ZodEffects<z.ZodString, string, string>;
|
|
236
|
+
credentialHandle: z.ZodString;
|
|
237
|
+
expectedRevision: z.ZodNumber;
|
|
238
|
+
secretBase64: z.ZodEffects<z.ZodString, string, string>;
|
|
239
|
+
}, "strict", z.ZodTypeAny, {
|
|
240
|
+
environment: "development" | "staging" | "production";
|
|
241
|
+
ownerAccountId: string;
|
|
242
|
+
schemaVersion: 1;
|
|
243
|
+
provider: string;
|
|
244
|
+
connectionId: string;
|
|
245
|
+
action: "rotate";
|
|
246
|
+
operationId: string;
|
|
247
|
+
operationActor: string;
|
|
248
|
+
secretBase64: string;
|
|
249
|
+
credentialHandle: string;
|
|
250
|
+
expectedRevision: number;
|
|
251
|
+
}, {
|
|
252
|
+
environment: "development" | "staging" | "production";
|
|
253
|
+
ownerAccountId: string;
|
|
254
|
+
schemaVersion: 1;
|
|
255
|
+
provider: string;
|
|
256
|
+
connectionId: string;
|
|
257
|
+
action: "rotate";
|
|
258
|
+
operationId: string;
|
|
259
|
+
operationActor: string;
|
|
260
|
+
secretBase64: string;
|
|
261
|
+
credentialHandle: string;
|
|
262
|
+
expectedRevision: number;
|
|
263
|
+
}>, z.ZodObject<{
|
|
264
|
+
provider: z.ZodString;
|
|
265
|
+
ownerAccountId: z.ZodString;
|
|
266
|
+
connectionId: z.ZodString;
|
|
267
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
268
|
+
} & {
|
|
269
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
270
|
+
action: z.ZodLiteral<"revoke">;
|
|
271
|
+
operationId: z.ZodString;
|
|
272
|
+
operationActor: z.ZodEffects<z.ZodString, string, string>;
|
|
273
|
+
credentialHandle: z.ZodString;
|
|
274
|
+
expectedRevision: z.ZodNumber;
|
|
275
|
+
}, "strict", z.ZodTypeAny, {
|
|
276
|
+
environment: "development" | "staging" | "production";
|
|
277
|
+
ownerAccountId: string;
|
|
278
|
+
schemaVersion: 1;
|
|
279
|
+
provider: string;
|
|
280
|
+
connectionId: string;
|
|
281
|
+
action: "revoke";
|
|
282
|
+
operationId: string;
|
|
283
|
+
operationActor: string;
|
|
284
|
+
credentialHandle: string;
|
|
285
|
+
expectedRevision: number;
|
|
286
|
+
}, {
|
|
287
|
+
environment: "development" | "staging" | "production";
|
|
288
|
+
ownerAccountId: string;
|
|
289
|
+
schemaVersion: 1;
|
|
290
|
+
provider: string;
|
|
291
|
+
connectionId: string;
|
|
292
|
+
action: "revoke";
|
|
293
|
+
operationId: string;
|
|
294
|
+
operationActor: string;
|
|
295
|
+
credentialHandle: string;
|
|
296
|
+
expectedRevision: number;
|
|
297
|
+
}>]>;
|
|
298
|
+
export declare const kaanaCredentialCreateOutcomeRequestSchema: z.ZodObject<{
|
|
299
|
+
provider: z.ZodString;
|
|
300
|
+
ownerAccountId: z.ZodString;
|
|
301
|
+
connectionId: z.ZodString;
|
|
302
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
303
|
+
} & {
|
|
304
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
305
|
+
action: z.ZodLiteral<"create">;
|
|
306
|
+
operationId: z.ZodString;
|
|
307
|
+
}, "strict", z.ZodTypeAny, {
|
|
308
|
+
environment: "development" | "staging" | "production";
|
|
309
|
+
ownerAccountId: string;
|
|
310
|
+
schemaVersion: 1;
|
|
311
|
+
provider: string;
|
|
312
|
+
connectionId: string;
|
|
313
|
+
action: "create";
|
|
314
|
+
operationId: string;
|
|
315
|
+
}, {
|
|
316
|
+
environment: "development" | "staging" | "production";
|
|
317
|
+
ownerAccountId: string;
|
|
318
|
+
schemaVersion: 1;
|
|
319
|
+
provider: string;
|
|
320
|
+
connectionId: string;
|
|
321
|
+
action: "create";
|
|
322
|
+
operationId: string;
|
|
323
|
+
}>;
|
|
324
|
+
export declare const kaanaCredentialRotateOutcomeRequestSchema: z.ZodObject<{
|
|
325
|
+
provider: z.ZodString;
|
|
326
|
+
ownerAccountId: z.ZodString;
|
|
327
|
+
connectionId: z.ZodString;
|
|
328
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
329
|
+
} & {
|
|
330
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
331
|
+
action: z.ZodLiteral<"rotate">;
|
|
332
|
+
operationId: z.ZodString;
|
|
333
|
+
credentialHandle: z.ZodString;
|
|
334
|
+
expectedRevision: z.ZodNumber;
|
|
335
|
+
}, "strict", z.ZodTypeAny, {
|
|
336
|
+
environment: "development" | "staging" | "production";
|
|
337
|
+
ownerAccountId: string;
|
|
338
|
+
schemaVersion: 1;
|
|
339
|
+
provider: string;
|
|
340
|
+
connectionId: string;
|
|
341
|
+
action: "rotate";
|
|
342
|
+
operationId: string;
|
|
343
|
+
credentialHandle: string;
|
|
344
|
+
expectedRevision: number;
|
|
345
|
+
}, {
|
|
346
|
+
environment: "development" | "staging" | "production";
|
|
347
|
+
ownerAccountId: string;
|
|
348
|
+
schemaVersion: 1;
|
|
349
|
+
provider: string;
|
|
350
|
+
connectionId: string;
|
|
351
|
+
action: "rotate";
|
|
352
|
+
operationId: string;
|
|
353
|
+
credentialHandle: string;
|
|
354
|
+
expectedRevision: number;
|
|
355
|
+
}>;
|
|
356
|
+
export declare const kaanaCredentialRevokeOutcomeRequestSchema: z.ZodObject<{
|
|
357
|
+
provider: z.ZodString;
|
|
358
|
+
ownerAccountId: z.ZodString;
|
|
359
|
+
connectionId: z.ZodString;
|
|
360
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
361
|
+
} & {
|
|
362
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
363
|
+
action: z.ZodLiteral<"revoke">;
|
|
364
|
+
operationId: z.ZodString;
|
|
365
|
+
credentialHandle: z.ZodString;
|
|
366
|
+
expectedRevision: z.ZodNumber;
|
|
367
|
+
}, "strict", z.ZodTypeAny, {
|
|
368
|
+
environment: "development" | "staging" | "production";
|
|
369
|
+
ownerAccountId: string;
|
|
370
|
+
schemaVersion: 1;
|
|
371
|
+
provider: string;
|
|
372
|
+
connectionId: string;
|
|
373
|
+
action: "revoke";
|
|
374
|
+
operationId: string;
|
|
375
|
+
credentialHandle: string;
|
|
376
|
+
expectedRevision: number;
|
|
377
|
+
}, {
|
|
378
|
+
environment: "development" | "staging" | "production";
|
|
379
|
+
ownerAccountId: string;
|
|
380
|
+
schemaVersion: 1;
|
|
381
|
+
provider: string;
|
|
382
|
+
connectionId: string;
|
|
383
|
+
action: "revoke";
|
|
384
|
+
operationId: string;
|
|
385
|
+
credentialHandle: string;
|
|
386
|
+
expectedRevision: number;
|
|
387
|
+
}>;
|
|
388
|
+
export declare const kaanaCredentialOutcomeRequestSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
389
|
+
provider: z.ZodString;
|
|
390
|
+
ownerAccountId: z.ZodString;
|
|
391
|
+
connectionId: z.ZodString;
|
|
392
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
393
|
+
} & {
|
|
394
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
395
|
+
action: z.ZodLiteral<"create">;
|
|
396
|
+
operationId: z.ZodString;
|
|
397
|
+
}, "strict", z.ZodTypeAny, {
|
|
398
|
+
environment: "development" | "staging" | "production";
|
|
399
|
+
ownerAccountId: string;
|
|
400
|
+
schemaVersion: 1;
|
|
401
|
+
provider: string;
|
|
402
|
+
connectionId: string;
|
|
403
|
+
action: "create";
|
|
404
|
+
operationId: string;
|
|
405
|
+
}, {
|
|
406
|
+
environment: "development" | "staging" | "production";
|
|
407
|
+
ownerAccountId: string;
|
|
408
|
+
schemaVersion: 1;
|
|
409
|
+
provider: string;
|
|
410
|
+
connectionId: string;
|
|
411
|
+
action: "create";
|
|
412
|
+
operationId: string;
|
|
413
|
+
}>, z.ZodObject<{
|
|
414
|
+
provider: z.ZodString;
|
|
415
|
+
ownerAccountId: z.ZodString;
|
|
416
|
+
connectionId: z.ZodString;
|
|
417
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
418
|
+
} & {
|
|
419
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
420
|
+
action: z.ZodLiteral<"rotate">;
|
|
421
|
+
operationId: z.ZodString;
|
|
422
|
+
credentialHandle: z.ZodString;
|
|
423
|
+
expectedRevision: z.ZodNumber;
|
|
424
|
+
}, "strict", z.ZodTypeAny, {
|
|
425
|
+
environment: "development" | "staging" | "production";
|
|
426
|
+
ownerAccountId: string;
|
|
427
|
+
schemaVersion: 1;
|
|
428
|
+
provider: string;
|
|
429
|
+
connectionId: string;
|
|
430
|
+
action: "rotate";
|
|
431
|
+
operationId: string;
|
|
432
|
+
credentialHandle: string;
|
|
433
|
+
expectedRevision: number;
|
|
434
|
+
}, {
|
|
435
|
+
environment: "development" | "staging" | "production";
|
|
436
|
+
ownerAccountId: string;
|
|
437
|
+
schemaVersion: 1;
|
|
438
|
+
provider: string;
|
|
439
|
+
connectionId: string;
|
|
440
|
+
action: "rotate";
|
|
441
|
+
operationId: string;
|
|
442
|
+
credentialHandle: string;
|
|
443
|
+
expectedRevision: number;
|
|
444
|
+
}>, z.ZodObject<{
|
|
445
|
+
provider: z.ZodString;
|
|
446
|
+
ownerAccountId: z.ZodString;
|
|
447
|
+
connectionId: z.ZodString;
|
|
448
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
449
|
+
} & {
|
|
450
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
451
|
+
action: z.ZodLiteral<"revoke">;
|
|
452
|
+
operationId: z.ZodString;
|
|
453
|
+
credentialHandle: z.ZodString;
|
|
454
|
+
expectedRevision: z.ZodNumber;
|
|
455
|
+
}, "strict", z.ZodTypeAny, {
|
|
456
|
+
environment: "development" | "staging" | "production";
|
|
457
|
+
ownerAccountId: string;
|
|
458
|
+
schemaVersion: 1;
|
|
459
|
+
provider: string;
|
|
460
|
+
connectionId: string;
|
|
461
|
+
action: "revoke";
|
|
462
|
+
operationId: string;
|
|
463
|
+
credentialHandle: string;
|
|
464
|
+
expectedRevision: number;
|
|
465
|
+
}, {
|
|
466
|
+
environment: "development" | "staging" | "production";
|
|
467
|
+
ownerAccountId: string;
|
|
468
|
+
schemaVersion: 1;
|
|
469
|
+
provider: string;
|
|
470
|
+
connectionId: string;
|
|
471
|
+
action: "revoke";
|
|
472
|
+
operationId: string;
|
|
473
|
+
credentialHandle: string;
|
|
474
|
+
expectedRevision: number;
|
|
475
|
+
}>]>;
|
|
476
|
+
export declare const kaanaCredentialAppliedOutcomeSchema: z.ZodObject<{
|
|
477
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
478
|
+
operationId: z.ZodString;
|
|
479
|
+
action: z.ZodEnum<["create", "rotate", "revoke"]>;
|
|
480
|
+
status: z.ZodLiteral<"applied">;
|
|
481
|
+
credentialHandle: z.ZodString;
|
|
482
|
+
revision: z.ZodNumber;
|
|
483
|
+
}, "strict", z.ZodTypeAny, {
|
|
484
|
+
status: "applied";
|
|
485
|
+
schemaVersion: 1;
|
|
486
|
+
revision: number;
|
|
487
|
+
action: "create" | "revoke" | "rotate";
|
|
488
|
+
operationId: string;
|
|
489
|
+
credentialHandle: string;
|
|
490
|
+
}, {
|
|
491
|
+
status: "applied";
|
|
492
|
+
schemaVersion: 1;
|
|
493
|
+
revision: number;
|
|
494
|
+
action: "create" | "revoke" | "rotate";
|
|
495
|
+
operationId: string;
|
|
496
|
+
credentialHandle: string;
|
|
497
|
+
}>;
|
|
498
|
+
export declare const kaanaCredentialConflictOutcomeSchema: z.ZodObject<{
|
|
499
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
500
|
+
operationId: z.ZodString;
|
|
501
|
+
action: z.ZodEnum<["create", "rotate", "revoke"]>;
|
|
502
|
+
status: z.ZodLiteral<"conflict">;
|
|
503
|
+
}, "strict", z.ZodTypeAny, {
|
|
504
|
+
status: "conflict";
|
|
505
|
+
schemaVersion: 1;
|
|
506
|
+
action: "create" | "revoke" | "rotate";
|
|
507
|
+
operationId: string;
|
|
508
|
+
}, {
|
|
509
|
+
status: "conflict";
|
|
510
|
+
schemaVersion: 1;
|
|
511
|
+
action: "create" | "revoke" | "rotate";
|
|
512
|
+
operationId: string;
|
|
513
|
+
}>;
|
|
514
|
+
export declare const kaanaCredentialOutcomeSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
515
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
516
|
+
operationId: z.ZodString;
|
|
517
|
+
action: z.ZodEnum<["create", "rotate", "revoke"]>;
|
|
518
|
+
status: z.ZodLiteral<"applied">;
|
|
519
|
+
credentialHandle: z.ZodString;
|
|
520
|
+
revision: z.ZodNumber;
|
|
521
|
+
}, "strict", z.ZodTypeAny, {
|
|
522
|
+
status: "applied";
|
|
523
|
+
schemaVersion: 1;
|
|
524
|
+
revision: number;
|
|
525
|
+
action: "create" | "revoke" | "rotate";
|
|
526
|
+
operationId: string;
|
|
527
|
+
credentialHandle: string;
|
|
528
|
+
}, {
|
|
529
|
+
status: "applied";
|
|
530
|
+
schemaVersion: 1;
|
|
531
|
+
revision: number;
|
|
532
|
+
action: "create" | "revoke" | "rotate";
|
|
533
|
+
operationId: string;
|
|
534
|
+
credentialHandle: string;
|
|
535
|
+
}>, z.ZodObject<{
|
|
536
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
537
|
+
operationId: z.ZodString;
|
|
538
|
+
action: z.ZodEnum<["create", "rotate", "revoke"]>;
|
|
539
|
+
status: z.ZodLiteral<"conflict">;
|
|
540
|
+
}, "strict", z.ZodTypeAny, {
|
|
541
|
+
status: "conflict";
|
|
542
|
+
schemaVersion: 1;
|
|
543
|
+
action: "create" | "revoke" | "rotate";
|
|
544
|
+
operationId: string;
|
|
545
|
+
}, {
|
|
546
|
+
status: "conflict";
|
|
547
|
+
schemaVersion: 1;
|
|
548
|
+
action: "create" | "revoke" | "rotate";
|
|
549
|
+
operationId: string;
|
|
550
|
+
}>]>;
|
|
551
|
+
/**
|
|
552
|
+
* One separately authenticated check of a quarantined BYOK generation.
|
|
553
|
+
*
|
|
554
|
+
* This is deliberately not an inference request. It carries no prompt, user
|
|
555
|
+
* response, routing policy or billing principal, and it can select only one
|
|
556
|
+
* exact Kaana deployment plus one exact credential generation.
|
|
557
|
+
*/
|
|
558
|
+
export declare const kaanaCredentialValidationTaskSchema: z.ZodObject<{
|
|
559
|
+
provider: z.ZodString;
|
|
560
|
+
ownerAccountId: z.ZodString;
|
|
561
|
+
connectionId: z.ZodString;
|
|
562
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
563
|
+
} & {
|
|
564
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
565
|
+
operationId: z.ZodString;
|
|
566
|
+
applicationId: z.ZodString;
|
|
567
|
+
credentialHandle: z.ZodString;
|
|
568
|
+
credentialRevision: z.ZodNumber;
|
|
569
|
+
deploymentId: z.ZodString;
|
|
570
|
+
}, "strict", z.ZodTypeAny, {
|
|
571
|
+
environment: "development" | "staging" | "production";
|
|
572
|
+
ownerAccountId: string;
|
|
573
|
+
applicationId: string;
|
|
574
|
+
schemaVersion: 1;
|
|
575
|
+
provider: string;
|
|
576
|
+
deploymentId: string;
|
|
577
|
+
connectionId: string;
|
|
578
|
+
operationId: string;
|
|
579
|
+
credentialHandle: string;
|
|
580
|
+
credentialRevision: number;
|
|
581
|
+
}, {
|
|
582
|
+
environment: "development" | "staging" | "production";
|
|
583
|
+
ownerAccountId: string;
|
|
584
|
+
applicationId: string;
|
|
585
|
+
schemaVersion: 1;
|
|
586
|
+
provider: string;
|
|
587
|
+
deploymentId: string;
|
|
588
|
+
connectionId: string;
|
|
589
|
+
operationId: string;
|
|
590
|
+
credentialHandle: string;
|
|
591
|
+
credentialRevision: number;
|
|
592
|
+
}>;
|
|
593
|
+
export declare const kaanaCredentialValidationOutcomeStateSchema: z.ZodEnum<["pending", "valid", "invalid", "inconclusive"]>;
|
|
594
|
+
export declare const kaanaCredentialValidationFailureCodeSchema: z.ZodEnum<["unauthorized", "forbidden", "not_found", "rate_limited", "network", "unknown"]>;
|
|
595
|
+
/**
|
|
596
|
+
* Durable result for one exact validation operation. `inconclusive` is a
|
|
597
|
+
* terminal answer about the attempt, never evidence that the credential is
|
|
598
|
+
* invalid; Oxy leaves the generation quarantined and may start a new exact
|
|
599
|
+
* operation. Kaana reports terminal outcomes through its service principal.
|
|
600
|
+
*/
|
|
601
|
+
export declare const kaanaCredentialValidationOutcomeSchema: z.ZodEffects<z.ZodObject<{
|
|
602
|
+
provider: z.ZodString;
|
|
603
|
+
ownerAccountId: z.ZodString;
|
|
604
|
+
connectionId: z.ZodString;
|
|
605
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
606
|
+
} & {
|
|
607
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
608
|
+
operationId: z.ZodString;
|
|
609
|
+
applicationId: z.ZodString;
|
|
610
|
+
credentialHandle: z.ZodString;
|
|
611
|
+
credentialRevision: z.ZodNumber;
|
|
612
|
+
deploymentId: z.ZodString;
|
|
613
|
+
} & {
|
|
614
|
+
state: z.ZodEnum<["pending", "valid", "invalid", "inconclusive"]>;
|
|
615
|
+
failureCode: z.ZodOptional<z.ZodEnum<["unauthorized", "forbidden", "not_found", "rate_limited", "network", "unknown"]>>;
|
|
616
|
+
}, "strict", z.ZodTypeAny, {
|
|
617
|
+
environment: "development" | "staging" | "production";
|
|
618
|
+
ownerAccountId: string;
|
|
619
|
+
applicationId: string;
|
|
620
|
+
schemaVersion: 1;
|
|
621
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
622
|
+
provider: string;
|
|
623
|
+
deploymentId: string;
|
|
624
|
+
connectionId: string;
|
|
625
|
+
operationId: string;
|
|
626
|
+
credentialHandle: string;
|
|
627
|
+
credentialRevision: number;
|
|
628
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
629
|
+
}, {
|
|
630
|
+
environment: "development" | "staging" | "production";
|
|
631
|
+
ownerAccountId: string;
|
|
632
|
+
applicationId: string;
|
|
633
|
+
schemaVersion: 1;
|
|
634
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
635
|
+
provider: string;
|
|
636
|
+
deploymentId: string;
|
|
637
|
+
connectionId: string;
|
|
638
|
+
operationId: string;
|
|
639
|
+
credentialHandle: string;
|
|
640
|
+
credentialRevision: number;
|
|
641
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
642
|
+
}>, {
|
|
643
|
+
environment: "development" | "staging" | "production";
|
|
644
|
+
ownerAccountId: string;
|
|
645
|
+
applicationId: string;
|
|
646
|
+
schemaVersion: 1;
|
|
647
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
648
|
+
provider: string;
|
|
649
|
+
deploymentId: string;
|
|
650
|
+
connectionId: string;
|
|
651
|
+
operationId: string;
|
|
652
|
+
credentialHandle: string;
|
|
653
|
+
credentialRevision: number;
|
|
654
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
655
|
+
}, {
|
|
656
|
+
environment: "development" | "staging" | "production";
|
|
657
|
+
ownerAccountId: string;
|
|
658
|
+
applicationId: string;
|
|
659
|
+
schemaVersion: 1;
|
|
660
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
661
|
+
provider: string;
|
|
662
|
+
deploymentId: string;
|
|
663
|
+
connectionId: string;
|
|
664
|
+
operationId: string;
|
|
665
|
+
credentialHandle: string;
|
|
666
|
+
credentialRevision: number;
|
|
667
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
668
|
+
}>;
|
|
669
|
+
/**
|
|
670
|
+
* Customer-safe view of one explicit bootstrap attempt.
|
|
671
|
+
*
|
|
672
|
+
* `deploymentId` is the exact Oxy catalogue row selected by the customer. The
|
|
673
|
+
* internal Kaana route id remains protected; Oxy binds the two in its durable
|
|
674
|
+
* ledger and signs the latter to Kaana.
|
|
675
|
+
*/
|
|
676
|
+
export declare const providerCredentialValidationOperationSchema: z.ZodEffects<z.ZodObject<{
|
|
677
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
678
|
+
operationId: z.ZodString;
|
|
679
|
+
connectionId: z.ZodString;
|
|
680
|
+
applicationId: z.ZodString;
|
|
681
|
+
deploymentId: z.ZodString;
|
|
682
|
+
state: z.ZodEnum<["pending", "valid", "invalid", "inconclusive"]>;
|
|
683
|
+
failureCode: z.ZodOptional<z.ZodEnum<["unauthorized", "forbidden", "not_found", "rate_limited", "network", "unknown"]>>;
|
|
684
|
+
createdAt: z.ZodString;
|
|
685
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
686
|
+
}, "strict", z.ZodTypeAny, {
|
|
687
|
+
applicationId: string;
|
|
688
|
+
createdAt: string;
|
|
689
|
+
schemaVersion: 1;
|
|
690
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
691
|
+
deploymentId: string;
|
|
692
|
+
connectionId: string;
|
|
693
|
+
operationId: string;
|
|
694
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
695
|
+
completedAt?: string | undefined;
|
|
696
|
+
}, {
|
|
697
|
+
applicationId: string;
|
|
698
|
+
createdAt: string;
|
|
699
|
+
schemaVersion: 1;
|
|
700
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
701
|
+
deploymentId: string;
|
|
702
|
+
connectionId: string;
|
|
703
|
+
operationId: string;
|
|
704
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
705
|
+
completedAt?: string | undefined;
|
|
706
|
+
}>, {
|
|
707
|
+
applicationId: string;
|
|
708
|
+
createdAt: string;
|
|
709
|
+
schemaVersion: 1;
|
|
710
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
711
|
+
deploymentId: string;
|
|
712
|
+
connectionId: string;
|
|
713
|
+
operationId: string;
|
|
714
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
715
|
+
completedAt?: string | undefined;
|
|
716
|
+
}, {
|
|
717
|
+
applicationId: string;
|
|
718
|
+
createdAt: string;
|
|
719
|
+
schemaVersion: 1;
|
|
720
|
+
state: "valid" | "pending" | "invalid" | "inconclusive";
|
|
721
|
+
deploymentId: string;
|
|
722
|
+
connectionId: string;
|
|
723
|
+
operationId: string;
|
|
724
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
725
|
+
completedAt?: string | undefined;
|
|
726
|
+
}>;
|
|
727
|
+
/** Exact customer-selectable catalogue ids; no internal Kaana route is exposed. */
|
|
728
|
+
export declare const providerCredentialValidationDeploymentSchema: z.ZodObject<{
|
|
729
|
+
deploymentId: z.ZodString;
|
|
730
|
+
}, "strict", z.ZodTypeAny, {
|
|
731
|
+
deploymentId: string;
|
|
732
|
+
}, {
|
|
733
|
+
deploymentId: string;
|
|
734
|
+
}>;
|
|
735
|
+
/**
|
|
736
|
+
* Oxy's view of the cross-service mutation. Only `ready` may be routed.
|
|
737
|
+
* `reconcile` is the fail-closed state after an outcome could not be proven.
|
|
738
|
+
*/
|
|
739
|
+
export declare const providerCredentialCustodyStateSchema: z.ZodEnum<["pending", "ready", "reconcile", "revoked"]>;
|
|
740
|
+
/** Why a credential check failed, as a closed set the Console can render. */
|
|
741
|
+
export declare const providerConnectionValidationSchema: z.ZodObject<{
|
|
742
|
+
state: z.ZodEnum<["unvalidated", "valid", "invalid", "expired"]>;
|
|
743
|
+
lastValidatedAt: z.ZodOptional<z.ZodString>;
|
|
744
|
+
/** Required when `invalid`: a failure nobody can act on is not a result. */
|
|
745
|
+
failureCode: z.ZodOptional<z.ZodEnum<["unauthorized", "forbidden", "not_found", "rate_limited", "network", "unknown"]>>;
|
|
746
|
+
}, "strict", z.ZodTypeAny, {
|
|
747
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
748
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
749
|
+
lastValidatedAt?: string | undefined;
|
|
750
|
+
}, {
|
|
751
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
752
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
753
|
+
lastValidatedAt?: string | undefined;
|
|
754
|
+
}>;
|
|
755
|
+
/**
|
|
756
|
+
* Lifecycle of a connection. `pending_validation` is quarantined from normal
|
|
757
|
+
* serving, `revoked` is terminal, and `disabled` is reversible.
|
|
758
|
+
*/
|
|
759
|
+
export declare const providerConnectionStatusSchema: z.ZodEnum<["pending_validation", "active", "disabled", "revoked"]>;
|
|
760
|
+
/**
|
|
761
|
+
* A customer's provider connection, without secrets.
|
|
762
|
+
*
|
|
763
|
+
* This is the whole of what Oxy stores, and the whole of what the data plane
|
|
764
|
+
* is given.
|
|
765
|
+
* Resolving the opaque handle to plaintext happens only inside Kaana inference.
|
|
766
|
+
*/
|
|
767
|
+
export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
|
|
768
|
+
/** See `version.ts`: exchanged with the data plane and rendered by Console. */
|
|
769
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
770
|
+
connectionId: z.ZodString;
|
|
771
|
+
provider: z.ZodString;
|
|
772
|
+
/** The Oxy account that owns the connection and answers for its use. */
|
|
773
|
+
ownerAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
774
|
+
scope: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
775
|
+
kind: z.ZodLiteral<"account">;
|
|
776
|
+
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
777
|
+
}, "strict", z.ZodTypeAny, {
|
|
778
|
+
kind: "account";
|
|
779
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
780
|
+
}, {
|
|
781
|
+
kind: "account";
|
|
782
|
+
accountId: string;
|
|
783
|
+
}>, z.ZodObject<{
|
|
784
|
+
kind: z.ZodLiteral<"project">;
|
|
785
|
+
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
786
|
+
}, "strict", z.ZodTypeAny, {
|
|
787
|
+
kind: "project";
|
|
788
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
789
|
+
}, {
|
|
790
|
+
kind: "project";
|
|
791
|
+
accountId: string;
|
|
792
|
+
}>, z.ZodObject<{
|
|
793
|
+
kind: z.ZodLiteral<"application">;
|
|
794
|
+
accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
|
|
795
|
+
applicationId: z.ZodString;
|
|
796
|
+
}, "strict", z.ZodTypeAny, {
|
|
797
|
+
kind: "application";
|
|
798
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
799
|
+
applicationId: string;
|
|
800
|
+
}, {
|
|
801
|
+
kind: "application";
|
|
802
|
+
accountId: string;
|
|
803
|
+
applicationId: string;
|
|
804
|
+
}>]>;
|
|
805
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
806
|
+
status: z.ZodEnum<["pending_validation", "active", "disabled", "revoked"]>;
|
|
807
|
+
custodyState: z.ZodEnum<["pending", "ready", "reconcile", "revoked"]>;
|
|
808
|
+
credentialHandle: z.ZodOptional<z.ZodString>;
|
|
809
|
+
credentialRevision: z.ZodOptional<z.ZodNumber>;
|
|
810
|
+
validation: z.ZodObject<{
|
|
811
|
+
state: z.ZodEnum<["unvalidated", "valid", "invalid", "expired"]>;
|
|
812
|
+
lastValidatedAt: z.ZodOptional<z.ZodString>;
|
|
813
|
+
/** Required when `invalid`: a failure nobody can act on is not a result. */
|
|
814
|
+
failureCode: z.ZodOptional<z.ZodEnum<["unauthorized", "forbidden", "not_found", "rate_limited", "network", "unknown"]>>;
|
|
815
|
+
}, "strict", z.ZodTypeAny, {
|
|
816
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
817
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
818
|
+
lastValidatedAt?: string | undefined;
|
|
819
|
+
}, {
|
|
820
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
821
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
822
|
+
lastValidatedAt?: string | undefined;
|
|
823
|
+
}>;
|
|
824
|
+
/**
|
|
825
|
+
* Always `true` for a BYOK connection: the provider bills the customer's own
|
|
826
|
+
* upstream account, and Oxy charges only its platform fee. Stated as data so
|
|
827
|
+
* a receipt against this route is readable without a second lookup.
|
|
828
|
+
*/
|
|
829
|
+
upstreamBillsCustomerDirectly: z.ZodLiteral<true>;
|
|
830
|
+
/** Set when the provider's terms require a per-customer acknowledgement. */
|
|
831
|
+
termsAcknowledgedAt: z.ZodOptional<z.ZodString>;
|
|
832
|
+
createdAt: z.ZodString;
|
|
833
|
+
rotatedAt: z.ZodOptional<z.ZodString>;
|
|
834
|
+
}, "strict", z.ZodTypeAny, {
|
|
835
|
+
validation: {
|
|
836
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
837
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
838
|
+
lastValidatedAt?: string | undefined;
|
|
839
|
+
};
|
|
840
|
+
status: "active" | "revoked" | "disabled" | "pending_validation";
|
|
841
|
+
environment: "development" | "staging" | "production";
|
|
842
|
+
ownerAccountId: string & z.BRAND<"OxyAccountId">;
|
|
843
|
+
createdAt: string;
|
|
844
|
+
schemaVersion: 2;
|
|
845
|
+
scope: {
|
|
846
|
+
kind: "account";
|
|
847
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
848
|
+
} | {
|
|
849
|
+
kind: "project";
|
|
850
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
851
|
+
} | {
|
|
852
|
+
kind: "application";
|
|
853
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
854
|
+
applicationId: string;
|
|
855
|
+
};
|
|
856
|
+
provider: string;
|
|
857
|
+
connectionId: string;
|
|
858
|
+
custodyState: "revoked" | "pending" | "ready" | "reconcile";
|
|
859
|
+
upstreamBillsCustomerDirectly: true;
|
|
860
|
+
credentialHandle?: string | undefined;
|
|
861
|
+
credentialRevision?: number | undefined;
|
|
862
|
+
termsAcknowledgedAt?: string | undefined;
|
|
863
|
+
rotatedAt?: string | undefined;
|
|
864
|
+
}, {
|
|
865
|
+
validation: {
|
|
866
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
867
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
868
|
+
lastValidatedAt?: string | undefined;
|
|
869
|
+
};
|
|
870
|
+
status: "active" | "revoked" | "disabled" | "pending_validation";
|
|
871
|
+
environment: "development" | "staging" | "production";
|
|
872
|
+
ownerAccountId: string;
|
|
873
|
+
createdAt: string;
|
|
874
|
+
schemaVersion: 2;
|
|
875
|
+
scope: {
|
|
876
|
+
kind: "account";
|
|
877
|
+
accountId: string;
|
|
878
|
+
} | {
|
|
879
|
+
kind: "project";
|
|
880
|
+
accountId: string;
|
|
881
|
+
} | {
|
|
882
|
+
kind: "application";
|
|
883
|
+
accountId: string;
|
|
884
|
+
applicationId: string;
|
|
885
|
+
};
|
|
886
|
+
provider: string;
|
|
887
|
+
connectionId: string;
|
|
888
|
+
custodyState: "revoked" | "pending" | "ready" | "reconcile";
|
|
889
|
+
upstreamBillsCustomerDirectly: true;
|
|
890
|
+
credentialHandle?: string | undefined;
|
|
891
|
+
credentialRevision?: number | undefined;
|
|
892
|
+
termsAcknowledgedAt?: string | undefined;
|
|
893
|
+
rotatedAt?: string | undefined;
|
|
894
|
+
}>, {
|
|
895
|
+
validation: {
|
|
896
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
897
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
898
|
+
lastValidatedAt?: string | undefined;
|
|
899
|
+
};
|
|
900
|
+
status: "active" | "revoked" | "disabled" | "pending_validation";
|
|
901
|
+
environment: "development" | "staging" | "production";
|
|
902
|
+
ownerAccountId: string & z.BRAND<"OxyAccountId">;
|
|
903
|
+
createdAt: string;
|
|
904
|
+
schemaVersion: 2;
|
|
905
|
+
scope: {
|
|
906
|
+
kind: "account";
|
|
907
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
908
|
+
} | {
|
|
909
|
+
kind: "project";
|
|
910
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
911
|
+
} | {
|
|
912
|
+
kind: "application";
|
|
913
|
+
accountId: string & z.BRAND<"OxyAccountId">;
|
|
914
|
+
applicationId: string;
|
|
915
|
+
};
|
|
916
|
+
provider: string;
|
|
917
|
+
connectionId: string;
|
|
918
|
+
custodyState: "revoked" | "pending" | "ready" | "reconcile";
|
|
919
|
+
upstreamBillsCustomerDirectly: true;
|
|
920
|
+
credentialHandle?: string | undefined;
|
|
921
|
+
credentialRevision?: number | undefined;
|
|
922
|
+
termsAcknowledgedAt?: string | undefined;
|
|
923
|
+
rotatedAt?: string | undefined;
|
|
924
|
+
}, {
|
|
925
|
+
validation: {
|
|
926
|
+
state: "valid" | "invalid" | "expired" | "unvalidated";
|
|
927
|
+
failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
|
|
928
|
+
lastValidatedAt?: string | undefined;
|
|
929
|
+
};
|
|
930
|
+
status: "active" | "revoked" | "disabled" | "pending_validation";
|
|
931
|
+
environment: "development" | "staging" | "production";
|
|
932
|
+
ownerAccountId: string;
|
|
933
|
+
createdAt: string;
|
|
934
|
+
schemaVersion: 2;
|
|
935
|
+
scope: {
|
|
936
|
+
kind: "account";
|
|
937
|
+
accountId: string;
|
|
938
|
+
} | {
|
|
939
|
+
kind: "project";
|
|
940
|
+
accountId: string;
|
|
941
|
+
} | {
|
|
942
|
+
kind: "application";
|
|
943
|
+
accountId: string;
|
|
944
|
+
applicationId: string;
|
|
945
|
+
};
|
|
946
|
+
provider: string;
|
|
947
|
+
connectionId: string;
|
|
948
|
+
custodyState: "revoked" | "pending" | "ready" | "reconcile";
|
|
949
|
+
upstreamBillsCustomerDirectly: true;
|
|
950
|
+
credentialHandle?: string | undefined;
|
|
951
|
+
credentialRevision?: number | undefined;
|
|
952
|
+
termsAcknowledgedAt?: string | undefined;
|
|
953
|
+
rotatedAt?: string | undefined;
|
|
954
|
+
}>;
|
|
955
|
+
export type ProviderConnectionScope = z.infer<typeof providerConnectionScopeSchema>;
|
|
956
|
+
export type KaanaCredentialOperationAction = z.infer<typeof kaanaCredentialOperationActionSchema>;
|
|
957
|
+
export type KaanaCredentialIdentity = z.infer<typeof kaanaCredentialIdentitySchema>;
|
|
958
|
+
export type KaanaCredentialMutation = z.infer<typeof kaanaCredentialMutationSchema>;
|
|
959
|
+
export type KaanaCredentialOutcomeRequest = z.infer<typeof kaanaCredentialOutcomeRequestSchema>;
|
|
960
|
+
export type KaanaCredentialOutcome = z.infer<typeof kaanaCredentialOutcomeSchema>;
|
|
961
|
+
export type KaanaCredentialValidationTask = z.infer<typeof kaanaCredentialValidationTaskSchema>;
|
|
962
|
+
export type KaanaCredentialValidationOutcome = z.infer<typeof kaanaCredentialValidationOutcomeSchema>;
|
|
963
|
+
export type ProviderCredentialValidationOperation = z.infer<typeof providerCredentialValidationOperationSchema>;
|
|
964
|
+
export type ProviderCredentialValidationDeployment = z.infer<typeof providerCredentialValidationDeploymentSchema>;
|
|
965
|
+
export type ProviderConnectionValidation = z.infer<typeof providerConnectionValidationSchema>;
|
|
966
|
+
export type ProviderConnectionStatus = z.infer<typeof providerConnectionStatusSchema>;
|
|
967
|
+
export type ProviderCredentialCustodyState = z.infer<typeof providerCredentialCustodyStateSchema>;
|
|
968
|
+
export type ProviderConnection = z.infer<typeof providerConnectionSchema>;
|