@crevio/sdk 0.6.0 → 0.6.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 +12 -40
- package/dist/commonjs/funcs/accessCheck.d.ts +19 -0
- package/dist/commonjs/funcs/accessCheck.d.ts.map +1 -0
- package/dist/commonjs/funcs/accessCheck.js +129 -0
- package/dist/commonjs/funcs/accessCheck.js.map +1 -0
- package/dist/commonjs/funcs/experiencesFilesCreate.d.ts +1 -1
- package/dist/commonjs/funcs/experiencesFilesCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/experiencesFilesCreate.js +3 -24
- package/dist/commonjs/funcs/experiencesFilesCreate.js.map +1 -1
- package/dist/commonjs/funcs/lessonsFilesCreate.d.ts +1 -1
- package/dist/commonjs/funcs/lessonsFilesCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/lessonsFilesCreate.js +3 -24
- package/dist/commonjs/funcs/lessonsFilesCreate.js.map +1 -1
- package/dist/commonjs/funcs/usersGet.d.ts +19 -0
- package/dist/commonjs/funcs/usersGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/usersGet.js +125 -0
- package/dist/commonjs/funcs/usersGet.js.map +1 -0
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/verify-user-token.d.ts +35 -0
- package/dist/commonjs/lib/verify-user-token.d.ts.map +1 -0
- package/dist/commonjs/lib/verify-user-token.js +75 -0
- package/dist/commonjs/lib/verify-user-token.js.map +1 -0
- package/dist/commonjs/models/accesscheck.d.ts +13 -0
- package/dist/commonjs/models/accesscheck.d.ts.map +1 -0
- package/dist/commonjs/models/accesscheck.js +60 -0
- package/dist/commonjs/models/accesscheck.js.map +1 -0
- package/dist/commonjs/models/booking.d.ts +7 -7
- package/dist/commonjs/models/booking.d.ts.map +1 -1
- package/dist/commonjs/models/booking.js +9 -9
- package/dist/commonjs/models/booking.js.map +1 -1
- package/dist/commonjs/models/eventtype.d.ts +22 -51
- package/dist/commonjs/models/eventtype.d.ts.map +1 -1
- package/dist/commonjs/models/eventtype.js +22 -73
- package/dist/commonjs/models/eventtype.js.map +1 -1
- package/dist/commonjs/models/formation.d.ts +5 -25
- package/dist/commonjs/models/formation.d.ts.map +1 -1
- package/dist/commonjs/models/formation.js +6 -37
- package/dist/commonjs/models/formation.js.map +1 -1
- package/dist/commonjs/models/formationdocument.d.ts +2 -10
- package/dist/commonjs/models/formationdocument.d.ts.map +1 -1
- package/dist/commonjs/models/formationdocument.js +3 -16
- package/dist/commonjs/models/formationdocument.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +2 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/me.d.ts +1 -1
- package/dist/commonjs/models/me.d.ts.map +1 -1
- package/dist/commonjs/models/me.js +1 -1
- package/dist/commonjs/models/me.js.map +1 -1
- package/dist/commonjs/models/operations/checkaccess.d.ts +20 -0
- package/dist/commonjs/models/operations/checkaccess.d.ts.map +1 -0
- package/dist/commonjs/models/operations/checkaccess.js +55 -0
- package/dist/commonjs/models/operations/checkaccess.js.map +1 -0
- package/dist/commonjs/models/operations/createdigitaldownloadfile.d.ts +3 -15
- package/dist/commonjs/models/operations/createdigitaldownloadfile.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createdigitaldownloadfile.js +6 -16
- package/dist/commonjs/models/operations/createdigitaldownloadfile.js.map +1 -1
- package/dist/commonjs/models/operations/createlessonfile.d.ts +3 -15
- package/dist/commonjs/models/operations/createlessonfile.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createlessonfile.js +6 -16
- package/dist/commonjs/models/operations/createlessonfile.js.map +1 -1
- package/dist/commonjs/models/operations/getuser.d.ts +15 -0
- package/dist/commonjs/models/operations/getuser.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getuser.js +49 -0
- package/dist/commonjs/models/operations/getuser.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/retryformationpayment.d.ts +5 -25
- package/dist/commonjs/models/operations/retryformationpayment.d.ts.map +1 -1
- package/dist/commonjs/models/operations/retryformationpayment.js +6 -36
- package/dist/commonjs/models/operations/retryformationpayment.js.map +1 -1
- package/dist/commonjs/models/operations/submitformation.d.ts +5 -25
- package/dist/commonjs/models/operations/submitformation.d.ts.map +1 -1
- package/dist/commonjs/models/operations/submitformation.js +6 -36
- package/dist/commonjs/models/operations/submitformation.js.map +1 -1
- package/dist/commonjs/models/user.d.ts +14 -0
- package/dist/commonjs/models/user.d.ts.map +1 -0
- package/dist/commonjs/models/user.js +61 -0
- package/dist/commonjs/models/user.js.map +1 -0
- package/dist/commonjs/sdk/access.d.ts +13 -0
- package/dist/commonjs/sdk/access.d.ts.map +1 -0
- package/dist/commonjs/sdk/access.js +22 -0
- package/dist/commonjs/sdk/access.js.map +1 -0
- package/dist/commonjs/sdk/experiencesfiles.d.ts +1 -1
- package/dist/commonjs/sdk/experiencesfiles.js +1 -1
- package/dist/commonjs/sdk/lessonsfiles.d.ts +1 -1
- package/dist/commonjs/sdk/lessonsfiles.js +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +8 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/users.d.ts +13 -0
- package/dist/commonjs/sdk/users.d.ts.map +1 -0
- package/dist/commonjs/sdk/users.js +22 -0
- package/dist/commonjs/sdk/users.js.map +1 -0
- package/dist/esm/funcs/accessCheck.d.ts +19 -0
- package/dist/esm/funcs/accessCheck.d.ts.map +1 -0
- package/dist/esm/funcs/accessCheck.js +93 -0
- package/dist/esm/funcs/accessCheck.js.map +1 -0
- package/dist/esm/funcs/experiencesFilesCreate.d.ts +1 -1
- package/dist/esm/funcs/experiencesFilesCreate.d.ts.map +1 -1
- package/dist/esm/funcs/experiencesFilesCreate.js +4 -25
- package/dist/esm/funcs/experiencesFilesCreate.js.map +1 -1
- package/dist/esm/funcs/lessonsFilesCreate.d.ts +1 -1
- package/dist/esm/funcs/lessonsFilesCreate.d.ts.map +1 -1
- package/dist/esm/funcs/lessonsFilesCreate.js +4 -25
- package/dist/esm/funcs/lessonsFilesCreate.js.map +1 -1
- package/dist/esm/funcs/usersGet.d.ts +19 -0
- package/dist/esm/funcs/usersGet.d.ts.map +1 -0
- package/dist/esm/funcs/usersGet.js +89 -0
- package/dist/esm/funcs/usersGet.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/verify-user-token.d.ts +35 -0
- package/dist/esm/lib/verify-user-token.d.ts.map +1 -0
- package/dist/esm/lib/verify-user-token.js +72 -0
- package/dist/esm/lib/verify-user-token.js.map +1 -0
- package/dist/esm/models/accesscheck.d.ts +13 -0
- package/dist/esm/models/accesscheck.d.ts.map +1 -0
- package/dist/esm/models/accesscheck.js +23 -0
- package/dist/esm/models/accesscheck.js.map +1 -0
- package/dist/esm/models/booking.d.ts +7 -7
- package/dist/esm/models/booking.d.ts.map +1 -1
- package/dist/esm/models/booking.js +7 -7
- package/dist/esm/models/booking.js.map +1 -1
- package/dist/esm/models/eventtype.d.ts +22 -51
- package/dist/esm/models/eventtype.d.ts.map +1 -1
- package/dist/esm/models/eventtype.js +21 -62
- package/dist/esm/models/eventtype.js.map +1 -1
- package/dist/esm/models/formation.d.ts +5 -25
- package/dist/esm/models/formation.d.ts.map +1 -1
- package/dist/esm/models/formation.js +5 -31
- package/dist/esm/models/formation.js.map +1 -1
- package/dist/esm/models/formationdocument.d.ts +2 -10
- package/dist/esm/models/formationdocument.d.ts.map +1 -1
- package/dist/esm/models/formationdocument.js +2 -13
- package/dist/esm/models/formationdocument.js.map +1 -1
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/me.d.ts +1 -1
- package/dist/esm/models/me.d.ts.map +1 -1
- package/dist/esm/models/me.js +1 -1
- package/dist/esm/models/me.js.map +1 -1
- package/dist/esm/models/operations/checkaccess.d.ts +20 -0
- package/dist/esm/models/operations/checkaccess.d.ts.map +1 -0
- package/dist/esm/models/operations/checkaccess.js +18 -0
- package/dist/esm/models/operations/checkaccess.js.map +1 -0
- package/dist/esm/models/operations/createdigitaldownloadfile.d.ts +3 -15
- package/dist/esm/models/operations/createdigitaldownloadfile.d.ts.map +1 -1
- package/dist/esm/models/operations/createdigitaldownloadfile.js +5 -14
- package/dist/esm/models/operations/createdigitaldownloadfile.js.map +1 -1
- package/dist/esm/models/operations/createlessonfile.d.ts +3 -15
- package/dist/esm/models/operations/createlessonfile.d.ts.map +1 -1
- package/dist/esm/models/operations/createlessonfile.js +5 -14
- package/dist/esm/models/operations/createlessonfile.js.map +1 -1
- package/dist/esm/models/operations/getuser.d.ts +15 -0
- package/dist/esm/models/operations/getuser.d.ts.map +1 -0
- package/dist/esm/models/operations/getuser.js +12 -0
- package/dist/esm/models/operations/getuser.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/retryformationpayment.d.ts +5 -25
- package/dist/esm/models/operations/retryformationpayment.d.ts.map +1 -1
- package/dist/esm/models/operations/retryformationpayment.js +5 -30
- package/dist/esm/models/operations/retryformationpayment.js.map +1 -1
- package/dist/esm/models/operations/submitformation.d.ts +5 -25
- package/dist/esm/models/operations/submitformation.d.ts.map +1 -1
- package/dist/esm/models/operations/submitformation.js +5 -30
- package/dist/esm/models/operations/submitformation.js.map +1 -1
- package/dist/esm/models/user.d.ts +14 -0
- package/dist/esm/models/user.d.ts.map +1 -0
- package/dist/esm/models/user.js +24 -0
- package/dist/esm/models/user.js.map +1 -0
- package/dist/esm/sdk/access.d.ts +13 -0
- package/dist/esm/sdk/access.d.ts.map +1 -0
- package/dist/esm/sdk/access.js +18 -0
- package/dist/esm/sdk/access.js.map +1 -0
- package/dist/esm/sdk/experiencesfiles.d.ts +1 -1
- package/dist/esm/sdk/experiencesfiles.js +1 -1
- package/dist/esm/sdk/lessonsfiles.d.ts +1 -1
- package/dist/esm/sdk/lessonsfiles.js +1 -1
- package/dist/esm/sdk/sdk.d.ts +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +8 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/users.d.ts +13 -0
- package/dist/esm/sdk/users.d.ts.map +1 -0
- package/dist/esm/sdk/users.js +18 -0
- package/dist/esm/sdk/users.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +2 -1
- package/src/funcs/accessCheck.ts +182 -0
- package/src/funcs/experiencesFilesCreate.ts +4 -38
- package/src/funcs/lessonsFilesCreate.ts +4 -38
- package/src/funcs/usersGet.ts +178 -0
- package/src/index.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/verify-user-token.ts +118 -0
- package/src/models/accesscheck.ts +44 -0
- package/src/models/booking.ts +15 -15
- package/src/models/eventtype.ts +37 -212
- package/src/models/formation.ts +10 -102
- package/src/models/formationdocument.ts +4 -39
- package/src/models/index.ts +2 -0
- package/src/models/me.ts +2 -2
- package/src/models/operations/checkaccess.ts +45 -0
- package/src/models/operations/createdigitaldownloadfile.ts +8 -40
- package/src/models/operations/createlessonfile.ts +8 -38
- package/src/models/operations/getuser.ts +30 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/retryformationpayment.ts +10 -105
- package/src/models/operations/submitformation.ts +10 -105
- package/src/models/user.ts +42 -0
- package/src/sdk/access.ts +28 -0
- package/src/sdk/experiencesfiles.ts +1 -1
- package/src/sdk/lessonsfiles.ts +1 -1
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/users.ts +28 -0
package/src/models/booking.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const BookingStatus = {
|
|
|
20
20
|
} as const;
|
|
21
21
|
export type BookingStatus = ClosedEnum<typeof BookingStatus>;
|
|
22
22
|
|
|
23
|
-
export type
|
|
23
|
+
export type IntakeAnswer = {};
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* ID by default, full object when expanded
|
|
@@ -35,9 +35,9 @@ export type CheckoutUnion = Checkout | string;
|
|
|
35
35
|
export type Booking = {
|
|
36
36
|
object: string;
|
|
37
37
|
id: string;
|
|
38
|
-
eventTypeId:
|
|
39
|
-
customerId:
|
|
40
|
-
orderId:
|
|
38
|
+
eventTypeId: string;
|
|
39
|
+
customerId: string | null;
|
|
40
|
+
orderId: string | null;
|
|
41
41
|
status: BookingStatus;
|
|
42
42
|
timeZone: string;
|
|
43
43
|
attendeeName: string | null;
|
|
@@ -48,7 +48,7 @@ export type Booking = {
|
|
|
48
48
|
cancelReason: string | null;
|
|
49
49
|
createdAt: Date;
|
|
50
50
|
updatedAt: Date;
|
|
51
|
-
intakeAnswers:
|
|
51
|
+
intakeAnswers: Array<IntakeAnswer>;
|
|
52
52
|
startTime: Date;
|
|
53
53
|
endTime: Date;
|
|
54
54
|
cancelledAt: Date | null;
|
|
@@ -68,19 +68,19 @@ export const BookingStatus$inboundSchema: z.ZodNativeEnum<
|
|
|
68
68
|
> = z.nativeEnum(BookingStatus);
|
|
69
69
|
|
|
70
70
|
/** @internal */
|
|
71
|
-
export const
|
|
72
|
-
|
|
71
|
+
export const IntakeAnswer$inboundSchema: z.ZodType<
|
|
72
|
+
IntakeAnswer,
|
|
73
73
|
z.ZodTypeDef,
|
|
74
74
|
unknown
|
|
75
75
|
> = z.object({});
|
|
76
76
|
|
|
77
|
-
export function
|
|
77
|
+
export function intakeAnswerFromJSON(
|
|
78
78
|
jsonString: string,
|
|
79
|
-
): SafeParseResult<
|
|
79
|
+
): SafeParseResult<IntakeAnswer, SDKValidationError> {
|
|
80
80
|
return safeParse(
|
|
81
81
|
jsonString,
|
|
82
|
-
(x) =>
|
|
83
|
-
`Failed to parse '
|
|
82
|
+
(x) => IntakeAnswer$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'IntakeAnswer' from JSON`,
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -123,9 +123,9 @@ export const Booking$inboundSchema: z.ZodType<Booking, z.ZodTypeDef, unknown> =
|
|
|
123
123
|
z.object({
|
|
124
124
|
object: z.string(),
|
|
125
125
|
id: z.string(),
|
|
126
|
-
event_type_id: z.
|
|
127
|
-
customer_id: z.nullable(z.
|
|
128
|
-
order_id: z.nullable(z.
|
|
126
|
+
event_type_id: z.string(),
|
|
127
|
+
customer_id: z.nullable(z.string()),
|
|
128
|
+
order_id: z.nullable(z.string()),
|
|
129
129
|
status: BookingStatus$inboundSchema,
|
|
130
130
|
time_zone: z.string(),
|
|
131
131
|
attendee_name: z.nullable(z.string()),
|
|
@@ -140,7 +140,7 @@ export const Booking$inboundSchema: z.ZodType<Booking, z.ZodTypeDef, unknown> =
|
|
|
140
140
|
updated_at: z.string().datetime({ offset: true }).transform(v =>
|
|
141
141
|
new Date(v)
|
|
142
142
|
),
|
|
143
|
-
intake_answers: z.lazy(() =>
|
|
143
|
+
intake_answers: z.array(z.lazy(() => IntakeAnswer$inboundSchema)),
|
|
144
144
|
start_time: z.string().datetime({ offset: true }).transform(v =>
|
|
145
145
|
new Date(v)
|
|
146
146
|
),
|
package/src/models/eventtype.ts
CHANGED
|
@@ -5,30 +5,20 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
11
|
import { Form, Form$inboundSchema } from "./form.js";
|
|
11
12
|
import { PriceVariant, PriceVariant$inboundSchema } from "./pricevariant.js";
|
|
12
13
|
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export type BookingWindowDays = {};
|
|
22
|
-
|
|
23
|
-
export type MaxPerDay = {};
|
|
24
|
-
|
|
25
|
-
export type EventTypeLocationType = {};
|
|
26
|
-
|
|
27
|
-
export type LocationDetails = {};
|
|
28
|
-
|
|
29
|
-
export type EventTypeCreatedAt = {};
|
|
30
|
-
|
|
31
|
-
export type EventTypeUpdatedAt = {};
|
|
14
|
+
export const EventTypeLocationType = {
|
|
15
|
+
GoogleMeet: "google_meet",
|
|
16
|
+
Zoom: "zoom",
|
|
17
|
+
CustomLink: "custom_link",
|
|
18
|
+
Physical: "physical",
|
|
19
|
+
Phone: "phone",
|
|
20
|
+
} as const;
|
|
21
|
+
export type EventTypeLocationType = ClosedEnum<typeof EventTypeLocationType>;
|
|
32
22
|
|
|
33
23
|
/**
|
|
34
24
|
* ID by default, full object when expanded
|
|
@@ -40,197 +30,32 @@ export type EventType = {
|
|
|
40
30
|
id: string;
|
|
41
31
|
name: string;
|
|
42
32
|
slug: string;
|
|
43
|
-
durationMinutes:
|
|
44
|
-
bufferBeforeMinutes:
|
|
45
|
-
bufferAfterMinutes:
|
|
46
|
-
minNoticeMinutes:
|
|
47
|
-
bookingWindowDays:
|
|
48
|
-
maxPerDay:
|
|
33
|
+
durationMinutes: number;
|
|
34
|
+
bufferBeforeMinutes: number;
|
|
35
|
+
bufferAfterMinutes: number;
|
|
36
|
+
minNoticeMinutes: number;
|
|
37
|
+
bookingWindowDays: number;
|
|
38
|
+
maxPerDay: number | null;
|
|
49
39
|
reminderMinutes: Array<number>;
|
|
50
40
|
locationType: EventTypeLocationType;
|
|
51
|
-
locationDetails:
|
|
52
|
-
createdAt:
|
|
53
|
-
updatedAt:
|
|
54
|
-
formId: string;
|
|
41
|
+
locationDetails: string | null;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
formId: string | null;
|
|
55
45
|
/**
|
|
56
46
|
* ID by default, full object when expanded
|
|
57
47
|
*/
|
|
58
48
|
form?: Form | string | null | undefined;
|
|
59
49
|
free: boolean;
|
|
60
|
-
scheduleId: string;
|
|
61
|
-
productId: string;
|
|
50
|
+
scheduleId: string | null;
|
|
51
|
+
productId: string | null;
|
|
62
52
|
priceVariants: Array<PriceVariant>;
|
|
63
53
|
};
|
|
64
54
|
|
|
65
55
|
/** @internal */
|
|
66
|
-
export const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
unknown
|
|
70
|
-
> = z.object({});
|
|
71
|
-
|
|
72
|
-
export function durationMinutesFromJSON(
|
|
73
|
-
jsonString: string,
|
|
74
|
-
): SafeParseResult<DurationMinutes, SDKValidationError> {
|
|
75
|
-
return safeParse(
|
|
76
|
-
jsonString,
|
|
77
|
-
(x) => DurationMinutes$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
-
`Failed to parse 'DurationMinutes' from JSON`,
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** @internal */
|
|
83
|
-
export const BufferBeforeMinutes$inboundSchema: z.ZodType<
|
|
84
|
-
BufferBeforeMinutes,
|
|
85
|
-
z.ZodTypeDef,
|
|
86
|
-
unknown
|
|
87
|
-
> = z.object({});
|
|
88
|
-
|
|
89
|
-
export function bufferBeforeMinutesFromJSON(
|
|
90
|
-
jsonString: string,
|
|
91
|
-
): SafeParseResult<BufferBeforeMinutes, SDKValidationError> {
|
|
92
|
-
return safeParse(
|
|
93
|
-
jsonString,
|
|
94
|
-
(x) => BufferBeforeMinutes$inboundSchema.parse(JSON.parse(x)),
|
|
95
|
-
`Failed to parse 'BufferBeforeMinutes' from JSON`,
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/** @internal */
|
|
100
|
-
export const BufferAfterMinutes$inboundSchema: z.ZodType<
|
|
101
|
-
BufferAfterMinutes,
|
|
102
|
-
z.ZodTypeDef,
|
|
103
|
-
unknown
|
|
104
|
-
> = z.object({});
|
|
105
|
-
|
|
106
|
-
export function bufferAfterMinutesFromJSON(
|
|
107
|
-
jsonString: string,
|
|
108
|
-
): SafeParseResult<BufferAfterMinutes, SDKValidationError> {
|
|
109
|
-
return safeParse(
|
|
110
|
-
jsonString,
|
|
111
|
-
(x) => BufferAfterMinutes$inboundSchema.parse(JSON.parse(x)),
|
|
112
|
-
`Failed to parse 'BufferAfterMinutes' from JSON`,
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/** @internal */
|
|
117
|
-
export const MinNoticeMinutes$inboundSchema: z.ZodType<
|
|
118
|
-
MinNoticeMinutes,
|
|
119
|
-
z.ZodTypeDef,
|
|
120
|
-
unknown
|
|
121
|
-
> = z.object({});
|
|
122
|
-
|
|
123
|
-
export function minNoticeMinutesFromJSON(
|
|
124
|
-
jsonString: string,
|
|
125
|
-
): SafeParseResult<MinNoticeMinutes, SDKValidationError> {
|
|
126
|
-
return safeParse(
|
|
127
|
-
jsonString,
|
|
128
|
-
(x) => MinNoticeMinutes$inboundSchema.parse(JSON.parse(x)),
|
|
129
|
-
`Failed to parse 'MinNoticeMinutes' from JSON`,
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/** @internal */
|
|
134
|
-
export const BookingWindowDays$inboundSchema: z.ZodType<
|
|
135
|
-
BookingWindowDays,
|
|
136
|
-
z.ZodTypeDef,
|
|
137
|
-
unknown
|
|
138
|
-
> = z.object({});
|
|
139
|
-
|
|
140
|
-
export function bookingWindowDaysFromJSON(
|
|
141
|
-
jsonString: string,
|
|
142
|
-
): SafeParseResult<BookingWindowDays, SDKValidationError> {
|
|
143
|
-
return safeParse(
|
|
144
|
-
jsonString,
|
|
145
|
-
(x) => BookingWindowDays$inboundSchema.parse(JSON.parse(x)),
|
|
146
|
-
`Failed to parse 'BookingWindowDays' from JSON`,
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/** @internal */
|
|
151
|
-
export const MaxPerDay$inboundSchema: z.ZodType<
|
|
152
|
-
MaxPerDay,
|
|
153
|
-
z.ZodTypeDef,
|
|
154
|
-
unknown
|
|
155
|
-
> = z.object({});
|
|
156
|
-
|
|
157
|
-
export function maxPerDayFromJSON(
|
|
158
|
-
jsonString: string,
|
|
159
|
-
): SafeParseResult<MaxPerDay, SDKValidationError> {
|
|
160
|
-
return safeParse(
|
|
161
|
-
jsonString,
|
|
162
|
-
(x) => MaxPerDay$inboundSchema.parse(JSON.parse(x)),
|
|
163
|
-
`Failed to parse 'MaxPerDay' from JSON`,
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/** @internal */
|
|
168
|
-
export const EventTypeLocationType$inboundSchema: z.ZodType<
|
|
169
|
-
EventTypeLocationType,
|
|
170
|
-
z.ZodTypeDef,
|
|
171
|
-
unknown
|
|
172
|
-
> = z.object({});
|
|
173
|
-
|
|
174
|
-
export function eventTypeLocationTypeFromJSON(
|
|
175
|
-
jsonString: string,
|
|
176
|
-
): SafeParseResult<EventTypeLocationType, SDKValidationError> {
|
|
177
|
-
return safeParse(
|
|
178
|
-
jsonString,
|
|
179
|
-
(x) => EventTypeLocationType$inboundSchema.parse(JSON.parse(x)),
|
|
180
|
-
`Failed to parse 'EventTypeLocationType' from JSON`,
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/** @internal */
|
|
185
|
-
export const LocationDetails$inboundSchema: z.ZodType<
|
|
186
|
-
LocationDetails,
|
|
187
|
-
z.ZodTypeDef,
|
|
188
|
-
unknown
|
|
189
|
-
> = z.object({});
|
|
190
|
-
|
|
191
|
-
export function locationDetailsFromJSON(
|
|
192
|
-
jsonString: string,
|
|
193
|
-
): SafeParseResult<LocationDetails, SDKValidationError> {
|
|
194
|
-
return safeParse(
|
|
195
|
-
jsonString,
|
|
196
|
-
(x) => LocationDetails$inboundSchema.parse(JSON.parse(x)),
|
|
197
|
-
`Failed to parse 'LocationDetails' from JSON`,
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/** @internal */
|
|
202
|
-
export const EventTypeCreatedAt$inboundSchema: z.ZodType<
|
|
203
|
-
EventTypeCreatedAt,
|
|
204
|
-
z.ZodTypeDef,
|
|
205
|
-
unknown
|
|
206
|
-
> = z.object({});
|
|
207
|
-
|
|
208
|
-
export function eventTypeCreatedAtFromJSON(
|
|
209
|
-
jsonString: string,
|
|
210
|
-
): SafeParseResult<EventTypeCreatedAt, SDKValidationError> {
|
|
211
|
-
return safeParse(
|
|
212
|
-
jsonString,
|
|
213
|
-
(x) => EventTypeCreatedAt$inboundSchema.parse(JSON.parse(x)),
|
|
214
|
-
`Failed to parse 'EventTypeCreatedAt' from JSON`,
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/** @internal */
|
|
219
|
-
export const EventTypeUpdatedAt$inboundSchema: z.ZodType<
|
|
220
|
-
EventTypeUpdatedAt,
|
|
221
|
-
z.ZodTypeDef,
|
|
222
|
-
unknown
|
|
223
|
-
> = z.object({});
|
|
224
|
-
|
|
225
|
-
export function eventTypeUpdatedAtFromJSON(
|
|
226
|
-
jsonString: string,
|
|
227
|
-
): SafeParseResult<EventTypeUpdatedAt, SDKValidationError> {
|
|
228
|
-
return safeParse(
|
|
229
|
-
jsonString,
|
|
230
|
-
(x) => EventTypeUpdatedAt$inboundSchema.parse(JSON.parse(x)),
|
|
231
|
-
`Failed to parse 'EventTypeUpdatedAt' from JSON`,
|
|
232
|
-
);
|
|
233
|
-
}
|
|
56
|
+
export const EventTypeLocationType$inboundSchema: z.ZodNativeEnum<
|
|
57
|
+
typeof EventTypeLocationType
|
|
58
|
+
> = z.nativeEnum(EventTypeLocationType);
|
|
234
59
|
|
|
235
60
|
/** @internal */
|
|
236
61
|
export const FormUnion$inboundSchema: z.ZodType<
|
|
@@ -259,22 +84,22 @@ export const EventType$inboundSchema: z.ZodType<
|
|
|
259
84
|
id: z.string(),
|
|
260
85
|
name: z.string(),
|
|
261
86
|
slug: z.string(),
|
|
262
|
-
duration_minutes: z.
|
|
263
|
-
buffer_before_minutes: z.
|
|
264
|
-
buffer_after_minutes: z.
|
|
265
|
-
min_notice_minutes: z.
|
|
266
|
-
booking_window_days: z.
|
|
267
|
-
max_per_day: z.
|
|
87
|
+
duration_minutes: z.number().int(),
|
|
88
|
+
buffer_before_minutes: z.number().int(),
|
|
89
|
+
buffer_after_minutes: z.number().int(),
|
|
90
|
+
min_notice_minutes: z.number().int(),
|
|
91
|
+
booking_window_days: z.number().int(),
|
|
92
|
+
max_per_day: z.nullable(z.number().int()),
|
|
268
93
|
reminder_minutes: z.array(z.number()),
|
|
269
|
-
location_type:
|
|
270
|
-
location_details: z.
|
|
271
|
-
created_at: z.
|
|
272
|
-
updated_at: z.
|
|
273
|
-
form_id: z.string(),
|
|
94
|
+
location_type: EventTypeLocationType$inboundSchema,
|
|
95
|
+
location_details: z.nullable(z.string()),
|
|
96
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
97
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
98
|
+
form_id: z.nullable(z.string()),
|
|
274
99
|
form: z.nullable(z.union([Form$inboundSchema, z.string()])).optional(),
|
|
275
100
|
free: z.boolean(),
|
|
276
|
-
schedule_id: z.string(),
|
|
277
|
-
product_id: z.string(),
|
|
101
|
+
schedule_id: z.nullable(z.string()),
|
|
102
|
+
product_id: z.nullable(z.string()),
|
|
278
103
|
price_variants: z.array(PriceVariant$inboundSchema),
|
|
279
104
|
}).transform((v) => {
|
|
280
105
|
return remap$(v, {
|
package/src/models/formation.ts
CHANGED
|
@@ -27,20 +27,10 @@ export const EntityType = {
|
|
|
27
27
|
} as const;
|
|
28
28
|
export type EntityType = ClosedEnum<typeof EntityType>;
|
|
29
29
|
|
|
30
|
-
export type State = {};
|
|
31
|
-
|
|
32
|
-
export type NaicsCode = {};
|
|
33
|
-
|
|
34
|
-
export type Description = {};
|
|
35
|
-
|
|
36
30
|
export type ResponsibleParty = {};
|
|
37
31
|
|
|
38
32
|
export type MailingAddress = {};
|
|
39
33
|
|
|
40
|
-
export type FormationCreatedAt = {};
|
|
41
|
-
|
|
42
|
-
export type FormationUpdatedAt = {};
|
|
43
|
-
|
|
44
34
|
export const PaymentStatus = {
|
|
45
35
|
Unpaid: "unpaid",
|
|
46
36
|
Paid: "paid",
|
|
@@ -53,9 +43,9 @@ export type Formation = {
|
|
|
53
43
|
object: string;
|
|
54
44
|
status: FormationStatus;
|
|
55
45
|
entityType: EntityType;
|
|
56
|
-
state:
|
|
57
|
-
naicsCode:
|
|
58
|
-
description:
|
|
46
|
+
state: string;
|
|
47
|
+
naicsCode: string;
|
|
48
|
+
description: string;
|
|
59
49
|
nameOptions: Array<any>;
|
|
60
50
|
members: Array<any>;
|
|
61
51
|
responsibleParty: ResponsibleParty;
|
|
@@ -66,8 +56,8 @@ export type Formation = {
|
|
|
66
56
|
doolaError: string | null;
|
|
67
57
|
stripeCheckoutSessionId: string | null;
|
|
68
58
|
submittedAt: string | null;
|
|
69
|
-
createdAt:
|
|
70
|
-
updatedAt:
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
updatedAt: Date;
|
|
71
61
|
doolaCompanyId: string | null;
|
|
72
62
|
verificationId: string | null;
|
|
73
63
|
paymentStatus: PaymentStatus;
|
|
@@ -83,54 +73,6 @@ export const FormationStatus$inboundSchema: z.ZodNativeEnum<
|
|
|
83
73
|
export const EntityType$inboundSchema: z.ZodNativeEnum<typeof EntityType> = z
|
|
84
74
|
.nativeEnum(EntityType);
|
|
85
75
|
|
|
86
|
-
/** @internal */
|
|
87
|
-
export const State$inboundSchema: z.ZodType<State, z.ZodTypeDef, unknown> = z
|
|
88
|
-
.object({});
|
|
89
|
-
|
|
90
|
-
export function stateFromJSON(
|
|
91
|
-
jsonString: string,
|
|
92
|
-
): SafeParseResult<State, SDKValidationError> {
|
|
93
|
-
return safeParse(
|
|
94
|
-
jsonString,
|
|
95
|
-
(x) => State$inboundSchema.parse(JSON.parse(x)),
|
|
96
|
-
`Failed to parse 'State' from JSON`,
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/** @internal */
|
|
101
|
-
export const NaicsCode$inboundSchema: z.ZodType<
|
|
102
|
-
NaicsCode,
|
|
103
|
-
z.ZodTypeDef,
|
|
104
|
-
unknown
|
|
105
|
-
> = z.object({});
|
|
106
|
-
|
|
107
|
-
export function naicsCodeFromJSON(
|
|
108
|
-
jsonString: string,
|
|
109
|
-
): SafeParseResult<NaicsCode, SDKValidationError> {
|
|
110
|
-
return safeParse(
|
|
111
|
-
jsonString,
|
|
112
|
-
(x) => NaicsCode$inboundSchema.parse(JSON.parse(x)),
|
|
113
|
-
`Failed to parse 'NaicsCode' from JSON`,
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** @internal */
|
|
118
|
-
export const Description$inboundSchema: z.ZodType<
|
|
119
|
-
Description,
|
|
120
|
-
z.ZodTypeDef,
|
|
121
|
-
unknown
|
|
122
|
-
> = z.object({});
|
|
123
|
-
|
|
124
|
-
export function descriptionFromJSON(
|
|
125
|
-
jsonString: string,
|
|
126
|
-
): SafeParseResult<Description, SDKValidationError> {
|
|
127
|
-
return safeParse(
|
|
128
|
-
jsonString,
|
|
129
|
-
(x) => Description$inboundSchema.parse(JSON.parse(x)),
|
|
130
|
-
`Failed to parse 'Description' from JSON`,
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
76
|
/** @internal */
|
|
135
77
|
export const ResponsibleParty$inboundSchema: z.ZodType<
|
|
136
78
|
ResponsibleParty,
|
|
@@ -165,40 +107,6 @@ export function mailingAddressFromJSON(
|
|
|
165
107
|
);
|
|
166
108
|
}
|
|
167
109
|
|
|
168
|
-
/** @internal */
|
|
169
|
-
export const FormationCreatedAt$inboundSchema: z.ZodType<
|
|
170
|
-
FormationCreatedAt,
|
|
171
|
-
z.ZodTypeDef,
|
|
172
|
-
unknown
|
|
173
|
-
> = z.object({});
|
|
174
|
-
|
|
175
|
-
export function formationCreatedAtFromJSON(
|
|
176
|
-
jsonString: string,
|
|
177
|
-
): SafeParseResult<FormationCreatedAt, SDKValidationError> {
|
|
178
|
-
return safeParse(
|
|
179
|
-
jsonString,
|
|
180
|
-
(x) => FormationCreatedAt$inboundSchema.parse(JSON.parse(x)),
|
|
181
|
-
`Failed to parse 'FormationCreatedAt' from JSON`,
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/** @internal */
|
|
186
|
-
export const FormationUpdatedAt$inboundSchema: z.ZodType<
|
|
187
|
-
FormationUpdatedAt,
|
|
188
|
-
z.ZodTypeDef,
|
|
189
|
-
unknown
|
|
190
|
-
> = z.object({});
|
|
191
|
-
|
|
192
|
-
export function formationUpdatedAtFromJSON(
|
|
193
|
-
jsonString: string,
|
|
194
|
-
): SafeParseResult<FormationUpdatedAt, SDKValidationError> {
|
|
195
|
-
return safeParse(
|
|
196
|
-
jsonString,
|
|
197
|
-
(x) => FormationUpdatedAt$inboundSchema.parse(JSON.parse(x)),
|
|
198
|
-
`Failed to parse 'FormationUpdatedAt' from JSON`,
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
110
|
/** @internal */
|
|
203
111
|
export const PaymentStatus$inboundSchema: z.ZodNativeEnum<
|
|
204
112
|
typeof PaymentStatus
|
|
@@ -214,9 +122,9 @@ export const Formation$inboundSchema: z.ZodType<
|
|
|
214
122
|
object: z.string(),
|
|
215
123
|
status: FormationStatus$inboundSchema,
|
|
216
124
|
entity_type: EntityType$inboundSchema,
|
|
217
|
-
state: z.
|
|
218
|
-
naics_code: z.
|
|
219
|
-
description: z.
|
|
125
|
+
state: z.string(),
|
|
126
|
+
naics_code: z.string(),
|
|
127
|
+
description: z.string(),
|
|
220
128
|
name_options: z.array(z.any()),
|
|
221
129
|
members: z.array(z.any()),
|
|
222
130
|
responsible_party: z.lazy(() => ResponsibleParty$inboundSchema),
|
|
@@ -227,8 +135,8 @@ export const Formation$inboundSchema: z.ZodType<
|
|
|
227
135
|
doola_error: z.nullable(z.string()),
|
|
228
136
|
stripe_checkout_session_id: z.nullable(z.string()),
|
|
229
137
|
submitted_at: z.nullable(z.string()),
|
|
230
|
-
created_at: z.
|
|
231
|
-
updated_at: z.
|
|
138
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
139
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
232
140
|
doola_company_id: z.nullable(z.string()),
|
|
233
141
|
verification_id: z.nullable(z.string()),
|
|
234
142
|
payment_status: PaymentStatus$inboundSchema,
|
|
@@ -16,16 +16,12 @@ export const DocumentType = {
|
|
|
16
16
|
} as const;
|
|
17
17
|
export type DocumentType = ClosedEnum<typeof DocumentType>;
|
|
18
18
|
|
|
19
|
-
export type Name = {};
|
|
20
|
-
|
|
21
|
-
export type ContentType = {};
|
|
22
|
-
|
|
23
19
|
export type FormationDocument = {
|
|
24
20
|
id: string;
|
|
25
21
|
object: string;
|
|
26
22
|
documentType: DocumentType;
|
|
27
|
-
name:
|
|
28
|
-
contentType:
|
|
23
|
+
name: string;
|
|
24
|
+
contentType: string | null;
|
|
29
25
|
doolaCreatedAt: string | null;
|
|
30
26
|
doolaLastModifiedAt: string | null;
|
|
31
27
|
doolaCompanyId: string;
|
|
@@ -36,37 +32,6 @@ export type FormationDocument = {
|
|
|
36
32
|
export const DocumentType$inboundSchema: z.ZodNativeEnum<typeof DocumentType> =
|
|
37
33
|
z.nativeEnum(DocumentType);
|
|
38
34
|
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const Name$inboundSchema: z.ZodType<Name, z.ZodTypeDef, unknown> = z
|
|
41
|
-
.object({});
|
|
42
|
-
|
|
43
|
-
export function nameFromJSON(
|
|
44
|
-
jsonString: string,
|
|
45
|
-
): SafeParseResult<Name, SDKValidationError> {
|
|
46
|
-
return safeParse(
|
|
47
|
-
jsonString,
|
|
48
|
-
(x) => Name$inboundSchema.parse(JSON.parse(x)),
|
|
49
|
-
`Failed to parse 'Name' from JSON`,
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export const ContentType$inboundSchema: z.ZodType<
|
|
55
|
-
ContentType,
|
|
56
|
-
z.ZodTypeDef,
|
|
57
|
-
unknown
|
|
58
|
-
> = z.object({});
|
|
59
|
-
|
|
60
|
-
export function contentTypeFromJSON(
|
|
61
|
-
jsonString: string,
|
|
62
|
-
): SafeParseResult<ContentType, SDKValidationError> {
|
|
63
|
-
return safeParse(
|
|
64
|
-
jsonString,
|
|
65
|
-
(x) => ContentType$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
-
`Failed to parse 'ContentType' from JSON`,
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
35
|
/** @internal */
|
|
71
36
|
export const FormationDocument$inboundSchema: z.ZodType<
|
|
72
37
|
FormationDocument,
|
|
@@ -76,8 +41,8 @@ export const FormationDocument$inboundSchema: z.ZodType<
|
|
|
76
41
|
id: z.string(),
|
|
77
42
|
object: z.string(),
|
|
78
43
|
document_type: DocumentType$inboundSchema,
|
|
79
|
-
name: z.
|
|
80
|
-
content_type: z.
|
|
44
|
+
name: z.string(),
|
|
45
|
+
content_type: z.nullable(z.string()),
|
|
81
46
|
doola_created_at: z.nullable(z.string()),
|
|
82
47
|
doola_last_modified_at: z.nullable(z.string()),
|
|
83
48
|
doola_company_id: z.string(),
|
package/src/models/index.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./accesscheck.js";
|
|
5
6
|
export * from "./account.js";
|
|
6
7
|
export * from "./accountrequest.js";
|
|
7
8
|
export * from "./aisite.js";
|
|
@@ -199,6 +200,7 @@ export * from "./usageoperationspend.js";
|
|
|
199
200
|
export * from "./usageplan.js";
|
|
200
201
|
export * from "./usagespend.js";
|
|
201
202
|
export * from "./usagetransaction.js";
|
|
203
|
+
export * from "./user.js";
|
|
202
204
|
export * from "./videogeneraterequest.js";
|
|
203
205
|
export * from "./webhookendpoint.js";
|
|
204
206
|
export * from "./webhookendpointrequest.js";
|
package/src/models/me.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type Me = {
|
|
|
14
14
|
name: string | null;
|
|
15
15
|
username: string;
|
|
16
16
|
email: string;
|
|
17
|
-
preferredLanguage: string
|
|
17
|
+
preferredLanguage: string;
|
|
18
18
|
timeZone: string | null;
|
|
19
19
|
createdAt: Date;
|
|
20
20
|
avatarUrl: string | null;
|
|
@@ -28,7 +28,7 @@ export const Me$inboundSchema: z.ZodType<Me, z.ZodTypeDef, unknown> = z.object({
|
|
|
28
28
|
name: z.nullable(z.string()),
|
|
29
29
|
username: z.string(),
|
|
30
30
|
email: z.string(),
|
|
31
|
-
preferred_language: z.
|
|
31
|
+
preferred_language: z.string(),
|
|
32
32
|
time_zone: z.nullable(z.string()),
|
|
33
33
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
34
34
|
avatar_url: z.nullable(z.string()),
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type CheckAccessRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
/**
|
|
14
|
+
* The resource to check access to: the account id (acct_…), a product (prod_…) or an experience (exp_…).
|
|
15
|
+
*/
|
|
16
|
+
resourceId: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type CheckAccessRequest$Outbound = {
|
|
21
|
+
id: string;
|
|
22
|
+
resource_id: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const CheckAccessRequest$outboundSchema: z.ZodType<
|
|
27
|
+
CheckAccessRequest$Outbound,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
CheckAccessRequest
|
|
30
|
+
> = z.object({
|
|
31
|
+
id: z.string(),
|
|
32
|
+
resourceId: z.string(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
resourceId: "resource_id",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function checkAccessRequestToJSON(
|
|
40
|
+
checkAccessRequest: CheckAccessRequest,
|
|
41
|
+
): string {
|
|
42
|
+
return JSON.stringify(
|
|
43
|
+
CheckAccessRequest$outboundSchema.parse(checkAccessRequest),
|
|
44
|
+
);
|
|
45
|
+
}
|