@wix/auto_sdk_members_members 1.0.112 → 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.
@@ -809,6 +809,2613 @@ function deleteMemberAddresses(payload) {
809
809
 
810
810
  // src/members-v1-member-members.universal.ts
811
811
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
812
+
813
+ // src/members-v1-member-members.schemas.ts
814
+ import * as z from "zod";
815
+ var UpdateCurrentMemberSlugRequest = z.object({
816
+ slug: z.string().describe("New slug.").max(255)
817
+ });
818
+ var UpdateCurrentMemberSlugResponse = z.object({
819
+ member: z.object({
820
+ _id: z.string().describe("Member ID.").regex(
821
+ /^[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}$/,
822
+ "Must be a valid GUID"
823
+ ).optional().nullable(),
824
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
825
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
826
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
827
+ contactId: z.string().describe("Contact ID.").regex(
828
+ /^[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}$/,
829
+ "Must be a valid GUID"
830
+ ).optional().nullable(),
831
+ contact: z.object({
832
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
833
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
834
+ phones: z.array(z.string()).optional(),
835
+ emails: z.array(z.string()).optional(),
836
+ addresses: z.array(
837
+ z.intersection(
838
+ z.object({
839
+ _id: z.string().describe("Street address ID.").regex(
840
+ /^[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}$/,
841
+ "Must be a valid GUID"
842
+ ).optional().nullable(),
843
+ addressLine2: z.string().describe(
844
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
845
+ ).optional().nullable(),
846
+ city: z.string().describe("City name.").optional().nullable(),
847
+ subdivision: z.string().describe(
848
+ "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."
849
+ ).optional().nullable(),
850
+ country: z.string().describe(
851
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
852
+ ).optional().nullable(),
853
+ postalCode: z.string().describe("Postal code.").optional().nullable()
854
+ }),
855
+ z.xor([
856
+ z.object({
857
+ streetAddress: z.never().optional(),
858
+ addressLine: z.never().optional()
859
+ }),
860
+ z.object({
861
+ addressLine: z.never().optional(),
862
+ streetAddress: z.object({
863
+ number: z.string().describe("Street number.").max(100).optional(),
864
+ name: z.string().describe("Street name.").max(200).optional()
865
+ }).describe(
866
+ "Street address object, with number and name in separate fields."
867
+ )
868
+ }),
869
+ z.object({
870
+ streetAddress: z.never().optional(),
871
+ addressLine: z.string().describe(
872
+ "Main address line, usually street and number, as free text."
873
+ ).max(200)
874
+ })
875
+ ])
876
+ )
877
+ ).optional(),
878
+ birthdate: z.string().describe(
879
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
880
+ ).max(100).optional().nullable(),
881
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
882
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
883
+ customFields: z.record(
884
+ z.string(),
885
+ z.object({
886
+ name: z.string().describe("Custom field name.").optional().nullable(),
887
+ value: z.any().describe("Custom field value.").optional().nullable()
888
+ })
889
+ ).describe(
890
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
891
+ ).optional()
892
+ }).describe(
893
+ "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)."
894
+ ).optional(),
895
+ profile: z.object({
896
+ nickname: z.string().describe(
897
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
898
+ ).optional().nullable(),
899
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
900
+ photo: z.object({
901
+ _id: z.string().describe(
902
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
903
+ ).optional(),
904
+ url: z.string().describe("Image URL.").optional(),
905
+ height: z.number().int().describe("Original image width.").optional(),
906
+ width: z.number().int().describe("Original image height.").optional(),
907
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
908
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
909
+ }).describe("Member's profile photo.").optional(),
910
+ cover: z.object({
911
+ _id: z.string().describe(
912
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
913
+ ).optional(),
914
+ url: z.string().describe("Image URL.").optional(),
915
+ height: z.number().int().describe("Original image width.").optional(),
916
+ width: z.number().int().describe("Original image height.").optional(),
917
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
918
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
919
+ }).describe(
920
+ "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`."
921
+ ).optional(),
922
+ title: z.string().describe("Member title.").optional().nullable()
923
+ }).describe("Profile display details.").optional(),
924
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
925
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
926
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
927
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
928
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
929
+ }).describe("Updated member.").optional()
930
+ });
931
+ var UpdateMemberSlugRequest = z.object({
932
+ _id: z.string().describe("Member ID.").regex(
933
+ /^[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}$/,
934
+ "Must be a valid GUID"
935
+ ),
936
+ slug: z.string().describe("New slug.").max(255)
937
+ });
938
+ var UpdateMemberSlugResponse = z.object({
939
+ member: z.object({
940
+ _id: z.string().describe("Member ID.").regex(
941
+ /^[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}$/,
942
+ "Must be a valid GUID"
943
+ ).optional().nullable(),
944
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
945
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
946
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
947
+ contactId: z.string().describe("Contact ID.").regex(
948
+ /^[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}$/,
949
+ "Must be a valid GUID"
950
+ ).optional().nullable(),
951
+ contact: z.object({
952
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
953
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
954
+ phones: z.array(z.string()).optional(),
955
+ emails: z.array(z.string()).optional(),
956
+ addresses: z.array(
957
+ z.intersection(
958
+ z.object({
959
+ _id: z.string().describe("Street address ID.").regex(
960
+ /^[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}$/,
961
+ "Must be a valid GUID"
962
+ ).optional().nullable(),
963
+ addressLine2: z.string().describe(
964
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
965
+ ).optional().nullable(),
966
+ city: z.string().describe("City name.").optional().nullable(),
967
+ subdivision: z.string().describe(
968
+ "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."
969
+ ).optional().nullable(),
970
+ country: z.string().describe(
971
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
972
+ ).optional().nullable(),
973
+ postalCode: z.string().describe("Postal code.").optional().nullable()
974
+ }),
975
+ z.xor([
976
+ z.object({
977
+ streetAddress: z.never().optional(),
978
+ addressLine: z.never().optional()
979
+ }),
980
+ z.object({
981
+ addressLine: z.never().optional(),
982
+ streetAddress: z.object({
983
+ number: z.string().describe("Street number.").max(100).optional(),
984
+ name: z.string().describe("Street name.").max(200).optional()
985
+ }).describe(
986
+ "Street address object, with number and name in separate fields."
987
+ )
988
+ }),
989
+ z.object({
990
+ streetAddress: z.never().optional(),
991
+ addressLine: z.string().describe(
992
+ "Main address line, usually street and number, as free text."
993
+ ).max(200)
994
+ })
995
+ ])
996
+ )
997
+ ).optional(),
998
+ birthdate: z.string().describe(
999
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1000
+ ).max(100).optional().nullable(),
1001
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1002
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1003
+ customFields: z.record(
1004
+ z.string(),
1005
+ z.object({
1006
+ name: z.string().describe("Custom field name.").optional().nullable(),
1007
+ value: z.any().describe("Custom field value.").optional().nullable()
1008
+ })
1009
+ ).describe(
1010
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
1011
+ ).optional()
1012
+ }).describe(
1013
+ "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)."
1014
+ ).optional(),
1015
+ profile: z.object({
1016
+ nickname: z.string().describe(
1017
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
1018
+ ).optional().nullable(),
1019
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
1020
+ photo: z.object({
1021
+ _id: z.string().describe(
1022
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1023
+ ).optional(),
1024
+ url: z.string().describe("Image URL.").optional(),
1025
+ height: z.number().int().describe("Original image width.").optional(),
1026
+ width: z.number().int().describe("Original image height.").optional(),
1027
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1028
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1029
+ }).describe("Member's profile photo.").optional(),
1030
+ cover: z.object({
1031
+ _id: z.string().describe(
1032
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1033
+ ).optional(),
1034
+ url: z.string().describe("Image URL.").optional(),
1035
+ height: z.number().int().describe("Original image width.").optional(),
1036
+ width: z.number().int().describe("Original image height.").optional(),
1037
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1038
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1039
+ }).describe(
1040
+ "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`."
1041
+ ).optional(),
1042
+ title: z.string().describe("Member title.").optional().nullable()
1043
+ }).describe("Profile display details.").optional(),
1044
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
1045
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
1046
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
1047
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
1048
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
1049
+ }).describe("Updated member.").optional()
1050
+ });
1051
+ var JoinCommunityRequest = z.object({});
1052
+ var JoinCommunityResponse = z.object({
1053
+ member: z.object({
1054
+ _id: z.string().describe("Member ID.").regex(
1055
+ /^[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}$/,
1056
+ "Must be a valid GUID"
1057
+ ).optional().nullable(),
1058
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
1059
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
1060
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
1061
+ contactId: z.string().describe("Contact ID.").regex(
1062
+ /^[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}$/,
1063
+ "Must be a valid GUID"
1064
+ ).optional().nullable(),
1065
+ contact: z.object({
1066
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
1067
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
1068
+ phones: z.array(z.string()).optional(),
1069
+ emails: z.array(z.string()).optional(),
1070
+ addresses: z.array(
1071
+ z.intersection(
1072
+ z.object({
1073
+ _id: z.string().describe("Street address ID.").regex(
1074
+ /^[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}$/,
1075
+ "Must be a valid GUID"
1076
+ ).optional().nullable(),
1077
+ addressLine2: z.string().describe(
1078
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
1079
+ ).optional().nullable(),
1080
+ city: z.string().describe("City name.").optional().nullable(),
1081
+ subdivision: z.string().describe(
1082
+ "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."
1083
+ ).optional().nullable(),
1084
+ country: z.string().describe(
1085
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
1086
+ ).optional().nullable(),
1087
+ postalCode: z.string().describe("Postal code.").optional().nullable()
1088
+ }),
1089
+ z.xor([
1090
+ z.object({
1091
+ streetAddress: z.never().optional(),
1092
+ addressLine: z.never().optional()
1093
+ }),
1094
+ z.object({
1095
+ addressLine: z.never().optional(),
1096
+ streetAddress: z.object({
1097
+ number: z.string().describe("Street number.").max(100).optional(),
1098
+ name: z.string().describe("Street name.").max(200).optional()
1099
+ }).describe(
1100
+ "Street address object, with number and name in separate fields."
1101
+ )
1102
+ }),
1103
+ z.object({
1104
+ streetAddress: z.never().optional(),
1105
+ addressLine: z.string().describe(
1106
+ "Main address line, usually street and number, as free text."
1107
+ ).max(200)
1108
+ })
1109
+ ])
1110
+ )
1111
+ ).optional(),
1112
+ birthdate: z.string().describe(
1113
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1114
+ ).max(100).optional().nullable(),
1115
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1116
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1117
+ customFields: z.record(
1118
+ z.string(),
1119
+ z.object({
1120
+ name: z.string().describe("Custom field name.").optional().nullable(),
1121
+ value: z.any().describe("Custom field value.").optional().nullable()
1122
+ })
1123
+ ).describe(
1124
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
1125
+ ).optional()
1126
+ }).describe(
1127
+ "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)."
1128
+ ).optional(),
1129
+ profile: z.object({
1130
+ nickname: z.string().describe(
1131
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
1132
+ ).optional().nullable(),
1133
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
1134
+ photo: z.object({
1135
+ _id: z.string().describe(
1136
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1137
+ ).optional(),
1138
+ url: z.string().describe("Image URL.").optional(),
1139
+ height: z.number().int().describe("Original image width.").optional(),
1140
+ width: z.number().int().describe("Original image height.").optional(),
1141
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1142
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1143
+ }).describe("Member's profile photo.").optional(),
1144
+ cover: z.object({
1145
+ _id: z.string().describe(
1146
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1147
+ ).optional(),
1148
+ url: z.string().describe("Image URL.").optional(),
1149
+ height: z.number().int().describe("Original image width.").optional(),
1150
+ width: z.number().int().describe("Original image height.").optional(),
1151
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1152
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1153
+ }).describe(
1154
+ "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`."
1155
+ ).optional(),
1156
+ title: z.string().describe("Member title.").optional().nullable()
1157
+ }).describe("Profile display details.").optional(),
1158
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
1159
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
1160
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
1161
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
1162
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
1163
+ }).describe("The updated member.").optional()
1164
+ });
1165
+ var LeaveCommunityRequest = z.object({});
1166
+ var LeaveCommunityResponse = z.object({
1167
+ member: z.object({
1168
+ _id: z.string().describe("Member ID.").regex(
1169
+ /^[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}$/,
1170
+ "Must be a valid GUID"
1171
+ ).optional().nullable(),
1172
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
1173
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
1174
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
1175
+ contactId: z.string().describe("Contact ID.").regex(
1176
+ /^[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}$/,
1177
+ "Must be a valid GUID"
1178
+ ).optional().nullable(),
1179
+ contact: z.object({
1180
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
1181
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
1182
+ phones: z.array(z.string()).optional(),
1183
+ emails: z.array(z.string()).optional(),
1184
+ addresses: z.array(
1185
+ z.intersection(
1186
+ z.object({
1187
+ _id: z.string().describe("Street address ID.").regex(
1188
+ /^[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}$/,
1189
+ "Must be a valid GUID"
1190
+ ).optional().nullable(),
1191
+ addressLine2: z.string().describe(
1192
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
1193
+ ).optional().nullable(),
1194
+ city: z.string().describe("City name.").optional().nullable(),
1195
+ subdivision: z.string().describe(
1196
+ "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."
1197
+ ).optional().nullable(),
1198
+ country: z.string().describe(
1199
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
1200
+ ).optional().nullable(),
1201
+ postalCode: z.string().describe("Postal code.").optional().nullable()
1202
+ }),
1203
+ z.xor([
1204
+ z.object({
1205
+ streetAddress: z.never().optional(),
1206
+ addressLine: z.never().optional()
1207
+ }),
1208
+ z.object({
1209
+ addressLine: z.never().optional(),
1210
+ streetAddress: z.object({
1211
+ number: z.string().describe("Street number.").max(100).optional(),
1212
+ name: z.string().describe("Street name.").max(200).optional()
1213
+ }).describe(
1214
+ "Street address object, with number and name in separate fields."
1215
+ )
1216
+ }),
1217
+ z.object({
1218
+ streetAddress: z.never().optional(),
1219
+ addressLine: z.string().describe(
1220
+ "Main address line, usually street and number, as free text."
1221
+ ).max(200)
1222
+ })
1223
+ ])
1224
+ )
1225
+ ).optional(),
1226
+ birthdate: z.string().describe(
1227
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1228
+ ).max(100).optional().nullable(),
1229
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1230
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1231
+ customFields: z.record(
1232
+ z.string(),
1233
+ z.object({
1234
+ name: z.string().describe("Custom field name.").optional().nullable(),
1235
+ value: z.any().describe("Custom field value.").optional().nullable()
1236
+ })
1237
+ ).describe(
1238
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
1239
+ ).optional()
1240
+ }).describe(
1241
+ "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)."
1242
+ ).optional(),
1243
+ profile: z.object({
1244
+ nickname: z.string().describe(
1245
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
1246
+ ).optional().nullable(),
1247
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
1248
+ photo: z.object({
1249
+ _id: z.string().describe(
1250
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1251
+ ).optional(),
1252
+ url: z.string().describe("Image URL.").optional(),
1253
+ height: z.number().int().describe("Original image width.").optional(),
1254
+ width: z.number().int().describe("Original image height.").optional(),
1255
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1256
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1257
+ }).describe("Member's profile photo.").optional(),
1258
+ cover: z.object({
1259
+ _id: z.string().describe(
1260
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1261
+ ).optional(),
1262
+ url: z.string().describe("Image URL.").optional(),
1263
+ height: z.number().int().describe("Original image width.").optional(),
1264
+ width: z.number().int().describe("Original image height.").optional(),
1265
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1266
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1267
+ }).describe(
1268
+ "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`."
1269
+ ).optional(),
1270
+ title: z.string().describe("Member title.").optional().nullable()
1271
+ }).describe("Profile display details.").optional(),
1272
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
1273
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
1274
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
1275
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
1276
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
1277
+ }).describe("The updated member.").optional()
1278
+ });
1279
+ var GetCurrentMemberRequest = z.object({
1280
+ options: z.object({
1281
+ fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional()
1282
+ }).describe("Fieldset options.").optional()
1283
+ });
1284
+ var GetCurrentMemberResponse = z.object({
1285
+ member: z.object({
1286
+ _id: z.string().describe("Member ID.").regex(
1287
+ /^[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}$/,
1288
+ "Must be a valid GUID"
1289
+ ).optional().nullable(),
1290
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
1291
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
1292
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
1293
+ contactId: z.string().describe("Contact ID.").regex(
1294
+ /^[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}$/,
1295
+ "Must be a valid GUID"
1296
+ ).optional().nullable(),
1297
+ contact: z.object({
1298
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
1299
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
1300
+ phones: z.array(z.string()).optional(),
1301
+ emails: z.array(z.string()).optional(),
1302
+ addresses: z.array(
1303
+ z.intersection(
1304
+ z.object({
1305
+ _id: z.string().describe("Street address ID.").regex(
1306
+ /^[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}$/,
1307
+ "Must be a valid GUID"
1308
+ ).optional().nullable(),
1309
+ addressLine2: z.string().describe(
1310
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
1311
+ ).optional().nullable(),
1312
+ city: z.string().describe("City name.").optional().nullable(),
1313
+ subdivision: z.string().describe(
1314
+ "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."
1315
+ ).optional().nullable(),
1316
+ country: z.string().describe(
1317
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
1318
+ ).optional().nullable(),
1319
+ postalCode: z.string().describe("Postal code.").optional().nullable()
1320
+ }),
1321
+ z.xor([
1322
+ z.object({
1323
+ streetAddress: z.never().optional(),
1324
+ addressLine: z.never().optional()
1325
+ }),
1326
+ z.object({
1327
+ addressLine: z.never().optional(),
1328
+ streetAddress: z.object({
1329
+ number: z.string().describe("Street number.").max(100).optional(),
1330
+ name: z.string().describe("Street name.").max(200).optional()
1331
+ }).describe(
1332
+ "Street address object, with number and name in separate fields."
1333
+ )
1334
+ }),
1335
+ z.object({
1336
+ streetAddress: z.never().optional(),
1337
+ addressLine: z.string().describe(
1338
+ "Main address line, usually street and number, as free text."
1339
+ ).max(200)
1340
+ })
1341
+ ])
1342
+ )
1343
+ ).optional(),
1344
+ birthdate: z.string().describe(
1345
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1346
+ ).max(100).optional().nullable(),
1347
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1348
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1349
+ customFields: z.record(
1350
+ z.string(),
1351
+ z.object({
1352
+ name: z.string().describe("Custom field name.").optional().nullable(),
1353
+ value: z.any().describe("Custom field value.").optional().nullable()
1354
+ })
1355
+ ).describe(
1356
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
1357
+ ).optional()
1358
+ }).describe(
1359
+ "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)."
1360
+ ).optional(),
1361
+ profile: z.object({
1362
+ nickname: z.string().describe(
1363
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
1364
+ ).optional().nullable(),
1365
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
1366
+ photo: z.object({
1367
+ _id: z.string().describe(
1368
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1369
+ ).optional(),
1370
+ url: z.string().describe("Image URL.").optional(),
1371
+ height: z.number().int().describe("Original image width.").optional(),
1372
+ width: z.number().int().describe("Original image height.").optional(),
1373
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1374
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1375
+ }).describe("Member's profile photo.").optional(),
1376
+ cover: z.object({
1377
+ _id: z.string().describe(
1378
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1379
+ ).optional(),
1380
+ url: z.string().describe("Image URL.").optional(),
1381
+ height: z.number().int().describe("Original image width.").optional(),
1382
+ width: z.number().int().describe("Original image height.").optional(),
1383
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1384
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1385
+ }).describe(
1386
+ "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`."
1387
+ ).optional(),
1388
+ title: z.string().describe("Member title.").optional().nullable()
1389
+ }).describe("Profile display details.").optional(),
1390
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
1391
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
1392
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
1393
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
1394
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
1395
+ }).describe("The retrieved member.").optional()
1396
+ });
1397
+ var GetMemberRequest = z.object({
1398
+ _id: z.string().describe("Member ID.").regex(
1399
+ /^[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}$/,
1400
+ "Must be a valid GUID"
1401
+ ),
1402
+ options: z.object({
1403
+ fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional()
1404
+ }).describe("Fieldset options.").optional()
1405
+ });
1406
+ var GetMemberResponse = z.object({
1407
+ _id: z.string().describe("Member ID.").regex(
1408
+ /^[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}$/,
1409
+ "Must be a valid GUID"
1410
+ ).optional().nullable(),
1411
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
1412
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
1413
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
1414
+ contactId: z.string().describe("Contact ID.").regex(
1415
+ /^[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}$/,
1416
+ "Must be a valid GUID"
1417
+ ).optional().nullable(),
1418
+ contact: z.object({
1419
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
1420
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
1421
+ phones: z.array(z.string()).optional(),
1422
+ emails: z.array(z.string()).optional(),
1423
+ addresses: z.array(
1424
+ z.intersection(
1425
+ z.object({
1426
+ _id: z.string().describe("Street address ID.").regex(
1427
+ /^[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}$/,
1428
+ "Must be a valid GUID"
1429
+ ).optional().nullable(),
1430
+ addressLine2: z.string().describe(
1431
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
1432
+ ).optional().nullable(),
1433
+ city: z.string().describe("City name.").optional().nullable(),
1434
+ subdivision: z.string().describe(
1435
+ "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."
1436
+ ).optional().nullable(),
1437
+ country: z.string().describe(
1438
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
1439
+ ).optional().nullable(),
1440
+ postalCode: z.string().describe("Postal code.").optional().nullable()
1441
+ }),
1442
+ z.xor([
1443
+ z.object({
1444
+ streetAddress: z.never().optional(),
1445
+ addressLine: z.never().optional()
1446
+ }),
1447
+ z.object({
1448
+ addressLine: z.never().optional(),
1449
+ streetAddress: z.object({
1450
+ number: z.string().describe("Street number.").max(100).optional(),
1451
+ name: z.string().describe("Street name.").max(200).optional()
1452
+ }).describe(
1453
+ "Street address object, with number and name in separate fields."
1454
+ )
1455
+ }),
1456
+ z.object({
1457
+ streetAddress: z.never().optional(),
1458
+ addressLine: z.string().describe(
1459
+ "Main address line, usually street and number, as free text."
1460
+ ).max(200)
1461
+ })
1462
+ ])
1463
+ )
1464
+ ).optional(),
1465
+ birthdate: z.string().describe(
1466
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1467
+ ).max(100).optional().nullable(),
1468
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1469
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1470
+ customFields: z.record(
1471
+ z.string(),
1472
+ z.object({
1473
+ name: z.string().describe("Custom field name.").optional().nullable(),
1474
+ value: z.any().describe("Custom field value.").optional().nullable()
1475
+ })
1476
+ ).describe(
1477
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
1478
+ ).optional()
1479
+ }).describe(
1480
+ "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)."
1481
+ ).optional(),
1482
+ profile: z.object({
1483
+ nickname: z.string().describe(
1484
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
1485
+ ).optional().nullable(),
1486
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
1487
+ photo: z.object({
1488
+ _id: z.string().describe(
1489
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1490
+ ).optional(),
1491
+ url: z.string().describe("Image URL.").optional(),
1492
+ height: z.number().int().describe("Original image width.").optional(),
1493
+ width: z.number().int().describe("Original image height.").optional(),
1494
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1495
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1496
+ }).describe("Member's profile photo.").optional(),
1497
+ cover: z.object({
1498
+ _id: z.string().describe(
1499
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1500
+ ).optional(),
1501
+ url: z.string().describe("Image URL.").optional(),
1502
+ height: z.number().int().describe("Original image width.").optional(),
1503
+ width: z.number().int().describe("Original image height.").optional(),
1504
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1505
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1506
+ }).describe(
1507
+ "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`."
1508
+ ).optional(),
1509
+ title: z.string().describe("Member title.").optional().nullable()
1510
+ }).describe("Profile display details.").optional(),
1511
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
1512
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
1513
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
1514
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
1515
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
1516
+ });
1517
+ var ListMembersRequest = z.object({
1518
+ options: z.object({
1519
+ paging: z.object({
1520
+ limit: z.number().int().describe("Number of items to load.").min(0).optional().nullable(),
1521
+ offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
1522
+ }).optional(),
1523
+ fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional(),
1524
+ sorting: z.array(
1525
+ z.object({
1526
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
1527
+ order: z.enum(["ASC", "DESC"]).optional()
1528
+ })
1529
+ ).optional()
1530
+ }).describe("Options for paging, sorting, and specifying fields to return.").optional()
1531
+ });
1532
+ var ListMembersResponse = z.object({
1533
+ members: z.array(
1534
+ z.object({
1535
+ _id: z.string().describe("Member ID.").regex(
1536
+ /^[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}$/,
1537
+ "Must be a valid GUID"
1538
+ ).optional().nullable(),
1539
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
1540
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
1541
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
1542
+ contactId: z.string().describe("Contact ID.").regex(
1543
+ /^[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}$/,
1544
+ "Must be a valid GUID"
1545
+ ).optional().nullable(),
1546
+ contact: z.object({
1547
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
1548
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
1549
+ phones: z.array(z.string()).optional(),
1550
+ emails: z.array(z.string()).optional(),
1551
+ addresses: z.array(
1552
+ z.intersection(
1553
+ z.object({
1554
+ _id: z.string().describe("Street address ID.").regex(
1555
+ /^[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}$/,
1556
+ "Must be a valid GUID"
1557
+ ).optional().nullable(),
1558
+ addressLine2: z.string().describe(
1559
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
1560
+ ).optional().nullable(),
1561
+ city: z.string().describe("City name.").optional().nullable(),
1562
+ subdivision: z.string().describe(
1563
+ "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."
1564
+ ).optional().nullable(),
1565
+ country: z.string().describe(
1566
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
1567
+ ).optional().nullable(),
1568
+ postalCode: z.string().describe("Postal code.").optional().nullable()
1569
+ }),
1570
+ z.xor([
1571
+ z.object({
1572
+ streetAddress: z.never().optional(),
1573
+ addressLine: z.never().optional()
1574
+ }),
1575
+ z.object({
1576
+ addressLine: z.never().optional(),
1577
+ streetAddress: z.object({
1578
+ number: z.string().describe("Street number.").max(100).optional(),
1579
+ name: z.string().describe("Street name.").max(200).optional()
1580
+ }).describe(
1581
+ "Street address object, with number and name in separate fields."
1582
+ )
1583
+ }),
1584
+ z.object({
1585
+ streetAddress: z.never().optional(),
1586
+ addressLine: z.string().describe(
1587
+ "Main address line, usually street and number, as free text."
1588
+ ).max(200)
1589
+ })
1590
+ ])
1591
+ )
1592
+ ).optional(),
1593
+ birthdate: z.string().describe(
1594
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1595
+ ).max(100).optional().nullable(),
1596
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1597
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1598
+ customFields: z.record(
1599
+ z.string(),
1600
+ z.object({
1601
+ name: z.string().describe("Custom field name.").optional().nullable(),
1602
+ value: z.any().describe("Custom field value.").optional().nullable()
1603
+ })
1604
+ ).describe(
1605
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
1606
+ ).optional()
1607
+ }).describe(
1608
+ "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)."
1609
+ ).optional(),
1610
+ profile: z.object({
1611
+ nickname: z.string().describe(
1612
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
1613
+ ).optional().nullable(),
1614
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
1615
+ photo: z.object({
1616
+ _id: z.string().describe(
1617
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1618
+ ).optional(),
1619
+ url: z.string().describe("Image URL.").optional(),
1620
+ height: z.number().int().describe("Original image width.").optional(),
1621
+ width: z.number().int().describe("Original image height.").optional(),
1622
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1623
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1624
+ }).describe("Member's profile photo.").optional(),
1625
+ cover: z.object({
1626
+ _id: z.string().describe(
1627
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1628
+ ).optional(),
1629
+ url: z.string().describe("Image URL.").optional(),
1630
+ height: z.number().int().describe("Original image width.").optional(),
1631
+ width: z.number().int().describe("Original image height.").optional(),
1632
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1633
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1634
+ }).describe(
1635
+ "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`."
1636
+ ).optional(),
1637
+ title: z.string().describe("Member title.").optional().nullable()
1638
+ }).describe("Profile display details.").optional(),
1639
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
1640
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
1641
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
1642
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
1643
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
1644
+ })
1645
+ ).optional(),
1646
+ metadata: z.object({
1647
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
1648
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
1649
+ total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
1650
+ tooManyToCount: z.boolean().describe(
1651
+ "Flag that indicates the server failed to calculate the `total` field."
1652
+ ).optional().nullable()
1653
+ }).describe("Metadata for the paginated results.").optional()
1654
+ });
1655
+ var QueryMembersRequest = z.object({
1656
+ query: z.object({
1657
+ filter: z.object({
1658
+ _id: z.object({
1659
+ $eq: z.string(),
1660
+ $exists: z.boolean(),
1661
+ $gt: z.string(),
1662
+ $gte: z.string(),
1663
+ $hasAll: z.array(z.string()),
1664
+ $hasSome: z.array(z.string()),
1665
+ $in: z.array(z.string()),
1666
+ $lt: z.string(),
1667
+ $lte: z.string(),
1668
+ $ne: z.string(),
1669
+ $nin: z.array(z.string()),
1670
+ $startsWith: z.string()
1671
+ }).partial().strict().optional(),
1672
+ "profile.nickname": z.object({
1673
+ $eq: z.string(),
1674
+ $exists: z.boolean(),
1675
+ $gt: z.string(),
1676
+ $gte: z.string(),
1677
+ $hasAll: z.array(z.string()),
1678
+ $hasSome: z.array(z.string()),
1679
+ $in: z.array(z.string()),
1680
+ $lt: z.string(),
1681
+ $lte: z.string(),
1682
+ $ne: z.string(),
1683
+ $nin: z.array(z.string()),
1684
+ $startsWith: z.string()
1685
+ }).partial().strict().optional(),
1686
+ "profile.slug": z.object({
1687
+ $eq: z.string(),
1688
+ $exists: z.boolean(),
1689
+ $gt: z.string(),
1690
+ $gte: z.string(),
1691
+ $hasAll: z.array(z.string()),
1692
+ $hasSome: z.array(z.string()),
1693
+ $in: z.array(z.string()),
1694
+ $lt: z.string(),
1695
+ $lte: z.string(),
1696
+ $ne: z.string(),
1697
+ $nin: z.array(z.string()),
1698
+ $startsWith: z.string()
1699
+ }).partial().strict().optional(),
1700
+ contactId: z.object({
1701
+ $eq: z.string(),
1702
+ $exists: z.boolean(),
1703
+ $gt: z.string(),
1704
+ $gte: z.string(),
1705
+ $hasAll: z.array(z.string()),
1706
+ $hasSome: z.array(z.string()),
1707
+ $in: z.array(z.string()),
1708
+ $lt: z.string(),
1709
+ $lte: z.string(),
1710
+ $ne: z.string(),
1711
+ $nin: z.array(z.string()),
1712
+ $startsWith: z.string()
1713
+ }).partial().strict().optional(),
1714
+ "contact.firstName": z.object({
1715
+ $eq: z.string(),
1716
+ $exists: z.boolean(),
1717
+ $gt: z.string(),
1718
+ $gte: z.string(),
1719
+ $hasAll: z.array(z.string()),
1720
+ $hasSome: z.array(z.string()),
1721
+ $in: z.array(z.string()),
1722
+ $lt: z.string(),
1723
+ $lte: z.string(),
1724
+ $ne: z.string(),
1725
+ $nin: z.array(z.string()),
1726
+ $startsWith: z.string()
1727
+ }).partial().strict().optional(),
1728
+ "contact.lastName": z.object({
1729
+ $eq: z.string(),
1730
+ $exists: z.boolean(),
1731
+ $gt: z.string(),
1732
+ $gte: z.string(),
1733
+ $hasAll: z.array(z.string()),
1734
+ $hasSome: z.array(z.string()),
1735
+ $in: z.array(z.string()),
1736
+ $lt: z.string(),
1737
+ $lte: z.string(),
1738
+ $ne: z.string(),
1739
+ $nin: z.array(z.string()),
1740
+ $startsWith: z.string()
1741
+ }).partial().strict().optional(),
1742
+ privacyStatus: z.object({
1743
+ $eq: z.string(),
1744
+ $exists: z.boolean(),
1745
+ $gt: z.string(),
1746
+ $gte: z.string(),
1747
+ $hasAll: z.array(z.string()),
1748
+ $hasSome: z.array(z.string()),
1749
+ $in: z.array(z.string()),
1750
+ $lt: z.string(),
1751
+ $lte: z.string(),
1752
+ $ne: z.string(),
1753
+ $nin: z.array(z.string()),
1754
+ $startsWith: z.string()
1755
+ }).partial().strict().optional(),
1756
+ loginEmail: z.object({
1757
+ $eq: z.string(),
1758
+ $exists: z.boolean(),
1759
+ $gt: z.string(),
1760
+ $gte: z.string(),
1761
+ $hasAll: z.array(z.string()),
1762
+ $hasSome: z.array(z.string()),
1763
+ $in: z.array(z.string()),
1764
+ $lt: z.string(),
1765
+ $lte: z.string(),
1766
+ $ne: z.string(),
1767
+ $nin: z.array(z.string()),
1768
+ $startsWith: z.string()
1769
+ }).partial().strict().optional(),
1770
+ status: z.object({
1771
+ $eq: z.string(),
1772
+ $exists: z.boolean(),
1773
+ $gt: z.string(),
1774
+ $gte: z.string(),
1775
+ $hasAll: z.array(z.string()),
1776
+ $hasSome: z.array(z.string()),
1777
+ $in: z.array(z.string()),
1778
+ $lt: z.string(),
1779
+ $lte: z.string(),
1780
+ $ne: z.string(),
1781
+ $nin: z.array(z.string()),
1782
+ $startsWith: z.string()
1783
+ }).partial().strict().optional(),
1784
+ $and: z.array(z.any()).optional(),
1785
+ $or: z.array(z.any()).optional(),
1786
+ $not: z.any().optional()
1787
+ }).strict().optional(),
1788
+ sort: z.array(z.object({})).optional()
1789
+ }).catchall(z.any()).describe("Query options."),
1790
+ options: z.object({
1791
+ fieldsets: z.array(z.enum(["PUBLIC", "FULL", "EXTENDED"])).max(3).optional(),
1792
+ search: z.object({
1793
+ expression: z.string().describe("Search term or expression.").min(1).max(100).optional().nullable(),
1794
+ fields: z.array(z.string()).max(4).optional()
1795
+ }).describe("Plain text search.").optional()
1796
+ }).describe("Query options.").optional()
1797
+ });
1798
+ var QueryMembersResponse = z.object({
1799
+ members: z.array(
1800
+ z.object({
1801
+ _id: z.string().describe("Member ID.").regex(
1802
+ /^[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}$/,
1803
+ "Must be a valid GUID"
1804
+ ).optional().nullable(),
1805
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
1806
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
1807
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
1808
+ contactId: z.string().describe("Contact ID.").regex(
1809
+ /^[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}$/,
1810
+ "Must be a valid GUID"
1811
+ ).optional().nullable(),
1812
+ contact: z.object({
1813
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
1814
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
1815
+ phones: z.array(z.string()).optional(),
1816
+ emails: z.array(z.string()).optional(),
1817
+ addresses: z.array(
1818
+ z.intersection(
1819
+ z.object({
1820
+ _id: z.string().describe("Street address ID.").regex(
1821
+ /^[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}$/,
1822
+ "Must be a valid GUID"
1823
+ ).optional().nullable(),
1824
+ addressLine2: z.string().describe(
1825
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
1826
+ ).optional().nullable(),
1827
+ city: z.string().describe("City name.").optional().nullable(),
1828
+ subdivision: z.string().describe(
1829
+ "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."
1830
+ ).optional().nullable(),
1831
+ country: z.string().describe(
1832
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
1833
+ ).optional().nullable(),
1834
+ postalCode: z.string().describe("Postal code.").optional().nullable()
1835
+ }),
1836
+ z.xor([
1837
+ z.object({
1838
+ streetAddress: z.never().optional(),
1839
+ addressLine: z.never().optional()
1840
+ }),
1841
+ z.object({
1842
+ addressLine: z.never().optional(),
1843
+ streetAddress: z.object({
1844
+ number: z.string().describe("Street number.").max(100).optional(),
1845
+ name: z.string().describe("Street name.").max(200).optional()
1846
+ }).describe(
1847
+ "Street address object, with number and name in separate fields."
1848
+ )
1849
+ }),
1850
+ z.object({
1851
+ streetAddress: z.never().optional(),
1852
+ addressLine: z.string().describe(
1853
+ "Main address line, usually street and number, as free text."
1854
+ ).max(200)
1855
+ })
1856
+ ])
1857
+ )
1858
+ ).optional(),
1859
+ birthdate: z.string().describe(
1860
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1861
+ ).max(100).optional().nullable(),
1862
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1863
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1864
+ customFields: z.record(
1865
+ z.string(),
1866
+ z.object({
1867
+ name: z.string().describe("Custom field name.").optional().nullable(),
1868
+ value: z.any().describe("Custom field value.").optional().nullable()
1869
+ })
1870
+ ).describe(
1871
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
1872
+ ).optional()
1873
+ }).describe(
1874
+ "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)."
1875
+ ).optional(),
1876
+ profile: z.object({
1877
+ nickname: z.string().describe(
1878
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
1879
+ ).optional().nullable(),
1880
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
1881
+ photo: z.object({
1882
+ _id: z.string().describe(
1883
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1884
+ ).optional(),
1885
+ url: z.string().describe("Image URL.").optional(),
1886
+ height: z.number().int().describe("Original image width.").optional(),
1887
+ width: z.number().int().describe("Original image height.").optional(),
1888
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1889
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1890
+ }).describe("Member's profile photo.").optional(),
1891
+ cover: z.object({
1892
+ _id: z.string().describe(
1893
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
1894
+ ).optional(),
1895
+ url: z.string().describe("Image URL.").optional(),
1896
+ height: z.number().int().describe("Original image width.").optional(),
1897
+ width: z.number().int().describe("Original image height.").optional(),
1898
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
1899
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
1900
+ }).describe(
1901
+ "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`."
1902
+ ).optional(),
1903
+ title: z.string().describe("Member title.").optional().nullable()
1904
+ }).describe("Profile display details.").optional(),
1905
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
1906
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
1907
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
1908
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
1909
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
1910
+ })
1911
+ ).optional(),
1912
+ metadata: z.object({
1913
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
1914
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
1915
+ total: z.number().int().describe("Total number of items that match the query.").optional().nullable(),
1916
+ tooManyToCount: z.boolean().describe(
1917
+ "Flag that indicates the server failed to calculate the `total` field."
1918
+ ).optional().nullable()
1919
+ }).describe("Metadata for the paginated results.").optional()
1920
+ });
1921
+ var MuteMemberRequest = z.object({
1922
+ _id: z.string().describe("ID of the member to mute.").regex(
1923
+ /^[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}$/,
1924
+ "Must be a valid GUID"
1925
+ )
1926
+ });
1927
+ var MuteMemberResponse = z.object({
1928
+ member: z.object({
1929
+ _id: z.string().describe("Member ID.").regex(
1930
+ /^[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}$/,
1931
+ "Must be a valid GUID"
1932
+ ).optional().nullable(),
1933
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
1934
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
1935
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
1936
+ contactId: z.string().describe("Contact ID.").regex(
1937
+ /^[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}$/,
1938
+ "Must be a valid GUID"
1939
+ ).optional().nullable(),
1940
+ contact: z.object({
1941
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
1942
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
1943
+ phones: z.array(z.string()).optional(),
1944
+ emails: z.array(z.string()).optional(),
1945
+ addresses: z.array(
1946
+ z.intersection(
1947
+ z.object({
1948
+ _id: z.string().describe("Street address ID.").regex(
1949
+ /^[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}$/,
1950
+ "Must be a valid GUID"
1951
+ ).optional().nullable(),
1952
+ addressLine2: z.string().describe(
1953
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
1954
+ ).optional().nullable(),
1955
+ city: z.string().describe("City name.").optional().nullable(),
1956
+ subdivision: z.string().describe(
1957
+ "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."
1958
+ ).optional().nullable(),
1959
+ country: z.string().describe(
1960
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
1961
+ ).optional().nullable(),
1962
+ postalCode: z.string().describe("Postal code.").optional().nullable()
1963
+ }),
1964
+ z.xor([
1965
+ z.object({
1966
+ streetAddress: z.never().optional(),
1967
+ addressLine: z.never().optional()
1968
+ }),
1969
+ z.object({
1970
+ addressLine: z.never().optional(),
1971
+ streetAddress: z.object({
1972
+ number: z.string().describe("Street number.").max(100).optional(),
1973
+ name: z.string().describe("Street name.").max(200).optional()
1974
+ }).describe(
1975
+ "Street address object, with number and name in separate fields."
1976
+ )
1977
+ }),
1978
+ z.object({
1979
+ streetAddress: z.never().optional(),
1980
+ addressLine: z.string().describe(
1981
+ "Main address line, usually street and number, as free text."
1982
+ ).max(200)
1983
+ })
1984
+ ])
1985
+ )
1986
+ ).optional(),
1987
+ birthdate: z.string().describe(
1988
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
1989
+ ).max(100).optional().nullable(),
1990
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
1991
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
1992
+ customFields: z.record(
1993
+ z.string(),
1994
+ z.object({
1995
+ name: z.string().describe("Custom field name.").optional().nullable(),
1996
+ value: z.any().describe("Custom field value.").optional().nullable()
1997
+ })
1998
+ ).describe(
1999
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2000
+ ).optional()
2001
+ }).describe(
2002
+ "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)."
2003
+ ).optional(),
2004
+ profile: z.object({
2005
+ nickname: z.string().describe(
2006
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2007
+ ).optional().nullable(),
2008
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2009
+ photo: z.object({
2010
+ _id: z.string().describe(
2011
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2012
+ ).optional(),
2013
+ url: z.string().describe("Image URL.").optional(),
2014
+ height: z.number().int().describe("Original image width.").optional(),
2015
+ width: z.number().int().describe("Original image height.").optional(),
2016
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2017
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2018
+ }).describe("Member's profile photo.").optional(),
2019
+ cover: z.object({
2020
+ _id: z.string().describe(
2021
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2022
+ ).optional(),
2023
+ url: z.string().describe("Image URL.").optional(),
2024
+ height: z.number().int().describe("Original image width.").optional(),
2025
+ width: z.number().int().describe("Original image height.").optional(),
2026
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2027
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2028
+ }).describe(
2029
+ "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`."
2030
+ ).optional(),
2031
+ title: z.string().describe("Member title.").optional().nullable()
2032
+ }).describe("Profile display details.").optional(),
2033
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
2034
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
2035
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2036
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2037
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
2038
+ }).describe("Muted member.").optional()
2039
+ });
2040
+ var UnmuteMemberRequest = z.object({
2041
+ _id: z.string().describe("ID of the member to unmute.").regex(
2042
+ /^[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}$/,
2043
+ "Must be a valid GUID"
2044
+ )
2045
+ });
2046
+ var UnmuteMemberResponse = z.object({
2047
+ member: z.object({
2048
+ _id: z.string().describe("Member ID.").regex(
2049
+ /^[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}$/,
2050
+ "Must be a valid GUID"
2051
+ ).optional().nullable(),
2052
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2053
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2054
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
2055
+ contactId: z.string().describe("Contact ID.").regex(
2056
+ /^[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}$/,
2057
+ "Must be a valid GUID"
2058
+ ).optional().nullable(),
2059
+ contact: z.object({
2060
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2061
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2062
+ phones: z.array(z.string()).optional(),
2063
+ emails: z.array(z.string()).optional(),
2064
+ addresses: z.array(
2065
+ z.intersection(
2066
+ z.object({
2067
+ _id: z.string().describe("Street address ID.").regex(
2068
+ /^[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}$/,
2069
+ "Must be a valid GUID"
2070
+ ).optional().nullable(),
2071
+ addressLine2: z.string().describe(
2072
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2073
+ ).optional().nullable(),
2074
+ city: z.string().describe("City name.").optional().nullable(),
2075
+ subdivision: z.string().describe(
2076
+ "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."
2077
+ ).optional().nullable(),
2078
+ country: z.string().describe(
2079
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2080
+ ).optional().nullable(),
2081
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2082
+ }),
2083
+ z.xor([
2084
+ z.object({
2085
+ streetAddress: z.never().optional(),
2086
+ addressLine: z.never().optional()
2087
+ }),
2088
+ z.object({
2089
+ addressLine: z.never().optional(),
2090
+ streetAddress: z.object({
2091
+ number: z.string().describe("Street number.").max(100).optional(),
2092
+ name: z.string().describe("Street name.").max(200).optional()
2093
+ }).describe(
2094
+ "Street address object, with number and name in separate fields."
2095
+ )
2096
+ }),
2097
+ z.object({
2098
+ streetAddress: z.never().optional(),
2099
+ addressLine: z.string().describe(
2100
+ "Main address line, usually street and number, as free text."
2101
+ ).max(200)
2102
+ })
2103
+ ])
2104
+ )
2105
+ ).optional(),
2106
+ birthdate: z.string().describe(
2107
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
2108
+ ).max(100).optional().nullable(),
2109
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
2110
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
2111
+ customFields: z.record(
2112
+ z.string(),
2113
+ z.object({
2114
+ name: z.string().describe("Custom field name.").optional().nullable(),
2115
+ value: z.any().describe("Custom field value.").optional().nullable()
2116
+ })
2117
+ ).describe(
2118
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2119
+ ).optional()
2120
+ }).describe(
2121
+ "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)."
2122
+ ).optional(),
2123
+ profile: z.object({
2124
+ nickname: z.string().describe(
2125
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2126
+ ).optional().nullable(),
2127
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2128
+ photo: z.object({
2129
+ _id: z.string().describe(
2130
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2131
+ ).optional(),
2132
+ url: z.string().describe("Image URL.").optional(),
2133
+ height: z.number().int().describe("Original image width.").optional(),
2134
+ width: z.number().int().describe("Original image height.").optional(),
2135
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2136
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2137
+ }).describe("Member's profile photo.").optional(),
2138
+ cover: z.object({
2139
+ _id: z.string().describe(
2140
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2141
+ ).optional(),
2142
+ url: z.string().describe("Image URL.").optional(),
2143
+ height: z.number().int().describe("Original image width.").optional(),
2144
+ width: z.number().int().describe("Original image height.").optional(),
2145
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2146
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2147
+ }).describe(
2148
+ "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`."
2149
+ ).optional(),
2150
+ title: z.string().describe("Member title.").optional().nullable()
2151
+ }).describe("Profile display details.").optional(),
2152
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
2153
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
2154
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2155
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2156
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
2157
+ }).describe("Unmuted member.").optional()
2158
+ });
2159
+ var ApproveMemberRequest = z.object({
2160
+ _id: z.string().describe("ID of the member to approve.").regex(
2161
+ /^[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}$/,
2162
+ "Must be a valid GUID"
2163
+ )
2164
+ });
2165
+ var ApproveMemberResponse = z.object({
2166
+ member: z.object({
2167
+ _id: z.string().describe("Member ID.").regex(
2168
+ /^[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}$/,
2169
+ "Must be a valid GUID"
2170
+ ).optional().nullable(),
2171
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2172
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2173
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
2174
+ contactId: z.string().describe("Contact ID.").regex(
2175
+ /^[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}$/,
2176
+ "Must be a valid GUID"
2177
+ ).optional().nullable(),
2178
+ contact: z.object({
2179
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2180
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2181
+ phones: z.array(z.string()).optional(),
2182
+ emails: z.array(z.string()).optional(),
2183
+ addresses: z.array(
2184
+ z.intersection(
2185
+ z.object({
2186
+ _id: z.string().describe("Street address ID.").regex(
2187
+ /^[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}$/,
2188
+ "Must be a valid GUID"
2189
+ ).optional().nullable(),
2190
+ addressLine2: z.string().describe(
2191
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2192
+ ).optional().nullable(),
2193
+ city: z.string().describe("City name.").optional().nullable(),
2194
+ subdivision: z.string().describe(
2195
+ "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."
2196
+ ).optional().nullable(),
2197
+ country: z.string().describe(
2198
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2199
+ ).optional().nullable(),
2200
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2201
+ }),
2202
+ z.xor([
2203
+ z.object({
2204
+ streetAddress: z.never().optional(),
2205
+ addressLine: z.never().optional()
2206
+ }),
2207
+ z.object({
2208
+ addressLine: z.never().optional(),
2209
+ streetAddress: z.object({
2210
+ number: z.string().describe("Street number.").max(100).optional(),
2211
+ name: z.string().describe("Street name.").max(200).optional()
2212
+ }).describe(
2213
+ "Street address object, with number and name in separate fields."
2214
+ )
2215
+ }),
2216
+ z.object({
2217
+ streetAddress: z.never().optional(),
2218
+ addressLine: z.string().describe(
2219
+ "Main address line, usually street and number, as free text."
2220
+ ).max(200)
2221
+ })
2222
+ ])
2223
+ )
2224
+ ).optional(),
2225
+ birthdate: z.string().describe(
2226
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
2227
+ ).max(100).optional().nullable(),
2228
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
2229
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
2230
+ customFields: z.record(
2231
+ z.string(),
2232
+ z.object({
2233
+ name: z.string().describe("Custom field name.").optional().nullable(),
2234
+ value: z.any().describe("Custom field value.").optional().nullable()
2235
+ })
2236
+ ).describe(
2237
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2238
+ ).optional()
2239
+ }).describe(
2240
+ "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)."
2241
+ ).optional(),
2242
+ profile: z.object({
2243
+ nickname: z.string().describe(
2244
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2245
+ ).optional().nullable(),
2246
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2247
+ photo: z.object({
2248
+ _id: z.string().describe(
2249
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2250
+ ).optional(),
2251
+ url: z.string().describe("Image URL.").optional(),
2252
+ height: z.number().int().describe("Original image width.").optional(),
2253
+ width: z.number().int().describe("Original image height.").optional(),
2254
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2255
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2256
+ }).describe("Member's profile photo.").optional(),
2257
+ cover: z.object({
2258
+ _id: z.string().describe(
2259
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2260
+ ).optional(),
2261
+ url: z.string().describe("Image URL.").optional(),
2262
+ height: z.number().int().describe("Original image width.").optional(),
2263
+ width: z.number().int().describe("Original image height.").optional(),
2264
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2265
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2266
+ }).describe(
2267
+ "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`."
2268
+ ).optional(),
2269
+ title: z.string().describe("Member title.").optional().nullable()
2270
+ }).describe("Profile display details.").optional(),
2271
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
2272
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
2273
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2274
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2275
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
2276
+ }).describe("Approved member.").optional()
2277
+ });
2278
+ var BlockMemberRequest = z.object({
2279
+ _id: z.string().describe("ID of a member to block.").regex(
2280
+ /^[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}$/,
2281
+ "Must be a valid GUID"
2282
+ )
2283
+ });
2284
+ var BlockMemberResponse = z.object({
2285
+ member: z.object({
2286
+ _id: z.string().describe("Member ID.").regex(
2287
+ /^[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}$/,
2288
+ "Must be a valid GUID"
2289
+ ).optional().nullable(),
2290
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2291
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2292
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
2293
+ contactId: z.string().describe("Contact ID.").regex(
2294
+ /^[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}$/,
2295
+ "Must be a valid GUID"
2296
+ ).optional().nullable(),
2297
+ contact: z.object({
2298
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2299
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2300
+ phones: z.array(z.string()).optional(),
2301
+ emails: z.array(z.string()).optional(),
2302
+ addresses: z.array(
2303
+ z.intersection(
2304
+ z.object({
2305
+ _id: z.string().describe("Street address ID.").regex(
2306
+ /^[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}$/,
2307
+ "Must be a valid GUID"
2308
+ ).optional().nullable(),
2309
+ addressLine2: z.string().describe(
2310
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2311
+ ).optional().nullable(),
2312
+ city: z.string().describe("City name.").optional().nullable(),
2313
+ subdivision: z.string().describe(
2314
+ "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."
2315
+ ).optional().nullable(),
2316
+ country: z.string().describe(
2317
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2318
+ ).optional().nullable(),
2319
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2320
+ }),
2321
+ z.xor([
2322
+ z.object({
2323
+ streetAddress: z.never().optional(),
2324
+ addressLine: z.never().optional()
2325
+ }),
2326
+ z.object({
2327
+ addressLine: z.never().optional(),
2328
+ streetAddress: z.object({
2329
+ number: z.string().describe("Street number.").max(100).optional(),
2330
+ name: z.string().describe("Street name.").max(200).optional()
2331
+ }).describe(
2332
+ "Street address object, with number and name in separate fields."
2333
+ )
2334
+ }),
2335
+ z.object({
2336
+ streetAddress: z.never().optional(),
2337
+ addressLine: z.string().describe(
2338
+ "Main address line, usually street and number, as free text."
2339
+ ).max(200)
2340
+ })
2341
+ ])
2342
+ )
2343
+ ).optional(),
2344
+ birthdate: z.string().describe(
2345
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
2346
+ ).max(100).optional().nullable(),
2347
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
2348
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
2349
+ customFields: z.record(
2350
+ z.string(),
2351
+ z.object({
2352
+ name: z.string().describe("Custom field name.").optional().nullable(),
2353
+ value: z.any().describe("Custom field value.").optional().nullable()
2354
+ })
2355
+ ).describe(
2356
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2357
+ ).optional()
2358
+ }).describe(
2359
+ "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)."
2360
+ ).optional(),
2361
+ profile: z.object({
2362
+ nickname: z.string().describe(
2363
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2364
+ ).optional().nullable(),
2365
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2366
+ photo: z.object({
2367
+ _id: z.string().describe(
2368
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2369
+ ).optional(),
2370
+ url: z.string().describe("Image URL.").optional(),
2371
+ height: z.number().int().describe("Original image width.").optional(),
2372
+ width: z.number().int().describe("Original image height.").optional(),
2373
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2374
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2375
+ }).describe("Member's profile photo.").optional(),
2376
+ cover: z.object({
2377
+ _id: z.string().describe(
2378
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2379
+ ).optional(),
2380
+ url: z.string().describe("Image URL.").optional(),
2381
+ height: z.number().int().describe("Original image width.").optional(),
2382
+ width: z.number().int().describe("Original image height.").optional(),
2383
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2384
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2385
+ }).describe(
2386
+ "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`."
2387
+ ).optional(),
2388
+ title: z.string().describe("Member title.").optional().nullable()
2389
+ }).describe("Profile display details.").optional(),
2390
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
2391
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
2392
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2393
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2394
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
2395
+ }).describe("Blocked member.").optional()
2396
+ });
2397
+ var DisconnectMemberRequest = z.object({
2398
+ _id: z.string().describe("ID of a member to disconnect.").regex(
2399
+ /^[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}$/,
2400
+ "Must be a valid GUID"
2401
+ )
2402
+ });
2403
+ var DisconnectMemberResponse = z.object({
2404
+ member: z.object({
2405
+ _id: z.string().describe("Member ID.").regex(
2406
+ /^[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}$/,
2407
+ "Must be a valid GUID"
2408
+ ).optional().nullable(),
2409
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2410
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2411
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
2412
+ contactId: z.string().describe("Contact ID.").regex(
2413
+ /^[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}$/,
2414
+ "Must be a valid GUID"
2415
+ ).optional().nullable(),
2416
+ contact: z.object({
2417
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2418
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2419
+ phones: z.array(z.string()).optional(),
2420
+ emails: z.array(z.string()).optional(),
2421
+ addresses: z.array(
2422
+ z.intersection(
2423
+ z.object({
2424
+ _id: z.string().describe("Street address ID.").regex(
2425
+ /^[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}$/,
2426
+ "Must be a valid GUID"
2427
+ ).optional().nullable(),
2428
+ addressLine2: z.string().describe(
2429
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2430
+ ).optional().nullable(),
2431
+ city: z.string().describe("City name.").optional().nullable(),
2432
+ subdivision: z.string().describe(
2433
+ "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."
2434
+ ).optional().nullable(),
2435
+ country: z.string().describe(
2436
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2437
+ ).optional().nullable(),
2438
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2439
+ }),
2440
+ z.xor([
2441
+ z.object({
2442
+ streetAddress: z.never().optional(),
2443
+ addressLine: z.never().optional()
2444
+ }),
2445
+ z.object({
2446
+ addressLine: z.never().optional(),
2447
+ streetAddress: z.object({
2448
+ number: z.string().describe("Street number.").max(100).optional(),
2449
+ name: z.string().describe("Street name.").max(200).optional()
2450
+ }).describe(
2451
+ "Street address object, with number and name in separate fields."
2452
+ )
2453
+ }),
2454
+ z.object({
2455
+ streetAddress: z.never().optional(),
2456
+ addressLine: z.string().describe(
2457
+ "Main address line, usually street and number, as free text."
2458
+ ).max(200)
2459
+ })
2460
+ ])
2461
+ )
2462
+ ).optional(),
2463
+ birthdate: z.string().describe(
2464
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
2465
+ ).max(100).optional().nullable(),
2466
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
2467
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
2468
+ customFields: z.record(
2469
+ z.string(),
2470
+ z.object({
2471
+ name: z.string().describe("Custom field name.").optional().nullable(),
2472
+ value: z.any().describe("Custom field value.").optional().nullable()
2473
+ })
2474
+ ).describe(
2475
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2476
+ ).optional()
2477
+ }).describe(
2478
+ "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)."
2479
+ ).optional(),
2480
+ profile: z.object({
2481
+ nickname: z.string().describe(
2482
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2483
+ ).optional().nullable(),
2484
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2485
+ photo: z.object({
2486
+ _id: z.string().describe(
2487
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2488
+ ).optional(),
2489
+ url: z.string().describe("Image URL.").optional(),
2490
+ height: z.number().int().describe("Original image width.").optional(),
2491
+ width: z.number().int().describe("Original image height.").optional(),
2492
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2493
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2494
+ }).describe("Member's profile photo.").optional(),
2495
+ cover: z.object({
2496
+ _id: z.string().describe(
2497
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2498
+ ).optional(),
2499
+ url: z.string().describe("Image URL.").optional(),
2500
+ height: z.number().int().describe("Original image width.").optional(),
2501
+ width: z.number().int().describe("Original image height.").optional(),
2502
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2503
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2504
+ }).describe(
2505
+ "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`."
2506
+ ).optional(),
2507
+ title: z.string().describe("Member title.").optional().nullable()
2508
+ }).describe("Profile display details.").optional(),
2509
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
2510
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
2511
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2512
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2513
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
2514
+ }).describe("Disconnected member.").optional()
2515
+ });
2516
+ var DeleteMemberRequest = z.object({
2517
+ _id: z.string().describe("ID of a member to delete.").regex(
2518
+ /^[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}$/,
2519
+ "Must be a valid GUID"
2520
+ )
2521
+ });
2522
+ var DeleteMemberResponse = z.object({});
2523
+ var DeleteMyMemberRequest = z.object({
2524
+ options: z.object({
2525
+ contentAssigneeId: z.string().describe("ID of a member receiving the deleted member's content.").regex(
2526
+ /^[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}$/,
2527
+ "Must be a valid GUID"
2528
+ ).optional().nullable()
2529
+ }).optional()
2530
+ });
2531
+ var DeleteMyMemberResponse = z.object({});
2532
+ var BulkDeleteMembersRequest = z.object({
2533
+ memberIds: z.array(z.string()).min(1).max(100)
2534
+ });
2535
+ var BulkDeleteMembersResponse = z.object({
2536
+ results: z.array(
2537
+ z.object({
2538
+ itemMetadata: z.object({
2539
+ _id: z.string().describe(
2540
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
2541
+ ).max(255).optional().nullable(),
2542
+ originalIndex: z.number().int().describe(
2543
+ "Index of the item within the request array. Allows for correlation between request and response items."
2544
+ ).optional(),
2545
+ success: z.boolean().describe(
2546
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
2547
+ ).optional(),
2548
+ error: z.object({
2549
+ code: z.string().describe("Error code.").optional(),
2550
+ description: z.string().describe("Description of the error.").optional(),
2551
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
2552
+ }).describe("Details about the error in case of failure.").optional()
2553
+ }).optional()
2554
+ })
2555
+ ).optional(),
2556
+ bulkActionMetadata: z.object({
2557
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
2558
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
2559
+ undetailedFailures: z.number().int().describe(
2560
+ "Number of failures without details because detailed failure threshold was exceeded."
2561
+ ).optional()
2562
+ }).describe("Bulk action result metadata.").optional()
2563
+ });
2564
+ var BulkDeleteMembersByFilterRequest = z.object({
2565
+ filter: z.any().describe(
2566
+ "Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details."
2567
+ ),
2568
+ options: z.object({
2569
+ contentAssigneeId: z.string().describe("ID of a member receiving the deleted member's content.").regex(
2570
+ /^[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}$/,
2571
+ "Must be a valid GUID"
2572
+ ).optional().nullable(),
2573
+ search: z.object({
2574
+ expression: z.string().describe("Search term or expression.").min(1).max(100).optional().nullable(),
2575
+ fields: z.array(z.string()).max(4).optional()
2576
+ }).describe("Plain text search.").optional()
2577
+ }).optional()
2578
+ });
2579
+ var BulkDeleteMembersByFilterResponse = z.object({
2580
+ jobId: z.string().describe(
2581
+ "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."
2582
+ ).optional()
2583
+ });
2584
+ var BulkApproveMembersRequest = z.object({
2585
+ filter: z.any().describe(
2586
+ "Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details."
2587
+ )
2588
+ });
2589
+ var BulkApproveMembersResponse = z.object({
2590
+ jobId: z.string().describe(
2591
+ "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."
2592
+ ).optional()
2593
+ });
2594
+ var BulkBlockMembersRequest = z.object({
2595
+ filter: z.any().describe(
2596
+ "Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details."
2597
+ )
2598
+ });
2599
+ var BulkBlockMembersResponse = z.object({
2600
+ jobId: z.string().describe(
2601
+ "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."
2602
+ ).optional()
2603
+ });
2604
+ var CreateMemberRequest = z.object({
2605
+ options: z.object({
2606
+ member: z.object({
2607
+ _id: z.string().describe("Member ID.").regex(
2608
+ /^[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}$/,
2609
+ "Must be a valid GUID"
2610
+ ).optional().nullable(),
2611
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2612
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2613
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).optional(),
2614
+ contactId: z.string().describe("Contact ID.").regex(
2615
+ /^[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}$/,
2616
+ "Must be a valid GUID"
2617
+ ).optional().nullable(),
2618
+ contact: z.object({
2619
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2620
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2621
+ phones: z.array(z.string()).optional(),
2622
+ emails: z.array(z.string()).optional(),
2623
+ addresses: z.array(
2624
+ z.intersection(
2625
+ z.object({
2626
+ _id: z.string().describe("Street address ID.").regex(
2627
+ /^[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}$/,
2628
+ "Must be a valid GUID"
2629
+ ).optional().nullable(),
2630
+ addressLine2: z.string().describe(
2631
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2632
+ ).optional().nullable(),
2633
+ city: z.string().describe("City name.").optional().nullable(),
2634
+ subdivision: z.string().describe(
2635
+ "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."
2636
+ ).optional().nullable(),
2637
+ country: z.string().describe(
2638
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2639
+ ).optional().nullable(),
2640
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2641
+ }),
2642
+ z.xor([
2643
+ z.object({
2644
+ streetAddress: z.never().optional(),
2645
+ addressLine: z.never().optional()
2646
+ }),
2647
+ z.object({
2648
+ addressLine: z.never().optional(),
2649
+ streetAddress: z.object({
2650
+ number: z.string().describe("Street number.").max(100).optional(),
2651
+ name: z.string().describe("Street name.").max(200).optional()
2652
+ }).describe(
2653
+ "Street address object, with number and name in separate fields."
2654
+ )
2655
+ }),
2656
+ z.object({
2657
+ streetAddress: z.never().optional(),
2658
+ addressLine: z.string().describe(
2659
+ "Main address line, usually street and number, as free text."
2660
+ ).max(200)
2661
+ })
2662
+ ])
2663
+ )
2664
+ ).optional(),
2665
+ birthdate: z.string().describe(
2666
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
2667
+ ).max(100).optional().nullable(),
2668
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
2669
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
2670
+ customFields: z.record(
2671
+ z.string(),
2672
+ z.object({
2673
+ name: z.string().describe("Custom field name.").optional().nullable(),
2674
+ value: z.any().describe("Custom field value.").optional().nullable()
2675
+ })
2676
+ ).describe(
2677
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2678
+ ).optional()
2679
+ }).describe(
2680
+ "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)."
2681
+ ).optional(),
2682
+ profile: z.object({
2683
+ nickname: z.string().describe(
2684
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2685
+ ).optional().nullable(),
2686
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2687
+ photo: z.object({
2688
+ _id: z.string().describe(
2689
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2690
+ ).optional(),
2691
+ url: z.string().describe("Image URL.").optional(),
2692
+ height: z.number().int().describe("Original image width.").optional(),
2693
+ width: z.number().int().describe("Original image height.").optional(),
2694
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2695
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2696
+ }).describe("Member's profile photo.").optional(),
2697
+ cover: z.object({
2698
+ _id: z.string().describe(
2699
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2700
+ ).optional(),
2701
+ url: z.string().describe("Image URL.").optional(),
2702
+ height: z.number().int().describe("Original image width.").optional(),
2703
+ width: z.number().int().describe("Original image height.").optional(),
2704
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2705
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2706
+ }).describe(
2707
+ "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`."
2708
+ ).optional(),
2709
+ title: z.string().describe("Member title.").optional().nullable()
2710
+ }).describe("Profile display details.").optional(),
2711
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).optional(),
2712
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).optional(),
2713
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2714
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2715
+ lastLoginDate: z.date().describe(
2716
+ "Date and time when the member last logged in to the site."
2717
+ ).optional().nullable()
2718
+ }).describe("Member to create.").optional()
2719
+ }).optional()
2720
+ });
2721
+ var CreateMemberResponse = z.object({
2722
+ _id: z.string().describe("Member ID.").regex(
2723
+ /^[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}$/,
2724
+ "Must be a valid GUID"
2725
+ ).optional().nullable(),
2726
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2727
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2728
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
2729
+ contactId: z.string().describe("Contact ID.").regex(
2730
+ /^[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}$/,
2731
+ "Must be a valid GUID"
2732
+ ).optional().nullable(),
2733
+ contact: z.object({
2734
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2735
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2736
+ phones: z.array(z.string()).optional(),
2737
+ emails: z.array(z.string()).optional(),
2738
+ addresses: z.array(
2739
+ z.intersection(
2740
+ z.object({
2741
+ _id: z.string().describe("Street address ID.").regex(
2742
+ /^[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}$/,
2743
+ "Must be a valid GUID"
2744
+ ).optional().nullable(),
2745
+ addressLine2: z.string().describe(
2746
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2747
+ ).optional().nullable(),
2748
+ city: z.string().describe("City name.").optional().nullable(),
2749
+ subdivision: z.string().describe(
2750
+ "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."
2751
+ ).optional().nullable(),
2752
+ country: z.string().describe(
2753
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2754
+ ).optional().nullable(),
2755
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2756
+ }),
2757
+ z.xor([
2758
+ z.object({
2759
+ streetAddress: z.never().optional(),
2760
+ addressLine: z.never().optional()
2761
+ }),
2762
+ z.object({
2763
+ addressLine: z.never().optional(),
2764
+ streetAddress: z.object({
2765
+ number: z.string().describe("Street number.").max(100).optional(),
2766
+ name: z.string().describe("Street name.").max(200).optional()
2767
+ }).describe(
2768
+ "Street address object, with number and name in separate fields."
2769
+ )
2770
+ }),
2771
+ z.object({
2772
+ streetAddress: z.never().optional(),
2773
+ addressLine: z.string().describe(
2774
+ "Main address line, usually street and number, as free text."
2775
+ ).max(200)
2776
+ })
2777
+ ])
2778
+ )
2779
+ ).optional(),
2780
+ birthdate: z.string().describe(
2781
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
2782
+ ).max(100).optional().nullable(),
2783
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
2784
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
2785
+ customFields: z.record(
2786
+ z.string(),
2787
+ z.object({
2788
+ name: z.string().describe("Custom field name.").optional().nullable(),
2789
+ value: z.any().describe("Custom field value.").optional().nullable()
2790
+ })
2791
+ ).describe(
2792
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2793
+ ).optional()
2794
+ }).describe(
2795
+ "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)."
2796
+ ).optional(),
2797
+ profile: z.object({
2798
+ nickname: z.string().describe(
2799
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2800
+ ).optional().nullable(),
2801
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2802
+ photo: z.object({
2803
+ _id: z.string().describe(
2804
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2805
+ ).optional(),
2806
+ url: z.string().describe("Image URL.").optional(),
2807
+ height: z.number().int().describe("Original image width.").optional(),
2808
+ width: z.number().int().describe("Original image height.").optional(),
2809
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2810
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2811
+ }).describe("Member's profile photo.").optional(),
2812
+ cover: z.object({
2813
+ _id: z.string().describe(
2814
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2815
+ ).optional(),
2816
+ url: z.string().describe("Image URL.").optional(),
2817
+ height: z.number().int().describe("Original image width.").optional(),
2818
+ width: z.number().int().describe("Original image height.").optional(),
2819
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2820
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2821
+ }).describe(
2822
+ "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`."
2823
+ ).optional(),
2824
+ title: z.string().describe("Member title.").optional().nullable()
2825
+ }).describe("Profile display details.").optional(),
2826
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
2827
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
2828
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2829
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2830
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
2831
+ });
2832
+ var UpdateMemberRequest = z.object({
2833
+ _id: z.string().describe("Member ID.").regex(
2834
+ /^[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}$/,
2835
+ "Must be a valid GUID"
2836
+ ),
2837
+ member: z.object({
2838
+ _id: z.string().describe("Member ID.").regex(
2839
+ /^[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}$/,
2840
+ "Must be a valid GUID"
2841
+ ).optional().nullable(),
2842
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2843
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2844
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).optional(),
2845
+ contactId: z.string().describe("Contact ID.").regex(
2846
+ /^[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}$/,
2847
+ "Must be a valid GUID"
2848
+ ).optional().nullable(),
2849
+ contact: z.object({
2850
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2851
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2852
+ phones: z.array(z.string()).optional(),
2853
+ emails: z.array(z.string()).optional(),
2854
+ addresses: z.array(
2855
+ z.intersection(
2856
+ z.object({
2857
+ _id: z.string().describe("Street address ID.").regex(
2858
+ /^[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}$/,
2859
+ "Must be a valid GUID"
2860
+ ).optional().nullable(),
2861
+ addressLine2: z.string().describe(
2862
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2863
+ ).optional().nullable(),
2864
+ city: z.string().describe("City name.").optional().nullable(),
2865
+ subdivision: z.string().describe(
2866
+ "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."
2867
+ ).optional().nullable(),
2868
+ country: z.string().describe(
2869
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2870
+ ).optional().nullable(),
2871
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2872
+ }),
2873
+ z.xor([
2874
+ z.object({
2875
+ streetAddress: z.never().optional(),
2876
+ addressLine: z.never().optional()
2877
+ }),
2878
+ z.object({
2879
+ addressLine: z.never().optional(),
2880
+ streetAddress: z.object({
2881
+ number: z.string().describe("Street number.").max(100).optional(),
2882
+ name: z.string().describe("Street name.").max(200).optional()
2883
+ }).describe(
2884
+ "Street address object, with number and name in separate fields."
2885
+ )
2886
+ }),
2887
+ z.object({
2888
+ streetAddress: z.never().optional(),
2889
+ addressLine: z.string().describe(
2890
+ "Main address line, usually street and number, as free text."
2891
+ ).max(200)
2892
+ })
2893
+ ])
2894
+ )
2895
+ ).optional(),
2896
+ birthdate: z.string().describe(
2897
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
2898
+ ).max(100).optional().nullable(),
2899
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
2900
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
2901
+ customFields: z.record(
2902
+ z.string(),
2903
+ z.object({
2904
+ name: z.string().describe("Custom field name.").optional().nullable(),
2905
+ value: z.any().describe("Custom field value.").optional().nullable()
2906
+ })
2907
+ ).describe(
2908
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
2909
+ ).optional()
2910
+ }).describe(
2911
+ "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)."
2912
+ ).optional(),
2913
+ profile: z.object({
2914
+ nickname: z.string().describe(
2915
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
2916
+ ).optional().nullable(),
2917
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
2918
+ photo: z.object({
2919
+ _id: z.string().describe(
2920
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2921
+ ).optional(),
2922
+ url: z.string().describe("Image URL.").optional(),
2923
+ height: z.number().int().describe("Original image width.").optional(),
2924
+ width: z.number().int().describe("Original image height.").optional(),
2925
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2926
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2927
+ }).describe("Member's profile photo.").optional(),
2928
+ cover: z.object({
2929
+ _id: z.string().describe(
2930
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
2931
+ ).optional(),
2932
+ url: z.string().describe("Image URL.").optional(),
2933
+ height: z.number().int().describe("Original image width.").optional(),
2934
+ width: z.number().int().describe("Original image height.").optional(),
2935
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
2936
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
2937
+ }).describe(
2938
+ "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`."
2939
+ ).optional(),
2940
+ title: z.string().describe("Member title.").optional().nullable()
2941
+ }).describe("Profile display details.").optional(),
2942
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).optional(),
2943
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).optional(),
2944
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
2945
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
2946
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
2947
+ }).describe("Member info to update.")
2948
+ });
2949
+ var UpdateMemberResponse = z.object({
2950
+ _id: z.string().describe("Member ID.").regex(
2951
+ /^[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}$/,
2952
+ "Must be a valid GUID"
2953
+ ).optional().nullable(),
2954
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
2955
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
2956
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
2957
+ contactId: z.string().describe("Contact ID.").regex(
2958
+ /^[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}$/,
2959
+ "Must be a valid GUID"
2960
+ ).optional().nullable(),
2961
+ contact: z.object({
2962
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
2963
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
2964
+ phones: z.array(z.string()).optional(),
2965
+ emails: z.array(z.string()).optional(),
2966
+ addresses: z.array(
2967
+ z.intersection(
2968
+ z.object({
2969
+ _id: z.string().describe("Street address ID.").regex(
2970
+ /^[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}$/,
2971
+ "Must be a valid GUID"
2972
+ ).optional().nullable(),
2973
+ addressLine2: z.string().describe(
2974
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
2975
+ ).optional().nullable(),
2976
+ city: z.string().describe("City name.").optional().nullable(),
2977
+ subdivision: z.string().describe(
2978
+ "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."
2979
+ ).optional().nullable(),
2980
+ country: z.string().describe(
2981
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
2982
+ ).optional().nullable(),
2983
+ postalCode: z.string().describe("Postal code.").optional().nullable()
2984
+ }),
2985
+ z.xor([
2986
+ z.object({
2987
+ streetAddress: z.never().optional(),
2988
+ addressLine: z.never().optional()
2989
+ }),
2990
+ z.object({
2991
+ addressLine: z.never().optional(),
2992
+ streetAddress: z.object({
2993
+ number: z.string().describe("Street number.").max(100).optional(),
2994
+ name: z.string().describe("Street name.").max(200).optional()
2995
+ }).describe(
2996
+ "Street address object, with number and name in separate fields."
2997
+ )
2998
+ }),
2999
+ z.object({
3000
+ streetAddress: z.never().optional(),
3001
+ addressLine: z.string().describe(
3002
+ "Main address line, usually street and number, as free text."
3003
+ ).max(200)
3004
+ })
3005
+ ])
3006
+ )
3007
+ ).optional(),
3008
+ birthdate: z.string().describe(
3009
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
3010
+ ).max(100).optional().nullable(),
3011
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
3012
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
3013
+ customFields: z.record(
3014
+ z.string(),
3015
+ z.object({
3016
+ name: z.string().describe("Custom field name.").optional().nullable(),
3017
+ value: z.any().describe("Custom field value.").optional().nullable()
3018
+ })
3019
+ ).describe(
3020
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
3021
+ ).optional()
3022
+ }).describe(
3023
+ "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)."
3024
+ ).optional(),
3025
+ profile: z.object({
3026
+ nickname: z.string().describe(
3027
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
3028
+ ).optional().nullable(),
3029
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
3030
+ photo: z.object({
3031
+ _id: z.string().describe(
3032
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3033
+ ).optional(),
3034
+ url: z.string().describe("Image URL.").optional(),
3035
+ height: z.number().int().describe("Original image width.").optional(),
3036
+ width: z.number().int().describe("Original image height.").optional(),
3037
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3038
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3039
+ }).describe("Member's profile photo.").optional(),
3040
+ cover: z.object({
3041
+ _id: z.string().describe(
3042
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3043
+ ).optional(),
3044
+ url: z.string().describe("Image URL.").optional(),
3045
+ height: z.number().int().describe("Original image width.").optional(),
3046
+ width: z.number().int().describe("Original image height.").optional(),
3047
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3048
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3049
+ }).describe(
3050
+ "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`."
3051
+ ).optional(),
3052
+ title: z.string().describe("Member title.").optional().nullable()
3053
+ }).describe("Profile display details.").optional(),
3054
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
3055
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
3056
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
3057
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
3058
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
3059
+ });
3060
+ var DeleteMemberPhonesRequest = z.object({
3061
+ _id: z.string().describe("ID of the member whose phone numbers will be deleted.").regex(
3062
+ /^[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}$/,
3063
+ "Must be a valid GUID"
3064
+ )
3065
+ });
3066
+ var DeleteMemberPhonesResponse = z.object({
3067
+ member: z.object({
3068
+ _id: z.string().describe("Member ID.").regex(
3069
+ /^[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}$/,
3070
+ "Must be a valid GUID"
3071
+ ).optional().nullable(),
3072
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
3073
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
3074
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
3075
+ contactId: z.string().describe("Contact ID.").regex(
3076
+ /^[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}$/,
3077
+ "Must be a valid GUID"
3078
+ ).optional().nullable(),
3079
+ contact: z.object({
3080
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
3081
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
3082
+ phones: z.array(z.string()).optional(),
3083
+ emails: z.array(z.string()).optional(),
3084
+ addresses: z.array(
3085
+ z.intersection(
3086
+ z.object({
3087
+ _id: z.string().describe("Street address ID.").regex(
3088
+ /^[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}$/,
3089
+ "Must be a valid GUID"
3090
+ ).optional().nullable(),
3091
+ addressLine2: z.string().describe(
3092
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
3093
+ ).optional().nullable(),
3094
+ city: z.string().describe("City name.").optional().nullable(),
3095
+ subdivision: z.string().describe(
3096
+ "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."
3097
+ ).optional().nullable(),
3098
+ country: z.string().describe(
3099
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
3100
+ ).optional().nullable(),
3101
+ postalCode: z.string().describe("Postal code.").optional().nullable()
3102
+ }),
3103
+ z.xor([
3104
+ z.object({
3105
+ streetAddress: z.never().optional(),
3106
+ addressLine: z.never().optional()
3107
+ }),
3108
+ z.object({
3109
+ addressLine: z.never().optional(),
3110
+ streetAddress: z.object({
3111
+ number: z.string().describe("Street number.").max(100).optional(),
3112
+ name: z.string().describe("Street name.").max(200).optional()
3113
+ }).describe(
3114
+ "Street address object, with number and name in separate fields."
3115
+ )
3116
+ }),
3117
+ z.object({
3118
+ streetAddress: z.never().optional(),
3119
+ addressLine: z.string().describe(
3120
+ "Main address line, usually street and number, as free text."
3121
+ ).max(200)
3122
+ })
3123
+ ])
3124
+ )
3125
+ ).optional(),
3126
+ birthdate: z.string().describe(
3127
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
3128
+ ).max(100).optional().nullable(),
3129
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
3130
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
3131
+ customFields: z.record(
3132
+ z.string(),
3133
+ z.object({
3134
+ name: z.string().describe("Custom field name.").optional().nullable(),
3135
+ value: z.any().describe("Custom field value.").optional().nullable()
3136
+ })
3137
+ ).describe(
3138
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
3139
+ ).optional()
3140
+ }).describe(
3141
+ "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)."
3142
+ ).optional(),
3143
+ profile: z.object({
3144
+ nickname: z.string().describe(
3145
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
3146
+ ).optional().nullable(),
3147
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
3148
+ photo: z.object({
3149
+ _id: z.string().describe(
3150
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3151
+ ).optional(),
3152
+ url: z.string().describe("Image URL.").optional(),
3153
+ height: z.number().int().describe("Original image width.").optional(),
3154
+ width: z.number().int().describe("Original image height.").optional(),
3155
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3156
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3157
+ }).describe("Member's profile photo.").optional(),
3158
+ cover: z.object({
3159
+ _id: z.string().describe(
3160
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3161
+ ).optional(),
3162
+ url: z.string().describe("Image URL.").optional(),
3163
+ height: z.number().int().describe("Original image width.").optional(),
3164
+ width: z.number().int().describe("Original image height.").optional(),
3165
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3166
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3167
+ }).describe(
3168
+ "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`."
3169
+ ).optional(),
3170
+ title: z.string().describe("Member title.").optional().nullable()
3171
+ }).describe("Profile display details.").optional(),
3172
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
3173
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
3174
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
3175
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
3176
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
3177
+ }).describe("Updated member.").optional()
3178
+ });
3179
+ var DeleteMemberEmailsRequest = z.object({
3180
+ _id: z.string().describe("ID of the member whose email addresses will be deleted.").regex(
3181
+ /^[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}$/,
3182
+ "Must be a valid GUID"
3183
+ )
3184
+ });
3185
+ var DeleteMemberEmailsResponse = z.object({
3186
+ member: z.object({
3187
+ _id: z.string().describe("Member ID.").regex(
3188
+ /^[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}$/,
3189
+ "Must be a valid GUID"
3190
+ ).optional().nullable(),
3191
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
3192
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
3193
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
3194
+ contactId: z.string().describe("Contact ID.").regex(
3195
+ /^[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}$/,
3196
+ "Must be a valid GUID"
3197
+ ).optional().nullable(),
3198
+ contact: z.object({
3199
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
3200
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
3201
+ phones: z.array(z.string()).optional(),
3202
+ emails: z.array(z.string()).optional(),
3203
+ addresses: z.array(
3204
+ z.intersection(
3205
+ z.object({
3206
+ _id: z.string().describe("Street address ID.").regex(
3207
+ /^[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}$/,
3208
+ "Must be a valid GUID"
3209
+ ).optional().nullable(),
3210
+ addressLine2: z.string().describe(
3211
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
3212
+ ).optional().nullable(),
3213
+ city: z.string().describe("City name.").optional().nullable(),
3214
+ subdivision: z.string().describe(
3215
+ "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."
3216
+ ).optional().nullable(),
3217
+ country: z.string().describe(
3218
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
3219
+ ).optional().nullable(),
3220
+ postalCode: z.string().describe("Postal code.").optional().nullable()
3221
+ }),
3222
+ z.xor([
3223
+ z.object({
3224
+ streetAddress: z.never().optional(),
3225
+ addressLine: z.never().optional()
3226
+ }),
3227
+ z.object({
3228
+ addressLine: z.never().optional(),
3229
+ streetAddress: z.object({
3230
+ number: z.string().describe("Street number.").max(100).optional(),
3231
+ name: z.string().describe("Street name.").max(200).optional()
3232
+ }).describe(
3233
+ "Street address object, with number and name in separate fields."
3234
+ )
3235
+ }),
3236
+ z.object({
3237
+ streetAddress: z.never().optional(),
3238
+ addressLine: z.string().describe(
3239
+ "Main address line, usually street and number, as free text."
3240
+ ).max(200)
3241
+ })
3242
+ ])
3243
+ )
3244
+ ).optional(),
3245
+ birthdate: z.string().describe(
3246
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
3247
+ ).max(100).optional().nullable(),
3248
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
3249
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
3250
+ customFields: z.record(
3251
+ z.string(),
3252
+ z.object({
3253
+ name: z.string().describe("Custom field name.").optional().nullable(),
3254
+ value: z.any().describe("Custom field value.").optional().nullable()
3255
+ })
3256
+ ).describe(
3257
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
3258
+ ).optional()
3259
+ }).describe(
3260
+ "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)."
3261
+ ).optional(),
3262
+ profile: z.object({
3263
+ nickname: z.string().describe(
3264
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
3265
+ ).optional().nullable(),
3266
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
3267
+ photo: z.object({
3268
+ _id: z.string().describe(
3269
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3270
+ ).optional(),
3271
+ url: z.string().describe("Image URL.").optional(),
3272
+ height: z.number().int().describe("Original image width.").optional(),
3273
+ width: z.number().int().describe("Original image height.").optional(),
3274
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3275
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3276
+ }).describe("Member's profile photo.").optional(),
3277
+ cover: z.object({
3278
+ _id: z.string().describe(
3279
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3280
+ ).optional(),
3281
+ url: z.string().describe("Image URL.").optional(),
3282
+ height: z.number().int().describe("Original image width.").optional(),
3283
+ width: z.number().int().describe("Original image height.").optional(),
3284
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3285
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3286
+ }).describe(
3287
+ "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`."
3288
+ ).optional(),
3289
+ title: z.string().describe("Member title.").optional().nullable()
3290
+ }).describe("Profile display details.").optional(),
3291
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
3292
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
3293
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
3294
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
3295
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
3296
+ }).describe("Updated member.").optional()
3297
+ });
3298
+ var DeleteMemberAddressesRequest = z.object({
3299
+ _id: z.string().describe("ID of the member whose street addresses will be deleted.").regex(
3300
+ /^[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}$/,
3301
+ "Must be a valid GUID"
3302
+ )
3303
+ });
3304
+ var DeleteMemberAddressesResponse = z.object({
3305
+ member: z.object({
3306
+ _id: z.string().describe("Member ID.").regex(
3307
+ /^[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}$/,
3308
+ "Must be a valid GUID"
3309
+ ).optional().nullable(),
3310
+ loginEmail: z.string().describe("Email used by a member to log in to the site.").email().optional().nullable(),
3311
+ loginEmailVerified: z.boolean().describe("Whether the email used by a member has been verified.").optional().nullable(),
3312
+ status: z.enum(["UNKNOWN", "PENDING", "APPROVED", "BLOCKED", "OFFLINE"]).describe("Member site access status.").optional(),
3313
+ contactId: z.string().describe("Contact ID.").regex(
3314
+ /^[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}$/,
3315
+ "Must be a valid GUID"
3316
+ ).optional().nullable(),
3317
+ contact: z.object({
3318
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
3319
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
3320
+ phones: z.array(z.string()).optional(),
3321
+ emails: z.array(z.string()).optional(),
3322
+ addresses: z.array(
3323
+ z.intersection(
3324
+ z.object({
3325
+ _id: z.string().describe("Street address ID.").regex(
3326
+ /^[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}$/,
3327
+ "Must be a valid GUID"
3328
+ ).optional().nullable(),
3329
+ addressLine2: z.string().describe(
3330
+ "Free text providing more detailed address information,\nsuch as apartment, suite, or floor."
3331
+ ).optional().nullable(),
3332
+ city: z.string().describe("City name.").optional().nullable(),
3333
+ subdivision: z.string().describe(
3334
+ "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."
3335
+ ).optional().nullable(),
3336
+ country: z.string().describe(
3337
+ "2-letter country code in an\n[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format."
3338
+ ).optional().nullable(),
3339
+ postalCode: z.string().describe("Postal code.").optional().nullable()
3340
+ }),
3341
+ z.xor([
3342
+ z.object({
3343
+ streetAddress: z.never().optional(),
3344
+ addressLine: z.never().optional()
3345
+ }),
3346
+ z.object({
3347
+ addressLine: z.never().optional(),
3348
+ streetAddress: z.object({
3349
+ number: z.string().describe("Street number.").max(100).optional(),
3350
+ name: z.string().describe("Street name.").max(200).optional()
3351
+ }).describe(
3352
+ "Street address object, with number and name in separate fields."
3353
+ )
3354
+ }),
3355
+ z.object({
3356
+ streetAddress: z.never().optional(),
3357
+ addressLine: z.string().describe(
3358
+ "Main address line, usually street and number, as free text."
3359
+ ).max(200)
3360
+ })
3361
+ ])
3362
+ )
3363
+ ).optional(),
3364
+ birthdate: z.string().describe(
3365
+ 'Contact\'s birthdate, formatted as `"YYYY-MM-DD"`.\n\nExample: `"2020-03-15"` for March 15, 2020.'
3366
+ ).max(100).optional().nullable(),
3367
+ company: z.string().describe("Contact's company name.").max(100).optional().nullable(),
3368
+ jobTitle: z.string().describe("Contact's job title.").max(100).optional().nullable(),
3369
+ customFields: z.record(
3370
+ z.string(),
3371
+ z.object({
3372
+ name: z.string().describe("Custom field name.").optional().nullable(),
3373
+ value: z.any().describe("Custom field value.").optional().nullable()
3374
+ })
3375
+ ).describe(
3376
+ "Custom fields,\nwhere each key is the field key,\nand each value is the field's value for the member."
3377
+ ).optional()
3378
+ }).describe(
3379
+ "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)."
3380
+ ).optional(),
3381
+ profile: z.object({
3382
+ nickname: z.string().describe(
3383
+ "Name that identifies the member to other members.\nDisplayed on the member's profile page\nand interactions in the forum or blog."
3384
+ ).optional().nullable(),
3385
+ slug: z.string().describe("Slug that determines the member's profile page URL.").optional().nullable(),
3386
+ photo: z.object({
3387
+ _id: z.string().describe(
3388
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3389
+ ).optional(),
3390
+ url: z.string().describe("Image URL.").optional(),
3391
+ height: z.number().int().describe("Original image width.").optional(),
3392
+ width: z.number().int().describe("Original image height.").optional(),
3393
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3394
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3395
+ }).describe("Member's profile photo.").optional(),
3396
+ cover: z.object({
3397
+ _id: z.string().describe(
3398
+ "Wix Media image ID,\nset when the member selects an image from Wix Media."
3399
+ ).optional(),
3400
+ url: z.string().describe("Image URL.").optional(),
3401
+ height: z.number().int().describe("Original image width.").optional(),
3402
+ width: z.number().int().describe("Original image height.").optional(),
3403
+ offsetX: z.number().int().describe("X-axis offset.\n\nDefault: `0`.").optional().nullable(),
3404
+ offsetY: z.number().int().describe("Y-axis offset.\n\nDefault: `0`.").optional().nullable()
3405
+ }).describe(
3406
+ "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`."
3407
+ ).optional(),
3408
+ title: z.string().describe("Member title.").optional().nullable()
3409
+ }).describe("Profile display details.").optional(),
3410
+ privacyStatus: z.enum(["UNKNOWN", "PRIVATE", "PUBLIC"]).describe("Member privacy status.").optional(),
3411
+ activityStatus: z.enum(["UNKNOWN", "ACTIVE", "MUTED"]).describe("Member activity status.").optional(),
3412
+ _createdDate: z.date().describe("Date and time when the member was created.").optional().nullable(),
3413
+ _updatedDate: z.date().describe("Date and time when the member was updated.").optional().nullable(),
3414
+ lastLoginDate: z.date().describe("Date and time when the member last logged in to the site.").optional().nullable()
3415
+ }).describe("Updated member.").optional()
3416
+ });
3417
+
3418
+ // src/members-v1-member-members.universal.ts
812
3419
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
813
3420
  var Status = /* @__PURE__ */ ((Status2) => {
814
3421
  Status2["UNKNOWN"] = "UNKNOWN";
@@ -913,7 +3520,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
913
3520
  return WebhookIdentityType2;
914
3521
  })(WebhookIdentityType || {});
915
3522
  async function updateCurrentMemberSlug(slug) {
916
- const { httpClient, sideEffects } = arguments[1];
3523
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3524
+ if (validateRequestSchema) {
3525
+ UpdateCurrentMemberSlugRequest.parse({ slug });
3526
+ }
917
3527
  const payload = renameKeysFromSDKRequestToRESTRequest({ slug });
918
3528
  const reqOpts = updateMySlug(payload);
919
3529
  sideEffects?.onSiteCall?.();
@@ -936,7 +3546,10 @@ async function updateCurrentMemberSlug(slug) {
936
3546
  }
937
3547
  }
938
3548
  async function updateMemberSlug2(_id, slug) {
939
- const { httpClient, sideEffects } = arguments[2];
3549
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
3550
+ if (validateRequestSchema) {
3551
+ UpdateMemberSlugRequest.parse({ _id, slug });
3552
+ }
940
3553
  const payload = renameKeysFromSDKRequestToRESTRequest({
941
3554
  id: _id,
942
3555
  slug
@@ -962,7 +3575,10 @@ async function updateMemberSlug2(_id, slug) {
962
3575
  }
963
3576
  }
964
3577
  async function joinCommunity2() {
965
- const { httpClient, sideEffects } = arguments[0];
3578
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[0];
3579
+ if (validateRequestSchema) {
3580
+ JoinCommunityRequest.parse({});
3581
+ }
966
3582
  const payload = renameKeysFromSDKRequestToRESTRequest({});
967
3583
  const reqOpts = joinCommunity(payload);
968
3584
  sideEffects?.onSiteCall?.();
@@ -985,7 +3601,10 @@ async function joinCommunity2() {
985
3601
  }
986
3602
  }
987
3603
  async function leaveCommunity2() {
988
- const { httpClient, sideEffects } = arguments[0];
3604
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[0];
3605
+ if (validateRequestSchema) {
3606
+ LeaveCommunityRequest.parse({});
3607
+ }
989
3608
  const payload = renameKeysFromSDKRequestToRESTRequest({});
990
3609
  const reqOpts = leaveCommunity(payload);
991
3610
  sideEffects?.onSiteCall?.();
@@ -1008,7 +3627,10 @@ async function leaveCommunity2() {
1008
3627
  }
1009
3628
  }
1010
3629
  async function getCurrentMember(options) {
1011
- const { httpClient, sideEffects } = arguments[1];
3630
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3631
+ if (validateRequestSchema) {
3632
+ GetCurrentMemberRequest.parse({ options });
3633
+ }
1012
3634
  const payload = renameKeysFromSDKRequestToRESTRequest({
1013
3635
  fieldsets: options?.fieldsets
1014
3636
  });
@@ -1033,7 +3655,10 @@ async function getCurrentMember(options) {
1033
3655
  }
1034
3656
  }
1035
3657
  async function getMember2(_id, options) {
1036
- const { httpClient, sideEffects } = arguments[2];
3658
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
3659
+ if (validateRequestSchema) {
3660
+ GetMemberRequest.parse({ _id, options });
3661
+ }
1037
3662
  const payload = renameKeysFromSDKRequestToRESTRequest({
1038
3663
  id: _id,
1039
3664
  fieldsets: options?.fieldsets
@@ -1059,7 +3684,10 @@ async function getMember2(_id, options) {
1059
3684
  }
1060
3685
  }
1061
3686
  async function listMembers2(options) {
1062
- const { httpClient, sideEffects } = arguments[1];
3687
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3688
+ if (validateRequestSchema) {
3689
+ ListMembersRequest.parse({ options });
3690
+ }
1063
3691
  const payload = renameKeysFromSDKRequestToRESTRequest({
1064
3692
  paging: options?.paging,
1065
3693
  fieldsets: options?.fieldsets,
@@ -1136,7 +3764,10 @@ function queryMembers2(options) {
1136
3764
  });
1137
3765
  }
1138
3766
  async function typedQueryMembers(query, options) {
1139
- const { httpClient, sideEffects } = arguments[2];
3767
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
3768
+ if (validateRequestSchema) {
3769
+ QueryMembersRequest.parse({ query, options });
3770
+ }
1140
3771
  const payload = renameKeysFromSDKRequestToRESTRequest({
1141
3772
  query,
1142
3773
  ...options
@@ -1167,7 +3798,10 @@ var utils = {
1167
3798
  }
1168
3799
  };
1169
3800
  async function muteMember2(_id) {
1170
- const { httpClient, sideEffects } = arguments[1];
3801
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3802
+ if (validateRequestSchema) {
3803
+ MuteMemberRequest.parse({ _id });
3804
+ }
1171
3805
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1172
3806
  const reqOpts = muteMember(payload);
1173
3807
  sideEffects?.onSiteCall?.();
@@ -1190,7 +3824,10 @@ async function muteMember2(_id) {
1190
3824
  }
1191
3825
  }
1192
3826
  async function unmuteMember2(_id) {
1193
- const { httpClient, sideEffects } = arguments[1];
3827
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3828
+ if (validateRequestSchema) {
3829
+ UnmuteMemberRequest.parse({ _id });
3830
+ }
1194
3831
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1195
3832
  const reqOpts = unmuteMember(payload);
1196
3833
  sideEffects?.onSiteCall?.();
@@ -1213,7 +3850,10 @@ async function unmuteMember2(_id) {
1213
3850
  }
1214
3851
  }
1215
3852
  async function approveMember2(_id) {
1216
- const { httpClient, sideEffects } = arguments[1];
3853
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3854
+ if (validateRequestSchema) {
3855
+ ApproveMemberRequest.parse({ _id });
3856
+ }
1217
3857
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1218
3858
  const reqOpts = approveMember(payload);
1219
3859
  sideEffects?.onSiteCall?.();
@@ -1236,7 +3876,10 @@ async function approveMember2(_id) {
1236
3876
  }
1237
3877
  }
1238
3878
  async function blockMember2(_id) {
1239
- const { httpClient, sideEffects } = arguments[1];
3879
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3880
+ if (validateRequestSchema) {
3881
+ BlockMemberRequest.parse({ _id });
3882
+ }
1240
3883
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1241
3884
  const reqOpts = blockMember(payload);
1242
3885
  sideEffects?.onSiteCall?.();
@@ -1259,7 +3902,10 @@ async function blockMember2(_id) {
1259
3902
  }
1260
3903
  }
1261
3904
  async function disconnectMember2(_id) {
1262
- const { httpClient, sideEffects } = arguments[1];
3905
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3906
+ if (validateRequestSchema) {
3907
+ DisconnectMemberRequest.parse({ _id });
3908
+ }
1263
3909
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1264
3910
  const reqOpts = disconnectMember(payload);
1265
3911
  sideEffects?.onSiteCall?.();
@@ -1282,7 +3928,10 @@ async function disconnectMember2(_id) {
1282
3928
  }
1283
3929
  }
1284
3930
  async function deleteMember2(_id) {
1285
- const { httpClient, sideEffects } = arguments[1];
3931
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3932
+ if (validateRequestSchema) {
3933
+ DeleteMemberRequest.parse({ _id });
3934
+ }
1286
3935
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1287
3936
  const reqOpts = deleteMember(payload);
1288
3937
  sideEffects?.onSiteCall?.();
@@ -1305,7 +3954,10 @@ async function deleteMember2(_id) {
1305
3954
  }
1306
3955
  }
1307
3956
  async function deleteMyMember2(options) {
1308
- const { httpClient, sideEffects } = arguments[1];
3957
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3958
+ if (validateRequestSchema) {
3959
+ DeleteMyMemberRequest.parse({ options });
3960
+ }
1309
3961
  const payload = renameKeysFromSDKRequestToRESTRequest({
1310
3962
  contentAssigneeId: options?.contentAssigneeId
1311
3963
  });
@@ -1332,7 +3984,10 @@ async function deleteMyMember2(options) {
1332
3984
  }
1333
3985
  }
1334
3986
  async function bulkDeleteMembers2(memberIds) {
1335
- const { httpClient, sideEffects } = arguments[1];
3987
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
3988
+ if (validateRequestSchema) {
3989
+ BulkDeleteMembersRequest.parse({ memberIds });
3990
+ }
1336
3991
  const payload = renameKeysFromSDKRequestToRESTRequest({
1337
3992
  memberIds
1338
3993
  });
@@ -1357,7 +4012,10 @@ async function bulkDeleteMembers2(memberIds) {
1357
4012
  }
1358
4013
  }
1359
4014
  async function bulkDeleteMembersByFilter2(filter, options) {
1360
- const { httpClient, sideEffects } = arguments[2];
4015
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
4016
+ if (validateRequestSchema) {
4017
+ BulkDeleteMembersByFilterRequest.parse({ filter, options });
4018
+ }
1361
4019
  const payload = renameKeysFromSDKRequestToRESTRequest({
1362
4020
  filter,
1363
4021
  contentAssigneeId: options?.contentAssigneeId,
@@ -1388,7 +4046,10 @@ async function bulkDeleteMembersByFilter2(filter, options) {
1388
4046
  }
1389
4047
  }
1390
4048
  async function bulkApproveMembers2(filter) {
1391
- const { httpClient, sideEffects } = arguments[1];
4049
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4050
+ if (validateRequestSchema) {
4051
+ BulkApproveMembersRequest.parse({ filter });
4052
+ }
1392
4053
  const payload = renameKeysFromSDKRequestToRESTRequest({ filter });
1393
4054
  const reqOpts = bulkApproveMembers(payload);
1394
4055
  sideEffects?.onSiteCall?.();
@@ -1411,7 +4072,10 @@ async function bulkApproveMembers2(filter) {
1411
4072
  }
1412
4073
  }
1413
4074
  async function bulkBlockMembers2(filter) {
1414
- const { httpClient, sideEffects } = arguments[1];
4075
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4076
+ if (validateRequestSchema) {
4077
+ BulkBlockMembersRequest.parse({ filter });
4078
+ }
1415
4079
  const payload = renameKeysFromSDKRequestToRESTRequest({ filter });
1416
4080
  const reqOpts = bulkBlockMembers(payload);
1417
4081
  sideEffects?.onSiteCall?.();
@@ -1434,7 +4098,10 @@ async function bulkBlockMembers2(filter) {
1434
4098
  }
1435
4099
  }
1436
4100
  async function createMember2(options) {
1437
- const { httpClient, sideEffects } = arguments[1];
4101
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4102
+ if (validateRequestSchema) {
4103
+ CreateMemberRequest.parse({ options });
4104
+ }
1438
4105
  const payload = renameKeysFromSDKRequestToRESTRequest({
1439
4106
  member: options?.member
1440
4107
  });
@@ -1459,7 +4126,10 @@ async function createMember2(options) {
1459
4126
  }
1460
4127
  }
1461
4128
  async function updateMember2(_id, member) {
1462
- const { httpClient, sideEffects } = arguments[2];
4129
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
4130
+ if (validateRequestSchema) {
4131
+ UpdateMemberRequest.parse({ _id, member });
4132
+ }
1463
4133
  const payload = renameKeysFromSDKRequestToRESTRequest({
1464
4134
  member: { ...member, id: _id }
1465
4135
  });
@@ -1484,7 +4154,10 @@ async function updateMember2(_id, member) {
1484
4154
  }
1485
4155
  }
1486
4156
  async function deleteMemberPhones2(_id) {
1487
- const { httpClient, sideEffects } = arguments[1];
4157
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4158
+ if (validateRequestSchema) {
4159
+ DeleteMemberPhonesRequest.parse({ _id });
4160
+ }
1488
4161
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1489
4162
  const reqOpts = deleteMemberPhones(payload);
1490
4163
  sideEffects?.onSiteCall?.();
@@ -1507,7 +4180,10 @@ async function deleteMemberPhones2(_id) {
1507
4180
  }
1508
4181
  }
1509
4182
  async function deleteMemberEmails2(_id) {
1510
- const { httpClient, sideEffects } = arguments[1];
4183
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4184
+ if (validateRequestSchema) {
4185
+ DeleteMemberEmailsRequest.parse({ _id });
4186
+ }
1511
4187
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1512
4188
  const reqOpts = deleteMemberEmails(payload);
1513
4189
  sideEffects?.onSiteCall?.();
@@ -1530,7 +4206,10 @@ async function deleteMemberEmails2(_id) {
1530
4206
  }
1531
4207
  }
1532
4208
  async function deleteMemberAddresses2(_id) {
1533
- const { httpClient, sideEffects } = arguments[1];
4209
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
4210
+ if (validateRequestSchema) {
4211
+ DeleteMemberAddressesRequest.parse({ _id });
4212
+ }
1534
4213
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1535
4214
  const reqOpts = deleteMemberAddresses(payload);
1536
4215
  sideEffects?.onSiteCall?.();