@wix/auto_sdk_email-subscriptions_email-subscriptions 1.0.13 → 1.0.15
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/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +39 -45
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +35 -45
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +152 -0
- package/build/cjs/schemas.js +210 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +39 -45
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +35 -45
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +152 -0
- package/build/es/schemas.mjs +166 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +39 -45
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +35 -45
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +152 -0
- package/build/internal/cjs/schemas.js +210 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +39 -45
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +35 -45
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +152 -0
- package/build/internal/es/schemas.mjs +166 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const QueryEmailSubscriptionsRequest: z.ZodObject<{
|
|
4
|
+
filter: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
5
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
paging: z.ZodOptional<z.ZodObject<{
|
|
7
|
+
limit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
8
|
+
offset: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const QueryEmailSubscriptionsResponse: z.ZodObject<{
|
|
13
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
email: z.ZodOptional<z.ZodString>;
|
|
16
|
+
subscriptionStatus: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
UNKNOWN: "UNKNOWN";
|
|
18
|
+
NOT_SET: "NOT_SET";
|
|
19
|
+
PENDING: "PENDING";
|
|
20
|
+
SUBSCRIBED: "SUBSCRIBED";
|
|
21
|
+
UNSUBSCRIBED: "UNSUBSCRIBED";
|
|
22
|
+
}>>;
|
|
23
|
+
deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
NOT_SET: "NOT_SET";
|
|
25
|
+
VALID: "VALID";
|
|
26
|
+
BOUNCED: "BOUNCED";
|
|
27
|
+
SPAM_COMPLAINT: "SPAM_COMPLAINT";
|
|
28
|
+
INACTIVE: "INACTIVE";
|
|
29
|
+
}>>;
|
|
30
|
+
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
31
|
+
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
count: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
35
|
+
offset: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
36
|
+
total: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
37
|
+
tooManyToCount: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const UpsertEmailSubscriptionRequest: z.ZodObject<{
|
|
41
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
subscription: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
44
|
+
email: z.ZodString;
|
|
45
|
+
subscriptionStatus: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
UNKNOWN: "UNKNOWN";
|
|
47
|
+
NOT_SET: "NOT_SET";
|
|
48
|
+
PENDING: "PENDING";
|
|
49
|
+
SUBSCRIBED: "SUBSCRIBED";
|
|
50
|
+
UNSUBSCRIBED: "UNSUBSCRIBED";
|
|
51
|
+
}>>;
|
|
52
|
+
deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
NOT_SET: "NOT_SET";
|
|
54
|
+
VALID: "VALID";
|
|
55
|
+
BOUNCED: "BOUNCED";
|
|
56
|
+
SPAM_COMPLAINT: "SPAM_COMPLAINT";
|
|
57
|
+
INACTIVE: "INACTIVE";
|
|
58
|
+
}>>;
|
|
59
|
+
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
60
|
+
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
declare const UpsertEmailSubscriptionResponse: z.ZodObject<{
|
|
65
|
+
subscription: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
67
|
+
email: z.ZodOptional<z.ZodString>;
|
|
68
|
+
subscriptionStatus: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
UNKNOWN: "UNKNOWN";
|
|
70
|
+
NOT_SET: "NOT_SET";
|
|
71
|
+
PENDING: "PENDING";
|
|
72
|
+
SUBSCRIBED: "SUBSCRIBED";
|
|
73
|
+
UNSUBSCRIBED: "UNSUBSCRIBED";
|
|
74
|
+
}>>;
|
|
75
|
+
deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
NOT_SET: "NOT_SET";
|
|
77
|
+
VALID: "VALID";
|
|
78
|
+
BOUNCED: "BOUNCED";
|
|
79
|
+
SPAM_COMPLAINT: "SPAM_COMPLAINT";
|
|
80
|
+
INACTIVE: "INACTIVE";
|
|
81
|
+
}>>;
|
|
82
|
+
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
83
|
+
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
declare const BulkUpsertEmailSubscriptionRequest: z.ZodObject<{
|
|
87
|
+
subscriptions: z.ZodArray<z.ZodObject<{
|
|
88
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
89
|
+
email: z.ZodOptional<z.ZodString>;
|
|
90
|
+
subscriptionStatus: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
UNKNOWN: "UNKNOWN";
|
|
92
|
+
NOT_SET: "NOT_SET";
|
|
93
|
+
PENDING: "PENDING";
|
|
94
|
+
SUBSCRIBED: "SUBSCRIBED";
|
|
95
|
+
UNSUBSCRIBED: "UNSUBSCRIBED";
|
|
96
|
+
}>>;
|
|
97
|
+
deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
|
|
98
|
+
NOT_SET: "NOT_SET";
|
|
99
|
+
VALID: "VALID";
|
|
100
|
+
BOUNCED: "BOUNCED";
|
|
101
|
+
SPAM_COMPLAINT: "SPAM_COMPLAINT";
|
|
102
|
+
INACTIVE: "INACTIVE";
|
|
103
|
+
}>>;
|
|
104
|
+
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
105
|
+
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
declare const BulkUpsertEmailSubscriptionResponse: z.ZodObject<{
|
|
109
|
+
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
originalIndex: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
emailSubscription: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
113
|
+
email: z.ZodOptional<z.ZodString>;
|
|
114
|
+
subscriptionStatus: z.ZodOptional<z.ZodEnum<{
|
|
115
|
+
UNKNOWN: "UNKNOWN";
|
|
116
|
+
NOT_SET: "NOT_SET";
|
|
117
|
+
PENDING: "PENDING";
|
|
118
|
+
SUBSCRIBED: "SUBSCRIBED";
|
|
119
|
+
UNSUBSCRIBED: "UNSUBSCRIBED";
|
|
120
|
+
}>>;
|
|
121
|
+
deliverabilityStatus: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
NOT_SET: "NOT_SET";
|
|
123
|
+
VALID: "VALID";
|
|
124
|
+
BOUNCED: "BOUNCED";
|
|
125
|
+
SPAM_COMPLAINT: "SPAM_COMPLAINT";
|
|
126
|
+
INACTIVE: "INACTIVE";
|
|
127
|
+
}>>;
|
|
128
|
+
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
129
|
+
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
133
|
+
message: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
}, z.core.$strip>>>;
|
|
136
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
totalSuccess: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
totalFailure: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
declare const GenerateUnsubscribeLinkRequest: z.ZodObject<{
|
|
142
|
+
emailAddress: z.ZodString;
|
|
143
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
145
|
+
language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
declare const GenerateUnsubscribeLinkResponse: z.ZodObject<{
|
|
149
|
+
link: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
|
|
152
|
+
export { BulkUpsertEmailSubscriptionRequest, BulkUpsertEmailSubscriptionResponse, GenerateUnsubscribeLinkRequest, GenerateUnsubscribeLinkResponse, QueryEmailSubscriptionsRequest, QueryEmailSubscriptionsResponse, UpsertEmailSubscriptionRequest, UpsertEmailSubscriptionResponse };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// src/emailsubscriptions-v1-emailsubscription-email-subscriptions.schemas.ts
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
var QueryEmailSubscriptionsRequest = z.object({
|
|
4
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
5
|
+
"Filter options.\nCurrently, querying is supported on the `email` field\nwith the `$in` array filter."
|
|
6
|
+
),
|
|
7
|
+
options: z.object({
|
|
8
|
+
paging: z.object({
|
|
9
|
+
limit: z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
|
|
10
|
+
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
11
|
+
}).describe(
|
|
12
|
+
"Pagination options. For more information, see\n[Pagination](https://dev.wix.com/api/rest/getting-started/pagination)."
|
|
13
|
+
).optional()
|
|
14
|
+
}).optional()
|
|
15
|
+
});
|
|
16
|
+
var QueryEmailSubscriptionsResponse = z.object({
|
|
17
|
+
subscriptions: z.array(
|
|
18
|
+
z.object({
|
|
19
|
+
_id: z.string().describe("Email subscription ID.").regex(
|
|
20
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
21
|
+
"Must be a valid GUID"
|
|
22
|
+
).optional().nullable(),
|
|
23
|
+
email: z.string().describe("Email address.").email().optional(),
|
|
24
|
+
subscriptionStatus: z.enum(["UNKNOWN", "NOT_SET", "PENDING", "SUBSCRIBED", "UNSUBSCRIBED"]).describe(
|
|
25
|
+
"Indicates the recipient's opt-in or opt-out status\nfor marketing emails.\n\nDefault: `NOT_SET`."
|
|
26
|
+
).optional(),
|
|
27
|
+
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
28
|
+
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`."
|
|
29
|
+
).optional(),
|
|
30
|
+
_createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
|
|
31
|
+
_updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
|
|
32
|
+
})
|
|
33
|
+
).optional(),
|
|
34
|
+
metadata: z.object({
|
|
35
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
36
|
+
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
37
|
+
total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
|
|
38
|
+
tooManyToCount: z.boolean().describe(
|
|
39
|
+
"Flag that indicates the server failed to calculate the `total` field."
|
|
40
|
+
).optional().nullable()
|
|
41
|
+
}).describe("Metadata for the paginated results.").optional()
|
|
42
|
+
});
|
|
43
|
+
var UpsertEmailSubscriptionRequest = z.object({
|
|
44
|
+
options: z.object({
|
|
45
|
+
subscription: z.object({
|
|
46
|
+
_id: z.string().describe("Email subscription ID.").regex(
|
|
47
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
48
|
+
"Must be a valid GUID"
|
|
49
|
+
).optional().nullable(),
|
|
50
|
+
email: z.string().describe("Email address.").email(),
|
|
51
|
+
subscriptionStatus: z.enum([
|
|
52
|
+
"UNKNOWN",
|
|
53
|
+
"NOT_SET",
|
|
54
|
+
"PENDING",
|
|
55
|
+
"SUBSCRIBED",
|
|
56
|
+
"UNSUBSCRIBED"
|
|
57
|
+
]).optional(),
|
|
58
|
+
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).optional(),
|
|
59
|
+
_createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
|
|
60
|
+
_updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
|
|
61
|
+
}).describe("Email subscription to update or create.").optional()
|
|
62
|
+
}).optional()
|
|
63
|
+
});
|
|
64
|
+
var UpsertEmailSubscriptionResponse = z.object({
|
|
65
|
+
subscription: z.object({
|
|
66
|
+
_id: z.string().describe("Email subscription ID.").regex(
|
|
67
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
68
|
+
"Must be a valid GUID"
|
|
69
|
+
).optional().nullable(),
|
|
70
|
+
email: z.string().describe("Email address.").email().optional(),
|
|
71
|
+
subscriptionStatus: z.enum(["UNKNOWN", "NOT_SET", "PENDING", "SUBSCRIBED", "UNSUBSCRIBED"]).describe(
|
|
72
|
+
"Indicates the recipient's opt-in or opt-out status\nfor marketing emails.\n\nDefault: `NOT_SET`."
|
|
73
|
+
).optional(),
|
|
74
|
+
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).describe(
|
|
75
|
+
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`."
|
|
76
|
+
).optional(),
|
|
77
|
+
_createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
|
|
78
|
+
_updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
|
|
79
|
+
}).describe("Updated or created email subscription.").optional()
|
|
80
|
+
});
|
|
81
|
+
var BulkUpsertEmailSubscriptionRequest = z.object({
|
|
82
|
+
subscriptions: z.array(
|
|
83
|
+
z.object({
|
|
84
|
+
_id: z.string().describe("Email subscription ID.").regex(
|
|
85
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
86
|
+
"Must be a valid GUID"
|
|
87
|
+
).optional().nullable(),
|
|
88
|
+
email: z.string().describe("Email address.").email().optional(),
|
|
89
|
+
subscriptionStatus: z.enum(["UNKNOWN", "NOT_SET", "PENDING", "SUBSCRIBED", "UNSUBSCRIBED"]).optional(),
|
|
90
|
+
deliverabilityStatus: z.enum(["NOT_SET", "VALID", "BOUNCED", "SPAM_COMPLAINT", "INACTIVE"]).optional(),
|
|
91
|
+
_createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
|
|
92
|
+
_updatedDate: z.date().describe("Date and time the email subscription was last updated.").optional().nullable()
|
|
93
|
+
})
|
|
94
|
+
).min(1).max(100)
|
|
95
|
+
});
|
|
96
|
+
var BulkUpsertEmailSubscriptionResponse = z.object({
|
|
97
|
+
results: z.array(
|
|
98
|
+
z.object({
|
|
99
|
+
originalIndex: z.number().int().describe(
|
|
100
|
+
"Position of the requested email subscription in the bulk array."
|
|
101
|
+
).optional(),
|
|
102
|
+
emailSubscription: z.object({
|
|
103
|
+
_id: z.string().describe("Email subscription ID.").regex(
|
|
104
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
105
|
+
"Must be a valid GUID"
|
|
106
|
+
).optional().nullable(),
|
|
107
|
+
email: z.string().describe("Email address.").email().optional(),
|
|
108
|
+
subscriptionStatus: z.enum([
|
|
109
|
+
"UNKNOWN",
|
|
110
|
+
"NOT_SET",
|
|
111
|
+
"PENDING",
|
|
112
|
+
"SUBSCRIBED",
|
|
113
|
+
"UNSUBSCRIBED"
|
|
114
|
+
]).describe(
|
|
115
|
+
"Indicates the recipient's opt-in or opt-out status\nfor marketing emails.\n\nDefault: `NOT_SET`."
|
|
116
|
+
).optional(),
|
|
117
|
+
deliverabilityStatus: z.enum([
|
|
118
|
+
"NOT_SET",
|
|
119
|
+
"VALID",
|
|
120
|
+
"BOUNCED",
|
|
121
|
+
"SPAM_COMPLAINT",
|
|
122
|
+
"INACTIVE"
|
|
123
|
+
]).describe(
|
|
124
|
+
"Indicates last reported status of sent emails.\n\nDefault: `NOT_SET`."
|
|
125
|
+
).optional(),
|
|
126
|
+
_createdDate: z.date().describe("Date and time the email subscription was created.").optional().nullable(),
|
|
127
|
+
_updatedDate: z.date().describe(
|
|
128
|
+
"Date and time the email subscription was last updated."
|
|
129
|
+
).optional().nullable()
|
|
130
|
+
}).describe("New or updated email subscription.").optional(),
|
|
131
|
+
error: z.object({
|
|
132
|
+
errorCode: z.string().describe("Error code.").optional(),
|
|
133
|
+
message: z.string().describe("Message that contains details about the error.").optional()
|
|
134
|
+
}).describe(
|
|
135
|
+
"Error information if the action failed.\nOmitted from successful actions."
|
|
136
|
+
).optional()
|
|
137
|
+
})
|
|
138
|
+
).optional(),
|
|
139
|
+
metadata: z.object({
|
|
140
|
+
totalSuccess: z.number().int().describe("Number of successful actions.").optional(),
|
|
141
|
+
totalFailure: z.number().int().describe("Number of failed actions.").optional()
|
|
142
|
+
}).describe("Numbers of successful and failed actions.").optional()
|
|
143
|
+
});
|
|
144
|
+
var GenerateUnsubscribeLinkRequest = z.object({
|
|
145
|
+
emailAddress: z.string().describe("Email address the unsubscribe link is for.").email(),
|
|
146
|
+
options: z.object({
|
|
147
|
+
metadata: z.record(z.string(), z.string()).describe("Arbitrary parameters for closing-the-loop.").optional(),
|
|
148
|
+
language: z.string().describe(
|
|
149
|
+
"Language for displaying unsubscribe confirmation page.\n\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n\nDefault: `EN`"
|
|
150
|
+
).optional().nullable()
|
|
151
|
+
}).optional()
|
|
152
|
+
});
|
|
153
|
+
var GenerateUnsubscribeLinkResponse = z.object({
|
|
154
|
+
link: z.string().describe("The unsubscribe link.").optional()
|
|
155
|
+
});
|
|
156
|
+
export {
|
|
157
|
+
BulkUpsertEmailSubscriptionRequest,
|
|
158
|
+
BulkUpsertEmailSubscriptionResponse,
|
|
159
|
+
GenerateUnsubscribeLinkRequest,
|
|
160
|
+
GenerateUnsubscribeLinkResponse,
|
|
161
|
+
QueryEmailSubscriptionsRequest,
|
|
162
|
+
QueryEmailSubscriptionsResponse,
|
|
163
|
+
UpsertEmailSubscriptionRequest,
|
|
164
|
+
UpsertEmailSubscriptionResponse
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=schemas.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/emailsubscriptions-v1-emailsubscription-email-subscriptions.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const QueryEmailSubscriptionsRequest = z.object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter options.\\nCurrently, querying is supported on the `email` field\\nwith the `$in` array filter.'\n ),\n options: z\n .object({\n paging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Number of items to load.')\n .min(0)\n .optional()\n .nullable(),\n offset: z\n .number()\n .int()\n .describe('Number of items to skip in the current sort order.')\n .min(0)\n .optional()\n .nullable(),\n })\n .describe(\n 'Pagination options. For more information, see\\n[Pagination](https://dev.wix.com/api/rest/getting-started/pagination).'\n )\n .optional(),\n })\n .optional(),\n});\nexport const QueryEmailSubscriptionsResponse = z.object({\n subscriptions: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum(['UNKNOWN', 'NOT_SET', 'PENDING', 'SUBSCRIBED', 'UNSUBSCRIBED'])\n .describe(\n \"Indicates the recipient's opt-in or opt-out status\\nfor marketing emails.\\n\\nDefault: `NOT_SET`.\"\n )\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .describe(\n 'Indicates last reported status of sent emails.\\n\\nDefault: `NOT_SET`.'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n )\n .optional(),\n metadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in the response.')\n .optional()\n .nullable(),\n offset: z\n .number()\n .int()\n .describe('Offset that was requested.')\n .optional()\n .nullable(),\n total: z\n .number()\n .int()\n .describe('Total number of items that match the query.')\n .optional()\n .nullable(),\n tooManyToCount: z\n .boolean()\n .describe(\n 'Flag that indicates the server failed to calculate the `total` field.'\n )\n .optional()\n .nullable(),\n })\n .describe('Metadata for the paginated results.')\n .optional(),\n});\nexport const UpsertEmailSubscriptionRequest = z.object({\n options: z\n .object({\n subscription: z\n .object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email(),\n subscriptionStatus: z\n .enum([\n 'UNKNOWN',\n 'NOT_SET',\n 'PENDING',\n 'SUBSCRIBED',\n 'UNSUBSCRIBED',\n ])\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n .describe('Email subscription to update or create.')\n .optional(),\n })\n .optional(),\n});\nexport const UpsertEmailSubscriptionResponse = z.object({\n subscription: z\n .object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum(['UNKNOWN', 'NOT_SET', 'PENDING', 'SUBSCRIBED', 'UNSUBSCRIBED'])\n .describe(\n \"Indicates the recipient's opt-in or opt-out status\\nfor marketing emails.\\n\\nDefault: `NOT_SET`.\"\n )\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .describe(\n 'Indicates last reported status of sent emails.\\n\\nDefault: `NOT_SET`.'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n .describe('Updated or created email subscription.')\n .optional(),\n});\nexport const BulkUpsertEmailSubscriptionRequest = z.object({\n subscriptions: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum(['UNKNOWN', 'NOT_SET', 'PENDING', 'SUBSCRIBED', 'UNSUBSCRIBED'])\n .optional(),\n deliverabilityStatus: z\n .enum(['NOT_SET', 'VALID', 'BOUNCED', 'SPAM_COMPLAINT', 'INACTIVE'])\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the email subscription was last updated.')\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(100),\n});\nexport const BulkUpsertEmailSubscriptionResponse = z.object({\n results: z\n .array(\n z.object({\n originalIndex: z\n .number()\n .int()\n .describe(\n 'Position of the requested email subscription in the bulk array.'\n )\n .optional(),\n emailSubscription: z\n .object({\n _id: z\n .string()\n .describe('Email subscription ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n email: z.string().describe('Email address.').email().optional(),\n subscriptionStatus: z\n .enum([\n 'UNKNOWN',\n 'NOT_SET',\n 'PENDING',\n 'SUBSCRIBED',\n 'UNSUBSCRIBED',\n ])\n .describe(\n \"Indicates the recipient's opt-in or opt-out status\\nfor marketing emails.\\n\\nDefault: `NOT_SET`.\"\n )\n .optional(),\n deliverabilityStatus: z\n .enum([\n 'NOT_SET',\n 'VALID',\n 'BOUNCED',\n 'SPAM_COMPLAINT',\n 'INACTIVE',\n ])\n .describe(\n 'Indicates last reported status of sent emails.\\n\\nDefault: `NOT_SET`.'\n )\n .optional(),\n _createdDate: z\n .date()\n .describe('Date and time the email subscription was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the email subscription was last updated.'\n )\n .optional()\n .nullable(),\n })\n .describe('New or updated email subscription.')\n .optional(),\n error: z\n .object({\n errorCode: z.string().describe('Error code.').optional(),\n message: z\n .string()\n .describe('Message that contains details about the error.')\n .optional(),\n })\n .describe(\n 'Error information if the action failed.\\nOmitted from successful actions.'\n )\n .optional(),\n })\n )\n .optional(),\n metadata: z\n .object({\n totalSuccess: z\n .number()\n .int()\n .describe('Number of successful actions.')\n .optional(),\n totalFailure: z\n .number()\n .int()\n .describe('Number of failed actions.')\n .optional(),\n })\n .describe('Numbers of successful and failed actions.')\n .optional(),\n});\nexport const GenerateUnsubscribeLinkRequest = z.object({\n emailAddress: z\n .string()\n .describe('Email address the unsubscribe link is for.')\n .email(),\n options: z\n .object({\n metadata: z\n .record(z.string(), z.string())\n .describe('Arbitrary parameters for closing-the-loop.')\n .optional(),\n language: z\n .string()\n .describe(\n 'Language for displaying unsubscribe confirmation page.\\n\\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\\n\\nDefault: `EN`'\n )\n .optional()\n .nullable(),\n })\n .optional(),\n});\nexport const GenerateUnsubscribeLinkResponse = z.object({\n link: z.string().describe('The unsubscribe link.').optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,iCAAmC,SAAO;AAAA,EACrD,QACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,IACC;AAAA,EACF;AAAA,EACF,SACG,SAAO;AAAA,IACN,QACG,SAAO;AAAA,MACN,OACG,SAAO,EACP,IAAI,EACJ,SAAS,0BAA0B,EACnC,IAAI,CAAC,EACL,SAAS,EACT,SAAS;AAAA,MACZ,QACG,SAAO,EACP,IAAI,EACJ,SAAS,oDAAoD,EAC7D,IAAI,CAAC,EACL,SAAS,EACT,SAAS;AAAA,IACd,CAAC,EACA;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;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AS;AAAA,QACvD,SACG,SAAO,EACP,SAAS,gDAAgD,EACzD,SAAS;AAAA,MACd,CAAC,EACA;AAAA,QACC;AAAA,MACF,EACC,SAAS;AAAA,IACd,CAAC;AAAA,EACH,EACC,SAAS;AAAA,EACZ,UACG,SAAO;AAAA,IACN,cACG,SAAO,EACP,IAAI,EACJ,SAAS,+BAA+B,EACxC,SAAS;AAAA,IACZ,cACG,SAAO,EACP,IAAI,EACJ,SAAS,2BAA2B,EACpC,SAAS;AAAA,EACd,CAAC,EACA,SAAS,2CAA2C,EACpD,SAAS;AACd,CAAC;AACM,IAAM,iCAAmC,SAAO;AAAA,EACrD,cACG,SAAO,EACP,SAAS,4CAA4C,EACrD,MAAM;AAAA,EACT,SACG,SAAO;AAAA,IACN,UACG,SAAS,SAAO,GAAK,SAAO,CAAC,EAC7B,SAAS,4CAA4C,EACrD,SAAS;AAAA,IACZ,UACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,kCAAoC,SAAO;AAAA,EACtD,MAAQ,SAAO,EAAE,SAAS,uBAAuB,EAAE,SAAS;AAC9D,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_email-subscriptions_email-subscriptions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -21,16 +21,23 @@
|
|
|
21
21
|
"import": "./build/es/meta.mjs",
|
|
22
22
|
"require": "./build/cjs/meta.js",
|
|
23
23
|
"types": "./build/es/meta.d.mts"
|
|
24
|
+
},
|
|
25
|
+
"./schemas": {
|
|
26
|
+
"import": "./build/es/schemas.mjs",
|
|
27
|
+
"require": "./build/cjs/schemas.js",
|
|
28
|
+
"types": "./build/es/schemas.d.mts"
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
"files": [
|
|
27
32
|
"build",
|
|
28
33
|
"meta",
|
|
29
|
-
"service-plugins"
|
|
34
|
+
"service-plugins",
|
|
35
|
+
"schemas"
|
|
30
36
|
],
|
|
31
37
|
"dependencies": {
|
|
32
|
-
"@wix/sdk-runtime": "^1.0.
|
|
33
|
-
"@wix/sdk-types": "^1.
|
|
38
|
+
"@wix/sdk-runtime": "^1.0.12",
|
|
39
|
+
"@wix/sdk-types": "^1.17.7",
|
|
40
|
+
"zod": "^4.3.6"
|
|
34
41
|
},
|
|
35
42
|
"devDependencies": {
|
|
36
43
|
"tsup": "^8.4.0",
|
|
@@ -50,5 +57,5 @@
|
|
|
50
57
|
"fqdn": "wix.emailsubscriptions.v1.emailsubscription"
|
|
51
58
|
}
|
|
52
59
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
60
|
+
"falconPackageHash": "9866976e962f1c1bab3a002c9e8ada73d657377cecd81c3f30ebf965"
|
|
54
61
|
}
|