@nymbalhq/config 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { CommerceSlot, Slot, CommerceSlotAdapters } from '@nymbalhq/types';
2
+ import { CommerceSlot, Slot, CommerceSlotAdapters, ResolvedOriginLock, SecurityNetwork, ResolvedNetwork } from '@nymbalhq/types';
3
3
  export { CommerceSlot, Slot } from '@nymbalhq/types';
4
4
 
5
5
  /** The schema's JWT secret when none is configured: fine for development, refused in production. */
@@ -9,979 +9,219 @@ declare const storeSchema: z.ZodObject<{
9
9
  currency: z.ZodString;
10
10
  locale: z.ZodString;
11
11
  timezone: z.ZodString;
12
- /** The storefront's public URL, which the order email links from; with none, the email has no link. */
13
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
14
- }, "strip", z.ZodTypeAny, {
15
- name: string;
16
- currency: string;
17
- locale: string;
18
- timezone: string;
19
- url?: string | undefined;
20
- }, {
21
- name: string;
22
- currency: string;
23
- locale: string;
24
- timezone: string;
25
- url?: string | undefined;
26
- }>;
12
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
13
+ shipFrom: z.ZodOptional<z.ZodObject<{
14
+ firstName: z.ZodString;
15
+ lastName: z.ZodString;
16
+ company: z.ZodOptional<z.ZodString>;
17
+ addressLine1: z.ZodString;
18
+ addressLine2: z.ZodOptional<z.ZodString>;
19
+ city: z.ZodString;
20
+ region: z.ZodString;
21
+ postalCode: z.ZodString;
22
+ country: z.ZodString;
23
+ phone: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>>;
25
+ }, z.core.$strip>;
27
26
  /** The shared Redis connection of the `redis` document store and the `redis-streams` bus. */
28
27
  declare const redisSchema: z.ZodObject<{
29
- /** Defaults to `REDIS_URL`. */
30
28
  url: z.ZodOptional<z.ZodString>;
31
- /** Namespaces every key and stream; defaults to `NYMBAL_REDIS_PREFIX`, then `'nymbal'`. */
32
29
  prefix: z.ZodOptional<z.ZodString>;
33
- /** How long a publish waits for the groups it delivers to (default 15 000). */
34
30
  ackTimeoutMs: z.ZodOptional<z.ZodNumber>;
35
- /** How long an entry may stay pending on a consumer before a live one takes it over (default 5 000). */
36
31
  claimIdleMs: z.ZodOptional<z.ZodNumber>;
37
- /** The approximate length each stream is trimmed to (default 10 000). */
38
32
  streamMaxLen: z.ZodOptional<z.ZodNumber>;
39
- }, "strict", z.ZodTypeAny, {
40
- url?: string | undefined;
41
- prefix?: string | undefined;
42
- ackTimeoutMs?: number | undefined;
43
- claimIdleMs?: number | undefined;
44
- streamMaxLen?: number | undefined;
45
- }, {
46
- url?: string | undefined;
47
- prefix?: string | undefined;
48
- ackTimeoutMs?: number | undefined;
49
- claimIdleMs?: number | undefined;
50
- streamMaxLen?: number | undefined;
51
- }>;
33
+ }, z.core.$strict>;
52
34
  /**
53
35
  * The bucket `media: { provider: 's3' }` stores in. Each field falls back to the environment in the platform;
54
36
  * credentials are never config keys: the AWS SDK's default chain provides them.
55
37
  */
56
38
  declare const s3Schema: z.ZodObject<{
57
- /** Defaults to `S3_BUCKET`; one of the two is required. */
58
39
  bucket: z.ZodOptional<z.ZodString>;
59
- /** Defaults to `AWS_REGION`, then `'us-east-1'`. */
60
40
  region: z.ZodOptional<z.ZodString>;
61
- /** An S3-compatible API (MinIO, R2); defaults to `S3_ENDPOINT`, then AWS. */
62
41
  endpoint: z.ZodOptional<z.ZodString>;
63
- /** Where every object key starts; defaults to `NYMBAL_S3_PREFIX`, then none. */
64
42
  prefix: z.ZodOptional<z.ZodString>;
65
- /** Where the bucket's objects are served from (a CDN); defaults to `S3_PUBLIC_URL`, then the bucket's own URL. */
66
43
  publicUrl: z.ZodOptional<z.ZodString>;
67
- /** Path-style requests; true by default when an endpoint is set. */
68
44
  forcePathStyle: z.ZodOptional<z.ZodBoolean>;
69
- }, "strict", z.ZodTypeAny, {
70
- prefix?: string | undefined;
71
- bucket?: string | undefined;
72
- region?: string | undefined;
73
- endpoint?: string | undefined;
74
- publicUrl?: string | undefined;
75
- forcePathStyle?: boolean | undefined;
76
- }, {
77
- prefix?: string | undefined;
78
- bucket?: string | undefined;
79
- region?: string | undefined;
80
- endpoint?: string | undefined;
81
- publicUrl?: string | undefined;
82
- forcePathStyle?: boolean | undefined;
83
- }>;
84
- declare const infrastructureSchema: z.ZodEffects<z.ZodObject<{
85
- commandStore: z.ZodEnum<["sqlite", "postgres"]>;
86
- documentStore: z.ZodEffects<z.ZodObject<{
87
- provider: z.ZodEffects<z.ZodString, string, string>;
88
- /** The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. */
45
+ }, z.core.$strict>;
46
+ declare const infrastructureSchema: z.ZodObject<{
47
+ commandStore: z.ZodEnum<{
48
+ sqlite: "sqlite";
49
+ postgres: "postgres";
50
+ }>;
51
+ documentStore: z.ZodObject<{
52
+ provider: z.ZodString;
89
53
  package: z.ZodOptional<z.ZodString>;
90
- /** The adapter's `ctx.config`, for a provider whose connection the kernel does not build. */
91
54
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
92
- }, "strip", z.ZodTypeAny, {
93
- provider: string;
94
- package?: string | undefined;
95
- config?: Record<string, unknown> | undefined;
96
- }, {
97
- provider: string;
98
- package?: string | undefined;
99
- config?: Record<string, unknown> | undefined;
100
- }>, {
101
- provider: string;
102
- package?: string | undefined;
103
- config?: Record<string, unknown> | undefined;
104
- }, {
105
- provider: string;
106
- package?: string | undefined;
107
- config?: Record<string, unknown> | undefined;
108
- }>;
109
- eventBus: z.ZodEffects<z.ZodObject<{
110
- provider: z.ZodEffects<z.ZodString, string, string>;
111
- /** The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. */
55
+ }, z.core.$strip>;
56
+ eventBus: z.ZodObject<{
57
+ provider: z.ZodString;
112
58
  package: z.ZodOptional<z.ZodString>;
113
- /** The adapter's `ctx.config`, for a provider whose connection the kernel does not build. */
114
59
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
115
- }, "strip", z.ZodTypeAny, {
116
- provider: string;
117
- package?: string | undefined;
118
- config?: Record<string, unknown> | undefined;
119
- }, {
120
- provider: string;
121
- package?: string | undefined;
122
- config?: Record<string, unknown> | undefined;
123
- }>, {
124
- provider: string;
125
- package?: string | undefined;
126
- config?: Record<string, unknown> | undefined;
127
- }, {
128
- provider: string;
129
- package?: string | undefined;
130
- config?: Record<string, unknown> | undefined;
131
- }>;
132
- media: z.ZodDefault<z.ZodEffects<z.ZodObject<{
133
- provider: z.ZodEffects<z.ZodString, string, string>;
134
- /** The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. */
60
+ }, z.core.$strip>;
61
+ media: z.ZodDefault<z.ZodObject<{
62
+ provider: z.ZodString;
135
63
  package: z.ZodOptional<z.ZodString>;
136
- /** The adapter's `ctx.config`, for a provider whose connection the kernel does not build. */
137
64
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
138
- }, "strip", z.ZodTypeAny, {
139
- provider: string;
140
- package?: string | undefined;
141
- config?: Record<string, unknown> | undefined;
142
- }, {
143
- provider: string;
144
- package?: string | undefined;
145
- config?: Record<string, unknown> | undefined;
146
- }>, {
147
- provider: string;
148
- package?: string | undefined;
149
- config?: Record<string, unknown> | undefined;
150
- }, {
151
- provider: string;
152
- package?: string | undefined;
153
- config?: Record<string, unknown> | undefined;
154
- }>>;
65
+ }, z.core.$strip>>;
155
66
  redis: z.ZodOptional<z.ZodObject<{
156
- /** Defaults to `REDIS_URL`. */
157
67
  url: z.ZodOptional<z.ZodString>;
158
- /** Namespaces every key and stream; defaults to `NYMBAL_REDIS_PREFIX`, then `'nymbal'`. */
159
68
  prefix: z.ZodOptional<z.ZodString>;
160
- /** How long a publish waits for the groups it delivers to (default 15 000). */
161
69
  ackTimeoutMs: z.ZodOptional<z.ZodNumber>;
162
- /** How long an entry may stay pending on a consumer before a live one takes it over (default 5 000). */
163
70
  claimIdleMs: z.ZodOptional<z.ZodNumber>;
164
- /** The approximate length each stream is trimmed to (default 10 000). */
165
71
  streamMaxLen: z.ZodOptional<z.ZodNumber>;
166
- }, "strict", z.ZodTypeAny, {
167
- url?: string | undefined;
168
- prefix?: string | undefined;
169
- ackTimeoutMs?: number | undefined;
170
- claimIdleMs?: number | undefined;
171
- streamMaxLen?: number | undefined;
172
- }, {
173
- url?: string | undefined;
174
- prefix?: string | undefined;
175
- ackTimeoutMs?: number | undefined;
176
- claimIdleMs?: number | undefined;
177
- streamMaxLen?: number | undefined;
178
- }>>;
72
+ }, z.core.$strict>>;
179
73
  s3: z.ZodOptional<z.ZodObject<{
180
- /** Defaults to `S3_BUCKET`; one of the two is required. */
181
74
  bucket: z.ZodOptional<z.ZodString>;
182
- /** Defaults to `AWS_REGION`, then `'us-east-1'`. */
183
75
  region: z.ZodOptional<z.ZodString>;
184
- /** An S3-compatible API (MinIO, R2); defaults to `S3_ENDPOINT`, then AWS. */
185
76
  endpoint: z.ZodOptional<z.ZodString>;
186
- /** Where every object key starts; defaults to `NYMBAL_S3_PREFIX`, then none. */
187
77
  prefix: z.ZodOptional<z.ZodString>;
188
- /** Where the bucket's objects are served from (a CDN); defaults to `S3_PUBLIC_URL`, then the bucket's own URL. */
189
78
  publicUrl: z.ZodOptional<z.ZodString>;
190
- /** Path-style requests; true by default when an endpoint is set. */
191
79
  forcePathStyle: z.ZodOptional<z.ZodBoolean>;
192
- }, "strict", z.ZodTypeAny, {
193
- prefix?: string | undefined;
194
- bucket?: string | undefined;
195
- region?: string | undefined;
196
- endpoint?: string | undefined;
197
- publicUrl?: string | undefined;
198
- forcePathStyle?: boolean | undefined;
199
- }, {
200
- prefix?: string | undefined;
201
- bucket?: string | undefined;
202
- region?: string | undefined;
203
- endpoint?: string | undefined;
204
- publicUrl?: string | undefined;
205
- forcePathStyle?: boolean | undefined;
206
- }>>;
207
- }, "strict", z.ZodTypeAny, {
208
- documentStore: {
209
- provider: string;
210
- package?: string | undefined;
211
- config?: Record<string, unknown> | undefined;
212
- };
213
- eventBus: {
214
- provider: string;
215
- package?: string | undefined;
216
- config?: Record<string, unknown> | undefined;
217
- };
218
- media: {
219
- provider: string;
220
- package?: string | undefined;
221
- config?: Record<string, unknown> | undefined;
222
- };
223
- commandStore: "sqlite" | "postgres";
224
- redis?: {
225
- url?: string | undefined;
226
- prefix?: string | undefined;
227
- ackTimeoutMs?: number | undefined;
228
- claimIdleMs?: number | undefined;
229
- streamMaxLen?: number | undefined;
230
- } | undefined;
231
- s3?: {
232
- prefix?: string | undefined;
233
- bucket?: string | undefined;
234
- region?: string | undefined;
235
- endpoint?: string | undefined;
236
- publicUrl?: string | undefined;
237
- forcePathStyle?: boolean | undefined;
238
- } | undefined;
239
- }, {
240
- documentStore: {
241
- provider: string;
242
- package?: string | undefined;
243
- config?: Record<string, unknown> | undefined;
244
- };
245
- eventBus: {
246
- provider: string;
247
- package?: string | undefined;
248
- config?: Record<string, unknown> | undefined;
249
- };
250
- commandStore: "sqlite" | "postgres";
251
- media?: {
252
- provider: string;
253
- package?: string | undefined;
254
- config?: Record<string, unknown> | undefined;
255
- } | undefined;
256
- redis?: {
257
- url?: string | undefined;
258
- prefix?: string | undefined;
259
- ackTimeoutMs?: number | undefined;
260
- claimIdleMs?: number | undefined;
261
- streamMaxLen?: number | undefined;
262
- } | undefined;
263
- s3?: {
264
- prefix?: string | undefined;
265
- bucket?: string | undefined;
266
- region?: string | undefined;
267
- endpoint?: string | undefined;
268
- publicUrl?: string | undefined;
269
- forcePathStyle?: boolean | undefined;
270
- } | undefined;
271
- }>, {
272
- documentStore: {
273
- provider: string;
274
- package?: string | undefined;
275
- config?: Record<string, unknown> | undefined;
276
- };
277
- eventBus: {
278
- provider: string;
279
- package?: string | undefined;
280
- config?: Record<string, unknown> | undefined;
281
- };
282
- media: {
283
- provider: string;
284
- package?: string | undefined;
285
- config?: Record<string, unknown> | undefined;
286
- };
287
- commandStore: "sqlite" | "postgres";
288
- redis?: {
289
- url?: string | undefined;
290
- prefix?: string | undefined;
291
- ackTimeoutMs?: number | undefined;
292
- claimIdleMs?: number | undefined;
293
- streamMaxLen?: number | undefined;
294
- } | undefined;
295
- s3?: {
296
- prefix?: string | undefined;
297
- bucket?: string | undefined;
298
- region?: string | undefined;
299
- endpoint?: string | undefined;
300
- publicUrl?: string | undefined;
301
- forcePathStyle?: boolean | undefined;
302
- } | undefined;
303
- }, {
304
- documentStore: {
305
- provider: string;
306
- package?: string | undefined;
307
- config?: Record<string, unknown> | undefined;
308
- };
309
- eventBus: {
310
- provider: string;
311
- package?: string | undefined;
312
- config?: Record<string, unknown> | undefined;
313
- };
314
- commandStore: "sqlite" | "postgres";
315
- media?: {
316
- provider: string;
317
- package?: string | undefined;
318
- config?: Record<string, unknown> | undefined;
319
- } | undefined;
320
- redis?: {
321
- url?: string | undefined;
322
- prefix?: string | undefined;
323
- ackTimeoutMs?: number | undefined;
324
- claimIdleMs?: number | undefined;
325
- streamMaxLen?: number | undefined;
326
- } | undefined;
327
- s3?: {
328
- prefix?: string | undefined;
329
- bucket?: string | undefined;
330
- region?: string | undefined;
331
- endpoint?: string | undefined;
332
- publicUrl?: string | undefined;
333
- forcePathStyle?: boolean | undefined;
334
- } | undefined;
335
- }>;
336
- declare const securitySchema: z.ZodEffects<z.ZodObject<{
337
- /** `middleware` is the kernel's own; any other resolves as a commerce provider does, `security-<adapter>`. */
338
- adapter: z.ZodEffects<z.ZodString, string, string>;
339
- /** The npm package the adapter comes from, in place of `@nymbalhq/security-<adapter>`. */
80
+ }, z.core.$strict>>;
81
+ }, z.core.$strict>;
82
+ declare const securitySchema: z.ZodObject<{
83
+ adapter: z.ZodString;
340
84
  package: z.ZodOptional<z.ZodString>;
341
- /** A third-party adapter's `ctx.config`; `cloudflare` reads `security.cloudflare`, and `middleware` takes none. */
342
85
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
343
86
  rateLimit: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
344
87
  requests: z.ZodNumber;
345
88
  window: z.ZodString;
346
- action: z.ZodEnum<["block", "challenge", "throttle"]>;
347
- /** Counts only the requests to the path that carry this header, such as `x-nymbal-order-email`. */
89
+ action: z.ZodEnum<{
90
+ block: "block";
91
+ challenge: "challenge";
92
+ throttle: "throttle";
93
+ }>;
348
94
  header: z.ZodOptional<z.ZodString>;
349
- }, "strip", z.ZodTypeAny, {
350
- requests: number;
351
- window: string;
352
- action: "block" | "challenge" | "throttle";
353
- header?: string | undefined;
354
- }, {
355
- requests: number;
356
- window: string;
357
- action: "block" | "challenge" | "throttle";
358
- header?: string | undefined;
359
- }>>>;
95
+ }, z.core.$strip>>>;
360
96
  botProtection: z.ZodDefault<z.ZodObject<{
361
- mode: z.ZodDefault<z.ZodEnum<["off", "managed", "strict"]>>;
362
- allowList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
363
- }, "strip", z.ZodTypeAny, {
364
- mode: "strict" | "off" | "managed";
365
- allowList: string[];
366
- }, {
367
- mode?: "strict" | "off" | "managed" | undefined;
368
- allowList?: string[] | undefined;
369
- }>>;
370
- headers: z.ZodDefault<z.ZodObject<{
97
+ mode: z.ZodDefault<z.ZodEnum<{
98
+ off: "off";
99
+ managed: "managed";
100
+ strict: "strict";
101
+ }>>;
102
+ allowList: z.ZodDefault<z.ZodArray<z.ZodString>>;
103
+ }, z.core.$strip>>;
104
+ headers: z.ZodPrefault<z.ZodObject<{
371
105
  hsts: z.ZodDefault<z.ZodBoolean>;
372
- contentSecurityPolicy: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["strict", "relaxed", "off"]>, z.ZodString]>>;
106
+ contentSecurityPolicy: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
107
+ off: "off";
108
+ strict: "strict";
109
+ relaxed: "relaxed";
110
+ }>, z.ZodString]>>;
373
111
  referrerPolicy: z.ZodDefault<z.ZodString>;
374
- xFrameOptions: z.ZodDefault<z.ZodEnum<["deny", "sameorigin"]>>;
375
- }, "strip", z.ZodTypeAny, {
376
- hsts: boolean;
377
- contentSecurityPolicy: string;
378
- referrerPolicy: string;
379
- xFrameOptions: "deny" | "sameorigin";
380
- }, {
381
- hsts?: boolean | undefined;
382
- contentSecurityPolicy?: string | undefined;
383
- referrerPolicy?: string | undefined;
384
- xFrameOptions?: "deny" | "sameorigin" | undefined;
385
- }>>;
112
+ xFrameOptions: z.ZodDefault<z.ZodEnum<{
113
+ deny: "deny";
114
+ sameorigin: "sameorigin";
115
+ }>>;
116
+ }, z.core.$strip>>;
386
117
  csrf: z.ZodDefault<z.ZodBoolean>;
387
- auth: z.ZodDefault<z.ZodObject<{
118
+ originLock: z.ZodPrefault<z.ZodObject<{
119
+ header: z.ZodDefault<z.ZodString>;
120
+ }, z.core.$strip>>;
121
+ auth: z.ZodPrefault<z.ZodObject<{
388
122
  jwtSecret: z.ZodDefault<z.ZodString>;
389
123
  accessTtl: z.ZodDefault<z.ZodString>;
390
124
  refreshTtl: z.ZodDefault<z.ZodString>;
391
- }, "strip", z.ZodTypeAny, {
392
- jwtSecret: string;
393
- accessTtl: string;
394
- refreshTtl: string;
395
- }, {
396
- jwtSecret?: string | undefined;
397
- accessTtl?: string | undefined;
398
- refreshTtl?: string | undefined;
399
- }>>;
125
+ }, z.core.$strip>>;
400
126
  cloudflare: z.ZodOptional<z.ZodObject<{
401
127
  zoneId: z.ZodOptional<z.ZodString>;
402
128
  apiToken: z.ZodOptional<z.ZodString>;
403
- /** The Cloudflare v4 API; the adapter defaults it to https://api.cloudflare.com/client/v4. */
404
129
  apiBase: z.ZodOptional<z.ZodString>;
405
- }, "strip", z.ZodTypeAny, {
406
- zoneId?: string | undefined;
407
- apiToken?: string | undefined;
408
- apiBase?: string | undefined;
409
- }, {
410
- zoneId?: string | undefined;
411
- apiToken?: string | undefined;
412
- apiBase?: string | undefined;
413
- }>>;
130
+ }, z.core.$strip>>;
414
131
  geo: z.ZodDefault<z.ZodObject<{
415
- block: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
416
- }, "strip", z.ZodTypeAny, {
417
- block: string[];
418
- }, {
419
- block?: string[] | undefined;
420
- }>>;
132
+ block: z.ZodDefault<z.ZodArray<z.ZodString>>;
133
+ }, z.core.$strip>>;
421
134
  customRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
422
135
  name: z.ZodString;
423
136
  expression: z.ZodString;
424
- action: z.ZodEnum<["block", "managed_challenge", "js_challenge", "log"]>;
425
- }, "strip", z.ZodTypeAny, {
426
- name: string;
427
- action: "block" | "managed_challenge" | "js_challenge" | "log";
428
- expression: string;
429
- }, {
430
- name: string;
431
- action: "block" | "managed_challenge" | "js_challenge" | "log";
432
- expression: string;
433
- }>, "many">>;
434
- managedRulesets: z.ZodDefault<z.ZodArray<z.ZodEnum<["cloudflare", "owasp"]>, "many">>;
435
- }, "strip", z.ZodTypeAny, {
436
- adapter: string;
437
- rateLimit: Record<string, {
438
- requests: number;
439
- window: string;
440
- action: "block" | "challenge" | "throttle";
441
- header?: string | undefined;
442
- }>;
443
- botProtection: {
444
- mode: "strict" | "off" | "managed";
445
- allowList: string[];
446
- };
447
- headers: {
448
- hsts: boolean;
449
- contentSecurityPolicy: string;
450
- referrerPolicy: string;
451
- xFrameOptions: "deny" | "sameorigin";
452
- };
453
- csrf: boolean;
454
- auth: {
455
- jwtSecret: string;
456
- accessTtl: string;
457
- refreshTtl: string;
458
- };
459
- geo: {
460
- block: string[];
461
- };
462
- customRules: {
463
- name: string;
464
- action: "block" | "managed_challenge" | "js_challenge" | "log";
465
- expression: string;
466
- }[];
467
- managedRulesets: ("cloudflare" | "owasp")[];
468
- package?: string | undefined;
469
- config?: Record<string, unknown> | undefined;
470
- cloudflare?: {
471
- zoneId?: string | undefined;
472
- apiToken?: string | undefined;
473
- apiBase?: string | undefined;
474
- } | undefined;
475
- }, {
476
- adapter: string;
477
- package?: string | undefined;
478
- config?: Record<string, unknown> | undefined;
479
- rateLimit?: Record<string, {
480
- requests: number;
481
- window: string;
482
- action: "block" | "challenge" | "throttle";
483
- header?: string | undefined;
484
- }> | undefined;
485
- botProtection?: {
486
- mode?: "strict" | "off" | "managed" | undefined;
487
- allowList?: string[] | undefined;
488
- } | undefined;
489
- headers?: {
490
- hsts?: boolean | undefined;
491
- contentSecurityPolicy?: string | undefined;
492
- referrerPolicy?: string | undefined;
493
- xFrameOptions?: "deny" | "sameorigin" | undefined;
494
- } | undefined;
495
- csrf?: boolean | undefined;
496
- auth?: {
497
- jwtSecret?: string | undefined;
498
- accessTtl?: string | undefined;
499
- refreshTtl?: string | undefined;
500
- } | undefined;
501
- cloudflare?: {
502
- zoneId?: string | undefined;
503
- apiToken?: string | undefined;
504
- apiBase?: string | undefined;
505
- } | undefined;
506
- geo?: {
507
- block?: string[] | undefined;
508
- } | undefined;
509
- customRules?: {
510
- name: string;
511
- action: "block" | "managed_challenge" | "js_challenge" | "log";
512
- expression: string;
513
- }[] | undefined;
514
- managedRulesets?: ("cloudflare" | "owasp")[] | undefined;
515
- }>, {
516
- adapter: string;
517
- rateLimit: Record<string, {
518
- requests: number;
519
- window: string;
520
- action: "block" | "challenge" | "throttle";
521
- header?: string | undefined;
522
- }>;
523
- botProtection: {
524
- mode: "strict" | "off" | "managed";
525
- allowList: string[];
526
- };
527
- headers: {
528
- hsts: boolean;
529
- contentSecurityPolicy: string;
530
- referrerPolicy: string;
531
- xFrameOptions: "deny" | "sameorigin";
532
- };
533
- csrf: boolean;
534
- auth: {
535
- jwtSecret: string;
536
- accessTtl: string;
537
- refreshTtl: string;
538
- };
539
- geo: {
540
- block: string[];
541
- };
542
- customRules: {
543
- name: string;
544
- action: "block" | "managed_challenge" | "js_challenge" | "log";
545
- expression: string;
546
- }[];
547
- managedRulesets: ("cloudflare" | "owasp")[];
548
- package?: string | undefined;
549
- config?: Record<string, unknown> | undefined;
550
- cloudflare?: {
551
- zoneId?: string | undefined;
552
- apiToken?: string | undefined;
553
- apiBase?: string | undefined;
554
- } | undefined;
555
- }, {
556
- adapter: string;
557
- package?: string | undefined;
558
- config?: Record<string, unknown> | undefined;
559
- rateLimit?: Record<string, {
560
- requests: number;
561
- window: string;
562
- action: "block" | "challenge" | "throttle";
563
- header?: string | undefined;
564
- }> | undefined;
565
- botProtection?: {
566
- mode?: "strict" | "off" | "managed" | undefined;
567
- allowList?: string[] | undefined;
568
- } | undefined;
569
- headers?: {
570
- hsts?: boolean | undefined;
571
- contentSecurityPolicy?: string | undefined;
572
- referrerPolicy?: string | undefined;
573
- xFrameOptions?: "deny" | "sameorigin" | undefined;
574
- } | undefined;
575
- csrf?: boolean | undefined;
576
- auth?: {
577
- jwtSecret?: string | undefined;
578
- accessTtl?: string | undefined;
579
- refreshTtl?: string | undefined;
580
- } | undefined;
581
- cloudflare?: {
582
- zoneId?: string | undefined;
583
- apiToken?: string | undefined;
584
- apiBase?: string | undefined;
585
- } | undefined;
586
- geo?: {
587
- block?: string[] | undefined;
588
- } | undefined;
589
- customRules?: {
590
- name: string;
591
- action: "block" | "managed_challenge" | "js_challenge" | "log";
592
- expression: string;
593
- }[] | undefined;
594
- managedRulesets?: ("cloudflare" | "owasp")[] | undefined;
595
- }>;
137
+ action: z.ZodEnum<{
138
+ block: "block";
139
+ managed_challenge: "managed_challenge";
140
+ js_challenge: "js_challenge";
141
+ log: "log";
142
+ }>;
143
+ }, z.core.$strip>>>;
144
+ managedRulesets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
145
+ cloudflare: "cloudflare";
146
+ owasp: "owasp";
147
+ }>>>;
148
+ }, z.core.$strip>;
596
149
  declare const commerceSchema: z.ZodObject<{
597
- payments: z.ZodEffects<z.ZodObject<{
598
- provider: z.ZodEffects<z.ZodString, string, string>;
150
+ payments: z.ZodObject<{
151
+ provider: z.ZodString;
599
152
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
600
- /**
601
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
602
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
603
- */
604
153
  package: z.ZodOptional<z.ZodString>;
605
- }, "strip", z.ZodTypeAny, {
606
- provider: string;
607
- package?: string | undefined;
608
- config?: Record<string, unknown> | undefined;
609
- }, {
610
- provider: string;
611
- package?: string | undefined;
612
- config?: Record<string, unknown> | undefined;
613
- }>, {
614
- provider: string;
615
- package?: string | undefined;
616
- config?: Record<string, unknown> | undefined;
617
- }, {
618
- provider: string;
619
- package?: string | undefined;
620
- config?: Record<string, unknown> | undefined;
621
- }>;
622
- email: z.ZodEffects<z.ZodObject<{
623
- provider: z.ZodEffects<z.ZodString, string, string>;
154
+ }, z.core.$strip>;
155
+ email: z.ZodObject<{
156
+ provider: z.ZodString;
624
157
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
625
- /**
626
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
627
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
628
- */
629
158
  package: z.ZodOptional<z.ZodString>;
630
- }, "strip", z.ZodTypeAny, {
631
- provider: string;
632
- package?: string | undefined;
633
- config?: Record<string, unknown> | undefined;
634
- }, {
635
- provider: string;
636
- package?: string | undefined;
637
- config?: Record<string, unknown> | undefined;
638
- }>, {
639
- provider: string;
640
- package?: string | undefined;
641
- config?: Record<string, unknown> | undefined;
642
- }, {
643
- provider: string;
644
- package?: string | undefined;
645
- config?: Record<string, unknown> | undefined;
646
- }>;
647
- reviews: z.ZodEffects<z.ZodObject<{
648
- provider: z.ZodEffects<z.ZodString, string, string>;
159
+ }, z.core.$strip>;
160
+ reviews: z.ZodObject<{
161
+ provider: z.ZodString;
649
162
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
650
- /**
651
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
652
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
653
- */
654
163
  package: z.ZodOptional<z.ZodString>;
655
- }, "strip", z.ZodTypeAny, {
656
- provider: string;
657
- package?: string | undefined;
658
- config?: Record<string, unknown> | undefined;
659
- }, {
660
- provider: string;
661
- package?: string | undefined;
662
- config?: Record<string, unknown> | undefined;
663
- }>, {
664
- provider: string;
665
- package?: string | undefined;
666
- config?: Record<string, unknown> | undefined;
667
- }, {
668
- provider: string;
669
- package?: string | undefined;
670
- config?: Record<string, unknown> | undefined;
671
- }>;
672
- search: z.ZodEffects<z.ZodObject<{
673
- provider: z.ZodEffects<z.ZodString, string, string>;
164
+ }, z.core.$strip>;
165
+ search: z.ZodObject<{
166
+ provider: z.ZodString;
674
167
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
675
- /**
676
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
677
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
678
- */
679
168
  package: z.ZodOptional<z.ZodString>;
680
- }, "strip", z.ZodTypeAny, {
681
- provider: string;
682
- package?: string | undefined;
683
- config?: Record<string, unknown> | undefined;
684
- }, {
685
- provider: string;
686
- package?: string | undefined;
687
- config?: Record<string, unknown> | undefined;
688
- }>, {
689
- provider: string;
690
- package?: string | undefined;
691
- config?: Record<string, unknown> | undefined;
692
- }, {
693
- provider: string;
694
- package?: string | undefined;
695
- config?: Record<string, unknown> | undefined;
696
- }>;
697
- analytics: z.ZodEffects<z.ZodObject<{
698
- provider: z.ZodEffects<z.ZodString, string, string>;
169
+ }, z.core.$strip>;
170
+ analytics: z.ZodObject<{
171
+ provider: z.ZodString;
699
172
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
700
- /**
701
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
702
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
703
- */
704
173
  package: z.ZodOptional<z.ZodString>;
705
- }, "strip", z.ZodTypeAny, {
706
- provider: string;
707
- package?: string | undefined;
708
- config?: Record<string, unknown> | undefined;
709
- }, {
710
- provider: string;
711
- package?: string | undefined;
712
- config?: Record<string, unknown> | undefined;
713
- }>, {
714
- provider: string;
715
- package?: string | undefined;
716
- config?: Record<string, unknown> | undefined;
717
- }, {
718
- provider: string;
719
- package?: string | undefined;
720
- config?: Record<string, unknown> | undefined;
721
- }>;
722
- shipping: z.ZodEffects<z.ZodObject<{
723
- provider: z.ZodEffects<z.ZodString, string, string>;
174
+ }, z.core.$strip>;
175
+ shipping: z.ZodObject<{
176
+ provider: z.ZodString;
724
177
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
725
- /**
726
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
727
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
728
- */
729
178
  package: z.ZodOptional<z.ZodString>;
730
- }, "strip", z.ZodTypeAny, {
731
- provider: string;
732
- package?: string | undefined;
733
- config?: Record<string, unknown> | undefined;
734
- }, {
735
- provider: string;
736
- package?: string | undefined;
737
- config?: Record<string, unknown> | undefined;
738
- }>, {
739
- provider: string;
740
- package?: string | undefined;
741
- config?: Record<string, unknown> | undefined;
742
- }, {
743
- provider: string;
744
- package?: string | undefined;
745
- config?: Record<string, unknown> | undefined;
746
- }>;
747
- tax: z.ZodEffects<z.ZodObject<{
748
- provider: z.ZodEffects<z.ZodString, string, string>;
179
+ }, z.core.$strip>;
180
+ tax: z.ZodObject<{
181
+ provider: z.ZodString;
749
182
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
750
- /**
751
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
752
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
753
- */
754
183
  package: z.ZodOptional<z.ZodString>;
755
- }, "strip", z.ZodTypeAny, {
756
- provider: string;
757
- package?: string | undefined;
758
- config?: Record<string, unknown> | undefined;
759
- }, {
760
- provider: string;
761
- package?: string | undefined;
762
- config?: Record<string, unknown> | undefined;
763
- }>, {
764
- provider: string;
765
- package?: string | undefined;
766
- config?: Record<string, unknown> | undefined;
767
- }, {
768
- provider: string;
769
- package?: string | undefined;
770
- config?: Record<string, unknown> | undefined;
771
- }>;
772
- ai: z.ZodEffects<z.ZodObject<{
773
- provider: z.ZodEffects<z.ZodString, string, string>;
184
+ }, z.core.$strip>;
185
+ ai: z.ZodObject<{
186
+ provider: z.ZodString;
774
187
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
775
- /**
776
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
777
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
778
- */
779
188
  package: z.ZodOptional<z.ZodString>;
780
- }, "strip", z.ZodTypeAny, {
781
- provider: string;
782
- package?: string | undefined;
783
- config?: Record<string, unknown> | undefined;
784
- }, {
785
- provider: string;
786
- package?: string | undefined;
787
- config?: Record<string, unknown> | undefined;
788
- }>, {
789
- provider: string;
790
- package?: string | undefined;
791
- config?: Record<string, unknown> | undefined;
792
- }, {
793
- provider: string;
794
- package?: string | undefined;
795
- config?: Record<string, unknown> | undefined;
796
- }>;
797
- orders: z.ZodDefault<z.ZodObject<{
189
+ }, z.core.$strip>;
190
+ orders: z.ZodPrefault<z.ZodObject<{
798
191
  numberPrefix: z.ZodDefault<z.ZodString>;
799
192
  numberStart: z.ZodDefault<z.ZodNumber>;
800
- /** How long an order key opens the order on its own: the checkout's, and the order email's. */
801
- keyLifetime: z.ZodDefault<z.ZodObject<{
193
+ keyLifetime: z.ZodPrefault<z.ZodObject<{
802
194
  checkout: z.ZodDefault<z.ZodString>;
803
195
  email: z.ZodDefault<z.ZodString>;
804
- }, "strip", z.ZodTypeAny, {
805
- email: string;
806
- checkout: string;
807
- }, {
808
- email?: string | undefined;
809
- checkout?: string | undefined;
810
- }>>;
811
- }, "strip", z.ZodTypeAny, {
812
- numberPrefix: string;
813
- numberStart: number;
814
- keyLifetime: {
815
- email: string;
816
- checkout: string;
817
- };
818
- }, {
819
- numberPrefix?: string | undefined;
820
- numberStart?: number | undefined;
821
- keyLifetime?: {
822
- email?: string | undefined;
823
- checkout?: string | undefined;
824
- } | undefined;
825
- }>>;
826
- }, "strip", z.ZodTypeAny, {
827
- payments: {
828
- provider: string;
829
- package?: string | undefined;
830
- config?: Record<string, unknown> | undefined;
831
- };
832
- email: {
833
- provider: string;
834
- package?: string | undefined;
835
- config?: Record<string, unknown> | undefined;
836
- };
837
- reviews: {
838
- provider: string;
839
- package?: string | undefined;
840
- config?: Record<string, unknown> | undefined;
841
- };
842
- search: {
843
- provider: string;
844
- package?: string | undefined;
845
- config?: Record<string, unknown> | undefined;
846
- };
847
- analytics: {
848
- provider: string;
849
- package?: string | undefined;
850
- config?: Record<string, unknown> | undefined;
851
- };
852
- shipping: {
853
- provider: string;
854
- package?: string | undefined;
855
- config?: Record<string, unknown> | undefined;
856
- };
857
- tax: {
858
- provider: string;
859
- package?: string | undefined;
860
- config?: Record<string, unknown> | undefined;
861
- };
862
- ai: {
863
- provider: string;
864
- package?: string | undefined;
865
- config?: Record<string, unknown> | undefined;
866
- };
867
- orders: {
868
- numberPrefix: string;
869
- numberStart: number;
870
- keyLifetime: {
871
- email: string;
872
- checkout: string;
873
- };
874
- };
875
- }, {
876
- payments: {
877
- provider: string;
878
- package?: string | undefined;
879
- config?: Record<string, unknown> | undefined;
880
- };
881
- email: {
882
- provider: string;
883
- package?: string | undefined;
884
- config?: Record<string, unknown> | undefined;
885
- };
886
- reviews: {
887
- provider: string;
888
- package?: string | undefined;
889
- config?: Record<string, unknown> | undefined;
890
- };
891
- search: {
892
- provider: string;
893
- package?: string | undefined;
894
- config?: Record<string, unknown> | undefined;
895
- };
896
- analytics: {
897
- provider: string;
898
- package?: string | undefined;
899
- config?: Record<string, unknown> | undefined;
900
- };
901
- shipping: {
902
- provider: string;
903
- package?: string | undefined;
904
- config?: Record<string, unknown> | undefined;
905
- };
906
- tax: {
907
- provider: string;
908
- package?: string | undefined;
909
- config?: Record<string, unknown> | undefined;
910
- };
911
- ai: {
912
- provider: string;
913
- package?: string | undefined;
914
- config?: Record<string, unknown> | undefined;
915
- };
916
- orders?: {
917
- numberPrefix?: string | undefined;
918
- numberStart?: number | undefined;
919
- keyLifetime?: {
920
- email?: string | undefined;
921
- checkout?: string | undefined;
922
- } | undefined;
923
- } | undefined;
924
- }>;
196
+ }, z.core.$strip>>;
197
+ }, z.core.$strip>>;
198
+ }, z.core.$strip>;
925
199
  declare const httpSchema: z.ZodObject<{
926
- adapter: z.ZodDefault<z.ZodEnum<["fastify", "hono"]>>;
200
+ adapter: z.ZodDefault<z.ZodEnum<{
201
+ fastify: "fastify";
202
+ hono: "hono";
203
+ }>>;
927
204
  port: z.ZodDefault<z.ZodNumber>;
928
205
  host: z.ZodDefault<z.ZodString>;
929
- /**
930
- * Which `X-Forwarded-For` entries set the client IP the rate limiter keys on. A number trusts that many proxy hops
931
- * nearest the server (`1` behind one platform proxy); `0` trusts none. `true` trusts every entry, so a client's own
932
- * left-most value wins: spoofable unless your proxy overwrites the header. Left at `false` (explicitly or not),
933
- * NYMBAL_TRUST_PROXY_HOPS fills it at run time.
934
- */
935
- trustProxy: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>;
936
- cors: z.ZodDefault<z.ZodObject<{
937
- allowedOrigins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
206
+ trustedProxies: z.ZodOptional<z.ZodArray<z.ZodString>>;
207
+ clientIpHeader: z.ZodOptional<z.ZodString>;
208
+ trustProxy: z.ZodOptional<z.ZodNever>;
209
+ cors: z.ZodPrefault<z.ZodObject<{
210
+ allowedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
938
211
  credentials: z.ZodDefault<z.ZodBoolean>;
939
- }, "strip", z.ZodTypeAny, {
940
- allowedOrigins: string[];
941
- credentials: boolean;
942
- }, {
943
- allowedOrigins?: string[] | undefined;
944
- credentials?: boolean | undefined;
945
- }>>;
946
- }, "strip", z.ZodTypeAny, {
947
- adapter: "fastify" | "hono";
948
- port: number;
949
- host: string;
950
- trustProxy: number | boolean;
951
- cors: {
952
- allowedOrigins: string[];
953
- credentials: boolean;
954
- };
955
- }, {
956
- adapter?: "fastify" | "hono" | undefined;
957
- port?: number | undefined;
958
- host?: string | undefined;
959
- trustProxy?: number | boolean | undefined;
960
- cors?: {
961
- allowedOrigins?: string[] | undefined;
962
- credentials?: boolean | undefined;
963
- } | undefined;
964
- }>;
212
+ }, z.core.$strip>>;
213
+ }, z.core.$strip>;
965
214
  declare const deploymentSchema: z.ZodObject<{
966
- strategy: z.ZodDefault<z.ZodEnum<["standard", "blue-green"]>>;
967
- }, "strip", z.ZodTypeAny, {
968
- strategy: "standard" | "blue-green";
969
- }, {
970
- strategy?: "standard" | "blue-green" | undefined;
971
- }>;
215
+ strategy: z.ZodDefault<z.ZodEnum<{
216
+ standard: "standard";
217
+ "blue-green": "blue-green";
218
+ }>>;
219
+ }, z.core.$strip>;
972
220
  declare const featuresSchema: z.ZodObject<{
973
221
  staging: z.ZodDefault<z.ZodBoolean>;
974
222
  heartbeat: z.ZodDefault<z.ZodBoolean>;
975
223
  autoUpdates: z.ZodDefault<z.ZodBoolean>;
976
- }, "strip", z.ZodTypeAny, {
977
- staging: boolean;
978
- heartbeat: boolean;
979
- autoUpdates: boolean;
980
- }, {
981
- staging?: boolean | undefined;
982
- heartbeat?: boolean | undefined;
983
- autoUpdates?: boolean | undefined;
984
- }>;
224
+ }, z.core.$strip>;
985
225
  /**
986
226
  * The bucket delivered events past retention are archived to before they are deleted. Its objects hold customer
987
227
  * data, so it must be private: never the media bucket, which serves its objects publicly. Credentials come from the
@@ -990,1701 +230,378 @@ declare const featuresSchema: z.ZodObject<{
990
230
  declare const eventArchiveSchema: z.ZodObject<{
991
231
  adapter: z.ZodLiteral<"s3">;
992
232
  bucket: z.ZodString;
993
- /** Where every archive key starts; none when not given. */
994
233
  prefix: z.ZodOptional<z.ZodString>;
995
- /** `'us-east-1'` when not given. */
996
234
  region: z.ZodOptional<z.ZodString>;
997
- /** An S3-compatible API (MinIO, R2). */
998
235
  endpoint: z.ZodOptional<z.ZodString>;
999
- /** Path-style requests; true by default when an endpoint is set. */
1000
236
  forcePathStyle: z.ZodOptional<z.ZodBoolean>;
1001
- }, "strict", z.ZodTypeAny, {
1002
- bucket: string;
1003
- adapter: "s3";
1004
- prefix?: string | undefined;
1005
- region?: string | undefined;
1006
- endpoint?: string | undefined;
1007
- forcePathStyle?: boolean | undefined;
1008
- }, {
1009
- bucket: string;
1010
- adapter: "s3";
1011
- prefix?: string | undefined;
1012
- region?: string | undefined;
1013
- endpoint?: string | undefined;
1014
- forcePathStyle?: boolean | undefined;
1015
- }>;
237
+ }, z.core.$strict>;
1016
238
  declare const eventsSchema: z.ZodObject<{
1017
- /** Days a delivered event stays in the log. */
1018
239
  retentionDays: z.ZodDefault<z.ZodNumber>;
1019
240
  archive: z.ZodOptional<z.ZodObject<{
1020
241
  adapter: z.ZodLiteral<"s3">;
1021
242
  bucket: z.ZodString;
1022
- /** Where every archive key starts; none when not given. */
1023
243
  prefix: z.ZodOptional<z.ZodString>;
1024
- /** `'us-east-1'` when not given. */
1025
244
  region: z.ZodOptional<z.ZodString>;
1026
- /** An S3-compatible API (MinIO, R2). */
1027
245
  endpoint: z.ZodOptional<z.ZodString>;
1028
- /** Path-style requests; true by default when an endpoint is set. */
1029
246
  forcePathStyle: z.ZodOptional<z.ZodBoolean>;
1030
- }, "strict", z.ZodTypeAny, {
1031
- bucket: string;
1032
- adapter: "s3";
1033
- prefix?: string | undefined;
1034
- region?: string | undefined;
1035
- endpoint?: string | undefined;
1036
- forcePathStyle?: boolean | undefined;
1037
- }, {
1038
- bucket: string;
1039
- adapter: "s3";
1040
- prefix?: string | undefined;
1041
- region?: string | undefined;
1042
- endpoint?: string | undefined;
1043
- forcePathStyle?: boolean | undefined;
1044
- }>>;
1045
- }, "strict", z.ZodTypeAny, {
1046
- retentionDays: number;
1047
- archive?: {
1048
- bucket: string;
1049
- adapter: "s3";
1050
- prefix?: string | undefined;
1051
- region?: string | undefined;
1052
- endpoint?: string | undefined;
1053
- forcePathStyle?: boolean | undefined;
1054
- } | undefined;
1055
- }, {
1056
- retentionDays?: number | undefined;
1057
- archive?: {
1058
- bucket: string;
1059
- adapter: "s3";
1060
- prefix?: string | undefined;
1061
- region?: string | undefined;
1062
- endpoint?: string | undefined;
1063
- forcePathStyle?: boolean | undefined;
1064
- } | undefined;
1065
- }>;
1066
- declare const nymbalConfigSchema: z.ZodEffects<z.ZodObject<{
247
+ }, z.core.$strict>>;
248
+ }, z.core.$strict>;
249
+ /**
250
+ * The AI crawlers `robots.txt` names and allows by default, each as its vendor documents it:
251
+ * - GPTBot, OAI-SearchBot, ChatGPT-User: https://platform.openai.com/docs/bots
252
+ * - ClaudeBot, Claude-User, Claude-SearchBot:
253
+ * https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler
254
+ * - PerplexityBot, Perplexity-User: https://docs.perplexity.ai/guides/bots
255
+ * - Google-Extended: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers
256
+ * - Applebot-Extended: https://support.apple.com/en-us/119829
257
+ */
258
+ declare const DEFAULT_AGENT_CRAWLERS: readonly string[];
259
+ /** The customer fields the admin's assistant can send to its AI provider as placeholders (`[email-1]`). */
260
+ declare const ASSISTANT_MASK_FIELDS: readonly ["email", "phone", "address", "postcode", "name"];
261
+ type AssistantMaskField = (typeof ASSISTANT_MASK_FIELDS)[number];
262
+ declare const DEFAULT_ASSISTANT_MASK: readonly ["email", "phone", "address", "postcode"];
263
+ /** The link types the Agentic Commerce Protocol (2026-04-17) names for a session's `links`. */
264
+ declare const ACP_LINK_TYPES: readonly ["terms_of_use", "privacy_policy", "return_policy", "shipping_policy", "contact_us", "about_us", "faq", "support"];
265
+ /** The shortest ACP key the store takes, from the config or `NYMBAL_ACP_API_KEY`. */
266
+ declare const ACP_KEY_MIN_LENGTH = 32;
267
+ /**
268
+ * How agents reach the store. Under `mcp.writes: 'proposal'` an admin command tool's call is kept as a proposal an
269
+ * admin approves or rejects, unless `autoApprove` lists its command; `'apply'` approves every command at the call.
270
+ * Either way the proposal is recorded. A command that moves money cannot be listed in `autoApprove`. `ucp` is the
271
+ * Universal Commerce Protocol profile and its MCP endpoint; `links` are the legal pages a UCP checkout names. `acp`
272
+ * is the Agentic Commerce Protocol's checkout (beta, off unless enabled), held by a bearer key of at least 32
273
+ * characters (`apiKey`, else `NYMBAL_ACP_API_KEY`). `crawl` is what `robots.txt`, `llms.txt` and the product feed serve.
274
+ * `assistant` is what the admin's assistant may send its AI provider.
275
+ */
276
+ declare const agentsSchema: z.ZodObject<{
277
+ mcp: z.ZodPrefault<z.ZodObject<{
278
+ enabled: z.ZodDefault<z.ZodBoolean>;
279
+ writes: z.ZodDefault<z.ZodEnum<{
280
+ proposal: "proposal";
281
+ apply: "apply";
282
+ }>>;
283
+ }, z.core.$strict>>;
284
+ autoApprove: z.ZodDefault<z.ZodArray<z.ZodString>>;
285
+ ucp: z.ZodPrefault<z.ZodObject<{
286
+ enabled: z.ZodDefault<z.ZodBoolean>;
287
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
288
+ type: z.ZodString;
289
+ url: z.ZodString;
290
+ title: z.ZodOptional<z.ZodString>;
291
+ }, z.core.$strict>>>;
292
+ }, z.core.$strict>>;
293
+ acp: z.ZodPrefault<z.ZodObject<{
294
+ enabled: z.ZodDefault<z.ZodBoolean>;
295
+ apiKey: z.ZodOptional<z.ZodString>;
296
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
297
+ type: z.ZodEnum<{
298
+ terms_of_use: "terms_of_use";
299
+ privacy_policy: "privacy_policy";
300
+ return_policy: "return_policy";
301
+ shipping_policy: "shipping_policy";
302
+ contact_us: "contact_us";
303
+ about_us: "about_us";
304
+ faq: "faq";
305
+ support: "support";
306
+ }>;
307
+ url: z.ZodString;
308
+ title: z.ZodOptional<z.ZodString>;
309
+ }, z.core.$strict>>>;
310
+ merchantId: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strict>>;
312
+ crawl: z.ZodPrefault<z.ZodObject<{
313
+ robots: z.ZodDefault<z.ZodBoolean>;
314
+ llms: z.ZodDefault<z.ZodBoolean>;
315
+ feed: z.ZodDefault<z.ZodBoolean>;
316
+ allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
317
+ others: z.ZodDefault<z.ZodEnum<{
318
+ allow: "allow";
319
+ disallow: "disallow";
320
+ }>>;
321
+ }, z.core.$strict>>;
322
+ assistant: z.ZodPrefault<z.ZodObject<{
323
+ customerData: z.ZodDefault<z.ZodBoolean>;
324
+ mask: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodEnum<{
325
+ email: "email";
326
+ name: "name";
327
+ phone: "phone";
328
+ address: "address";
329
+ postcode: "postcode";
330
+ }>>, z.ZodTransform<("email" | "name" | "phone" | "address" | "postcode")[], ("email" | "name" | "phone" | "address" | "postcode")[]>>>;
331
+ }, z.core.$strict>>;
332
+ }, z.core.$strict>;
333
+ declare const nymbalConfigSchema: z.ZodObject<{
1067
334
  store: z.ZodObject<{
1068
335
  name: z.ZodString;
1069
336
  currency: z.ZodString;
1070
337
  locale: z.ZodString;
1071
338
  timezone: z.ZodString;
1072
- /** The storefront's public URL, which the order email links from; with none, the email has no link. */
1073
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1074
- }, "strip", z.ZodTypeAny, {
1075
- name: string;
1076
- currency: string;
1077
- locale: string;
1078
- timezone: string;
1079
- url?: string | undefined;
1080
- }, {
1081
- name: string;
1082
- currency: string;
1083
- locale: string;
1084
- timezone: string;
1085
- url?: string | undefined;
339
+ url: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
340
+ shipFrom: z.ZodOptional<z.ZodObject<{
341
+ firstName: z.ZodString;
342
+ lastName: z.ZodString;
343
+ company: z.ZodOptional<z.ZodString>;
344
+ addressLine1: z.ZodString;
345
+ addressLine2: z.ZodOptional<z.ZodString>;
346
+ city: z.ZodString;
347
+ region: z.ZodString;
348
+ postalCode: z.ZodString;
349
+ country: z.ZodString;
350
+ phone: z.ZodOptional<z.ZodString>;
351
+ }, z.core.$strip>>;
352
+ }, z.core.$strip>;
353
+ template: z.ZodEnum<{
354
+ astro: "astro";
355
+ nextjs: "nextjs";
1086
356
  }>;
1087
- template: z.ZodEnum<["astro", "nextjs"]>;
1088
- infrastructure: z.ZodEffects<z.ZodObject<{
1089
- commandStore: z.ZodEnum<["sqlite", "postgres"]>;
1090
- documentStore: z.ZodEffects<z.ZodObject<{
1091
- provider: z.ZodEffects<z.ZodString, string, string>;
1092
- /** The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. */
357
+ infrastructure: z.ZodObject<{
358
+ commandStore: z.ZodEnum<{
359
+ sqlite: "sqlite";
360
+ postgres: "postgres";
361
+ }>;
362
+ documentStore: z.ZodObject<{
363
+ provider: z.ZodString;
1093
364
  package: z.ZodOptional<z.ZodString>;
1094
- /** The adapter's `ctx.config`, for a provider whose connection the kernel does not build. */
1095
365
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1096
- }, "strip", z.ZodTypeAny, {
1097
- provider: string;
1098
- package?: string | undefined;
1099
- config?: Record<string, unknown> | undefined;
1100
- }, {
1101
- provider: string;
1102
- package?: string | undefined;
1103
- config?: Record<string, unknown> | undefined;
1104
- }>, {
1105
- provider: string;
1106
- package?: string | undefined;
1107
- config?: Record<string, unknown> | undefined;
1108
- }, {
1109
- provider: string;
1110
- package?: string | undefined;
1111
- config?: Record<string, unknown> | undefined;
1112
- }>;
1113
- eventBus: z.ZodEffects<z.ZodObject<{
1114
- provider: z.ZodEffects<z.ZodString, string, string>;
1115
- /** The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. */
366
+ }, z.core.$strip>;
367
+ eventBus: z.ZodObject<{
368
+ provider: z.ZodString;
1116
369
  package: z.ZodOptional<z.ZodString>;
1117
- /** The adapter's `ctx.config`, for a provider whose connection the kernel does not build. */
1118
370
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1119
- }, "strip", z.ZodTypeAny, {
1120
- provider: string;
1121
- package?: string | undefined;
1122
- config?: Record<string, unknown> | undefined;
1123
- }, {
1124
- provider: string;
1125
- package?: string | undefined;
1126
- config?: Record<string, unknown> | undefined;
1127
- }>, {
1128
- provider: string;
1129
- package?: string | undefined;
1130
- config?: Record<string, unknown> | undefined;
1131
- }, {
1132
- provider: string;
1133
- package?: string | undefined;
1134
- config?: Record<string, unknown> | undefined;
1135
- }>;
1136
- media: z.ZodDefault<z.ZodEffects<z.ZodObject<{
1137
- provider: z.ZodEffects<z.ZodString, string, string>;
1138
- /** The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. */
371
+ }, z.core.$strip>;
372
+ media: z.ZodDefault<z.ZodObject<{
373
+ provider: z.ZodString;
1139
374
  package: z.ZodOptional<z.ZodString>;
1140
- /** The adapter's `ctx.config`, for a provider whose connection the kernel does not build. */
1141
375
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1142
- }, "strip", z.ZodTypeAny, {
1143
- provider: string;
1144
- package?: string | undefined;
1145
- config?: Record<string, unknown> | undefined;
1146
- }, {
1147
- provider: string;
1148
- package?: string | undefined;
1149
- config?: Record<string, unknown> | undefined;
1150
- }>, {
1151
- provider: string;
1152
- package?: string | undefined;
1153
- config?: Record<string, unknown> | undefined;
1154
- }, {
1155
- provider: string;
1156
- package?: string | undefined;
1157
- config?: Record<string, unknown> | undefined;
1158
- }>>;
376
+ }, z.core.$strip>>;
1159
377
  redis: z.ZodOptional<z.ZodObject<{
1160
- /** Defaults to `REDIS_URL`. */
1161
378
  url: z.ZodOptional<z.ZodString>;
1162
- /** Namespaces every key and stream; defaults to `NYMBAL_REDIS_PREFIX`, then `'nymbal'`. */
1163
379
  prefix: z.ZodOptional<z.ZodString>;
1164
- /** How long a publish waits for the groups it delivers to (default 15 000). */
1165
380
  ackTimeoutMs: z.ZodOptional<z.ZodNumber>;
1166
- /** How long an entry may stay pending on a consumer before a live one takes it over (default 5 000). */
1167
381
  claimIdleMs: z.ZodOptional<z.ZodNumber>;
1168
- /** The approximate length each stream is trimmed to (default 10 000). */
1169
382
  streamMaxLen: z.ZodOptional<z.ZodNumber>;
1170
- }, "strict", z.ZodTypeAny, {
1171
- url?: string | undefined;
1172
- prefix?: string | undefined;
1173
- ackTimeoutMs?: number | undefined;
1174
- claimIdleMs?: number | undefined;
1175
- streamMaxLen?: number | undefined;
1176
- }, {
1177
- url?: string | undefined;
1178
- prefix?: string | undefined;
1179
- ackTimeoutMs?: number | undefined;
1180
- claimIdleMs?: number | undefined;
1181
- streamMaxLen?: number | undefined;
1182
- }>>;
383
+ }, z.core.$strict>>;
1183
384
  s3: z.ZodOptional<z.ZodObject<{
1184
- /** Defaults to `S3_BUCKET`; one of the two is required. */
1185
385
  bucket: z.ZodOptional<z.ZodString>;
1186
- /** Defaults to `AWS_REGION`, then `'us-east-1'`. */
1187
386
  region: z.ZodOptional<z.ZodString>;
1188
- /** An S3-compatible API (MinIO, R2); defaults to `S3_ENDPOINT`, then AWS. */
1189
387
  endpoint: z.ZodOptional<z.ZodString>;
1190
- /** Where every object key starts; defaults to `NYMBAL_S3_PREFIX`, then none. */
1191
388
  prefix: z.ZodOptional<z.ZodString>;
1192
- /** Where the bucket's objects are served from (a CDN); defaults to `S3_PUBLIC_URL`, then the bucket's own URL. */
1193
389
  publicUrl: z.ZodOptional<z.ZodString>;
1194
- /** Path-style requests; true by default when an endpoint is set. */
1195
390
  forcePathStyle: z.ZodOptional<z.ZodBoolean>;
1196
- }, "strict", z.ZodTypeAny, {
1197
- prefix?: string | undefined;
1198
- bucket?: string | undefined;
1199
- region?: string | undefined;
1200
- endpoint?: string | undefined;
1201
- publicUrl?: string | undefined;
1202
- forcePathStyle?: boolean | undefined;
1203
- }, {
1204
- prefix?: string | undefined;
1205
- bucket?: string | undefined;
1206
- region?: string | undefined;
1207
- endpoint?: string | undefined;
1208
- publicUrl?: string | undefined;
1209
- forcePathStyle?: boolean | undefined;
1210
- }>>;
1211
- }, "strict", z.ZodTypeAny, {
1212
- documentStore: {
1213
- provider: string;
1214
- package?: string | undefined;
1215
- config?: Record<string, unknown> | undefined;
1216
- };
1217
- eventBus: {
1218
- provider: string;
1219
- package?: string | undefined;
1220
- config?: Record<string, unknown> | undefined;
1221
- };
1222
- media: {
1223
- provider: string;
1224
- package?: string | undefined;
1225
- config?: Record<string, unknown> | undefined;
1226
- };
1227
- commandStore: "sqlite" | "postgres";
1228
- redis?: {
1229
- url?: string | undefined;
1230
- prefix?: string | undefined;
1231
- ackTimeoutMs?: number | undefined;
1232
- claimIdleMs?: number | undefined;
1233
- streamMaxLen?: number | undefined;
1234
- } | undefined;
1235
- s3?: {
1236
- prefix?: string | undefined;
1237
- bucket?: string | undefined;
1238
- region?: string | undefined;
1239
- endpoint?: string | undefined;
1240
- publicUrl?: string | undefined;
1241
- forcePathStyle?: boolean | undefined;
1242
- } | undefined;
1243
- }, {
1244
- documentStore: {
1245
- provider: string;
1246
- package?: string | undefined;
1247
- config?: Record<string, unknown> | undefined;
1248
- };
1249
- eventBus: {
1250
- provider: string;
1251
- package?: string | undefined;
1252
- config?: Record<string, unknown> | undefined;
1253
- };
1254
- commandStore: "sqlite" | "postgres";
1255
- media?: {
1256
- provider: string;
1257
- package?: string | undefined;
1258
- config?: Record<string, unknown> | undefined;
1259
- } | undefined;
1260
- redis?: {
1261
- url?: string | undefined;
1262
- prefix?: string | undefined;
1263
- ackTimeoutMs?: number | undefined;
1264
- claimIdleMs?: number | undefined;
1265
- streamMaxLen?: number | undefined;
1266
- } | undefined;
1267
- s3?: {
1268
- prefix?: string | undefined;
1269
- bucket?: string | undefined;
1270
- region?: string | undefined;
1271
- endpoint?: string | undefined;
1272
- publicUrl?: string | undefined;
1273
- forcePathStyle?: boolean | undefined;
1274
- } | undefined;
1275
- }>, {
1276
- documentStore: {
1277
- provider: string;
1278
- package?: string | undefined;
1279
- config?: Record<string, unknown> | undefined;
1280
- };
1281
- eventBus: {
1282
- provider: string;
1283
- package?: string | undefined;
1284
- config?: Record<string, unknown> | undefined;
1285
- };
1286
- media: {
1287
- provider: string;
1288
- package?: string | undefined;
1289
- config?: Record<string, unknown> | undefined;
1290
- };
1291
- commandStore: "sqlite" | "postgres";
1292
- redis?: {
1293
- url?: string | undefined;
1294
- prefix?: string | undefined;
1295
- ackTimeoutMs?: number | undefined;
1296
- claimIdleMs?: number | undefined;
1297
- streamMaxLen?: number | undefined;
1298
- } | undefined;
1299
- s3?: {
1300
- prefix?: string | undefined;
1301
- bucket?: string | undefined;
1302
- region?: string | undefined;
1303
- endpoint?: string | undefined;
1304
- publicUrl?: string | undefined;
1305
- forcePathStyle?: boolean | undefined;
1306
- } | undefined;
1307
- }, {
1308
- documentStore: {
1309
- provider: string;
1310
- package?: string | undefined;
1311
- config?: Record<string, unknown> | undefined;
1312
- };
1313
- eventBus: {
1314
- provider: string;
1315
- package?: string | undefined;
1316
- config?: Record<string, unknown> | undefined;
1317
- };
1318
- commandStore: "sqlite" | "postgres";
1319
- media?: {
1320
- provider: string;
1321
- package?: string | undefined;
1322
- config?: Record<string, unknown> | undefined;
1323
- } | undefined;
1324
- redis?: {
1325
- url?: string | undefined;
1326
- prefix?: string | undefined;
1327
- ackTimeoutMs?: number | undefined;
1328
- claimIdleMs?: number | undefined;
1329
- streamMaxLen?: number | undefined;
1330
- } | undefined;
1331
- s3?: {
1332
- prefix?: string | undefined;
1333
- bucket?: string | undefined;
1334
- region?: string | undefined;
1335
- endpoint?: string | undefined;
1336
- publicUrl?: string | undefined;
1337
- forcePathStyle?: boolean | undefined;
1338
- } | undefined;
1339
- }>;
1340
- security: z.ZodEffects<z.ZodObject<{
1341
- /** `middleware` is the kernel's own; any other resolves as a commerce provider does, `security-<adapter>`. */
1342
- adapter: z.ZodEffects<z.ZodString, string, string>;
1343
- /** The npm package the adapter comes from, in place of `@nymbalhq/security-<adapter>`. */
391
+ }, z.core.$strict>>;
392
+ }, z.core.$strict>;
393
+ security: z.ZodObject<{
394
+ adapter: z.ZodString;
1344
395
  package: z.ZodOptional<z.ZodString>;
1345
- /** A third-party adapter's `ctx.config`; `cloudflare` reads `security.cloudflare`, and `middleware` takes none. */
1346
396
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1347
397
  rateLimit: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1348
398
  requests: z.ZodNumber;
1349
399
  window: z.ZodString;
1350
- action: z.ZodEnum<["block", "challenge", "throttle"]>;
1351
- /** Counts only the requests to the path that carry this header, such as `x-nymbal-order-email`. */
400
+ action: z.ZodEnum<{
401
+ block: "block";
402
+ challenge: "challenge";
403
+ throttle: "throttle";
404
+ }>;
1352
405
  header: z.ZodOptional<z.ZodString>;
1353
- }, "strip", z.ZodTypeAny, {
1354
- requests: number;
1355
- window: string;
1356
- action: "block" | "challenge" | "throttle";
1357
- header?: string | undefined;
1358
- }, {
1359
- requests: number;
1360
- window: string;
1361
- action: "block" | "challenge" | "throttle";
1362
- header?: string | undefined;
1363
- }>>>;
406
+ }, z.core.$strip>>>;
1364
407
  botProtection: z.ZodDefault<z.ZodObject<{
1365
- mode: z.ZodDefault<z.ZodEnum<["off", "managed", "strict"]>>;
1366
- allowList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1367
- }, "strip", z.ZodTypeAny, {
1368
- mode: "strict" | "off" | "managed";
1369
- allowList: string[];
1370
- }, {
1371
- mode?: "strict" | "off" | "managed" | undefined;
1372
- allowList?: string[] | undefined;
1373
- }>>;
1374
- headers: z.ZodDefault<z.ZodObject<{
408
+ mode: z.ZodDefault<z.ZodEnum<{
409
+ off: "off";
410
+ managed: "managed";
411
+ strict: "strict";
412
+ }>>;
413
+ allowList: z.ZodDefault<z.ZodArray<z.ZodString>>;
414
+ }, z.core.$strip>>;
415
+ headers: z.ZodPrefault<z.ZodObject<{
1375
416
  hsts: z.ZodDefault<z.ZodBoolean>;
1376
- contentSecurityPolicy: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["strict", "relaxed", "off"]>, z.ZodString]>>;
417
+ contentSecurityPolicy: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
418
+ off: "off";
419
+ strict: "strict";
420
+ relaxed: "relaxed";
421
+ }>, z.ZodString]>>;
1377
422
  referrerPolicy: z.ZodDefault<z.ZodString>;
1378
- xFrameOptions: z.ZodDefault<z.ZodEnum<["deny", "sameorigin"]>>;
1379
- }, "strip", z.ZodTypeAny, {
1380
- hsts: boolean;
1381
- contentSecurityPolicy: string;
1382
- referrerPolicy: string;
1383
- xFrameOptions: "deny" | "sameorigin";
1384
- }, {
1385
- hsts?: boolean | undefined;
1386
- contentSecurityPolicy?: string | undefined;
1387
- referrerPolicy?: string | undefined;
1388
- xFrameOptions?: "deny" | "sameorigin" | undefined;
1389
- }>>;
423
+ xFrameOptions: z.ZodDefault<z.ZodEnum<{
424
+ deny: "deny";
425
+ sameorigin: "sameorigin";
426
+ }>>;
427
+ }, z.core.$strip>>;
1390
428
  csrf: z.ZodDefault<z.ZodBoolean>;
1391
- auth: z.ZodDefault<z.ZodObject<{
429
+ originLock: z.ZodPrefault<z.ZodObject<{
430
+ header: z.ZodDefault<z.ZodString>;
431
+ }, z.core.$strip>>;
432
+ auth: z.ZodPrefault<z.ZodObject<{
1392
433
  jwtSecret: z.ZodDefault<z.ZodString>;
1393
434
  accessTtl: z.ZodDefault<z.ZodString>;
1394
435
  refreshTtl: z.ZodDefault<z.ZodString>;
1395
- }, "strip", z.ZodTypeAny, {
1396
- jwtSecret: string;
1397
- accessTtl: string;
1398
- refreshTtl: string;
1399
- }, {
1400
- jwtSecret?: string | undefined;
1401
- accessTtl?: string | undefined;
1402
- refreshTtl?: string | undefined;
1403
- }>>;
436
+ }, z.core.$strip>>;
1404
437
  cloudflare: z.ZodOptional<z.ZodObject<{
1405
438
  zoneId: z.ZodOptional<z.ZodString>;
1406
439
  apiToken: z.ZodOptional<z.ZodString>;
1407
- /** The Cloudflare v4 API; the adapter defaults it to https://api.cloudflare.com/client/v4. */
1408
440
  apiBase: z.ZodOptional<z.ZodString>;
1409
- }, "strip", z.ZodTypeAny, {
1410
- zoneId?: string | undefined;
1411
- apiToken?: string | undefined;
1412
- apiBase?: string | undefined;
1413
- }, {
1414
- zoneId?: string | undefined;
1415
- apiToken?: string | undefined;
1416
- apiBase?: string | undefined;
1417
- }>>;
441
+ }, z.core.$strip>>;
1418
442
  geo: z.ZodDefault<z.ZodObject<{
1419
- block: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1420
- }, "strip", z.ZodTypeAny, {
1421
- block: string[];
1422
- }, {
1423
- block?: string[] | undefined;
1424
- }>>;
443
+ block: z.ZodDefault<z.ZodArray<z.ZodString>>;
444
+ }, z.core.$strip>>;
1425
445
  customRules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1426
446
  name: z.ZodString;
1427
447
  expression: z.ZodString;
1428
- action: z.ZodEnum<["block", "managed_challenge", "js_challenge", "log"]>;
1429
- }, "strip", z.ZodTypeAny, {
1430
- name: string;
1431
- action: "block" | "managed_challenge" | "js_challenge" | "log";
1432
- expression: string;
1433
- }, {
1434
- name: string;
1435
- action: "block" | "managed_challenge" | "js_challenge" | "log";
1436
- expression: string;
1437
- }>, "many">>;
1438
- managedRulesets: z.ZodDefault<z.ZodArray<z.ZodEnum<["cloudflare", "owasp"]>, "many">>;
1439
- }, "strip", z.ZodTypeAny, {
1440
- adapter: string;
1441
- rateLimit: Record<string, {
1442
- requests: number;
1443
- window: string;
1444
- action: "block" | "challenge" | "throttle";
1445
- header?: string | undefined;
1446
- }>;
1447
- botProtection: {
1448
- mode: "strict" | "off" | "managed";
1449
- allowList: string[];
1450
- };
1451
- headers: {
1452
- hsts: boolean;
1453
- contentSecurityPolicy: string;
1454
- referrerPolicy: string;
1455
- xFrameOptions: "deny" | "sameorigin";
1456
- };
1457
- csrf: boolean;
1458
- auth: {
1459
- jwtSecret: string;
1460
- accessTtl: string;
1461
- refreshTtl: string;
1462
- };
1463
- geo: {
1464
- block: string[];
1465
- };
1466
- customRules: {
1467
- name: string;
1468
- action: "block" | "managed_challenge" | "js_challenge" | "log";
1469
- expression: string;
1470
- }[];
1471
- managedRulesets: ("cloudflare" | "owasp")[];
1472
- package?: string | undefined;
1473
- config?: Record<string, unknown> | undefined;
1474
- cloudflare?: {
1475
- zoneId?: string | undefined;
1476
- apiToken?: string | undefined;
1477
- apiBase?: string | undefined;
1478
- } | undefined;
1479
- }, {
1480
- adapter: string;
1481
- package?: string | undefined;
1482
- config?: Record<string, unknown> | undefined;
1483
- rateLimit?: Record<string, {
1484
- requests: number;
1485
- window: string;
1486
- action: "block" | "challenge" | "throttle";
1487
- header?: string | undefined;
1488
- }> | undefined;
1489
- botProtection?: {
1490
- mode?: "strict" | "off" | "managed" | undefined;
1491
- allowList?: string[] | undefined;
1492
- } | undefined;
1493
- headers?: {
1494
- hsts?: boolean | undefined;
1495
- contentSecurityPolicy?: string | undefined;
1496
- referrerPolicy?: string | undefined;
1497
- xFrameOptions?: "deny" | "sameorigin" | undefined;
1498
- } | undefined;
1499
- csrf?: boolean | undefined;
1500
- auth?: {
1501
- jwtSecret?: string | undefined;
1502
- accessTtl?: string | undefined;
1503
- refreshTtl?: string | undefined;
1504
- } | undefined;
1505
- cloudflare?: {
1506
- zoneId?: string | undefined;
1507
- apiToken?: string | undefined;
1508
- apiBase?: string | undefined;
1509
- } | undefined;
1510
- geo?: {
1511
- block?: string[] | undefined;
1512
- } | undefined;
1513
- customRules?: {
1514
- name: string;
1515
- action: "block" | "managed_challenge" | "js_challenge" | "log";
1516
- expression: string;
1517
- }[] | undefined;
1518
- managedRulesets?: ("cloudflare" | "owasp")[] | undefined;
1519
- }>, {
1520
- adapter: string;
1521
- rateLimit: Record<string, {
1522
- requests: number;
1523
- window: string;
1524
- action: "block" | "challenge" | "throttle";
1525
- header?: string | undefined;
1526
- }>;
1527
- botProtection: {
1528
- mode: "strict" | "off" | "managed";
1529
- allowList: string[];
1530
- };
1531
- headers: {
1532
- hsts: boolean;
1533
- contentSecurityPolicy: string;
1534
- referrerPolicy: string;
1535
- xFrameOptions: "deny" | "sameorigin";
1536
- };
1537
- csrf: boolean;
1538
- auth: {
1539
- jwtSecret: string;
1540
- accessTtl: string;
1541
- refreshTtl: string;
1542
- };
1543
- geo: {
1544
- block: string[];
1545
- };
1546
- customRules: {
1547
- name: string;
1548
- action: "block" | "managed_challenge" | "js_challenge" | "log";
1549
- expression: string;
1550
- }[];
1551
- managedRulesets: ("cloudflare" | "owasp")[];
1552
- package?: string | undefined;
1553
- config?: Record<string, unknown> | undefined;
1554
- cloudflare?: {
1555
- zoneId?: string | undefined;
1556
- apiToken?: string | undefined;
1557
- apiBase?: string | undefined;
1558
- } | undefined;
1559
- }, {
1560
- adapter: string;
1561
- package?: string | undefined;
1562
- config?: Record<string, unknown> | undefined;
1563
- rateLimit?: Record<string, {
1564
- requests: number;
1565
- window: string;
1566
- action: "block" | "challenge" | "throttle";
1567
- header?: string | undefined;
1568
- }> | undefined;
1569
- botProtection?: {
1570
- mode?: "strict" | "off" | "managed" | undefined;
1571
- allowList?: string[] | undefined;
1572
- } | undefined;
1573
- headers?: {
1574
- hsts?: boolean | undefined;
1575
- contentSecurityPolicy?: string | undefined;
1576
- referrerPolicy?: string | undefined;
1577
- xFrameOptions?: "deny" | "sameorigin" | undefined;
1578
- } | undefined;
1579
- csrf?: boolean | undefined;
1580
- auth?: {
1581
- jwtSecret?: string | undefined;
1582
- accessTtl?: string | undefined;
1583
- refreshTtl?: string | undefined;
1584
- } | undefined;
1585
- cloudflare?: {
1586
- zoneId?: string | undefined;
1587
- apiToken?: string | undefined;
1588
- apiBase?: string | undefined;
1589
- } | undefined;
1590
- geo?: {
1591
- block?: string[] | undefined;
1592
- } | undefined;
1593
- customRules?: {
1594
- name: string;
1595
- action: "block" | "managed_challenge" | "js_challenge" | "log";
1596
- expression: string;
1597
- }[] | undefined;
1598
- managedRulesets?: ("cloudflare" | "owasp")[] | undefined;
1599
- }>;
448
+ action: z.ZodEnum<{
449
+ block: "block";
450
+ managed_challenge: "managed_challenge";
451
+ js_challenge: "js_challenge";
452
+ log: "log";
453
+ }>;
454
+ }, z.core.$strip>>>;
455
+ managedRulesets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
456
+ cloudflare: "cloudflare";
457
+ owasp: "owasp";
458
+ }>>>;
459
+ }, z.core.$strip>;
1600
460
  commerce: z.ZodObject<{
1601
- payments: z.ZodEffects<z.ZodObject<{
1602
- provider: z.ZodEffects<z.ZodString, string, string>;
461
+ payments: z.ZodObject<{
462
+ provider: z.ZodString;
1603
463
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1604
- /**
1605
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1606
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1607
- */
1608
464
  package: z.ZodOptional<z.ZodString>;
1609
- }, "strip", z.ZodTypeAny, {
1610
- provider: string;
1611
- package?: string | undefined;
1612
- config?: Record<string, unknown> | undefined;
1613
- }, {
1614
- provider: string;
1615
- package?: string | undefined;
1616
- config?: Record<string, unknown> | undefined;
1617
- }>, {
1618
- provider: string;
1619
- package?: string | undefined;
1620
- config?: Record<string, unknown> | undefined;
1621
- }, {
1622
- provider: string;
1623
- package?: string | undefined;
1624
- config?: Record<string, unknown> | undefined;
1625
- }>;
1626
- email: z.ZodEffects<z.ZodObject<{
1627
- provider: z.ZodEffects<z.ZodString, string, string>;
465
+ }, z.core.$strip>;
466
+ email: z.ZodObject<{
467
+ provider: z.ZodString;
1628
468
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1629
- /**
1630
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1631
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1632
- */
1633
469
  package: z.ZodOptional<z.ZodString>;
1634
- }, "strip", z.ZodTypeAny, {
1635
- provider: string;
1636
- package?: string | undefined;
1637
- config?: Record<string, unknown> | undefined;
1638
- }, {
1639
- provider: string;
1640
- package?: string | undefined;
1641
- config?: Record<string, unknown> | undefined;
1642
- }>, {
1643
- provider: string;
1644
- package?: string | undefined;
1645
- config?: Record<string, unknown> | undefined;
1646
- }, {
1647
- provider: string;
1648
- package?: string | undefined;
1649
- config?: Record<string, unknown> | undefined;
1650
- }>;
1651
- reviews: z.ZodEffects<z.ZodObject<{
1652
- provider: z.ZodEffects<z.ZodString, string, string>;
470
+ }, z.core.$strip>;
471
+ reviews: z.ZodObject<{
472
+ provider: z.ZodString;
1653
473
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1654
- /**
1655
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1656
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1657
- */
1658
474
  package: z.ZodOptional<z.ZodString>;
1659
- }, "strip", z.ZodTypeAny, {
1660
- provider: string;
1661
- package?: string | undefined;
1662
- config?: Record<string, unknown> | undefined;
1663
- }, {
1664
- provider: string;
1665
- package?: string | undefined;
1666
- config?: Record<string, unknown> | undefined;
1667
- }>, {
1668
- provider: string;
1669
- package?: string | undefined;
1670
- config?: Record<string, unknown> | undefined;
1671
- }, {
1672
- provider: string;
1673
- package?: string | undefined;
1674
- config?: Record<string, unknown> | undefined;
1675
- }>;
1676
- search: z.ZodEffects<z.ZodObject<{
1677
- provider: z.ZodEffects<z.ZodString, string, string>;
475
+ }, z.core.$strip>;
476
+ search: z.ZodObject<{
477
+ provider: z.ZodString;
1678
478
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1679
- /**
1680
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1681
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1682
- */
1683
479
  package: z.ZodOptional<z.ZodString>;
1684
- }, "strip", z.ZodTypeAny, {
1685
- provider: string;
1686
- package?: string | undefined;
1687
- config?: Record<string, unknown> | undefined;
1688
- }, {
1689
- provider: string;
1690
- package?: string | undefined;
1691
- config?: Record<string, unknown> | undefined;
1692
- }>, {
1693
- provider: string;
1694
- package?: string | undefined;
1695
- config?: Record<string, unknown> | undefined;
1696
- }, {
1697
- provider: string;
1698
- package?: string | undefined;
1699
- config?: Record<string, unknown> | undefined;
1700
- }>;
1701
- analytics: z.ZodEffects<z.ZodObject<{
1702
- provider: z.ZodEffects<z.ZodString, string, string>;
480
+ }, z.core.$strip>;
481
+ analytics: z.ZodObject<{
482
+ provider: z.ZodString;
1703
483
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1704
- /**
1705
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1706
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1707
- */
1708
484
  package: z.ZodOptional<z.ZodString>;
1709
- }, "strip", z.ZodTypeAny, {
1710
- provider: string;
1711
- package?: string | undefined;
1712
- config?: Record<string, unknown> | undefined;
1713
- }, {
1714
- provider: string;
1715
- package?: string | undefined;
1716
- config?: Record<string, unknown> | undefined;
1717
- }>, {
1718
- provider: string;
1719
- package?: string | undefined;
1720
- config?: Record<string, unknown> | undefined;
1721
- }, {
1722
- provider: string;
1723
- package?: string | undefined;
1724
- config?: Record<string, unknown> | undefined;
1725
- }>;
1726
- shipping: z.ZodEffects<z.ZodObject<{
1727
- provider: z.ZodEffects<z.ZodString, string, string>;
485
+ }, z.core.$strip>;
486
+ shipping: z.ZodObject<{
487
+ provider: z.ZodString;
1728
488
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1729
- /**
1730
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1731
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1732
- */
1733
489
  package: z.ZodOptional<z.ZodString>;
1734
- }, "strip", z.ZodTypeAny, {
1735
- provider: string;
1736
- package?: string | undefined;
1737
- config?: Record<string, unknown> | undefined;
1738
- }, {
1739
- provider: string;
1740
- package?: string | undefined;
1741
- config?: Record<string, unknown> | undefined;
1742
- }>, {
1743
- provider: string;
1744
- package?: string | undefined;
1745
- config?: Record<string, unknown> | undefined;
1746
- }, {
1747
- provider: string;
1748
- package?: string | undefined;
1749
- config?: Record<string, unknown> | undefined;
1750
- }>;
1751
- tax: z.ZodEffects<z.ZodObject<{
1752
- provider: z.ZodEffects<z.ZodString, string, string>;
490
+ }, z.core.$strip>;
491
+ tax: z.ZodObject<{
492
+ provider: z.ZodString;
1753
493
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1754
- /**
1755
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1756
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1757
- */
1758
494
  package: z.ZodOptional<z.ZodString>;
1759
- }, "strip", z.ZodTypeAny, {
1760
- provider: string;
1761
- package?: string | undefined;
1762
- config?: Record<string, unknown> | undefined;
1763
- }, {
1764
- provider: string;
1765
- package?: string | undefined;
1766
- config?: Record<string, unknown> | undefined;
1767
- }>, {
1768
- provider: string;
1769
- package?: string | undefined;
1770
- config?: Record<string, unknown> | undefined;
1771
- }, {
1772
- provider: string;
1773
- package?: string | undefined;
1774
- config?: Record<string, unknown> | undefined;
1775
- }>;
1776
- ai: z.ZodEffects<z.ZodObject<{
1777
- provider: z.ZodEffects<z.ZodString, string, string>;
495
+ }, z.core.$strip>;
496
+ ai: z.ZodObject<{
497
+ provider: z.ZodString;
1778
498
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1779
- /**
1780
- * The npm package the adapter comes from, in place of `@nymbalhq/<slot>-<provider>`. On a `custom` slot it is for
1781
- * tooling (`nymbal test:contracts`): the kernel takes the adapter passed to `createApp` and imports nothing.
1782
- */
1783
499
  package: z.ZodOptional<z.ZodString>;
1784
- }, "strip", z.ZodTypeAny, {
1785
- provider: string;
1786
- package?: string | undefined;
1787
- config?: Record<string, unknown> | undefined;
1788
- }, {
1789
- provider: string;
1790
- package?: string | undefined;
1791
- config?: Record<string, unknown> | undefined;
1792
- }>, {
1793
- provider: string;
1794
- package?: string | undefined;
1795
- config?: Record<string, unknown> | undefined;
1796
- }, {
1797
- provider: string;
1798
- package?: string | undefined;
1799
- config?: Record<string, unknown> | undefined;
1800
- }>;
1801
- orders: z.ZodDefault<z.ZodObject<{
500
+ }, z.core.$strip>;
501
+ orders: z.ZodPrefault<z.ZodObject<{
1802
502
  numberPrefix: z.ZodDefault<z.ZodString>;
1803
503
  numberStart: z.ZodDefault<z.ZodNumber>;
1804
- /** How long an order key opens the order on its own: the checkout's, and the order email's. */
1805
- keyLifetime: z.ZodDefault<z.ZodObject<{
504
+ keyLifetime: z.ZodPrefault<z.ZodObject<{
1806
505
  checkout: z.ZodDefault<z.ZodString>;
1807
506
  email: z.ZodDefault<z.ZodString>;
1808
- }, "strip", z.ZodTypeAny, {
1809
- email: string;
1810
- checkout: string;
1811
- }, {
1812
- email?: string | undefined;
1813
- checkout?: string | undefined;
1814
- }>>;
1815
- }, "strip", z.ZodTypeAny, {
1816
- numberPrefix: string;
1817
- numberStart: number;
1818
- keyLifetime: {
1819
- email: string;
1820
- checkout: string;
1821
- };
1822
- }, {
1823
- numberPrefix?: string | undefined;
1824
- numberStart?: number | undefined;
1825
- keyLifetime?: {
1826
- email?: string | undefined;
1827
- checkout?: string | undefined;
1828
- } | undefined;
1829
- }>>;
1830
- }, "strip", z.ZodTypeAny, {
1831
- payments: {
1832
- provider: string;
1833
- package?: string | undefined;
1834
- config?: Record<string, unknown> | undefined;
1835
- };
1836
- email: {
1837
- provider: string;
1838
- package?: string | undefined;
1839
- config?: Record<string, unknown> | undefined;
1840
- };
1841
- reviews: {
1842
- provider: string;
1843
- package?: string | undefined;
1844
- config?: Record<string, unknown> | undefined;
1845
- };
1846
- search: {
1847
- provider: string;
1848
- package?: string | undefined;
1849
- config?: Record<string, unknown> | undefined;
1850
- };
1851
- analytics: {
1852
- provider: string;
1853
- package?: string | undefined;
1854
- config?: Record<string, unknown> | undefined;
1855
- };
1856
- shipping: {
1857
- provider: string;
1858
- package?: string | undefined;
1859
- config?: Record<string, unknown> | undefined;
1860
- };
1861
- tax: {
1862
- provider: string;
1863
- package?: string | undefined;
1864
- config?: Record<string, unknown> | undefined;
1865
- };
1866
- ai: {
1867
- provider: string;
1868
- package?: string | undefined;
1869
- config?: Record<string, unknown> | undefined;
1870
- };
1871
- orders: {
1872
- numberPrefix: string;
1873
- numberStart: number;
1874
- keyLifetime: {
1875
- email: string;
1876
- checkout: string;
1877
- };
1878
- };
1879
- }, {
1880
- payments: {
1881
- provider: string;
1882
- package?: string | undefined;
1883
- config?: Record<string, unknown> | undefined;
1884
- };
1885
- email: {
1886
- provider: string;
1887
- package?: string | undefined;
1888
- config?: Record<string, unknown> | undefined;
1889
- };
1890
- reviews: {
1891
- provider: string;
1892
- package?: string | undefined;
1893
- config?: Record<string, unknown> | undefined;
1894
- };
1895
- search: {
1896
- provider: string;
1897
- package?: string | undefined;
1898
- config?: Record<string, unknown> | undefined;
1899
- };
1900
- analytics: {
1901
- provider: string;
1902
- package?: string | undefined;
1903
- config?: Record<string, unknown> | undefined;
1904
- };
1905
- shipping: {
1906
- provider: string;
1907
- package?: string | undefined;
1908
- config?: Record<string, unknown> | undefined;
1909
- };
1910
- tax: {
1911
- provider: string;
1912
- package?: string | undefined;
1913
- config?: Record<string, unknown> | undefined;
1914
- };
1915
- ai: {
1916
- provider: string;
1917
- package?: string | undefined;
1918
- config?: Record<string, unknown> | undefined;
1919
- };
1920
- orders?: {
1921
- numberPrefix?: string | undefined;
1922
- numberStart?: number | undefined;
1923
- keyLifetime?: {
1924
- email?: string | undefined;
1925
- checkout?: string | undefined;
1926
- } | undefined;
1927
- } | undefined;
1928
- }>;
507
+ }, z.core.$strip>>;
508
+ }, z.core.$strip>>;
509
+ }, z.core.$strip>;
1929
510
  http: z.ZodObject<{
1930
- adapter: z.ZodDefault<z.ZodEnum<["fastify", "hono"]>>;
511
+ adapter: z.ZodDefault<z.ZodEnum<{
512
+ fastify: "fastify";
513
+ hono: "hono";
514
+ }>>;
1931
515
  port: z.ZodDefault<z.ZodNumber>;
1932
516
  host: z.ZodDefault<z.ZodString>;
1933
- /**
1934
- * Which `X-Forwarded-For` entries set the client IP the rate limiter keys on. A number trusts that many proxy hops
1935
- * nearest the server (`1` behind one platform proxy); `0` trusts none. `true` trusts every entry, so a client's own
1936
- * left-most value wins: spoofable unless your proxy overwrites the header. Left at `false` (explicitly or not),
1937
- * NYMBAL_TRUST_PROXY_HOPS fills it at run time.
1938
- */
1939
- trustProxy: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>;
1940
- cors: z.ZodDefault<z.ZodObject<{
1941
- allowedOrigins: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
517
+ trustedProxies: z.ZodOptional<z.ZodArray<z.ZodString>>;
518
+ clientIpHeader: z.ZodOptional<z.ZodString>;
519
+ trustProxy: z.ZodOptional<z.ZodNever>;
520
+ cors: z.ZodPrefault<z.ZodObject<{
521
+ allowedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
1942
522
  credentials: z.ZodDefault<z.ZodBoolean>;
1943
- }, "strip", z.ZodTypeAny, {
1944
- allowedOrigins: string[];
1945
- credentials: boolean;
1946
- }, {
1947
- allowedOrigins?: string[] | undefined;
1948
- credentials?: boolean | undefined;
1949
- }>>;
1950
- }, "strip", z.ZodTypeAny, {
1951
- adapter: "fastify" | "hono";
1952
- port: number;
1953
- host: string;
1954
- trustProxy: number | boolean;
1955
- cors: {
1956
- allowedOrigins: string[];
1957
- credentials: boolean;
1958
- };
1959
- }, {
1960
- adapter?: "fastify" | "hono" | undefined;
1961
- port?: number | undefined;
1962
- host?: string | undefined;
1963
- trustProxy?: number | boolean | undefined;
1964
- cors?: {
1965
- allowedOrigins?: string[] | undefined;
1966
- credentials?: boolean | undefined;
1967
- } | undefined;
1968
- }>;
523
+ }, z.core.$strip>>;
524
+ }, z.core.$strip>;
1969
525
  deployment: z.ZodObject<{
1970
- strategy: z.ZodDefault<z.ZodEnum<["standard", "blue-green"]>>;
1971
- }, "strip", z.ZodTypeAny, {
1972
- strategy: "standard" | "blue-green";
1973
- }, {
1974
- strategy?: "standard" | "blue-green" | undefined;
1975
- }>;
526
+ strategy: z.ZodDefault<z.ZodEnum<{
527
+ standard: "standard";
528
+ "blue-green": "blue-green";
529
+ }>>;
530
+ }, z.core.$strip>;
1976
531
  features: z.ZodDefault<z.ZodObject<{
1977
532
  staging: z.ZodDefault<z.ZodBoolean>;
1978
533
  heartbeat: z.ZodDefault<z.ZodBoolean>;
1979
534
  autoUpdates: z.ZodDefault<z.ZodBoolean>;
1980
- }, "strip", z.ZodTypeAny, {
1981
- staging: boolean;
1982
- heartbeat: boolean;
1983
- autoUpdates: boolean;
1984
- }, {
1985
- staging?: boolean | undefined;
1986
- heartbeat?: boolean | undefined;
1987
- autoUpdates?: boolean | undefined;
1988
- }>>;
1989
- events: z.ZodDefault<z.ZodObject<{
1990
- /** Days a delivered event stays in the log. */
535
+ }, z.core.$strip>>;
536
+ events: z.ZodPrefault<z.ZodObject<{
1991
537
  retentionDays: z.ZodDefault<z.ZodNumber>;
1992
538
  archive: z.ZodOptional<z.ZodObject<{
1993
539
  adapter: z.ZodLiteral<"s3">;
1994
540
  bucket: z.ZodString;
1995
- /** Where every archive key starts; none when not given. */
1996
541
  prefix: z.ZodOptional<z.ZodString>;
1997
- /** `'us-east-1'` when not given. */
1998
542
  region: z.ZodOptional<z.ZodString>;
1999
- /** An S3-compatible API (MinIO, R2). */
2000
543
  endpoint: z.ZodOptional<z.ZodString>;
2001
- /** Path-style requests; true by default when an endpoint is set. */
2002
544
  forcePathStyle: z.ZodOptional<z.ZodBoolean>;
2003
- }, "strict", z.ZodTypeAny, {
2004
- bucket: string;
2005
- adapter: "s3";
2006
- prefix?: string | undefined;
2007
- region?: string | undefined;
2008
- endpoint?: string | undefined;
2009
- forcePathStyle?: boolean | undefined;
2010
- }, {
2011
- bucket: string;
2012
- adapter: "s3";
2013
- prefix?: string | undefined;
2014
- region?: string | undefined;
2015
- endpoint?: string | undefined;
2016
- forcePathStyle?: boolean | undefined;
2017
- }>>;
2018
- }, "strict", z.ZodTypeAny, {
2019
- retentionDays: number;
2020
- archive?: {
2021
- bucket: string;
2022
- adapter: "s3";
2023
- prefix?: string | undefined;
2024
- region?: string | undefined;
2025
- endpoint?: string | undefined;
2026
- forcePathStyle?: boolean | undefined;
2027
- } | undefined;
2028
- }, {
2029
- retentionDays?: number | undefined;
2030
- archive?: {
2031
- bucket: string;
2032
- adapter: "s3";
2033
- prefix?: string | undefined;
2034
- region?: string | undefined;
2035
- endpoint?: string | undefined;
2036
- forcePathStyle?: boolean | undefined;
2037
- } | undefined;
2038
- }>>;
2039
- }, "strip", z.ZodTypeAny, {
2040
- security: {
2041
- adapter: string;
2042
- rateLimit: Record<string, {
2043
- requests: number;
2044
- window: string;
2045
- action: "block" | "challenge" | "throttle";
2046
- header?: string | undefined;
2047
- }>;
2048
- botProtection: {
2049
- mode: "strict" | "off" | "managed";
2050
- allowList: string[];
2051
- };
2052
- headers: {
2053
- hsts: boolean;
2054
- contentSecurityPolicy: string;
2055
- referrerPolicy: string;
2056
- xFrameOptions: "deny" | "sameorigin";
2057
- };
2058
- csrf: boolean;
2059
- auth: {
2060
- jwtSecret: string;
2061
- accessTtl: string;
2062
- refreshTtl: string;
2063
- };
2064
- geo: {
2065
- block: string[];
2066
- };
2067
- customRules: {
2068
- name: string;
2069
- action: "block" | "managed_challenge" | "js_challenge" | "log";
2070
- expression: string;
2071
- }[];
2072
- managedRulesets: ("cloudflare" | "owasp")[];
2073
- package?: string | undefined;
2074
- config?: Record<string, unknown> | undefined;
2075
- cloudflare?: {
2076
- zoneId?: string | undefined;
2077
- apiToken?: string | undefined;
2078
- apiBase?: string | undefined;
2079
- } | undefined;
2080
- };
2081
- store: {
2082
- name: string;
2083
- currency: string;
2084
- locale: string;
2085
- timezone: string;
2086
- url?: string | undefined;
2087
- };
2088
- template: "astro" | "nextjs";
2089
- infrastructure: {
2090
- documentStore: {
2091
- provider: string;
2092
- package?: string | undefined;
2093
- config?: Record<string, unknown> | undefined;
2094
- };
2095
- eventBus: {
2096
- provider: string;
2097
- package?: string | undefined;
2098
- config?: Record<string, unknown> | undefined;
2099
- };
2100
- media: {
2101
- provider: string;
2102
- package?: string | undefined;
2103
- config?: Record<string, unknown> | undefined;
2104
- };
2105
- commandStore: "sqlite" | "postgres";
2106
- redis?: {
2107
- url?: string | undefined;
2108
- prefix?: string | undefined;
2109
- ackTimeoutMs?: number | undefined;
2110
- claimIdleMs?: number | undefined;
2111
- streamMaxLen?: number | undefined;
2112
- } | undefined;
2113
- s3?: {
2114
- prefix?: string | undefined;
2115
- bucket?: string | undefined;
2116
- region?: string | undefined;
2117
- endpoint?: string | undefined;
2118
- publicUrl?: string | undefined;
2119
- forcePathStyle?: boolean | undefined;
2120
- } | undefined;
2121
- };
2122
- commerce: {
2123
- payments: {
2124
- provider: string;
2125
- package?: string | undefined;
2126
- config?: Record<string, unknown> | undefined;
2127
- };
2128
- email: {
2129
- provider: string;
2130
- package?: string | undefined;
2131
- config?: Record<string, unknown> | undefined;
2132
- };
2133
- reviews: {
2134
- provider: string;
2135
- package?: string | undefined;
2136
- config?: Record<string, unknown> | undefined;
2137
- };
2138
- search: {
2139
- provider: string;
2140
- package?: string | undefined;
2141
- config?: Record<string, unknown> | undefined;
2142
- };
2143
- analytics: {
2144
- provider: string;
2145
- package?: string | undefined;
2146
- config?: Record<string, unknown> | undefined;
2147
- };
2148
- shipping: {
2149
- provider: string;
2150
- package?: string | undefined;
2151
- config?: Record<string, unknown> | undefined;
2152
- };
2153
- tax: {
2154
- provider: string;
2155
- package?: string | undefined;
2156
- config?: Record<string, unknown> | undefined;
2157
- };
2158
- ai: {
2159
- provider: string;
2160
- package?: string | undefined;
2161
- config?: Record<string, unknown> | undefined;
2162
- };
2163
- orders: {
2164
- numberPrefix: string;
2165
- numberStart: number;
2166
- keyLifetime: {
2167
- email: string;
2168
- checkout: string;
2169
- };
2170
- };
2171
- };
2172
- http: {
2173
- adapter: "fastify" | "hono";
2174
- port: number;
2175
- host: string;
2176
- trustProxy: number | boolean;
2177
- cors: {
2178
- allowedOrigins: string[];
2179
- credentials: boolean;
2180
- };
2181
- };
2182
- deployment: {
2183
- strategy: "standard" | "blue-green";
2184
- };
2185
- features: {
2186
- staging: boolean;
2187
- heartbeat: boolean;
2188
- autoUpdates: boolean;
2189
- };
2190
- events: {
2191
- retentionDays: number;
2192
- archive?: {
2193
- bucket: string;
2194
- adapter: "s3";
2195
- prefix?: string | undefined;
2196
- region?: string | undefined;
2197
- endpoint?: string | undefined;
2198
- forcePathStyle?: boolean | undefined;
2199
- } | undefined;
2200
- };
2201
- }, {
2202
- security: {
2203
- adapter: string;
2204
- package?: string | undefined;
2205
- config?: Record<string, unknown> | undefined;
2206
- rateLimit?: Record<string, {
2207
- requests: number;
2208
- window: string;
2209
- action: "block" | "challenge" | "throttle";
2210
- header?: string | undefined;
2211
- }> | undefined;
2212
- botProtection?: {
2213
- mode?: "strict" | "off" | "managed" | undefined;
2214
- allowList?: string[] | undefined;
2215
- } | undefined;
2216
- headers?: {
2217
- hsts?: boolean | undefined;
2218
- contentSecurityPolicy?: string | undefined;
2219
- referrerPolicy?: string | undefined;
2220
- xFrameOptions?: "deny" | "sameorigin" | undefined;
2221
- } | undefined;
2222
- csrf?: boolean | undefined;
2223
- auth?: {
2224
- jwtSecret?: string | undefined;
2225
- accessTtl?: string | undefined;
2226
- refreshTtl?: string | undefined;
2227
- } | undefined;
2228
- cloudflare?: {
2229
- zoneId?: string | undefined;
2230
- apiToken?: string | undefined;
2231
- apiBase?: string | undefined;
2232
- } | undefined;
2233
- geo?: {
2234
- block?: string[] | undefined;
2235
- } | undefined;
2236
- customRules?: {
2237
- name: string;
2238
- action: "block" | "managed_challenge" | "js_challenge" | "log";
2239
- expression: string;
2240
- }[] | undefined;
2241
- managedRulesets?: ("cloudflare" | "owasp")[] | undefined;
2242
- };
2243
- store: {
2244
- name: string;
2245
- currency: string;
2246
- locale: string;
2247
- timezone: string;
2248
- url?: string | undefined;
2249
- };
2250
- template: "astro" | "nextjs";
2251
- infrastructure: {
2252
- documentStore: {
2253
- provider: string;
2254
- package?: string | undefined;
2255
- config?: Record<string, unknown> | undefined;
2256
- };
2257
- eventBus: {
2258
- provider: string;
2259
- package?: string | undefined;
2260
- config?: Record<string, unknown> | undefined;
2261
- };
2262
- commandStore: "sqlite" | "postgres";
2263
- media?: {
2264
- provider: string;
2265
- package?: string | undefined;
2266
- config?: Record<string, unknown> | undefined;
2267
- } | undefined;
2268
- redis?: {
2269
- url?: string | undefined;
2270
- prefix?: string | undefined;
2271
- ackTimeoutMs?: number | undefined;
2272
- claimIdleMs?: number | undefined;
2273
- streamMaxLen?: number | undefined;
2274
- } | undefined;
2275
- s3?: {
2276
- prefix?: string | undefined;
2277
- bucket?: string | undefined;
2278
- region?: string | undefined;
2279
- endpoint?: string | undefined;
2280
- publicUrl?: string | undefined;
2281
- forcePathStyle?: boolean | undefined;
2282
- } | undefined;
2283
- };
2284
- commerce: {
2285
- payments: {
2286
- provider: string;
2287
- package?: string | undefined;
2288
- config?: Record<string, unknown> | undefined;
2289
- };
2290
- email: {
2291
- provider: string;
2292
- package?: string | undefined;
2293
- config?: Record<string, unknown> | undefined;
2294
- };
2295
- reviews: {
2296
- provider: string;
2297
- package?: string | undefined;
2298
- config?: Record<string, unknown> | undefined;
2299
- };
2300
- search: {
2301
- provider: string;
2302
- package?: string | undefined;
2303
- config?: Record<string, unknown> | undefined;
2304
- };
2305
- analytics: {
2306
- provider: string;
2307
- package?: string | undefined;
2308
- config?: Record<string, unknown> | undefined;
2309
- };
2310
- shipping: {
2311
- provider: string;
2312
- package?: string | undefined;
2313
- config?: Record<string, unknown> | undefined;
2314
- };
2315
- tax: {
2316
- provider: string;
2317
- package?: string | undefined;
2318
- config?: Record<string, unknown> | undefined;
2319
- };
2320
- ai: {
2321
- provider: string;
2322
- package?: string | undefined;
2323
- config?: Record<string, unknown> | undefined;
2324
- };
2325
- orders?: {
2326
- numberPrefix?: string | undefined;
2327
- numberStart?: number | undefined;
2328
- keyLifetime?: {
2329
- email?: string | undefined;
2330
- checkout?: string | undefined;
2331
- } | undefined;
2332
- } | undefined;
2333
- };
2334
- http: {
2335
- adapter?: "fastify" | "hono" | undefined;
2336
- port?: number | undefined;
2337
- host?: string | undefined;
2338
- trustProxy?: number | boolean | undefined;
2339
- cors?: {
2340
- allowedOrigins?: string[] | undefined;
2341
- credentials?: boolean | undefined;
2342
- } | undefined;
2343
- };
2344
- deployment: {
2345
- strategy?: "standard" | "blue-green" | undefined;
2346
- };
2347
- features?: {
2348
- staging?: boolean | undefined;
2349
- heartbeat?: boolean | undefined;
2350
- autoUpdates?: boolean | undefined;
2351
- } | undefined;
2352
- events?: {
2353
- retentionDays?: number | undefined;
2354
- archive?: {
2355
- bucket: string;
2356
- adapter: "s3";
2357
- prefix?: string | undefined;
2358
- region?: string | undefined;
2359
- endpoint?: string | undefined;
2360
- forcePathStyle?: boolean | undefined;
2361
- } | undefined;
2362
- } | undefined;
2363
- }>, {
2364
- security: {
2365
- adapter: string;
2366
- rateLimit: Record<string, {
2367
- requests: number;
2368
- window: string;
2369
- action: "block" | "challenge" | "throttle";
2370
- header?: string | undefined;
2371
- }>;
2372
- botProtection: {
2373
- mode: "strict" | "off" | "managed";
2374
- allowList: string[];
2375
- };
2376
- headers: {
2377
- hsts: boolean;
2378
- contentSecurityPolicy: string;
2379
- referrerPolicy: string;
2380
- xFrameOptions: "deny" | "sameorigin";
2381
- };
2382
- csrf: boolean;
2383
- auth: {
2384
- jwtSecret: string;
2385
- accessTtl: string;
2386
- refreshTtl: string;
2387
- };
2388
- geo: {
2389
- block: string[];
2390
- };
2391
- customRules: {
2392
- name: string;
2393
- action: "block" | "managed_challenge" | "js_challenge" | "log";
2394
- expression: string;
2395
- }[];
2396
- managedRulesets: ("cloudflare" | "owasp")[];
2397
- package?: string | undefined;
2398
- config?: Record<string, unknown> | undefined;
2399
- cloudflare?: {
2400
- zoneId?: string | undefined;
2401
- apiToken?: string | undefined;
2402
- apiBase?: string | undefined;
2403
- } | undefined;
2404
- };
2405
- store: {
2406
- name: string;
2407
- currency: string;
2408
- locale: string;
2409
- timezone: string;
2410
- url?: string | undefined;
2411
- };
2412
- template: "astro" | "nextjs";
2413
- infrastructure: {
2414
- documentStore: {
2415
- provider: string;
2416
- package?: string | undefined;
2417
- config?: Record<string, unknown> | undefined;
2418
- };
2419
- eventBus: {
2420
- provider: string;
2421
- package?: string | undefined;
2422
- config?: Record<string, unknown> | undefined;
2423
- };
2424
- media: {
2425
- provider: string;
2426
- package?: string | undefined;
2427
- config?: Record<string, unknown> | undefined;
2428
- };
2429
- commandStore: "sqlite" | "postgres";
2430
- redis?: {
2431
- url?: string | undefined;
2432
- prefix?: string | undefined;
2433
- ackTimeoutMs?: number | undefined;
2434
- claimIdleMs?: number | undefined;
2435
- streamMaxLen?: number | undefined;
2436
- } | undefined;
2437
- s3?: {
2438
- prefix?: string | undefined;
2439
- bucket?: string | undefined;
2440
- region?: string | undefined;
2441
- endpoint?: string | undefined;
2442
- publicUrl?: string | undefined;
2443
- forcePathStyle?: boolean | undefined;
2444
- } | undefined;
2445
- };
2446
- commerce: {
2447
- payments: {
2448
- provider: string;
2449
- package?: string | undefined;
2450
- config?: Record<string, unknown> | undefined;
2451
- };
2452
- email: {
2453
- provider: string;
2454
- package?: string | undefined;
2455
- config?: Record<string, unknown> | undefined;
2456
- };
2457
- reviews: {
2458
- provider: string;
2459
- package?: string | undefined;
2460
- config?: Record<string, unknown> | undefined;
2461
- };
2462
- search: {
2463
- provider: string;
2464
- package?: string | undefined;
2465
- config?: Record<string, unknown> | undefined;
2466
- };
2467
- analytics: {
2468
- provider: string;
2469
- package?: string | undefined;
2470
- config?: Record<string, unknown> | undefined;
2471
- };
2472
- shipping: {
2473
- provider: string;
2474
- package?: string | undefined;
2475
- config?: Record<string, unknown> | undefined;
2476
- };
2477
- tax: {
2478
- provider: string;
2479
- package?: string | undefined;
2480
- config?: Record<string, unknown> | undefined;
2481
- };
2482
- ai: {
2483
- provider: string;
2484
- package?: string | undefined;
2485
- config?: Record<string, unknown> | undefined;
2486
- };
2487
- orders: {
2488
- numberPrefix: string;
2489
- numberStart: number;
2490
- keyLifetime: {
2491
- email: string;
2492
- checkout: string;
2493
- };
2494
- };
2495
- };
2496
- http: {
2497
- adapter: "fastify" | "hono";
2498
- port: number;
2499
- host: string;
2500
- trustProxy: number | boolean;
2501
- cors: {
2502
- allowedOrigins: string[];
2503
- credentials: boolean;
2504
- };
2505
- };
2506
- deployment: {
2507
- strategy: "standard" | "blue-green";
2508
- };
2509
- features: {
2510
- staging: boolean;
2511
- heartbeat: boolean;
2512
- autoUpdates: boolean;
2513
- };
2514
- events: {
2515
- retentionDays: number;
2516
- archive?: {
2517
- bucket: string;
2518
- adapter: "s3";
2519
- prefix?: string | undefined;
2520
- region?: string | undefined;
2521
- endpoint?: string | undefined;
2522
- forcePathStyle?: boolean | undefined;
2523
- } | undefined;
2524
- };
2525
- }, {
2526
- security: {
2527
- adapter: string;
2528
- package?: string | undefined;
2529
- config?: Record<string, unknown> | undefined;
2530
- rateLimit?: Record<string, {
2531
- requests: number;
2532
- window: string;
2533
- action: "block" | "challenge" | "throttle";
2534
- header?: string | undefined;
2535
- }> | undefined;
2536
- botProtection?: {
2537
- mode?: "strict" | "off" | "managed" | undefined;
2538
- allowList?: string[] | undefined;
2539
- } | undefined;
2540
- headers?: {
2541
- hsts?: boolean | undefined;
2542
- contentSecurityPolicy?: string | undefined;
2543
- referrerPolicy?: string | undefined;
2544
- xFrameOptions?: "deny" | "sameorigin" | undefined;
2545
- } | undefined;
2546
- csrf?: boolean | undefined;
2547
- auth?: {
2548
- jwtSecret?: string | undefined;
2549
- accessTtl?: string | undefined;
2550
- refreshTtl?: string | undefined;
2551
- } | undefined;
2552
- cloudflare?: {
2553
- zoneId?: string | undefined;
2554
- apiToken?: string | undefined;
2555
- apiBase?: string | undefined;
2556
- } | undefined;
2557
- geo?: {
2558
- block?: string[] | undefined;
2559
- } | undefined;
2560
- customRules?: {
2561
- name: string;
2562
- action: "block" | "managed_challenge" | "js_challenge" | "log";
2563
- expression: string;
2564
- }[] | undefined;
2565
- managedRulesets?: ("cloudflare" | "owasp")[] | undefined;
2566
- };
2567
- store: {
2568
- name: string;
2569
- currency: string;
2570
- locale: string;
2571
- timezone: string;
2572
- url?: string | undefined;
2573
- };
2574
- template: "astro" | "nextjs";
2575
- infrastructure: {
2576
- documentStore: {
2577
- provider: string;
2578
- package?: string | undefined;
2579
- config?: Record<string, unknown> | undefined;
2580
- };
2581
- eventBus: {
2582
- provider: string;
2583
- package?: string | undefined;
2584
- config?: Record<string, unknown> | undefined;
2585
- };
2586
- commandStore: "sqlite" | "postgres";
2587
- media?: {
2588
- provider: string;
2589
- package?: string | undefined;
2590
- config?: Record<string, unknown> | undefined;
2591
- } | undefined;
2592
- redis?: {
2593
- url?: string | undefined;
2594
- prefix?: string | undefined;
2595
- ackTimeoutMs?: number | undefined;
2596
- claimIdleMs?: number | undefined;
2597
- streamMaxLen?: number | undefined;
2598
- } | undefined;
2599
- s3?: {
2600
- prefix?: string | undefined;
2601
- bucket?: string | undefined;
2602
- region?: string | undefined;
2603
- endpoint?: string | undefined;
2604
- publicUrl?: string | undefined;
2605
- forcePathStyle?: boolean | undefined;
2606
- } | undefined;
2607
- };
2608
- commerce: {
2609
- payments: {
2610
- provider: string;
2611
- package?: string | undefined;
2612
- config?: Record<string, unknown> | undefined;
2613
- };
2614
- email: {
2615
- provider: string;
2616
- package?: string | undefined;
2617
- config?: Record<string, unknown> | undefined;
2618
- };
2619
- reviews: {
2620
- provider: string;
2621
- package?: string | undefined;
2622
- config?: Record<string, unknown> | undefined;
2623
- };
2624
- search: {
2625
- provider: string;
2626
- package?: string | undefined;
2627
- config?: Record<string, unknown> | undefined;
2628
- };
2629
- analytics: {
2630
- provider: string;
2631
- package?: string | undefined;
2632
- config?: Record<string, unknown> | undefined;
2633
- };
2634
- shipping: {
2635
- provider: string;
2636
- package?: string | undefined;
2637
- config?: Record<string, unknown> | undefined;
2638
- };
2639
- tax: {
2640
- provider: string;
2641
- package?: string | undefined;
2642
- config?: Record<string, unknown> | undefined;
2643
- };
2644
- ai: {
2645
- provider: string;
2646
- package?: string | undefined;
2647
- config?: Record<string, unknown> | undefined;
2648
- };
2649
- orders?: {
2650
- numberPrefix?: string | undefined;
2651
- numberStart?: number | undefined;
2652
- keyLifetime?: {
2653
- email?: string | undefined;
2654
- checkout?: string | undefined;
2655
- } | undefined;
2656
- } | undefined;
2657
- };
2658
- http: {
2659
- adapter?: "fastify" | "hono" | undefined;
2660
- port?: number | undefined;
2661
- host?: string | undefined;
2662
- trustProxy?: number | boolean | undefined;
2663
- cors?: {
2664
- allowedOrigins?: string[] | undefined;
2665
- credentials?: boolean | undefined;
2666
- } | undefined;
2667
- };
2668
- deployment: {
2669
- strategy?: "standard" | "blue-green" | undefined;
2670
- };
2671
- features?: {
2672
- staging?: boolean | undefined;
2673
- heartbeat?: boolean | undefined;
2674
- autoUpdates?: boolean | undefined;
2675
- } | undefined;
2676
- events?: {
2677
- retentionDays?: number | undefined;
2678
- archive?: {
2679
- bucket: string;
2680
- adapter: "s3";
2681
- prefix?: string | undefined;
2682
- region?: string | undefined;
2683
- endpoint?: string | undefined;
2684
- forcePathStyle?: boolean | undefined;
2685
- } | undefined;
2686
- } | undefined;
2687
- }>;
545
+ }, z.core.$strict>>;
546
+ }, z.core.$strict>>;
547
+ agents: z.ZodPrefault<z.ZodObject<{
548
+ mcp: z.ZodPrefault<z.ZodObject<{
549
+ enabled: z.ZodDefault<z.ZodBoolean>;
550
+ writes: z.ZodDefault<z.ZodEnum<{
551
+ proposal: "proposal";
552
+ apply: "apply";
553
+ }>>;
554
+ }, z.core.$strict>>;
555
+ autoApprove: z.ZodDefault<z.ZodArray<z.ZodString>>;
556
+ ucp: z.ZodPrefault<z.ZodObject<{
557
+ enabled: z.ZodDefault<z.ZodBoolean>;
558
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
559
+ type: z.ZodString;
560
+ url: z.ZodString;
561
+ title: z.ZodOptional<z.ZodString>;
562
+ }, z.core.$strict>>>;
563
+ }, z.core.$strict>>;
564
+ acp: z.ZodPrefault<z.ZodObject<{
565
+ enabled: z.ZodDefault<z.ZodBoolean>;
566
+ apiKey: z.ZodOptional<z.ZodString>;
567
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
568
+ type: z.ZodEnum<{
569
+ terms_of_use: "terms_of_use";
570
+ privacy_policy: "privacy_policy";
571
+ return_policy: "return_policy";
572
+ shipping_policy: "shipping_policy";
573
+ contact_us: "contact_us";
574
+ about_us: "about_us";
575
+ faq: "faq";
576
+ support: "support";
577
+ }>;
578
+ url: z.ZodString;
579
+ title: z.ZodOptional<z.ZodString>;
580
+ }, z.core.$strict>>>;
581
+ merchantId: z.ZodOptional<z.ZodString>;
582
+ }, z.core.$strict>>;
583
+ crawl: z.ZodPrefault<z.ZodObject<{
584
+ robots: z.ZodDefault<z.ZodBoolean>;
585
+ llms: z.ZodDefault<z.ZodBoolean>;
586
+ feed: z.ZodDefault<z.ZodBoolean>;
587
+ allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
588
+ others: z.ZodDefault<z.ZodEnum<{
589
+ allow: "allow";
590
+ disallow: "disallow";
591
+ }>>;
592
+ }, z.core.$strict>>;
593
+ assistant: z.ZodPrefault<z.ZodObject<{
594
+ customerData: z.ZodDefault<z.ZodBoolean>;
595
+ mask: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodEnum<{
596
+ email: "email";
597
+ name: "name";
598
+ phone: "phone";
599
+ address: "address";
600
+ postcode: "postcode";
601
+ }>>, z.ZodTransform<("email" | "name" | "phone" | "address" | "postcode")[], ("email" | "name" | "phone" | "address" | "postcode")[]>>>;
602
+ }, z.core.$strict>>;
603
+ }, z.core.$strict>>;
604
+ }, z.core.$strip>;
2688
605
  type NymbalConfigInput = z.input<typeof nymbalConfigSchema>;
2689
606
  type NymbalConfig = z.output<typeof nymbalConfigSchema>;
2690
607
 
@@ -2746,5 +663,42 @@ interface LoadedConfig {
2746
663
  declare function findConfigFile(startDir: string): string | null;
2747
664
  declare function loadConfig(startDir?: string): Promise<LoadedConfig>;
2748
665
 
2749
- export { ADAPTER_CATALOGUE, BUILT_IN, COMMAND_STORES, DEFAULT_JWT_SECRET, KNOWN_PROVIDERS, PROVIDER_NAME, REMOVED_INFRASTRUCTURE_KEYS, commerceSchema, conventionPackage, defineConfig, deploymentSchema, env, envBool, envNumber, envOptional, eventArchiveSchema, eventsSchema, featuresSchema, findConfigFile, httpSchema, infrastructureSchema, loadConfig, nymbalConfigSchema, redisSchema, s3Schema, securitySchema, slotFolder, storeSchema, suggestProvider };
2750
- export type { CatalogueEntry, InfrastructureSlot, LoadedConfig, NymbalConfig, NymbalConfigInput };
666
+ declare const PUBLIC_URL_ENV = "NYMBAL_PUBLIC_URL";
667
+ /**
668
+ * Whether the cookies the API sets carry `Secure`: exactly when the store's public origin is https, that origin being
669
+ * NYMBAL_PUBLIC_URL when set, else `store.url`. With neither, production's. NODE_ENV alone is not enough: a staging
670
+ * store served over https would send its session cookies over http too.
671
+ */
672
+ declare function secureCookies(config: Pick<NymbalConfig, 'store'>, env: Record<string, string | undefined>): boolean;
673
+
674
+ declare const ORIGIN_SECRET_ENV = "NYMBAL_ORIGIN_SECRET";
675
+ /**
676
+ * The origin lock from `NYMBAL_ORIGIN_SECRET`: one secret, or several separated by commas while one is rotated out.
677
+ * Blank entries are dropped and a blank variable is unset. A refusal names the entry's position, never its text, since
678
+ * the message reaches logs and terminals.
679
+ */
680
+ declare function resolveOriginLock(config: NymbalConfig, env: NodeJS.ProcessEnv): ResolvedOriginLock | undefined;
681
+
682
+ declare const TRUSTED_PROXIES_ENV = "NYMBAL_TRUSTED_PROXIES";
683
+ declare const CLIENT_IP_HEADER_ENV = "NYMBAL_CLIENT_IP_HEADER";
684
+ /**
685
+ * What is wrong with one trusted-proxy entry, by proxy-addr's own reading of it (the reading Fastify applies when it is
686
+ * built): `everyone` for a prefix of 0 or an IPv4-mapped range of /96 or wider (at /96 proxy-addr matches every IPv4
687
+ * peer against it), `invalid` for anything else it refuses, `null` when it compiles.
688
+ */
689
+ declare function trustedProxyProblem(entry: string): 'invalid' | 'everyone' | null;
690
+ /**
691
+ * The proxies whose forwarded client address the API believes, and the one client-address header it reads from them.
692
+ * Each resolves on its own: its variable, else its config key, else the security adapter's contribution, else the
693
+ * default (`loopback`; no header). Every value is checked as Fastify will read it, so a list this returns cannot fail the
694
+ * server's construction; trusting every address is refused, as is the removed hop count.
695
+ */
696
+ declare function resolveTrustedProxies(config: NymbalConfig, env: NodeJS.ProcessEnv, contribution?: {
697
+ adapter: string;
698
+ network: SecurityNetwork;
699
+ }): ResolvedNetwork;
700
+ /** The preset that holds `address` (an IPv4-mapped address by its IPv4 form), else the address itself. */
701
+ declare function trustSuggestion(address: string): string;
702
+
703
+ export { ACP_KEY_MIN_LENGTH, ACP_LINK_TYPES, ADAPTER_CATALOGUE, ASSISTANT_MASK_FIELDS, BUILT_IN, CLIENT_IP_HEADER_ENV, COMMAND_STORES, DEFAULT_AGENT_CRAWLERS, DEFAULT_ASSISTANT_MASK, DEFAULT_JWT_SECRET, KNOWN_PROVIDERS, ORIGIN_SECRET_ENV, PROVIDER_NAME, PUBLIC_URL_ENV, REMOVED_INFRASTRUCTURE_KEYS, TRUSTED_PROXIES_ENV, agentsSchema, commerceSchema, conventionPackage, defineConfig, deploymentSchema, env, envBool, envNumber, envOptional, eventArchiveSchema, eventsSchema, featuresSchema, findConfigFile, httpSchema, infrastructureSchema, loadConfig, nymbalConfigSchema, redisSchema, resolveOriginLock, resolveTrustedProxies, s3Schema, secureCookies, securitySchema, slotFolder, storeSchema, suggestProvider, trustSuggestion, trustedProxyProblem };
704
+ export type { AssistantMaskField, CatalogueEntry, InfrastructureSlot, LoadedConfig, NymbalConfig, NymbalConfigInput };