@junobuild/functions 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +151 -151
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/types/configs/{assert.config.d.ts → assertions.d.ts} +60 -60
- package/dist/types/configs/collections.config.d.ts +4 -2
- package/dist/types/configs/{hook.config.d.ts → hooks.d.ts} +60 -60
- package/dist/types/configs/{satellite.config.d.ts → satellite.env.d.ts} +5 -3
- package/dist/types/hooks/context.d.ts +36 -36
- package/dist/types/hooks/core.d.ts +1 -1
- package/dist/types/hooks/datastore.d.ts +29 -29
- package/dist/types/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { SatelliteEnvSchema } from './satellite.env';
|
|
3
3
|
/**
|
|
4
|
-
* @see
|
|
4
|
+
* @see OnSetDoc
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const OnSetDocSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
7
7
|
collections: z.ZodArray<z.ZodString, "many">;
|
|
8
8
|
}, {
|
|
9
9
|
/**
|
|
@@ -20,21 +20,21 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
20
20
|
data: z.ZodObject<{
|
|
21
21
|
before: z.ZodOptional<z.ZodObject<{
|
|
22
22
|
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
23
|
-
data: z.ZodType<Uint8Array<
|
|
23
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
24
24
|
description: z.ZodOptional<z.ZodString>;
|
|
25
25
|
created_at: z.ZodBigInt;
|
|
26
26
|
updated_at: z.ZodBigInt;
|
|
27
27
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
28
28
|
}, "strict", z.ZodTypeAny, {
|
|
29
29
|
owner: Uint8Array<ArrayBufferLike>;
|
|
30
|
-
data: Uint8Array<
|
|
30
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
31
31
|
created_at: bigint;
|
|
32
32
|
updated_at: bigint;
|
|
33
33
|
description?: string | undefined;
|
|
34
34
|
version?: bigint | undefined;
|
|
35
35
|
}, {
|
|
36
36
|
owner: Uint8Array<ArrayBufferLike>;
|
|
37
|
-
data: Uint8Array<
|
|
37
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
38
38
|
created_at: bigint;
|
|
39
39
|
updated_at: bigint;
|
|
40
40
|
description?: string | undefined;
|
|
@@ -42,21 +42,21 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
42
42
|
}>>;
|
|
43
43
|
after: z.ZodObject<{
|
|
44
44
|
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
45
|
-
data: z.ZodType<Uint8Array<
|
|
45
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
46
46
|
description: z.ZodOptional<z.ZodString>;
|
|
47
47
|
created_at: z.ZodBigInt;
|
|
48
48
|
updated_at: z.ZodBigInt;
|
|
49
49
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
50
50
|
}, "strict", z.ZodTypeAny, {
|
|
51
51
|
owner: Uint8Array<ArrayBufferLike>;
|
|
52
|
-
data: Uint8Array<
|
|
52
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
53
53
|
created_at: bigint;
|
|
54
54
|
updated_at: bigint;
|
|
55
55
|
description?: string | undefined;
|
|
56
56
|
version?: bigint | undefined;
|
|
57
57
|
}, {
|
|
58
58
|
owner: Uint8Array<ArrayBufferLike>;
|
|
59
|
-
data: Uint8Array<
|
|
59
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
60
60
|
created_at: bigint;
|
|
61
61
|
updated_at: bigint;
|
|
62
62
|
description?: string | undefined;
|
|
@@ -65,7 +65,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
65
65
|
}, "strict", z.ZodTypeAny, {
|
|
66
66
|
after: {
|
|
67
67
|
owner: Uint8Array<ArrayBufferLike>;
|
|
68
|
-
data: Uint8Array<
|
|
68
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
69
69
|
created_at: bigint;
|
|
70
70
|
updated_at: bigint;
|
|
71
71
|
description?: string | undefined;
|
|
@@ -73,7 +73,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
73
73
|
};
|
|
74
74
|
before?: {
|
|
75
75
|
owner: Uint8Array<ArrayBufferLike>;
|
|
76
|
-
data: Uint8Array<
|
|
76
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
77
77
|
created_at: bigint;
|
|
78
78
|
updated_at: bigint;
|
|
79
79
|
description?: string | undefined;
|
|
@@ -82,7 +82,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
82
82
|
}, {
|
|
83
83
|
after: {
|
|
84
84
|
owner: Uint8Array<ArrayBufferLike>;
|
|
85
|
-
data: Uint8Array<
|
|
85
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
86
86
|
created_at: bigint;
|
|
87
87
|
updated_at: bigint;
|
|
88
88
|
description?: string | undefined;
|
|
@@ -90,7 +90,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
90
90
|
};
|
|
91
91
|
before?: {
|
|
92
92
|
owner: Uint8Array<ArrayBufferLike>;
|
|
93
|
-
data: Uint8Array<
|
|
93
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
94
94
|
created_at: bigint;
|
|
95
95
|
updated_at: bigint;
|
|
96
96
|
description?: string | undefined;
|
|
@@ -101,7 +101,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
101
101
|
data: {
|
|
102
102
|
after: {
|
|
103
103
|
owner: Uint8Array<ArrayBufferLike>;
|
|
104
|
-
data: Uint8Array<
|
|
104
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
105
105
|
created_at: bigint;
|
|
106
106
|
updated_at: bigint;
|
|
107
107
|
description?: string | undefined;
|
|
@@ -109,7 +109,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
109
109
|
};
|
|
110
110
|
before?: {
|
|
111
111
|
owner: Uint8Array<ArrayBufferLike>;
|
|
112
|
-
data: Uint8Array<
|
|
112
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
113
113
|
created_at: bigint;
|
|
114
114
|
updated_at: bigint;
|
|
115
115
|
description?: string | undefined;
|
|
@@ -122,7 +122,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
122
122
|
data: {
|
|
123
123
|
after: {
|
|
124
124
|
owner: Uint8Array<ArrayBufferLike>;
|
|
125
|
-
data: Uint8Array<
|
|
125
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
126
126
|
created_at: bigint;
|
|
127
127
|
updated_at: bigint;
|
|
128
128
|
description?: string | undefined;
|
|
@@ -130,7 +130,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
130
130
|
};
|
|
131
131
|
before?: {
|
|
132
132
|
owner: Uint8Array<ArrayBufferLike>;
|
|
133
|
-
data: Uint8Array<
|
|
133
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
134
134
|
created_at: bigint;
|
|
135
135
|
updated_at: bigint;
|
|
136
136
|
description?: string | undefined;
|
|
@@ -145,7 +145,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
145
145
|
data: {
|
|
146
146
|
after: {
|
|
147
147
|
owner: Uint8Array<ArrayBufferLike>;
|
|
148
|
-
data: Uint8Array<
|
|
148
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
149
149
|
created_at: bigint;
|
|
150
150
|
updated_at: bigint;
|
|
151
151
|
description?: string | undefined;
|
|
@@ -153,7 +153,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
153
153
|
};
|
|
154
154
|
before?: {
|
|
155
155
|
owner: Uint8Array<ArrayBufferLike>;
|
|
156
|
-
data: Uint8Array<
|
|
156
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
157
157
|
created_at: bigint;
|
|
158
158
|
updated_at: bigint;
|
|
159
159
|
description?: string | undefined;
|
|
@@ -169,7 +169,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
169
169
|
data: {
|
|
170
170
|
after: {
|
|
171
171
|
owner: Uint8Array<ArrayBufferLike>;
|
|
172
|
-
data: Uint8Array<
|
|
172
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
173
173
|
created_at: bigint;
|
|
174
174
|
updated_at: bigint;
|
|
175
175
|
description?: string | undefined;
|
|
@@ -177,7 +177,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
177
177
|
};
|
|
178
178
|
before?: {
|
|
179
179
|
owner: Uint8Array<ArrayBufferLike>;
|
|
180
|
-
data: Uint8Array<
|
|
180
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
181
181
|
created_at: bigint;
|
|
182
182
|
updated_at: bigint;
|
|
183
183
|
description?: string | undefined;
|
|
@@ -196,7 +196,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
196
196
|
data: {
|
|
197
197
|
after: {
|
|
198
198
|
owner: Uint8Array<ArrayBufferLike>;
|
|
199
|
-
data: Uint8Array<
|
|
199
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
200
200
|
created_at: bigint;
|
|
201
201
|
updated_at: bigint;
|
|
202
202
|
description?: string | undefined;
|
|
@@ -204,7 +204,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
204
204
|
};
|
|
205
205
|
before?: {
|
|
206
206
|
owner: Uint8Array<ArrayBufferLike>;
|
|
207
|
-
data: Uint8Array<
|
|
207
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
208
208
|
created_at: bigint;
|
|
209
209
|
updated_at: bigint;
|
|
210
210
|
description?: string | undefined;
|
|
@@ -223,7 +223,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
223
223
|
data: {
|
|
224
224
|
after: {
|
|
225
225
|
owner: Uint8Array<ArrayBufferLike>;
|
|
226
|
-
data: Uint8Array<
|
|
226
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
227
227
|
created_at: bigint;
|
|
228
228
|
updated_at: bigint;
|
|
229
229
|
description?: string | undefined;
|
|
@@ -231,7 +231,7 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
231
231
|
};
|
|
232
232
|
before?: {
|
|
233
233
|
owner: Uint8Array<ArrayBufferLike>;
|
|
234
|
-
data: Uint8Array<
|
|
234
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
235
235
|
created_at: bigint;
|
|
236
236
|
updated_at: bigint;
|
|
237
237
|
description?: string | undefined;
|
|
@@ -245,13 +245,13 @@ export declare const OnSetDocConfigSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
245
245
|
}, ...args: unknown[]) => Promise<void>;
|
|
246
246
|
}>;
|
|
247
247
|
/**
|
|
248
|
-
*
|
|
248
|
+
* A hook that runs when a document is created or updated.
|
|
249
249
|
*/
|
|
250
|
-
export type
|
|
250
|
+
export type OnSetDoc = z.infer<typeof OnSetDocSchema>;
|
|
251
251
|
/**
|
|
252
|
-
* @see
|
|
252
|
+
* @see Hook
|
|
253
253
|
*/
|
|
254
|
-
export declare const
|
|
254
|
+
export declare const HookSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
255
255
|
collections: z.ZodArray<z.ZodString, "many">;
|
|
256
256
|
}, {
|
|
257
257
|
/**
|
|
@@ -268,21 +268,21 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
268
268
|
data: z.ZodObject<{
|
|
269
269
|
before: z.ZodOptional<z.ZodObject<{
|
|
270
270
|
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
271
|
-
data: z.ZodType<Uint8Array<
|
|
271
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
272
272
|
description: z.ZodOptional<z.ZodString>;
|
|
273
273
|
created_at: z.ZodBigInt;
|
|
274
274
|
updated_at: z.ZodBigInt;
|
|
275
275
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
276
276
|
}, "strict", z.ZodTypeAny, {
|
|
277
277
|
owner: Uint8Array<ArrayBufferLike>;
|
|
278
|
-
data: Uint8Array<
|
|
278
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
279
279
|
created_at: bigint;
|
|
280
280
|
updated_at: bigint;
|
|
281
281
|
description?: string | undefined;
|
|
282
282
|
version?: bigint | undefined;
|
|
283
283
|
}, {
|
|
284
284
|
owner: Uint8Array<ArrayBufferLike>;
|
|
285
|
-
data: Uint8Array<
|
|
285
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
286
286
|
created_at: bigint;
|
|
287
287
|
updated_at: bigint;
|
|
288
288
|
description?: string | undefined;
|
|
@@ -290,21 +290,21 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
290
290
|
}>>;
|
|
291
291
|
after: z.ZodObject<{
|
|
292
292
|
owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
293
|
-
data: z.ZodType<Uint8Array<
|
|
293
|
+
data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
|
|
294
294
|
description: z.ZodOptional<z.ZodString>;
|
|
295
295
|
created_at: z.ZodBigInt;
|
|
296
296
|
updated_at: z.ZodBigInt;
|
|
297
297
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
298
298
|
}, "strict", z.ZodTypeAny, {
|
|
299
299
|
owner: Uint8Array<ArrayBufferLike>;
|
|
300
|
-
data: Uint8Array<
|
|
300
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
301
301
|
created_at: bigint;
|
|
302
302
|
updated_at: bigint;
|
|
303
303
|
description?: string | undefined;
|
|
304
304
|
version?: bigint | undefined;
|
|
305
305
|
}, {
|
|
306
306
|
owner: Uint8Array<ArrayBufferLike>;
|
|
307
|
-
data: Uint8Array<
|
|
307
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
308
308
|
created_at: bigint;
|
|
309
309
|
updated_at: bigint;
|
|
310
310
|
description?: string | undefined;
|
|
@@ -313,7 +313,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
313
313
|
}, "strict", z.ZodTypeAny, {
|
|
314
314
|
after: {
|
|
315
315
|
owner: Uint8Array<ArrayBufferLike>;
|
|
316
|
-
data: Uint8Array<
|
|
316
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
317
317
|
created_at: bigint;
|
|
318
318
|
updated_at: bigint;
|
|
319
319
|
description?: string | undefined;
|
|
@@ -321,7 +321,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
321
321
|
};
|
|
322
322
|
before?: {
|
|
323
323
|
owner: Uint8Array<ArrayBufferLike>;
|
|
324
|
-
data: Uint8Array<
|
|
324
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
325
325
|
created_at: bigint;
|
|
326
326
|
updated_at: bigint;
|
|
327
327
|
description?: string | undefined;
|
|
@@ -330,7 +330,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
330
330
|
}, {
|
|
331
331
|
after: {
|
|
332
332
|
owner: Uint8Array<ArrayBufferLike>;
|
|
333
|
-
data: Uint8Array<
|
|
333
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
334
334
|
created_at: bigint;
|
|
335
335
|
updated_at: bigint;
|
|
336
336
|
description?: string | undefined;
|
|
@@ -338,7 +338,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
338
338
|
};
|
|
339
339
|
before?: {
|
|
340
340
|
owner: Uint8Array<ArrayBufferLike>;
|
|
341
|
-
data: Uint8Array<
|
|
341
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
342
342
|
created_at: bigint;
|
|
343
343
|
updated_at: bigint;
|
|
344
344
|
description?: string | undefined;
|
|
@@ -349,7 +349,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
349
349
|
data: {
|
|
350
350
|
after: {
|
|
351
351
|
owner: Uint8Array<ArrayBufferLike>;
|
|
352
|
-
data: Uint8Array<
|
|
352
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
353
353
|
created_at: bigint;
|
|
354
354
|
updated_at: bigint;
|
|
355
355
|
description?: string | undefined;
|
|
@@ -357,7 +357,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
357
357
|
};
|
|
358
358
|
before?: {
|
|
359
359
|
owner: Uint8Array<ArrayBufferLike>;
|
|
360
|
-
data: Uint8Array<
|
|
360
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
361
361
|
created_at: bigint;
|
|
362
362
|
updated_at: bigint;
|
|
363
363
|
description?: string | undefined;
|
|
@@ -370,7 +370,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
370
370
|
data: {
|
|
371
371
|
after: {
|
|
372
372
|
owner: Uint8Array<ArrayBufferLike>;
|
|
373
|
-
data: Uint8Array<
|
|
373
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
374
374
|
created_at: bigint;
|
|
375
375
|
updated_at: bigint;
|
|
376
376
|
description?: string | undefined;
|
|
@@ -378,7 +378,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
378
378
|
};
|
|
379
379
|
before?: {
|
|
380
380
|
owner: Uint8Array<ArrayBufferLike>;
|
|
381
|
-
data: Uint8Array<
|
|
381
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
382
382
|
created_at: bigint;
|
|
383
383
|
updated_at: bigint;
|
|
384
384
|
description?: string | undefined;
|
|
@@ -393,7 +393,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
393
393
|
data: {
|
|
394
394
|
after: {
|
|
395
395
|
owner: Uint8Array<ArrayBufferLike>;
|
|
396
|
-
data: Uint8Array<
|
|
396
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
397
397
|
created_at: bigint;
|
|
398
398
|
updated_at: bigint;
|
|
399
399
|
description?: string | undefined;
|
|
@@ -401,7 +401,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
401
401
|
};
|
|
402
402
|
before?: {
|
|
403
403
|
owner: Uint8Array<ArrayBufferLike>;
|
|
404
|
-
data: Uint8Array<
|
|
404
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
405
405
|
created_at: bigint;
|
|
406
406
|
updated_at: bigint;
|
|
407
407
|
description?: string | undefined;
|
|
@@ -417,7 +417,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
417
417
|
data: {
|
|
418
418
|
after: {
|
|
419
419
|
owner: Uint8Array<ArrayBufferLike>;
|
|
420
|
-
data: Uint8Array<
|
|
420
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
421
421
|
created_at: bigint;
|
|
422
422
|
updated_at: bigint;
|
|
423
423
|
description?: string | undefined;
|
|
@@ -425,7 +425,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
425
425
|
};
|
|
426
426
|
before?: {
|
|
427
427
|
owner: Uint8Array<ArrayBufferLike>;
|
|
428
|
-
data: Uint8Array<
|
|
428
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
429
429
|
created_at: bigint;
|
|
430
430
|
updated_at: bigint;
|
|
431
431
|
description?: string | undefined;
|
|
@@ -444,7 +444,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
444
444
|
data: {
|
|
445
445
|
after: {
|
|
446
446
|
owner: Uint8Array<ArrayBufferLike>;
|
|
447
|
-
data: Uint8Array<
|
|
447
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
448
448
|
created_at: bigint;
|
|
449
449
|
updated_at: bigint;
|
|
450
450
|
description?: string | undefined;
|
|
@@ -452,7 +452,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
452
452
|
};
|
|
453
453
|
before?: {
|
|
454
454
|
owner: Uint8Array<ArrayBufferLike>;
|
|
455
|
-
data: Uint8Array<
|
|
455
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
456
456
|
created_at: bigint;
|
|
457
457
|
updated_at: bigint;
|
|
458
458
|
description?: string | undefined;
|
|
@@ -471,7 +471,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
471
471
|
data: {
|
|
472
472
|
after: {
|
|
473
473
|
owner: Uint8Array<ArrayBufferLike>;
|
|
474
|
-
data: Uint8Array<
|
|
474
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
475
475
|
created_at: bigint;
|
|
476
476
|
updated_at: bigint;
|
|
477
477
|
description?: string | undefined;
|
|
@@ -479,7 +479,7 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
479
479
|
};
|
|
480
480
|
before?: {
|
|
481
481
|
owner: Uint8Array<ArrayBufferLike>;
|
|
482
|
-
data: Uint8Array<
|
|
482
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
483
483
|
created_at: bigint;
|
|
484
484
|
updated_at: bigint;
|
|
485
485
|
description?: string | undefined;
|
|
@@ -493,13 +493,13 @@ export declare const HookConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
493
493
|
}, ...args: unknown[]) => Promise<void>;
|
|
494
494
|
}>;
|
|
495
495
|
/**
|
|
496
|
-
* All
|
|
496
|
+
* All hooks definitions.
|
|
497
497
|
*/
|
|
498
|
-
export type
|
|
499
|
-
export declare const HookFnSchema: <T extends z.ZodTypeAny>(
|
|
500
|
-
export type HookFn<T extends
|
|
501
|
-
export declare const HookFnOrObjectSchema: <T extends z.ZodTypeAny>(
|
|
502
|
-
export type HookFnOrObject<T extends
|
|
503
|
-
export declare function defineHook<T extends
|
|
504
|
-
export declare function defineHook<T extends
|
|
505
|
-
export declare function defineHook<T extends
|
|
498
|
+
export type Hook = z.infer<typeof HookSchema>;
|
|
499
|
+
export declare const HookFnSchema: <T extends z.ZodTypeAny>(hookSchema: T) => z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, T>;
|
|
500
|
+
export type HookFn<T extends Hook> = (hook: z.infer<typeof SatelliteEnvSchema>) => T;
|
|
501
|
+
export declare const HookFnOrObjectSchema: <T extends z.ZodTypeAny>(hookSchema: T) => z.ZodUnion<[T, z.ZodFunction<z.ZodTuple<[z.ZodRecord<z.ZodString, z.ZodUnknown>], z.ZodUnknown>, T>]>;
|
|
502
|
+
export type HookFnOrObject<T extends Hook> = T | HookFn<T>;
|
|
503
|
+
export declare function defineHook<T extends Hook>(hook: T): T;
|
|
504
|
+
export declare function defineHook<T extends Hook>(hook: HookFn<T>): HookFn<T>;
|
|
505
|
+
export declare function defineHook<T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @see SatelliteEnv
|
|
4
|
+
*/
|
|
5
|
+
export declare const SatelliteEnvSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2
6
|
/**
|
|
3
7
|
* Placeholder for future environment-specific configurations.
|
|
4
8
|
*
|
|
@@ -6,6 +10,4 @@ import * as z from 'zod';
|
|
|
6
10
|
* - Defining the execution mode (e.g., staging or production).
|
|
7
11
|
* - Providing environment-specific values like `ckBtcLedgerId` for test or production.
|
|
8
12
|
*/
|
|
9
|
-
export
|
|
10
|
-
/** @typedef {z.infer<typeof SatelliteConfigEnvSchema>} SatelliteConfigEnv */
|
|
11
|
-
export type SatelliteConfigEnv = z.infer<typeof SatelliteConfigEnvSchema>;
|
|
13
|
+
export type SatelliteEnv = z.infer<typeof SatelliteEnvSchema>;
|