@automate.ax/integration-contracts 0.119.1 → 0.119.3
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/tidycal/schemas.d.ts +2 -2
- package/dist/tidycal/schemas.js +11 -2
- package/package.json +2 -2
- package/src/tidycal/schemas.ts +11 -2
|
@@ -92,12 +92,12 @@ export declare const TIDYCAL_BOOKING_TYPE_SCHEMA: z.ZodObject<{
|
|
|
92
92
|
stripe: "stripe";
|
|
93
93
|
}>>;
|
|
94
94
|
paymentPlatformId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
-
price: z.ZodNumber
|
|
95
|
+
price: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodNumber>;
|
|
96
96
|
private: z.ZodBoolean;
|
|
97
97
|
redirectUrl: z.ZodNullable<z.ZodURL>;
|
|
98
98
|
title: z.ZodString;
|
|
99
99
|
updatedAt: z.ZodISODateTime;
|
|
100
|
-
url: z.ZodURL
|
|
100
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
101
101
|
urlSlug: z.ZodString;
|
|
102
102
|
userId: z.ZodNumber;
|
|
103
103
|
}, z.core.$strip>;
|
package/dist/tidycal/schemas.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
const DATE_TIME_SCHEMA = z.iso.datetime({ offset: true });
|
|
3
3
|
const ID_SCHEMA = z.number().int().positive();
|
|
4
|
+
const TIDYCAL_PRICE_SCHEMA = z
|
|
5
|
+
.union([
|
|
6
|
+
z.number(),
|
|
7
|
+
z
|
|
8
|
+
.string()
|
|
9
|
+
.regex(/^\d+(?:\.\d+)?$/)
|
|
10
|
+
.transform(Number),
|
|
11
|
+
])
|
|
12
|
+
.pipe(z.number().nonnegative());
|
|
4
13
|
export const TIDYCAL_ACCOUNT_SCHEMA = z.object({
|
|
5
14
|
currencySymbol: z.string(),
|
|
6
15
|
email: z.email(),
|
|
@@ -66,12 +75,12 @@ export const TIDYCAL_BOOKING_TYPE_SCHEMA = z.object({
|
|
|
66
75
|
paddingMinutes: z.number().int().min(0),
|
|
67
76
|
paymentPlatform: z.enum(["paypal", "stripe", "tidycal"]).nullable(),
|
|
68
77
|
paymentPlatformId: z.string().nullable().optional(),
|
|
69
|
-
price:
|
|
78
|
+
price: TIDYCAL_PRICE_SCHEMA,
|
|
70
79
|
private: z.boolean(),
|
|
71
80
|
redirectUrl: z.url().nullable(),
|
|
72
81
|
title: z.string(),
|
|
73
82
|
updatedAt: DATE_TIME_SCHEMA,
|
|
74
|
-
url: z.url(),
|
|
83
|
+
url: z.url().optional(),
|
|
75
84
|
urlSlug: z.string(),
|
|
76
85
|
userId: ID_SCHEMA,
|
|
77
86
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/integration-contracts",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.3",
|
|
4
4
|
"description": "Shared integration payload contracts and provider primitives for Automate.ax.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@automate.ax/codec": "0.119.
|
|
56
|
+
"@automate.ax/codec": "0.119.3",
|
|
57
57
|
"@cfworker/json-schema": "^4.1.1",
|
|
58
58
|
"@googleapis/calendar": "^15.0.0",
|
|
59
59
|
"@googleapis/forms": "^6.0.1",
|
package/src/tidycal/schemas.ts
CHANGED
|
@@ -2,6 +2,15 @@ import * as z from "zod"
|
|
|
2
2
|
|
|
3
3
|
const DATE_TIME_SCHEMA = z.iso.datetime({ offset: true })
|
|
4
4
|
const ID_SCHEMA = z.number().int().positive()
|
|
5
|
+
const TIDYCAL_PRICE_SCHEMA = z
|
|
6
|
+
.union([
|
|
7
|
+
z.number(),
|
|
8
|
+
z
|
|
9
|
+
.string()
|
|
10
|
+
.regex(/^\d+(?:\.\d+)?$/)
|
|
11
|
+
.transform(Number),
|
|
12
|
+
])
|
|
13
|
+
.pipe(z.number().nonnegative())
|
|
5
14
|
|
|
6
15
|
export const TIDYCAL_ACCOUNT_SCHEMA = z.object({
|
|
7
16
|
currencySymbol: z.string(),
|
|
@@ -73,12 +82,12 @@ export const TIDYCAL_BOOKING_TYPE_SCHEMA = z.object({
|
|
|
73
82
|
paddingMinutes: z.number().int().min(0),
|
|
74
83
|
paymentPlatform: z.enum(["paypal", "stripe", "tidycal"]).nullable(),
|
|
75
84
|
paymentPlatformId: z.string().nullable().optional(),
|
|
76
|
-
price:
|
|
85
|
+
price: TIDYCAL_PRICE_SCHEMA,
|
|
77
86
|
private: z.boolean(),
|
|
78
87
|
redirectUrl: z.url().nullable(),
|
|
79
88
|
title: z.string(),
|
|
80
89
|
updatedAt: DATE_TIME_SCHEMA,
|
|
81
|
-
url: z.url(),
|
|
90
|
+
url: z.url().optional(),
|
|
82
91
|
urlSlug: z.string(),
|
|
83
92
|
userId: ID_SCHEMA,
|
|
84
93
|
})
|