@novu/api 0.0.1-alpha.110 → 0.0.1-alpha.114
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/docs/sdks/novunotifications/README.md +2 -2
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/activitiesresponsedto.d.ts +10 -1
- package/models/components/activitiesresponsedto.d.ts.map +1 -1
- package/models/components/activitiesresponsedto.js.map +1 -1
- package/models/components/activitynotificationexecutiondetailresponsedto.d.ts +153 -0
- package/models/components/activitynotificationexecutiondetailresponsedto.d.ts.map +1 -0
- package/models/components/activitynotificationexecutiondetailresponsedto.js +137 -0
- package/models/components/activitynotificationexecutiondetailresponsedto.js.map +1 -0
- package/models/components/activitynotificationjobresponsedto.d.ts +117 -0
- package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -0
- package/models/components/activitynotificationjobresponsedto.js +131 -0
- package/models/components/activitynotificationjobresponsedto.js.map +1 -0
- package/models/components/activitynotificationresponsedto.d.ts +36 -2
- package/models/components/activitynotificationresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationresponsedto.js +6 -2
- package/models/components/activitynotificationresponsedto.js.map +1 -1
- package/models/components/activitynotificationstepresponsedto.d.ts +49 -0
- package/models/components/activitynotificationstepresponsedto.d.ts.map +1 -0
- package/models/components/activitynotificationstepresponsedto.js +76 -0
- package/models/components/activitynotificationstepresponsedto.js.map +1 -0
- package/models/components/activitynotificationsubscriberresponsedto.d.ts +15 -0
- package/models/components/activitynotificationsubscriberresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationsubscriberresponsedto.js.map +1 -1
- package/models/components/activitynotificationtemplateresponsedto.d.ts +12 -2
- package/models/components/activitynotificationtemplateresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationtemplateresponsedto.js +3 -2
- package/models/components/activitynotificationtemplateresponsedto.js.map +1 -1
- package/models/components/channelpreference.d.ts +8 -8
- package/models/components/channelpreference.d.ts.map +1 -1
- package/models/components/channelpreference.js +13 -13
- package/models/components/channelpreference.js.map +1 -1
- package/models/components/index.d.ts +4 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -2
- package/models/components/index.js.map +1 -1
- package/models/components/messageactionresult.d.ts +15 -15
- package/models/components/messageactionresult.d.ts.map +1 -1
- package/models/components/messageactionresult.js +18 -18
- package/models/components/messageactionresult.js.map +1 -1
- package/models/components/messagetemplatedto.d.ts +25 -0
- package/models/components/messagetemplatedto.d.ts.map +1 -0
- package/models/components/{builderfieldtype.js → messagetemplatedto.js} +20 -21
- package/models/components/messagetemplatedto.js.map +1 -0
- package/models/components/notificationtrigger.d.ts +26 -8
- package/models/components/notificationtrigger.d.ts.map +1 -1
- package/models/components/notificationtrigger.js +16 -13
- package/models/components/notificationtrigger.js.map +1 -1
- package/models/components/notificationtriggervariable.d.ts +3 -0
- package/models/components/notificationtriggervariable.d.ts.map +1 -1
- package/models/components/notificationtriggervariable.js.map +1 -1
- package/models/components/stepfilter.d.ts +2 -40
- package/models/components/stepfilter.d.ts.map +1 -1
- package/models/components/stepfilter.js +3 -34
- package/models/components/stepfilter.js.map +1 -1
- package/models/operations/subscriberscontrollergetunseencount.d.ts +9 -3
- package/models/operations/subscriberscontrollergetunseencount.d.ts.map +1 -1
- package/models/operations/subscriberscontrollergetunseencount.js +4 -4
- package/models/operations/subscriberscontrollergetunseencount.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/activitiesresponsedto.ts +10 -1
- package/src/models/components/activitynotificationexecutiondetailresponsedto.ts +225 -0
- package/src/models/components/activitynotificationjobresponsedto.ts +241 -0
- package/src/models/components/activitynotificationresponsedto.ts +43 -4
- package/src/models/components/activitynotificationstepresponsedto.ts +116 -0
- package/src/models/components/activitynotificationsubscriberresponsedto.ts +15 -0
- package/src/models/components/activitynotificationtemplateresponsedto.ts +19 -4
- package/src/models/components/channelpreference.ts +16 -15
- package/src/models/components/index.ts +4 -2
- package/src/models/components/messageactionresult.ts +31 -24
- package/src/models/components/messagetemplatedto.ts +58 -0
- package/src/models/components/notificationtrigger.ts +33 -18
- package/src/models/components/notificationtriggervariable.ts +3 -0
- package/src/models/components/stepfilter.ts +4 -62
- package/src/models/operations/subscriberscontrollergetunseencount.ts +13 -7
- package/models/components/builderfieldtype.d.ts +0 -46
- package/models/components/builderfieldtype.d.ts.map +0 -1
- package/models/components/builderfieldtype.js.map +0 -1
- package/models/components/fieldfilterpart.d.ts +0 -122
- package/models/components/fieldfilterpart.d.ts.map +0 -1
- package/models/components/fieldfilterpart.js +0 -116
- package/models/components/fieldfilterpart.js.map +0 -1
- package/src/models/components/builderfieldtype.ts +0 -39
- package/src/models/components/fieldfilterpart.ts +0 -137
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
MessageTemplateDto,
|
|
12
|
+
MessageTemplateDto$inboundSchema,
|
|
13
|
+
MessageTemplateDto$Outbound,
|
|
14
|
+
MessageTemplateDto$outboundSchema,
|
|
15
|
+
} from "./messagetemplatedto.js";
|
|
16
|
+
import {
|
|
17
|
+
StepFilter,
|
|
18
|
+
StepFilter$inboundSchema,
|
|
19
|
+
StepFilter$Outbound,
|
|
20
|
+
StepFilter$outboundSchema,
|
|
21
|
+
} from "./stepfilter.js";
|
|
22
|
+
|
|
23
|
+
export type ActivityNotificationStepResponseDto = {
|
|
24
|
+
/**
|
|
25
|
+
* Unique identifier of the step
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the step is active or not
|
|
30
|
+
*/
|
|
31
|
+
active: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Filter criteria for the step
|
|
34
|
+
*/
|
|
35
|
+
filters: StepFilter;
|
|
36
|
+
/**
|
|
37
|
+
* Optional template for the step
|
|
38
|
+
*/
|
|
39
|
+
template?: MessageTemplateDto | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const ActivityNotificationStepResponseDto$inboundSchema: z.ZodType<
|
|
44
|
+
ActivityNotificationStepResponseDto,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
_id: z.string(),
|
|
49
|
+
active: z.boolean(),
|
|
50
|
+
filters: StepFilter$inboundSchema,
|
|
51
|
+
template: MessageTemplateDto$inboundSchema.optional(),
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
"_id": "id",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type ActivityNotificationStepResponseDto$Outbound = {
|
|
60
|
+
_id: string;
|
|
61
|
+
active: boolean;
|
|
62
|
+
filters: StepFilter$Outbound;
|
|
63
|
+
template?: MessageTemplateDto$Outbound | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const ActivityNotificationStepResponseDto$outboundSchema: z.ZodType<
|
|
68
|
+
ActivityNotificationStepResponseDto$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
ActivityNotificationStepResponseDto
|
|
71
|
+
> = z.object({
|
|
72
|
+
id: z.string(),
|
|
73
|
+
active: z.boolean(),
|
|
74
|
+
filters: StepFilter$outboundSchema,
|
|
75
|
+
template: MessageTemplateDto$outboundSchema.optional(),
|
|
76
|
+
}).transform((v) => {
|
|
77
|
+
return remap$(v, {
|
|
78
|
+
id: "_id",
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
+
*/
|
|
86
|
+
export namespace ActivityNotificationStepResponseDto$ {
|
|
87
|
+
/** @deprecated use `ActivityNotificationStepResponseDto$inboundSchema` instead. */
|
|
88
|
+
export const inboundSchema =
|
|
89
|
+
ActivityNotificationStepResponseDto$inboundSchema;
|
|
90
|
+
/** @deprecated use `ActivityNotificationStepResponseDto$outboundSchema` instead. */
|
|
91
|
+
export const outboundSchema =
|
|
92
|
+
ActivityNotificationStepResponseDto$outboundSchema;
|
|
93
|
+
/** @deprecated use `ActivityNotificationStepResponseDto$Outbound` instead. */
|
|
94
|
+
export type Outbound = ActivityNotificationStepResponseDto$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function activityNotificationStepResponseDtoToJSON(
|
|
98
|
+
activityNotificationStepResponseDto: ActivityNotificationStepResponseDto,
|
|
99
|
+
): string {
|
|
100
|
+
return JSON.stringify(
|
|
101
|
+
ActivityNotificationStepResponseDto$outboundSchema.parse(
|
|
102
|
+
activityNotificationStepResponseDto,
|
|
103
|
+
),
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function activityNotificationStepResponseDtoFromJSON(
|
|
108
|
+
jsonString: string,
|
|
109
|
+
): SafeParseResult<ActivityNotificationStepResponseDto, SDKValidationError> {
|
|
110
|
+
return safeParse(
|
|
111
|
+
jsonString,
|
|
112
|
+
(x) =>
|
|
113
|
+
ActivityNotificationStepResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
+
`Failed to parse 'ActivityNotificationStepResponseDto' from JSON`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -9,10 +9,25 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
export type ActivityNotificationSubscriberResponseDto = {
|
|
12
|
+
/**
|
|
13
|
+
* First name of the subscriber
|
|
14
|
+
*/
|
|
12
15
|
firstName?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Unique identifier of the subscriber
|
|
18
|
+
*/
|
|
13
19
|
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* Last name of the subscriber
|
|
22
|
+
*/
|
|
14
23
|
lastName?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Email of the subscriber
|
|
26
|
+
*/
|
|
15
27
|
email?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Phone number of the subscriber
|
|
30
|
+
*/
|
|
16
31
|
phone?: string | undefined;
|
|
17
32
|
};
|
|
18
33
|
|
|
@@ -7,11 +7,26 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
NotificationTrigger,
|
|
12
|
+
NotificationTrigger$inboundSchema,
|
|
13
|
+
NotificationTrigger$Outbound,
|
|
14
|
+
NotificationTrigger$outboundSchema,
|
|
15
|
+
} from "./notificationtrigger.js";
|
|
10
16
|
|
|
11
17
|
export type ActivityNotificationTemplateResponseDto = {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier of the template
|
|
20
|
+
*/
|
|
12
21
|
id?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Name of the template
|
|
24
|
+
*/
|
|
13
25
|
name: string;
|
|
14
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Triggers of the template
|
|
28
|
+
*/
|
|
29
|
+
triggers: Array<NotificationTrigger>;
|
|
15
30
|
};
|
|
16
31
|
|
|
17
32
|
/** @internal */
|
|
@@ -22,7 +37,7 @@ export const ActivityNotificationTemplateResponseDto$inboundSchema: z.ZodType<
|
|
|
22
37
|
> = z.object({
|
|
23
38
|
_id: z.string().optional(),
|
|
24
39
|
name: z.string(),
|
|
25
|
-
triggers: z.array(
|
|
40
|
+
triggers: z.array(NotificationTrigger$inboundSchema),
|
|
26
41
|
}).transform((v) => {
|
|
27
42
|
return remap$(v, {
|
|
28
43
|
"_id": "id",
|
|
@@ -33,7 +48,7 @@ export const ActivityNotificationTemplateResponseDto$inboundSchema: z.ZodType<
|
|
|
33
48
|
export type ActivityNotificationTemplateResponseDto$Outbound = {
|
|
34
49
|
_id?: string | undefined;
|
|
35
50
|
name: string;
|
|
36
|
-
triggers: Array<
|
|
51
|
+
triggers: Array<NotificationTrigger$Outbound>;
|
|
37
52
|
};
|
|
38
53
|
|
|
39
54
|
/** @internal */
|
|
@@ -44,7 +59,7 @@ export const ActivityNotificationTemplateResponseDto$outboundSchema: z.ZodType<
|
|
|
44
59
|
> = z.object({
|
|
45
60
|
id: z.string().optional(),
|
|
46
61
|
name: z.string(),
|
|
47
|
-
triggers: z.array(
|
|
62
|
+
triggers: z.array(NotificationTrigger$outboundSchema),
|
|
48
63
|
}).transform((v) => {
|
|
49
64
|
return remap$(v, {
|
|
50
65
|
id: "_id",
|
|
@@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
/**
|
|
12
12
|
* The type of channel that is enabled or not
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
14
|
+
export const ChannelPreferenceType = {
|
|
15
15
|
InApp: "in_app",
|
|
16
16
|
Email: "email",
|
|
17
17
|
Sms: "sms",
|
|
@@ -21,13 +21,13 @@ export const Type = {
|
|
|
21
21
|
/**
|
|
22
22
|
* The type of channel that is enabled or not
|
|
23
23
|
*/
|
|
24
|
-
export type
|
|
24
|
+
export type ChannelPreferenceType = ClosedEnum<typeof ChannelPreferenceType>;
|
|
25
25
|
|
|
26
26
|
export type ChannelPreference = {
|
|
27
27
|
/**
|
|
28
28
|
* The type of channel that is enabled or not
|
|
29
29
|
*/
|
|
30
|
-
type:
|
|
30
|
+
type: ChannelPreferenceType;
|
|
31
31
|
/**
|
|
32
32
|
* If channel is enabled or not
|
|
33
33
|
*/
|
|
@@ -35,23 +35,24 @@ export type ChannelPreference = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
/** @internal */
|
|
38
|
-
export const
|
|
39
|
-
|
|
40
|
-
);
|
|
38
|
+
export const ChannelPreferenceType$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof ChannelPreferenceType
|
|
40
|
+
> = z.nativeEnum(ChannelPreferenceType);
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
|
-
export const
|
|
44
|
-
|
|
43
|
+
export const ChannelPreferenceType$outboundSchema: z.ZodNativeEnum<
|
|
44
|
+
typeof ChannelPreferenceType
|
|
45
|
+
> = ChannelPreferenceType$inboundSchema;
|
|
45
46
|
|
|
46
47
|
/**
|
|
47
48
|
* @internal
|
|
48
49
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
50
|
*/
|
|
50
|
-
export namespace
|
|
51
|
-
/** @deprecated use `
|
|
52
|
-
export const inboundSchema =
|
|
53
|
-
/** @deprecated use `
|
|
54
|
-
export const outboundSchema =
|
|
51
|
+
export namespace ChannelPreferenceType$ {
|
|
52
|
+
/** @deprecated use `ChannelPreferenceType$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = ChannelPreferenceType$inboundSchema;
|
|
54
|
+
/** @deprecated use `ChannelPreferenceType$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = ChannelPreferenceType$outboundSchema;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/** @internal */
|
|
@@ -60,7 +61,7 @@ export const ChannelPreference$inboundSchema: z.ZodType<
|
|
|
60
61
|
z.ZodTypeDef,
|
|
61
62
|
unknown
|
|
62
63
|
> = z.object({
|
|
63
|
-
type:
|
|
64
|
+
type: ChannelPreferenceType$inboundSchema,
|
|
64
65
|
enabled: z.boolean(),
|
|
65
66
|
});
|
|
66
67
|
|
|
@@ -76,7 +77,7 @@ export const ChannelPreference$outboundSchema: z.ZodType<
|
|
|
76
77
|
z.ZodTypeDef,
|
|
77
78
|
ChannelPreference
|
|
78
79
|
> = z.object({
|
|
79
|
-
type:
|
|
80
|
+
type: ChannelPreferenceType$outboundSchema,
|
|
80
81
|
enabled: z.boolean(),
|
|
81
82
|
});
|
|
82
83
|
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
export * from "./activitiesresponsedto.js";
|
|
6
6
|
export * from "./activitygraphstatesresponse.js";
|
|
7
|
+
export * from "./activitynotificationexecutiondetailresponsedto.js";
|
|
8
|
+
export * from "./activitynotificationjobresponsedto.js";
|
|
7
9
|
export * from "./activitynotificationresponsedto.js";
|
|
10
|
+
export * from "./activitynotificationstepresponsedto.js";
|
|
8
11
|
export * from "./activitynotificationsubscriberresponsedto.js";
|
|
9
12
|
export * from "./activitynotificationtemplateresponsedto.js";
|
|
10
13
|
export * from "./activitystatsresponsedto.js";
|
|
@@ -12,7 +15,6 @@ export * from "./actorfeeditemdto.js";
|
|
|
12
15
|
export * from "./actortypeenum.js";
|
|
13
16
|
export * from "./addsubscribersrequestdto.js";
|
|
14
17
|
export * from "./assignsubscribertotopicdto.js";
|
|
15
|
-
export * from "./builderfieldtype.js";
|
|
16
18
|
export * from "./bulksubscribercreatedto.js";
|
|
17
19
|
export * from "./bulktriggereventdto.js";
|
|
18
20
|
export * from "./channelcredentials.js";
|
|
@@ -36,7 +38,6 @@ export * from "./emailblock.js";
|
|
|
36
38
|
export * from "./emailblockstyles.js";
|
|
37
39
|
export * from "./failedassignmentsdto.js";
|
|
38
40
|
export * from "./feedresponsedto.js";
|
|
39
|
-
export * from "./fieldfilterpart.js";
|
|
40
41
|
export * from "./filtertopicsresponsedto.js";
|
|
41
42
|
export * from "./getsubscriberpreferencesresponsedto.js";
|
|
42
43
|
export * from "./gettopicresponsedto.js";
|
|
@@ -52,6 +53,7 @@ export * from "./messageentity.js";
|
|
|
52
53
|
export * from "./messagemarkasrequestdto.js";
|
|
53
54
|
export * from "./messageresponsedto.js";
|
|
54
55
|
export * from "./messagetemplate.js";
|
|
56
|
+
export * from "./messagetemplatedto.js";
|
|
55
57
|
export * from "./notificationfeeditemdto.js";
|
|
56
58
|
export * from "./notificationgroup.js";
|
|
57
59
|
export * from "./notificationstep.js";
|
|
@@ -8,7 +8,7 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
-
export type
|
|
11
|
+
export type MessageActionResultPayload = {};
|
|
12
12
|
|
|
13
13
|
export const MessageActionResultType = {
|
|
14
14
|
Primary: "primary",
|
|
@@ -19,48 +19,55 @@ export type MessageActionResultType = ClosedEnum<
|
|
|
19
19
|
>;
|
|
20
20
|
|
|
21
21
|
export type MessageActionResult = {
|
|
22
|
-
payload?:
|
|
22
|
+
payload?: MessageActionResultPayload | undefined;
|
|
23
23
|
type?: MessageActionResultType | undefined;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
/** @internal */
|
|
27
|
-
export const
|
|
28
|
-
|
|
27
|
+
export const MessageActionResultPayload$inboundSchema: z.ZodType<
|
|
28
|
+
MessageActionResultPayload,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({});
|
|
29
32
|
|
|
30
33
|
/** @internal */
|
|
31
|
-
export type
|
|
34
|
+
export type MessageActionResultPayload$Outbound = {};
|
|
32
35
|
|
|
33
36
|
/** @internal */
|
|
34
|
-
export const
|
|
35
|
-
|
|
37
|
+
export const MessageActionResultPayload$outboundSchema: z.ZodType<
|
|
38
|
+
MessageActionResultPayload$Outbound,
|
|
36
39
|
z.ZodTypeDef,
|
|
37
|
-
|
|
40
|
+
MessageActionResultPayload
|
|
38
41
|
> = z.object({});
|
|
39
42
|
|
|
40
43
|
/**
|
|
41
44
|
* @internal
|
|
42
45
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
46
|
*/
|
|
44
|
-
export namespace
|
|
45
|
-
/** @deprecated use `
|
|
46
|
-
export const inboundSchema =
|
|
47
|
-
/** @deprecated use `
|
|
48
|
-
export const outboundSchema =
|
|
49
|
-
/** @deprecated use `
|
|
50
|
-
export type Outbound =
|
|
47
|
+
export namespace MessageActionResultPayload$ {
|
|
48
|
+
/** @deprecated use `MessageActionResultPayload$inboundSchema` instead. */
|
|
49
|
+
export const inboundSchema = MessageActionResultPayload$inboundSchema;
|
|
50
|
+
/** @deprecated use `MessageActionResultPayload$outboundSchema` instead. */
|
|
51
|
+
export const outboundSchema = MessageActionResultPayload$outboundSchema;
|
|
52
|
+
/** @deprecated use `MessageActionResultPayload$Outbound` instead. */
|
|
53
|
+
export type Outbound = MessageActionResultPayload$Outbound;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
export function
|
|
54
|
-
|
|
56
|
+
export function messageActionResultPayloadToJSON(
|
|
57
|
+
messageActionResultPayload: MessageActionResultPayload,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
MessageActionResultPayload$outboundSchema.parse(messageActionResultPayload),
|
|
61
|
+
);
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
export function
|
|
64
|
+
export function messageActionResultPayloadFromJSON(
|
|
58
65
|
jsonString: string,
|
|
59
|
-
): SafeParseResult<
|
|
66
|
+
): SafeParseResult<MessageActionResultPayload, SDKValidationError> {
|
|
60
67
|
return safeParse(
|
|
61
68
|
jsonString,
|
|
62
|
-
(x) =>
|
|
63
|
-
`Failed to parse '
|
|
69
|
+
(x) => MessageActionResultPayload$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'MessageActionResultPayload' from JSON`,
|
|
64
71
|
);
|
|
65
72
|
}
|
|
66
73
|
|
|
@@ -91,13 +98,13 @@ export const MessageActionResult$inboundSchema: z.ZodType<
|
|
|
91
98
|
z.ZodTypeDef,
|
|
92
99
|
unknown
|
|
93
100
|
> = z.object({
|
|
94
|
-
payload: z.lazy(() =>
|
|
101
|
+
payload: z.lazy(() => MessageActionResultPayload$inboundSchema).optional(),
|
|
95
102
|
type: MessageActionResultType$inboundSchema.optional(),
|
|
96
103
|
});
|
|
97
104
|
|
|
98
105
|
/** @internal */
|
|
99
106
|
export type MessageActionResult$Outbound = {
|
|
100
|
-
payload?:
|
|
107
|
+
payload?: MessageActionResultPayload$Outbound | undefined;
|
|
101
108
|
type?: string | undefined;
|
|
102
109
|
};
|
|
103
110
|
|
|
@@ -107,7 +114,7 @@ export const MessageActionResult$outboundSchema: z.ZodType<
|
|
|
107
114
|
z.ZodTypeDef,
|
|
108
115
|
MessageActionResult
|
|
109
116
|
> = z.object({
|
|
110
|
-
payload: z.lazy(() =>
|
|
117
|
+
payload: z.lazy(() => MessageActionResultPayload$outboundSchema).optional(),
|
|
111
118
|
type: MessageActionResultType$outboundSchema.optional(),
|
|
112
119
|
});
|
|
113
120
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type MessageTemplateDto = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const MessageTemplateDto$inboundSchema: z.ZodType<
|
|
14
|
+
MessageTemplateDto,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type MessageTemplateDto$Outbound = {};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const MessageTemplateDto$outboundSchema: z.ZodType<
|
|
24
|
+
MessageTemplateDto$Outbound,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
MessageTemplateDto
|
|
27
|
+
> = z.object({});
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export namespace MessageTemplateDto$ {
|
|
34
|
+
/** @deprecated use `MessageTemplateDto$inboundSchema` instead. */
|
|
35
|
+
export const inboundSchema = MessageTemplateDto$inboundSchema;
|
|
36
|
+
/** @deprecated use `MessageTemplateDto$outboundSchema` instead. */
|
|
37
|
+
export const outboundSchema = MessageTemplateDto$outboundSchema;
|
|
38
|
+
/** @deprecated use `MessageTemplateDto$Outbound` instead. */
|
|
39
|
+
export type Outbound = MessageTemplateDto$Outbound;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function messageTemplateDtoToJSON(
|
|
43
|
+
messageTemplateDto: MessageTemplateDto,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
MessageTemplateDto$outboundSchema.parse(messageTemplateDto),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function messageTemplateDtoFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<MessageTemplateDto, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => MessageTemplateDto$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'MessageTemplateDto' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -14,39 +14,54 @@ import {
|
|
|
14
14
|
NotificationTriggerVariable$outboundSchema,
|
|
15
15
|
} from "./notificationtriggervariable.js";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Type of the trigger
|
|
19
|
+
*/
|
|
20
|
+
export const Type = {
|
|
18
21
|
Event: "event",
|
|
19
22
|
} as const;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Type of the trigger
|
|
25
|
+
*/
|
|
26
|
+
export type Type = ClosedEnum<typeof Type>;
|
|
23
27
|
|
|
24
28
|
export type NotificationTrigger = {
|
|
25
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Type of the trigger
|
|
31
|
+
*/
|
|
32
|
+
type: Type;
|
|
33
|
+
/**
|
|
34
|
+
* Identifier of the trigger
|
|
35
|
+
*/
|
|
26
36
|
identifier: string;
|
|
37
|
+
/**
|
|
38
|
+
* Variables of the trigger
|
|
39
|
+
*/
|
|
27
40
|
variables: Array<NotificationTriggerVariable>;
|
|
41
|
+
/**
|
|
42
|
+
* Subscriber variables of the trigger
|
|
43
|
+
*/
|
|
28
44
|
subscriberVariables?: Array<NotificationTriggerVariable> | undefined;
|
|
29
45
|
};
|
|
30
46
|
|
|
31
47
|
/** @internal */
|
|
32
|
-
export const
|
|
33
|
-
|
|
34
|
-
|
|
48
|
+
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
|
|
49
|
+
Type,
|
|
50
|
+
);
|
|
35
51
|
|
|
36
52
|
/** @internal */
|
|
37
|
-
export const
|
|
38
|
-
|
|
39
|
-
> = NotificationTriggerType$inboundSchema;
|
|
53
|
+
export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
|
|
54
|
+
Type$inboundSchema;
|
|
40
55
|
|
|
41
56
|
/**
|
|
42
57
|
* @internal
|
|
43
58
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
59
|
*/
|
|
45
|
-
export namespace
|
|
46
|
-
/** @deprecated use `
|
|
47
|
-
export const inboundSchema =
|
|
48
|
-
/** @deprecated use `
|
|
49
|
-
export const outboundSchema =
|
|
60
|
+
export namespace Type$ {
|
|
61
|
+
/** @deprecated use `Type$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema = Type$inboundSchema;
|
|
63
|
+
/** @deprecated use `Type$outboundSchema` instead. */
|
|
64
|
+
export const outboundSchema = Type$outboundSchema;
|
|
50
65
|
}
|
|
51
66
|
|
|
52
67
|
/** @internal */
|
|
@@ -55,7 +70,7 @@ export const NotificationTrigger$inboundSchema: z.ZodType<
|
|
|
55
70
|
z.ZodTypeDef,
|
|
56
71
|
unknown
|
|
57
72
|
> = z.object({
|
|
58
|
-
type:
|
|
73
|
+
type: Type$inboundSchema,
|
|
59
74
|
identifier: z.string(),
|
|
60
75
|
variables: z.array(NotificationTriggerVariable$inboundSchema),
|
|
61
76
|
subscriberVariables: z.array(NotificationTriggerVariable$inboundSchema)
|
|
@@ -76,7 +91,7 @@ export const NotificationTrigger$outboundSchema: z.ZodType<
|
|
|
76
91
|
z.ZodTypeDef,
|
|
77
92
|
NotificationTrigger
|
|
78
93
|
> = z.object({
|
|
79
|
-
type:
|
|
94
|
+
type: Type$outboundSchema,
|
|
80
95
|
identifier: z.string(),
|
|
81
96
|
variables: z.array(NotificationTriggerVariable$outboundSchema),
|
|
82
97
|
subscriberVariables: z.array(NotificationTriggerVariable$outboundSchema)
|
|
@@ -4,85 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
BuilderFieldType,
|
|
12
|
-
BuilderFieldType$inboundSchema,
|
|
13
|
-
BuilderFieldType$outboundSchema,
|
|
14
|
-
} from "./builderfieldtype.js";
|
|
15
|
-
import {
|
|
16
|
-
FieldFilterPart,
|
|
17
|
-
FieldFilterPart$inboundSchema,
|
|
18
|
-
FieldFilterPart$Outbound,
|
|
19
|
-
FieldFilterPart$outboundSchema,
|
|
20
|
-
} from "./fieldfilterpart.js";
|
|
21
9
|
|
|
22
|
-
export
|
|
23
|
-
And: "AND",
|
|
24
|
-
Or: "OR",
|
|
25
|
-
} as const;
|
|
26
|
-
export type Value = ClosedEnum<typeof Value>;
|
|
27
|
-
|
|
28
|
-
export type StepFilter = {
|
|
29
|
-
isNegated: boolean;
|
|
30
|
-
type: BuilderFieldType;
|
|
31
|
-
value: Value;
|
|
32
|
-
children: Array<FieldFilterPart>;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/** @internal */
|
|
36
|
-
export const Value$inboundSchema: z.ZodNativeEnum<typeof Value> = z.nativeEnum(
|
|
37
|
-
Value,
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const Value$outboundSchema: z.ZodNativeEnum<typeof Value> =
|
|
42
|
-
Value$inboundSchema;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @internal
|
|
46
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
|
-
*/
|
|
48
|
-
export namespace Value$ {
|
|
49
|
-
/** @deprecated use `Value$inboundSchema` instead. */
|
|
50
|
-
export const inboundSchema = Value$inboundSchema;
|
|
51
|
-
/** @deprecated use `Value$outboundSchema` instead. */
|
|
52
|
-
export const outboundSchema = Value$outboundSchema;
|
|
53
|
-
}
|
|
10
|
+
export type StepFilter = {};
|
|
54
11
|
|
|
55
12
|
/** @internal */
|
|
56
13
|
export const StepFilter$inboundSchema: z.ZodType<
|
|
57
14
|
StepFilter,
|
|
58
15
|
z.ZodTypeDef,
|
|
59
16
|
unknown
|
|
60
|
-
> = z.object({
|
|
61
|
-
isNegated: z.boolean(),
|
|
62
|
-
type: BuilderFieldType$inboundSchema,
|
|
63
|
-
value: Value$inboundSchema,
|
|
64
|
-
children: z.array(FieldFilterPart$inboundSchema),
|
|
65
|
-
});
|
|
17
|
+
> = z.object({});
|
|
66
18
|
|
|
67
19
|
/** @internal */
|
|
68
|
-
export type StepFilter$Outbound = {
|
|
69
|
-
isNegated: boolean;
|
|
70
|
-
type: string;
|
|
71
|
-
value: string;
|
|
72
|
-
children: Array<FieldFilterPart$Outbound>;
|
|
73
|
-
};
|
|
20
|
+
export type StepFilter$Outbound = {};
|
|
74
21
|
|
|
75
22
|
/** @internal */
|
|
76
23
|
export const StepFilter$outboundSchema: z.ZodType<
|
|
77
24
|
StepFilter$Outbound,
|
|
78
25
|
z.ZodTypeDef,
|
|
79
26
|
StepFilter
|
|
80
|
-
> = z.object({
|
|
81
|
-
isNegated: z.boolean(),
|
|
82
|
-
type: BuilderFieldType$outboundSchema,
|
|
83
|
-
value: Value$outboundSchema,
|
|
84
|
-
children: z.array(FieldFilterPart$outboundSchema),
|
|
85
|
-
});
|
|
27
|
+
> = z.object({});
|
|
86
28
|
|
|
87
29
|
/**
|
|
88
30
|
* @internal
|