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