@wix/auto_sdk_groups_membership-questions 1.0.3 → 1.0.4
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 +51 -1
- package/build/cjs/index.js +310 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +185 -1
- package/build/cjs/index.typings.js +279 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +132 -1
- package/build/cjs/meta.js +246 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +51 -0
- package/build/es/index.mjs +287 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/social-groups-v2-membership-question-membership-questions.universal.d.ts → es/index.typings.d.mts} +22 -20
- package/build/es/index.typings.mjs +256 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/{src/social-groups-v2-membership-question-membership-questions.types.d.ts → meta.d.mts} +36 -28
- package/build/es/meta.mjs +220 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +51 -1
- package/build/internal/cjs/index.js +310 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +185 -1
- package/build/internal/cjs/index.typings.js +279 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +132 -1
- package/build/internal/cjs/meta.js +246 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +51 -0
- package/build/internal/es/index.mjs +287 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/{es/src/social-groups-v2-membership-question-membership-questions.universal.d.ts → internal/es/index.typings.d.mts} +22 -20
- package/build/internal/es/index.typings.mjs +256 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/{cjs/src/social-groups-v2-membership-question-membership-questions.types.d.ts → es/meta.d.mts} +36 -28
- package/build/internal/es/meta.mjs +220 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +11 -9
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.context.d.ts +0 -6
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.context.js +0 -9
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.context.js.map +0 -1
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.http.d.ts +0 -25
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.http.js +0 -181
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.http.js.map +0 -1
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.meta.d.ts +0 -21
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.meta.js +0 -85
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.meta.js.map +0 -1
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.public.d.ts +0 -42
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.public.js +0 -24
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.public.js.map +0 -1
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.types.d.ts +0 -124
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.types.js +0 -3
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.types.js.map +0 -1
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.universal.d.ts +0 -183
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.universal.js +0 -143
- package/build/cjs/src/social-groups-v2-membership-question-membership-questions.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/social-groups-v2-membership-question-membership-questions.context.d.ts +0 -6
- package/build/es/src/social-groups-v2-membership-question-membership-questions.context.js +0 -6
- package/build/es/src/social-groups-v2-membership-question-membership-questions.context.js.map +0 -1
- package/build/es/src/social-groups-v2-membership-question-membership-questions.http.d.ts +0 -25
- package/build/es/src/social-groups-v2-membership-question-membership-questions.http.js +0 -175
- package/build/es/src/social-groups-v2-membership-question-membership-questions.http.js.map +0 -1
- package/build/es/src/social-groups-v2-membership-question-membership-questions.meta.d.ts +0 -21
- package/build/es/src/social-groups-v2-membership-question-membership-questions.meta.js +0 -56
- package/build/es/src/social-groups-v2-membership-question-membership-questions.meta.js.map +0 -1
- package/build/es/src/social-groups-v2-membership-question-membership-questions.public.d.ts +0 -42
- package/build/es/src/social-groups-v2-membership-question-membership-questions.public.js +0 -18
- package/build/es/src/social-groups-v2-membership-question-membership-questions.public.js.map +0 -1
- package/build/es/src/social-groups-v2-membership-question-membership-questions.types.js +0 -2
- package/build/es/src/social-groups-v2-membership-question-membership-questions.types.js.map +0 -1
- package/build/es/src/social-groups-v2-membership-question-membership-questions.universal.js +0 -114
- package/build/es/src/social-groups-v2-membership-question-membership-questions.universal.js.map +0 -1
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.context.d.ts +0 -6
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.context.js +0 -9
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.context.js.map +0 -1
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.http.d.ts +0 -25
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.http.js +0 -181
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.http.js.map +0 -1
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.meta.d.ts +0 -21
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.meta.js +0 -85
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.meta.js.map +0 -1
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.public.d.ts +0 -42
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.public.js +0 -24
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.public.js.map +0 -1
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.types.js +0 -3
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.types.js.map +0 -1
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.universal.js +0 -143
- package/build/internal/cjs/src/social-groups-v2-membership-question-membership-questions.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.context.d.ts +0 -6
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.context.js +0 -6
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.context.js.map +0 -1
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.http.d.ts +0 -25
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.http.js +0 -175
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.http.js.map +0 -1
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.meta.d.ts +0 -21
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.meta.js +0 -56
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.meta.js.map +0 -1
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.public.d.ts +0 -42
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.public.js +0 -18
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.public.js.map +0 -1
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.types.d.ts +0 -124
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.types.js +0 -2
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.types.js.map +0 -1
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.universal.d.ts +0 -183
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.universal.js +0 -114
- package/build/internal/es/src/social-groups-v2-membership-question-membership-questions.universal.js.map +0 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
// src/social-groups-v2-membership-question-membership-questions.http.ts
|
|
2
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
3
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
4
|
+
function resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl(opts) {
|
|
5
|
+
const domainToMappings = {
|
|
6
|
+
"api._api_base_domain_": [
|
|
7
|
+
{
|
|
8
|
+
srcPath: "/questions-proxy",
|
|
9
|
+
destPath: ""
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
_: [
|
|
13
|
+
{
|
|
14
|
+
srcPath: "/_api/questions-proxy",
|
|
15
|
+
destPath: ""
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
19
|
+
destPath: ""
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"*.dev.wix-code.com": [
|
|
23
|
+
{
|
|
24
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
25
|
+
destPath: ""
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"editor-flow.wixapps.net": [
|
|
29
|
+
{
|
|
30
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
31
|
+
destPath: ""
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"editor._base_domain_": [
|
|
35
|
+
{
|
|
36
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
37
|
+
destPath: ""
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"blocks._base_domain_": [
|
|
41
|
+
{
|
|
42
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
43
|
+
destPath: ""
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"create.editorx": [
|
|
47
|
+
{
|
|
48
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
49
|
+
destPath: ""
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"editor.wixapps.net": [
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
55
|
+
destPath: ""
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"groups.wixapps.net": [
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
61
|
+
destPath: ""
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"manage._base_domain_": [
|
|
65
|
+
{
|
|
66
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
67
|
+
destPath: ""
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
srcPath: "/social-groups-proxy/api/questions",
|
|
71
|
+
destPath: ""
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"www._base_domain_": [
|
|
75
|
+
{
|
|
76
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
77
|
+
destPath: ""
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"www.wixapis.com": [
|
|
81
|
+
{
|
|
82
|
+
srcPath: "/social-groups-proxy/questions",
|
|
83
|
+
destPath: ""
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
};
|
|
87
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
88
|
+
}
|
|
89
|
+
var PACKAGE_NAME = "@wix/auto_sdk_groups_membership-questions";
|
|
90
|
+
function listMembershipQuestions(payload) {
|
|
91
|
+
function __listMembershipQuestions({ host }) {
|
|
92
|
+
const metadata = {
|
|
93
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
94
|
+
method: "GET",
|
|
95
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
96
|
+
packageName: PACKAGE_NAME,
|
|
97
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
98
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
99
|
+
data: payload,
|
|
100
|
+
host
|
|
101
|
+
}),
|
|
102
|
+
params: toURLSearchParams(payload),
|
|
103
|
+
fallback: [
|
|
104
|
+
{
|
|
105
|
+
method: "GET",
|
|
106
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
107
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
108
|
+
data: payload,
|
|
109
|
+
host
|
|
110
|
+
}),
|
|
111
|
+
params: toURLSearchParams(payload)
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
};
|
|
115
|
+
return metadata;
|
|
116
|
+
}
|
|
117
|
+
return __listMembershipQuestions;
|
|
118
|
+
}
|
|
119
|
+
function createOrReplaceAllMembershipQuestions(payload) {
|
|
120
|
+
function __createOrReplaceAllMembershipQuestions({ host }) {
|
|
121
|
+
const metadata = {
|
|
122
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
123
|
+
method: "PUT",
|
|
124
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
125
|
+
packageName: PACKAGE_NAME,
|
|
126
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
127
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
128
|
+
data: payload,
|
|
129
|
+
host
|
|
130
|
+
}),
|
|
131
|
+
data: payload
|
|
132
|
+
};
|
|
133
|
+
return metadata;
|
|
134
|
+
}
|
|
135
|
+
return __createOrReplaceAllMembershipQuestions;
|
|
136
|
+
}
|
|
137
|
+
function listAnswers(payload) {
|
|
138
|
+
function __listAnswers({ host }) {
|
|
139
|
+
const metadata = {
|
|
140
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
141
|
+
method: "POST",
|
|
142
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
143
|
+
packageName: PACKAGE_NAME,
|
|
144
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
145
|
+
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
146
|
+
data: payload,
|
|
147
|
+
host
|
|
148
|
+
}),
|
|
149
|
+
data: payload
|
|
150
|
+
};
|
|
151
|
+
return metadata;
|
|
152
|
+
}
|
|
153
|
+
return __listAnswers;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// src/social-groups-v2-membership-question-membership-questions.meta.ts
|
|
157
|
+
function listMembershipQuestions2() {
|
|
158
|
+
const payload = { groupId: ":groupId" };
|
|
159
|
+
const getRequestOptions = listMembershipQuestions(
|
|
160
|
+
payload
|
|
161
|
+
);
|
|
162
|
+
const getUrl = (context) => {
|
|
163
|
+
const { url } = getRequestOptions(context);
|
|
164
|
+
return url;
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
getUrl,
|
|
168
|
+
httpMethod: "GET",
|
|
169
|
+
path: "/v2/membership-questions/{groupId}",
|
|
170
|
+
pathParams: { groupId: "groupId" },
|
|
171
|
+
__requestType: null,
|
|
172
|
+
__originalRequestType: null,
|
|
173
|
+
__responseType: null,
|
|
174
|
+
__originalResponseType: null
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function createOrReplaceAllMembershipQuestions2() {
|
|
178
|
+
const payload = { groupId: ":groupId" };
|
|
179
|
+
const getRequestOptions = createOrReplaceAllMembershipQuestions(
|
|
180
|
+
payload
|
|
181
|
+
);
|
|
182
|
+
const getUrl = (context) => {
|
|
183
|
+
const { url } = getRequestOptions(context);
|
|
184
|
+
return url;
|
|
185
|
+
};
|
|
186
|
+
return {
|
|
187
|
+
getUrl,
|
|
188
|
+
httpMethod: "PUT",
|
|
189
|
+
path: "/v2/membership-questions/{groupId}",
|
|
190
|
+
pathParams: { groupId: "groupId" },
|
|
191
|
+
__requestType: null,
|
|
192
|
+
__originalRequestType: null,
|
|
193
|
+
__responseType: null,
|
|
194
|
+
__originalResponseType: null
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function listAnswers2() {
|
|
198
|
+
const payload = { groupId: ":groupId" };
|
|
199
|
+
const getRequestOptions = listAnswers(payload);
|
|
200
|
+
const getUrl = (context) => {
|
|
201
|
+
const { url } = getRequestOptions(context);
|
|
202
|
+
return url;
|
|
203
|
+
};
|
|
204
|
+
return {
|
|
205
|
+
getUrl,
|
|
206
|
+
httpMethod: "POST",
|
|
207
|
+
path: "/v2/membership-questions/{groupId}/answers",
|
|
208
|
+
pathParams: { groupId: "groupId" },
|
|
209
|
+
__requestType: null,
|
|
210
|
+
__originalRequestType: null,
|
|
211
|
+
__responseType: null,
|
|
212
|
+
__originalResponseType: null
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
export {
|
|
216
|
+
createOrReplaceAllMembershipQuestions2 as createOrReplaceAllMembershipQuestions,
|
|
217
|
+
listAnswers2 as listAnswers,
|
|
218
|
+
listMembershipQuestions2 as listMembershipQuestions
|
|
219
|
+
};
|
|
220
|
+
//# sourceMappingURL=meta.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/social-groups-v2-membership-question-membership-questions.http.ts","../../src/social-groups-v2-membership-question-membership-questions.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/questions-proxy',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/questions-proxy',\n destPath: '',\n },\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'editor-flow.wixapps.net': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'groups.wixapps.net': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n {\n srcPath: '/social-groups-proxy/api/questions',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/social-groups-proxy/questions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_groups_membership-questions';\n\n/**\n * Retrieves the membership questions for a group.\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n */\nexport function listMembershipQuestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __listMembershipQuestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.social_groups.v2.membership_question',\n method: 'GET' as any,\n methodFqn:\n 'wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions',\n packageName: PACKAGE_NAME,\n url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({\n protoPath: '/v2/membership-questions/{groupId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n\n fallback: [\n {\n method: 'GET' as any,\n url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({\n protoPath: '/v2/membership-questions/{groupId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __listMembershipQuestions;\n}\n\n/**\n * Creates membership questions if none have been set up. Otherwise, replaces all existing questions.\n *\n * Providing an empty array means that members won't have to answer any question when joining the group.\n * Only admins can create or replace membership questions.\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n */\nexport function createOrReplaceAllMembershipQuestions(\n payload: object\n): RequestOptionsFactory<any> {\n function __createOrReplaceAllMembershipQuestions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.social_groups.v2.membership_question',\n method: 'PUT' as any,\n methodFqn:\n 'wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions',\n packageName: PACKAGE_NAME,\n url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({\n protoPath: '/v2/membership-questions/{groupId}',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createOrReplaceAllMembershipQuestions;\n}\n\n/**\n * Retrieves the answers to the membership questions, given the provided filters.\n *\n * >**Note:**\n * >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n */\nexport function listAnswers(payload: object): RequestOptionsFactory<any> {\n function __listAnswers({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.social_groups.v2.membership_question',\n method: 'POST' as any,\n methodFqn:\n 'wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers',\n packageName: PACKAGE_NAME,\n url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({\n protoPath: '/v2/membership-questions/{groupId}/answers',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __listAnswers;\n}\n","import * as ambassadorWixSocialGroupsV2MembershipQuestion from './social-groups-v2-membership-question-membership-questions.http.js';\nimport * as ambassadorWixSocialGroupsV2MembershipQuestionTypes from './social-groups-v2-membership-question-membership-questions.types.js';\nimport * as ambassadorWixSocialGroupsV2MembershipQuestionUniversalTypes from './social-groups-v2-membership-question-membership-questions.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listMembershipQuestions(): __PublicMethodMetaInfo<\n 'GET',\n { groupId: string },\n ambassadorWixSocialGroupsV2MembershipQuestionUniversalTypes.ListMembershipQuestionsRequest,\n ambassadorWixSocialGroupsV2MembershipQuestionTypes.ListMembershipQuestionsRequest,\n ambassadorWixSocialGroupsV2MembershipQuestionUniversalTypes.ListMembershipQuestionsResponse,\n ambassadorWixSocialGroupsV2MembershipQuestionTypes.ListMembershipQuestionsResponse\n> {\n const payload = { groupId: ':groupId' } as any;\n\n const getRequestOptions =\n ambassadorWixSocialGroupsV2MembershipQuestion.listMembershipQuestions(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/membership-questions/{groupId}',\n pathParams: { groupId: 'groupId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createOrReplaceAllMembershipQuestions(): __PublicMethodMetaInfo<\n 'PUT',\n { groupId: string },\n ambassadorWixSocialGroupsV2MembershipQuestionUniversalTypes.CreateOrReplaceAllMembershipQuestionsRequest,\n ambassadorWixSocialGroupsV2MembershipQuestionTypes.CreateOrReplaceAllMembershipQuestionsRequest,\n ambassadorWixSocialGroupsV2MembershipQuestionUniversalTypes.CreateOrReplaceAllMembershipQuestionsResponse,\n ambassadorWixSocialGroupsV2MembershipQuestionTypes.CreateOrReplaceAllMembershipQuestionsResponse\n> {\n const payload = { groupId: ':groupId' } as any;\n\n const getRequestOptions =\n ambassadorWixSocialGroupsV2MembershipQuestion.createOrReplaceAllMembershipQuestions(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PUT',\n path: '/v2/membership-questions/{groupId}',\n pathParams: { groupId: 'groupId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function listAnswers(): __PublicMethodMetaInfo<\n 'POST',\n { groupId: string },\n ambassadorWixSocialGroupsV2MembershipQuestionUniversalTypes.ListAnswersRequest,\n ambassadorWixSocialGroupsV2MembershipQuestionTypes.ListAnswersRequest,\n ambassadorWixSocialGroupsV2MembershipQuestionUniversalTypes.ListAnswersResponse,\n ambassadorWixSocialGroupsV2MembershipQuestionTypes.ListAnswersResponse\n> {\n const payload = { groupId: ':groupId' } as any;\n\n const getRequestOptions =\n ambassadorWixSocialGroupsV2MembershipQuestion.listAnswers(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/membership-questions/{groupId}/answers',\n pathParams: { groupId: 'groupId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":"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","names":["listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
|
@@ -1 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { ListMembershipQuestionsResponse, CreateOrReplaceAllMembershipQuestionsOptions, CreateOrReplaceAllMembershipQuestionsResponse, ListAnswersOptions, ListAnswersResponse } from './index.typings.js';
|
|
3
|
+
export { CreateOrReplaceAllMembershipQuestionsRequest, ListAnswerCountsRequest, ListAnswerCountsResponse, ListAnswersRequest, ListMembershipQuestionsRequest, MemberAnswerCount, MemberMembershipQuestionAnswers, MembershipQuestion, MembershipQuestionAnswer, Paging, PagingMetadata } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
type MembershipQuestionNonNullablePaths = `required` | `text`;
|
|
6
|
+
declare function listMembershipQuestions$1(httpClient: HttpClient): ListMembershipQuestionsSignature;
|
|
7
|
+
interface ListMembershipQuestionsSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves the membership questions for a group.
|
|
10
|
+
*
|
|
11
|
+
* >**Note:**
|
|
12
|
+
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
13
|
+
* @param - Group ID.
|
|
14
|
+
*/
|
|
15
|
+
(groupId: string): Promise<NonNullablePaths<ListMembershipQuestionsResponse, {
|
|
16
|
+
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
17
|
+
}[MembershipQuestionNonNullablePaths]>>;
|
|
18
|
+
}
|
|
19
|
+
declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient): CreateOrReplaceAllMembershipQuestionsSignature;
|
|
20
|
+
interface CreateOrReplaceAllMembershipQuestionsSignature {
|
|
21
|
+
/**
|
|
22
|
+
* Creates membership questions if none have been set up. Otherwise, replaces all existing questions.
|
|
23
|
+
*
|
|
24
|
+
* Providing an empty array means that members won't have to answer any question when joining the group.
|
|
25
|
+
* Only admins can create or replace membership questions.
|
|
26
|
+
*
|
|
27
|
+
* >**Note:**
|
|
28
|
+
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
29
|
+
* @param - Group ID.
|
|
30
|
+
*/
|
|
31
|
+
(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions): Promise<NonNullablePaths<CreateOrReplaceAllMembershipQuestionsResponse, {
|
|
32
|
+
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
33
|
+
}[MembershipQuestionNonNullablePaths]>>;
|
|
34
|
+
}
|
|
35
|
+
declare function listAnswers$1(httpClient: HttpClient): ListAnswersSignature;
|
|
36
|
+
interface ListAnswersSignature {
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the answers to the membership questions, given the provided filters.
|
|
39
|
+
*
|
|
40
|
+
* >**Note:**
|
|
41
|
+
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
42
|
+
* @param - Group ID.
|
|
43
|
+
*/
|
|
44
|
+
(groupId: string, options?: ListAnswersOptions): Promise<NonNullablePaths<ListAnswersResponse, `memberAnswers` | `memberAnswers.${number}.memberId`>>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare const listMembershipQuestions: MaybeContext<BuildRESTFunction<typeof listMembershipQuestions$1> & typeof listMembershipQuestions$1>;
|
|
48
|
+
declare const createOrReplaceAllMembershipQuestions: MaybeContext<BuildRESTFunction<typeof createOrReplaceAllMembershipQuestions$1> & typeof createOrReplaceAllMembershipQuestions$1>;
|
|
49
|
+
declare const listAnswers: MaybeContext<BuildRESTFunction<typeof listAnswers$1> & typeof listAnswers$1>;
|
|
50
|
+
|
|
51
|
+
export { CreateOrReplaceAllMembershipQuestionsOptions, CreateOrReplaceAllMembershipQuestionsResponse, ListAnswersOptions, ListAnswersResponse, ListMembershipQuestionsResponse, createOrReplaceAllMembershipQuestions, listAnswers, listMembershipQuestions };
|
|
@@ -1,18 +1,313 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
9
|
};
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
createOrReplaceAllMembershipQuestions: () => createOrReplaceAllMembershipQuestions4,
|
|
24
|
+
listAnswers: () => listAnswers4,
|
|
25
|
+
listMembershipQuestions: () => listMembershipQuestions4
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
|
|
29
|
+
// src/social-groups-v2-membership-question-membership-questions.universal.ts
|
|
30
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
31
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
32
|
+
|
|
33
|
+
// src/social-groups-v2-membership-question-membership-questions.http.ts
|
|
34
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
35
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
36
|
+
function resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl(opts) {
|
|
37
|
+
const domainToMappings = {
|
|
38
|
+
"api._api_base_domain_": [
|
|
39
|
+
{
|
|
40
|
+
srcPath: "/questions-proxy",
|
|
41
|
+
destPath: ""
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
_: [
|
|
45
|
+
{
|
|
46
|
+
srcPath: "/_api/questions-proxy",
|
|
47
|
+
destPath: ""
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
51
|
+
destPath: ""
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"*.dev.wix-code.com": [
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
57
|
+
destPath: ""
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"editor-flow.wixapps.net": [
|
|
61
|
+
{
|
|
62
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
63
|
+
destPath: ""
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"editor._base_domain_": [
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
69
|
+
destPath: ""
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"blocks._base_domain_": [
|
|
73
|
+
{
|
|
74
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
75
|
+
destPath: ""
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"create.editorx": [
|
|
79
|
+
{
|
|
80
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
81
|
+
destPath: ""
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"editor.wixapps.net": [
|
|
85
|
+
{
|
|
86
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
87
|
+
destPath: ""
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"groups.wixapps.net": [
|
|
91
|
+
{
|
|
92
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
93
|
+
destPath: ""
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"manage._base_domain_": [
|
|
97
|
+
{
|
|
98
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
99
|
+
destPath: ""
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
srcPath: "/social-groups-proxy/api/questions",
|
|
103
|
+
destPath: ""
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"www._base_domain_": [
|
|
107
|
+
{
|
|
108
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
109
|
+
destPath: ""
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"www.wixapis.com": [
|
|
113
|
+
{
|
|
114
|
+
srcPath: "/social-groups-proxy/questions",
|
|
115
|
+
destPath: ""
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
};
|
|
119
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
120
|
+
}
|
|
121
|
+
var PACKAGE_NAME = "@wix/auto_sdk_groups_membership-questions";
|
|
122
|
+
function listMembershipQuestions(payload) {
|
|
123
|
+
function __listMembershipQuestions({ host }) {
|
|
124
|
+
const metadata = {
|
|
125
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
126
|
+
method: "GET",
|
|
127
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
128
|
+
packageName: PACKAGE_NAME,
|
|
129
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
130
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
131
|
+
data: payload,
|
|
132
|
+
host
|
|
133
|
+
}),
|
|
134
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
135
|
+
fallback: [
|
|
136
|
+
{
|
|
137
|
+
method: "GET",
|
|
138
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
139
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
140
|
+
data: payload,
|
|
141
|
+
host
|
|
142
|
+
}),
|
|
143
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
};
|
|
147
|
+
return metadata;
|
|
148
|
+
}
|
|
149
|
+
return __listMembershipQuestions;
|
|
150
|
+
}
|
|
151
|
+
function createOrReplaceAllMembershipQuestions(payload) {
|
|
152
|
+
function __createOrReplaceAllMembershipQuestions({ host }) {
|
|
153
|
+
const metadata = {
|
|
154
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
155
|
+
method: "PUT",
|
|
156
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
157
|
+
packageName: PACKAGE_NAME,
|
|
158
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
159
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
160
|
+
data: payload,
|
|
161
|
+
host
|
|
162
|
+
}),
|
|
163
|
+
data: payload
|
|
164
|
+
};
|
|
165
|
+
return metadata;
|
|
166
|
+
}
|
|
167
|
+
return __createOrReplaceAllMembershipQuestions;
|
|
168
|
+
}
|
|
169
|
+
function listAnswers(payload) {
|
|
170
|
+
function __listAnswers({ host }) {
|
|
171
|
+
const metadata = {
|
|
172
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
173
|
+
method: "POST",
|
|
174
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
175
|
+
packageName: PACKAGE_NAME,
|
|
176
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
177
|
+
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
178
|
+
data: payload,
|
|
179
|
+
host
|
|
180
|
+
}),
|
|
181
|
+
data: payload
|
|
182
|
+
};
|
|
183
|
+
return metadata;
|
|
184
|
+
}
|
|
185
|
+
return __listAnswers;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// src/social-groups-v2-membership-question-membership-questions.universal.ts
|
|
189
|
+
async function listMembershipQuestions2(groupId) {
|
|
190
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
191
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ groupId });
|
|
192
|
+
const reqOpts = listMembershipQuestions(
|
|
193
|
+
payload
|
|
194
|
+
);
|
|
195
|
+
sideEffects?.onSiteCall?.();
|
|
196
|
+
try {
|
|
197
|
+
const result = await httpClient.request(reqOpts);
|
|
198
|
+
sideEffects?.onSuccess?.(result);
|
|
199
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
200
|
+
} catch (err) {
|
|
201
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
202
|
+
err,
|
|
203
|
+
{
|
|
204
|
+
spreadPathsToArguments: {},
|
|
205
|
+
explicitPathsToArguments: { groupId: "$[0]" },
|
|
206
|
+
singleArgumentUnchanged: false
|
|
207
|
+
},
|
|
208
|
+
["groupId"]
|
|
209
|
+
);
|
|
210
|
+
sideEffects?.onError?.(err);
|
|
211
|
+
throw transformedError;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
async function createOrReplaceAllMembershipQuestions2(groupId, options) {
|
|
215
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
216
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
217
|
+
groupId,
|
|
218
|
+
questions: options?.questions
|
|
219
|
+
});
|
|
220
|
+
const reqOpts = createOrReplaceAllMembershipQuestions(
|
|
221
|
+
payload
|
|
222
|
+
);
|
|
223
|
+
sideEffects?.onSiteCall?.();
|
|
224
|
+
try {
|
|
225
|
+
const result = await httpClient.request(reqOpts);
|
|
226
|
+
sideEffects?.onSuccess?.(result);
|
|
227
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
228
|
+
} catch (err) {
|
|
229
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
230
|
+
err,
|
|
231
|
+
{
|
|
232
|
+
spreadPathsToArguments: {},
|
|
233
|
+
explicitPathsToArguments: {
|
|
234
|
+
groupId: "$[0]",
|
|
235
|
+
questions: "$[1].questions"
|
|
236
|
+
},
|
|
237
|
+
singleArgumentUnchanged: false
|
|
238
|
+
},
|
|
239
|
+
["groupId", "options"]
|
|
240
|
+
);
|
|
241
|
+
sideEffects?.onError?.(err);
|
|
242
|
+
throw transformedError;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
async function listAnswers2(groupId, options) {
|
|
246
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
247
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
248
|
+
groupId,
|
|
249
|
+
memberIds: options?.memberIds,
|
|
250
|
+
paging: options?.paging
|
|
251
|
+
});
|
|
252
|
+
const reqOpts = listAnswers(payload);
|
|
253
|
+
sideEffects?.onSiteCall?.();
|
|
254
|
+
try {
|
|
255
|
+
const result = await httpClient.request(reqOpts);
|
|
256
|
+
sideEffects?.onSuccess?.(result);
|
|
257
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
258
|
+
} catch (err) {
|
|
259
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
260
|
+
err,
|
|
261
|
+
{
|
|
262
|
+
spreadPathsToArguments: {},
|
|
263
|
+
explicitPathsToArguments: {
|
|
264
|
+
groupId: "$[0]",
|
|
265
|
+
memberIds: "$[1].memberIds",
|
|
266
|
+
paging: "$[1].paging"
|
|
267
|
+
},
|
|
268
|
+
singleArgumentUnchanged: false
|
|
269
|
+
},
|
|
270
|
+
["groupId", "options"]
|
|
271
|
+
);
|
|
272
|
+
sideEffects?.onError?.(err);
|
|
273
|
+
throw transformedError;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// src/social-groups-v2-membership-question-membership-questions.public.ts
|
|
278
|
+
function listMembershipQuestions3(httpClient) {
|
|
279
|
+
return (groupId) => listMembershipQuestions2(
|
|
280
|
+
groupId,
|
|
281
|
+
// @ts-ignore
|
|
282
|
+
{ httpClient }
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
function createOrReplaceAllMembershipQuestions3(httpClient) {
|
|
286
|
+
return (groupId, options) => createOrReplaceAllMembershipQuestions2(
|
|
287
|
+
groupId,
|
|
288
|
+
options,
|
|
289
|
+
// @ts-ignore
|
|
290
|
+
{ httpClient }
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
function listAnswers3(httpClient) {
|
|
294
|
+
return (groupId, options) => listAnswers2(
|
|
295
|
+
groupId,
|
|
296
|
+
options,
|
|
297
|
+
// @ts-ignore
|
|
298
|
+
{ httpClient }
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// src/social-groups-v2-membership-question-membership-questions.context.ts
|
|
303
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
304
|
+
var listMembershipQuestions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listMembershipQuestions3);
|
|
305
|
+
var createOrReplaceAllMembershipQuestions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createOrReplaceAllMembershipQuestions3);
|
|
306
|
+
var listAnswers4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listAnswers3);
|
|
307
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
308
|
+
0 && (module.exports = {
|
|
309
|
+
createOrReplaceAllMembershipQuestions,
|
|
310
|
+
listAnswers,
|
|
311
|
+
listMembershipQuestions
|
|
312
|
+
});
|
|
18
313
|
//# sourceMappingURL=index.js.map
|