@wix/auto_sdk_members_members 1.0.111 → 1.0.113
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.d.ts +74 -26
- package/build/cjs/index.js +2763 -74
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +10 -2
- package/build/cjs/index.typings.js +2713 -24
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +4 -4
- package/build/es/index.d.mts +74 -26
- package/build/es/index.mjs +2753 -74
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +10 -2
- package/build/es/index.typings.mjs +2703 -24
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +7 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +4 -4
- package/build/internal/cjs/index.d.ts +74 -26
- package/build/internal/cjs/index.js +2763 -74
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +10 -2
- package/build/internal/cjs/index.typings.js +2713 -24
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +7 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +4 -4
- package/build/internal/es/index.d.mts +74 -26
- package/build/internal/es/index.mjs +2753 -74
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +10 -2
- package/build/internal/es/index.typings.mjs +2703 -24
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +7 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +4 -4
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// index.ts
|
|
@@ -875,6 +885,2613 @@ function deleteMemberAddresses(payload) {
|
|
|
875
885
|
|
|
876
886
|
// src/members-v1-member-members.universal.ts
|
|
877
887
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
888
|
+
|
|
889
|
+
// src/members-v1-member-members.schemas.ts
|
|
890
|
+
var z = __toESM(require("zod"));
|
|
891
|
+
var UpdateCurrentMemberSlugRequest = z.object({
|
|
892
|
+
slug: z.string().describe("New slug.").max(255)
|
|
893
|
+
});
|
|
894
|
+
var UpdateCurrentMemberSlugResponse = z.object({
|
|
895
|
+
member: z.object({
|
|
896
|
+
_id: z.string().describe("Member ID.").regex(
|
|
897
|
+
/^[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}$/,
|
|
898
|
+
"Must be a valid GUID"
|
|
899
|
+
).optional().nullable(),
|
|
900
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
901
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
902
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
903
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
904
|
+
/^[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}$/,
|
|
905
|
+
"Must be a valid GUID"
|
|
906
|
+
).optional().nullable(),
|
|
907
|
+
contact: z.object({
|
|
908
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
909
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
910
|
+
phones: z.array(z.string()).optional(),
|
|
911
|
+
emails: z.array(z.string()).optional(),
|
|
912
|
+
addresses: z.array(
|
|
913
|
+
z.intersection(
|
|
914
|
+
z.object({
|
|
915
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
916
|
+
/^[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}$/,
|
|
917
|
+
"Must be a valid GUID"
|
|
918
|
+
).optional().nullable(),
|
|
919
|
+
addressLine2: z.string().describe(
|
|
920
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
921
|
+
).optional().nullable(),
|
|
922
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
923
|
+
subdivision: z.string().describe(
|
|
924
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
925
|
+
).optional().nullable(),
|
|
926
|
+
country: z.string().describe(
|
|
927
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
928
|
+
).optional().nullable(),
|
|
929
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
930
|
+
}),
|
|
931
|
+
z.xor([
|
|
932
|
+
z.object({
|
|
933
|
+
streetAddress: z.never().optional(),
|
|
934
|
+
addressLine: z.never().optional()
|
|
935
|
+
}),
|
|
936
|
+
z.object({
|
|
937
|
+
addressLine: z.never().optional(),
|
|
938
|
+
streetAddress: z.object({
|
|
939
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
940
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
941
|
+
}).describe(
|
|
942
|
+
"Street address object, with number and name in separate fields."
|
|
943
|
+
)
|
|
944
|
+
}),
|
|
945
|
+
z.object({
|
|
946
|
+
streetAddress: z.never().optional(),
|
|
947
|
+
addressLine: z.string().describe(
|
|
948
|
+
"Main address line, usually street and number, as free text."
|
|
949
|
+
).max(200)
|
|
950
|
+
})
|
|
951
|
+
])
|
|
952
|
+
)
|
|
953
|
+
).optional(),
|
|
954
|
+
birthdate: z.string().describe(
|
|
955
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
956
|
+
).max(100).optional().nullable(),
|
|
957
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
958
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
959
|
+
customFields: z.record(
|
|
960
|
+
z.string(),
|
|
961
|
+
z.object({
|
|
962
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
963
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
964
|
+
})
|
|
965
|
+
).describe(
|
|
966
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
967
|
+
).optional()
|
|
968
|
+
}).describe(
|
|
969
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
970
|
+
).optional(),
|
|
971
|
+
profile: z.object({
|
|
972
|
+
nickname: z.string().describe(
|
|
973
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
974
|
+
).optional().nullable(),
|
|
975
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
976
|
+
photo: z.object({
|
|
977
|
+
_id: z.string().describe(
|
|
978
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
979
|
+
).optional(),
|
|
980
|
+
url: z.string().describe("Image URL.").optional(),
|
|
981
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
982
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
983
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
984
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
985
|
+
}).describe("Member's profile photo.").optional(),
|
|
986
|
+
cover: z.object({
|
|
987
|
+
_id: z.string().describe(
|
|
988
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
989
|
+
).optional(),
|
|
990
|
+
url: z.string().describe("Image URL.").optional(),
|
|
991
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
992
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
993
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
994
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
995
|
+
}).describe(
|
|
996
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
997
|
+
).optional(),
|
|
998
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
999
|
+
}).describe("Profile display details.").optional(),
|
|
1000
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1001
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1002
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1003
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1004
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1005
|
+
}).describe("Updated member.").optional()
|
|
1006
|
+
});
|
|
1007
|
+
var UpdateMemberSlugRequest = z.object({
|
|
1008
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1009
|
+
/^[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}$/,
|
|
1010
|
+
"Must be a valid GUID"
|
|
1011
|
+
),
|
|
1012
|
+
slug: z.string().describe("New slug.").max(255)
|
|
1013
|
+
});
|
|
1014
|
+
var UpdateMemberSlugResponse = z.object({
|
|
1015
|
+
member: z.object({
|
|
1016
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1017
|
+
/^[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}$/,
|
|
1018
|
+
"Must be a valid GUID"
|
|
1019
|
+
).optional().nullable(),
|
|
1020
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
1021
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
1022
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
1023
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
1024
|
+
/^[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}$/,
|
|
1025
|
+
"Must be a valid GUID"
|
|
1026
|
+
).optional().nullable(),
|
|
1027
|
+
contact: z.object({
|
|
1028
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
1029
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
1030
|
+
phones: z.array(z.string()).optional(),
|
|
1031
|
+
emails: z.array(z.string()).optional(),
|
|
1032
|
+
addresses: z.array(
|
|
1033
|
+
z.intersection(
|
|
1034
|
+
z.object({
|
|
1035
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
1036
|
+
/^[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}$/,
|
|
1037
|
+
"Must be a valid GUID"
|
|
1038
|
+
).optional().nullable(),
|
|
1039
|
+
addressLine2: z.string().describe(
|
|
1040
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
1041
|
+
).optional().nullable(),
|
|
1042
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1043
|
+
subdivision: z.string().describe(
|
|
1044
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
1045
|
+
).optional().nullable(),
|
|
1046
|
+
country: z.string().describe(
|
|
1047
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1048
|
+
).optional().nullable(),
|
|
1049
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
1050
|
+
}),
|
|
1051
|
+
z.xor([
|
|
1052
|
+
z.object({
|
|
1053
|
+
streetAddress: z.never().optional(),
|
|
1054
|
+
addressLine: z.never().optional()
|
|
1055
|
+
}),
|
|
1056
|
+
z.object({
|
|
1057
|
+
addressLine: z.never().optional(),
|
|
1058
|
+
streetAddress: z.object({
|
|
1059
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
1060
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
1061
|
+
}).describe(
|
|
1062
|
+
"Street address object, with number and name in separate fields."
|
|
1063
|
+
)
|
|
1064
|
+
}),
|
|
1065
|
+
z.object({
|
|
1066
|
+
streetAddress: z.never().optional(),
|
|
1067
|
+
addressLine: z.string().describe(
|
|
1068
|
+
"Main address line, usually street and number, as free text."
|
|
1069
|
+
).max(200)
|
|
1070
|
+
})
|
|
1071
|
+
])
|
|
1072
|
+
)
|
|
1073
|
+
).optional(),
|
|
1074
|
+
birthdate: z.string().describe(
|
|
1075
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
1076
|
+
).max(100).optional().nullable(),
|
|
1077
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
1078
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
1079
|
+
customFields: z.record(
|
|
1080
|
+
z.string(),
|
|
1081
|
+
z.object({
|
|
1082
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
1083
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
1084
|
+
})
|
|
1085
|
+
).describe(
|
|
1086
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
1087
|
+
).optional()
|
|
1088
|
+
}).describe(
|
|
1089
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
1090
|
+
).optional(),
|
|
1091
|
+
profile: z.object({
|
|
1092
|
+
nickname: z.string().describe(
|
|
1093
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
1094
|
+
).optional().nullable(),
|
|
1095
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
1096
|
+
photo: z.object({
|
|
1097
|
+
_id: z.string().describe(
|
|
1098
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1099
|
+
).optional(),
|
|
1100
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1101
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1102
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1103
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1104
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1105
|
+
}).describe("Member's profile photo.").optional(),
|
|
1106
|
+
cover: z.object({
|
|
1107
|
+
_id: z.string().describe(
|
|
1108
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1109
|
+
).optional(),
|
|
1110
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1111
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1112
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1113
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1114
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1115
|
+
}).describe(
|
|
1116
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
1117
|
+
).optional(),
|
|
1118
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
1119
|
+
}).describe("Profile display details.").optional(),
|
|
1120
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1121
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1122
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1123
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1124
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1125
|
+
}).describe("Updated member.").optional()
|
|
1126
|
+
});
|
|
1127
|
+
var JoinCommunityRequest = z.object({});
|
|
1128
|
+
var JoinCommunityResponse = z.object({
|
|
1129
|
+
member: z.object({
|
|
1130
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1131
|
+
/^[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}$/,
|
|
1132
|
+
"Must be a valid GUID"
|
|
1133
|
+
).optional().nullable(),
|
|
1134
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
1135
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
1136
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
1137
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
1138
|
+
/^[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}$/,
|
|
1139
|
+
"Must be a valid GUID"
|
|
1140
|
+
).optional().nullable(),
|
|
1141
|
+
contact: z.object({
|
|
1142
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
1143
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
1144
|
+
phones: z.array(z.string()).optional(),
|
|
1145
|
+
emails: z.array(z.string()).optional(),
|
|
1146
|
+
addresses: z.array(
|
|
1147
|
+
z.intersection(
|
|
1148
|
+
z.object({
|
|
1149
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
1150
|
+
/^[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}$/,
|
|
1151
|
+
"Must be a valid GUID"
|
|
1152
|
+
).optional().nullable(),
|
|
1153
|
+
addressLine2: z.string().describe(
|
|
1154
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
1155
|
+
).optional().nullable(),
|
|
1156
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1157
|
+
subdivision: z.string().describe(
|
|
1158
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
1159
|
+
).optional().nullable(),
|
|
1160
|
+
country: z.string().describe(
|
|
1161
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1162
|
+
).optional().nullable(),
|
|
1163
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
1164
|
+
}),
|
|
1165
|
+
z.xor([
|
|
1166
|
+
z.object({
|
|
1167
|
+
streetAddress: z.never().optional(),
|
|
1168
|
+
addressLine: z.never().optional()
|
|
1169
|
+
}),
|
|
1170
|
+
z.object({
|
|
1171
|
+
addressLine: z.never().optional(),
|
|
1172
|
+
streetAddress: z.object({
|
|
1173
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
1174
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
1175
|
+
}).describe(
|
|
1176
|
+
"Street address object, with number and name in separate fields."
|
|
1177
|
+
)
|
|
1178
|
+
}),
|
|
1179
|
+
z.object({
|
|
1180
|
+
streetAddress: z.never().optional(),
|
|
1181
|
+
addressLine: z.string().describe(
|
|
1182
|
+
"Main address line, usually street and number, as free text."
|
|
1183
|
+
).max(200)
|
|
1184
|
+
})
|
|
1185
|
+
])
|
|
1186
|
+
)
|
|
1187
|
+
).optional(),
|
|
1188
|
+
birthdate: z.string().describe(
|
|
1189
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
1190
|
+
).max(100).optional().nullable(),
|
|
1191
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
1192
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
1193
|
+
customFields: z.record(
|
|
1194
|
+
z.string(),
|
|
1195
|
+
z.object({
|
|
1196
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
1197
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
1198
|
+
})
|
|
1199
|
+
).describe(
|
|
1200
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
1201
|
+
).optional()
|
|
1202
|
+
}).describe(
|
|
1203
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
1204
|
+
).optional(),
|
|
1205
|
+
profile: z.object({
|
|
1206
|
+
nickname: z.string().describe(
|
|
1207
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
1208
|
+
).optional().nullable(),
|
|
1209
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
1210
|
+
photo: z.object({
|
|
1211
|
+
_id: z.string().describe(
|
|
1212
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1213
|
+
).optional(),
|
|
1214
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1215
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1216
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1217
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1218
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1219
|
+
}).describe("Member's profile photo.").optional(),
|
|
1220
|
+
cover: z.object({
|
|
1221
|
+
_id: z.string().describe(
|
|
1222
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1223
|
+
).optional(),
|
|
1224
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1225
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1226
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1227
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1228
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1229
|
+
}).describe(
|
|
1230
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
1231
|
+
).optional(),
|
|
1232
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
1233
|
+
}).describe("Profile display details.").optional(),
|
|
1234
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1235
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1236
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1237
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1238
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1239
|
+
}).describe("The updated member.").optional()
|
|
1240
|
+
});
|
|
1241
|
+
var LeaveCommunityRequest = z.object({});
|
|
1242
|
+
var LeaveCommunityResponse = z.object({
|
|
1243
|
+
member: z.object({
|
|
1244
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1245
|
+
/^[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}$/,
|
|
1246
|
+
"Must be a valid GUID"
|
|
1247
|
+
).optional().nullable(),
|
|
1248
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
1249
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
1250
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
1251
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
1252
|
+
/^[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}$/,
|
|
1253
|
+
"Must be a valid GUID"
|
|
1254
|
+
).optional().nullable(),
|
|
1255
|
+
contact: z.object({
|
|
1256
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
1257
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
1258
|
+
phones: z.array(z.string()).optional(),
|
|
1259
|
+
emails: z.array(z.string()).optional(),
|
|
1260
|
+
addresses: z.array(
|
|
1261
|
+
z.intersection(
|
|
1262
|
+
z.object({
|
|
1263
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
1264
|
+
/^[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}$/,
|
|
1265
|
+
"Must be a valid GUID"
|
|
1266
|
+
).optional().nullable(),
|
|
1267
|
+
addressLine2: z.string().describe(
|
|
1268
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
1269
|
+
).optional().nullable(),
|
|
1270
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1271
|
+
subdivision: z.string().describe(
|
|
1272
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
1273
|
+
).optional().nullable(),
|
|
1274
|
+
country: z.string().describe(
|
|
1275
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1276
|
+
).optional().nullable(),
|
|
1277
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
1278
|
+
}),
|
|
1279
|
+
z.xor([
|
|
1280
|
+
z.object({
|
|
1281
|
+
streetAddress: z.never().optional(),
|
|
1282
|
+
addressLine: z.never().optional()
|
|
1283
|
+
}),
|
|
1284
|
+
z.object({
|
|
1285
|
+
addressLine: z.never().optional(),
|
|
1286
|
+
streetAddress: z.object({
|
|
1287
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
1288
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
1289
|
+
}).describe(
|
|
1290
|
+
"Street address object, with number and name in separate fields."
|
|
1291
|
+
)
|
|
1292
|
+
}),
|
|
1293
|
+
z.object({
|
|
1294
|
+
streetAddress: z.never().optional(),
|
|
1295
|
+
addressLine: z.string().describe(
|
|
1296
|
+
"Main address line, usually street and number, as free text."
|
|
1297
|
+
).max(200)
|
|
1298
|
+
})
|
|
1299
|
+
])
|
|
1300
|
+
)
|
|
1301
|
+
).optional(),
|
|
1302
|
+
birthdate: z.string().describe(
|
|
1303
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
1304
|
+
).max(100).optional().nullable(),
|
|
1305
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
1306
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
1307
|
+
customFields: z.record(
|
|
1308
|
+
z.string(),
|
|
1309
|
+
z.object({
|
|
1310
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
1311
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
1312
|
+
})
|
|
1313
|
+
).describe(
|
|
1314
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
1315
|
+
).optional()
|
|
1316
|
+
}).describe(
|
|
1317
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
1318
|
+
).optional(),
|
|
1319
|
+
profile: z.object({
|
|
1320
|
+
nickname: z.string().describe(
|
|
1321
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
1322
|
+
).optional().nullable(),
|
|
1323
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
1324
|
+
photo: z.object({
|
|
1325
|
+
_id: z.string().describe(
|
|
1326
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1327
|
+
).optional(),
|
|
1328
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1329
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1330
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1331
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1332
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1333
|
+
}).describe("Member's profile photo.").optional(),
|
|
1334
|
+
cover: z.object({
|
|
1335
|
+
_id: z.string().describe(
|
|
1336
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1337
|
+
).optional(),
|
|
1338
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1339
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1340
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1341
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1342
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1343
|
+
}).describe(
|
|
1344
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
1345
|
+
).optional(),
|
|
1346
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
1347
|
+
}).describe("Profile display details.").optional(),
|
|
1348
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1349
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1350
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1351
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1352
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1353
|
+
}).describe("The updated member.").optional()
|
|
1354
|
+
});
|
|
1355
|
+
var GetCurrentMemberRequest = z.object({
|
|
1356
|
+
options: z.object({
|
|
1357
|
+
fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional()
|
|
1358
|
+
}).describe("Fieldset options.").optional()
|
|
1359
|
+
});
|
|
1360
|
+
var GetCurrentMemberResponse = z.object({
|
|
1361
|
+
member: z.object({
|
|
1362
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1363
|
+
/^[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}$/,
|
|
1364
|
+
"Must be a valid GUID"
|
|
1365
|
+
).optional().nullable(),
|
|
1366
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
1367
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
1368
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
1369
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
1370
|
+
/^[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}$/,
|
|
1371
|
+
"Must be a valid GUID"
|
|
1372
|
+
).optional().nullable(),
|
|
1373
|
+
contact: z.object({
|
|
1374
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
1375
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
1376
|
+
phones: z.array(z.string()).optional(),
|
|
1377
|
+
emails: z.array(z.string()).optional(),
|
|
1378
|
+
addresses: z.array(
|
|
1379
|
+
z.intersection(
|
|
1380
|
+
z.object({
|
|
1381
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
1382
|
+
/^[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}$/,
|
|
1383
|
+
"Must be a valid GUID"
|
|
1384
|
+
).optional().nullable(),
|
|
1385
|
+
addressLine2: z.string().describe(
|
|
1386
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
1387
|
+
).optional().nullable(),
|
|
1388
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1389
|
+
subdivision: z.string().describe(
|
|
1390
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
1391
|
+
).optional().nullable(),
|
|
1392
|
+
country: z.string().describe(
|
|
1393
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1394
|
+
).optional().nullable(),
|
|
1395
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
1396
|
+
}),
|
|
1397
|
+
z.xor([
|
|
1398
|
+
z.object({
|
|
1399
|
+
streetAddress: z.never().optional(),
|
|
1400
|
+
addressLine: z.never().optional()
|
|
1401
|
+
}),
|
|
1402
|
+
z.object({
|
|
1403
|
+
addressLine: z.never().optional(),
|
|
1404
|
+
streetAddress: z.object({
|
|
1405
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
1406
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
1407
|
+
}).describe(
|
|
1408
|
+
"Street address object, with number and name in separate fields."
|
|
1409
|
+
)
|
|
1410
|
+
}),
|
|
1411
|
+
z.object({
|
|
1412
|
+
streetAddress: z.never().optional(),
|
|
1413
|
+
addressLine: z.string().describe(
|
|
1414
|
+
"Main address line, usually street and number, as free text."
|
|
1415
|
+
).max(200)
|
|
1416
|
+
})
|
|
1417
|
+
])
|
|
1418
|
+
)
|
|
1419
|
+
).optional(),
|
|
1420
|
+
birthdate: z.string().describe(
|
|
1421
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
1422
|
+
).max(100).optional().nullable(),
|
|
1423
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
1424
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
1425
|
+
customFields: z.record(
|
|
1426
|
+
z.string(),
|
|
1427
|
+
z.object({
|
|
1428
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
1429
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
1430
|
+
})
|
|
1431
|
+
).describe(
|
|
1432
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
1433
|
+
).optional()
|
|
1434
|
+
}).describe(
|
|
1435
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
1436
|
+
).optional(),
|
|
1437
|
+
profile: z.object({
|
|
1438
|
+
nickname: z.string().describe(
|
|
1439
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
1440
|
+
).optional().nullable(),
|
|
1441
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
1442
|
+
photo: z.object({
|
|
1443
|
+
_id: z.string().describe(
|
|
1444
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1445
|
+
).optional(),
|
|
1446
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1447
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1448
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1449
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1450
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1451
|
+
}).describe("Member's profile photo.").optional(),
|
|
1452
|
+
cover: z.object({
|
|
1453
|
+
_id: z.string().describe(
|
|
1454
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1455
|
+
).optional(),
|
|
1456
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1457
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1458
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1459
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1460
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1461
|
+
}).describe(
|
|
1462
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
1463
|
+
).optional(),
|
|
1464
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
1465
|
+
}).describe("Profile display details.").optional(),
|
|
1466
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1467
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1468
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1469
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1470
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1471
|
+
}).describe("The retrieved member.").optional()
|
|
1472
|
+
});
|
|
1473
|
+
var GetMemberRequest = z.object({
|
|
1474
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1475
|
+
/^[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}$/,
|
|
1476
|
+
"Must be a valid GUID"
|
|
1477
|
+
),
|
|
1478
|
+
options: z.object({
|
|
1479
|
+
fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional()
|
|
1480
|
+
}).describe("Fieldset options.").optional()
|
|
1481
|
+
});
|
|
1482
|
+
var GetMemberResponse = z.object({
|
|
1483
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1484
|
+
/^[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}$/,
|
|
1485
|
+
"Must be a valid GUID"
|
|
1486
|
+
).optional().nullable(),
|
|
1487
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
1488
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
1489
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
1490
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
1491
|
+
/^[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}$/,
|
|
1492
|
+
"Must be a valid GUID"
|
|
1493
|
+
).optional().nullable(),
|
|
1494
|
+
contact: z.object({
|
|
1495
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
1496
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
1497
|
+
phones: z.array(z.string()).optional(),
|
|
1498
|
+
emails: z.array(z.string()).optional(),
|
|
1499
|
+
addresses: z.array(
|
|
1500
|
+
z.intersection(
|
|
1501
|
+
z.object({
|
|
1502
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
1503
|
+
/^[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}$/,
|
|
1504
|
+
"Must be a valid GUID"
|
|
1505
|
+
).optional().nullable(),
|
|
1506
|
+
addressLine2: z.string().describe(
|
|
1507
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
1508
|
+
).optional().nullable(),
|
|
1509
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1510
|
+
subdivision: z.string().describe(
|
|
1511
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
1512
|
+
).optional().nullable(),
|
|
1513
|
+
country: z.string().describe(
|
|
1514
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1515
|
+
).optional().nullable(),
|
|
1516
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
1517
|
+
}),
|
|
1518
|
+
z.xor([
|
|
1519
|
+
z.object({
|
|
1520
|
+
streetAddress: z.never().optional(),
|
|
1521
|
+
addressLine: z.never().optional()
|
|
1522
|
+
}),
|
|
1523
|
+
z.object({
|
|
1524
|
+
addressLine: z.never().optional(),
|
|
1525
|
+
streetAddress: z.object({
|
|
1526
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
1527
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
1528
|
+
}).describe(
|
|
1529
|
+
"Street address object, with number and name in separate fields."
|
|
1530
|
+
)
|
|
1531
|
+
}),
|
|
1532
|
+
z.object({
|
|
1533
|
+
streetAddress: z.never().optional(),
|
|
1534
|
+
addressLine: z.string().describe(
|
|
1535
|
+
"Main address line, usually street and number, as free text."
|
|
1536
|
+
).max(200)
|
|
1537
|
+
})
|
|
1538
|
+
])
|
|
1539
|
+
)
|
|
1540
|
+
).optional(),
|
|
1541
|
+
birthdate: z.string().describe(
|
|
1542
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
1543
|
+
).max(100).optional().nullable(),
|
|
1544
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
1545
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
1546
|
+
customFields: z.record(
|
|
1547
|
+
z.string(),
|
|
1548
|
+
z.object({
|
|
1549
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
1550
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
1551
|
+
})
|
|
1552
|
+
).describe(
|
|
1553
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
1554
|
+
).optional()
|
|
1555
|
+
}).describe(
|
|
1556
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
1557
|
+
).optional(),
|
|
1558
|
+
profile: z.object({
|
|
1559
|
+
nickname: z.string().describe(
|
|
1560
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
1561
|
+
).optional().nullable(),
|
|
1562
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
1563
|
+
photo: z.object({
|
|
1564
|
+
_id: z.string().describe(
|
|
1565
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1566
|
+
).optional(),
|
|
1567
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1568
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1569
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1570
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1571
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1572
|
+
}).describe("Member's profile photo.").optional(),
|
|
1573
|
+
cover: z.object({
|
|
1574
|
+
_id: z.string().describe(
|
|
1575
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1576
|
+
).optional(),
|
|
1577
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1578
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1579
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1580
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1581
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1582
|
+
}).describe(
|
|
1583
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
1584
|
+
).optional(),
|
|
1585
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
1586
|
+
}).describe("Profile display details.").optional(),
|
|
1587
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1588
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1589
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1590
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1591
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1592
|
+
});
|
|
1593
|
+
var ListMembersRequest = z.object({
|
|
1594
|
+
options: z.object({
|
|
1595
|
+
paging: z.object({
|
|
1596
|
+
limit: z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
|
|
1597
|
+
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
1598
|
+
}).optional(),
|
|
1599
|
+
fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional(),
|
|
1600
|
+
sorting: z.array(
|
|
1601
|
+
z.object({
|
|
1602
|
+
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
1603
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
1604
|
+
})
|
|
1605
|
+
).optional()
|
|
1606
|
+
}).describe("Options for paging, sorting, and specifying fields to return.").optional()
|
|
1607
|
+
});
|
|
1608
|
+
var ListMembersResponse = z.object({
|
|
1609
|
+
members: z.array(
|
|
1610
|
+
z.object({
|
|
1611
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1612
|
+
/^[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}$/,
|
|
1613
|
+
"Must be a valid GUID"
|
|
1614
|
+
).optional().nullable(),
|
|
1615
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
1616
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
1617
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
1618
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
1619
|
+
/^[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}$/,
|
|
1620
|
+
"Must be a valid GUID"
|
|
1621
|
+
).optional().nullable(),
|
|
1622
|
+
contact: z.object({
|
|
1623
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
1624
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
1625
|
+
phones: z.array(z.string()).optional(),
|
|
1626
|
+
emails: z.array(z.string()).optional(),
|
|
1627
|
+
addresses: z.array(
|
|
1628
|
+
z.intersection(
|
|
1629
|
+
z.object({
|
|
1630
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
1631
|
+
/^[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}$/,
|
|
1632
|
+
"Must be a valid GUID"
|
|
1633
|
+
).optional().nullable(),
|
|
1634
|
+
addressLine2: z.string().describe(
|
|
1635
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
1636
|
+
).optional().nullable(),
|
|
1637
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1638
|
+
subdivision: z.string().describe(
|
|
1639
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
1640
|
+
).optional().nullable(),
|
|
1641
|
+
country: z.string().describe(
|
|
1642
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1643
|
+
).optional().nullable(),
|
|
1644
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
1645
|
+
}),
|
|
1646
|
+
z.xor([
|
|
1647
|
+
z.object({
|
|
1648
|
+
streetAddress: z.never().optional(),
|
|
1649
|
+
addressLine: z.never().optional()
|
|
1650
|
+
}),
|
|
1651
|
+
z.object({
|
|
1652
|
+
addressLine: z.never().optional(),
|
|
1653
|
+
streetAddress: z.object({
|
|
1654
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
1655
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
1656
|
+
}).describe(
|
|
1657
|
+
"Street address object, with number and name in separate fields."
|
|
1658
|
+
)
|
|
1659
|
+
}),
|
|
1660
|
+
z.object({
|
|
1661
|
+
streetAddress: z.never().optional(),
|
|
1662
|
+
addressLine: z.string().describe(
|
|
1663
|
+
"Main address line, usually street and number, as free text."
|
|
1664
|
+
).max(200)
|
|
1665
|
+
})
|
|
1666
|
+
])
|
|
1667
|
+
)
|
|
1668
|
+
).optional(),
|
|
1669
|
+
birthdate: z.string().describe(
|
|
1670
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
1671
|
+
).max(100).optional().nullable(),
|
|
1672
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
1673
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
1674
|
+
customFields: z.record(
|
|
1675
|
+
z.string(),
|
|
1676
|
+
z.object({
|
|
1677
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
1678
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
1679
|
+
})
|
|
1680
|
+
).describe(
|
|
1681
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
1682
|
+
).optional()
|
|
1683
|
+
}).describe(
|
|
1684
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
1685
|
+
).optional(),
|
|
1686
|
+
profile: z.object({
|
|
1687
|
+
nickname: z.string().describe(
|
|
1688
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
1689
|
+
).optional().nullable(),
|
|
1690
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
1691
|
+
photo: z.object({
|
|
1692
|
+
_id: z.string().describe(
|
|
1693
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1694
|
+
).optional(),
|
|
1695
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1696
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1697
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1698
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1699
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1700
|
+
}).describe("Member's profile photo.").optional(),
|
|
1701
|
+
cover: z.object({
|
|
1702
|
+
_id: z.string().describe(
|
|
1703
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1704
|
+
).optional(),
|
|
1705
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1706
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1707
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1708
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1709
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1710
|
+
}).describe(
|
|
1711
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
1712
|
+
).optional(),
|
|
1713
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
1714
|
+
}).describe("Profile display details.").optional(),
|
|
1715
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1716
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1717
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1718
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1719
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1720
|
+
})
|
|
1721
|
+
).optional(),
|
|
1722
|
+
metadata: z.object({
|
|
1723
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
1724
|
+
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
1725
|
+
total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
|
|
1726
|
+
tooManyToCount: z.boolean().describe(
|
|
1727
|
+
"Flag that indicates the server failed to calculate the `total` field."
|
|
1728
|
+
).optional().nullable()
|
|
1729
|
+
}).describe("Metadata for the paginated results.").optional()
|
|
1730
|
+
});
|
|
1731
|
+
var QueryMembersRequest = z.object({
|
|
1732
|
+
query: z.object({
|
|
1733
|
+
filter: z.object({
|
|
1734
|
+
_id: z.object({
|
|
1735
|
+
$eq: z.string(),
|
|
1736
|
+
$exists: z.boolean(),
|
|
1737
|
+
$gt: z.string(),
|
|
1738
|
+
$gte: z.string(),
|
|
1739
|
+
$hasAll: z.array(z.string()),
|
|
1740
|
+
$hasSome: z.array(z.string()),
|
|
1741
|
+
$in: z.array(z.string()),
|
|
1742
|
+
$lt: z.string(),
|
|
1743
|
+
$lte: z.string(),
|
|
1744
|
+
$ne: z.string(),
|
|
1745
|
+
$nin: z.array(z.string()),
|
|
1746
|
+
$startsWith: z.string()
|
|
1747
|
+
}).partial().strict().optional(),
|
|
1748
|
+
"profile.nickname": z.object({
|
|
1749
|
+
$eq: z.string(),
|
|
1750
|
+
$exists: z.boolean(),
|
|
1751
|
+
$gt: z.string(),
|
|
1752
|
+
$gte: z.string(),
|
|
1753
|
+
$hasAll: z.array(z.string()),
|
|
1754
|
+
$hasSome: z.array(z.string()),
|
|
1755
|
+
$in: z.array(z.string()),
|
|
1756
|
+
$lt: z.string(),
|
|
1757
|
+
$lte: z.string(),
|
|
1758
|
+
$ne: z.string(),
|
|
1759
|
+
$nin: z.array(z.string()),
|
|
1760
|
+
$startsWith: z.string()
|
|
1761
|
+
}).partial().strict().optional(),
|
|
1762
|
+
"profile.slug": z.object({
|
|
1763
|
+
$eq: z.string(),
|
|
1764
|
+
$exists: z.boolean(),
|
|
1765
|
+
$gt: z.string(),
|
|
1766
|
+
$gte: z.string(),
|
|
1767
|
+
$hasAll: z.array(z.string()),
|
|
1768
|
+
$hasSome: z.array(z.string()),
|
|
1769
|
+
$in: z.array(z.string()),
|
|
1770
|
+
$lt: z.string(),
|
|
1771
|
+
$lte: z.string(),
|
|
1772
|
+
$ne: z.string(),
|
|
1773
|
+
$nin: z.array(z.string()),
|
|
1774
|
+
$startsWith: z.string()
|
|
1775
|
+
}).partial().strict().optional(),
|
|
1776
|
+
contactId: z.object({
|
|
1777
|
+
$eq: z.string(),
|
|
1778
|
+
$exists: z.boolean(),
|
|
1779
|
+
$gt: z.string(),
|
|
1780
|
+
$gte: z.string(),
|
|
1781
|
+
$hasAll: z.array(z.string()),
|
|
1782
|
+
$hasSome: z.array(z.string()),
|
|
1783
|
+
$in: z.array(z.string()),
|
|
1784
|
+
$lt: z.string(),
|
|
1785
|
+
$lte: z.string(),
|
|
1786
|
+
$ne: z.string(),
|
|
1787
|
+
$nin: z.array(z.string()),
|
|
1788
|
+
$startsWith: z.string()
|
|
1789
|
+
}).partial().strict().optional(),
|
|
1790
|
+
"contact.firstName": z.object({
|
|
1791
|
+
$eq: z.string(),
|
|
1792
|
+
$exists: z.boolean(),
|
|
1793
|
+
$gt: z.string(),
|
|
1794
|
+
$gte: z.string(),
|
|
1795
|
+
$hasAll: z.array(z.string()),
|
|
1796
|
+
$hasSome: z.array(z.string()),
|
|
1797
|
+
$in: z.array(z.string()),
|
|
1798
|
+
$lt: z.string(),
|
|
1799
|
+
$lte: z.string(),
|
|
1800
|
+
$ne: z.string(),
|
|
1801
|
+
$nin: z.array(z.string()),
|
|
1802
|
+
$startsWith: z.string()
|
|
1803
|
+
}).partial().strict().optional(),
|
|
1804
|
+
"contact.lastName": z.object({
|
|
1805
|
+
$eq: z.string(),
|
|
1806
|
+
$exists: z.boolean(),
|
|
1807
|
+
$gt: z.string(),
|
|
1808
|
+
$gte: z.string(),
|
|
1809
|
+
$hasAll: z.array(z.string()),
|
|
1810
|
+
$hasSome: z.array(z.string()),
|
|
1811
|
+
$in: z.array(z.string()),
|
|
1812
|
+
$lt: z.string(),
|
|
1813
|
+
$lte: z.string(),
|
|
1814
|
+
$ne: z.string(),
|
|
1815
|
+
$nin: z.array(z.string()),
|
|
1816
|
+
$startsWith: z.string()
|
|
1817
|
+
}).partial().strict().optional(),
|
|
1818
|
+
privacyStatus: z.object({
|
|
1819
|
+
$eq: z.string(),
|
|
1820
|
+
$exists: z.boolean(),
|
|
1821
|
+
$gt: z.string(),
|
|
1822
|
+
$gte: z.string(),
|
|
1823
|
+
$hasAll: z.array(z.string()),
|
|
1824
|
+
$hasSome: z.array(z.string()),
|
|
1825
|
+
$in: z.array(z.string()),
|
|
1826
|
+
$lt: z.string(),
|
|
1827
|
+
$lte: z.string(),
|
|
1828
|
+
$ne: z.string(),
|
|
1829
|
+
$nin: z.array(z.string()),
|
|
1830
|
+
$startsWith: z.string()
|
|
1831
|
+
}).partial().strict().optional(),
|
|
1832
|
+
loginEmail: z.object({
|
|
1833
|
+
$eq: z.string(),
|
|
1834
|
+
$exists: z.boolean(),
|
|
1835
|
+
$gt: z.string(),
|
|
1836
|
+
$gte: z.string(),
|
|
1837
|
+
$hasAll: z.array(z.string()),
|
|
1838
|
+
$hasSome: z.array(z.string()),
|
|
1839
|
+
$in: z.array(z.string()),
|
|
1840
|
+
$lt: z.string(),
|
|
1841
|
+
$lte: z.string(),
|
|
1842
|
+
$ne: z.string(),
|
|
1843
|
+
$nin: z.array(z.string()),
|
|
1844
|
+
$startsWith: z.string()
|
|
1845
|
+
}).partial().strict().optional(),
|
|
1846
|
+
status: z.object({
|
|
1847
|
+
$eq: z.string(),
|
|
1848
|
+
$exists: z.boolean(),
|
|
1849
|
+
$gt: z.string(),
|
|
1850
|
+
$gte: z.string(),
|
|
1851
|
+
$hasAll: z.array(z.string()),
|
|
1852
|
+
$hasSome: z.array(z.string()),
|
|
1853
|
+
$in: z.array(z.string()),
|
|
1854
|
+
$lt: z.string(),
|
|
1855
|
+
$lte: z.string(),
|
|
1856
|
+
$ne: z.string(),
|
|
1857
|
+
$nin: z.array(z.string()),
|
|
1858
|
+
$startsWith: z.string()
|
|
1859
|
+
}).partial().strict().optional(),
|
|
1860
|
+
$and: z.array(z.any()).optional(),
|
|
1861
|
+
$or: z.array(z.any()).optional(),
|
|
1862
|
+
$not: z.any().optional()
|
|
1863
|
+
}).strict().optional(),
|
|
1864
|
+
sort: z.array(z.object({})).optional()
|
|
1865
|
+
}).catchall(z.any()).describe("Query options."),
|
|
1866
|
+
options: z.object({
|
|
1867
|
+
fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional(),
|
|
1868
|
+
search: z.object({
|
|
1869
|
+
expression: z.string().describe("Search term or expression.").min(1).max(100).optional().nullable(),
|
|
1870
|
+
fields: z.array(z.string()).max(4).optional()
|
|
1871
|
+
}).describe("Plain text search.").optional()
|
|
1872
|
+
}).describe("Query options.").optional()
|
|
1873
|
+
});
|
|
1874
|
+
var QueryMembersResponse = z.object({
|
|
1875
|
+
members: z.array(
|
|
1876
|
+
z.object({
|
|
1877
|
+
_id: z.string().describe("Member ID.").regex(
|
|
1878
|
+
/^[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}$/,
|
|
1879
|
+
"Must be a valid GUID"
|
|
1880
|
+
).optional().nullable(),
|
|
1881
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
1882
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
1883
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
1884
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
1885
|
+
/^[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}$/,
|
|
1886
|
+
"Must be a valid GUID"
|
|
1887
|
+
).optional().nullable(),
|
|
1888
|
+
contact: z.object({
|
|
1889
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
1890
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
1891
|
+
phones: z.array(z.string()).optional(),
|
|
1892
|
+
emails: z.array(z.string()).optional(),
|
|
1893
|
+
addresses: z.array(
|
|
1894
|
+
z.intersection(
|
|
1895
|
+
z.object({
|
|
1896
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
1897
|
+
/^[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}$/,
|
|
1898
|
+
"Must be a valid GUID"
|
|
1899
|
+
).optional().nullable(),
|
|
1900
|
+
addressLine2: z.string().describe(
|
|
1901
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
1902
|
+
).optional().nullable(),
|
|
1903
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
1904
|
+
subdivision: z.string().describe(
|
|
1905
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
1906
|
+
).optional().nullable(),
|
|
1907
|
+
country: z.string().describe(
|
|
1908
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
1909
|
+
).optional().nullable(),
|
|
1910
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
1911
|
+
}),
|
|
1912
|
+
z.xor([
|
|
1913
|
+
z.object({
|
|
1914
|
+
streetAddress: z.never().optional(),
|
|
1915
|
+
addressLine: z.never().optional()
|
|
1916
|
+
}),
|
|
1917
|
+
z.object({
|
|
1918
|
+
addressLine: z.never().optional(),
|
|
1919
|
+
streetAddress: z.object({
|
|
1920
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
1921
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
1922
|
+
}).describe(
|
|
1923
|
+
"Street address object, with number and name in separate fields."
|
|
1924
|
+
)
|
|
1925
|
+
}),
|
|
1926
|
+
z.object({
|
|
1927
|
+
streetAddress: z.never().optional(),
|
|
1928
|
+
addressLine: z.string().describe(
|
|
1929
|
+
"Main address line, usually street and number, as free text."
|
|
1930
|
+
).max(200)
|
|
1931
|
+
})
|
|
1932
|
+
])
|
|
1933
|
+
)
|
|
1934
|
+
).optional(),
|
|
1935
|
+
birthdate: z.string().describe(
|
|
1936
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
1937
|
+
).max(100).optional().nullable(),
|
|
1938
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
1939
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
1940
|
+
customFields: z.record(
|
|
1941
|
+
z.string(),
|
|
1942
|
+
z.object({
|
|
1943
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
1944
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
1945
|
+
})
|
|
1946
|
+
).describe(
|
|
1947
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
1948
|
+
).optional()
|
|
1949
|
+
}).describe(
|
|
1950
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
1951
|
+
).optional(),
|
|
1952
|
+
profile: z.object({
|
|
1953
|
+
nickname: z.string().describe(
|
|
1954
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
1955
|
+
).optional().nullable(),
|
|
1956
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
1957
|
+
photo: z.object({
|
|
1958
|
+
_id: z.string().describe(
|
|
1959
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1960
|
+
).optional(),
|
|
1961
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1962
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1963
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1964
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1965
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1966
|
+
}).describe("Member's profile photo.").optional(),
|
|
1967
|
+
cover: z.object({
|
|
1968
|
+
_id: z.string().describe(
|
|
1969
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
1970
|
+
).optional(),
|
|
1971
|
+
url: z.string().describe("Image URL.").optional(),
|
|
1972
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
1973
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
1974
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
1975
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
1976
|
+
}).describe(
|
|
1977
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
1978
|
+
).optional(),
|
|
1979
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
1980
|
+
}).describe("Profile display details.").optional(),
|
|
1981
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
1982
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
1983
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
1984
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
1985
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
1986
|
+
})
|
|
1987
|
+
).optional(),
|
|
1988
|
+
metadata: z.object({
|
|
1989
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
1990
|
+
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
1991
|
+
total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
|
|
1992
|
+
tooManyToCount: z.boolean().describe(
|
|
1993
|
+
"Flag that indicates the server failed to calculate the `total` field."
|
|
1994
|
+
).optional().nullable()
|
|
1995
|
+
}).describe("Metadata for the paginated results.").optional()
|
|
1996
|
+
});
|
|
1997
|
+
var MuteMemberRequest = z.object({
|
|
1998
|
+
_id: z.string().describe("ID of the member to mute.").regex(
|
|
1999
|
+
/^[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}$/,
|
|
2000
|
+
"Must be a valid GUID"
|
|
2001
|
+
)
|
|
2002
|
+
});
|
|
2003
|
+
var MuteMemberResponse = z.object({
|
|
2004
|
+
member: z.object({
|
|
2005
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2006
|
+
/^[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}$/,
|
|
2007
|
+
"Must be a valid GUID"
|
|
2008
|
+
).optional().nullable(),
|
|
2009
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2010
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2011
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
2012
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2013
|
+
/^[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}$/,
|
|
2014
|
+
"Must be a valid GUID"
|
|
2015
|
+
).optional().nullable(),
|
|
2016
|
+
contact: z.object({
|
|
2017
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2018
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2019
|
+
phones: z.array(z.string()).optional(),
|
|
2020
|
+
emails: z.array(z.string()).optional(),
|
|
2021
|
+
addresses: z.array(
|
|
2022
|
+
z.intersection(
|
|
2023
|
+
z.object({
|
|
2024
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2025
|
+
/^[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}$/,
|
|
2026
|
+
"Must be a valid GUID"
|
|
2027
|
+
).optional().nullable(),
|
|
2028
|
+
addressLine2: z.string().describe(
|
|
2029
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2030
|
+
).optional().nullable(),
|
|
2031
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2032
|
+
subdivision: z.string().describe(
|
|
2033
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2034
|
+
).optional().nullable(),
|
|
2035
|
+
country: z.string().describe(
|
|
2036
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2037
|
+
).optional().nullable(),
|
|
2038
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2039
|
+
}),
|
|
2040
|
+
z.xor([
|
|
2041
|
+
z.object({
|
|
2042
|
+
streetAddress: z.never().optional(),
|
|
2043
|
+
addressLine: z.never().optional()
|
|
2044
|
+
}),
|
|
2045
|
+
z.object({
|
|
2046
|
+
addressLine: z.never().optional(),
|
|
2047
|
+
streetAddress: z.object({
|
|
2048
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2049
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2050
|
+
}).describe(
|
|
2051
|
+
"Street address object, with number and name in separate fields."
|
|
2052
|
+
)
|
|
2053
|
+
}),
|
|
2054
|
+
z.object({
|
|
2055
|
+
streetAddress: z.never().optional(),
|
|
2056
|
+
addressLine: z.string().describe(
|
|
2057
|
+
"Main address line, usually street and number, as free text."
|
|
2058
|
+
).max(200)
|
|
2059
|
+
})
|
|
2060
|
+
])
|
|
2061
|
+
)
|
|
2062
|
+
).optional(),
|
|
2063
|
+
birthdate: z.string().describe(
|
|
2064
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2065
|
+
).max(100).optional().nullable(),
|
|
2066
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2067
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2068
|
+
customFields: z.record(
|
|
2069
|
+
z.string(),
|
|
2070
|
+
z.object({
|
|
2071
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2072
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2073
|
+
})
|
|
2074
|
+
).describe(
|
|
2075
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2076
|
+
).optional()
|
|
2077
|
+
}).describe(
|
|
2078
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2079
|
+
).optional(),
|
|
2080
|
+
profile: z.object({
|
|
2081
|
+
nickname: z.string().describe(
|
|
2082
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2083
|
+
).optional().nullable(),
|
|
2084
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2085
|
+
photo: z.object({
|
|
2086
|
+
_id: z.string().describe(
|
|
2087
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2088
|
+
).optional(),
|
|
2089
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2090
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2091
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2092
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2093
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2094
|
+
}).describe("Member's profile photo.").optional(),
|
|
2095
|
+
cover: z.object({
|
|
2096
|
+
_id: z.string().describe(
|
|
2097
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2098
|
+
).optional(),
|
|
2099
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2100
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2101
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2102
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2103
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2104
|
+
}).describe(
|
|
2105
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
2106
|
+
).optional(),
|
|
2107
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
2108
|
+
}).describe("Profile display details.").optional(),
|
|
2109
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
2110
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
2111
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
2112
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
2113
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
2114
|
+
}).describe("Muted member.").optional()
|
|
2115
|
+
});
|
|
2116
|
+
var UnmuteMemberRequest = z.object({
|
|
2117
|
+
_id: z.string().describe("ID of the member to unmute.").regex(
|
|
2118
|
+
/^[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}$/,
|
|
2119
|
+
"Must be a valid GUID"
|
|
2120
|
+
)
|
|
2121
|
+
});
|
|
2122
|
+
var UnmuteMemberResponse = z.object({
|
|
2123
|
+
member: z.object({
|
|
2124
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2125
|
+
/^[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}$/,
|
|
2126
|
+
"Must be a valid GUID"
|
|
2127
|
+
).optional().nullable(),
|
|
2128
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2129
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2130
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
2131
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2132
|
+
/^[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}$/,
|
|
2133
|
+
"Must be a valid GUID"
|
|
2134
|
+
).optional().nullable(),
|
|
2135
|
+
contact: z.object({
|
|
2136
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2137
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2138
|
+
phones: z.array(z.string()).optional(),
|
|
2139
|
+
emails: z.array(z.string()).optional(),
|
|
2140
|
+
addresses: z.array(
|
|
2141
|
+
z.intersection(
|
|
2142
|
+
z.object({
|
|
2143
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2144
|
+
/^[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}$/,
|
|
2145
|
+
"Must be a valid GUID"
|
|
2146
|
+
).optional().nullable(),
|
|
2147
|
+
addressLine2: z.string().describe(
|
|
2148
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2149
|
+
).optional().nullable(),
|
|
2150
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2151
|
+
subdivision: z.string().describe(
|
|
2152
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2153
|
+
).optional().nullable(),
|
|
2154
|
+
country: z.string().describe(
|
|
2155
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2156
|
+
).optional().nullable(),
|
|
2157
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2158
|
+
}),
|
|
2159
|
+
z.xor([
|
|
2160
|
+
z.object({
|
|
2161
|
+
streetAddress: z.never().optional(),
|
|
2162
|
+
addressLine: z.never().optional()
|
|
2163
|
+
}),
|
|
2164
|
+
z.object({
|
|
2165
|
+
addressLine: z.never().optional(),
|
|
2166
|
+
streetAddress: z.object({
|
|
2167
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2168
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2169
|
+
}).describe(
|
|
2170
|
+
"Street address object, with number and name in separate fields."
|
|
2171
|
+
)
|
|
2172
|
+
}),
|
|
2173
|
+
z.object({
|
|
2174
|
+
streetAddress: z.never().optional(),
|
|
2175
|
+
addressLine: z.string().describe(
|
|
2176
|
+
"Main address line, usually street and number, as free text."
|
|
2177
|
+
).max(200)
|
|
2178
|
+
})
|
|
2179
|
+
])
|
|
2180
|
+
)
|
|
2181
|
+
).optional(),
|
|
2182
|
+
birthdate: z.string().describe(
|
|
2183
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2184
|
+
).max(100).optional().nullable(),
|
|
2185
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2186
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2187
|
+
customFields: z.record(
|
|
2188
|
+
z.string(),
|
|
2189
|
+
z.object({
|
|
2190
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2191
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2192
|
+
})
|
|
2193
|
+
).describe(
|
|
2194
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2195
|
+
).optional()
|
|
2196
|
+
}).describe(
|
|
2197
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2198
|
+
).optional(),
|
|
2199
|
+
profile: z.object({
|
|
2200
|
+
nickname: z.string().describe(
|
|
2201
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2202
|
+
).optional().nullable(),
|
|
2203
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2204
|
+
photo: z.object({
|
|
2205
|
+
_id: z.string().describe(
|
|
2206
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2207
|
+
).optional(),
|
|
2208
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2209
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2210
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2211
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2212
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2213
|
+
}).describe("Member's profile photo.").optional(),
|
|
2214
|
+
cover: z.object({
|
|
2215
|
+
_id: z.string().describe(
|
|
2216
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2217
|
+
).optional(),
|
|
2218
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2219
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2220
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2221
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2222
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2223
|
+
}).describe(
|
|
2224
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
2225
|
+
).optional(),
|
|
2226
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
2227
|
+
}).describe("Profile display details.").optional(),
|
|
2228
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
2229
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
2230
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
2231
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
2232
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
2233
|
+
}).describe("Unmuted member.").optional()
|
|
2234
|
+
});
|
|
2235
|
+
var ApproveMemberRequest = z.object({
|
|
2236
|
+
_id: z.string().describe("ID of the member to approve.").regex(
|
|
2237
|
+
/^[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}$/,
|
|
2238
|
+
"Must be a valid GUID"
|
|
2239
|
+
)
|
|
2240
|
+
});
|
|
2241
|
+
var ApproveMemberResponse = z.object({
|
|
2242
|
+
member: z.object({
|
|
2243
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2244
|
+
/^[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}$/,
|
|
2245
|
+
"Must be a valid GUID"
|
|
2246
|
+
).optional().nullable(),
|
|
2247
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2248
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2249
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
2250
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2251
|
+
/^[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}$/,
|
|
2252
|
+
"Must be a valid GUID"
|
|
2253
|
+
).optional().nullable(),
|
|
2254
|
+
contact: z.object({
|
|
2255
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2256
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2257
|
+
phones: z.array(z.string()).optional(),
|
|
2258
|
+
emails: z.array(z.string()).optional(),
|
|
2259
|
+
addresses: z.array(
|
|
2260
|
+
z.intersection(
|
|
2261
|
+
z.object({
|
|
2262
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2263
|
+
/^[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}$/,
|
|
2264
|
+
"Must be a valid GUID"
|
|
2265
|
+
).optional().nullable(),
|
|
2266
|
+
addressLine2: z.string().describe(
|
|
2267
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2268
|
+
).optional().nullable(),
|
|
2269
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2270
|
+
subdivision: z.string().describe(
|
|
2271
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2272
|
+
).optional().nullable(),
|
|
2273
|
+
country: z.string().describe(
|
|
2274
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2275
|
+
).optional().nullable(),
|
|
2276
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2277
|
+
}),
|
|
2278
|
+
z.xor([
|
|
2279
|
+
z.object({
|
|
2280
|
+
streetAddress: z.never().optional(),
|
|
2281
|
+
addressLine: z.never().optional()
|
|
2282
|
+
}),
|
|
2283
|
+
z.object({
|
|
2284
|
+
addressLine: z.never().optional(),
|
|
2285
|
+
streetAddress: z.object({
|
|
2286
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2287
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2288
|
+
}).describe(
|
|
2289
|
+
"Street address object, with number and name in separate fields."
|
|
2290
|
+
)
|
|
2291
|
+
}),
|
|
2292
|
+
z.object({
|
|
2293
|
+
streetAddress: z.never().optional(),
|
|
2294
|
+
addressLine: z.string().describe(
|
|
2295
|
+
"Main address line, usually street and number, as free text."
|
|
2296
|
+
).max(200)
|
|
2297
|
+
})
|
|
2298
|
+
])
|
|
2299
|
+
)
|
|
2300
|
+
).optional(),
|
|
2301
|
+
birthdate: z.string().describe(
|
|
2302
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2303
|
+
).max(100).optional().nullable(),
|
|
2304
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2305
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2306
|
+
customFields: z.record(
|
|
2307
|
+
z.string(),
|
|
2308
|
+
z.object({
|
|
2309
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2310
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2311
|
+
})
|
|
2312
|
+
).describe(
|
|
2313
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2314
|
+
).optional()
|
|
2315
|
+
}).describe(
|
|
2316
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2317
|
+
).optional(),
|
|
2318
|
+
profile: z.object({
|
|
2319
|
+
nickname: z.string().describe(
|
|
2320
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2321
|
+
).optional().nullable(),
|
|
2322
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2323
|
+
photo: z.object({
|
|
2324
|
+
_id: z.string().describe(
|
|
2325
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2326
|
+
).optional(),
|
|
2327
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2328
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2329
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2330
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2331
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2332
|
+
}).describe("Member's profile photo.").optional(),
|
|
2333
|
+
cover: z.object({
|
|
2334
|
+
_id: z.string().describe(
|
|
2335
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2336
|
+
).optional(),
|
|
2337
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2338
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2339
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2340
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2341
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2342
|
+
}).describe(
|
|
2343
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
2344
|
+
).optional(),
|
|
2345
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
2346
|
+
}).describe("Profile display details.").optional(),
|
|
2347
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
2348
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
2349
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
2350
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
2351
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
2352
|
+
}).describe("Approved member.").optional()
|
|
2353
|
+
});
|
|
2354
|
+
var BlockMemberRequest = z.object({
|
|
2355
|
+
_id: z.string().describe("ID of a member to block.").regex(
|
|
2356
|
+
/^[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}$/,
|
|
2357
|
+
"Must be a valid GUID"
|
|
2358
|
+
)
|
|
2359
|
+
});
|
|
2360
|
+
var BlockMemberResponse = z.object({
|
|
2361
|
+
member: z.object({
|
|
2362
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2363
|
+
/^[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}$/,
|
|
2364
|
+
"Must be a valid GUID"
|
|
2365
|
+
).optional().nullable(),
|
|
2366
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2367
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2368
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
2369
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2370
|
+
/^[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}$/,
|
|
2371
|
+
"Must be a valid GUID"
|
|
2372
|
+
).optional().nullable(),
|
|
2373
|
+
contact: z.object({
|
|
2374
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2375
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2376
|
+
phones: z.array(z.string()).optional(),
|
|
2377
|
+
emails: z.array(z.string()).optional(),
|
|
2378
|
+
addresses: z.array(
|
|
2379
|
+
z.intersection(
|
|
2380
|
+
z.object({
|
|
2381
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2382
|
+
/^[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}$/,
|
|
2383
|
+
"Must be a valid GUID"
|
|
2384
|
+
).optional().nullable(),
|
|
2385
|
+
addressLine2: z.string().describe(
|
|
2386
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2387
|
+
).optional().nullable(),
|
|
2388
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2389
|
+
subdivision: z.string().describe(
|
|
2390
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2391
|
+
).optional().nullable(),
|
|
2392
|
+
country: z.string().describe(
|
|
2393
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2394
|
+
).optional().nullable(),
|
|
2395
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2396
|
+
}),
|
|
2397
|
+
z.xor([
|
|
2398
|
+
z.object({
|
|
2399
|
+
streetAddress: z.never().optional(),
|
|
2400
|
+
addressLine: z.never().optional()
|
|
2401
|
+
}),
|
|
2402
|
+
z.object({
|
|
2403
|
+
addressLine: z.never().optional(),
|
|
2404
|
+
streetAddress: z.object({
|
|
2405
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2406
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2407
|
+
}).describe(
|
|
2408
|
+
"Street address object, with number and name in separate fields."
|
|
2409
|
+
)
|
|
2410
|
+
}),
|
|
2411
|
+
z.object({
|
|
2412
|
+
streetAddress: z.never().optional(),
|
|
2413
|
+
addressLine: z.string().describe(
|
|
2414
|
+
"Main address line, usually street and number, as free text."
|
|
2415
|
+
).max(200)
|
|
2416
|
+
})
|
|
2417
|
+
])
|
|
2418
|
+
)
|
|
2419
|
+
).optional(),
|
|
2420
|
+
birthdate: z.string().describe(
|
|
2421
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2422
|
+
).max(100).optional().nullable(),
|
|
2423
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2424
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2425
|
+
customFields: z.record(
|
|
2426
|
+
z.string(),
|
|
2427
|
+
z.object({
|
|
2428
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2429
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2430
|
+
})
|
|
2431
|
+
).describe(
|
|
2432
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2433
|
+
).optional()
|
|
2434
|
+
}).describe(
|
|
2435
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2436
|
+
).optional(),
|
|
2437
|
+
profile: z.object({
|
|
2438
|
+
nickname: z.string().describe(
|
|
2439
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2440
|
+
).optional().nullable(),
|
|
2441
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2442
|
+
photo: z.object({
|
|
2443
|
+
_id: z.string().describe(
|
|
2444
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2445
|
+
).optional(),
|
|
2446
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2447
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2448
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2449
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2450
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2451
|
+
}).describe("Member's profile photo.").optional(),
|
|
2452
|
+
cover: z.object({
|
|
2453
|
+
_id: z.string().describe(
|
|
2454
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2455
|
+
).optional(),
|
|
2456
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2457
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2458
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2459
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2460
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2461
|
+
}).describe(
|
|
2462
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
2463
|
+
).optional(),
|
|
2464
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
2465
|
+
}).describe("Profile display details.").optional(),
|
|
2466
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
2467
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
2468
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
2469
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
2470
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
2471
|
+
}).describe("Blocked member.").optional()
|
|
2472
|
+
});
|
|
2473
|
+
var DisconnectMemberRequest = z.object({
|
|
2474
|
+
_id: z.string().describe("ID of a member to disconnect.").regex(
|
|
2475
|
+
/^[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}$/,
|
|
2476
|
+
"Must be a valid GUID"
|
|
2477
|
+
)
|
|
2478
|
+
});
|
|
2479
|
+
var DisconnectMemberResponse = z.object({
|
|
2480
|
+
member: z.object({
|
|
2481
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2482
|
+
/^[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}$/,
|
|
2483
|
+
"Must be a valid GUID"
|
|
2484
|
+
).optional().nullable(),
|
|
2485
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2486
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2487
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
2488
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2489
|
+
/^[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}$/,
|
|
2490
|
+
"Must be a valid GUID"
|
|
2491
|
+
).optional().nullable(),
|
|
2492
|
+
contact: z.object({
|
|
2493
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2494
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2495
|
+
phones: z.array(z.string()).optional(),
|
|
2496
|
+
emails: z.array(z.string()).optional(),
|
|
2497
|
+
addresses: z.array(
|
|
2498
|
+
z.intersection(
|
|
2499
|
+
z.object({
|
|
2500
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2501
|
+
/^[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}$/,
|
|
2502
|
+
"Must be a valid GUID"
|
|
2503
|
+
).optional().nullable(),
|
|
2504
|
+
addressLine2: z.string().describe(
|
|
2505
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2506
|
+
).optional().nullable(),
|
|
2507
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2508
|
+
subdivision: z.string().describe(
|
|
2509
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2510
|
+
).optional().nullable(),
|
|
2511
|
+
country: z.string().describe(
|
|
2512
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2513
|
+
).optional().nullable(),
|
|
2514
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2515
|
+
}),
|
|
2516
|
+
z.xor([
|
|
2517
|
+
z.object({
|
|
2518
|
+
streetAddress: z.never().optional(),
|
|
2519
|
+
addressLine: z.never().optional()
|
|
2520
|
+
}),
|
|
2521
|
+
z.object({
|
|
2522
|
+
addressLine: z.never().optional(),
|
|
2523
|
+
streetAddress: z.object({
|
|
2524
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2525
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2526
|
+
}).describe(
|
|
2527
|
+
"Street address object, with number and name in separate fields."
|
|
2528
|
+
)
|
|
2529
|
+
}),
|
|
2530
|
+
z.object({
|
|
2531
|
+
streetAddress: z.never().optional(),
|
|
2532
|
+
addressLine: z.string().describe(
|
|
2533
|
+
"Main address line, usually street and number, as free text."
|
|
2534
|
+
).max(200)
|
|
2535
|
+
})
|
|
2536
|
+
])
|
|
2537
|
+
)
|
|
2538
|
+
).optional(),
|
|
2539
|
+
birthdate: z.string().describe(
|
|
2540
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2541
|
+
).max(100).optional().nullable(),
|
|
2542
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2543
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2544
|
+
customFields: z.record(
|
|
2545
|
+
z.string(),
|
|
2546
|
+
z.object({
|
|
2547
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2548
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2549
|
+
})
|
|
2550
|
+
).describe(
|
|
2551
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2552
|
+
).optional()
|
|
2553
|
+
}).describe(
|
|
2554
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2555
|
+
).optional(),
|
|
2556
|
+
profile: z.object({
|
|
2557
|
+
nickname: z.string().describe(
|
|
2558
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2559
|
+
).optional().nullable(),
|
|
2560
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2561
|
+
photo: z.object({
|
|
2562
|
+
_id: z.string().describe(
|
|
2563
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2564
|
+
).optional(),
|
|
2565
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2566
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2567
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2568
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2569
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2570
|
+
}).describe("Member's profile photo.").optional(),
|
|
2571
|
+
cover: z.object({
|
|
2572
|
+
_id: z.string().describe(
|
|
2573
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2574
|
+
).optional(),
|
|
2575
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2576
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2577
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2578
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2579
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2580
|
+
}).describe(
|
|
2581
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
2582
|
+
).optional(),
|
|
2583
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
2584
|
+
}).describe("Profile display details.").optional(),
|
|
2585
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
2586
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
2587
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
2588
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
2589
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
2590
|
+
}).describe("Disconnected member.").optional()
|
|
2591
|
+
});
|
|
2592
|
+
var DeleteMemberRequest = z.object({
|
|
2593
|
+
_id: z.string().describe("ID of a member to delete.").regex(
|
|
2594
|
+
/^[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}$/,
|
|
2595
|
+
"Must be a valid GUID"
|
|
2596
|
+
)
|
|
2597
|
+
});
|
|
2598
|
+
var DeleteMemberResponse = z.object({});
|
|
2599
|
+
var DeleteMyMemberRequest = z.object({
|
|
2600
|
+
options: z.object({
|
|
2601
|
+
contentAssigneeId: z.string().describe("ID of a member receiving the deleted member's content.").regex(
|
|
2602
|
+
/^[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}$/,
|
|
2603
|
+
"Must be a valid GUID"
|
|
2604
|
+
).optional().nullable()
|
|
2605
|
+
}).optional()
|
|
2606
|
+
});
|
|
2607
|
+
var DeleteMyMemberResponse = z.object({});
|
|
2608
|
+
var BulkDeleteMembersRequest = z.object({
|
|
2609
|
+
memberIds: z.array(z.string()).min(1).max(100)
|
|
2610
|
+
});
|
|
2611
|
+
var BulkDeleteMembersResponse = z.object({
|
|
2612
|
+
results: z.array(
|
|
2613
|
+
z.object({
|
|
2614
|
+
itemMetadata: z.object({
|
|
2615
|
+
_id: z.string().describe(
|
|
2616
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
2617
|
+
).max(255).optional().nullable(),
|
|
2618
|
+
originalIndex: z.number().int().describe(
|
|
2619
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
2620
|
+
).optional(),
|
|
2621
|
+
success: z.boolean().describe(
|
|
2622
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
2623
|
+
).optional(),
|
|
2624
|
+
error: z.object({
|
|
2625
|
+
code: z.string().describe("Error code.").optional(),
|
|
2626
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
2627
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
2628
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
2629
|
+
}).optional()
|
|
2630
|
+
})
|
|
2631
|
+
).optional(),
|
|
2632
|
+
bulkActionMetadata: z.object({
|
|
2633
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
2634
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
2635
|
+
undetailedFailures: z.number().int().describe(
|
|
2636
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
2637
|
+
).optional()
|
|
2638
|
+
}).describe("Bulk action result metadata.").optional()
|
|
2639
|
+
});
|
|
2640
|
+
var BulkDeleteMembersByFilterRequest = z.object({
|
|
2641
|
+
filter: z.any().describe(
|
|
2642
|
+
"Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details."
|
|
2643
|
+
),
|
|
2644
|
+
options: z.object({
|
|
2645
|
+
contentAssigneeId: z.string().describe("ID of a member receiving the deleted member's content.").regex(
|
|
2646
|
+
/^[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}$/,
|
|
2647
|
+
"Must be a valid GUID"
|
|
2648
|
+
).optional().nullable(),
|
|
2649
|
+
search: z.object({
|
|
2650
|
+
expression: z.string().describe("Search term or expression.").min(1).max(100).optional().nullable(),
|
|
2651
|
+
fields: z.array(z.string()).max(4).optional()
|
|
2652
|
+
}).describe("Plain text search.").optional()
|
|
2653
|
+
}).optional()
|
|
2654
|
+
});
|
|
2655
|
+
var BulkDeleteMembersByFilterResponse = z.object({
|
|
2656
|
+
jobId: z.string().describe(
|
|
2657
|
+
"Job ID.\nSpecify this ID when calling [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata."
|
|
2658
|
+
).optional()
|
|
2659
|
+
});
|
|
2660
|
+
var BulkApproveMembersRequest = z.object({
|
|
2661
|
+
filter: z.any().describe(
|
|
2662
|
+
"Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details."
|
|
2663
|
+
)
|
|
2664
|
+
});
|
|
2665
|
+
var BulkApproveMembersResponse = z.object({
|
|
2666
|
+
jobId: z.string().describe(
|
|
2667
|
+
"Job ID.\nSpecify this ID when calling [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata."
|
|
2668
|
+
).optional()
|
|
2669
|
+
});
|
|
2670
|
+
var BulkBlockMembersRequest = z.object({
|
|
2671
|
+
filter: z.any().describe(
|
|
2672
|
+
"Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details."
|
|
2673
|
+
)
|
|
2674
|
+
});
|
|
2675
|
+
var BulkBlockMembersResponse = z.object({
|
|
2676
|
+
jobId: z.string().describe(
|
|
2677
|
+
"Job ID.\nSpecify this ID when calling [Get Async Job](https://dev.wix.com/docs/rest/business-management/async-job/introduction) to retrieve job details and metadata."
|
|
2678
|
+
).optional()
|
|
2679
|
+
});
|
|
2680
|
+
var CreateMemberRequest = z.object({
|
|
2681
|
+
options: z.object({
|
|
2682
|
+
member: z.object({
|
|
2683
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2684
|
+
/^[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}$/,
|
|
2685
|
+
"Must be a valid GUID"
|
|
2686
|
+
).optional().nullable(),
|
|
2687
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2688
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2689
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).optional(),
|
|
2690
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2691
|
+
/^[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}$/,
|
|
2692
|
+
"Must be a valid GUID"
|
|
2693
|
+
).optional().nullable(),
|
|
2694
|
+
contact: z.object({
|
|
2695
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2696
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2697
|
+
phones: z.array(z.string()).optional(),
|
|
2698
|
+
emails: z.array(z.string()).optional(),
|
|
2699
|
+
addresses: z.array(
|
|
2700
|
+
z.intersection(
|
|
2701
|
+
z.object({
|
|
2702
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2703
|
+
/^[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}$/,
|
|
2704
|
+
"Must be a valid GUID"
|
|
2705
|
+
).optional().nullable(),
|
|
2706
|
+
addressLine2: z.string().describe(
|
|
2707
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2708
|
+
).optional().nullable(),
|
|
2709
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2710
|
+
subdivision: z.string().describe(
|
|
2711
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2712
|
+
).optional().nullable(),
|
|
2713
|
+
country: z.string().describe(
|
|
2714
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2715
|
+
).optional().nullable(),
|
|
2716
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2717
|
+
}),
|
|
2718
|
+
z.xor([
|
|
2719
|
+
z.object({
|
|
2720
|
+
streetAddress: z.never().optional(),
|
|
2721
|
+
addressLine: z.never().optional()
|
|
2722
|
+
}),
|
|
2723
|
+
z.object({
|
|
2724
|
+
addressLine: z.never().optional(),
|
|
2725
|
+
streetAddress: z.object({
|
|
2726
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2727
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2728
|
+
}).describe(
|
|
2729
|
+
"Street address object, with number and name in separate fields."
|
|
2730
|
+
)
|
|
2731
|
+
}),
|
|
2732
|
+
z.object({
|
|
2733
|
+
streetAddress: z.never().optional(),
|
|
2734
|
+
addressLine: z.string().describe(
|
|
2735
|
+
"Main address line, usually street and number, as free text."
|
|
2736
|
+
).max(200)
|
|
2737
|
+
})
|
|
2738
|
+
])
|
|
2739
|
+
)
|
|
2740
|
+
).optional(),
|
|
2741
|
+
birthdate: z.string().describe(
|
|
2742
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2743
|
+
).max(100).optional().nullable(),
|
|
2744
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2745
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2746
|
+
customFields: z.record(
|
|
2747
|
+
z.string(),
|
|
2748
|
+
z.object({
|
|
2749
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2750
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2751
|
+
})
|
|
2752
|
+
).describe(
|
|
2753
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2754
|
+
).optional()
|
|
2755
|
+
}).describe(
|
|
2756
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2757
|
+
).optional(),
|
|
2758
|
+
profile: z.object({
|
|
2759
|
+
nickname: z.string().describe(
|
|
2760
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2761
|
+
).optional().nullable(),
|
|
2762
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2763
|
+
photo: z.object({
|
|
2764
|
+
_id: z.string().describe(
|
|
2765
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2766
|
+
).optional(),
|
|
2767
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2768
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2769
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2770
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2771
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2772
|
+
}).describe("Member's profile photo.").optional(),
|
|
2773
|
+
cover: z.object({
|
|
2774
|
+
_id: z.string().describe(
|
|
2775
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2776
|
+
).optional(),
|
|
2777
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2778
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2779
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2780
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2781
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2782
|
+
}).describe(
|
|
2783
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
2784
|
+
).optional(),
|
|
2785
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
2786
|
+
}).describe("Profile display details.").optional(),
|
|
2787
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).optional(),
|
|
2788
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).optional(),
|
|
2789
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
2790
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
2791
|
+
lastLoginDate: z.date().describe(
|
|
2792
|
+
"Date and time when the member last logged in to the site."
|
|
2793
|
+
).optional().nullable()
|
|
2794
|
+
}).describe("Member to create.").optional()
|
|
2795
|
+
}).optional()
|
|
2796
|
+
});
|
|
2797
|
+
var CreateMemberResponse = z.object({
|
|
2798
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2799
|
+
/^[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}$/,
|
|
2800
|
+
"Must be a valid GUID"
|
|
2801
|
+
).optional().nullable(),
|
|
2802
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2803
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2804
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
2805
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2806
|
+
/^[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}$/,
|
|
2807
|
+
"Must be a valid GUID"
|
|
2808
|
+
).optional().nullable(),
|
|
2809
|
+
contact: z.object({
|
|
2810
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2811
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2812
|
+
phones: z.array(z.string()).optional(),
|
|
2813
|
+
emails: z.array(z.string()).optional(),
|
|
2814
|
+
addresses: z.array(
|
|
2815
|
+
z.intersection(
|
|
2816
|
+
z.object({
|
|
2817
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2818
|
+
/^[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}$/,
|
|
2819
|
+
"Must be a valid GUID"
|
|
2820
|
+
).optional().nullable(),
|
|
2821
|
+
addressLine2: z.string().describe(
|
|
2822
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2823
|
+
).optional().nullable(),
|
|
2824
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2825
|
+
subdivision: z.string().describe(
|
|
2826
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2827
|
+
).optional().nullable(),
|
|
2828
|
+
country: z.string().describe(
|
|
2829
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2830
|
+
).optional().nullable(),
|
|
2831
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2832
|
+
}),
|
|
2833
|
+
z.xor([
|
|
2834
|
+
z.object({
|
|
2835
|
+
streetAddress: z.never().optional(),
|
|
2836
|
+
addressLine: z.never().optional()
|
|
2837
|
+
}),
|
|
2838
|
+
z.object({
|
|
2839
|
+
addressLine: z.never().optional(),
|
|
2840
|
+
streetAddress: z.object({
|
|
2841
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2842
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2843
|
+
}).describe(
|
|
2844
|
+
"Street address object, with number and name in separate fields."
|
|
2845
|
+
)
|
|
2846
|
+
}),
|
|
2847
|
+
z.object({
|
|
2848
|
+
streetAddress: z.never().optional(),
|
|
2849
|
+
addressLine: z.string().describe(
|
|
2850
|
+
"Main address line, usually street and number, as free text."
|
|
2851
|
+
).max(200)
|
|
2852
|
+
})
|
|
2853
|
+
])
|
|
2854
|
+
)
|
|
2855
|
+
).optional(),
|
|
2856
|
+
birthdate: z.string().describe(
|
|
2857
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2858
|
+
).max(100).optional().nullable(),
|
|
2859
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2860
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2861
|
+
customFields: z.record(
|
|
2862
|
+
z.string(),
|
|
2863
|
+
z.object({
|
|
2864
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2865
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2866
|
+
})
|
|
2867
|
+
).describe(
|
|
2868
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2869
|
+
).optional()
|
|
2870
|
+
}).describe(
|
|
2871
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2872
|
+
).optional(),
|
|
2873
|
+
profile: z.object({
|
|
2874
|
+
nickname: z.string().describe(
|
|
2875
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2876
|
+
).optional().nullable(),
|
|
2877
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2878
|
+
photo: z.object({
|
|
2879
|
+
_id: z.string().describe(
|
|
2880
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2881
|
+
).optional(),
|
|
2882
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2883
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2884
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2885
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2886
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2887
|
+
}).describe("Member's profile photo.").optional(),
|
|
2888
|
+
cover: z.object({
|
|
2889
|
+
_id: z.string().describe(
|
|
2890
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2891
|
+
).optional(),
|
|
2892
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2893
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
2894
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
2895
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
2896
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
2897
|
+
}).describe(
|
|
2898
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
2899
|
+
).optional(),
|
|
2900
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
2901
|
+
}).describe("Profile display details.").optional(),
|
|
2902
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
2903
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
2904
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
2905
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
2906
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
2907
|
+
});
|
|
2908
|
+
var UpdateMemberRequest = z.object({
|
|
2909
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2910
|
+
/^[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}$/,
|
|
2911
|
+
"Must be a valid GUID"
|
|
2912
|
+
),
|
|
2913
|
+
member: z.object({
|
|
2914
|
+
_id: z.string().describe("Member ID.").regex(
|
|
2915
|
+
/^[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}$/,
|
|
2916
|
+
"Must be a valid GUID"
|
|
2917
|
+
).optional().nullable(),
|
|
2918
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
2919
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
2920
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).optional(),
|
|
2921
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
2922
|
+
/^[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}$/,
|
|
2923
|
+
"Must be a valid GUID"
|
|
2924
|
+
).optional().nullable(),
|
|
2925
|
+
contact: z.object({
|
|
2926
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
2927
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
2928
|
+
phones: z.array(z.string()).optional(),
|
|
2929
|
+
emails: z.array(z.string()).optional(),
|
|
2930
|
+
addresses: z.array(
|
|
2931
|
+
z.intersection(
|
|
2932
|
+
z.object({
|
|
2933
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
2934
|
+
/^[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}$/,
|
|
2935
|
+
"Must be a valid GUID"
|
|
2936
|
+
).optional().nullable(),
|
|
2937
|
+
addressLine2: z.string().describe(
|
|
2938
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
2939
|
+
).optional().nullable(),
|
|
2940
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
2941
|
+
subdivision: z.string().describe(
|
|
2942
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
2943
|
+
).optional().nullable(),
|
|
2944
|
+
country: z.string().describe(
|
|
2945
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
2946
|
+
).optional().nullable(),
|
|
2947
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
2948
|
+
}),
|
|
2949
|
+
z.xor([
|
|
2950
|
+
z.object({
|
|
2951
|
+
streetAddress: z.never().optional(),
|
|
2952
|
+
addressLine: z.never().optional()
|
|
2953
|
+
}),
|
|
2954
|
+
z.object({
|
|
2955
|
+
addressLine: z.never().optional(),
|
|
2956
|
+
streetAddress: z.object({
|
|
2957
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
2958
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
2959
|
+
}).describe(
|
|
2960
|
+
"Street address object, with number and name in separate fields."
|
|
2961
|
+
)
|
|
2962
|
+
}),
|
|
2963
|
+
z.object({
|
|
2964
|
+
streetAddress: z.never().optional(),
|
|
2965
|
+
addressLine: z.string().describe(
|
|
2966
|
+
"Main address line, usually street and number, as free text."
|
|
2967
|
+
).max(200)
|
|
2968
|
+
})
|
|
2969
|
+
])
|
|
2970
|
+
)
|
|
2971
|
+
).optional(),
|
|
2972
|
+
birthdate: z.string().describe(
|
|
2973
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
2974
|
+
).max(100).optional().nullable(),
|
|
2975
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
2976
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
2977
|
+
customFields: z.record(
|
|
2978
|
+
z.string(),
|
|
2979
|
+
z.object({
|
|
2980
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
2981
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
2982
|
+
})
|
|
2983
|
+
).describe(
|
|
2984
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
2985
|
+
).optional()
|
|
2986
|
+
}).describe(
|
|
2987
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
2988
|
+
).optional(),
|
|
2989
|
+
profile: z.object({
|
|
2990
|
+
nickname: z.string().describe(
|
|
2991
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
2992
|
+
).optional().nullable(),
|
|
2993
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
2994
|
+
photo: z.object({
|
|
2995
|
+
_id: z.string().describe(
|
|
2996
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
2997
|
+
).optional(),
|
|
2998
|
+
url: z.string().describe("Image URL.").optional(),
|
|
2999
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3000
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3001
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3002
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3003
|
+
}).describe("Member's profile photo.").optional(),
|
|
3004
|
+
cover: z.object({
|
|
3005
|
+
_id: z.string().describe(
|
|
3006
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3007
|
+
).optional(),
|
|
3008
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3009
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3010
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3011
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3012
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3013
|
+
}).describe(
|
|
3014
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
3015
|
+
).optional(),
|
|
3016
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
3017
|
+
}).describe("Profile display details.").optional(),
|
|
3018
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).optional(),
|
|
3019
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).optional(),
|
|
3020
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
3021
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
3022
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
3023
|
+
}).describe("Member info to update.")
|
|
3024
|
+
});
|
|
3025
|
+
var UpdateMemberResponse = z.object({
|
|
3026
|
+
_id: z.string().describe("Member ID.").regex(
|
|
3027
|
+
/^[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}$/,
|
|
3028
|
+
"Must be a valid GUID"
|
|
3029
|
+
).optional().nullable(),
|
|
3030
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
3031
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
3032
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
3033
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
3034
|
+
/^[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}$/,
|
|
3035
|
+
"Must be a valid GUID"
|
|
3036
|
+
).optional().nullable(),
|
|
3037
|
+
contact: z.object({
|
|
3038
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
3039
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
3040
|
+
phones: z.array(z.string()).optional(),
|
|
3041
|
+
emails: z.array(z.string()).optional(),
|
|
3042
|
+
addresses: z.array(
|
|
3043
|
+
z.intersection(
|
|
3044
|
+
z.object({
|
|
3045
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
3046
|
+
/^[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}$/,
|
|
3047
|
+
"Must be a valid GUID"
|
|
3048
|
+
).optional().nullable(),
|
|
3049
|
+
addressLine2: z.string().describe(
|
|
3050
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
3051
|
+
).optional().nullable(),
|
|
3052
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3053
|
+
subdivision: z.string().describe(
|
|
3054
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
3055
|
+
).optional().nullable(),
|
|
3056
|
+
country: z.string().describe(
|
|
3057
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
3058
|
+
).optional().nullable(),
|
|
3059
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
3060
|
+
}),
|
|
3061
|
+
z.xor([
|
|
3062
|
+
z.object({
|
|
3063
|
+
streetAddress: z.never().optional(),
|
|
3064
|
+
addressLine: z.never().optional()
|
|
3065
|
+
}),
|
|
3066
|
+
z.object({
|
|
3067
|
+
addressLine: z.never().optional(),
|
|
3068
|
+
streetAddress: z.object({
|
|
3069
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
3070
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
3071
|
+
}).describe(
|
|
3072
|
+
"Street address object, with number and name in separate fields."
|
|
3073
|
+
)
|
|
3074
|
+
}),
|
|
3075
|
+
z.object({
|
|
3076
|
+
streetAddress: z.never().optional(),
|
|
3077
|
+
addressLine: z.string().describe(
|
|
3078
|
+
"Main address line, usually street and number, as free text."
|
|
3079
|
+
).max(200)
|
|
3080
|
+
})
|
|
3081
|
+
])
|
|
3082
|
+
)
|
|
3083
|
+
).optional(),
|
|
3084
|
+
birthdate: z.string().describe(
|
|
3085
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
3086
|
+
).max(100).optional().nullable(),
|
|
3087
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
3088
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
3089
|
+
customFields: z.record(
|
|
3090
|
+
z.string(),
|
|
3091
|
+
z.object({
|
|
3092
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
3093
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
3094
|
+
})
|
|
3095
|
+
).describe(
|
|
3096
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
3097
|
+
).optional()
|
|
3098
|
+
}).describe(
|
|
3099
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
3100
|
+
).optional(),
|
|
3101
|
+
profile: z.object({
|
|
3102
|
+
nickname: z.string().describe(
|
|
3103
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
3104
|
+
).optional().nullable(),
|
|
3105
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
3106
|
+
photo: z.object({
|
|
3107
|
+
_id: z.string().describe(
|
|
3108
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3109
|
+
).optional(),
|
|
3110
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3111
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3112
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3113
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3114
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3115
|
+
}).describe("Member's profile photo.").optional(),
|
|
3116
|
+
cover: z.object({
|
|
3117
|
+
_id: z.string().describe(
|
|
3118
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3119
|
+
).optional(),
|
|
3120
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3121
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3122
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3123
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3124
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3125
|
+
}).describe(
|
|
3126
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
3127
|
+
).optional(),
|
|
3128
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
3129
|
+
}).describe("Profile display details.").optional(),
|
|
3130
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
3131
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
3132
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
3133
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
3134
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
3135
|
+
});
|
|
3136
|
+
var DeleteMemberPhonesRequest = z.object({
|
|
3137
|
+
_id: z.string().describe("ID of the member whose phone numbers will be deleted.").regex(
|
|
3138
|
+
/^[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}$/,
|
|
3139
|
+
"Must be a valid GUID"
|
|
3140
|
+
)
|
|
3141
|
+
});
|
|
3142
|
+
var DeleteMemberPhonesResponse = z.object({
|
|
3143
|
+
member: z.object({
|
|
3144
|
+
_id: z.string().describe("Member ID.").regex(
|
|
3145
|
+
/^[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}$/,
|
|
3146
|
+
"Must be a valid GUID"
|
|
3147
|
+
).optional().nullable(),
|
|
3148
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
3149
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
3150
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
3151
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
3152
|
+
/^[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}$/,
|
|
3153
|
+
"Must be a valid GUID"
|
|
3154
|
+
).optional().nullable(),
|
|
3155
|
+
contact: z.object({
|
|
3156
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
3157
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
3158
|
+
phones: z.array(z.string()).optional(),
|
|
3159
|
+
emails: z.array(z.string()).optional(),
|
|
3160
|
+
addresses: z.array(
|
|
3161
|
+
z.intersection(
|
|
3162
|
+
z.object({
|
|
3163
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
3164
|
+
/^[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}$/,
|
|
3165
|
+
"Must be a valid GUID"
|
|
3166
|
+
).optional().nullable(),
|
|
3167
|
+
addressLine2: z.string().describe(
|
|
3168
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
3169
|
+
).optional().nullable(),
|
|
3170
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3171
|
+
subdivision: z.string().describe(
|
|
3172
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
3173
|
+
).optional().nullable(),
|
|
3174
|
+
country: z.string().describe(
|
|
3175
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
3176
|
+
).optional().nullable(),
|
|
3177
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
3178
|
+
}),
|
|
3179
|
+
z.xor([
|
|
3180
|
+
z.object({
|
|
3181
|
+
streetAddress: z.never().optional(),
|
|
3182
|
+
addressLine: z.never().optional()
|
|
3183
|
+
}),
|
|
3184
|
+
z.object({
|
|
3185
|
+
addressLine: z.never().optional(),
|
|
3186
|
+
streetAddress: z.object({
|
|
3187
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
3188
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
3189
|
+
}).describe(
|
|
3190
|
+
"Street address object, with number and name in separate fields."
|
|
3191
|
+
)
|
|
3192
|
+
}),
|
|
3193
|
+
z.object({
|
|
3194
|
+
streetAddress: z.never().optional(),
|
|
3195
|
+
addressLine: z.string().describe(
|
|
3196
|
+
"Main address line, usually street and number, as free text."
|
|
3197
|
+
).max(200)
|
|
3198
|
+
})
|
|
3199
|
+
])
|
|
3200
|
+
)
|
|
3201
|
+
).optional(),
|
|
3202
|
+
birthdate: z.string().describe(
|
|
3203
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
3204
|
+
).max(100).optional().nullable(),
|
|
3205
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
3206
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
3207
|
+
customFields: z.record(
|
|
3208
|
+
z.string(),
|
|
3209
|
+
z.object({
|
|
3210
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
3211
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
3212
|
+
})
|
|
3213
|
+
).describe(
|
|
3214
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
3215
|
+
).optional()
|
|
3216
|
+
}).describe(
|
|
3217
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
3218
|
+
).optional(),
|
|
3219
|
+
profile: z.object({
|
|
3220
|
+
nickname: z.string().describe(
|
|
3221
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
3222
|
+
).optional().nullable(),
|
|
3223
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
3224
|
+
photo: z.object({
|
|
3225
|
+
_id: z.string().describe(
|
|
3226
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3227
|
+
).optional(),
|
|
3228
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3229
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3230
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3231
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3232
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3233
|
+
}).describe("Member's profile photo.").optional(),
|
|
3234
|
+
cover: z.object({
|
|
3235
|
+
_id: z.string().describe(
|
|
3236
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3237
|
+
).optional(),
|
|
3238
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3239
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3240
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3241
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3242
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3243
|
+
}).describe(
|
|
3244
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
3245
|
+
).optional(),
|
|
3246
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
3247
|
+
}).describe("Profile display details.").optional(),
|
|
3248
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
3249
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
3250
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
3251
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
3252
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
3253
|
+
}).describe("Updated member.").optional()
|
|
3254
|
+
});
|
|
3255
|
+
var DeleteMemberEmailsRequest = z.object({
|
|
3256
|
+
_id: z.string().describe("ID of the member whose email addresses will be deleted.").regex(
|
|
3257
|
+
/^[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}$/,
|
|
3258
|
+
"Must be a valid GUID"
|
|
3259
|
+
)
|
|
3260
|
+
});
|
|
3261
|
+
var DeleteMemberEmailsResponse = z.object({
|
|
3262
|
+
member: z.object({
|
|
3263
|
+
_id: z.string().describe("Member ID.").regex(
|
|
3264
|
+
/^[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}$/,
|
|
3265
|
+
"Must be a valid GUID"
|
|
3266
|
+
).optional().nullable(),
|
|
3267
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
3268
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
3269
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
3270
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
3271
|
+
/^[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}$/,
|
|
3272
|
+
"Must be a valid GUID"
|
|
3273
|
+
).optional().nullable(),
|
|
3274
|
+
contact: z.object({
|
|
3275
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
3276
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
3277
|
+
phones: z.array(z.string()).optional(),
|
|
3278
|
+
emails: z.array(z.string()).optional(),
|
|
3279
|
+
addresses: z.array(
|
|
3280
|
+
z.intersection(
|
|
3281
|
+
z.object({
|
|
3282
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
3283
|
+
/^[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}$/,
|
|
3284
|
+
"Must be a valid GUID"
|
|
3285
|
+
).optional().nullable(),
|
|
3286
|
+
addressLine2: z.string().describe(
|
|
3287
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
3288
|
+
).optional().nullable(),
|
|
3289
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3290
|
+
subdivision: z.string().describe(
|
|
3291
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
3292
|
+
).optional().nullable(),
|
|
3293
|
+
country: z.string().describe(
|
|
3294
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
3295
|
+
).optional().nullable(),
|
|
3296
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
3297
|
+
}),
|
|
3298
|
+
z.xor([
|
|
3299
|
+
z.object({
|
|
3300
|
+
streetAddress: z.never().optional(),
|
|
3301
|
+
addressLine: z.never().optional()
|
|
3302
|
+
}),
|
|
3303
|
+
z.object({
|
|
3304
|
+
addressLine: z.never().optional(),
|
|
3305
|
+
streetAddress: z.object({
|
|
3306
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
3307
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
3308
|
+
}).describe(
|
|
3309
|
+
"Street address object, with number and name in separate fields."
|
|
3310
|
+
)
|
|
3311
|
+
}),
|
|
3312
|
+
z.object({
|
|
3313
|
+
streetAddress: z.never().optional(),
|
|
3314
|
+
addressLine: z.string().describe(
|
|
3315
|
+
"Main address line, usually street and number, as free text."
|
|
3316
|
+
).max(200)
|
|
3317
|
+
})
|
|
3318
|
+
])
|
|
3319
|
+
)
|
|
3320
|
+
).optional(),
|
|
3321
|
+
birthdate: z.string().describe(
|
|
3322
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
3323
|
+
).max(100).optional().nullable(),
|
|
3324
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
3325
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
3326
|
+
customFields: z.record(
|
|
3327
|
+
z.string(),
|
|
3328
|
+
z.object({
|
|
3329
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
3330
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
3331
|
+
})
|
|
3332
|
+
).describe(
|
|
3333
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
3334
|
+
).optional()
|
|
3335
|
+
}).describe(
|
|
3336
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
3337
|
+
).optional(),
|
|
3338
|
+
profile: z.object({
|
|
3339
|
+
nickname: z.string().describe(
|
|
3340
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
3341
|
+
).optional().nullable(),
|
|
3342
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
3343
|
+
photo: z.object({
|
|
3344
|
+
_id: z.string().describe(
|
|
3345
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3346
|
+
).optional(),
|
|
3347
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3348
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3349
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3350
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3351
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3352
|
+
}).describe("Member's profile photo.").optional(),
|
|
3353
|
+
cover: z.object({
|
|
3354
|
+
_id: z.string().describe(
|
|
3355
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3356
|
+
).optional(),
|
|
3357
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3358
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3359
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3360
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3361
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3362
|
+
}).describe(
|
|
3363
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
3364
|
+
).optional(),
|
|
3365
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
3366
|
+
}).describe("Profile display details.").optional(),
|
|
3367
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
3368
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
3369
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
3370
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
3371
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
3372
|
+
}).describe("Updated member.").optional()
|
|
3373
|
+
});
|
|
3374
|
+
var DeleteMemberAddressesRequest = z.object({
|
|
3375
|
+
_id: z.string().describe("ID of the member whose street addresses will be deleted.").regex(
|
|
3376
|
+
/^[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}$/,
|
|
3377
|
+
"Must be a valid GUID"
|
|
3378
|
+
)
|
|
3379
|
+
});
|
|
3380
|
+
var DeleteMemberAddressesResponse = z.object({
|
|
3381
|
+
member: z.object({
|
|
3382
|
+
_id: z.string().describe("Member ID.").regex(
|
|
3383
|
+
/^[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}$/,
|
|
3384
|
+
"Must be a valid GUID"
|
|
3385
|
+
).optional().nullable(),
|
|
3386
|
+
loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
|
|
3387
|
+
loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
|
|
3388
|
+
status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
|
|
3389
|
+
contactId: z.string().describe("Contact ID.").regex(
|
|
3390
|
+
/^[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}$/,
|
|
3391
|
+
"Must be a valid GUID"
|
|
3392
|
+
).optional().nullable(),
|
|
3393
|
+
contact: z.object({
|
|
3394
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
3395
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
3396
|
+
phones: z.array(z.string()).optional(),
|
|
3397
|
+
emails: z.array(z.string()).optional(),
|
|
3398
|
+
addresses: z.array(
|
|
3399
|
+
z.intersection(
|
|
3400
|
+
z.object({
|
|
3401
|
+
_id: z.string().describe("Street address ID.").regex(
|
|
3402
|
+
/^[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}$/,
|
|
3403
|
+
"Must be a valid GUID"
|
|
3404
|
+
).optional().nullable(),
|
|
3405
|
+
addressLine2: z.string().describe(
|
|
3406
|
+
"Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
|
|
3407
|
+
).optional().nullable(),
|
|
3408
|
+
city: z.string().describe("City name.").optional().nullable(),
|
|
3409
|
+
subdivision: z.string().describe(
|
|
3410
|
+
"Code for a subdivision (such as state, prefecture, or province) in an\n[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
3411
|
+
).optional().nullable(),
|
|
3412
|
+
country: z.string().describe(
|
|
3413
|
+
"2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
|
|
3414
|
+
).optional().nullable(),
|
|
3415
|
+
postalCode: z.string().describe("Postal code.").optional().nullable()
|
|
3416
|
+
}),
|
|
3417
|
+
z.xor([
|
|
3418
|
+
z.object({
|
|
3419
|
+
streetAddress: z.never().optional(),
|
|
3420
|
+
addressLine: z.never().optional()
|
|
3421
|
+
}),
|
|
3422
|
+
z.object({
|
|
3423
|
+
addressLine: z.never().optional(),
|
|
3424
|
+
streetAddress: z.object({
|
|
3425
|
+
number: z.string().describe("Street number.").max(100).optional(),
|
|
3426
|
+
name: z.string().describe("Street name.").max(200).optional()
|
|
3427
|
+
}).describe(
|
|
3428
|
+
"Street address object, with number and name in separate fields."
|
|
3429
|
+
)
|
|
3430
|
+
}),
|
|
3431
|
+
z.object({
|
|
3432
|
+
streetAddress: z.never().optional(),
|
|
3433
|
+
addressLine: z.string().describe(
|
|
3434
|
+
"Main address line, usually street and number, as free text."
|
|
3435
|
+
).max(200)
|
|
3436
|
+
})
|
|
3437
|
+
])
|
|
3438
|
+
)
|
|
3439
|
+
).optional(),
|
|
3440
|
+
birthdate: z.string().describe(
|
|
3441
|
+
'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
|
|
3442
|
+
).max(100).optional().nullable(),
|
|
3443
|
+
company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
|
|
3444
|
+
jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
|
|
3445
|
+
customFields: z.record(
|
|
3446
|
+
z.string(),
|
|
3447
|
+
z.object({
|
|
3448
|
+
name: z.string().describe("Custom field name.").optional().nullable(),
|
|
3449
|
+
value: z.any().describe("Custom field value.").optional().nullable()
|
|
3450
|
+
})
|
|
3451
|
+
).describe(
|
|
3452
|
+
"Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
|
|
3453
|
+
).optional()
|
|
3454
|
+
}).describe(
|
|
3455
|
+
"Member's contact information. Contact information is stored in the\n[Contact List](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts).\n\nThe full set of contact data can be accessed and managed with the\n[Contacts API](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/introduction)."
|
|
3456
|
+
).optional(),
|
|
3457
|
+
profile: z.object({
|
|
3458
|
+
nickname: z.string().describe(
|
|
3459
|
+
"Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
|
|
3460
|
+
).optional().nullable(),
|
|
3461
|
+
slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
|
|
3462
|
+
photo: z.object({
|
|
3463
|
+
_id: z.string().describe(
|
|
3464
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3465
|
+
).optional(),
|
|
3466
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3467
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3468
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3469
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3470
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3471
|
+
}).describe("Member's profile photo.").optional(),
|
|
3472
|
+
cover: z.object({
|
|
3473
|
+
_id: z.string().describe(
|
|
3474
|
+
"Wix Media image ID,\nset when the member selects an image from Wix Media."
|
|
3475
|
+
).optional(),
|
|
3476
|
+
url: z.string().describe("Image URL.").optional(),
|
|
3477
|
+
height: z.number().int().describe("Original image width.").optional(),
|
|
3478
|
+
width: z.number().int().describe("Original image height.").optional(),
|
|
3479
|
+
offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
|
|
3480
|
+
offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
|
|
3481
|
+
}).describe(
|
|
3482
|
+
"Member's cover photo,\nused as a background picture in a member's profile page.\n\nCover positioning can be altered with `cover.offsetX` and `cover.offsetY`.\nWhen left empty, the values default to `0`."
|
|
3483
|
+
).optional(),
|
|
3484
|
+
title: z.string().describe("Member title.").optional().nullable()
|
|
3485
|
+
}).describe("Profile display details.").optional(),
|
|
3486
|
+
privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
|
|
3487
|
+
activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
|
|
3488
|
+
_createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
|
|
3489
|
+
_updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
|
|
3490
|
+
lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
|
|
3491
|
+
}).describe("Updated member.").optional()
|
|
3492
|
+
});
|
|
3493
|
+
|
|
3494
|
+
// src/members-v1-member-members.universal.ts
|
|
878
3495
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
879
3496
|
var Status = /* @__PURE__ */ ((Status2) => {
|
|
880
3497
|
Status2["UNKNOWN"] = "UNKNOWN";
|
|
@@ -979,7 +3596,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
979
3596
|
return WebhookIdentityType2;
|
|
980
3597
|
})(WebhookIdentityType || {});
|
|
981
3598
|
async function updateCurrentMemberSlug(slug) {
|
|
982
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3599
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3600
|
+
if (validateRequestSchema) {
|
|
3601
|
+
UpdateCurrentMemberSlugRequest.parse({ slug });
|
|
3602
|
+
}
|
|
983
3603
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ slug });
|
|
984
3604
|
const reqOpts = updateMySlug(payload);
|
|
985
3605
|
sideEffects?.onSiteCall?.();
|
|
@@ -1002,7 +3622,10 @@ async function updateCurrentMemberSlug(slug) {
|
|
|
1002
3622
|
}
|
|
1003
3623
|
}
|
|
1004
3624
|
async function updateMemberSlug2(_id, slug) {
|
|
1005
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
3625
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
3626
|
+
if (validateRequestSchema) {
|
|
3627
|
+
UpdateMemberSlugRequest.parse({ _id, slug });
|
|
3628
|
+
}
|
|
1006
3629
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1007
3630
|
id: _id,
|
|
1008
3631
|
slug
|
|
@@ -1028,7 +3651,10 @@ async function updateMemberSlug2(_id, slug) {
|
|
|
1028
3651
|
}
|
|
1029
3652
|
}
|
|
1030
3653
|
async function joinCommunity2() {
|
|
1031
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
3654
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[0];
|
|
3655
|
+
if (validateRequestSchema) {
|
|
3656
|
+
JoinCommunityRequest.parse({});
|
|
3657
|
+
}
|
|
1032
3658
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
1033
3659
|
const reqOpts = joinCommunity(payload);
|
|
1034
3660
|
sideEffects?.onSiteCall?.();
|
|
@@ -1051,7 +3677,10 @@ async function joinCommunity2() {
|
|
|
1051
3677
|
}
|
|
1052
3678
|
}
|
|
1053
3679
|
async function leaveCommunity2() {
|
|
1054
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
3680
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[0];
|
|
3681
|
+
if (validateRequestSchema) {
|
|
3682
|
+
LeaveCommunityRequest.parse({});
|
|
3683
|
+
}
|
|
1055
3684
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
1056
3685
|
const reqOpts = leaveCommunity(payload);
|
|
1057
3686
|
sideEffects?.onSiteCall?.();
|
|
@@ -1074,7 +3703,10 @@ async function leaveCommunity2() {
|
|
|
1074
3703
|
}
|
|
1075
3704
|
}
|
|
1076
3705
|
async function getCurrentMember(options) {
|
|
1077
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3706
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3707
|
+
if (validateRequestSchema) {
|
|
3708
|
+
GetCurrentMemberRequest.parse({ options });
|
|
3709
|
+
}
|
|
1078
3710
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1079
3711
|
fieldsets: options?.fieldsets
|
|
1080
3712
|
});
|
|
@@ -1099,7 +3731,10 @@ async function getCurrentMember(options) {
|
|
|
1099
3731
|
}
|
|
1100
3732
|
}
|
|
1101
3733
|
async function getMember2(_id, options) {
|
|
1102
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
3734
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
3735
|
+
if (validateRequestSchema) {
|
|
3736
|
+
GetMemberRequest.parse({ _id, options });
|
|
3737
|
+
}
|
|
1103
3738
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1104
3739
|
id: _id,
|
|
1105
3740
|
fieldsets: options?.fieldsets
|
|
@@ -1125,7 +3760,10 @@ async function getMember2(_id, options) {
|
|
|
1125
3760
|
}
|
|
1126
3761
|
}
|
|
1127
3762
|
async function listMembers2(options) {
|
|
1128
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3763
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3764
|
+
if (validateRequestSchema) {
|
|
3765
|
+
ListMembersRequest.parse({ options });
|
|
3766
|
+
}
|
|
1129
3767
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1130
3768
|
paging: options?.paging,
|
|
1131
3769
|
fieldsets: options?.fieldsets,
|
|
@@ -1202,7 +3840,10 @@ function queryMembers2(options) {
|
|
|
1202
3840
|
});
|
|
1203
3841
|
}
|
|
1204
3842
|
async function typedQueryMembers(query, options) {
|
|
1205
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
3843
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
3844
|
+
if (validateRequestSchema) {
|
|
3845
|
+
QueryMembersRequest.parse({ query, options });
|
|
3846
|
+
}
|
|
1206
3847
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1207
3848
|
query,
|
|
1208
3849
|
...options
|
|
@@ -1233,7 +3874,10 @@ var utils = {
|
|
|
1233
3874
|
}
|
|
1234
3875
|
};
|
|
1235
3876
|
async function muteMember2(_id) {
|
|
1236
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3877
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3878
|
+
if (validateRequestSchema) {
|
|
3879
|
+
MuteMemberRequest.parse({ _id });
|
|
3880
|
+
}
|
|
1237
3881
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1238
3882
|
const reqOpts = muteMember(payload);
|
|
1239
3883
|
sideEffects?.onSiteCall?.();
|
|
@@ -1256,7 +3900,10 @@ async function muteMember2(_id) {
|
|
|
1256
3900
|
}
|
|
1257
3901
|
}
|
|
1258
3902
|
async function unmuteMember2(_id) {
|
|
1259
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3903
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3904
|
+
if (validateRequestSchema) {
|
|
3905
|
+
UnmuteMemberRequest.parse({ _id });
|
|
3906
|
+
}
|
|
1260
3907
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1261
3908
|
const reqOpts = unmuteMember(payload);
|
|
1262
3909
|
sideEffects?.onSiteCall?.();
|
|
@@ -1279,7 +3926,10 @@ async function unmuteMember2(_id) {
|
|
|
1279
3926
|
}
|
|
1280
3927
|
}
|
|
1281
3928
|
async function approveMember2(_id) {
|
|
1282
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3929
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3930
|
+
if (validateRequestSchema) {
|
|
3931
|
+
ApproveMemberRequest.parse({ _id });
|
|
3932
|
+
}
|
|
1283
3933
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1284
3934
|
const reqOpts = approveMember(payload);
|
|
1285
3935
|
sideEffects?.onSiteCall?.();
|
|
@@ -1302,7 +3952,10 @@ async function approveMember2(_id) {
|
|
|
1302
3952
|
}
|
|
1303
3953
|
}
|
|
1304
3954
|
async function blockMember2(_id) {
|
|
1305
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3955
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3956
|
+
if (validateRequestSchema) {
|
|
3957
|
+
BlockMemberRequest.parse({ _id });
|
|
3958
|
+
}
|
|
1306
3959
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1307
3960
|
const reqOpts = blockMember(payload);
|
|
1308
3961
|
sideEffects?.onSiteCall?.();
|
|
@@ -1325,7 +3978,10 @@ async function blockMember2(_id) {
|
|
|
1325
3978
|
}
|
|
1326
3979
|
}
|
|
1327
3980
|
async function disconnectMember2(_id) {
|
|
1328
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
3981
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
3982
|
+
if (validateRequestSchema) {
|
|
3983
|
+
DisconnectMemberRequest.parse({ _id });
|
|
3984
|
+
}
|
|
1329
3985
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1330
3986
|
const reqOpts = disconnectMember(payload);
|
|
1331
3987
|
sideEffects?.onSiteCall?.();
|
|
@@ -1348,7 +4004,10 @@ async function disconnectMember2(_id) {
|
|
|
1348
4004
|
}
|
|
1349
4005
|
}
|
|
1350
4006
|
async function deleteMember2(_id) {
|
|
1351
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4007
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4008
|
+
if (validateRequestSchema) {
|
|
4009
|
+
DeleteMemberRequest.parse({ _id });
|
|
4010
|
+
}
|
|
1352
4011
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1353
4012
|
const reqOpts = deleteMember(payload);
|
|
1354
4013
|
sideEffects?.onSiteCall?.();
|
|
@@ -1371,7 +4030,10 @@ async function deleteMember2(_id) {
|
|
|
1371
4030
|
}
|
|
1372
4031
|
}
|
|
1373
4032
|
async function deleteMyMember2(options) {
|
|
1374
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4033
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4034
|
+
if (validateRequestSchema) {
|
|
4035
|
+
DeleteMyMemberRequest.parse({ options });
|
|
4036
|
+
}
|
|
1375
4037
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1376
4038
|
contentAssigneeId: options?.contentAssigneeId
|
|
1377
4039
|
});
|
|
@@ -1398,7 +4060,10 @@ async function deleteMyMember2(options) {
|
|
|
1398
4060
|
}
|
|
1399
4061
|
}
|
|
1400
4062
|
async function bulkDeleteMembers2(memberIds) {
|
|
1401
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4063
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4064
|
+
if (validateRequestSchema) {
|
|
4065
|
+
BulkDeleteMembersRequest.parse({ memberIds });
|
|
4066
|
+
}
|
|
1402
4067
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1403
4068
|
memberIds
|
|
1404
4069
|
});
|
|
@@ -1423,7 +4088,10 @@ async function bulkDeleteMembers2(memberIds) {
|
|
|
1423
4088
|
}
|
|
1424
4089
|
}
|
|
1425
4090
|
async function bulkDeleteMembersByFilter2(filter, options) {
|
|
1426
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
4091
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
4092
|
+
if (validateRequestSchema) {
|
|
4093
|
+
BulkDeleteMembersByFilterRequest.parse({ filter, options });
|
|
4094
|
+
}
|
|
1427
4095
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1428
4096
|
filter,
|
|
1429
4097
|
contentAssigneeId: options?.contentAssigneeId,
|
|
@@ -1454,7 +4122,10 @@ async function bulkDeleteMembersByFilter2(filter, options) {
|
|
|
1454
4122
|
}
|
|
1455
4123
|
}
|
|
1456
4124
|
async function bulkApproveMembers2(filter) {
|
|
1457
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4125
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4126
|
+
if (validateRequestSchema) {
|
|
4127
|
+
BulkApproveMembersRequest.parse({ filter });
|
|
4128
|
+
}
|
|
1458
4129
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ filter });
|
|
1459
4130
|
const reqOpts = bulkApproveMembers(payload);
|
|
1460
4131
|
sideEffects?.onSiteCall?.();
|
|
@@ -1477,7 +4148,10 @@ async function bulkApproveMembers2(filter) {
|
|
|
1477
4148
|
}
|
|
1478
4149
|
}
|
|
1479
4150
|
async function bulkBlockMembers2(filter) {
|
|
1480
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4151
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4152
|
+
if (validateRequestSchema) {
|
|
4153
|
+
BulkBlockMembersRequest.parse({ filter });
|
|
4154
|
+
}
|
|
1481
4155
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ filter });
|
|
1482
4156
|
const reqOpts = bulkBlockMembers(payload);
|
|
1483
4157
|
sideEffects?.onSiteCall?.();
|
|
@@ -1500,7 +4174,10 @@ async function bulkBlockMembers2(filter) {
|
|
|
1500
4174
|
}
|
|
1501
4175
|
}
|
|
1502
4176
|
async function createMember2(options) {
|
|
1503
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4177
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4178
|
+
if (validateRequestSchema) {
|
|
4179
|
+
CreateMemberRequest.parse({ options });
|
|
4180
|
+
}
|
|
1504
4181
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1505
4182
|
member: options?.member
|
|
1506
4183
|
});
|
|
@@ -1525,7 +4202,10 @@ async function createMember2(options) {
|
|
|
1525
4202
|
}
|
|
1526
4203
|
}
|
|
1527
4204
|
async function updateMember2(_id, member) {
|
|
1528
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
4205
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
4206
|
+
if (validateRequestSchema) {
|
|
4207
|
+
UpdateMemberRequest.parse({ _id, member });
|
|
4208
|
+
}
|
|
1529
4209
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1530
4210
|
member: { ...member, id: _id }
|
|
1531
4211
|
});
|
|
@@ -1550,7 +4230,10 @@ async function updateMember2(_id, member) {
|
|
|
1550
4230
|
}
|
|
1551
4231
|
}
|
|
1552
4232
|
async function deleteMemberPhones2(_id) {
|
|
1553
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4233
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4234
|
+
if (validateRequestSchema) {
|
|
4235
|
+
DeleteMemberPhonesRequest.parse({ _id });
|
|
4236
|
+
}
|
|
1554
4237
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1555
4238
|
const reqOpts = deleteMemberPhones(payload);
|
|
1556
4239
|
sideEffects?.onSiteCall?.();
|
|
@@ -1573,7 +4256,10 @@ async function deleteMemberPhones2(_id) {
|
|
|
1573
4256
|
}
|
|
1574
4257
|
}
|
|
1575
4258
|
async function deleteMemberEmails2(_id) {
|
|
1576
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4259
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4260
|
+
if (validateRequestSchema) {
|
|
4261
|
+
DeleteMemberEmailsRequest.parse({ _id });
|
|
4262
|
+
}
|
|
1577
4263
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1578
4264
|
const reqOpts = deleteMemberEmails(payload);
|
|
1579
4265
|
sideEffects?.onSiteCall?.();
|
|
@@ -1596,7 +4282,10 @@ async function deleteMemberEmails2(_id) {
|
|
|
1596
4282
|
}
|
|
1597
4283
|
}
|
|
1598
4284
|
async function deleteMemberAddresses2(_id) {
|
|
1599
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
4285
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
4286
|
+
if (validateRequestSchema) {
|
|
4287
|
+
DeleteMemberAddressesRequest.parse({ _id });
|
|
4288
|
+
}
|
|
1600
4289
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1601
4290
|
const reqOpts = deleteMemberAddresses(payload);
|
|
1602
4291
|
sideEffects?.onSiteCall?.();
|
|
@@ -1620,182 +4309,182 @@ async function deleteMemberAddresses2(_id) {
|
|
|
1620
4309
|
}
|
|
1621
4310
|
|
|
1622
4311
|
// src/members-v1-member-members.public.ts
|
|
1623
|
-
function updateCurrentMemberSlug2(httpClient) {
|
|
4312
|
+
function updateCurrentMemberSlug2(httpClient, __options) {
|
|
1624
4313
|
return (slug) => updateCurrentMemberSlug(
|
|
1625
4314
|
slug,
|
|
1626
4315
|
// @ts-ignore
|
|
1627
|
-
{ httpClient }
|
|
4316
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1628
4317
|
);
|
|
1629
4318
|
}
|
|
1630
|
-
function updateMemberSlug3(httpClient) {
|
|
4319
|
+
function updateMemberSlug3(httpClient, __options) {
|
|
1631
4320
|
return (_id, slug) => updateMemberSlug2(
|
|
1632
4321
|
_id,
|
|
1633
4322
|
slug,
|
|
1634
4323
|
// @ts-ignore
|
|
1635
|
-
{ httpClient }
|
|
4324
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1636
4325
|
);
|
|
1637
4326
|
}
|
|
1638
|
-
function joinCommunity3(httpClient) {
|
|
4327
|
+
function joinCommunity3(httpClient, __options) {
|
|
1639
4328
|
return () => joinCommunity2(
|
|
1640
4329
|
// @ts-ignore
|
|
1641
|
-
{ httpClient }
|
|
4330
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1642
4331
|
);
|
|
1643
4332
|
}
|
|
1644
|
-
function leaveCommunity3(httpClient) {
|
|
4333
|
+
function leaveCommunity3(httpClient, __options) {
|
|
1645
4334
|
return () => leaveCommunity2(
|
|
1646
4335
|
// @ts-ignore
|
|
1647
|
-
{ httpClient }
|
|
4336
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1648
4337
|
);
|
|
1649
4338
|
}
|
|
1650
|
-
function getCurrentMember2(httpClient) {
|
|
4339
|
+
function getCurrentMember2(httpClient, __options) {
|
|
1651
4340
|
return (options) => getCurrentMember(
|
|
1652
4341
|
options,
|
|
1653
4342
|
// @ts-ignore
|
|
1654
|
-
{ httpClient }
|
|
4343
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1655
4344
|
);
|
|
1656
4345
|
}
|
|
1657
|
-
function getMember3(httpClient) {
|
|
4346
|
+
function getMember3(httpClient, __options) {
|
|
1658
4347
|
return (_id, options) => getMember2(
|
|
1659
4348
|
_id,
|
|
1660
4349
|
options,
|
|
1661
4350
|
// @ts-ignore
|
|
1662
|
-
{ httpClient }
|
|
4351
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1663
4352
|
);
|
|
1664
4353
|
}
|
|
1665
|
-
function listMembers3(httpClient) {
|
|
4354
|
+
function listMembers3(httpClient, __options) {
|
|
1666
4355
|
return (options) => listMembers2(
|
|
1667
4356
|
options,
|
|
1668
4357
|
// @ts-ignore
|
|
1669
|
-
{ httpClient }
|
|
4358
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1670
4359
|
);
|
|
1671
4360
|
}
|
|
1672
|
-
function queryMembers3(httpClient) {
|
|
4361
|
+
function queryMembers3(httpClient, __options) {
|
|
1673
4362
|
return (options) => queryMembers2(
|
|
1674
4363
|
options,
|
|
1675
4364
|
// @ts-ignore
|
|
1676
|
-
{ httpClient }
|
|
4365
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1677
4366
|
);
|
|
1678
4367
|
}
|
|
1679
|
-
function typedQueryMembers2(httpClient) {
|
|
4368
|
+
function typedQueryMembers2(httpClient, __options) {
|
|
1680
4369
|
return (query, options) => typedQueryMembers(
|
|
1681
4370
|
query,
|
|
1682
4371
|
options,
|
|
1683
4372
|
// @ts-ignore
|
|
1684
|
-
{ httpClient }
|
|
4373
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1685
4374
|
);
|
|
1686
4375
|
}
|
|
1687
|
-
function muteMember3(httpClient) {
|
|
4376
|
+
function muteMember3(httpClient, __options) {
|
|
1688
4377
|
return (_id) => muteMember2(
|
|
1689
4378
|
_id,
|
|
1690
4379
|
// @ts-ignore
|
|
1691
|
-
{ httpClient }
|
|
4380
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1692
4381
|
);
|
|
1693
4382
|
}
|
|
1694
|
-
function unmuteMember3(httpClient) {
|
|
4383
|
+
function unmuteMember3(httpClient, __options) {
|
|
1695
4384
|
return (_id) => unmuteMember2(
|
|
1696
4385
|
_id,
|
|
1697
4386
|
// @ts-ignore
|
|
1698
|
-
{ httpClient }
|
|
4387
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1699
4388
|
);
|
|
1700
4389
|
}
|
|
1701
|
-
function approveMember3(httpClient) {
|
|
4390
|
+
function approveMember3(httpClient, __options) {
|
|
1702
4391
|
return (_id) => approveMember2(
|
|
1703
4392
|
_id,
|
|
1704
4393
|
// @ts-ignore
|
|
1705
|
-
{ httpClient }
|
|
4394
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1706
4395
|
);
|
|
1707
4396
|
}
|
|
1708
|
-
function blockMember3(httpClient) {
|
|
4397
|
+
function blockMember3(httpClient, __options) {
|
|
1709
4398
|
return (_id) => blockMember2(
|
|
1710
4399
|
_id,
|
|
1711
4400
|
// @ts-ignore
|
|
1712
|
-
{ httpClient }
|
|
4401
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1713
4402
|
);
|
|
1714
4403
|
}
|
|
1715
|
-
function disconnectMember3(httpClient) {
|
|
4404
|
+
function disconnectMember3(httpClient, __options) {
|
|
1716
4405
|
return (_id) => disconnectMember2(
|
|
1717
4406
|
_id,
|
|
1718
4407
|
// @ts-ignore
|
|
1719
|
-
{ httpClient }
|
|
4408
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1720
4409
|
);
|
|
1721
4410
|
}
|
|
1722
|
-
function deleteMember3(httpClient) {
|
|
4411
|
+
function deleteMember3(httpClient, __options) {
|
|
1723
4412
|
return (_id) => deleteMember2(
|
|
1724
4413
|
_id,
|
|
1725
4414
|
// @ts-ignore
|
|
1726
|
-
{ httpClient }
|
|
4415
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1727
4416
|
);
|
|
1728
4417
|
}
|
|
1729
|
-
function deleteMyMember3(httpClient) {
|
|
4418
|
+
function deleteMyMember3(httpClient, __options) {
|
|
1730
4419
|
return (options) => deleteMyMember2(
|
|
1731
4420
|
options,
|
|
1732
4421
|
// @ts-ignore
|
|
1733
|
-
{ httpClient }
|
|
4422
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1734
4423
|
);
|
|
1735
4424
|
}
|
|
1736
|
-
function bulkDeleteMembers3(httpClient) {
|
|
4425
|
+
function bulkDeleteMembers3(httpClient, __options) {
|
|
1737
4426
|
return (memberIds) => bulkDeleteMembers2(
|
|
1738
4427
|
memberIds,
|
|
1739
4428
|
// @ts-ignore
|
|
1740
|
-
{ httpClient }
|
|
4429
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1741
4430
|
);
|
|
1742
4431
|
}
|
|
1743
|
-
function bulkDeleteMembersByFilter3(httpClient) {
|
|
4432
|
+
function bulkDeleteMembersByFilter3(httpClient, __options) {
|
|
1744
4433
|
return (filter, options) => bulkDeleteMembersByFilter2(
|
|
1745
4434
|
filter,
|
|
1746
4435
|
options,
|
|
1747
4436
|
// @ts-ignore
|
|
1748
|
-
{ httpClient }
|
|
4437
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1749
4438
|
);
|
|
1750
4439
|
}
|
|
1751
|
-
function bulkApproveMembers3(httpClient) {
|
|
4440
|
+
function bulkApproveMembers3(httpClient, __options) {
|
|
1752
4441
|
return (filter) => bulkApproveMembers2(
|
|
1753
4442
|
filter,
|
|
1754
4443
|
// @ts-ignore
|
|
1755
|
-
{ httpClient }
|
|
4444
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1756
4445
|
);
|
|
1757
4446
|
}
|
|
1758
|
-
function bulkBlockMembers3(httpClient) {
|
|
4447
|
+
function bulkBlockMembers3(httpClient, __options) {
|
|
1759
4448
|
return (filter) => bulkBlockMembers2(
|
|
1760
4449
|
filter,
|
|
1761
4450
|
// @ts-ignore
|
|
1762
|
-
{ httpClient }
|
|
4451
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1763
4452
|
);
|
|
1764
4453
|
}
|
|
1765
|
-
function createMember3(httpClient) {
|
|
4454
|
+
function createMember3(httpClient, __options) {
|
|
1766
4455
|
return (options) => createMember2(
|
|
1767
4456
|
options,
|
|
1768
4457
|
// @ts-ignore
|
|
1769
|
-
{ httpClient }
|
|
4458
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1770
4459
|
);
|
|
1771
4460
|
}
|
|
1772
|
-
function updateMember3(httpClient) {
|
|
4461
|
+
function updateMember3(httpClient, __options) {
|
|
1773
4462
|
return (_id, member) => updateMember2(
|
|
1774
4463
|
_id,
|
|
1775
4464
|
member,
|
|
1776
4465
|
// @ts-ignore
|
|
1777
|
-
{ httpClient }
|
|
4466
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1778
4467
|
);
|
|
1779
4468
|
}
|
|
1780
|
-
function deleteMemberPhones3(httpClient) {
|
|
4469
|
+
function deleteMemberPhones3(httpClient, __options) {
|
|
1781
4470
|
return (_id) => deleteMemberPhones2(
|
|
1782
4471
|
_id,
|
|
1783
4472
|
// @ts-ignore
|
|
1784
|
-
{ httpClient }
|
|
4473
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1785
4474
|
);
|
|
1786
4475
|
}
|
|
1787
|
-
function deleteMemberEmails3(httpClient) {
|
|
4476
|
+
function deleteMemberEmails3(httpClient, __options) {
|
|
1788
4477
|
return (_id) => deleteMemberEmails2(
|
|
1789
4478
|
_id,
|
|
1790
4479
|
// @ts-ignore
|
|
1791
|
-
{ httpClient }
|
|
4480
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1792
4481
|
);
|
|
1793
4482
|
}
|
|
1794
|
-
function deleteMemberAddresses3(httpClient) {
|
|
4483
|
+
function deleteMemberAddresses3(httpClient, __options) {
|
|
1795
4484
|
return (_id) => deleteMemberAddresses2(
|
|
1796
4485
|
_id,
|
|
1797
4486
|
// @ts-ignore
|
|
1798
|
-
{ httpClient }
|
|
4487
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1799
4488
|
);
|
|
1800
4489
|
}
|
|
1801
4490
|
var onMemberCreated = (0, import_sdk_types.EventDefinition)(
|