@novu/api 0.0.1-alpha.148 → 0.0.1-alpha.150
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/RUNTIMES.md +27 -1
- package/funcs/cancel.js +4 -4
- package/funcs/cancel.js.map +1 -1
- package/funcs/integrationsCreate.js +4 -4
- package/funcs/integrationsCreate.js.map +1 -1
- package/funcs/integrationsDelete.js +4 -4
- package/funcs/integrationsDelete.js.map +1 -1
- package/funcs/integrationsList.js +4 -4
- package/funcs/integrationsList.js.map +1 -1
- package/funcs/integrationsListActive.js +4 -4
- package/funcs/integrationsListActive.js.map +1 -1
- package/funcs/integrationsSetAsPrimary.js +4 -4
- package/funcs/integrationsSetAsPrimary.js.map +1 -1
- package/funcs/integrationsUpdate.js +4 -4
- package/funcs/integrationsUpdate.js.map +1 -1
- package/funcs/integrationsWebhooksRetrieve.js +4 -4
- package/funcs/integrationsWebhooksRetrieve.js.map +1 -1
- package/funcs/messagesDelete.js +4 -4
- package/funcs/messagesDelete.js.map +1 -1
- package/funcs/messagesDeleteByTransactionId.js +4 -4
- package/funcs/messagesDeleteByTransactionId.js.map +1 -1
- package/funcs/messagesRetrieve.js +4 -4
- package/funcs/messagesRetrieve.js.map +1 -1
- package/funcs/notificationsList.js +4 -4
- package/funcs/notificationsList.js.map +1 -1
- package/funcs/notificationsRetrieve.js +4 -4
- package/funcs/notificationsRetrieve.js.map +1 -1
- package/funcs/notificationsStatsGraph.js +4 -4
- package/funcs/notificationsStatsGraph.js.map +1 -1
- package/funcs/notificationsStatsRetrieve.js +4 -4
- package/funcs/notificationsStatsRetrieve.js.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauth.js +4 -4
- package/funcs/subscribersAuthenticationChatAccessOauth.js.map +1 -1
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js +5 -5
- package/funcs/subscribersAuthenticationChatAccessOauthCallBack.js.map +1 -1
- package/funcs/subscribersCreate.js +4 -4
- package/funcs/subscribersCreate.js.map +1 -1
- package/funcs/subscribersCreateBulk.js +4 -4
- package/funcs/subscribersCreateBulk.js.map +1 -1
- package/funcs/subscribersCredentialsAppend.js +4 -4
- package/funcs/subscribersCredentialsAppend.js.map +1 -1
- package/funcs/subscribersCredentialsDelete.js +4 -4
- package/funcs/subscribersCredentialsDelete.js.map +1 -1
- package/funcs/subscribersCredentialsUpdate.js +4 -4
- package/funcs/subscribersCredentialsUpdate.js.map +1 -1
- package/funcs/subscribersDelete.js +4 -4
- package/funcs/subscribersDelete.js.map +1 -1
- package/funcs/subscribersList.js +6 -6
- package/funcs/subscribersList.js.map +1 -1
- package/funcs/subscribersMessagesMarkAll.js +4 -4
- package/funcs/subscribersMessagesMarkAll.js.map +1 -1
- package/funcs/subscribersMessagesMarkAllAs.js +4 -4
- package/funcs/subscribersMessagesMarkAllAs.js.map +1 -1
- package/funcs/subscribersMessagesUpdateAsSeen.js +4 -4
- package/funcs/subscribersMessagesUpdateAsSeen.js.map +1 -1
- package/funcs/subscribersNotificationsFeed.js +4 -4
- package/funcs/subscribersNotificationsFeed.js.map +1 -1
- package/funcs/subscribersNotificationsUnseenCount.js +4 -4
- package/funcs/subscribersNotificationsUnseenCount.js.map +1 -1
- package/funcs/subscribersPreferencesList.js +4 -4
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersPreferencesRetrieveByLevel.js +4 -4
- package/funcs/subscribersPreferencesRetrieveByLevel.js.map +1 -1
- package/funcs/subscribersPreferencesUpdate.js +4 -4
- package/funcs/subscribersPreferencesUpdate.js.map +1 -1
- package/funcs/subscribersPreferencesUpdateGlobal.js +4 -4
- package/funcs/subscribersPreferencesUpdateGlobal.js.map +1 -1
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js +4 -4
- package/funcs/subscribersPropertiesUpdateOnlineFlag.js.map +1 -1
- package/funcs/subscribersRetrieve.js +4 -4
- package/funcs/subscribersRetrieve.js.map +1 -1
- package/funcs/subscribersUpdate.js +4 -4
- package/funcs/subscribersUpdate.js.map +1 -1
- package/funcs/topicsCreate.js +4 -4
- package/funcs/topicsCreate.js.map +1 -1
- package/funcs/topicsDelete.js +4 -4
- package/funcs/topicsDelete.js.map +1 -1
- package/funcs/topicsList.js +4 -4
- package/funcs/topicsList.js.map +1 -1
- package/funcs/topicsRename.js +4 -4
- package/funcs/topicsRename.js.map +1 -1
- package/funcs/topicsRetrieve.js +4 -4
- package/funcs/topicsRetrieve.js.map +1 -1
- package/funcs/topicsSubscribersAssign.js +4 -4
- package/funcs/topicsSubscribersAssign.js.map +1 -1
- package/funcs/topicsSubscribersRemove.js +4 -4
- package/funcs/topicsSubscribersRemove.js.map +1 -1
- package/funcs/topicsSubscribersRetrieve.js +4 -4
- package/funcs/topicsSubscribersRetrieve.js.map +1 -1
- package/funcs/trigger.js +4 -4
- package/funcs/trigger.js.map +1 -1
- package/funcs/triggerBroadcast.js +4 -4
- package/funcs/triggerBroadcast.js.map +1 -1
- package/funcs/triggerBulk.js +4 -4
- package/funcs/triggerBulk.js.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +4 -5
- package/lib/config.js.map +1 -1
- package/lib/encodings.js +18 -19
- package/lib/encodings.js.map +1 -1
- package/lib/http.js +1 -2
- package/lib/http.js.map +1 -1
- package/lib/matchers.js +5 -6
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.js +1 -1
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +3 -4
- package/lib/retries.js.map +1 -1
- package/lib/sdks.js +15 -16
- package/lib/sdks.js.map +1 -1
- package/lib/security.js +1 -1
- package/lib/security.js.map +1 -1
- package/lib/url.js +1 -1
- package/lib/url.js.map +1 -1
- package/models/components/activitynotificationexecutiondetailresponsedto.d.ts +0 -5
- package/models/components/activitynotificationexecutiondetailresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationexecutiondetailresponsedto.js +0 -4
- package/models/components/activitynotificationexecutiondetailresponsedto.js.map +1 -1
- package/models/components/activitynotificationjobresponsedto.d.ts +49 -19
- package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationjobresponsedto.js +29 -23
- package/models/components/activitynotificationjobresponsedto.js.map +1 -1
- package/models/components/builderfieldtype.d.ts +46 -0
- package/models/components/builderfieldtype.d.ts.map +1 -0
- package/models/components/builderfieldtype.js +56 -0
- package/models/components/builderfieldtype.js.map +1 -0
- package/models/components/createintegrationrequestdto.d.ts +3 -3
- package/models/components/createintegrationrequestdto.d.ts.map +1 -1
- package/models/components/createintegrationrequestdto.js +3 -3
- package/models/components/createintegrationrequestdto.js.map +1 -1
- package/models/components/digestregularmetadata.d.ts +8 -8
- package/models/components/digestregularmetadata.d.ts.map +1 -1
- package/models/components/digestregularmetadata.js +13 -13
- package/models/components/digestregularmetadata.js.map +1 -1
- package/models/components/digestwitheventsdto.d.ts +95 -0
- package/models/components/digestwitheventsdto.d.ts.map +1 -0
- package/models/components/digestwitheventsdto.js +91 -0
- package/models/components/digestwitheventsdto.js.map +1 -0
- package/models/components/fieldfilterpartdto.d.ts +122 -0
- package/models/components/fieldfilterpartdto.d.ts.map +1 -0
- package/models/components/fieldfilterpartdto.js +116 -0
- package/models/components/fieldfilterpartdto.js.map +1 -0
- package/models/components/index.d.ts +4 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -0
- package/models/components/index.js.map +1 -1
- package/models/components/integrationresponsedto.d.ts +3 -3
- package/models/components/integrationresponsedto.d.ts.map +1 -1
- package/models/components/integrationresponsedto.js +3 -3
- package/models/components/integrationresponsedto.js.map +1 -1
- package/models/components/notificationstep.d.ts +3 -3
- package/models/components/notificationstep.d.ts.map +1 -1
- package/models/components/notificationstep.js +3 -3
- package/models/components/notificationstep.js.map +1 -1
- package/models/components/notificationstepvariant.d.ts +3 -3
- package/models/components/notificationstepvariant.d.ts.map +1 -1
- package/models/components/notificationstepvariant.js +3 -3
- package/models/components/notificationstepvariant.js.map +1 -1
- package/models/components/notificationtriggervariableresponse.d.ts +15 -15
- package/models/components/notificationtriggervariableresponse.d.ts.map +1 -1
- package/models/components/notificationtriggervariableresponse.js +20 -19
- package/models/components/notificationtriggervariableresponse.js.map +1 -1
- package/models/components/stepfilterdto.d.ts +63 -0
- package/models/components/stepfilterdto.d.ts.map +1 -0
- package/models/components/stepfilterdto.js +86 -0
- package/models/components/stepfilterdto.js.map +1 -0
- package/models/components/subscriberresponsedto.d.ts +2 -2
- package/models/components/subscriberresponsedto.d.ts.map +1 -1
- package/models/components/subscriberresponsedto.js +2 -2
- package/models/components/subscriberresponsedto.js.map +1 -1
- package/models/components/updateintegrationrequestdto.d.ts +3 -3
- package/models/components/updateintegrationrequestdto.d.ts.map +1 -1
- package/models/components/updateintegrationrequestdto.js +3 -3
- package/models/components/updateintegrationrequestdto.js.map +1 -1
- package/models/errors/httpclienterrors.js +2 -2
- package/models/errors/httpclienterrors.js.map +1 -1
- package/package.json +1 -1
- package/sdk/integrations.js +1 -2
- package/sdk/integrations.js.map +1 -1
- package/sdk/notifications.js +1 -2
- package/sdk/notifications.js.map +1 -1
- package/sdk/sdk.js +5 -10
- package/sdk/sdk.js.map +1 -1
- package/sdk/subscribers.js +6 -12
- package/sdk/subscribers.js.map +1 -1
- package/sdk/topics.js +1 -2
- package/sdk/topics.js.map +1 -1
- package/src/funcs/subscribersList.ts +2 -2
- package/src/lib/config.ts +3 -3
- package/src/models/components/activitynotificationexecutiondetailresponsedto.ts +0 -9
- package/src/models/components/activitynotificationjobresponsedto.ts +47 -41
- package/src/models/components/builderfieldtype.ts +39 -0
- package/src/models/components/createintegrationrequestdto.ts +9 -9
- package/src/models/components/digestregularmetadata.ts +18 -15
- package/src/models/components/digestwitheventsdto.ts +127 -0
- package/src/models/components/fieldfilterpartdto.ts +139 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/integrationresponsedto.ts +9 -9
- package/src/models/components/notificationstep.ts +9 -9
- package/src/models/components/notificationstepvariant.ts +9 -9
- package/src/models/components/notificationtriggervariableresponse.ts +44 -24
- package/src/models/components/stepfilterdto.ts +112 -0
- package/src/models/components/subscriberresponsedto.ts +4 -4
- package/src/models/components/updateintegrationrequestdto.ts +9 -9
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
CredentialsDto$outboundSchema,
|
|
16
16
|
} from "./credentialsdto.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./
|
|
18
|
+
StepFilterDto,
|
|
19
|
+
StepFilterDto$inboundSchema,
|
|
20
|
+
StepFilterDto$Outbound,
|
|
21
|
+
StepFilterDto$outboundSchema,
|
|
22
|
+
} from "./stepfilterdto.js";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The channel type for the integration
|
|
@@ -74,7 +74,7 @@ export type CreateIntegrationRequestDto = {
|
|
|
74
74
|
/**
|
|
75
75
|
* Conditions for the integration
|
|
76
76
|
*/
|
|
77
|
-
conditions?: Array<
|
|
77
|
+
conditions?: Array<StepFilterDto> | undefined;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
/** @internal */
|
|
@@ -113,7 +113,7 @@ export const CreateIntegrationRequestDto$inboundSchema: z.ZodType<
|
|
|
113
113
|
credentials: CredentialsDto$inboundSchema.optional(),
|
|
114
114
|
active: z.boolean().optional(),
|
|
115
115
|
check: z.boolean().optional(),
|
|
116
|
-
conditions: z.array(
|
|
116
|
+
conditions: z.array(StepFilterDto$inboundSchema).optional(),
|
|
117
117
|
}).transform((v) => {
|
|
118
118
|
return remap$(v, {
|
|
119
119
|
"_environmentId": "environmentId",
|
|
@@ -130,7 +130,7 @@ export type CreateIntegrationRequestDto$Outbound = {
|
|
|
130
130
|
credentials?: CredentialsDto$Outbound | undefined;
|
|
131
131
|
active?: boolean | undefined;
|
|
132
132
|
check?: boolean | undefined;
|
|
133
|
-
conditions?: Array<
|
|
133
|
+
conditions?: Array<StepFilterDto$Outbound> | undefined;
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
/** @internal */
|
|
@@ -147,7 +147,7 @@ export const CreateIntegrationRequestDto$outboundSchema: z.ZodType<
|
|
|
147
147
|
credentials: CredentialsDto$outboundSchema.optional(),
|
|
148
148
|
active: z.boolean().optional(),
|
|
149
149
|
check: z.boolean().optional(),
|
|
150
|
-
conditions: z.array(
|
|
150
|
+
conditions: z.array(StepFilterDto$outboundSchema).optional(),
|
|
151
151
|
}).transform((v) => {
|
|
152
152
|
return remap$(v, {
|
|
153
153
|
environmentId: "_environmentId",
|
|
@@ -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 const
|
|
11
|
+
export const DigestRegularMetadataUnit = {
|
|
12
12
|
Seconds: "seconds",
|
|
13
13
|
Minutes: "minutes",
|
|
14
14
|
Hours: "hours",
|
|
@@ -16,7 +16,9 @@ export const Unit = {
|
|
|
16
16
|
Weeks: "weeks",
|
|
17
17
|
Months: "months",
|
|
18
18
|
} as const;
|
|
19
|
-
export type
|
|
19
|
+
export type DigestRegularMetadataUnit = ClosedEnum<
|
|
20
|
+
typeof DigestRegularMetadataUnit
|
|
21
|
+
>;
|
|
20
22
|
|
|
21
23
|
export const DigestRegularMetadataType = {
|
|
22
24
|
Regular: "regular",
|
|
@@ -38,7 +40,7 @@ export type BackoffUnit = ClosedEnum<typeof BackoffUnit>;
|
|
|
38
40
|
|
|
39
41
|
export type DigestRegularMetadata = {
|
|
40
42
|
amount?: number | undefined;
|
|
41
|
-
unit?:
|
|
43
|
+
unit?: DigestRegularMetadataUnit | undefined;
|
|
42
44
|
digestKey?: string | undefined;
|
|
43
45
|
type: DigestRegularMetadataType;
|
|
44
46
|
backoff?: boolean | undefined;
|
|
@@ -48,23 +50,24 @@ export type DigestRegularMetadata = {
|
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
/** @internal */
|
|
51
|
-
export const
|
|
52
|
-
|
|
53
|
-
);
|
|
53
|
+
export const DigestRegularMetadataUnit$inboundSchema: z.ZodNativeEnum<
|
|
54
|
+
typeof DigestRegularMetadataUnit
|
|
55
|
+
> = z.nativeEnum(DigestRegularMetadataUnit);
|
|
54
56
|
|
|
55
57
|
/** @internal */
|
|
56
|
-
export const
|
|
57
|
-
|
|
58
|
+
export const DigestRegularMetadataUnit$outboundSchema: z.ZodNativeEnum<
|
|
59
|
+
typeof DigestRegularMetadataUnit
|
|
60
|
+
> = DigestRegularMetadataUnit$inboundSchema;
|
|
58
61
|
|
|
59
62
|
/**
|
|
60
63
|
* @internal
|
|
61
64
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
62
65
|
*/
|
|
63
|
-
export namespace
|
|
64
|
-
/** @deprecated use `
|
|
65
|
-
export const inboundSchema =
|
|
66
|
-
/** @deprecated use `
|
|
67
|
-
export const outboundSchema =
|
|
66
|
+
export namespace DigestRegularMetadataUnit$ {
|
|
67
|
+
/** @deprecated use `DigestRegularMetadataUnit$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = DigestRegularMetadataUnit$inboundSchema;
|
|
69
|
+
/** @deprecated use `DigestRegularMetadataUnit$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = DigestRegularMetadataUnit$outboundSchema;
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
/** @internal */
|
|
@@ -114,7 +117,7 @@ export const DigestRegularMetadata$inboundSchema: z.ZodType<
|
|
|
114
117
|
unknown
|
|
115
118
|
> = z.object({
|
|
116
119
|
amount: z.number().optional(),
|
|
117
|
-
unit:
|
|
120
|
+
unit: DigestRegularMetadataUnit$inboundSchema.optional(),
|
|
118
121
|
digestKey: z.string().optional(),
|
|
119
122
|
type: DigestRegularMetadataType$inboundSchema,
|
|
120
123
|
backoff: z.boolean().optional(),
|
|
@@ -142,7 +145,7 @@ export const DigestRegularMetadata$outboundSchema: z.ZodType<
|
|
|
142
145
|
DigestRegularMetadata
|
|
143
146
|
> = z.object({
|
|
144
147
|
amount: z.number().optional(),
|
|
145
|
-
unit:
|
|
148
|
+
unit: DigestRegularMetadataUnit$outboundSchema.optional(),
|
|
146
149
|
digestKey: z.string().optional(),
|
|
147
150
|
type: DigestRegularMetadataType$outboundSchema,
|
|
148
151
|
backoff: z.boolean().optional(),
|
|
@@ -0,0 +1,127 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Unit of the digest
|
|
13
|
+
*/
|
|
14
|
+
export const Unit = {
|
|
15
|
+
Seconds: "seconds",
|
|
16
|
+
Minutes: "minutes",
|
|
17
|
+
Hours: "hours",
|
|
18
|
+
Days: "days",
|
|
19
|
+
Weeks: "weeks",
|
|
20
|
+
Months: "months",
|
|
21
|
+
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* Unit of the digest
|
|
24
|
+
*/
|
|
25
|
+
export type Unit = ClosedEnum<typeof Unit>;
|
|
26
|
+
|
|
27
|
+
export type DigestWithEventsDto = {
|
|
28
|
+
/**
|
|
29
|
+
* Optional key for the digest
|
|
30
|
+
*/
|
|
31
|
+
digestKey?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Amount for the digest
|
|
34
|
+
*/
|
|
35
|
+
amount?: number | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Unit of the digest
|
|
38
|
+
*/
|
|
39
|
+
unit?: Unit | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Optional array of events associated with the digest, represented as key-value pairs
|
|
42
|
+
*/
|
|
43
|
+
events?: Array<{ [k: string]: any }> | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const Unit$inboundSchema: z.ZodNativeEnum<typeof Unit> = z.nativeEnum(
|
|
48
|
+
Unit,
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const Unit$outboundSchema: z.ZodNativeEnum<typeof Unit> =
|
|
53
|
+
Unit$inboundSchema;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace Unit$ {
|
|
60
|
+
/** @deprecated use `Unit$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = Unit$inboundSchema;
|
|
62
|
+
/** @deprecated use `Unit$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = Unit$outboundSchema;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const DigestWithEventsDto$inboundSchema: z.ZodType<
|
|
68
|
+
DigestWithEventsDto,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.object({
|
|
72
|
+
digestKey: z.string().optional(),
|
|
73
|
+
amount: z.number().optional(),
|
|
74
|
+
unit: Unit$inboundSchema.optional(),
|
|
75
|
+
events: z.array(z.record(z.any())).optional(),
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export type DigestWithEventsDto$Outbound = {
|
|
80
|
+
digestKey?: string | undefined;
|
|
81
|
+
amount?: number | undefined;
|
|
82
|
+
unit?: string | undefined;
|
|
83
|
+
events?: Array<{ [k: string]: any }> | undefined;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const DigestWithEventsDto$outboundSchema: z.ZodType<
|
|
88
|
+
DigestWithEventsDto$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
DigestWithEventsDto
|
|
91
|
+
> = z.object({
|
|
92
|
+
digestKey: z.string().optional(),
|
|
93
|
+
amount: z.number().optional(),
|
|
94
|
+
unit: Unit$outboundSchema.optional(),
|
|
95
|
+
events: z.array(z.record(z.any())).optional(),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
+
*/
|
|
102
|
+
export namespace DigestWithEventsDto$ {
|
|
103
|
+
/** @deprecated use `DigestWithEventsDto$inboundSchema` instead. */
|
|
104
|
+
export const inboundSchema = DigestWithEventsDto$inboundSchema;
|
|
105
|
+
/** @deprecated use `DigestWithEventsDto$outboundSchema` instead. */
|
|
106
|
+
export const outboundSchema = DigestWithEventsDto$outboundSchema;
|
|
107
|
+
/** @deprecated use `DigestWithEventsDto$Outbound` instead. */
|
|
108
|
+
export type Outbound = DigestWithEventsDto$Outbound;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function digestWithEventsDtoToJSON(
|
|
112
|
+
digestWithEventsDto: DigestWithEventsDto,
|
|
113
|
+
): string {
|
|
114
|
+
return JSON.stringify(
|
|
115
|
+
DigestWithEventsDto$outboundSchema.parse(digestWithEventsDto),
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function digestWithEventsDtoFromJSON(
|
|
120
|
+
jsonString: string,
|
|
121
|
+
): SafeParseResult<DigestWithEventsDto, SDKValidationError> {
|
|
122
|
+
return safeParse(
|
|
123
|
+
jsonString,
|
|
124
|
+
(x) => DigestWithEventsDto$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
+
`Failed to parse 'DigestWithEventsDto' from JSON`,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const Operator = {
|
|
12
|
+
Larger: "LARGER",
|
|
13
|
+
Smaller: "SMALLER",
|
|
14
|
+
LargerEqual: "LARGER_EQUAL",
|
|
15
|
+
SmallerEqual: "SMALLER_EQUAL",
|
|
16
|
+
Equal: "EQUAL",
|
|
17
|
+
NotEqual: "NOT_EQUAL",
|
|
18
|
+
AllIn: "ALL_IN",
|
|
19
|
+
AnyIn: "ANY_IN",
|
|
20
|
+
NotIn: "NOT_IN",
|
|
21
|
+
Between: "BETWEEN",
|
|
22
|
+
NotBetween: "NOT_BETWEEN",
|
|
23
|
+
Like: "LIKE",
|
|
24
|
+
NotLike: "NOT_LIKE",
|
|
25
|
+
In: "IN",
|
|
26
|
+
} as const;
|
|
27
|
+
export type Operator = ClosedEnum<typeof Operator>;
|
|
28
|
+
|
|
29
|
+
export const On = {
|
|
30
|
+
Subscriber: "subscriber",
|
|
31
|
+
Payload: "payload",
|
|
32
|
+
} as const;
|
|
33
|
+
export type On = ClosedEnum<typeof On>;
|
|
34
|
+
|
|
35
|
+
export type FieldFilterPartDto = {
|
|
36
|
+
field: string;
|
|
37
|
+
value: string;
|
|
38
|
+
operator: Operator;
|
|
39
|
+
on: On;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const Operator$inboundSchema: z.ZodNativeEnum<typeof Operator> = z
|
|
44
|
+
.nativeEnum(Operator);
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const Operator$outboundSchema: z.ZodNativeEnum<typeof Operator> =
|
|
48
|
+
Operator$inboundSchema;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace Operator$ {
|
|
55
|
+
/** @deprecated use `Operator$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = Operator$inboundSchema;
|
|
57
|
+
/** @deprecated use `Operator$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = Operator$outboundSchema;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const On$inboundSchema: z.ZodNativeEnum<typeof On> = z.nativeEnum(On);
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const On$outboundSchema: z.ZodNativeEnum<typeof On> = On$inboundSchema;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export namespace On$ {
|
|
72
|
+
/** @deprecated use `On$inboundSchema` instead. */
|
|
73
|
+
export const inboundSchema = On$inboundSchema;
|
|
74
|
+
/** @deprecated use `On$outboundSchema` instead. */
|
|
75
|
+
export const outboundSchema = On$outboundSchema;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const FieldFilterPartDto$inboundSchema: z.ZodType<
|
|
80
|
+
FieldFilterPartDto,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.object({
|
|
84
|
+
field: z.string(),
|
|
85
|
+
value: z.string(),
|
|
86
|
+
operator: Operator$inboundSchema,
|
|
87
|
+
on: On$inboundSchema,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export type FieldFilterPartDto$Outbound = {
|
|
92
|
+
field: string;
|
|
93
|
+
value: string;
|
|
94
|
+
operator: string;
|
|
95
|
+
on: string;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const FieldFilterPartDto$outboundSchema: z.ZodType<
|
|
100
|
+
FieldFilterPartDto$Outbound,
|
|
101
|
+
z.ZodTypeDef,
|
|
102
|
+
FieldFilterPartDto
|
|
103
|
+
> = z.object({
|
|
104
|
+
field: z.string(),
|
|
105
|
+
value: z.string(),
|
|
106
|
+
operator: Operator$outboundSchema,
|
|
107
|
+
on: On$outboundSchema,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
113
|
+
*/
|
|
114
|
+
export namespace FieldFilterPartDto$ {
|
|
115
|
+
/** @deprecated use `FieldFilterPartDto$inboundSchema` instead. */
|
|
116
|
+
export const inboundSchema = FieldFilterPartDto$inboundSchema;
|
|
117
|
+
/** @deprecated use `FieldFilterPartDto$outboundSchema` instead. */
|
|
118
|
+
export const outboundSchema = FieldFilterPartDto$outboundSchema;
|
|
119
|
+
/** @deprecated use `FieldFilterPartDto$Outbound` instead. */
|
|
120
|
+
export type Outbound = FieldFilterPartDto$Outbound;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function fieldFilterPartDtoToJSON(
|
|
124
|
+
fieldFilterPartDto: FieldFilterPartDto,
|
|
125
|
+
): string {
|
|
126
|
+
return JSON.stringify(
|
|
127
|
+
FieldFilterPartDto$outboundSchema.parse(fieldFilterPartDto),
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function fieldFilterPartDtoFromJSON(
|
|
132
|
+
jsonString: string,
|
|
133
|
+
): SafeParseResult<FieldFilterPartDto, SDKValidationError> {
|
|
134
|
+
return safeParse(
|
|
135
|
+
jsonString,
|
|
136
|
+
(x) => FieldFilterPartDto$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'FieldFilterPartDto' from JSON`,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
@@ -15,6 +15,7 @@ export * from "./actorfeeditemdto.js";
|
|
|
15
15
|
export * from "./actortypeenum.js";
|
|
16
16
|
export * from "./addsubscribersrequestdto.js";
|
|
17
17
|
export * from "./assignsubscribertotopicdto.js";
|
|
18
|
+
export * from "./builderfieldtype.js";
|
|
18
19
|
export * from "./bulkcreatesubscriberresponsedto.js";
|
|
19
20
|
export * from "./bulksubscribercreatedto.js";
|
|
20
21
|
export * from "./bulktriggereventdto.js";
|
|
@@ -38,12 +39,14 @@ export * from "./deletemessageresponsedto.js";
|
|
|
38
39
|
export * from "./deletesubscriberresponsedto.js";
|
|
39
40
|
export * from "./digestregularmetadata.js";
|
|
40
41
|
export * from "./digesttimedmetadata.js";
|
|
42
|
+
export * from "./digestwitheventsdto.js";
|
|
41
43
|
export * from "./emailblock.js";
|
|
42
44
|
export * from "./emailblockstyles.js";
|
|
43
45
|
export * from "./emailblocktypeenum.js";
|
|
44
46
|
export * from "./failedassignmentsdto.js";
|
|
45
47
|
export * from "./failedoperationdto.js";
|
|
46
48
|
export * from "./feedresponsedto.js";
|
|
49
|
+
export * from "./fieldfilterpartdto.js";
|
|
47
50
|
export * from "./filtertopicsresponsedto.js";
|
|
48
51
|
export * from "./getsubscriberpreferencesresponsedto.js";
|
|
49
52
|
export * from "./gettopicresponsedto.js";
|
|
@@ -77,6 +80,7 @@ export * from "./renametopicrequestdto.js";
|
|
|
77
80
|
export * from "./renametopicresponsedto.js";
|
|
78
81
|
export * from "./security.js";
|
|
79
82
|
export * from "./stepfilter.js";
|
|
83
|
+
export * from "./stepfilterdto.js";
|
|
80
84
|
export * from "./steptypeenum.js";
|
|
81
85
|
export * from "./subscriberchanneldto.js";
|
|
82
86
|
export * from "./subscriberfeedresponsedto.js";
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
CredentialsDto$outboundSchema,
|
|
16
16
|
} from "./credentialsdto.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./
|
|
18
|
+
StepFilterDto,
|
|
19
|
+
StepFilterDto$inboundSchema,
|
|
20
|
+
StepFilterDto$Outbound,
|
|
21
|
+
StepFilterDto$outboundSchema,
|
|
22
|
+
} from "./stepfilterdto.js";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The channel type for the integration, which defines how the integration communicates (e.g., email, SMS).
|
|
@@ -92,7 +92,7 @@ export type IntegrationResponseDto = {
|
|
|
92
92
|
/**
|
|
93
93
|
* An array of conditions associated with the integration that may influence its behavior or processing logic.
|
|
94
94
|
*/
|
|
95
|
-
conditions?: Array<
|
|
95
|
+
conditions?: Array<StepFilterDto> | undefined;
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
/** @internal */
|
|
@@ -133,7 +133,7 @@ export const IntegrationResponseDto$inboundSchema: z.ZodType<
|
|
|
133
133
|
deletedAt: z.string().optional(),
|
|
134
134
|
deletedBy: z.string().optional(),
|
|
135
135
|
primary: z.boolean(),
|
|
136
|
-
conditions: z.array(
|
|
136
|
+
conditions: z.array(StepFilterDto$inboundSchema).optional(),
|
|
137
137
|
}).transform((v) => {
|
|
138
138
|
return remap$(v, {
|
|
139
139
|
"_id": "id",
|
|
@@ -157,7 +157,7 @@ export type IntegrationResponseDto$Outbound = {
|
|
|
157
157
|
deletedAt?: string | undefined;
|
|
158
158
|
deletedBy?: string | undefined;
|
|
159
159
|
primary: boolean;
|
|
160
|
-
conditions?: Array<
|
|
160
|
+
conditions?: Array<StepFilterDto$Outbound> | undefined;
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
/** @internal */
|
|
@@ -179,7 +179,7 @@ export const IntegrationResponseDto$outboundSchema: z.ZodType<
|
|
|
179
179
|
deletedAt: z.string().optional(),
|
|
180
180
|
deletedBy: z.string().optional(),
|
|
181
181
|
primary: z.boolean(),
|
|
182
|
-
conditions: z.array(
|
|
182
|
+
conditions: z.array(StepFilterDto$outboundSchema).optional(),
|
|
183
183
|
}).transform((v) => {
|
|
184
184
|
return remap$(v, {
|
|
185
185
|
id: "_id",
|
|
@@ -44,11 +44,11 @@ import {
|
|
|
44
44
|
NotificationStepVariant$outboundSchema,
|
|
45
45
|
} from "./notificationstepvariant.js";
|
|
46
46
|
import {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} from "./
|
|
47
|
+
StepFilterDto,
|
|
48
|
+
StepFilterDto$inboundSchema,
|
|
49
|
+
StepFilterDto$Outbound,
|
|
50
|
+
StepFilterDto$outboundSchema,
|
|
51
|
+
} from "./stepfilterdto.js";
|
|
52
52
|
|
|
53
53
|
export type ParentId = {};
|
|
54
54
|
|
|
@@ -68,7 +68,7 @@ export type NotificationStep = {
|
|
|
68
68
|
active?: boolean | undefined;
|
|
69
69
|
shouldStopOnFail?: boolean | undefined;
|
|
70
70
|
template?: MessageTemplate | undefined;
|
|
71
|
-
filters?: Array<
|
|
71
|
+
filters?: Array<StepFilterDto> | undefined;
|
|
72
72
|
parentId?: ParentId | undefined;
|
|
73
73
|
metadata?:
|
|
74
74
|
| DelayScheduledMetadata
|
|
@@ -239,7 +239,7 @@ export const NotificationStep$inboundSchema: z.ZodType<
|
|
|
239
239
|
active: z.boolean().optional(),
|
|
240
240
|
shouldStopOnFail: z.boolean().optional(),
|
|
241
241
|
template: MessageTemplate$inboundSchema.optional(),
|
|
242
|
-
filters: z.array(
|
|
242
|
+
filters: z.array(StepFilterDto$inboundSchema).optional(),
|
|
243
243
|
_parentId: z.lazy(() => ParentId$inboundSchema).optional(),
|
|
244
244
|
metadata: z.union([
|
|
245
245
|
DelayScheduledMetadata$inboundSchema,
|
|
@@ -266,7 +266,7 @@ export type NotificationStep$Outbound = {
|
|
|
266
266
|
active?: boolean | undefined;
|
|
267
267
|
shouldStopOnFail?: boolean | undefined;
|
|
268
268
|
template?: MessageTemplate$Outbound | undefined;
|
|
269
|
-
filters?: Array<
|
|
269
|
+
filters?: Array<StepFilterDto$Outbound> | undefined;
|
|
270
270
|
_parentId?: ParentId$Outbound | undefined;
|
|
271
271
|
metadata?:
|
|
272
272
|
| DelayScheduledMetadata$Outbound
|
|
@@ -291,7 +291,7 @@ export const NotificationStep$outboundSchema: z.ZodType<
|
|
|
291
291
|
active: z.boolean().optional(),
|
|
292
292
|
shouldStopOnFail: z.boolean().optional(),
|
|
293
293
|
template: MessageTemplate$outboundSchema.optional(),
|
|
294
|
-
filters: z.array(
|
|
294
|
+
filters: z.array(StepFilterDto$outboundSchema).optional(),
|
|
295
295
|
parentId: z.lazy(() => ParentId$outboundSchema).optional(),
|
|
296
296
|
metadata: z.union([
|
|
297
297
|
DelayScheduledMetadata$outboundSchema,
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
MessageTemplate$outboundSchema,
|
|
39
39
|
} from "./messagetemplate.js";
|
|
40
40
|
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} from "./
|
|
41
|
+
StepFilterDto,
|
|
42
|
+
StepFilterDto$inboundSchema,
|
|
43
|
+
StepFilterDto$Outbound,
|
|
44
|
+
StepFilterDto$outboundSchema,
|
|
45
|
+
} from "./stepfilterdto.js";
|
|
46
46
|
|
|
47
47
|
export type NotificationStepVariantParentId = {};
|
|
48
48
|
|
|
@@ -62,7 +62,7 @@ export type NotificationStepVariant = {
|
|
|
62
62
|
active?: boolean | undefined;
|
|
63
63
|
shouldStopOnFail?: boolean | undefined;
|
|
64
64
|
template?: MessageTemplate | undefined;
|
|
65
|
-
filters?: Array<
|
|
65
|
+
filters?: Array<StepFilterDto> | undefined;
|
|
66
66
|
parentId?: NotificationStepVariantParentId | undefined;
|
|
67
67
|
metadata?:
|
|
68
68
|
| DelayScheduledMetadata
|
|
@@ -253,7 +253,7 @@ export const NotificationStepVariant$inboundSchema: z.ZodType<
|
|
|
253
253
|
active: z.boolean().optional(),
|
|
254
254
|
shouldStopOnFail: z.boolean().optional(),
|
|
255
255
|
template: MessageTemplate$inboundSchema.optional(),
|
|
256
|
-
filters: z.array(
|
|
256
|
+
filters: z.array(StepFilterDto$inboundSchema).optional(),
|
|
257
257
|
_parentId: z.lazy(() => NotificationStepVariantParentId$inboundSchema)
|
|
258
258
|
.optional(),
|
|
259
259
|
metadata: z.union([
|
|
@@ -282,7 +282,7 @@ export type NotificationStepVariant$Outbound = {
|
|
|
282
282
|
active?: boolean | undefined;
|
|
283
283
|
shouldStopOnFail?: boolean | undefined;
|
|
284
284
|
template?: MessageTemplate$Outbound | undefined;
|
|
285
|
-
filters?: Array<
|
|
285
|
+
filters?: Array<StepFilterDto$Outbound> | undefined;
|
|
286
286
|
_parentId?: NotificationStepVariantParentId$Outbound | undefined;
|
|
287
287
|
metadata?:
|
|
288
288
|
| DelayScheduledMetadata$Outbound
|
|
@@ -306,7 +306,7 @@ export const NotificationStepVariant$outboundSchema: z.ZodType<
|
|
|
306
306
|
active: z.boolean().optional(),
|
|
307
307
|
shouldStopOnFail: z.boolean().optional(),
|
|
308
308
|
template: MessageTemplate$outboundSchema.optional(),
|
|
309
|
-
filters: z.array(
|
|
309
|
+
filters: z.array(StepFilterDto$outboundSchema).optional(),
|
|
310
310
|
parentId: z.lazy(() => NotificationStepVariantParentId$outboundSchema)
|
|
311
311
|
.optional(),
|
|
312
312
|
metadata: z.union([
|