@wix/auto_sdk_groups_membership-questions 1.0.2 → 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} +28 -40
- package/build/es/index.typings.mjs +256 -0
- package/build/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 -49
- 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} +28 -40
- package/build/internal/es/index.typings.mjs +256 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/{es/src/social-groups-v2-membership-question-membership-questions.types.d.ts → internal/es/meta.d.mts} +36 -49
- package/build/internal/es/meta.mjs +220 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- 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 -145
- 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 -197
- 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 -145
- 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 -197
- 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
package/build/cjs/meta.js
CHANGED
|
@@ -1,18 +1,249 @@
|
|
|
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
|
+
// meta.ts
|
|
21
|
+
var meta_exports = {};
|
|
22
|
+
__export(meta_exports, {
|
|
23
|
+
createOrReplaceAllMembershipQuestions: () => createOrReplaceAllMembershipQuestions2,
|
|
24
|
+
listAnswers: () => listAnswers2,
|
|
25
|
+
listMembershipQuestions: () => listMembershipQuestions2
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(meta_exports);
|
|
28
|
+
|
|
29
|
+
// src/social-groups-v2-membership-question-membership-questions.http.ts
|
|
30
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
31
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
32
|
+
function resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl(opts) {
|
|
33
|
+
const domainToMappings = {
|
|
34
|
+
"api._api_base_domain_": [
|
|
35
|
+
{
|
|
36
|
+
srcPath: "/questions-proxy",
|
|
37
|
+
destPath: ""
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
_: [
|
|
41
|
+
{
|
|
42
|
+
srcPath: "/_api/questions-proxy",
|
|
43
|
+
destPath: ""
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
47
|
+
destPath: ""
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"*.dev.wix-code.com": [
|
|
51
|
+
{
|
|
52
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
53
|
+
destPath: ""
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"editor-flow.wixapps.net": [
|
|
57
|
+
{
|
|
58
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
59
|
+
destPath: ""
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"editor._base_domain_": [
|
|
63
|
+
{
|
|
64
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
65
|
+
destPath: ""
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"blocks._base_domain_": [
|
|
69
|
+
{
|
|
70
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
71
|
+
destPath: ""
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"create.editorx": [
|
|
75
|
+
{
|
|
76
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
77
|
+
destPath: ""
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"editor.wixapps.net": [
|
|
81
|
+
{
|
|
82
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
83
|
+
destPath: ""
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"groups.wixapps.net": [
|
|
87
|
+
{
|
|
88
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
89
|
+
destPath: ""
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"manage._base_domain_": [
|
|
93
|
+
{
|
|
94
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
95
|
+
destPath: ""
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
srcPath: "/social-groups-proxy/api/questions",
|
|
99
|
+
destPath: ""
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"www._base_domain_": [
|
|
103
|
+
{
|
|
104
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
105
|
+
destPath: ""
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"www.wixapis.com": [
|
|
109
|
+
{
|
|
110
|
+
srcPath: "/social-groups-proxy/questions",
|
|
111
|
+
destPath: ""
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
};
|
|
115
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
116
|
+
}
|
|
117
|
+
var PACKAGE_NAME = "@wix/auto_sdk_groups_membership-questions";
|
|
118
|
+
function listMembershipQuestions(payload) {
|
|
119
|
+
function __listMembershipQuestions({ host }) {
|
|
120
|
+
const metadata = {
|
|
121
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
122
|
+
method: "GET",
|
|
123
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
124
|
+
packageName: PACKAGE_NAME,
|
|
125
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
126
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
127
|
+
data: payload,
|
|
128
|
+
host
|
|
129
|
+
}),
|
|
130
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
131
|
+
fallback: [
|
|
132
|
+
{
|
|
133
|
+
method: "GET",
|
|
134
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
135
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
136
|
+
data: payload,
|
|
137
|
+
host
|
|
138
|
+
}),
|
|
139
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
};
|
|
143
|
+
return metadata;
|
|
144
|
+
}
|
|
145
|
+
return __listMembershipQuestions;
|
|
146
|
+
}
|
|
147
|
+
function createOrReplaceAllMembershipQuestions(payload) {
|
|
148
|
+
function __createOrReplaceAllMembershipQuestions({ host }) {
|
|
149
|
+
const metadata = {
|
|
150
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
151
|
+
method: "PUT",
|
|
152
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
153
|
+
packageName: PACKAGE_NAME,
|
|
154
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
155
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
156
|
+
data: payload,
|
|
157
|
+
host
|
|
158
|
+
}),
|
|
159
|
+
data: payload
|
|
160
|
+
};
|
|
161
|
+
return metadata;
|
|
162
|
+
}
|
|
163
|
+
return __createOrReplaceAllMembershipQuestions;
|
|
164
|
+
}
|
|
165
|
+
function listAnswers(payload) {
|
|
166
|
+
function __listAnswers({ host }) {
|
|
167
|
+
const metadata = {
|
|
168
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
169
|
+
method: "POST",
|
|
170
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
171
|
+
packageName: PACKAGE_NAME,
|
|
172
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
173
|
+
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
174
|
+
data: payload,
|
|
175
|
+
host
|
|
176
|
+
}),
|
|
177
|
+
data: payload
|
|
178
|
+
};
|
|
179
|
+
return metadata;
|
|
180
|
+
}
|
|
181
|
+
return __listAnswers;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// src/social-groups-v2-membership-question-membership-questions.meta.ts
|
|
185
|
+
function listMembershipQuestions2() {
|
|
186
|
+
const payload = { groupId: ":groupId" };
|
|
187
|
+
const getRequestOptions = listMembershipQuestions(
|
|
188
|
+
payload
|
|
189
|
+
);
|
|
190
|
+
const getUrl = (context) => {
|
|
191
|
+
const { url } = getRequestOptions(context);
|
|
192
|
+
return url;
|
|
193
|
+
};
|
|
194
|
+
return {
|
|
195
|
+
getUrl,
|
|
196
|
+
httpMethod: "GET",
|
|
197
|
+
path: "/v2/membership-questions/{groupId}",
|
|
198
|
+
pathParams: { groupId: "groupId" },
|
|
199
|
+
__requestType: null,
|
|
200
|
+
__originalRequestType: null,
|
|
201
|
+
__responseType: null,
|
|
202
|
+
__originalResponseType: null
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function createOrReplaceAllMembershipQuestions2() {
|
|
206
|
+
const payload = { groupId: ":groupId" };
|
|
207
|
+
const getRequestOptions = createOrReplaceAllMembershipQuestions(
|
|
208
|
+
payload
|
|
209
|
+
);
|
|
210
|
+
const getUrl = (context) => {
|
|
211
|
+
const { url } = getRequestOptions(context);
|
|
212
|
+
return url;
|
|
213
|
+
};
|
|
214
|
+
return {
|
|
215
|
+
getUrl,
|
|
216
|
+
httpMethod: "PUT",
|
|
217
|
+
path: "/v2/membership-questions/{groupId}",
|
|
218
|
+
pathParams: { groupId: "groupId" },
|
|
219
|
+
__requestType: null,
|
|
220
|
+
__originalRequestType: null,
|
|
221
|
+
__responseType: null,
|
|
222
|
+
__originalResponseType: null
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function listAnswers2() {
|
|
226
|
+
const payload = { groupId: ":groupId" };
|
|
227
|
+
const getRequestOptions = listAnswers(payload);
|
|
228
|
+
const getUrl = (context) => {
|
|
229
|
+
const { url } = getRequestOptions(context);
|
|
230
|
+
return url;
|
|
231
|
+
};
|
|
232
|
+
return {
|
|
233
|
+
getUrl,
|
|
234
|
+
httpMethod: "POST",
|
|
235
|
+
path: "/v2/membership-questions/{groupId}/answers",
|
|
236
|
+
pathParams: { groupId: "groupId" },
|
|
237
|
+
__requestType: null,
|
|
238
|
+
__originalRequestType: null,
|
|
239
|
+
__responseType: null,
|
|
240
|
+
__originalResponseType: null
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
244
|
+
0 && (module.exports = {
|
|
245
|
+
createOrReplaceAllMembershipQuestions,
|
|
246
|
+
listAnswers,
|
|
247
|
+
listMembershipQuestions
|
|
248
|
+
});
|
|
18
249
|
//# sourceMappingURL=meta.js.map
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0GAAwF"}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/social-groups-v2-membership-question-membership-questions.http.ts","../../src/social-groups-v2-membership-question-membership-questions.meta.ts"],"sourcesContent":["export * from './src/social-groups-v2-membership-question-membership-questions.meta.js';\n","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}\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vB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","import_rest_modules","listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { ListMembershipQuestionsResponse, CreateOrReplaceAllMembershipQuestionsOptions, CreateOrReplaceAllMembershipQuestionsResponse, ListAnswersOptions, ListAnswersResponse } from './index.typings.mjs';
|
|
3
|
+
export { CreateOrReplaceAllMembershipQuestionsRequest, ListAnswerCountsRequest, ListAnswerCountsResponse, ListAnswersRequest, ListMembershipQuestionsRequest, MemberAnswerCount, MemberMembershipQuestionAnswers, MembershipQuestion, MembershipQuestionAnswer, Paging, PagingMetadata } from './index.typings.mjs';
|
|
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 };
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
// src/social-groups-v2-membership-question-membership-questions.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import {
|
|
4
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
5
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
6
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
7
|
+
|
|
8
|
+
// src/social-groups-v2-membership-question-membership-questions.http.ts
|
|
9
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
10
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
11
|
+
function resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl(opts) {
|
|
12
|
+
const domainToMappings = {
|
|
13
|
+
"api._api_base_domain_": [
|
|
14
|
+
{
|
|
15
|
+
srcPath: "/questions-proxy",
|
|
16
|
+
destPath: ""
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
_: [
|
|
20
|
+
{
|
|
21
|
+
srcPath: "/_api/questions-proxy",
|
|
22
|
+
destPath: ""
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
26
|
+
destPath: ""
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"*.dev.wix-code.com": [
|
|
30
|
+
{
|
|
31
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
32
|
+
destPath: ""
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"editor-flow.wixapps.net": [
|
|
36
|
+
{
|
|
37
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
38
|
+
destPath: ""
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"editor._base_domain_": [
|
|
42
|
+
{
|
|
43
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
44
|
+
destPath: ""
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"blocks._base_domain_": [
|
|
48
|
+
{
|
|
49
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
50
|
+
destPath: ""
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"create.editorx": [
|
|
54
|
+
{
|
|
55
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
56
|
+
destPath: ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"editor.wixapps.net": [
|
|
60
|
+
{
|
|
61
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
62
|
+
destPath: ""
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"groups.wixapps.net": [
|
|
66
|
+
{
|
|
67
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
68
|
+
destPath: ""
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"manage._base_domain_": [
|
|
72
|
+
{
|
|
73
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
74
|
+
destPath: ""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
srcPath: "/social-groups-proxy/api/questions",
|
|
78
|
+
destPath: ""
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"www._base_domain_": [
|
|
82
|
+
{
|
|
83
|
+
srcPath: "/_api/social-groups-proxy/questions",
|
|
84
|
+
destPath: ""
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"www.wixapis.com": [
|
|
88
|
+
{
|
|
89
|
+
srcPath: "/social-groups-proxy/questions",
|
|
90
|
+
destPath: ""
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
};
|
|
94
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
95
|
+
}
|
|
96
|
+
var PACKAGE_NAME = "@wix/auto_sdk_groups_membership-questions";
|
|
97
|
+
function listMembershipQuestions(payload) {
|
|
98
|
+
function __listMembershipQuestions({ host }) {
|
|
99
|
+
const metadata = {
|
|
100
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
101
|
+
method: "GET",
|
|
102
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
103
|
+
packageName: PACKAGE_NAME,
|
|
104
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
105
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
106
|
+
data: payload,
|
|
107
|
+
host
|
|
108
|
+
}),
|
|
109
|
+
params: toURLSearchParams(payload),
|
|
110
|
+
fallback: [
|
|
111
|
+
{
|
|
112
|
+
method: "GET",
|
|
113
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
114
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
115
|
+
data: payload,
|
|
116
|
+
host
|
|
117
|
+
}),
|
|
118
|
+
params: toURLSearchParams(payload)
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
};
|
|
122
|
+
return metadata;
|
|
123
|
+
}
|
|
124
|
+
return __listMembershipQuestions;
|
|
125
|
+
}
|
|
126
|
+
function createOrReplaceAllMembershipQuestions(payload) {
|
|
127
|
+
function __createOrReplaceAllMembershipQuestions({ host }) {
|
|
128
|
+
const metadata = {
|
|
129
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
130
|
+
method: "PUT",
|
|
131
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
132
|
+
packageName: PACKAGE_NAME,
|
|
133
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
134
|
+
protoPath: "/v2/membership-questions/{groupId}",
|
|
135
|
+
data: payload,
|
|
136
|
+
host
|
|
137
|
+
}),
|
|
138
|
+
data: payload
|
|
139
|
+
};
|
|
140
|
+
return metadata;
|
|
141
|
+
}
|
|
142
|
+
return __createOrReplaceAllMembershipQuestions;
|
|
143
|
+
}
|
|
144
|
+
function listAnswers(payload) {
|
|
145
|
+
function __listAnswers({ host }) {
|
|
146
|
+
const metadata = {
|
|
147
|
+
entityFqdn: "wix.social_groups.v2.membership_question",
|
|
148
|
+
method: "POST",
|
|
149
|
+
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
150
|
+
packageName: PACKAGE_NAME,
|
|
151
|
+
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
152
|
+
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
153
|
+
data: payload,
|
|
154
|
+
host
|
|
155
|
+
}),
|
|
156
|
+
data: payload
|
|
157
|
+
};
|
|
158
|
+
return metadata;
|
|
159
|
+
}
|
|
160
|
+
return __listAnswers;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// src/social-groups-v2-membership-question-membership-questions.universal.ts
|
|
164
|
+
async function listMembershipQuestions2(groupId) {
|
|
165
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
166
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ groupId });
|
|
167
|
+
const reqOpts = listMembershipQuestions(
|
|
168
|
+
payload
|
|
169
|
+
);
|
|
170
|
+
sideEffects?.onSiteCall?.();
|
|
171
|
+
try {
|
|
172
|
+
const result = await httpClient.request(reqOpts);
|
|
173
|
+
sideEffects?.onSuccess?.(result);
|
|
174
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
175
|
+
} catch (err) {
|
|
176
|
+
const transformedError = sdkTransformError(
|
|
177
|
+
err,
|
|
178
|
+
{
|
|
179
|
+
spreadPathsToArguments: {},
|
|
180
|
+
explicitPathsToArguments: { groupId: "$[0]" },
|
|
181
|
+
singleArgumentUnchanged: false
|
|
182
|
+
},
|
|
183
|
+
["groupId"]
|
|
184
|
+
);
|
|
185
|
+
sideEffects?.onError?.(err);
|
|
186
|
+
throw transformedError;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
async function createOrReplaceAllMembershipQuestions2(groupId, options) {
|
|
190
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
191
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
192
|
+
groupId,
|
|
193
|
+
questions: options?.questions
|
|
194
|
+
});
|
|
195
|
+
const reqOpts = createOrReplaceAllMembershipQuestions(
|
|
196
|
+
payload
|
|
197
|
+
);
|
|
198
|
+
sideEffects?.onSiteCall?.();
|
|
199
|
+
try {
|
|
200
|
+
const result = await httpClient.request(reqOpts);
|
|
201
|
+
sideEffects?.onSuccess?.(result);
|
|
202
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
203
|
+
} catch (err) {
|
|
204
|
+
const transformedError = sdkTransformError(
|
|
205
|
+
err,
|
|
206
|
+
{
|
|
207
|
+
spreadPathsToArguments: {},
|
|
208
|
+
explicitPathsToArguments: {
|
|
209
|
+
groupId: "$[0]",
|
|
210
|
+
questions: "$[1].questions"
|
|
211
|
+
},
|
|
212
|
+
singleArgumentUnchanged: false
|
|
213
|
+
},
|
|
214
|
+
["groupId", "options"]
|
|
215
|
+
);
|
|
216
|
+
sideEffects?.onError?.(err);
|
|
217
|
+
throw transformedError;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async function listAnswers2(groupId, options) {
|
|
221
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
222
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
223
|
+
groupId,
|
|
224
|
+
memberIds: options?.memberIds,
|
|
225
|
+
paging: options?.paging
|
|
226
|
+
});
|
|
227
|
+
const reqOpts = listAnswers(payload);
|
|
228
|
+
sideEffects?.onSiteCall?.();
|
|
229
|
+
try {
|
|
230
|
+
const result = await httpClient.request(reqOpts);
|
|
231
|
+
sideEffects?.onSuccess?.(result);
|
|
232
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
233
|
+
} catch (err) {
|
|
234
|
+
const transformedError = sdkTransformError(
|
|
235
|
+
err,
|
|
236
|
+
{
|
|
237
|
+
spreadPathsToArguments: {},
|
|
238
|
+
explicitPathsToArguments: {
|
|
239
|
+
groupId: "$[0]",
|
|
240
|
+
memberIds: "$[1].memberIds",
|
|
241
|
+
paging: "$[1].paging"
|
|
242
|
+
},
|
|
243
|
+
singleArgumentUnchanged: false
|
|
244
|
+
},
|
|
245
|
+
["groupId", "options"]
|
|
246
|
+
);
|
|
247
|
+
sideEffects?.onError?.(err);
|
|
248
|
+
throw transformedError;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// src/social-groups-v2-membership-question-membership-questions.public.ts
|
|
253
|
+
function listMembershipQuestions3(httpClient) {
|
|
254
|
+
return (groupId) => listMembershipQuestions2(
|
|
255
|
+
groupId,
|
|
256
|
+
// @ts-ignore
|
|
257
|
+
{ httpClient }
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
function createOrReplaceAllMembershipQuestions3(httpClient) {
|
|
261
|
+
return (groupId, options) => createOrReplaceAllMembershipQuestions2(
|
|
262
|
+
groupId,
|
|
263
|
+
options,
|
|
264
|
+
// @ts-ignore
|
|
265
|
+
{ httpClient }
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
function listAnswers3(httpClient) {
|
|
269
|
+
return (groupId, options) => listAnswers2(
|
|
270
|
+
groupId,
|
|
271
|
+
options,
|
|
272
|
+
// @ts-ignore
|
|
273
|
+
{ httpClient }
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// src/social-groups-v2-membership-question-membership-questions.context.ts
|
|
278
|
+
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
279
|
+
var listMembershipQuestions4 = /* @__PURE__ */ createRESTModule(listMembershipQuestions3);
|
|
280
|
+
var createOrReplaceAllMembershipQuestions4 = /* @__PURE__ */ createRESTModule(createOrReplaceAllMembershipQuestions3);
|
|
281
|
+
var listAnswers4 = /* @__PURE__ */ createRESTModule(listAnswers3);
|
|
282
|
+
export {
|
|
283
|
+
createOrReplaceAllMembershipQuestions4 as createOrReplaceAllMembershipQuestions,
|
|
284
|
+
listAnswers4 as listAnswers,
|
|
285
|
+
listMembershipQuestions4 as listMembershipQuestions
|
|
286
|
+
};
|
|
287
|
+
//# sourceMappingURL=index.mjs.map
|