@theelena/sdk 0.1.0 → 0.1.2
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/README.md +6 -8
- package/dist/agent.d.ts +3048 -0
- package/dist/agent.js +1786 -0
- package/dist/agent.js.map +1 -0
- package/dist/index.d.ts +901 -0
- package/dist/index.js +1766 -0
- package/dist/index.js.map +1 -0
- package/dist/key-transport.d-Bopgxw9r.d.ts +1487 -0
- package/guides/external-agents.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1487 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const ELENA_AGENT_CONTRACT_VERSION: "1";
|
|
4
|
+
declare const elenaAgentVersionSchema: z.ZodLiteral<"1">;
|
|
5
|
+
declare const elenaAgentIdSchema: z.ZodUUID;
|
|
6
|
+
declare const elenaAgentRevisionSchema: z.ZodNumber;
|
|
7
|
+
declare const elenaAgentTimestampSchema: z.ZodISODateTime;
|
|
8
|
+
declare const elenaAgentHashSchema: z.ZodString;
|
|
9
|
+
declare const elenaAgentRefSchema: z.ZodString;
|
|
10
|
+
declare const elenaAgentNameSchema: z.ZodString;
|
|
11
|
+
declare const elenaAgentTextSchema: z.ZodString;
|
|
12
|
+
declare const elenaAgentCurrencySchema: z.ZodLiteral<"PEN">;
|
|
13
|
+
declare const elenaAgentNonnegativeMoneySchema: z.ZodString;
|
|
14
|
+
declare const elenaAgentMoneySchema: z.ZodString;
|
|
15
|
+
declare const ELENA_AGENT_LIMITS: Readonly<{
|
|
16
|
+
readonly categoriesPerImport: 50;
|
|
17
|
+
readonly productsPerImport: 200;
|
|
18
|
+
readonly changesPerOperation: 200;
|
|
19
|
+
readonly publicationProducts: 200;
|
|
20
|
+
readonly galleryImages: 8;
|
|
21
|
+
readonly extraGroups: 10;
|
|
22
|
+
readonly optionsPerGroup: 30;
|
|
23
|
+
readonly jsonBytes: number;
|
|
24
|
+
readonly mediaBytes: number;
|
|
25
|
+
readonly stagedBytesPerRestaurant: number;
|
|
26
|
+
readonly stagedFilesPerRestaurant: 20;
|
|
27
|
+
readonly openOperationsPerRestaurant: 20;
|
|
28
|
+
readonly openPreviewsPerRestaurant: 20;
|
|
29
|
+
readonly activeKeysPerFamily: 10;
|
|
30
|
+
readonly keyDefaultTtlSeconds: number;
|
|
31
|
+
readonly keyMaxTtlSeconds: number;
|
|
32
|
+
readonly pairingTtlSeconds: 600;
|
|
33
|
+
readonly pairingPollSeconds: 5;
|
|
34
|
+
readonly proposalTtlSeconds: number;
|
|
35
|
+
readonly previewTtlSeconds: number;
|
|
36
|
+
readonly stagingTtlSeconds: number;
|
|
37
|
+
readonly applyWindowSeconds: number;
|
|
38
|
+
readonly workerLeaseSeconds: 30;
|
|
39
|
+
readonly workerHeartbeatSeconds: 10;
|
|
40
|
+
readonly maxWorkerAttempts: 5;
|
|
41
|
+
readonly resultRetentionDays: 90;
|
|
42
|
+
readonly pageSize: 100;
|
|
43
|
+
}>;
|
|
44
|
+
declare const elenaAgentErrorCodeSchema: z.ZodEnum<{
|
|
45
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
46
|
+
UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
|
|
47
|
+
CREDENTIAL_REQUIRED: "CREDENTIAL_REQUIRED";
|
|
48
|
+
CREDENTIAL_INVALID: "CREDENTIAL_INVALID";
|
|
49
|
+
CREDENTIAL_EXPIRED: "CREDENTIAL_EXPIRED";
|
|
50
|
+
CREDENTIAL_REVOKED: "CREDENTIAL_REVOKED";
|
|
51
|
+
CREDENTIAL_MIXED: "CREDENTIAL_MIXED";
|
|
52
|
+
CREDENTIAL_WRONG_FAMILY: "CREDENTIAL_WRONG_FAMILY";
|
|
53
|
+
OWNER_REQUIRED: "OWNER_REQUIRED";
|
|
54
|
+
ORIGIN_REJECTED: "ORIGIN_REJECTED";
|
|
55
|
+
APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
|
|
56
|
+
APPROVAL_REJECTED: "APPROVAL_REJECTED";
|
|
57
|
+
APPROVAL_EXPIRED: "APPROVAL_EXPIRED";
|
|
58
|
+
APPROVAL_MISMATCH: "APPROVAL_MISMATCH";
|
|
59
|
+
SCOPE_REQUIRED: "SCOPE_REQUIRED";
|
|
60
|
+
MODE_READ_ONLY: "MODE_READ_ONLY";
|
|
61
|
+
API_ACCESS_DISABLED: "API_ACCESS_DISABLED";
|
|
62
|
+
RESTAURANT_NOT_APPROVED: "RESTAURANT_NOT_APPROVED";
|
|
63
|
+
NOT_FOUND: "NOT_FOUND";
|
|
64
|
+
VERSION_CONFLICT: "VERSION_CONFLICT";
|
|
65
|
+
IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
|
|
66
|
+
INVALID_PRICE: "INVALID_PRICE";
|
|
67
|
+
UNCONFIRMED_DATA: "UNCONFIRMED_DATA";
|
|
68
|
+
REFERENCE_CONFLICT: "REFERENCE_CONFLICT";
|
|
69
|
+
MEDIA_INVALID: "MEDIA_INVALID";
|
|
70
|
+
MEDIA_EXPIRED: "MEDIA_EXPIRED";
|
|
71
|
+
QUOTA_EXCEEDED: "QUOTA_EXCEEDED";
|
|
72
|
+
RATE_LIMITED: "RATE_LIMITED";
|
|
73
|
+
PAIRING_PENDING: "PAIRING_PENDING";
|
|
74
|
+
PAIRING_DENIED: "PAIRING_DENIED";
|
|
75
|
+
PAIRING_EXPIRED: "PAIRING_EXPIRED";
|
|
76
|
+
PAIRING_CONSUMED: "PAIRING_CONSUMED";
|
|
77
|
+
OPERATION_TERMINAL: "OPERATION_TERMINAL";
|
|
78
|
+
APPLY_WINDOW_EXPIRED: "APPLY_WINDOW_EXPIRED";
|
|
79
|
+
DEPENDENCY_FAILED: "DEPENDENCY_FAILED";
|
|
80
|
+
TEMPORARY_UNAVAILABLE: "TEMPORARY_UNAVAILABLE";
|
|
81
|
+
INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
82
|
+
}>;
|
|
83
|
+
declare const elenaAgentErrorSchema: z.ZodObject<{
|
|
84
|
+
version: z.ZodLiteral<"1">;
|
|
85
|
+
error: z.ZodObject<{
|
|
86
|
+
code: z.ZodEnum<{
|
|
87
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
88
|
+
UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
|
|
89
|
+
CREDENTIAL_REQUIRED: "CREDENTIAL_REQUIRED";
|
|
90
|
+
CREDENTIAL_INVALID: "CREDENTIAL_INVALID";
|
|
91
|
+
CREDENTIAL_EXPIRED: "CREDENTIAL_EXPIRED";
|
|
92
|
+
CREDENTIAL_REVOKED: "CREDENTIAL_REVOKED";
|
|
93
|
+
CREDENTIAL_MIXED: "CREDENTIAL_MIXED";
|
|
94
|
+
CREDENTIAL_WRONG_FAMILY: "CREDENTIAL_WRONG_FAMILY";
|
|
95
|
+
OWNER_REQUIRED: "OWNER_REQUIRED";
|
|
96
|
+
ORIGIN_REJECTED: "ORIGIN_REJECTED";
|
|
97
|
+
APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
|
|
98
|
+
APPROVAL_REJECTED: "APPROVAL_REJECTED";
|
|
99
|
+
APPROVAL_EXPIRED: "APPROVAL_EXPIRED";
|
|
100
|
+
APPROVAL_MISMATCH: "APPROVAL_MISMATCH";
|
|
101
|
+
SCOPE_REQUIRED: "SCOPE_REQUIRED";
|
|
102
|
+
MODE_READ_ONLY: "MODE_READ_ONLY";
|
|
103
|
+
API_ACCESS_DISABLED: "API_ACCESS_DISABLED";
|
|
104
|
+
RESTAURANT_NOT_APPROVED: "RESTAURANT_NOT_APPROVED";
|
|
105
|
+
NOT_FOUND: "NOT_FOUND";
|
|
106
|
+
VERSION_CONFLICT: "VERSION_CONFLICT";
|
|
107
|
+
IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
|
|
108
|
+
INVALID_PRICE: "INVALID_PRICE";
|
|
109
|
+
UNCONFIRMED_DATA: "UNCONFIRMED_DATA";
|
|
110
|
+
REFERENCE_CONFLICT: "REFERENCE_CONFLICT";
|
|
111
|
+
MEDIA_INVALID: "MEDIA_INVALID";
|
|
112
|
+
MEDIA_EXPIRED: "MEDIA_EXPIRED";
|
|
113
|
+
QUOTA_EXCEEDED: "QUOTA_EXCEEDED";
|
|
114
|
+
RATE_LIMITED: "RATE_LIMITED";
|
|
115
|
+
PAIRING_PENDING: "PAIRING_PENDING";
|
|
116
|
+
PAIRING_DENIED: "PAIRING_DENIED";
|
|
117
|
+
PAIRING_EXPIRED: "PAIRING_EXPIRED";
|
|
118
|
+
PAIRING_CONSUMED: "PAIRING_CONSUMED";
|
|
119
|
+
OPERATION_TERMINAL: "OPERATION_TERMINAL";
|
|
120
|
+
APPLY_WINDOW_EXPIRED: "APPLY_WINDOW_EXPIRED";
|
|
121
|
+
DEPENDENCY_FAILED: "DEPENDENCY_FAILED";
|
|
122
|
+
TEMPORARY_UNAVAILABLE: "TEMPORARY_UNAVAILABLE";
|
|
123
|
+
INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
124
|
+
}>;
|
|
125
|
+
message: z.ZodString;
|
|
126
|
+
retryable: z.ZodBoolean;
|
|
127
|
+
requestId: z.ZodString;
|
|
128
|
+
retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
130
|
+
path: z.ZodString;
|
|
131
|
+
code: z.ZodEnum<{
|
|
132
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
133
|
+
UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
|
|
134
|
+
CREDENTIAL_REQUIRED: "CREDENTIAL_REQUIRED";
|
|
135
|
+
CREDENTIAL_INVALID: "CREDENTIAL_INVALID";
|
|
136
|
+
CREDENTIAL_EXPIRED: "CREDENTIAL_EXPIRED";
|
|
137
|
+
CREDENTIAL_REVOKED: "CREDENTIAL_REVOKED";
|
|
138
|
+
CREDENTIAL_MIXED: "CREDENTIAL_MIXED";
|
|
139
|
+
CREDENTIAL_WRONG_FAMILY: "CREDENTIAL_WRONG_FAMILY";
|
|
140
|
+
OWNER_REQUIRED: "OWNER_REQUIRED";
|
|
141
|
+
ORIGIN_REJECTED: "ORIGIN_REJECTED";
|
|
142
|
+
APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
|
|
143
|
+
APPROVAL_REJECTED: "APPROVAL_REJECTED";
|
|
144
|
+
APPROVAL_EXPIRED: "APPROVAL_EXPIRED";
|
|
145
|
+
APPROVAL_MISMATCH: "APPROVAL_MISMATCH";
|
|
146
|
+
SCOPE_REQUIRED: "SCOPE_REQUIRED";
|
|
147
|
+
MODE_READ_ONLY: "MODE_READ_ONLY";
|
|
148
|
+
API_ACCESS_DISABLED: "API_ACCESS_DISABLED";
|
|
149
|
+
RESTAURANT_NOT_APPROVED: "RESTAURANT_NOT_APPROVED";
|
|
150
|
+
NOT_FOUND: "NOT_FOUND";
|
|
151
|
+
VERSION_CONFLICT: "VERSION_CONFLICT";
|
|
152
|
+
IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
|
|
153
|
+
INVALID_PRICE: "INVALID_PRICE";
|
|
154
|
+
UNCONFIRMED_DATA: "UNCONFIRMED_DATA";
|
|
155
|
+
REFERENCE_CONFLICT: "REFERENCE_CONFLICT";
|
|
156
|
+
MEDIA_INVALID: "MEDIA_INVALID";
|
|
157
|
+
MEDIA_EXPIRED: "MEDIA_EXPIRED";
|
|
158
|
+
QUOTA_EXCEEDED: "QUOTA_EXCEEDED";
|
|
159
|
+
RATE_LIMITED: "RATE_LIMITED";
|
|
160
|
+
PAIRING_PENDING: "PAIRING_PENDING";
|
|
161
|
+
PAIRING_DENIED: "PAIRING_DENIED";
|
|
162
|
+
PAIRING_EXPIRED: "PAIRING_EXPIRED";
|
|
163
|
+
PAIRING_CONSUMED: "PAIRING_CONSUMED";
|
|
164
|
+
OPERATION_TERMINAL: "OPERATION_TERMINAL";
|
|
165
|
+
APPLY_WINDOW_EXPIRED: "APPLY_WINDOW_EXPIRED";
|
|
166
|
+
DEPENDENCY_FAILED: "DEPENDENCY_FAILED";
|
|
167
|
+
TEMPORARY_UNAVAILABLE: "TEMPORARY_UNAVAILABLE";
|
|
168
|
+
INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
169
|
+
}>;
|
|
170
|
+
message: z.ZodString;
|
|
171
|
+
}, z.core.$strict>>>;
|
|
172
|
+
}, z.core.$strict>;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
declare const elenaAgentPageQuerySchema: z.ZodObject<{
|
|
175
|
+
version: z.ZodLiteral<"1">;
|
|
176
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
177
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
178
|
+
}, z.core.$strict>;
|
|
179
|
+
declare const elenaAgentEmptyRequestSchema: z.ZodObject<{
|
|
180
|
+
version: z.ZodLiteral<"1">;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
declare const elenaAgentAckSchema: z.ZodObject<{
|
|
183
|
+
version: z.ZodLiteral<"1">;
|
|
184
|
+
ok: z.ZodLiteral<true>;
|
|
185
|
+
}, z.core.$strict>;
|
|
186
|
+
type ElenaAgentErrorCodeV1 = z.infer<typeof elenaAgentErrorCodeSchema>;
|
|
187
|
+
type ElenaAgentErrorV1 = z.infer<typeof elenaAgentErrorSchema>;
|
|
188
|
+
type ElenaAgentPageQueryV1 = z.infer<typeof elenaAgentPageQuerySchema>;
|
|
189
|
+
|
|
190
|
+
declare const ELENA_AGENT_TRANSPORT: Readonly<{
|
|
191
|
+
readonly agentPrefix: "elena_sk_";
|
|
192
|
+
readonly agentHeader: "x-elena-agent-key";
|
|
193
|
+
readonly agentPath: "/api/v1/agent";
|
|
194
|
+
readonly clientPrefix: "elena_pk_";
|
|
195
|
+
readonly clientHeader: "x-elena-client-key";
|
|
196
|
+
readonly clientPath: "/api/v1/public/sdk";
|
|
197
|
+
readonly ownerPath: "/api/v1/agent-access";
|
|
198
|
+
}>;
|
|
199
|
+
declare const elenaAgentSecretSchema: z.ZodString;
|
|
200
|
+
declare const elenaManualClientKeySchema: z.ZodString;
|
|
201
|
+
declare const elenaManagedClientKeySchema: z.ZodString;
|
|
202
|
+
declare const elenaClientKeySchema: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
203
|
+
declare const elenaAgentDeviceCodeSchema: z.ZodString;
|
|
204
|
+
declare const elenaAgentUserCodeSchema: z.ZodString;
|
|
205
|
+
declare const elenaAgentModeSchema: z.ZodEnum<{
|
|
206
|
+
read: "read";
|
|
207
|
+
mutate: "mutate";
|
|
208
|
+
}>;
|
|
209
|
+
declare const elenaAgentScopeSchema: z.ZodEnum<{
|
|
210
|
+
"catalog:read": "catalog:read";
|
|
211
|
+
"catalog:write": "catalog:write";
|
|
212
|
+
"catalog:publish": "catalog:publish";
|
|
213
|
+
"assets:read": "assets:read";
|
|
214
|
+
"assets:write": "assets:write";
|
|
215
|
+
}>;
|
|
216
|
+
declare const elenaAgentScopesSchema: z.ZodArray<z.ZodEnum<{
|
|
217
|
+
"catalog:read": "catalog:read";
|
|
218
|
+
"catalog:write": "catalog:write";
|
|
219
|
+
"catalog:publish": "catalog:publish";
|
|
220
|
+
"assets:read": "assets:read";
|
|
221
|
+
"assets:write": "assets:write";
|
|
222
|
+
}>>;
|
|
223
|
+
declare const elenaAgentActionSchema: z.ZodEnum<{
|
|
224
|
+
"context.read": "context.read";
|
|
225
|
+
"catalog.read": "catalog.read";
|
|
226
|
+
"assets.read": "assets.read";
|
|
227
|
+
"assets.stage": "assets.stage";
|
|
228
|
+
"operations.read": "operations.read";
|
|
229
|
+
"operations.propose": "operations.propose";
|
|
230
|
+
"operations.apply": "operations.apply";
|
|
231
|
+
"catalog.publish": "catalog.publish";
|
|
232
|
+
}>;
|
|
233
|
+
declare const elenaAgentRestaurantSchema: z.ZodObject<{
|
|
234
|
+
id: z.ZodUUID;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
slug: z.ZodString;
|
|
237
|
+
currency: z.ZodLiteral<"PEN">;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
declare const elenaAgentKeyCreateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
240
|
+
version: z.ZodLiteral<"1">;
|
|
241
|
+
kind: z.ZodLiteral<"agent">;
|
|
242
|
+
label: z.ZodString;
|
|
243
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
244
|
+
read: "read";
|
|
245
|
+
mutate: "mutate";
|
|
246
|
+
}>>;
|
|
247
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
248
|
+
"catalog:read": "catalog:read";
|
|
249
|
+
"catalog:write": "catalog:write";
|
|
250
|
+
"catalog:publish": "catalog:publish";
|
|
251
|
+
"assets:read": "assets:read";
|
|
252
|
+
"assets:write": "assets:write";
|
|
253
|
+
}>>>;
|
|
254
|
+
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
255
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
256
|
+
version: z.ZodLiteral<"1">;
|
|
257
|
+
kind: z.ZodLiteral<"client">;
|
|
258
|
+
label: z.ZodString;
|
|
259
|
+
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strict>], "kind">;
|
|
261
|
+
declare const elenaAgentKeyPolicyRequestSchema: z.ZodObject<{
|
|
262
|
+
version: z.ZodLiteral<"1">;
|
|
263
|
+
expectedRevision: z.ZodNumber;
|
|
264
|
+
mode: z.ZodEnum<{
|
|
265
|
+
read: "read";
|
|
266
|
+
mutate: "mutate";
|
|
267
|
+
}>;
|
|
268
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
269
|
+
"catalog:read": "catalog:read";
|
|
270
|
+
"catalog:write": "catalog:write";
|
|
271
|
+
"catalog:publish": "catalog:publish";
|
|
272
|
+
"assets:read": "assets:read";
|
|
273
|
+
"assets:write": "assets:write";
|
|
274
|
+
}>>;
|
|
275
|
+
}, z.core.$strict>;
|
|
276
|
+
declare const elenaAgentKeyRevokeRequestSchema: z.ZodObject<{
|
|
277
|
+
version: z.ZodLiteral<"1">;
|
|
278
|
+
expectedRevision: z.ZodNumber;
|
|
279
|
+
}, z.core.$strict>;
|
|
280
|
+
declare const elenaAgentKeyReplaceRequestSchema: z.ZodObject<{
|
|
281
|
+
version: z.ZodLiteral<"1">;
|
|
282
|
+
expectedRevision: z.ZodNumber;
|
|
283
|
+
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
284
|
+
}, z.core.$strict>;
|
|
285
|
+
declare const elenaAgentKeyMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
286
|
+
kind: z.ZodLiteral<"agent">;
|
|
287
|
+
mode: z.ZodEnum<{
|
|
288
|
+
read: "read";
|
|
289
|
+
mutate: "mutate";
|
|
290
|
+
}>;
|
|
291
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
292
|
+
"catalog:read": "catalog:read";
|
|
293
|
+
"catalog:write": "catalog:write";
|
|
294
|
+
"catalog:publish": "catalog:publish";
|
|
295
|
+
"assets:read": "assets:read";
|
|
296
|
+
"assets:write": "assets:write";
|
|
297
|
+
}>>;
|
|
298
|
+
id: z.ZodUUID;
|
|
299
|
+
label: z.ZodString;
|
|
300
|
+
displaySuffix: z.ZodString;
|
|
301
|
+
revision: z.ZodNumber;
|
|
302
|
+
status: z.ZodEnum<{
|
|
303
|
+
active: "active";
|
|
304
|
+
revoked: "revoked";
|
|
305
|
+
expired: "expired";
|
|
306
|
+
}>;
|
|
307
|
+
createdAt: z.ZodISODateTime;
|
|
308
|
+
expiresAt: z.ZodISODateTime;
|
|
309
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
310
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
311
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
312
|
+
kind: z.ZodLiteral<"client">;
|
|
313
|
+
id: z.ZodUUID;
|
|
314
|
+
label: z.ZodString;
|
|
315
|
+
displaySuffix: z.ZodString;
|
|
316
|
+
revision: z.ZodNumber;
|
|
317
|
+
status: z.ZodEnum<{
|
|
318
|
+
active: "active";
|
|
319
|
+
revoked: "revoked";
|
|
320
|
+
expired: "expired";
|
|
321
|
+
}>;
|
|
322
|
+
createdAt: z.ZodISODateTime;
|
|
323
|
+
expiresAt: z.ZodISODateTime;
|
|
324
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
325
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
326
|
+
}, z.core.$strict>], "kind">;
|
|
327
|
+
declare const elenaAgentKeyListSchema: z.ZodObject<{
|
|
328
|
+
version: z.ZodLiteral<"1">;
|
|
329
|
+
keys: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
330
|
+
kind: z.ZodLiteral<"agent">;
|
|
331
|
+
mode: z.ZodEnum<{
|
|
332
|
+
read: "read";
|
|
333
|
+
mutate: "mutate";
|
|
334
|
+
}>;
|
|
335
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
336
|
+
"catalog:read": "catalog:read";
|
|
337
|
+
"catalog:write": "catalog:write";
|
|
338
|
+
"catalog:publish": "catalog:publish";
|
|
339
|
+
"assets:read": "assets:read";
|
|
340
|
+
"assets:write": "assets:write";
|
|
341
|
+
}>>;
|
|
342
|
+
id: z.ZodUUID;
|
|
343
|
+
label: z.ZodString;
|
|
344
|
+
displaySuffix: z.ZodString;
|
|
345
|
+
revision: z.ZodNumber;
|
|
346
|
+
status: z.ZodEnum<{
|
|
347
|
+
active: "active";
|
|
348
|
+
revoked: "revoked";
|
|
349
|
+
expired: "expired";
|
|
350
|
+
}>;
|
|
351
|
+
createdAt: z.ZodISODateTime;
|
|
352
|
+
expiresAt: z.ZodISODateTime;
|
|
353
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
354
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
355
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
356
|
+
kind: z.ZodLiteral<"client">;
|
|
357
|
+
id: z.ZodUUID;
|
|
358
|
+
label: z.ZodString;
|
|
359
|
+
displaySuffix: z.ZodString;
|
|
360
|
+
revision: z.ZodNumber;
|
|
361
|
+
status: z.ZodEnum<{
|
|
362
|
+
active: "active";
|
|
363
|
+
revoked: "revoked";
|
|
364
|
+
expired: "expired";
|
|
365
|
+
}>;
|
|
366
|
+
createdAt: z.ZodISODateTime;
|
|
367
|
+
expiresAt: z.ZodISODateTime;
|
|
368
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
369
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
370
|
+
}, z.core.$strict>], "kind">>;
|
|
371
|
+
}, z.core.$strict>;
|
|
372
|
+
declare const elenaAgentKeyReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
373
|
+
version: z.ZodLiteral<"1">;
|
|
374
|
+
kind: z.ZodLiteral<"agent">;
|
|
375
|
+
key: z.ZodObject<{
|
|
376
|
+
kind: z.ZodLiteral<"agent">;
|
|
377
|
+
mode: z.ZodEnum<{
|
|
378
|
+
read: "read";
|
|
379
|
+
mutate: "mutate";
|
|
380
|
+
}>;
|
|
381
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
382
|
+
"catalog:read": "catalog:read";
|
|
383
|
+
"catalog:write": "catalog:write";
|
|
384
|
+
"catalog:publish": "catalog:publish";
|
|
385
|
+
"assets:read": "assets:read";
|
|
386
|
+
"assets:write": "assets:write";
|
|
387
|
+
}>>;
|
|
388
|
+
id: z.ZodUUID;
|
|
389
|
+
label: z.ZodString;
|
|
390
|
+
displaySuffix: z.ZodString;
|
|
391
|
+
revision: z.ZodNumber;
|
|
392
|
+
status: z.ZodEnum<{
|
|
393
|
+
active: "active";
|
|
394
|
+
revoked: "revoked";
|
|
395
|
+
expired: "expired";
|
|
396
|
+
}>;
|
|
397
|
+
createdAt: z.ZodISODateTime;
|
|
398
|
+
expiresAt: z.ZodISODateTime;
|
|
399
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
400
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
401
|
+
}, z.core.$strict>;
|
|
402
|
+
secret: z.ZodString;
|
|
403
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
404
|
+
version: z.ZodLiteral<"1">;
|
|
405
|
+
kind: z.ZodLiteral<"client">;
|
|
406
|
+
key: z.ZodObject<{
|
|
407
|
+
kind: z.ZodLiteral<"client">;
|
|
408
|
+
id: z.ZodUUID;
|
|
409
|
+
label: z.ZodString;
|
|
410
|
+
displaySuffix: z.ZodString;
|
|
411
|
+
revision: z.ZodNumber;
|
|
412
|
+
status: z.ZodEnum<{
|
|
413
|
+
active: "active";
|
|
414
|
+
revoked: "revoked";
|
|
415
|
+
expired: "expired";
|
|
416
|
+
}>;
|
|
417
|
+
createdAt: z.ZodISODateTime;
|
|
418
|
+
expiresAt: z.ZodISODateTime;
|
|
419
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
420
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
421
|
+
}, z.core.$strict>;
|
|
422
|
+
clientKey: z.ZodString;
|
|
423
|
+
}, z.core.$strict>], "kind">;
|
|
424
|
+
declare const elenaAgentKeyResponseSchema: z.ZodObject<{
|
|
425
|
+
version: z.ZodLiteral<"1">;
|
|
426
|
+
key: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
427
|
+
kind: z.ZodLiteral<"agent">;
|
|
428
|
+
mode: z.ZodEnum<{
|
|
429
|
+
read: "read";
|
|
430
|
+
mutate: "mutate";
|
|
431
|
+
}>;
|
|
432
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
433
|
+
"catalog:read": "catalog:read";
|
|
434
|
+
"catalog:write": "catalog:write";
|
|
435
|
+
"catalog:publish": "catalog:publish";
|
|
436
|
+
"assets:read": "assets:read";
|
|
437
|
+
"assets:write": "assets:write";
|
|
438
|
+
}>>;
|
|
439
|
+
id: z.ZodUUID;
|
|
440
|
+
label: z.ZodString;
|
|
441
|
+
displaySuffix: z.ZodString;
|
|
442
|
+
revision: z.ZodNumber;
|
|
443
|
+
status: z.ZodEnum<{
|
|
444
|
+
active: "active";
|
|
445
|
+
revoked: "revoked";
|
|
446
|
+
expired: "expired";
|
|
447
|
+
}>;
|
|
448
|
+
createdAt: z.ZodISODateTime;
|
|
449
|
+
expiresAt: z.ZodISODateTime;
|
|
450
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
451
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
452
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
453
|
+
kind: z.ZodLiteral<"client">;
|
|
454
|
+
id: z.ZodUUID;
|
|
455
|
+
label: z.ZodString;
|
|
456
|
+
displaySuffix: z.ZodString;
|
|
457
|
+
revision: z.ZodNumber;
|
|
458
|
+
status: z.ZodEnum<{
|
|
459
|
+
active: "active";
|
|
460
|
+
revoked: "revoked";
|
|
461
|
+
expired: "expired";
|
|
462
|
+
}>;
|
|
463
|
+
createdAt: z.ZodISODateTime;
|
|
464
|
+
expiresAt: z.ZodISODateTime;
|
|
465
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
466
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
467
|
+
}, z.core.$strict>], "kind">;
|
|
468
|
+
}, z.core.$strict>;
|
|
469
|
+
declare const elenaAgentHttpsUrlSchema: z.ZodURL;
|
|
470
|
+
declare const elenaAgentConnectionUrlSchema: z.ZodURL;
|
|
471
|
+
declare const elenaAgentBaseUrlSchema: z.ZodURL;
|
|
472
|
+
declare const elenaAgentConnectionOriginSchema: z.ZodURL;
|
|
473
|
+
declare const elenaAgentPairingStartRequestSchema: z.ZodObject<{
|
|
474
|
+
version: z.ZodLiteral<"1">;
|
|
475
|
+
label: z.ZodString;
|
|
476
|
+
}, z.core.$strict>;
|
|
477
|
+
declare const elenaAgentPairingStartResponseSchema: z.ZodObject<{
|
|
478
|
+
version: z.ZodLiteral<"1">;
|
|
479
|
+
pairingId: z.ZodUUID;
|
|
480
|
+
deviceCode: z.ZodString;
|
|
481
|
+
userCode: z.ZodString;
|
|
482
|
+
verificationUrl: z.ZodURL;
|
|
483
|
+
expiresAt: z.ZodISODateTime;
|
|
484
|
+
intervalSeconds: z.ZodLiteral<5>;
|
|
485
|
+
}, z.core.$strict>;
|
|
486
|
+
declare const elenaAgentPairingPollRequestSchema: z.ZodObject<{
|
|
487
|
+
version: z.ZodLiteral<"1">;
|
|
488
|
+
deviceCode: z.ZodString;
|
|
489
|
+
}, z.core.$strict>;
|
|
490
|
+
declare const elenaAgentPairingReviewSchema: z.ZodObject<{
|
|
491
|
+
version: z.ZodLiteral<"1">;
|
|
492
|
+
label: z.ZodString;
|
|
493
|
+
userCode: z.ZodString;
|
|
494
|
+
state: z.ZodEnum<{
|
|
495
|
+
approved: "approved";
|
|
496
|
+
pending: "pending";
|
|
497
|
+
rejected: "rejected";
|
|
498
|
+
expired: "expired";
|
|
499
|
+
consumed: "consumed";
|
|
500
|
+
}>;
|
|
501
|
+
expiresAt: z.ZodISODateTime;
|
|
502
|
+
}, z.core.$strict>;
|
|
503
|
+
declare const elenaAgentPairingDecisionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
504
|
+
version: z.ZodLiteral<"1">;
|
|
505
|
+
userCode: z.ZodString;
|
|
506
|
+
decision: z.ZodLiteral<"approve">;
|
|
507
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
508
|
+
read: "read";
|
|
509
|
+
mutate: "mutate";
|
|
510
|
+
}>>;
|
|
511
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
512
|
+
"catalog:read": "catalog:read";
|
|
513
|
+
"catalog:write": "catalog:write";
|
|
514
|
+
"catalog:publish": "catalog:publish";
|
|
515
|
+
"assets:read": "assets:read";
|
|
516
|
+
"assets:write": "assets:write";
|
|
517
|
+
}>>>;
|
|
518
|
+
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
519
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
520
|
+
version: z.ZodLiteral<"1">;
|
|
521
|
+
userCode: z.ZodString;
|
|
522
|
+
decision: z.ZodLiteral<"reject">;
|
|
523
|
+
}, z.core.$strict>], "decision">;
|
|
524
|
+
declare const elenaAgentPairingPollResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
525
|
+
version: z.ZodLiteral<"1">;
|
|
526
|
+
status: z.ZodLiteral<"pending">;
|
|
527
|
+
expiresAt: z.ZodISODateTime;
|
|
528
|
+
intervalSeconds: z.ZodLiteral<5>;
|
|
529
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
530
|
+
version: z.ZodLiteral<"1">;
|
|
531
|
+
status: z.ZodLiteral<"delivered">;
|
|
532
|
+
restaurant: z.ZodObject<{
|
|
533
|
+
id: z.ZodUUID;
|
|
534
|
+
name: z.ZodString;
|
|
535
|
+
slug: z.ZodString;
|
|
536
|
+
currency: z.ZodLiteral<"PEN">;
|
|
537
|
+
}, z.core.$strict>;
|
|
538
|
+
credential: z.ZodObject<{
|
|
539
|
+
version: z.ZodLiteral<"1">;
|
|
540
|
+
kind: z.ZodLiteral<"agent">;
|
|
541
|
+
key: z.ZodObject<{
|
|
542
|
+
kind: z.ZodLiteral<"agent">;
|
|
543
|
+
mode: z.ZodEnum<{
|
|
544
|
+
read: "read";
|
|
545
|
+
mutate: "mutate";
|
|
546
|
+
}>;
|
|
547
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
548
|
+
"catalog:read": "catalog:read";
|
|
549
|
+
"catalog:write": "catalog:write";
|
|
550
|
+
"catalog:publish": "catalog:publish";
|
|
551
|
+
"assets:read": "assets:read";
|
|
552
|
+
"assets:write": "assets:write";
|
|
553
|
+
}>>;
|
|
554
|
+
id: z.ZodUUID;
|
|
555
|
+
label: z.ZodString;
|
|
556
|
+
displaySuffix: z.ZodString;
|
|
557
|
+
revision: z.ZodNumber;
|
|
558
|
+
status: z.ZodEnum<{
|
|
559
|
+
active: "active";
|
|
560
|
+
revoked: "revoked";
|
|
561
|
+
expired: "expired";
|
|
562
|
+
}>;
|
|
563
|
+
createdAt: z.ZodISODateTime;
|
|
564
|
+
expiresAt: z.ZodISODateTime;
|
|
565
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
566
|
+
lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
567
|
+
}, z.core.$strict>;
|
|
568
|
+
secret: z.ZodString;
|
|
569
|
+
}, z.core.$strict>;
|
|
570
|
+
}, z.core.$strict>], "status">;
|
|
571
|
+
declare const elenaAgentContextSchema: z.ZodObject<{
|
|
572
|
+
version: z.ZodLiteral<"1">;
|
|
573
|
+
restaurant: z.ZodObject<{
|
|
574
|
+
id: z.ZodUUID;
|
|
575
|
+
name: z.ZodString;
|
|
576
|
+
slug: z.ZodString;
|
|
577
|
+
currency: z.ZodLiteral<"PEN">;
|
|
578
|
+
}, z.core.$strict>;
|
|
579
|
+
principal: z.ZodObject<{
|
|
580
|
+
kind: z.ZodLiteral<"agent">;
|
|
581
|
+
credentialId: z.ZodUUID;
|
|
582
|
+
credentialRevision: z.ZodNumber;
|
|
583
|
+
mode: z.ZodEnum<{
|
|
584
|
+
read: "read";
|
|
585
|
+
mutate: "mutate";
|
|
586
|
+
}>;
|
|
587
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
588
|
+
"catalog:read": "catalog:read";
|
|
589
|
+
"catalog:write": "catalog:write";
|
|
590
|
+
"catalog:publish": "catalog:publish";
|
|
591
|
+
"assets:read": "assets:read";
|
|
592
|
+
"assets:write": "assets:write";
|
|
593
|
+
}>>;
|
|
594
|
+
expiresAt: z.ZodISODateTime;
|
|
595
|
+
}, z.core.$strict>;
|
|
596
|
+
capabilities: z.ZodObject<{
|
|
597
|
+
apiAccess: z.ZodLiteral<true>;
|
|
598
|
+
menu: z.ZodLiteral<true>;
|
|
599
|
+
imports: z.ZodBoolean;
|
|
600
|
+
media: z.ZodBoolean;
|
|
601
|
+
publication: z.ZodBoolean;
|
|
602
|
+
}, z.core.$strict>;
|
|
603
|
+
actions: z.ZodArray<z.ZodEnum<{
|
|
604
|
+
"context.read": "context.read";
|
|
605
|
+
"catalog.read": "catalog.read";
|
|
606
|
+
"assets.read": "assets.read";
|
|
607
|
+
"assets.stage": "assets.stage";
|
|
608
|
+
"operations.read": "operations.read";
|
|
609
|
+
"operations.propose": "operations.propose";
|
|
610
|
+
"operations.apply": "operations.apply";
|
|
611
|
+
"catalog.publish": "catalog.publish";
|
|
612
|
+
}>>;
|
|
613
|
+
}, z.core.$strict>;
|
|
614
|
+
declare const elenaClientContextSchema: z.ZodObject<{
|
|
615
|
+
version: z.ZodLiteral<"1">;
|
|
616
|
+
restaurant: z.ZodObject<{
|
|
617
|
+
id: z.ZodUUID;
|
|
618
|
+
name: z.ZodString;
|
|
619
|
+
slug: z.ZodString;
|
|
620
|
+
currency: z.ZodLiteral<"PEN">;
|
|
621
|
+
}, z.core.$strict>;
|
|
622
|
+
capabilities: z.ZodObject<{
|
|
623
|
+
menu: z.ZodLiteral<true>;
|
|
624
|
+
assets: z.ZodLiteral<true>;
|
|
625
|
+
}, z.core.$strict>;
|
|
626
|
+
}, z.core.$strict>;
|
|
627
|
+
declare const elenaAgentCliAuthStatusSchema: z.ZodObject<{
|
|
628
|
+
version: z.ZodLiteral<"1">;
|
|
629
|
+
authenticated: z.ZodBoolean;
|
|
630
|
+
source: z.ZodEnum<{
|
|
631
|
+
store: "store";
|
|
632
|
+
environment: "environment";
|
|
633
|
+
none: "none";
|
|
634
|
+
}>;
|
|
635
|
+
baseUrl: z.ZodNullable<z.ZodURL>;
|
|
636
|
+
credentialId: z.ZodNullable<z.ZodUUID>;
|
|
637
|
+
restaurantId: z.ZodNullable<z.ZodUUID>;
|
|
638
|
+
expiresAt: z.ZodNullable<z.ZodISODateTime>;
|
|
639
|
+
}, z.core.$strict>;
|
|
640
|
+
declare const elenaAgentCliLogoutSchema: z.ZodObject<{
|
|
641
|
+
version: z.ZodLiteral<"1">;
|
|
642
|
+
loggedOut: z.ZodLiteral<true>;
|
|
643
|
+
remoteRevoked: z.ZodLiteral<false>;
|
|
644
|
+
environmentCredentialPresent: z.ZodBoolean;
|
|
645
|
+
}, z.core.$strict>;
|
|
646
|
+
type ElenaAgentScopeV1 = z.infer<typeof elenaAgentScopeSchema>;
|
|
647
|
+
type ElenaAgentActionV1 = z.infer<typeof elenaAgentActionSchema>;
|
|
648
|
+
type ElenaAgentKeyCreateRequestV1 = z.infer<typeof elenaAgentKeyCreateRequestSchema>;
|
|
649
|
+
type ElenaAgentKeyPolicyRequestV1 = z.infer<typeof elenaAgentKeyPolicyRequestSchema>;
|
|
650
|
+
type ElenaAgentKeyMetadataV1 = z.infer<typeof elenaAgentKeyMetadataSchema>;
|
|
651
|
+
type ElenaAgentKeyReceiptV1 = z.infer<typeof elenaAgentKeyReceiptSchema>;
|
|
652
|
+
type ElenaAgentPairingStartRequestV1 = z.infer<typeof elenaAgentPairingStartRequestSchema>;
|
|
653
|
+
type ElenaAgentPairingStartResponseV1 = z.infer<typeof elenaAgentPairingStartResponseSchema>;
|
|
654
|
+
type ElenaAgentPairingPollRequestV1 = z.infer<typeof elenaAgentPairingPollRequestSchema>;
|
|
655
|
+
type ElenaAgentPairingPollResponseV1 = z.infer<typeof elenaAgentPairingPollResponseSchema>;
|
|
656
|
+
type ElenaAgentPairingDecisionRequestV1 = z.infer<typeof elenaAgentPairingDecisionRequestSchema>;
|
|
657
|
+
type ElenaAgentContextV1 = z.infer<typeof elenaAgentContextSchema>;
|
|
658
|
+
type ElenaClientContextV1 = z.infer<typeof elenaClientContextSchema>;
|
|
659
|
+
type ElenaAgentPairingReviewV1 = z.infer<typeof elenaAgentPairingReviewSchema>;
|
|
660
|
+
type ElenaAgentKeyRevokeRequestV1 = z.infer<typeof elenaAgentKeyRevokeRequestSchema>;
|
|
661
|
+
type ElenaAgentKeyReplaceRequestV1 = z.infer<typeof elenaAgentKeyReplaceRequestSchema>;
|
|
662
|
+
type ElenaAgentKeyResponseV1 = z.infer<typeof elenaAgentKeyResponseSchema>;
|
|
663
|
+
type ElenaAgentKeyListV1 = z.infer<typeof elenaAgentKeyListSchema>;
|
|
664
|
+
type ElenaAgentCliAuthStatusV1 = z.infer<typeof elenaAgentCliAuthStatusSchema>;
|
|
665
|
+
type ElenaAgentCliLogoutV1 = z.infer<typeof elenaAgentCliLogoutSchema>;
|
|
666
|
+
|
|
667
|
+
declare const elenaAgentExistingTargetSchema: z.ZodObject<{
|
|
668
|
+
kind: z.ZodLiteral<"id">;
|
|
669
|
+
id: z.ZodUUID;
|
|
670
|
+
expectedVersion: z.ZodNumber;
|
|
671
|
+
}, z.core.$strict>;
|
|
672
|
+
declare const elenaAgentExternalTargetSchema: z.ZodObject<{
|
|
673
|
+
kind: z.ZodLiteral<"external">;
|
|
674
|
+
namespace: z.ZodString;
|
|
675
|
+
key: z.ZodString;
|
|
676
|
+
expectedVersion: z.ZodNullable<z.ZodNumber>;
|
|
677
|
+
}, z.core.$strict>;
|
|
678
|
+
declare const elenaAgentTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
679
|
+
kind: z.ZodLiteral<"id">;
|
|
680
|
+
id: z.ZodUUID;
|
|
681
|
+
expectedVersion: z.ZodNumber;
|
|
682
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
683
|
+
kind: z.ZodLiteral<"external">;
|
|
684
|
+
namespace: z.ZodString;
|
|
685
|
+
key: z.ZodString;
|
|
686
|
+
expectedVersion: z.ZodNullable<z.ZodNumber>;
|
|
687
|
+
}, z.core.$strict>], "kind">;
|
|
688
|
+
declare const elenaAgentCategoryReferenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
689
|
+
kind: z.ZodLiteral<"id">;
|
|
690
|
+
id: z.ZodUUID;
|
|
691
|
+
expectedVersion: z.ZodNumber;
|
|
692
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
693
|
+
kind: z.ZodLiteral<"ref">;
|
|
694
|
+
ref: z.ZodString;
|
|
695
|
+
}, z.core.$strict>], "kind">;
|
|
696
|
+
declare const elenaAgentDescriptionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
697
|
+
status: z.ZodLiteral<"transcribed">;
|
|
698
|
+
text: z.ZodString;
|
|
699
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
700
|
+
status: z.ZodLiteral<"proposed">;
|
|
701
|
+
text: z.ZodString;
|
|
702
|
+
}, z.core.$strict>], "status">;
|
|
703
|
+
declare const elenaAgentConfirmedPriceSchema: z.ZodObject<{
|
|
704
|
+
status: z.ZodLiteral<"confirmed">;
|
|
705
|
+
amount: z.ZodString;
|
|
706
|
+
basis: z.ZodLiteral<"operator">;
|
|
707
|
+
}, z.core.$strict>;
|
|
708
|
+
declare const elenaAgentDraftPriceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
709
|
+
status: z.ZodLiteral<"confirmed">;
|
|
710
|
+
amount: z.ZodString;
|
|
711
|
+
basis: z.ZodLiteral<"operator">;
|
|
712
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
713
|
+
status: z.ZodLiteral<"unconfirmed">;
|
|
714
|
+
reason: z.ZodEnum<{
|
|
715
|
+
missing: "missing";
|
|
716
|
+
illegible: "illegible";
|
|
717
|
+
}>;
|
|
718
|
+
rawText: z.ZodNullable<z.ZodString>;
|
|
719
|
+
}, z.core.$strict>], "status">;
|
|
720
|
+
declare const elenaAgentMediaReferenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
721
|
+
kind: z.ZodLiteral<"existing">;
|
|
722
|
+
assetId: z.ZodUUID;
|
|
723
|
+
sha256: z.ZodString;
|
|
724
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
725
|
+
kind: z.ZodLiteral<"staged">;
|
|
726
|
+
stagingId: z.ZodUUID;
|
|
727
|
+
sha256: z.ZodString;
|
|
728
|
+
}, z.core.$strict>], "kind">;
|
|
729
|
+
declare const elenaAgentGallerySchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
730
|
+
kind: z.ZodLiteral<"existing">;
|
|
731
|
+
assetId: z.ZodUUID;
|
|
732
|
+
sha256: z.ZodString;
|
|
733
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
734
|
+
kind: z.ZodLiteral<"staged">;
|
|
735
|
+
stagingId: z.ZodUUID;
|
|
736
|
+
sha256: z.ZodString;
|
|
737
|
+
}, z.core.$strict>], "kind">>;
|
|
738
|
+
declare const elenaAgentExtraOptionSchema: z.ZodObject<{
|
|
739
|
+
name: z.ZodString;
|
|
740
|
+
additionalPrice: z.ZodString;
|
|
741
|
+
order: z.ZodNumber;
|
|
742
|
+
}, z.core.$strict>;
|
|
743
|
+
declare const elenaAgentExtraGroupSchema: z.ZodObject<{
|
|
744
|
+
name: z.ZodString;
|
|
745
|
+
required: z.ZodBoolean;
|
|
746
|
+
minSelections: z.ZodNumber;
|
|
747
|
+
maxSelections: z.ZodNumber;
|
|
748
|
+
order: z.ZodNumber;
|
|
749
|
+
options: z.ZodArray<z.ZodObject<{
|
|
750
|
+
name: z.ZodString;
|
|
751
|
+
additionalPrice: z.ZodString;
|
|
752
|
+
order: z.ZodNumber;
|
|
753
|
+
}, z.core.$strict>>;
|
|
754
|
+
}, z.core.$strict>;
|
|
755
|
+
declare const elenaAgentExtrasSchema: z.ZodObject<{
|
|
756
|
+
confirmed: z.ZodLiteral<true>;
|
|
757
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
758
|
+
name: z.ZodString;
|
|
759
|
+
required: z.ZodBoolean;
|
|
760
|
+
minSelections: z.ZodNumber;
|
|
761
|
+
maxSelections: z.ZodNumber;
|
|
762
|
+
order: z.ZodNumber;
|
|
763
|
+
options: z.ZodArray<z.ZodObject<{
|
|
764
|
+
name: z.ZodString;
|
|
765
|
+
additionalPrice: z.ZodString;
|
|
766
|
+
order: z.ZodNumber;
|
|
767
|
+
}, z.core.$strict>>;
|
|
768
|
+
}, z.core.$strict>>;
|
|
769
|
+
}, z.core.$strict>;
|
|
770
|
+
declare const elenaAgentCategoryDataSchema: z.ZodObject<{
|
|
771
|
+
name: z.ZodString;
|
|
772
|
+
description: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
773
|
+
status: z.ZodLiteral<"transcribed">;
|
|
774
|
+
text: z.ZodString;
|
|
775
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
776
|
+
status: z.ZodLiteral<"proposed">;
|
|
777
|
+
text: z.ZodString;
|
|
778
|
+
}, z.core.$strict>], "status">>;
|
|
779
|
+
order: z.ZodNumber;
|
|
780
|
+
}, z.core.$strict>;
|
|
781
|
+
declare const elenaAgentProductDataSchema: z.ZodObject<{
|
|
782
|
+
price: z.ZodObject<{
|
|
783
|
+
status: z.ZodLiteral<"confirmed">;
|
|
784
|
+
amount: z.ZodString;
|
|
785
|
+
basis: z.ZodLiteral<"operator">;
|
|
786
|
+
}, z.core.$strict>;
|
|
787
|
+
type: z.ZodLiteral<"menu">;
|
|
788
|
+
name: z.ZodString;
|
|
789
|
+
description: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
790
|
+
status: z.ZodLiteral<"transcribed">;
|
|
791
|
+
text: z.ZodString;
|
|
792
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
793
|
+
status: z.ZodLiteral<"proposed">;
|
|
794
|
+
text: z.ZodString;
|
|
795
|
+
}, z.core.$strict>], "status">>;
|
|
796
|
+
category: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
797
|
+
kind: z.ZodLiteral<"id">;
|
|
798
|
+
id: z.ZodUUID;
|
|
799
|
+
expectedVersion: z.ZodNumber;
|
|
800
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
801
|
+
kind: z.ZodLiteral<"ref">;
|
|
802
|
+
ref: z.ZodString;
|
|
803
|
+
}, z.core.$strict>], "kind">;
|
|
804
|
+
available: z.ZodBoolean;
|
|
805
|
+
images: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
806
|
+
kind: z.ZodLiteral<"existing">;
|
|
807
|
+
assetId: z.ZodUUID;
|
|
808
|
+
sha256: z.ZodString;
|
|
809
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
810
|
+
kind: z.ZodLiteral<"staged">;
|
|
811
|
+
stagingId: z.ZodUUID;
|
|
812
|
+
sha256: z.ZodString;
|
|
813
|
+
}, z.core.$strict>], "kind">>;
|
|
814
|
+
extras: z.ZodObject<{
|
|
815
|
+
confirmed: z.ZodLiteral<true>;
|
|
816
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
817
|
+
name: z.ZodString;
|
|
818
|
+
required: z.ZodBoolean;
|
|
819
|
+
minSelections: z.ZodNumber;
|
|
820
|
+
maxSelections: z.ZodNumber;
|
|
821
|
+
order: z.ZodNumber;
|
|
822
|
+
options: z.ZodArray<z.ZodObject<{
|
|
823
|
+
name: z.ZodString;
|
|
824
|
+
additionalPrice: z.ZodString;
|
|
825
|
+
order: z.ZodNumber;
|
|
826
|
+
}, z.core.$strict>>;
|
|
827
|
+
}, z.core.$strict>>;
|
|
828
|
+
}, z.core.$strict>;
|
|
829
|
+
}, z.core.$strict>;
|
|
830
|
+
declare const elenaAgentDraftProductDataSchema: z.ZodObject<{
|
|
831
|
+
price: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
832
|
+
status: z.ZodLiteral<"confirmed">;
|
|
833
|
+
amount: z.ZodString;
|
|
834
|
+
basis: z.ZodLiteral<"operator">;
|
|
835
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
836
|
+
status: z.ZodLiteral<"unconfirmed">;
|
|
837
|
+
reason: z.ZodEnum<{
|
|
838
|
+
missing: "missing";
|
|
839
|
+
illegible: "illegible";
|
|
840
|
+
}>;
|
|
841
|
+
rawText: z.ZodNullable<z.ZodString>;
|
|
842
|
+
}, z.core.$strict>], "status">;
|
|
843
|
+
type: z.ZodLiteral<"menu">;
|
|
844
|
+
name: z.ZodString;
|
|
845
|
+
description: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
846
|
+
status: z.ZodLiteral<"transcribed">;
|
|
847
|
+
text: z.ZodString;
|
|
848
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
849
|
+
status: z.ZodLiteral<"proposed">;
|
|
850
|
+
text: z.ZodString;
|
|
851
|
+
}, z.core.$strict>], "status">>;
|
|
852
|
+
category: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
853
|
+
kind: z.ZodLiteral<"id">;
|
|
854
|
+
id: z.ZodUUID;
|
|
855
|
+
expectedVersion: z.ZodNumber;
|
|
856
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
857
|
+
kind: z.ZodLiteral<"ref">;
|
|
858
|
+
ref: z.ZodString;
|
|
859
|
+
}, z.core.$strict>], "kind">;
|
|
860
|
+
available: z.ZodBoolean;
|
|
861
|
+
images: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
862
|
+
kind: z.ZodLiteral<"existing">;
|
|
863
|
+
assetId: z.ZodUUID;
|
|
864
|
+
sha256: z.ZodString;
|
|
865
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
866
|
+
kind: z.ZodLiteral<"staged">;
|
|
867
|
+
stagingId: z.ZodUUID;
|
|
868
|
+
sha256: z.ZodString;
|
|
869
|
+
}, z.core.$strict>], "kind">>;
|
|
870
|
+
extras: z.ZodObject<{
|
|
871
|
+
confirmed: z.ZodLiteral<true>;
|
|
872
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
873
|
+
name: z.ZodString;
|
|
874
|
+
required: z.ZodBoolean;
|
|
875
|
+
minSelections: z.ZodNumber;
|
|
876
|
+
maxSelections: z.ZodNumber;
|
|
877
|
+
order: z.ZodNumber;
|
|
878
|
+
options: z.ZodArray<z.ZodObject<{
|
|
879
|
+
name: z.ZodString;
|
|
880
|
+
additionalPrice: z.ZodString;
|
|
881
|
+
order: z.ZodNumber;
|
|
882
|
+
}, z.core.$strict>>;
|
|
883
|
+
}, z.core.$strict>>;
|
|
884
|
+
}, z.core.$strict>;
|
|
885
|
+
}, z.core.$strict>;
|
|
886
|
+
declare const elenaAgentCategoryChangeSchema: z.ZodObject<{
|
|
887
|
+
kind: z.ZodLiteral<"category.upsert">;
|
|
888
|
+
ref: z.ZodString;
|
|
889
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
890
|
+
kind: z.ZodLiteral<"id">;
|
|
891
|
+
id: z.ZodUUID;
|
|
892
|
+
expectedVersion: z.ZodNumber;
|
|
893
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
894
|
+
kind: z.ZodLiteral<"external">;
|
|
895
|
+
namespace: z.ZodString;
|
|
896
|
+
key: z.ZodString;
|
|
897
|
+
expectedVersion: z.ZodNullable<z.ZodNumber>;
|
|
898
|
+
}, z.core.$strict>], "kind">;
|
|
899
|
+
data: z.ZodObject<{
|
|
900
|
+
name: z.ZodString;
|
|
901
|
+
description: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
902
|
+
status: z.ZodLiteral<"transcribed">;
|
|
903
|
+
text: z.ZodString;
|
|
904
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
905
|
+
status: z.ZodLiteral<"proposed">;
|
|
906
|
+
text: z.ZodString;
|
|
907
|
+
}, z.core.$strict>], "status">>;
|
|
908
|
+
order: z.ZodNumber;
|
|
909
|
+
}, z.core.$strict>;
|
|
910
|
+
}, z.core.$strict>;
|
|
911
|
+
declare const elenaAgentProductChangeSchema: z.ZodObject<{
|
|
912
|
+
kind: z.ZodLiteral<"product.upsert">;
|
|
913
|
+
ref: z.ZodString;
|
|
914
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
915
|
+
kind: z.ZodLiteral<"id">;
|
|
916
|
+
id: z.ZodUUID;
|
|
917
|
+
expectedVersion: z.ZodNumber;
|
|
918
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
919
|
+
kind: z.ZodLiteral<"external">;
|
|
920
|
+
namespace: z.ZodString;
|
|
921
|
+
key: z.ZodString;
|
|
922
|
+
expectedVersion: z.ZodNullable<z.ZodNumber>;
|
|
923
|
+
}, z.core.$strict>], "kind">;
|
|
924
|
+
data: z.ZodObject<{
|
|
925
|
+
price: z.ZodObject<{
|
|
926
|
+
status: z.ZodLiteral<"confirmed">;
|
|
927
|
+
amount: z.ZodString;
|
|
928
|
+
basis: z.ZodLiteral<"operator">;
|
|
929
|
+
}, z.core.$strict>;
|
|
930
|
+
type: z.ZodLiteral<"menu">;
|
|
931
|
+
name: z.ZodString;
|
|
932
|
+
description: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
933
|
+
status: z.ZodLiteral<"transcribed">;
|
|
934
|
+
text: z.ZodString;
|
|
935
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
936
|
+
status: z.ZodLiteral<"proposed">;
|
|
937
|
+
text: z.ZodString;
|
|
938
|
+
}, z.core.$strict>], "status">>;
|
|
939
|
+
category: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
940
|
+
kind: z.ZodLiteral<"id">;
|
|
941
|
+
id: z.ZodUUID;
|
|
942
|
+
expectedVersion: z.ZodNumber;
|
|
943
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
944
|
+
kind: z.ZodLiteral<"ref">;
|
|
945
|
+
ref: z.ZodString;
|
|
946
|
+
}, z.core.$strict>], "kind">;
|
|
947
|
+
available: z.ZodBoolean;
|
|
948
|
+
images: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
949
|
+
kind: z.ZodLiteral<"existing">;
|
|
950
|
+
assetId: z.ZodUUID;
|
|
951
|
+
sha256: z.ZodString;
|
|
952
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
953
|
+
kind: z.ZodLiteral<"staged">;
|
|
954
|
+
stagingId: z.ZodUUID;
|
|
955
|
+
sha256: z.ZodString;
|
|
956
|
+
}, z.core.$strict>], "kind">>;
|
|
957
|
+
extras: z.ZodObject<{
|
|
958
|
+
confirmed: z.ZodLiteral<true>;
|
|
959
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
960
|
+
name: z.ZodString;
|
|
961
|
+
required: z.ZodBoolean;
|
|
962
|
+
minSelections: z.ZodNumber;
|
|
963
|
+
maxSelections: z.ZodNumber;
|
|
964
|
+
order: z.ZodNumber;
|
|
965
|
+
options: z.ZodArray<z.ZodObject<{
|
|
966
|
+
name: z.ZodString;
|
|
967
|
+
additionalPrice: z.ZodString;
|
|
968
|
+
order: z.ZodNumber;
|
|
969
|
+
}, z.core.$strict>>;
|
|
970
|
+
}, z.core.$strict>>;
|
|
971
|
+
}, z.core.$strict>;
|
|
972
|
+
}, z.core.$strict>;
|
|
973
|
+
}, z.core.$strict>;
|
|
974
|
+
declare const elenaAgentChangeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
975
|
+
kind: z.ZodLiteral<"category.upsert">;
|
|
976
|
+
ref: z.ZodString;
|
|
977
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
978
|
+
kind: z.ZodLiteral<"id">;
|
|
979
|
+
id: z.ZodUUID;
|
|
980
|
+
expectedVersion: z.ZodNumber;
|
|
981
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
982
|
+
kind: z.ZodLiteral<"external">;
|
|
983
|
+
namespace: z.ZodString;
|
|
984
|
+
key: z.ZodString;
|
|
985
|
+
expectedVersion: z.ZodNullable<z.ZodNumber>;
|
|
986
|
+
}, z.core.$strict>], "kind">;
|
|
987
|
+
data: z.ZodObject<{
|
|
988
|
+
name: z.ZodString;
|
|
989
|
+
description: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
990
|
+
status: z.ZodLiteral<"transcribed">;
|
|
991
|
+
text: z.ZodString;
|
|
992
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
993
|
+
status: z.ZodLiteral<"proposed">;
|
|
994
|
+
text: z.ZodString;
|
|
995
|
+
}, z.core.$strict>], "status">>;
|
|
996
|
+
order: z.ZodNumber;
|
|
997
|
+
}, z.core.$strict>;
|
|
998
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
999
|
+
kind: z.ZodLiteral<"product.upsert">;
|
|
1000
|
+
ref: z.ZodString;
|
|
1001
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1002
|
+
kind: z.ZodLiteral<"id">;
|
|
1003
|
+
id: z.ZodUUID;
|
|
1004
|
+
expectedVersion: z.ZodNumber;
|
|
1005
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1006
|
+
kind: z.ZodLiteral<"external">;
|
|
1007
|
+
namespace: z.ZodString;
|
|
1008
|
+
key: z.ZodString;
|
|
1009
|
+
expectedVersion: z.ZodNullable<z.ZodNumber>;
|
|
1010
|
+
}, z.core.$strict>], "kind">;
|
|
1011
|
+
data: z.ZodObject<{
|
|
1012
|
+
price: z.ZodObject<{
|
|
1013
|
+
status: z.ZodLiteral<"confirmed">;
|
|
1014
|
+
amount: z.ZodString;
|
|
1015
|
+
basis: z.ZodLiteral<"operator">;
|
|
1016
|
+
}, z.core.$strict>;
|
|
1017
|
+
type: z.ZodLiteral<"menu">;
|
|
1018
|
+
name: z.ZodString;
|
|
1019
|
+
description: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1020
|
+
status: z.ZodLiteral<"transcribed">;
|
|
1021
|
+
text: z.ZodString;
|
|
1022
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1023
|
+
status: z.ZodLiteral<"proposed">;
|
|
1024
|
+
text: z.ZodString;
|
|
1025
|
+
}, z.core.$strict>], "status">>;
|
|
1026
|
+
category: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1027
|
+
kind: z.ZodLiteral<"id">;
|
|
1028
|
+
id: z.ZodUUID;
|
|
1029
|
+
expectedVersion: z.ZodNumber;
|
|
1030
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1031
|
+
kind: z.ZodLiteral<"ref">;
|
|
1032
|
+
ref: z.ZodString;
|
|
1033
|
+
}, z.core.$strict>], "kind">;
|
|
1034
|
+
available: z.ZodBoolean;
|
|
1035
|
+
images: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1036
|
+
kind: z.ZodLiteral<"existing">;
|
|
1037
|
+
assetId: z.ZodUUID;
|
|
1038
|
+
sha256: z.ZodString;
|
|
1039
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1040
|
+
kind: z.ZodLiteral<"staged">;
|
|
1041
|
+
stagingId: z.ZodUUID;
|
|
1042
|
+
sha256: z.ZodString;
|
|
1043
|
+
}, z.core.$strict>], "kind">>;
|
|
1044
|
+
extras: z.ZodObject<{
|
|
1045
|
+
confirmed: z.ZodLiteral<true>;
|
|
1046
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
1047
|
+
name: z.ZodString;
|
|
1048
|
+
required: z.ZodBoolean;
|
|
1049
|
+
minSelections: z.ZodNumber;
|
|
1050
|
+
maxSelections: z.ZodNumber;
|
|
1051
|
+
order: z.ZodNumber;
|
|
1052
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1053
|
+
name: z.ZodString;
|
|
1054
|
+
additionalPrice: z.ZodString;
|
|
1055
|
+
order: z.ZodNumber;
|
|
1056
|
+
}, z.core.$strict>>;
|
|
1057
|
+
}, z.core.$strict>>;
|
|
1058
|
+
}, z.core.$strict>;
|
|
1059
|
+
}, z.core.$strict>;
|
|
1060
|
+
}, z.core.$strict>], "kind">;
|
|
1061
|
+
declare const elenaAgentCategorySchema: z.ZodObject<{
|
|
1062
|
+
id: z.ZodUUID;
|
|
1063
|
+
revision: z.ZodNumber;
|
|
1064
|
+
name: z.ZodString;
|
|
1065
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1066
|
+
order: z.ZodNumber;
|
|
1067
|
+
}, z.core.$strict>;
|
|
1068
|
+
declare const elenaAgentProductSchema: z.ZodObject<{
|
|
1069
|
+
id: z.ZodUUID;
|
|
1070
|
+
revision: z.ZodNumber;
|
|
1071
|
+
type: z.ZodLiteral<"menu">;
|
|
1072
|
+
name: z.ZodString;
|
|
1073
|
+
basePrice: z.ZodString;
|
|
1074
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1075
|
+
categoryId: z.ZodUUID;
|
|
1076
|
+
available: z.ZodBoolean;
|
|
1077
|
+
publishedToMenu: z.ZodBoolean;
|
|
1078
|
+
isDraft: z.ZodBoolean;
|
|
1079
|
+
images: z.ZodArray<z.ZodObject<{
|
|
1080
|
+
assetId: z.ZodUUID;
|
|
1081
|
+
sha256: z.ZodString;
|
|
1082
|
+
}, z.core.$strict>>;
|
|
1083
|
+
primaryImageId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
1084
|
+
extraGroups: z.ZodArray<z.ZodObject<{
|
|
1085
|
+
name: z.ZodString;
|
|
1086
|
+
required: z.ZodBoolean;
|
|
1087
|
+
minSelections: z.ZodNumber;
|
|
1088
|
+
maxSelections: z.ZodNumber;
|
|
1089
|
+
order: z.ZodNumber;
|
|
1090
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1091
|
+
name: z.ZodString;
|
|
1092
|
+
additionalPrice: z.ZodString;
|
|
1093
|
+
order: z.ZodNumber;
|
|
1094
|
+
}, z.core.$strict>>;
|
|
1095
|
+
}, z.core.$strict>>;
|
|
1096
|
+
}, z.core.$strict>;
|
|
1097
|
+
declare const elenaAgentCategoryListSchema: z.ZodObject<{
|
|
1098
|
+
version: z.ZodLiteral<"1">;
|
|
1099
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
1100
|
+
id: z.ZodUUID;
|
|
1101
|
+
revision: z.ZodNumber;
|
|
1102
|
+
name: z.ZodString;
|
|
1103
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1104
|
+
order: z.ZodNumber;
|
|
1105
|
+
}, z.core.$strict>>;
|
|
1106
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1107
|
+
}, z.core.$strict>;
|
|
1108
|
+
declare const elenaAgentProductListSchema: z.ZodObject<{
|
|
1109
|
+
version: z.ZodLiteral<"1">;
|
|
1110
|
+
products: z.ZodArray<z.ZodObject<{
|
|
1111
|
+
id: z.ZodUUID;
|
|
1112
|
+
revision: z.ZodNumber;
|
|
1113
|
+
type: z.ZodLiteral<"menu">;
|
|
1114
|
+
name: z.ZodString;
|
|
1115
|
+
basePrice: z.ZodString;
|
|
1116
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1117
|
+
categoryId: z.ZodUUID;
|
|
1118
|
+
available: z.ZodBoolean;
|
|
1119
|
+
publishedToMenu: z.ZodBoolean;
|
|
1120
|
+
isDraft: z.ZodBoolean;
|
|
1121
|
+
images: z.ZodArray<z.ZodObject<{
|
|
1122
|
+
assetId: z.ZodUUID;
|
|
1123
|
+
sha256: z.ZodString;
|
|
1124
|
+
}, z.core.$strict>>;
|
|
1125
|
+
primaryImageId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
1126
|
+
extraGroups: z.ZodArray<z.ZodObject<{
|
|
1127
|
+
name: z.ZodString;
|
|
1128
|
+
required: z.ZodBoolean;
|
|
1129
|
+
minSelections: z.ZodNumber;
|
|
1130
|
+
maxSelections: z.ZodNumber;
|
|
1131
|
+
order: z.ZodNumber;
|
|
1132
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1133
|
+
name: z.ZodString;
|
|
1134
|
+
additionalPrice: z.ZodString;
|
|
1135
|
+
order: z.ZodNumber;
|
|
1136
|
+
}, z.core.$strict>>;
|
|
1137
|
+
}, z.core.$strict>>;
|
|
1138
|
+
}, z.core.$strict>>;
|
|
1139
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1140
|
+
}, z.core.$strict>;
|
|
1141
|
+
declare const elenaAgentProductResponseSchema: z.ZodObject<{
|
|
1142
|
+
version: z.ZodLiteral<"1">;
|
|
1143
|
+
product: z.ZodObject<{
|
|
1144
|
+
id: z.ZodUUID;
|
|
1145
|
+
revision: z.ZodNumber;
|
|
1146
|
+
type: z.ZodLiteral<"menu">;
|
|
1147
|
+
name: z.ZodString;
|
|
1148
|
+
basePrice: z.ZodString;
|
|
1149
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1150
|
+
categoryId: z.ZodUUID;
|
|
1151
|
+
available: z.ZodBoolean;
|
|
1152
|
+
publishedToMenu: z.ZodBoolean;
|
|
1153
|
+
isDraft: z.ZodBoolean;
|
|
1154
|
+
images: z.ZodArray<z.ZodObject<{
|
|
1155
|
+
assetId: z.ZodUUID;
|
|
1156
|
+
sha256: z.ZodString;
|
|
1157
|
+
}, z.core.$strict>>;
|
|
1158
|
+
primaryImageId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
1159
|
+
extraGroups: z.ZodArray<z.ZodObject<{
|
|
1160
|
+
name: z.ZodString;
|
|
1161
|
+
required: z.ZodBoolean;
|
|
1162
|
+
minSelections: z.ZodNumber;
|
|
1163
|
+
maxSelections: z.ZodNumber;
|
|
1164
|
+
order: z.ZodNumber;
|
|
1165
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1166
|
+
name: z.ZodString;
|
|
1167
|
+
additionalPrice: z.ZodString;
|
|
1168
|
+
order: z.ZodNumber;
|
|
1169
|
+
}, z.core.$strict>>;
|
|
1170
|
+
}, z.core.$strict>>;
|
|
1171
|
+
}, z.core.$strict>;
|
|
1172
|
+
editable: z.ZodOptional<z.ZodObject<{
|
|
1173
|
+
restaurantId: z.ZodUUID;
|
|
1174
|
+
productId: z.ZodUUID;
|
|
1175
|
+
imageId: z.ZodNullable<z.ZodUUID>;
|
|
1176
|
+
categoryRevision: z.ZodNumber;
|
|
1177
|
+
primaryImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1178
|
+
assetId: z.ZodUUID;
|
|
1179
|
+
sha256: z.ZodString;
|
|
1180
|
+
}, z.core.$strict>>>;
|
|
1181
|
+
imageEditorUrl: z.ZodOptional<z.ZodURL>;
|
|
1182
|
+
}, z.core.$strict>>;
|
|
1183
|
+
}, z.core.$strict>;
|
|
1184
|
+
declare const elenaAgentCategoryResponseSchema: z.ZodObject<{
|
|
1185
|
+
version: z.ZodLiteral<"1">;
|
|
1186
|
+
category: z.ZodObject<{
|
|
1187
|
+
id: z.ZodUUID;
|
|
1188
|
+
revision: z.ZodNumber;
|
|
1189
|
+
name: z.ZodString;
|
|
1190
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1191
|
+
order: z.ZodNumber;
|
|
1192
|
+
}, z.core.$strict>;
|
|
1193
|
+
}, z.core.$strict>;
|
|
1194
|
+
declare const elenaAgentMediaStageRequestSchema: z.ZodObject<{
|
|
1195
|
+
version: z.ZodLiteral<"1">;
|
|
1196
|
+
idempotencyKey: z.ZodString;
|
|
1197
|
+
fileName: z.ZodString;
|
|
1198
|
+
mimeType: z.ZodEnum<{
|
|
1199
|
+
"image/jpeg": "image/jpeg";
|
|
1200
|
+
"image/png": "image/png";
|
|
1201
|
+
"image/webp": "image/webp";
|
|
1202
|
+
}>;
|
|
1203
|
+
bytes: z.ZodNumber;
|
|
1204
|
+
sha256: z.ZodString;
|
|
1205
|
+
}, z.core.$strict>;
|
|
1206
|
+
declare const elenaAgentMediaStagedSchema: z.ZodObject<{
|
|
1207
|
+
version: z.ZodLiteral<"1">;
|
|
1208
|
+
stagingId: z.ZodUUID;
|
|
1209
|
+
sha256: z.ZodString;
|
|
1210
|
+
mimeType: z.ZodEnum<{
|
|
1211
|
+
"image/jpeg": "image/jpeg";
|
|
1212
|
+
"image/png": "image/png";
|
|
1213
|
+
"image/webp": "image/webp";
|
|
1214
|
+
}>;
|
|
1215
|
+
bytes: z.ZodNumber;
|
|
1216
|
+
expiresAt: z.ZodISODateTime;
|
|
1217
|
+
}, z.core.$strict>;
|
|
1218
|
+
declare const elenaAgentAssetSchema: z.ZodObject<{
|
|
1219
|
+
version: z.ZodLiteral<"1">;
|
|
1220
|
+
assetId: z.ZodUUID;
|
|
1221
|
+
sha256: z.ZodString;
|
|
1222
|
+
mimeType: z.ZodEnum<{
|
|
1223
|
+
"image/jpeg": "image/jpeg";
|
|
1224
|
+
"image/png": "image/png";
|
|
1225
|
+
"image/webp": "image/webp";
|
|
1226
|
+
}>;
|
|
1227
|
+
bytes: z.ZodNumber;
|
|
1228
|
+
}, z.core.$strict>;
|
|
1229
|
+
declare const elenaClientAssetSchema: z.ZodObject<{
|
|
1230
|
+
assetId: z.ZodUUID;
|
|
1231
|
+
url: z.ZodURL;
|
|
1232
|
+
}, z.core.$strict>;
|
|
1233
|
+
declare const elenaClientCategorySchema: z.ZodObject<{
|
|
1234
|
+
id: z.ZodUUID;
|
|
1235
|
+
name: z.ZodString;
|
|
1236
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1237
|
+
order: z.ZodNumber;
|
|
1238
|
+
}, z.core.$strict>;
|
|
1239
|
+
declare const elenaClientProductSchema: z.ZodObject<{
|
|
1240
|
+
id: z.ZodUUID;
|
|
1241
|
+
type: z.ZodLiteral<"menu">;
|
|
1242
|
+
name: z.ZodString;
|
|
1243
|
+
basePrice: z.ZodString;
|
|
1244
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1245
|
+
categoryId: z.ZodUUID;
|
|
1246
|
+
available: z.ZodBoolean;
|
|
1247
|
+
images: z.ZodArray<z.ZodObject<{
|
|
1248
|
+
assetId: z.ZodUUID;
|
|
1249
|
+
url: z.ZodURL;
|
|
1250
|
+
}, z.core.$strict>>;
|
|
1251
|
+
extraGroups: z.ZodArray<z.ZodObject<{
|
|
1252
|
+
name: z.ZodString;
|
|
1253
|
+
required: z.ZodBoolean;
|
|
1254
|
+
minSelections: z.ZodNumber;
|
|
1255
|
+
maxSelections: z.ZodNumber;
|
|
1256
|
+
order: z.ZodNumber;
|
|
1257
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1258
|
+
name: z.ZodString;
|
|
1259
|
+
additionalPrice: z.ZodString;
|
|
1260
|
+
order: z.ZodNumber;
|
|
1261
|
+
}, z.core.$strict>>;
|
|
1262
|
+
}, z.core.$strict>>;
|
|
1263
|
+
}, z.core.$strict>;
|
|
1264
|
+
declare const elenaClientCatalogSchema: z.ZodObject<{
|
|
1265
|
+
version: z.ZodLiteral<"1">;
|
|
1266
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
1267
|
+
id: z.ZodUUID;
|
|
1268
|
+
name: z.ZodString;
|
|
1269
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1270
|
+
order: z.ZodNumber;
|
|
1271
|
+
}, z.core.$strict>>;
|
|
1272
|
+
products: z.ZodArray<z.ZodObject<{
|
|
1273
|
+
id: z.ZodUUID;
|
|
1274
|
+
type: z.ZodLiteral<"menu">;
|
|
1275
|
+
name: z.ZodString;
|
|
1276
|
+
basePrice: z.ZodString;
|
|
1277
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1278
|
+
categoryId: z.ZodUUID;
|
|
1279
|
+
available: z.ZodBoolean;
|
|
1280
|
+
images: z.ZodArray<z.ZodObject<{
|
|
1281
|
+
assetId: z.ZodUUID;
|
|
1282
|
+
url: z.ZodURL;
|
|
1283
|
+
}, z.core.$strict>>;
|
|
1284
|
+
extraGroups: z.ZodArray<z.ZodObject<{
|
|
1285
|
+
name: z.ZodString;
|
|
1286
|
+
required: z.ZodBoolean;
|
|
1287
|
+
minSelections: z.ZodNumber;
|
|
1288
|
+
maxSelections: z.ZodNumber;
|
|
1289
|
+
order: z.ZodNumber;
|
|
1290
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1291
|
+
name: z.ZodString;
|
|
1292
|
+
additionalPrice: z.ZodString;
|
|
1293
|
+
order: z.ZodNumber;
|
|
1294
|
+
}, z.core.$strict>>;
|
|
1295
|
+
}, z.core.$strict>>;
|
|
1296
|
+
}, z.core.$strict>>;
|
|
1297
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1298
|
+
}, z.core.$strict>;
|
|
1299
|
+
declare const elenaClientProductResponseSchema: z.ZodObject<{
|
|
1300
|
+
version: z.ZodLiteral<"1">;
|
|
1301
|
+
product: z.ZodObject<{
|
|
1302
|
+
id: z.ZodUUID;
|
|
1303
|
+
type: z.ZodLiteral<"menu">;
|
|
1304
|
+
name: z.ZodString;
|
|
1305
|
+
basePrice: z.ZodString;
|
|
1306
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1307
|
+
categoryId: z.ZodUUID;
|
|
1308
|
+
available: z.ZodBoolean;
|
|
1309
|
+
images: z.ZodArray<z.ZodObject<{
|
|
1310
|
+
assetId: z.ZodUUID;
|
|
1311
|
+
url: z.ZodURL;
|
|
1312
|
+
}, z.core.$strict>>;
|
|
1313
|
+
extraGroups: z.ZodArray<z.ZodObject<{
|
|
1314
|
+
name: z.ZodString;
|
|
1315
|
+
required: z.ZodBoolean;
|
|
1316
|
+
minSelections: z.ZodNumber;
|
|
1317
|
+
maxSelections: z.ZodNumber;
|
|
1318
|
+
order: z.ZodNumber;
|
|
1319
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1320
|
+
name: z.ZodString;
|
|
1321
|
+
additionalPrice: z.ZodString;
|
|
1322
|
+
order: z.ZodNumber;
|
|
1323
|
+
}, z.core.$strict>>;
|
|
1324
|
+
}, z.core.$strict>>;
|
|
1325
|
+
}, z.core.$strict>;
|
|
1326
|
+
}, z.core.$strict>;
|
|
1327
|
+
declare const elenaClientAssetResponseSchema: z.ZodObject<{
|
|
1328
|
+
version: z.ZodLiteral<"1">;
|
|
1329
|
+
asset: z.ZodObject<{
|
|
1330
|
+
assetId: z.ZodUUID;
|
|
1331
|
+
url: z.ZodURL;
|
|
1332
|
+
}, z.core.$strict>;
|
|
1333
|
+
}, z.core.$strict>;
|
|
1334
|
+
type ElenaAgentTargetV1 = z.infer<typeof elenaAgentTargetSchema>;
|
|
1335
|
+
type ElenaAgentProductDataV1 = z.infer<typeof elenaAgentProductDataSchema>;
|
|
1336
|
+
type ElenaAgentCategoryDataV1 = z.infer<typeof elenaAgentCategoryDataSchema>;
|
|
1337
|
+
type ElenaAgentChangeV1 = z.infer<typeof elenaAgentChangeSchema>;
|
|
1338
|
+
type ElenaAgentProductV1 = z.infer<typeof elenaAgentProductSchema>;
|
|
1339
|
+
type ElenaAgentCategoryV1 = z.infer<typeof elenaAgentCategorySchema>;
|
|
1340
|
+
type ElenaAgentMediaStageRequestV1 = z.infer<typeof elenaAgentMediaStageRequestSchema>;
|
|
1341
|
+
type ElenaAgentMediaStagedV1 = z.infer<typeof elenaAgentMediaStagedSchema>;
|
|
1342
|
+
type ElenaAgentAssetV1 = z.infer<typeof elenaAgentAssetSchema>;
|
|
1343
|
+
type ElenaClientCatalogV1 = z.infer<typeof elenaClientCatalogSchema>;
|
|
1344
|
+
type ElenaClientProductV1 = z.infer<typeof elenaClientProductSchema>;
|
|
1345
|
+
type ElenaAgentCategoryListV1 = z.infer<typeof elenaAgentCategoryListSchema>;
|
|
1346
|
+
type ElenaAgentCategoryResponseV1 = z.infer<typeof elenaAgentCategoryResponseSchema>;
|
|
1347
|
+
type ElenaAgentProductListV1 = z.infer<typeof elenaAgentProductListSchema>;
|
|
1348
|
+
type ElenaAgentProductResponseV1 = z.infer<typeof elenaAgentProductResponseSchema>;
|
|
1349
|
+
type ElenaAgentMediaReferenceV1 = z.infer<typeof elenaAgentMediaReferenceSchema>;
|
|
1350
|
+
type ElenaAgentExtraGroupV1 = z.infer<typeof elenaAgentExtraGroupSchema>;
|
|
1351
|
+
type ElenaClientProductResponseV1 = z.infer<typeof elenaClientProductResponseSchema>;
|
|
1352
|
+
type ElenaClientAssetV1 = z.infer<typeof elenaClientAssetSchema>;
|
|
1353
|
+
type ElenaClientAssetResponseV1 = z.infer<typeof elenaClientAssetResponseSchema>;
|
|
1354
|
+
|
|
1355
|
+
declare const ELENA_PUBLIC_CONNECTION_DISCOVERY_ROOT = "/api/v1/public/catalog-connections";
|
|
1356
|
+
declare const elenaPublicConnectionSlugSchema: z.ZodString;
|
|
1357
|
+
declare const elenaPublicConnectionMutationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1358
|
+
action: z.ZodLiteral<"enable">;
|
|
1359
|
+
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1360
|
+
version: z.ZodLiteral<"1">;
|
|
1361
|
+
expectedRevision: z.ZodNumber;
|
|
1362
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1363
|
+
action: z.ZodLiteral<"renew">;
|
|
1364
|
+
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1365
|
+
version: z.ZodLiteral<"1">;
|
|
1366
|
+
expectedRevision: z.ZodNumber;
|
|
1367
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1368
|
+
action: z.ZodLiteral<"disable">;
|
|
1369
|
+
version: z.ZodLiteral<"1">;
|
|
1370
|
+
expectedRevision: z.ZodNumber;
|
|
1371
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1372
|
+
action: z.ZodLiteral<"revoke">;
|
|
1373
|
+
version: z.ZodLiteral<"1">;
|
|
1374
|
+
expectedRevision: z.ZodNumber;
|
|
1375
|
+
}, z.core.$strict>], "action">;
|
|
1376
|
+
declare const elenaPublicConnectionMetadataSchema: z.ZodObject<{
|
|
1377
|
+
revision: z.ZodNumber;
|
|
1378
|
+
status: z.ZodEnum<{
|
|
1379
|
+
revoked: "revoked";
|
|
1380
|
+
published: "published";
|
|
1381
|
+
disabled: "disabled";
|
|
1382
|
+
}>;
|
|
1383
|
+
expiresAt: z.ZodISODateTime;
|
|
1384
|
+
}, z.core.$strict>;
|
|
1385
|
+
declare const elenaPublicConnectionManagementSchema: z.ZodObject<{
|
|
1386
|
+
version: z.ZodLiteral<"1">;
|
|
1387
|
+
publication: z.ZodNullable<z.ZodObject<{
|
|
1388
|
+
revision: z.ZodNumber;
|
|
1389
|
+
status: z.ZodEnum<{
|
|
1390
|
+
revoked: "revoked";
|
|
1391
|
+
published: "published";
|
|
1392
|
+
disabled: "disabled";
|
|
1393
|
+
}>;
|
|
1394
|
+
expiresAt: z.ZodISODateTime;
|
|
1395
|
+
}, z.core.$strict>>;
|
|
1396
|
+
}, z.core.$strict>;
|
|
1397
|
+
declare const elenaPublicConnectionSchema: z.ZodObject<{
|
|
1398
|
+
version: z.ZodLiteral<"1">;
|
|
1399
|
+
apiOrigin: z.ZodURL;
|
|
1400
|
+
clientKey: z.ZodString;
|
|
1401
|
+
publication: z.ZodObject<{
|
|
1402
|
+
revision: z.ZodNumber;
|
|
1403
|
+
expiresAt: z.ZodISODateTime;
|
|
1404
|
+
}, z.core.$strict>;
|
|
1405
|
+
context: z.ZodObject<{
|
|
1406
|
+
version: z.ZodLiteral<"1">;
|
|
1407
|
+
restaurant: z.ZodObject<{
|
|
1408
|
+
id: z.ZodUUID;
|
|
1409
|
+
name: z.ZodString;
|
|
1410
|
+
slug: z.ZodString;
|
|
1411
|
+
currency: z.ZodLiteral<"PEN">;
|
|
1412
|
+
}, z.core.$strict>;
|
|
1413
|
+
capabilities: z.ZodObject<{
|
|
1414
|
+
menu: z.ZodLiteral<true>;
|
|
1415
|
+
assets: z.ZodLiteral<true>;
|
|
1416
|
+
}, z.core.$strict>;
|
|
1417
|
+
}, z.core.$strict>;
|
|
1418
|
+
}, z.core.$strict>;
|
|
1419
|
+
type ElenaPublicConnectionV1 = z.infer<typeof elenaPublicConnectionSchema>;
|
|
1420
|
+
type ElenaPublicConnectionMutationV1 = z.infer<typeof elenaPublicConnectionMutationSchema>;
|
|
1421
|
+
type ElenaPublicConnectionManagementV1 = z.infer<typeof elenaPublicConnectionManagementSchema>;
|
|
1422
|
+
|
|
1423
|
+
type ElenaHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
1424
|
+
/** Minimal fetch shape the SDK needs. Callers may pass global fetch. */
|
|
1425
|
+
type ElenaFetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
1426
|
+
interface ElenaClientOptions {
|
|
1427
|
+
baseUrl: string;
|
|
1428
|
+
visitorId?: string;
|
|
1429
|
+
fetch?: ElenaFetch;
|
|
1430
|
+
timeoutMs?: number;
|
|
1431
|
+
}
|
|
1432
|
+
interface ElenaRequestOptions {
|
|
1433
|
+
method?: ElenaHttpMethod;
|
|
1434
|
+
body?: unknown;
|
|
1435
|
+
headers?: HeadersInit;
|
|
1436
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1437
|
+
signal?: AbortSignal;
|
|
1438
|
+
keepalive?: boolean;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* Shared transport for Elena product clients. Owns origin composition,
|
|
1442
|
+
* JSON/multipart bodies, visitor identity, bearer injection, timeout and
|
|
1443
|
+
* typed failures. Resources own paths, never the origin.
|
|
1444
|
+
*/
|
|
1445
|
+
declare class ElenaHttpClient {
|
|
1446
|
+
readonly baseUrl: string;
|
|
1447
|
+
readonly visitorId?: string;
|
|
1448
|
+
private readonly fetchImpl;
|
|
1449
|
+
private readonly timeoutMs;
|
|
1450
|
+
private readonly accessToken?;
|
|
1451
|
+
constructor(options: ElenaClientOptions, accessToken?: string);
|
|
1452
|
+
url(path: string, query?: Record<string, string | number | boolean | undefined>): string;
|
|
1453
|
+
request<T>(path: string, options?: ElenaRequestOptions): Promise<T>;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
type ElenaKeyTransportErrorCode = ElenaAgentErrorCodeV1 | 'INVALID_RESPONSE' | 'NETWORK_ERROR' | 'TIMEOUT' | 'ABORTED' | 'REDIRECT_REJECTED';
|
|
1457
|
+
/** Intentionally never retains a raw response, request, rejected value, or cause. */
|
|
1458
|
+
declare class ElenaAgentTransportError extends Error {
|
|
1459
|
+
readonly code: ElenaKeyTransportErrorCode;
|
|
1460
|
+
readonly status: number;
|
|
1461
|
+
readonly retryable: boolean;
|
|
1462
|
+
readonly requestId: string | null;
|
|
1463
|
+
readonly retryAfterSeconds?: number | undefined;
|
|
1464
|
+
readonly name = "ElenaAgentTransportError";
|
|
1465
|
+
constructor(code: ElenaKeyTransportErrorCode, status?: number, retryable?: boolean, requestId?: string | null, retryAfterSeconds?: number | undefined);
|
|
1466
|
+
}
|
|
1467
|
+
interface ElenaKeyRequestOptions {
|
|
1468
|
+
signal?: AbortSignal;
|
|
1469
|
+
/** Total request budget, including response consumption and retry delays. */
|
|
1470
|
+
timeoutMs?: number;
|
|
1471
|
+
}
|
|
1472
|
+
interface ElenaKeyTransportOptions {
|
|
1473
|
+
baseUrl: string;
|
|
1474
|
+
fetch?: ElenaFetch;
|
|
1475
|
+
timeoutMs?: number;
|
|
1476
|
+
/** Zero, one, or two additional attempts; default two. */
|
|
1477
|
+
maxRetries?: number;
|
|
1478
|
+
/** Only loopback HTTP with an explicitly injected test fetch is accepted. */
|
|
1479
|
+
testing?: {
|
|
1480
|
+
allowHttp: true;
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
type ElenaKeyPageQuery = Omit<ElenaAgentPageQueryV1, 'limit'> & {
|
|
1484
|
+
limit?: number;
|
|
1485
|
+
};
|
|
1486
|
+
|
|
1487
|
+
export { type ElenaPublicConnectionMutationV1 as $, type ElenaAgentKeyPolicyRequestV1 as A, type ElenaAgentKeyReceiptV1 as B, type ElenaAgentKeyReplaceRequestV1 as C, type ElenaAgentKeyResponseV1 as D, type ElenaKeyRequestOptions as E, type ElenaAgentKeyRevokeRequestV1 as F, type ElenaAgentMediaReferenceV1 as G, type ElenaAgentPageQueryV1 as H, type ElenaAgentPairingDecisionRequestV1 as I, type ElenaAgentPairingPollRequestV1 as J, type ElenaAgentPairingPollResponseV1 as K, type ElenaAgentPairingReviewV1 as L, type ElenaAgentPairingStartRequestV1 as M, type ElenaAgentPairingStartResponseV1 as N, type ElenaAgentProductDataV1 as O, type ElenaAgentProductV1 as P, type ElenaAgentScopeV1 as Q, type ElenaAgentTargetV1 as R, ElenaAgentTransportError as S, type ElenaClientAssetResponseV1 as T, type ElenaClientAssetV1 as U, type ElenaClientCatalogV1 as V, type ElenaClientContextV1 as W, type ElenaClientProductResponseV1 as X, type ElenaClientProductV1 as Y, type ElenaKeyTransportErrorCode as Z, type ElenaPublicConnectionManagementV1 as _, type ElenaAgentContextV1 as a, elenaAgentRestaurantSchema as a$, type ElenaPublicConnectionV1 as a0, elenaAgentAckSchema as a1, elenaAgentActionSchema as a2, elenaAgentAssetSchema as a3, elenaAgentBaseUrlSchema as a4, elenaAgentCategoryChangeSchema as a5, elenaAgentCategoryDataSchema as a6, elenaAgentCategoryListSchema as a7, elenaAgentCategoryReferenceSchema as a8, elenaAgentCategoryResponseSchema as a9, elenaAgentKeyListSchema as aA, elenaAgentKeyMetadataSchema as aB, elenaAgentKeyPolicyRequestSchema as aC, elenaAgentKeyReceiptSchema as aD, elenaAgentKeyReplaceRequestSchema as aE, elenaAgentKeyResponseSchema as aF, elenaAgentKeyRevokeRequestSchema as aG, elenaAgentMediaReferenceSchema as aH, elenaAgentMediaStageRequestSchema as aI, elenaAgentMediaStagedSchema as aJ, elenaAgentModeSchema as aK, elenaAgentMoneySchema as aL, elenaAgentNameSchema as aM, elenaAgentNonnegativeMoneySchema as aN, elenaAgentPageQuerySchema as aO, elenaAgentPairingDecisionRequestSchema as aP, elenaAgentPairingPollRequestSchema as aQ, elenaAgentPairingPollResponseSchema as aR, elenaAgentPairingReviewSchema as aS, elenaAgentPairingStartRequestSchema as aT, elenaAgentPairingStartResponseSchema as aU, elenaAgentProductChangeSchema as aV, elenaAgentProductDataSchema as aW, elenaAgentProductListSchema as aX, elenaAgentProductResponseSchema as aY, elenaAgentProductSchema as aZ, elenaAgentRefSchema as a_, elenaAgentCategorySchema as aa, elenaAgentChangeSchema as ab, elenaAgentCliAuthStatusSchema as ac, elenaAgentCliLogoutSchema as ad, elenaAgentConfirmedPriceSchema as ae, elenaAgentConnectionOriginSchema as af, elenaAgentConnectionUrlSchema as ag, elenaAgentContextSchema as ah, elenaAgentCurrencySchema as ai, elenaAgentDescriptionSchema as aj, elenaAgentDeviceCodeSchema as ak, elenaAgentDraftPriceSchema as al, elenaAgentDraftProductDataSchema as am, elenaAgentEmptyRequestSchema as an, elenaAgentErrorCodeSchema as ao, elenaAgentErrorSchema as ap, elenaAgentExistingTargetSchema as aq, elenaAgentExternalTargetSchema as ar, elenaAgentExtraGroupSchema as as, elenaAgentExtraOptionSchema as at, elenaAgentExtrasSchema as au, elenaAgentGallerySchema as av, elenaAgentHashSchema as aw, elenaAgentHttpsUrlSchema as ax, elenaAgentIdSchema as ay, elenaAgentKeyCreateRequestSchema as az, type ElenaKeyPageQuery as b, elenaAgentRevisionSchema as b0, elenaAgentScopeSchema as b1, elenaAgentScopesSchema as b2, elenaAgentSecretSchema as b3, elenaAgentTargetSchema as b4, elenaAgentTextSchema as b5, elenaAgentTimestampSchema as b6, elenaAgentUserCodeSchema as b7, elenaAgentVersionSchema as b8, elenaClientAssetResponseSchema as b9, elenaClientAssetSchema as ba, elenaClientCatalogSchema as bb, elenaClientCategorySchema as bc, elenaClientContextSchema as bd, elenaClientKeySchema as be, elenaClientProductResponseSchema as bf, elenaClientProductSchema as bg, elenaManagedClientKeySchema as bh, elenaManualClientKeySchema as bi, elenaPublicConnectionManagementSchema as bj, elenaPublicConnectionMetadataSchema as bk, elenaPublicConnectionMutationSchema as bl, elenaPublicConnectionSchema as bm, elenaPublicConnectionSlugSchema as bn, ElenaHttpClient as bo, type ElenaFetch as bp, type ElenaClientOptions as bq, type ElenaHttpMethod as br, type ElenaRequestOptions as bs, type ElenaAgentCategoryListV1 as c, type ElenaAgentCategoryResponseV1 as d, type ElenaAgentProductListV1 as e, type ElenaAgentProductResponseV1 as f, type ElenaAgentAssetV1 as g, type ElenaAgentMediaStageRequestV1 as h, type ElenaAgentMediaStagedV1 as i, type ElenaKeyTransportOptions as j, ELENA_AGENT_CONTRACT_VERSION as k, ELENA_AGENT_LIMITS as l, ELENA_AGENT_TRANSPORT as m, ELENA_PUBLIC_CONNECTION_DISCOVERY_ROOT as n, type ElenaAgentActionV1 as o, type ElenaAgentCategoryDataV1 as p, type ElenaAgentCategoryV1 as q, type ElenaAgentChangeV1 as r, type ElenaAgentCliAuthStatusV1 as s, type ElenaAgentCliLogoutV1 as t, type ElenaAgentErrorCodeV1 as u, type ElenaAgentErrorV1 as v, type ElenaAgentExtraGroupV1 as w, type ElenaAgentKeyCreateRequestV1 as x, type ElenaAgentKeyListV1 as y, type ElenaAgentKeyMetadataV1 as z };
|