@substrat-run/contracts 0.2.1 → 0.4.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/attachments.d.ts +4 -1
- package/dist/attachments.d.ts.map +1 -1
- package/dist/control-plane.d.ts +47 -55
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/events.d.ts +34 -160
- package/dist/events.d.ts.map +1 -1
- package/dist/ids.d.ts +9 -9
- package/dist/ids.d.ts.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +29 -347
- package/dist/manifest.d.ts.map +1 -1
- package/dist/money.d.ts +5 -11
- package/dist/money.d.ts.map +1 -1
- package/dist/permission.d.ts +58 -222
- package/dist/permission.d.ts.map +1 -1
- package/dist/permission.js +14 -0
- package/dist/permission.js.map +1 -1
- package/dist/tenancy.d.ts +50 -65
- package/dist/tenancy.d.ts.map +1 -1
- package/dist/tenancy.js +10 -0
- package/dist/tenancy.js.map +1 -1
- package/package.json +2 -2
package/dist/manifest.d.ts
CHANGED
|
@@ -1,408 +1,90 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const semverVersion: z.ZodString;
|
|
3
3
|
export declare const permissionDeclaration: z.ZodObject<{
|
|
4
|
-
key: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
4
|
+
key: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
5
5
|
description: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
key: string & z.BRAND<"PermissionKey">;
|
|
8
|
-
description: string;
|
|
9
|
-
}, {
|
|
10
|
-
key: string;
|
|
11
|
-
description: string;
|
|
12
|
-
}>;
|
|
6
|
+
}, z.core.$strip>;
|
|
13
7
|
export type PermissionDeclaration = z.infer<typeof permissionDeclaration>;
|
|
14
8
|
export declare const eventTypeRef: z.ZodObject<{
|
|
15
9
|
type: z.ZodString;
|
|
16
10
|
schemaVersion: z.ZodNumber;
|
|
17
|
-
},
|
|
18
|
-
type: string;
|
|
19
|
-
schemaVersion: number;
|
|
20
|
-
}, {
|
|
21
|
-
type: string;
|
|
22
|
-
schemaVersion: number;
|
|
23
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
24
12
|
export type EventTypeRef = z.infer<typeof eventTypeRef>;
|
|
25
13
|
export declare const manifestGuard: z.ZodObject<{
|
|
26
14
|
before: z.ZodString;
|
|
27
15
|
predicate: z.ZodString;
|
|
28
16
|
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
29
|
-
},
|
|
30
|
-
before: string;
|
|
31
|
-
predicate: string;
|
|
32
|
-
config: Record<string, unknown>;
|
|
33
|
-
}, {
|
|
34
|
-
before: string;
|
|
35
|
-
predicate: string;
|
|
36
|
-
config?: Record<string, unknown> | undefined;
|
|
37
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
38
18
|
export type ManifestGuard = z.infer<typeof manifestGuard>;
|
|
39
19
|
export declare const moduleManifest: z.ZodObject<{
|
|
40
|
-
id: z.ZodBranded<z.ZodString, "ModuleId">;
|
|
20
|
+
id: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
|
|
41
21
|
version: z.ZodString;
|
|
42
22
|
kernelContract: z.ZodString;
|
|
43
23
|
permissions: z.ZodArray<z.ZodObject<{
|
|
44
|
-
key: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
24
|
+
key: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
45
25
|
description: z.ZodString;
|
|
46
|
-
},
|
|
47
|
-
key: string & z.BRAND<"PermissionKey">;
|
|
48
|
-
description: string;
|
|
49
|
-
}, {
|
|
50
|
-
key: string;
|
|
51
|
-
description: string;
|
|
52
|
-
}>, "many">;
|
|
26
|
+
}, z.core.$strip>>;
|
|
53
27
|
events: z.ZodObject<{
|
|
54
28
|
emits: z.ZodArray<z.ZodObject<{
|
|
55
29
|
type: z.ZodString;
|
|
56
30
|
schemaVersion: z.ZodNumber;
|
|
57
|
-
},
|
|
58
|
-
type: string;
|
|
59
|
-
schemaVersion: number;
|
|
60
|
-
}, {
|
|
61
|
-
type: string;
|
|
62
|
-
schemaVersion: number;
|
|
63
|
-
}>, "many">;
|
|
31
|
+
}, z.core.$strip>>;
|
|
64
32
|
consumes: z.ZodArray<z.ZodObject<{
|
|
65
33
|
type: z.ZodString;
|
|
66
34
|
schemaVersion: z.ZodNumber;
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
schemaVersion: number;
|
|
70
|
-
}, {
|
|
71
|
-
type: string;
|
|
72
|
-
schemaVersion: number;
|
|
73
|
-
}>, "many">;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
emits: {
|
|
76
|
-
type: string;
|
|
77
|
-
schemaVersion: number;
|
|
78
|
-
}[];
|
|
79
|
-
consumes: {
|
|
80
|
-
type: string;
|
|
81
|
-
schemaVersion: number;
|
|
82
|
-
}[];
|
|
83
|
-
}, {
|
|
84
|
-
emits: {
|
|
85
|
-
type: string;
|
|
86
|
-
schemaVersion: number;
|
|
87
|
-
}[];
|
|
88
|
-
consumes: {
|
|
89
|
-
type: string;
|
|
90
|
-
schemaVersion: number;
|
|
91
|
-
}[];
|
|
92
|
-
}>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
93
37
|
migrations: z.ZodObject<{
|
|
94
38
|
journalDir: z.ZodString;
|
|
95
39
|
compatibleFrom: z.ZodString;
|
|
96
|
-
},
|
|
97
|
-
journalDir: string;
|
|
98
|
-
compatibleFrom: string;
|
|
99
|
-
}, {
|
|
100
|
-
journalDir: string;
|
|
101
|
-
compatibleFrom: string;
|
|
102
|
-
}>;
|
|
40
|
+
}, z.core.$strip>;
|
|
103
41
|
attachmentTargets: z.ZodArray<z.ZodObject<{
|
|
104
42
|
entityType: z.ZodString;
|
|
105
|
-
readPermission: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
106
|
-
},
|
|
107
|
-
entityType: string;
|
|
108
|
-
readPermission: string & z.BRAND<"PermissionKey">;
|
|
109
|
-
}, {
|
|
110
|
-
entityType: string;
|
|
111
|
-
readPermission: string;
|
|
112
|
-
}>, "many">;
|
|
43
|
+
readPermission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
44
|
+
}, z.core.$strip>>;
|
|
113
45
|
entityRelations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
114
46
|
entityType: z.ZodString;
|
|
115
47
|
parentType: z.ZodString;
|
|
116
|
-
},
|
|
117
|
-
entityType: string;
|
|
118
|
-
parentType: string;
|
|
119
|
-
}, {
|
|
120
|
-
entityType: string;
|
|
121
|
-
parentType: string;
|
|
122
|
-
}>, "many">>;
|
|
48
|
+
}, z.core.$strip>>>;
|
|
123
49
|
guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
50
|
before: z.ZodString;
|
|
125
51
|
predicate: z.ZodString;
|
|
126
52
|
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
predicate: string;
|
|
130
|
-
config: Record<string, unknown>;
|
|
131
|
-
}, {
|
|
132
|
-
before: string;
|
|
133
|
-
predicate: string;
|
|
134
|
-
config?: Record<string, unknown> | undefined;
|
|
135
|
-
}>, "many">>;
|
|
136
|
-
withdraws: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
withdraws: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
55
|
entitlementKey: z.ZodString;
|
|
138
56
|
api: z.ZodOptional<z.ZodString>;
|
|
139
57
|
searchables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
58
|
entityType: z.ZodString;
|
|
141
|
-
fields: z.ZodArray<z.ZodString
|
|
142
|
-
},
|
|
143
|
-
entityType: string;
|
|
144
|
-
fields: string[];
|
|
145
|
-
}, {
|
|
146
|
-
entityType: string;
|
|
147
|
-
fields: string[];
|
|
148
|
-
}>, "many">>;
|
|
59
|
+
fields: z.ZodArray<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>>>;
|
|
149
61
|
ui: z.ZodOptional<z.ZodObject<{
|
|
150
62
|
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
151
63
|
path: z.ZodString;
|
|
152
64
|
screen: z.ZodString;
|
|
153
|
-
permission: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
154
|
-
},
|
|
155
|
-
path: string;
|
|
156
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
157
|
-
screen: string;
|
|
158
|
-
}, {
|
|
159
|
-
path: string;
|
|
160
|
-
permission: string;
|
|
161
|
-
screen: string;
|
|
162
|
-
}>, "many">>;
|
|
65
|
+
permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
66
|
+
}, z.core.$strip>>>;
|
|
163
67
|
nav: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
164
68
|
label: z.ZodString;
|
|
165
69
|
icon: z.ZodOptional<z.ZodString>;
|
|
166
70
|
to: z.ZodString;
|
|
167
|
-
permission: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
168
|
-
},
|
|
169
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
170
|
-
label: string;
|
|
171
|
-
to: string;
|
|
172
|
-
icon?: string | undefined;
|
|
173
|
-
}, {
|
|
174
|
-
permission: string;
|
|
175
|
-
label: string;
|
|
176
|
-
to: string;
|
|
177
|
-
icon?: string | undefined;
|
|
178
|
-
}>, "many">>;
|
|
71
|
+
permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
72
|
+
}, z.core.$strip>>>;
|
|
179
73
|
entityViews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
180
74
|
entityType: z.ZodString;
|
|
181
75
|
view: z.ZodString;
|
|
182
|
-
},
|
|
183
|
-
entityType: string;
|
|
184
|
-
view: string;
|
|
185
|
-
}, {
|
|
186
|
-
entityType: string;
|
|
187
|
-
view: string;
|
|
188
|
-
}>, "many">>;
|
|
76
|
+
}, z.core.$strip>>>;
|
|
189
77
|
widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
190
78
|
slot: z.ZodString;
|
|
191
79
|
component: z.ZodString;
|
|
192
|
-
permission: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
193
|
-
},
|
|
194
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
195
|
-
slot: string;
|
|
196
|
-
component: string;
|
|
197
|
-
}, {
|
|
198
|
-
permission: string;
|
|
199
|
-
slot: string;
|
|
200
|
-
component: string;
|
|
201
|
-
}>, "many">>;
|
|
80
|
+
permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
202
82
|
settingsPanels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
203
83
|
label: z.ZodString;
|
|
204
84
|
component: z.ZodString;
|
|
205
|
-
permission: z.ZodBranded<z.ZodString, "PermissionKey">;
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
component: string;
|
|
210
|
-
}, {
|
|
211
|
-
permission: string;
|
|
212
|
-
label: string;
|
|
213
|
-
component: string;
|
|
214
|
-
}>, "many">>;
|
|
215
|
-
}, "strip", z.ZodTypeAny, {
|
|
216
|
-
routes?: {
|
|
217
|
-
path: string;
|
|
218
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
219
|
-
screen: string;
|
|
220
|
-
}[] | undefined;
|
|
221
|
-
nav?: {
|
|
222
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
223
|
-
label: string;
|
|
224
|
-
to: string;
|
|
225
|
-
icon?: string | undefined;
|
|
226
|
-
}[] | undefined;
|
|
227
|
-
entityViews?: {
|
|
228
|
-
entityType: string;
|
|
229
|
-
view: string;
|
|
230
|
-
}[] | undefined;
|
|
231
|
-
widgets?: {
|
|
232
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
233
|
-
slot: string;
|
|
234
|
-
component: string;
|
|
235
|
-
}[] | undefined;
|
|
236
|
-
settingsPanels?: {
|
|
237
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
238
|
-
label: string;
|
|
239
|
-
component: string;
|
|
240
|
-
}[] | undefined;
|
|
241
|
-
}, {
|
|
242
|
-
routes?: {
|
|
243
|
-
path: string;
|
|
244
|
-
permission: string;
|
|
245
|
-
screen: string;
|
|
246
|
-
}[] | undefined;
|
|
247
|
-
nav?: {
|
|
248
|
-
permission: string;
|
|
249
|
-
label: string;
|
|
250
|
-
to: string;
|
|
251
|
-
icon?: string | undefined;
|
|
252
|
-
}[] | undefined;
|
|
253
|
-
entityViews?: {
|
|
254
|
-
entityType: string;
|
|
255
|
-
view: string;
|
|
256
|
-
}[] | undefined;
|
|
257
|
-
widgets?: {
|
|
258
|
-
permission: string;
|
|
259
|
-
slot: string;
|
|
260
|
-
component: string;
|
|
261
|
-
}[] | undefined;
|
|
262
|
-
settingsPanels?: {
|
|
263
|
-
permission: string;
|
|
264
|
-
label: string;
|
|
265
|
-
component: string;
|
|
266
|
-
}[] | undefined;
|
|
267
|
-
}>>;
|
|
268
|
-
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
id: string & z.BRAND<"ModuleId">;
|
|
270
|
-
permissions: {
|
|
271
|
-
key: string & z.BRAND<"PermissionKey">;
|
|
272
|
-
description: string;
|
|
273
|
-
}[];
|
|
274
|
-
version: string;
|
|
275
|
-
kernelContract: string;
|
|
276
|
-
events: {
|
|
277
|
-
emits: {
|
|
278
|
-
type: string;
|
|
279
|
-
schemaVersion: number;
|
|
280
|
-
}[];
|
|
281
|
-
consumes: {
|
|
282
|
-
type: string;
|
|
283
|
-
schemaVersion: number;
|
|
284
|
-
}[];
|
|
285
|
-
};
|
|
286
|
-
migrations: {
|
|
287
|
-
journalDir: string;
|
|
288
|
-
compatibleFrom: string;
|
|
289
|
-
};
|
|
290
|
-
attachmentTargets: {
|
|
291
|
-
entityType: string;
|
|
292
|
-
readPermission: string & z.BRAND<"PermissionKey">;
|
|
293
|
-
}[];
|
|
294
|
-
entitlementKey: string;
|
|
295
|
-
entityRelations?: {
|
|
296
|
-
entityType: string;
|
|
297
|
-
parentType: string;
|
|
298
|
-
}[] | undefined;
|
|
299
|
-
guards?: {
|
|
300
|
-
before: string;
|
|
301
|
-
predicate: string;
|
|
302
|
-
config: Record<string, unknown>;
|
|
303
|
-
}[] | undefined;
|
|
304
|
-
withdraws?: string[] | undefined;
|
|
305
|
-
api?: string | undefined;
|
|
306
|
-
searchables?: {
|
|
307
|
-
entityType: string;
|
|
308
|
-
fields: string[];
|
|
309
|
-
}[] | undefined;
|
|
310
|
-
ui?: {
|
|
311
|
-
routes?: {
|
|
312
|
-
path: string;
|
|
313
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
314
|
-
screen: string;
|
|
315
|
-
}[] | undefined;
|
|
316
|
-
nav?: {
|
|
317
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
318
|
-
label: string;
|
|
319
|
-
to: string;
|
|
320
|
-
icon?: string | undefined;
|
|
321
|
-
}[] | undefined;
|
|
322
|
-
entityViews?: {
|
|
323
|
-
entityType: string;
|
|
324
|
-
view: string;
|
|
325
|
-
}[] | undefined;
|
|
326
|
-
widgets?: {
|
|
327
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
328
|
-
slot: string;
|
|
329
|
-
component: string;
|
|
330
|
-
}[] | undefined;
|
|
331
|
-
settingsPanels?: {
|
|
332
|
-
permission: string & z.BRAND<"PermissionKey">;
|
|
333
|
-
label: string;
|
|
334
|
-
component: string;
|
|
335
|
-
}[] | undefined;
|
|
336
|
-
} | undefined;
|
|
337
|
-
}, {
|
|
338
|
-
id: string;
|
|
339
|
-
permissions: {
|
|
340
|
-
key: string;
|
|
341
|
-
description: string;
|
|
342
|
-
}[];
|
|
343
|
-
version: string;
|
|
344
|
-
kernelContract: string;
|
|
345
|
-
events: {
|
|
346
|
-
emits: {
|
|
347
|
-
type: string;
|
|
348
|
-
schemaVersion: number;
|
|
349
|
-
}[];
|
|
350
|
-
consumes: {
|
|
351
|
-
type: string;
|
|
352
|
-
schemaVersion: number;
|
|
353
|
-
}[];
|
|
354
|
-
};
|
|
355
|
-
migrations: {
|
|
356
|
-
journalDir: string;
|
|
357
|
-
compatibleFrom: string;
|
|
358
|
-
};
|
|
359
|
-
attachmentTargets: {
|
|
360
|
-
entityType: string;
|
|
361
|
-
readPermission: string;
|
|
362
|
-
}[];
|
|
363
|
-
entitlementKey: string;
|
|
364
|
-
entityRelations?: {
|
|
365
|
-
entityType: string;
|
|
366
|
-
parentType: string;
|
|
367
|
-
}[] | undefined;
|
|
368
|
-
guards?: {
|
|
369
|
-
before: string;
|
|
370
|
-
predicate: string;
|
|
371
|
-
config?: Record<string, unknown> | undefined;
|
|
372
|
-
}[] | undefined;
|
|
373
|
-
withdraws?: string[] | undefined;
|
|
374
|
-
api?: string | undefined;
|
|
375
|
-
searchables?: {
|
|
376
|
-
entityType: string;
|
|
377
|
-
fields: string[];
|
|
378
|
-
}[] | undefined;
|
|
379
|
-
ui?: {
|
|
380
|
-
routes?: {
|
|
381
|
-
path: string;
|
|
382
|
-
permission: string;
|
|
383
|
-
screen: string;
|
|
384
|
-
}[] | undefined;
|
|
385
|
-
nav?: {
|
|
386
|
-
permission: string;
|
|
387
|
-
label: string;
|
|
388
|
-
to: string;
|
|
389
|
-
icon?: string | undefined;
|
|
390
|
-
}[] | undefined;
|
|
391
|
-
entityViews?: {
|
|
392
|
-
entityType: string;
|
|
393
|
-
view: string;
|
|
394
|
-
}[] | undefined;
|
|
395
|
-
widgets?: {
|
|
396
|
-
permission: string;
|
|
397
|
-
slot: string;
|
|
398
|
-
component: string;
|
|
399
|
-
}[] | undefined;
|
|
400
|
-
settingsPanels?: {
|
|
401
|
-
permission: string;
|
|
402
|
-
label: string;
|
|
403
|
-
component: string;
|
|
404
|
-
}[] | undefined;
|
|
405
|
-
} | undefined;
|
|
406
|
-
}>;
|
|
85
|
+
permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
}, z.core.$strip>;
|
|
407
89
|
export type ModuleManifest = z.infer<typeof moduleManifest>;
|
|
408
90
|
//# sourceMappingURL=manifest.d.ts.map
|
package/dist/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,aAAa,aAEsC,CAAC;AAEjE,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,aAAa,aAEsC,CAAC;AAEjE,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,eAAO,MAAM,YAAY;;;iBAGvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,aAAa;;;;iBAIxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqGzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/money.d.ts
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const currencyCode: z.ZodBranded<z.ZodString, "CurrencyCode">;
|
|
2
|
+
export declare const currencyCode: z.core.$ZodBranded<z.ZodString, "CurrencyCode", "out">;
|
|
3
3
|
export type CurrencyCode = z.infer<typeof currencyCode>;
|
|
4
|
-
export declare const moneyAmount: z.ZodBranded<z.ZodString, "MoneyAmount">;
|
|
4
|
+
export declare const moneyAmount: z.core.$ZodBranded<z.ZodString, "MoneyAmount", "out">;
|
|
5
5
|
export type MoneyAmount = z.infer<typeof moneyAmount>;
|
|
6
6
|
export declare const money: z.ZodObject<{
|
|
7
|
-
amount: z.ZodBranded<z.ZodString, "MoneyAmount">;
|
|
8
|
-
currency: z.ZodBranded<z.ZodString, "CurrencyCode">;
|
|
9
|
-
},
|
|
10
|
-
amount: string & z.BRAND<"MoneyAmount">;
|
|
11
|
-
currency: string & z.BRAND<"CurrencyCode">;
|
|
12
|
-
}, {
|
|
13
|
-
amount: string;
|
|
14
|
-
currency: string;
|
|
15
|
-
}>;
|
|
7
|
+
amount: z.core.$ZodBranded<z.ZodString, "MoneyAmount", "out">;
|
|
8
|
+
currency: z.core.$ZodBranded<z.ZodString, "CurrencyCode", "out">;
|
|
9
|
+
}, z.core.$strip>;
|
|
16
10
|
export type Money = z.infer<typeof money>;
|
|
17
11
|
/** quantity × unit price, half-up at 6 dp. Both args are decimal strings. */
|
|
18
12
|
export declare function mulDecimal(qty: string, amount: string): string;
|
package/dist/money.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../src/money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../src/money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,YAAY,wDAGC,CAAC;AAC3B,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,WAAW,uDAGC,CAAC;AAC1B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,KAAK;;;iBAGhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AA0B1C,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAG/D;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK,CAE/D;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAKlD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,KAAK,CAE7D"}
|