@onabl/contracts 0.1.2 → 0.2.1
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/common.d.ts +11 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +8 -1
- package/dist/forms.d.ts +1 -1
- package/dist/forms.js +1 -1
- package/dist/public-api.d.ts +2 -2
- package/dist/public-api.js +1 -1
- package/package.json +4 -4
package/dist/common.d.ts
CHANGED
|
@@ -8,6 +8,17 @@ export declare const SearchPaginationQuerySchema: z.ZodObject<{
|
|
|
8
8
|
offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
9
9
|
search: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
|
+
export declare const WebhookDeliveryQuerySchema: z.ZodObject<{
|
|
12
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
13
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
14
|
+
event: z.ZodOptional<z.ZodString>;
|
|
15
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
delivered: "delivered";
|
|
17
|
+
pending: "pending";
|
|
18
|
+
failed: "failed";
|
|
19
|
+
}>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
11
21
|
export type PaginationQuery = z.infer<typeof PaginationQuerySchema>;
|
|
12
22
|
export type SearchPaginationQuery = z.infer<typeof SearchPaginationQuerySchema>;
|
|
23
|
+
export type WebhookDeliveryQuery = z.infer<typeof WebhookDeliveryQuerySchema>;
|
|
13
24
|
//# sourceMappingURL=common.d.ts.map
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;iBAEtC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;iBAEtC,CAAC;AAKH,eAAO,MAAM,0BAA0B;;;;;;;;;iBAGrC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
package/dist/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchPaginationQuerySchema = exports.PaginationQuerySchema = void 0;
|
|
3
|
+
exports.WebhookDeliveryQuerySchema = exports.SearchPaginationQuerySchema = exports.PaginationQuerySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.PaginationQuerySchema = zod_1.z.object({
|
|
6
6
|
limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(50),
|
|
@@ -9,3 +9,10 @@ exports.PaginationQuerySchema = zod_1.z.object({
|
|
|
9
9
|
exports.SearchPaginationQuerySchema = exports.PaginationQuerySchema.extend({
|
|
10
10
|
search: zod_1.z.string().optional(),
|
|
11
11
|
});
|
|
12
|
+
// §14.3 — dashboard delivery log filters. "status" mirrors the tri-state the
|
|
13
|
+
// UI actually shows (delivered / pending-retry / permanently failed), not the
|
|
14
|
+
// raw column names on WebhookDelivery.
|
|
15
|
+
exports.WebhookDeliveryQuerySchema = exports.PaginationQuerySchema.extend({
|
|
16
|
+
event: zod_1.z.string().optional(),
|
|
17
|
+
status: zod_1.z.enum(["delivered", "pending", "failed"]).optional(),
|
|
18
|
+
});
|
package/dist/forms.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare const FormConfigSchema: z.ZodObject<{
|
|
|
23
23
|
steps: z.ZodArray<z.ZodObject<{
|
|
24
24
|
id: z.ZodString;
|
|
25
25
|
label: z.ZodString;
|
|
26
|
-
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
27
|
}, z.core.$strip>>;
|
|
28
28
|
fields: z.ZodArray<z.ZodObject<{
|
|
29
29
|
id: z.ZodString;
|
package/dist/forms.js
CHANGED
|
@@ -40,7 +40,7 @@ exports.FormConfigSchema = zod_1.z
|
|
|
40
40
|
.object({
|
|
41
41
|
version: zod_1.z.literal("1.0"),
|
|
42
42
|
meta: exports.FormConfigMetaSchema,
|
|
43
|
-
steps: zod_1.z.array(zod_1.z.object({ id: zod_1.z.string(), label: zod_1.z.string(),
|
|
43
|
+
steps: zod_1.z.array(zod_1.z.object({ id: zod_1.z.string(), label: zod_1.z.string(), description: zod_1.z.string().optional() })),
|
|
44
44
|
fields: zod_1.z.array(FormFieldSchema),
|
|
45
45
|
rules: zod_1.z.object({
|
|
46
46
|
phase1: zod_1.z.array(PricingRuleSchema),
|
package/dist/public-api.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare const PublicFormConfigSchema: z.ZodObject<{
|
|
|
49
49
|
steps: z.ZodArray<z.ZodObject<{
|
|
50
50
|
id: z.ZodString;
|
|
51
51
|
label: z.ZodString;
|
|
52
|
-
|
|
52
|
+
description: z.ZodOptional<z.ZodString>;
|
|
53
53
|
}, z.core.$loose>>;
|
|
54
54
|
fields: z.ZodArray<z.ZodObject<{
|
|
55
55
|
id: z.ZodString;
|
|
@@ -120,7 +120,7 @@ export declare const PublicFormSchema: z.ZodObject<{
|
|
|
120
120
|
steps: z.ZodArray<z.ZodObject<{
|
|
121
121
|
id: z.ZodString;
|
|
122
122
|
label: z.ZodString;
|
|
123
|
-
|
|
123
|
+
description: z.ZodOptional<z.ZodString>;
|
|
124
124
|
}, z.core.$loose>>;
|
|
125
125
|
fields: z.ZodArray<z.ZodObject<{
|
|
126
126
|
id: z.ZodString;
|
package/dist/public-api.js
CHANGED
|
@@ -69,7 +69,7 @@ exports.PublicFormConfigSchema = zod_1.z
|
|
|
69
69
|
.optional(),
|
|
70
70
|
})
|
|
71
71
|
.passthrough(),
|
|
72
|
-
steps: zod_1.z.array(zod_1.z.object({ id: zod_1.z.string(), label: zod_1.z.string(),
|
|
72
|
+
steps: zod_1.z.array(zod_1.z.object({ id: zod_1.z.string(), label: zod_1.z.string(), description: zod_1.z.string().optional() }).passthrough()),
|
|
73
73
|
fields: zod_1.z.array(exports.PublicFormFieldSchema),
|
|
74
74
|
})
|
|
75
75
|
.passthrough();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onabl/contracts",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Zod request/response validation schemas for onabl's public API — the SDK's typed contract with the API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"eslint": "latest",
|
|
26
|
-
"@onabl/
|
|
27
|
-
"@onabl/
|
|
26
|
+
"@onabl/eslint-config": "0.0.1",
|
|
27
|
+
"@onabl/typescript-config": "0.0.1"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@onabl/types": "0.
|
|
30
|
+
"@onabl/types": "0.3.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"zod": "^4"
|