@odingard/guardian-sdk 0.0.0-stage → 0.1.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 +201 -0
- package/README.md +67 -2
- package/dist/index.js +3248 -0
- package/dist-dts/__tests__/client.test.d.ts +1 -0
- package/dist-dts/client.d.ts +80 -0
- package/dist-dts/contracts/action-parameters.d.ts +34 -0
- package/dist-dts/contracts/action-registry.d.ts +197 -0
- package/dist-dts/contracts/action.d.ts +967 -0
- package/dist-dts/contracts/api.d.ts +78 -0
- package/dist-dts/contracts/approval.d.ts +206 -0
- package/dist-dts/contracts/authority-state.d.ts +93 -0
- package/dist-dts/contracts/authority.d.ts +313 -0
- package/dist-dts/contracts/calendar.d.ts +146 -0
- package/dist-dts/contracts/canonical-json.d.ts +4 -0
- package/dist-dts/contracts/capability.d.ts +28 -0
- package/dist-dts/contracts/commerce.d.ts +133 -0
- package/dist-dts/contracts/digest.d.ts +2 -0
- package/dist-dts/contracts/email.d.ts +45 -0
- package/dist-dts/contracts/evidence.d.ts +1030 -0
- package/dist-dts/contracts/execution.d.ts +1338 -0
- package/dist-dts/contracts/files.d.ts +61 -0
- package/dist-dts/contracts/identifiers.d.ts +33 -0
- package/dist-dts/contracts/index.d.ts +19 -0
- package/dist-dts/contracts/protected-data.d.ts +93 -0
- package/dist-dts/contracts/tools.d.ts +187 -0
- package/dist-dts/index.d.ts +1 -0
- package/dist-dts/proposal.d.ts +25 -0
- package/package.json +50 -4
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const RecurrencePolicySchema: z.ZodEnum<{
|
|
3
|
+
never: "never";
|
|
4
|
+
allowed: "allowed";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const BudgetConsumptionSchema: z.ZodObject<{
|
|
7
|
+
budgetId: z.core.$ZodBranded<z.ZodString, "BudgetId", "out">;
|
|
8
|
+
amountCents: z.ZodNumber;
|
|
9
|
+
transactions: z.ZodNumber;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export declare const ActionTypeSchema: z.core.$ZodBranded<z.ZodString, "ActionType", "out">;
|
|
12
|
+
export declare const ResourceRefSchema: z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">;
|
|
13
|
+
export declare const EpochMillisecondsSchema: z.ZodNumber;
|
|
14
|
+
export declare const AgentInterfaceSchema: z.ZodEnum<{
|
|
15
|
+
internal: "internal";
|
|
16
|
+
mcp: "mcp";
|
|
17
|
+
rest: "rest";
|
|
18
|
+
}>;
|
|
19
|
+
export declare const PrincipalSchema: z.ZodObject<{
|
|
20
|
+
id: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
21
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
22
|
+
status: z.ZodEnum<{
|
|
23
|
+
active: "active";
|
|
24
|
+
disabled: "disabled";
|
|
25
|
+
}>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
export declare const BudgetStateSchema: z.ZodObject<{
|
|
28
|
+
id: z.core.$ZodBranded<z.ZodString, "BudgetId", "out">;
|
|
29
|
+
scope: z.ZodEnum<{
|
|
30
|
+
agent: "agent";
|
|
31
|
+
task: "task";
|
|
32
|
+
}>;
|
|
33
|
+
taskId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TaskId", "out">>;
|
|
34
|
+
limitCents: z.ZodNumber;
|
|
35
|
+
consumedCents: z.ZodNumber;
|
|
36
|
+
transactionLimit: z.ZodNumber;
|
|
37
|
+
consumedTransactions: z.ZodNumber;
|
|
38
|
+
expiresAtEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
status: z.ZodEnum<{
|
|
40
|
+
active: "active";
|
|
41
|
+
exhausted: "exhausted";
|
|
42
|
+
revoked: "revoked";
|
|
43
|
+
}>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export declare const AgentIdentitySchema: z.ZodObject<{
|
|
46
|
+
id: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
47
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
48
|
+
ownerPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
49
|
+
status: z.ZodEnum<{
|
|
50
|
+
active: "active";
|
|
51
|
+
disabled: "disabled";
|
|
52
|
+
revoked: "revoked";
|
|
53
|
+
}>;
|
|
54
|
+
allowedInterfaces: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
55
|
+
internal: "internal";
|
|
56
|
+
mcp: "mcp";
|
|
57
|
+
rest: "rest";
|
|
58
|
+
}>>, z.ZodTransform<("internal" | "mcp" | "rest")[], ("internal" | "mcp" | "rest")[]>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export declare const AuthorityConstraintsSchema: z.ZodObject<{
|
|
61
|
+
actions: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>, z.ZodTransform<(string & z.core.$brand<"ActionType">)[], (string & z.core.$brand<"ActionType">)[]>>;
|
|
62
|
+
resources: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>, z.ZodTransform<(string & z.core.$brand<"ResourceRef">)[], (string & z.core.$brand<"ResourceRef">)[]>>;
|
|
63
|
+
adapterIds: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>, z.ZodTransform<(string & z.core.$brand<"AdapterId">)[], (string & z.core.$brand<"AdapterId">)[]>>;
|
|
64
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
66
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
68
|
+
approvalRequired: z.ZodBoolean;
|
|
69
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
merchantAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
71
|
+
categoryAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
72
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
never: "never";
|
|
74
|
+
allowed: "allowed";
|
|
75
|
+
}>>;
|
|
76
|
+
budgetIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "BudgetId", "out">>, z.ZodTransform<(string & z.core.$brand<"BudgetId">)[], (string & z.core.$brand<"BudgetId">)[]>>>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
export declare const AuthorityGrantSchema: z.ZodObject<{
|
|
79
|
+
id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
80
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
81
|
+
principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
82
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
83
|
+
parentGrantId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "GrantId", "out">>;
|
|
84
|
+
issuedBy: z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<"principal">;
|
|
86
|
+
principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
87
|
+
}, z.core.$strict>;
|
|
88
|
+
status: z.ZodEnum<{
|
|
89
|
+
active: "active";
|
|
90
|
+
disabled: "disabled";
|
|
91
|
+
revoked: "revoked";
|
|
92
|
+
}>;
|
|
93
|
+
version: z.ZodNumber;
|
|
94
|
+
delegable: z.ZodDefault<z.ZodBoolean>;
|
|
95
|
+
constraints: z.ZodObject<{
|
|
96
|
+
actions: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>, z.ZodTransform<(string & z.core.$brand<"ActionType">)[], (string & z.core.$brand<"ActionType">)[]>>;
|
|
97
|
+
resources: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>, z.ZodTransform<(string & z.core.$brand<"ResourceRef">)[], (string & z.core.$brand<"ResourceRef">)[]>>;
|
|
98
|
+
adapterIds: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>, z.ZodTransform<(string & z.core.$brand<"AdapterId">)[], (string & z.core.$brand<"AdapterId">)[]>>;
|
|
99
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
101
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
103
|
+
approvalRequired: z.ZodBoolean;
|
|
104
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
merchantAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
106
|
+
categoryAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
107
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
108
|
+
never: "never";
|
|
109
|
+
allowed: "allowed";
|
|
110
|
+
}>>;
|
|
111
|
+
budgetIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "BudgetId", "out">>, z.ZodTransform<(string & z.core.$brand<"BudgetId">)[], (string & z.core.$brand<"BudgetId">)[]>>>;
|
|
112
|
+
}, z.core.$strict>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export declare const AuthorityRequestSchema: z.ZodObject<{
|
|
115
|
+
id: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
|
|
116
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
117
|
+
principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
118
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
119
|
+
action: z.core.$ZodBranded<z.ZodString, "ActionType", "out">;
|
|
120
|
+
resource: z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">;
|
|
121
|
+
interface: z.ZodEnum<{
|
|
122
|
+
internal: "internal";
|
|
123
|
+
mcp: "mcp";
|
|
124
|
+
rest: "rest";
|
|
125
|
+
}>;
|
|
126
|
+
requestedAdapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
|
|
127
|
+
valueCents: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
uses: z.ZodNumber;
|
|
129
|
+
materialActionDigest: z.ZodOptional<z.ZodString>;
|
|
130
|
+
descriptiveContext: z.ZodOptional<z.ZodString>;
|
|
131
|
+
merchantId: z.ZodOptional<z.ZodString>;
|
|
132
|
+
merchantCategory: z.ZodOptional<z.ZodString>;
|
|
133
|
+
recurring: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
taskId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TaskId", "out">>;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
export declare const DenyReasonCodeSchema: z.ZodEnum<{
|
|
137
|
+
MALFORMED_INPUT: "MALFORMED_INPUT";
|
|
138
|
+
TENANT_MISMATCH: "TENANT_MISMATCH";
|
|
139
|
+
PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
|
|
140
|
+
PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
|
|
141
|
+
AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
|
|
142
|
+
AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
|
|
143
|
+
AGENT_MISMATCH: "AGENT_MISMATCH";
|
|
144
|
+
AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
|
|
145
|
+
INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
|
|
146
|
+
AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
|
|
147
|
+
DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
|
|
148
|
+
GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
|
|
149
|
+
GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
|
|
150
|
+
GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
|
|
151
|
+
GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
|
|
152
|
+
GRANT_REVOKED: "GRANT_REVOKED";
|
|
153
|
+
GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
|
|
154
|
+
GRANT_EXPIRED: "GRANT_EXPIRED";
|
|
155
|
+
INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
|
|
156
|
+
DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
|
|
157
|
+
AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
|
|
158
|
+
ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
|
|
159
|
+
RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
|
|
160
|
+
ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
|
|
161
|
+
VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
|
|
162
|
+
USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
|
|
163
|
+
MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
|
|
164
|
+
CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
|
|
165
|
+
RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
|
|
166
|
+
BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
|
|
167
|
+
BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
|
|
168
|
+
BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
|
|
169
|
+
BUDGET_EXPIRED: "BUDGET_EXPIRED";
|
|
170
|
+
BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
|
|
171
|
+
TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
|
|
172
|
+
}>;
|
|
173
|
+
export declare const DENY_PRECEDENCE: readonly ["MALFORMED_INPUT", "TENANT_MISMATCH", "PRINCIPAL_MISMATCH", "PRINCIPAL_NOT_ACTIVE", "AGENT_TENANT_MISMATCH", "AGENT_OWNER_MISMATCH", "AGENT_MISMATCH", "AGENT_NOT_ACTIVE", "INTERFACE_NOT_ALLOWED", "AUTHORITY_CHAIN_MISSING", "DUPLICATE_GRANT_ID", "GRANT_TENANT_MISMATCH", "GRANT_PRINCIPAL_MISMATCH", "GRANT_AGENT_MISMATCH", "GRANT_REVOKED", "GRANT_NOT_ACTIVE", "GRANT_NOT_YET_VALID", "GRANT_EXPIRED", "INVALID_PARENT_LINK", "DELEGATION_NOT_ALLOWED", "AUTHORITY_AMPLIFICATION", "ACTION_NOT_ALLOWED", "RESOURCE_NOT_ALLOWED", "ADAPTER_NOT_ALLOWED", "VALUE_LIMIT_EXCEEDED", "USE_LIMIT_EXCEEDED", "MERCHANT_NOT_ALLOWED", "CATEGORY_NOT_ALLOWED", "RECURRENCE_NOT_ALLOWED", "BUDGET_NOT_FOUND", "BUDGET_SCOPE_MISMATCH", "BUDGET_NOT_ACTIVE", "BUDGET_EXPIRED", "BUDGET_EXCEEDED", "TRANSACTION_LIMIT_EXCEEDED"];
|
|
174
|
+
export declare const PolicyReferenceSchema: z.ZodObject<{
|
|
175
|
+
id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
|
|
176
|
+
version: z.ZodNumber;
|
|
177
|
+
}, z.core.$strict>;
|
|
178
|
+
export declare const DecisionBindingSchema: z.ZodObject<{
|
|
179
|
+
requestId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "RequestId", "out">>;
|
|
180
|
+
policy: z.ZodNullable<z.ZodObject<{
|
|
181
|
+
id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
|
|
182
|
+
version: z.ZodNumber;
|
|
183
|
+
}, z.core.$strict>>;
|
|
184
|
+
evaluatedGrants: z.ZodArray<z.ZodObject<{
|
|
185
|
+
id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
186
|
+
version: z.ZodNumber;
|
|
187
|
+
}, z.core.$strict>>;
|
|
188
|
+
inputDigest: z.ZodNullable<z.ZodString>;
|
|
189
|
+
budgetConsumption: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
190
|
+
budgetId: z.core.$ZodBranded<z.ZodString, "BudgetId", "out">;
|
|
191
|
+
amountCents: z.ZodNumber;
|
|
192
|
+
transactions: z.ZodNumber;
|
|
193
|
+
}, z.core.$strict>>>;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
export declare const AuthorityDecisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
196
|
+
decision: z.ZodLiteral<"ALLOW">;
|
|
197
|
+
reasonCode: z.ZodLiteral<"AUTHORIZED">;
|
|
198
|
+
binding: z.ZodObject<{
|
|
199
|
+
requestId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "RequestId", "out">>;
|
|
200
|
+
policy: z.ZodNullable<z.ZodObject<{
|
|
201
|
+
id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
|
|
202
|
+
version: z.ZodNumber;
|
|
203
|
+
}, z.core.$strict>>;
|
|
204
|
+
evaluatedGrants: z.ZodArray<z.ZodObject<{
|
|
205
|
+
id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
206
|
+
version: z.ZodNumber;
|
|
207
|
+
}, z.core.$strict>>;
|
|
208
|
+
inputDigest: z.ZodNullable<z.ZodString>;
|
|
209
|
+
budgetConsumption: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
210
|
+
budgetId: z.core.$ZodBranded<z.ZodString, "BudgetId", "out">;
|
|
211
|
+
amountCents: z.ZodNumber;
|
|
212
|
+
transactions: z.ZodNumber;
|
|
213
|
+
}, z.core.$strict>>>;
|
|
214
|
+
}, z.core.$strict>;
|
|
215
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
216
|
+
decision: z.ZodLiteral<"ASK">;
|
|
217
|
+
reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
|
|
218
|
+
binding: z.ZodObject<{
|
|
219
|
+
requestId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "RequestId", "out">>;
|
|
220
|
+
policy: z.ZodNullable<z.ZodObject<{
|
|
221
|
+
id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
|
|
222
|
+
version: z.ZodNumber;
|
|
223
|
+
}, z.core.$strict>>;
|
|
224
|
+
evaluatedGrants: z.ZodArray<z.ZodObject<{
|
|
225
|
+
id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
226
|
+
version: z.ZodNumber;
|
|
227
|
+
}, z.core.$strict>>;
|
|
228
|
+
inputDigest: z.ZodNullable<z.ZodString>;
|
|
229
|
+
budgetConsumption: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
230
|
+
budgetId: z.core.$ZodBranded<z.ZodString, "BudgetId", "out">;
|
|
231
|
+
amountCents: z.ZodNumber;
|
|
232
|
+
transactions: z.ZodNumber;
|
|
233
|
+
}, z.core.$strict>>>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
236
|
+
decision: z.ZodLiteral<"DENY">;
|
|
237
|
+
reasonCode: z.ZodEnum<{
|
|
238
|
+
MALFORMED_INPUT: "MALFORMED_INPUT";
|
|
239
|
+
TENANT_MISMATCH: "TENANT_MISMATCH";
|
|
240
|
+
PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
|
|
241
|
+
PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
|
|
242
|
+
AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
|
|
243
|
+
AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
|
|
244
|
+
AGENT_MISMATCH: "AGENT_MISMATCH";
|
|
245
|
+
AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
|
|
246
|
+
INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
|
|
247
|
+
AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
|
|
248
|
+
DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
|
|
249
|
+
GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
|
|
250
|
+
GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
|
|
251
|
+
GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
|
|
252
|
+
GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
|
|
253
|
+
GRANT_REVOKED: "GRANT_REVOKED";
|
|
254
|
+
GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
|
|
255
|
+
GRANT_EXPIRED: "GRANT_EXPIRED";
|
|
256
|
+
INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
|
|
257
|
+
DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
|
|
258
|
+
AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
|
|
259
|
+
ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
|
|
260
|
+
RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
|
|
261
|
+
ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
|
|
262
|
+
VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
|
|
263
|
+
USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
|
|
264
|
+
MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
|
|
265
|
+
CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
|
|
266
|
+
RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
|
|
267
|
+
BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
|
|
268
|
+
BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
|
|
269
|
+
BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
|
|
270
|
+
BUDGET_EXPIRED: "BUDGET_EXPIRED";
|
|
271
|
+
BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
|
|
272
|
+
TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
|
|
273
|
+
}>;
|
|
274
|
+
binding: z.ZodObject<{
|
|
275
|
+
requestId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "RequestId", "out">>;
|
|
276
|
+
policy: z.ZodNullable<z.ZodObject<{
|
|
277
|
+
id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
|
|
278
|
+
version: z.ZodNumber;
|
|
279
|
+
}, z.core.$strict>>;
|
|
280
|
+
evaluatedGrants: z.ZodArray<z.ZodObject<{
|
|
281
|
+
id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
282
|
+
version: z.ZodNumber;
|
|
283
|
+
}, z.core.$strict>>;
|
|
284
|
+
inputDigest: z.ZodNullable<z.ZodString>;
|
|
285
|
+
budgetConsumption: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
286
|
+
budgetId: z.core.$ZodBranded<z.ZodString, "BudgetId", "out">;
|
|
287
|
+
amountCents: z.ZodNumber;
|
|
288
|
+
transactions: z.ZodNumber;
|
|
289
|
+
}, z.core.$strict>>>;
|
|
290
|
+
}, z.core.$strict>;
|
|
291
|
+
}, z.core.$strict>], "decision">;
|
|
292
|
+
export declare const RevocationSchema: z.ZodObject<{
|
|
293
|
+
grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
294
|
+
revokedAtEpochMs: z.ZodNumber;
|
|
295
|
+
reasonCode: z.ZodString;
|
|
296
|
+
}, z.core.$strict>;
|
|
297
|
+
export type ActionType = z.infer<typeof ActionTypeSchema>;
|
|
298
|
+
export type ResourceRef = z.infer<typeof ResourceRefSchema>;
|
|
299
|
+
export type Principal = z.infer<typeof PrincipalSchema>;
|
|
300
|
+
export type AgentIdentity = z.infer<typeof AgentIdentitySchema>;
|
|
301
|
+
export type AgentInterface = z.infer<typeof AgentInterfaceSchema>;
|
|
302
|
+
export type AuthorityConstraints = z.infer<typeof AuthorityConstraintsSchema>;
|
|
303
|
+
export type AuthorityGrant = z.infer<typeof AuthorityGrantSchema>;
|
|
304
|
+
export type AuthorityRequest = z.infer<typeof AuthorityRequestSchema>;
|
|
305
|
+
export type AuthorityDecision = z.infer<typeof AuthorityDecisionSchema>;
|
|
306
|
+
export type DenyReasonCode = z.infer<typeof DenyReasonCodeSchema>;
|
|
307
|
+
export type Revocation = z.infer<typeof RevocationSchema>;
|
|
308
|
+
export type PolicyReference = z.infer<typeof PolicyReferenceSchema>;
|
|
309
|
+
export type DecisionBinding = z.infer<typeof DecisionBindingSchema>;
|
|
310
|
+
export type RecurrencePolicy = z.infer<typeof RecurrencePolicySchema>;
|
|
311
|
+
export type BudgetConsumption = z.infer<typeof BudgetConsumptionSchema>;
|
|
312
|
+
export type BudgetState = z.infer<typeof BudgetStateSchema>;
|
|
313
|
+
export declare const AUTHORITY_CONSTRAINT_KEYS: readonly ["actions", "resources", "adapterIds", "maxValueCents", "maxUsesPerRequest", "notBeforeEpochMs", "expiresAtEpochMs", "approvalRequired", "askAboveValueCents", "merchantAllowlist", "categoryAllowlist", "recurrence", "budgetIds"];
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CalendarCreateParametersV1Schema: z.ZodObject<{
|
|
3
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
4
|
+
calendarId: z.ZodString;
|
|
5
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.create.v1">;
|
|
6
|
+
summary: z.ZodString;
|
|
7
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8
|
+
location: z.ZodOptional<z.ZodString>;
|
|
9
|
+
start: z.ZodObject<{
|
|
10
|
+
dateTime: z.ZodString;
|
|
11
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
end: z.ZodObject<{
|
|
14
|
+
dateTime: z.ZodString;
|
|
15
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export declare const CalendarUpdateParametersV1Schema: z.ZodObject<{
|
|
20
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
21
|
+
calendarId: z.ZodString;
|
|
22
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.update.v1">;
|
|
23
|
+
eventId: z.ZodString;
|
|
24
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
location: z.ZodOptional<z.ZodString>;
|
|
27
|
+
start: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
dateTime: z.ZodString;
|
|
29
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
end: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
dateTime: z.ZodString;
|
|
33
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>>;
|
|
35
|
+
sendUpdates: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
all: "all";
|
|
37
|
+
externalOnly: "externalOnly";
|
|
38
|
+
none: "none";
|
|
39
|
+
}>>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
export declare const CalendarCancelParametersV1Schema: z.ZodObject<{
|
|
42
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
43
|
+
calendarId: z.ZodString;
|
|
44
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.cancel.v1">;
|
|
45
|
+
eventId: z.ZodString;
|
|
46
|
+
sendUpdates: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
all: "all";
|
|
48
|
+
externalOnly: "externalOnly";
|
|
49
|
+
none: "none";
|
|
50
|
+
}>>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export declare const CalendarInviteParametersV1Schema: z.ZodObject<{
|
|
53
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
54
|
+
calendarId: z.ZodString;
|
|
55
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.invite.v1">;
|
|
56
|
+
eventId: z.ZodString;
|
|
57
|
+
attendees: z.ZodArray<z.ZodObject<{
|
|
58
|
+
email: z.ZodString;
|
|
59
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
}, z.core.$strict>>;
|
|
61
|
+
sendUpdates: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
all: "all";
|
|
63
|
+
externalOnly: "externalOnly";
|
|
64
|
+
none: "none";
|
|
65
|
+
}>>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
export declare const CalendarParametersV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
69
|
+
calendarId: z.ZodString;
|
|
70
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.create.v1">;
|
|
71
|
+
summary: z.ZodString;
|
|
72
|
+
description: z.ZodOptional<z.ZodString>;
|
|
73
|
+
location: z.ZodOptional<z.ZodString>;
|
|
74
|
+
start: z.ZodObject<{
|
|
75
|
+
dateTime: z.ZodString;
|
|
76
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
end: z.ZodObject<{
|
|
79
|
+
dateTime: z.ZodString;
|
|
80
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
85
|
+
calendarId: z.ZodString;
|
|
86
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.update.v1">;
|
|
87
|
+
eventId: z.ZodString;
|
|
88
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
89
|
+
description: z.ZodOptional<z.ZodString>;
|
|
90
|
+
location: z.ZodOptional<z.ZodString>;
|
|
91
|
+
start: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
dateTime: z.ZodString;
|
|
93
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strict>>;
|
|
95
|
+
end: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
dateTime: z.ZodString;
|
|
97
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strict>>;
|
|
99
|
+
sendUpdates: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
all: "all";
|
|
101
|
+
externalOnly: "externalOnly";
|
|
102
|
+
none: "none";
|
|
103
|
+
}>>;
|
|
104
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
105
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
106
|
+
calendarId: z.ZodString;
|
|
107
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.cancel.v1">;
|
|
108
|
+
eventId: z.ZodString;
|
|
109
|
+
sendUpdates: z.ZodOptional<z.ZodEnum<{
|
|
110
|
+
all: "all";
|
|
111
|
+
externalOnly: "externalOnly";
|
|
112
|
+
none: "none";
|
|
113
|
+
}>>;
|
|
114
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
115
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
116
|
+
calendarId: z.ZodString;
|
|
117
|
+
schema: z.ZodLiteral<"odingard.guardian.calendar.invite.v1">;
|
|
118
|
+
eventId: z.ZodString;
|
|
119
|
+
attendees: z.ZodArray<z.ZodObject<{
|
|
120
|
+
email: z.ZodString;
|
|
121
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
}, z.core.$strict>>;
|
|
123
|
+
sendUpdates: z.ZodOptional<z.ZodEnum<{
|
|
124
|
+
all: "all";
|
|
125
|
+
externalOnly: "externalOnly";
|
|
126
|
+
none: "none";
|
|
127
|
+
}>>;
|
|
128
|
+
}, z.core.$strict>], "schema">;
|
|
129
|
+
export type CalendarCreateParametersV1 = z.infer<typeof CalendarCreateParametersV1Schema>;
|
|
130
|
+
export type CalendarUpdateParametersV1 = z.infer<typeof CalendarUpdateParametersV1Schema>;
|
|
131
|
+
export type CalendarCancelParametersV1 = z.infer<typeof CalendarCancelParametersV1Schema>;
|
|
132
|
+
export type CalendarInviteParametersV1 = z.infer<typeof CalendarInviteParametersV1Schema>;
|
|
133
|
+
export type CalendarParametersV1 = z.infer<typeof CalendarParametersV1Schema>;
|
|
134
|
+
/**
|
|
135
|
+
* The verification projection is the semantic external effect the commit must
|
|
136
|
+
* produce — the same shape the adapter rebuilds from the provider's
|
|
137
|
+
* post-commit state so digests compare equal only when the observed effect
|
|
138
|
+
* matches what authority approved.
|
|
139
|
+
*/
|
|
140
|
+
export declare function calendarVerificationProjection(params: CalendarParametersV1): Readonly<Record<string, unknown>>;
|
|
141
|
+
/**
|
|
142
|
+
* The envelope projection is the lower-fidelity view: which calendar action on
|
|
143
|
+
* which calendar/event, without event content (summary/description/attendee
|
|
144
|
+
* detail).
|
|
145
|
+
*/
|
|
146
|
+
export declare function calendarEnvelopeProjection(params: CalendarParametersV1): Readonly<Record<string, unknown>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CapabilityKeyIdSchema: z.core.$ZodBranded<z.ZodString, "CapabilityKeyId", "out">;
|
|
3
|
+
export declare const CapabilityClaimsSchema: z.ZodObject<{
|
|
4
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
5
|
+
capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
|
|
6
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
7
|
+
principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
8
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
9
|
+
requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
|
|
10
|
+
actionDigest: z.ZodString;
|
|
11
|
+
actionNonce: z.core.$ZodBranded<z.ZodString, "Nonce", "out">;
|
|
12
|
+
audience: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
|
|
13
|
+
policy: z.ZodObject<{
|
|
14
|
+
id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
|
|
15
|
+
version: z.ZodNumber;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
evaluatedGrants: z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
19
|
+
version: z.ZodNumber;
|
|
20
|
+
}, z.core.$strict>>;
|
|
21
|
+
issuedAtEpochMs: z.ZodNumber;
|
|
22
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
23
|
+
maxUses: z.ZodLiteral<1>;
|
|
24
|
+
keyId: z.core.$ZodBranded<z.ZodString, "CapabilityKeyId", "out">;
|
|
25
|
+
algorithm: z.ZodLiteral<"HS256">;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
export type CapabilityKeyId = z.infer<typeof CapabilityKeyIdSchema>;
|
|
28
|
+
export type CapabilityClaims = z.infer<typeof CapabilityClaimsSchema>;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { TaskId } from "./identifiers.js";
|
|
3
|
+
export declare const CommercePurchaseParametersV1Schema: z.ZodObject<{
|
|
4
|
+
schema: z.ZodLiteral<"commerce.purchase.v1">;
|
|
5
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
6
|
+
merchantId: z.ZodString;
|
|
7
|
+
merchantCategory: z.ZodString;
|
|
8
|
+
amountCents: z.ZodNumber;
|
|
9
|
+
currency: z.ZodLiteral<"USD">;
|
|
10
|
+
orderDescription: z.ZodString;
|
|
11
|
+
idempotencyKey: z.ZodString;
|
|
12
|
+
taskId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TaskId", "out">>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const CommerceRefundParametersV1Schema: z.ZodObject<{
|
|
15
|
+
schema: z.ZodLiteral<"commerce.refund.v1">;
|
|
16
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
17
|
+
chargeId: z.ZodString;
|
|
18
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
reason: z.ZodString;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export declare const CommerceReturnParametersV1Schema: z.ZodObject<{
|
|
22
|
+
schema: z.ZodLiteral<"commerce.return.v1">;
|
|
23
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
24
|
+
chargeId: z.ZodString;
|
|
25
|
+
reason: z.ZodString;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
export declare const SubscriptionCreateParametersV1Schema: z.ZodObject<{
|
|
28
|
+
schema: z.ZodLiteral<"subscription.create.v1">;
|
|
29
|
+
connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
30
|
+
merchantId: z.ZodString;
|
|
31
|
+
planId: z.ZodString;
|
|
32
|
+
amountCents: z.ZodNumber;
|
|
33
|
+
currency: z.ZodLiteral<"USD">;
|
|
34
|
+
interval: z.ZodEnum<{
|
|
35
|
+
week: "week";
|
|
36
|
+
month: "month";
|
|
37
|
+
year: "year";
|
|
38
|
+
}>;
|
|
39
|
+
idempotencyKey: z.ZodString;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
export type CommercePurchaseParametersV1 = z.infer<typeof CommercePurchaseParametersV1Schema>;
|
|
42
|
+
export type CommerceRefundParametersV1 = z.infer<typeof CommerceRefundParametersV1Schema>;
|
|
43
|
+
export type CommerceReturnParametersV1 = z.infer<typeof CommerceReturnParametersV1Schema>;
|
|
44
|
+
export type SubscriptionCreateParametersV1 = z.infer<typeof SubscriptionCreateParametersV1Schema>;
|
|
45
|
+
/**
|
|
46
|
+
* Generic monetary-authority facts a registered action derives from its
|
|
47
|
+
* validated parameters. The envelope's declared facts must equal these —
|
|
48
|
+
* an agent cannot understate an amount or smuggle a category, because the
|
|
49
|
+
* kernel re-derives the facts from the digested material parameters.
|
|
50
|
+
*/
|
|
51
|
+
export type ActionAuthorityFacts = Readonly<{
|
|
52
|
+
valueCents?: number;
|
|
53
|
+
merchantId?: string;
|
|
54
|
+
merchantCategory?: string;
|
|
55
|
+
recurring?: boolean;
|
|
56
|
+
taskId?: TaskId;
|
|
57
|
+
}>;
|
|
58
|
+
export declare function commercePurchaseVerificationProjection(input: CommercePurchaseParametersV1): Readonly<{
|
|
59
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
60
|
+
action: "commerce.purchase";
|
|
61
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
62
|
+
merchantId: string;
|
|
63
|
+
merchantCategory: string;
|
|
64
|
+
amountCents: number;
|
|
65
|
+
currency: "USD";
|
|
66
|
+
descriptionDigest: string;
|
|
67
|
+
idempotencyKey: string;
|
|
68
|
+
taskId: (string & z.core.$brand<"TaskId">) | null;
|
|
69
|
+
}>;
|
|
70
|
+
export declare function commercePurchaseEnvelopeProjection(input: CommercePurchaseParametersV1): Readonly<{
|
|
71
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
72
|
+
action: "commerce.purchase";
|
|
73
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
74
|
+
merchantId: string;
|
|
75
|
+
merchantCategory: string;
|
|
76
|
+
amountCents: number;
|
|
77
|
+
currency: "USD";
|
|
78
|
+
descriptionDigest: string;
|
|
79
|
+
idempotencyKey: string;
|
|
80
|
+
taskId: (string & z.core.$brand<"TaskId">) | null;
|
|
81
|
+
}>;
|
|
82
|
+
export declare function commerceRefundVerificationProjection(input: CommerceRefundParametersV1): Readonly<{
|
|
83
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
84
|
+
action: "commerce.refund";
|
|
85
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
86
|
+
chargeId: string;
|
|
87
|
+
amountCents: number | null;
|
|
88
|
+
reasonDigest: string;
|
|
89
|
+
}>;
|
|
90
|
+
export declare function commerceRefundEnvelopeProjection(input: CommerceRefundParametersV1): Readonly<{
|
|
91
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
92
|
+
action: "commerce.refund";
|
|
93
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
94
|
+
chargeId: string;
|
|
95
|
+
amountCents: number | null;
|
|
96
|
+
reasonDigest: string;
|
|
97
|
+
}>;
|
|
98
|
+
export declare function commerceReturnVerificationProjection(input: CommerceReturnParametersV1): Readonly<{
|
|
99
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
100
|
+
action: "commerce.return";
|
|
101
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
102
|
+
chargeId: string;
|
|
103
|
+
reasonDigest: string;
|
|
104
|
+
}>;
|
|
105
|
+
export declare function commerceReturnEnvelopeProjection(input: CommerceReturnParametersV1): Readonly<{
|
|
106
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
107
|
+
action: "commerce.return";
|
|
108
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
109
|
+
chargeId: string;
|
|
110
|
+
reasonDigest: string;
|
|
111
|
+
}>;
|
|
112
|
+
export declare function subscriptionCreateVerificationProjection(input: SubscriptionCreateParametersV1): Readonly<{
|
|
113
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
114
|
+
action: "subscription.create";
|
|
115
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
116
|
+
merchantId: string;
|
|
117
|
+
planId: string;
|
|
118
|
+
amountCents: number;
|
|
119
|
+
currency: "USD";
|
|
120
|
+
interval: "week" | "month" | "year";
|
|
121
|
+
idempotencyKey: string;
|
|
122
|
+
}>;
|
|
123
|
+
export declare function subscriptionCreateEnvelopeProjection(input: SubscriptionCreateParametersV1): Readonly<{
|
|
124
|
+
domain: "odingard.guardian.commerce-projection.v1";
|
|
125
|
+
action: "subscription.create";
|
|
126
|
+
connectionId: string & z.core.$brand<"ConnectionId">;
|
|
127
|
+
merchantId: string;
|
|
128
|
+
planId: string;
|
|
129
|
+
amountCents: number;
|
|
130
|
+
currency: "USD";
|
|
131
|
+
interval: "week" | "month" | "year";
|
|
132
|
+
idempotencyKey: string;
|
|
133
|
+
}>;
|