@wix/auto_sdk_groups_membership-questions 1.0.4 → 1.0.6
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 +3 -8
- package/build/cjs/index.js +9 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +3 -8
- package/build/cjs/index.typings.js +9 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +9 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -8
- package/build/es/index.mjs +9 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +3 -8
- package/build/es/index.typings.mjs +9 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +9 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -8
- package/build/internal/cjs/index.js +9 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +3 -8
- package/build/internal/cjs/index.typings.js +9 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +9 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -8
- package/build/internal/es/index.mjs +9 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +3 -8
- package/build/internal/es/index.typings.mjs +9 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +9 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@
|
|
|
2
2
|
import { ListMembershipQuestionsResponse, CreateOrReplaceAllMembershipQuestionsOptions, CreateOrReplaceAllMembershipQuestionsResponse, ListAnswersOptions, ListAnswersResponse } from './index.typings.js';
|
|
3
3
|
export { CreateOrReplaceAllMembershipQuestionsRequest, ListAnswerCountsRequest, ListAnswerCountsResponse, ListAnswersRequest, ListMembershipQuestionsRequest, MemberAnswerCount, MemberMembershipQuestionAnswers, MembershipQuestion, MembershipQuestionAnswer, Paging, PagingMetadata } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
type MembershipQuestionNonNullablePaths = `required` | `text`;
|
|
6
5
|
declare function listMembershipQuestions$1(httpClient: HttpClient): ListMembershipQuestionsSignature;
|
|
7
6
|
interface ListMembershipQuestionsSignature {
|
|
8
7
|
/**
|
|
@@ -12,9 +11,7 @@ interface ListMembershipQuestionsSignature {
|
|
|
12
11
|
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
13
12
|
* @param - Group ID.
|
|
14
13
|
*/
|
|
15
|
-
(groupId: string): Promise<NonNullablePaths<ListMembershipQuestionsResponse, {
|
|
16
|
-
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
17
|
-
}[MembershipQuestionNonNullablePaths]>>;
|
|
14
|
+
(groupId: string): Promise<NonNullablePaths<ListMembershipQuestionsResponse, `questions` | `questions.${number}.required` | `questions.${number}.text`, 4>>;
|
|
18
15
|
}
|
|
19
16
|
declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient): CreateOrReplaceAllMembershipQuestionsSignature;
|
|
20
17
|
interface CreateOrReplaceAllMembershipQuestionsSignature {
|
|
@@ -28,9 +25,7 @@ interface CreateOrReplaceAllMembershipQuestionsSignature {
|
|
|
28
25
|
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
29
26
|
* @param - Group ID.
|
|
30
27
|
*/
|
|
31
|
-
(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions): Promise<NonNullablePaths<CreateOrReplaceAllMembershipQuestionsResponse, {
|
|
32
|
-
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
33
|
-
}[MembershipQuestionNonNullablePaths]>>;
|
|
28
|
+
(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions): Promise<NonNullablePaths<CreateOrReplaceAllMembershipQuestionsResponse, `questions` | `questions.${number}.required` | `questions.${number}.text`, 4>>;
|
|
34
29
|
}
|
|
35
30
|
declare function listAnswers$1(httpClient: HttpClient): ListAnswersSignature;
|
|
36
31
|
interface ListAnswersSignature {
|
|
@@ -41,7 +36,7 @@ interface ListAnswersSignature {
|
|
|
41
36
|
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
42
37
|
* @param - Group ID.
|
|
43
38
|
*/
|
|
44
|
-
(groupId: string, options?: ListAnswersOptions): Promise<NonNullablePaths<ListAnswersResponse, `memberAnswers` | `memberAnswers.${number}.memberId
|
|
39
|
+
(groupId: string, options?: ListAnswersOptions): Promise<NonNullablePaths<ListAnswersResponse, `memberAnswers` | `memberAnswers.${number}.memberId`, 4>>;
|
|
45
40
|
}
|
|
46
41
|
|
|
47
42
|
declare const listMembershipQuestions: MaybeContext<BuildRESTFunction<typeof listMembershipQuestions$1> & typeof listMembershipQuestions$1>;
|
package/build/cjs/index.js
CHANGED
|
@@ -126,6 +126,9 @@ function listMembershipQuestions(payload) {
|
|
|
126
126
|
method: "GET",
|
|
127
127
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
128
128
|
packageName: PACKAGE_NAME,
|
|
129
|
+
migrationOptions: {
|
|
130
|
+
optInTransformResponse: true
|
|
131
|
+
},
|
|
129
132
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
130
133
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
131
134
|
data: payload,
|
|
@@ -155,6 +158,9 @@ function createOrReplaceAllMembershipQuestions(payload) {
|
|
|
155
158
|
method: "PUT",
|
|
156
159
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
157
160
|
packageName: PACKAGE_NAME,
|
|
161
|
+
migrationOptions: {
|
|
162
|
+
optInTransformResponse: true
|
|
163
|
+
},
|
|
158
164
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
159
165
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
160
166
|
data: payload,
|
|
@@ -173,6 +179,9 @@ function listAnswers(payload) {
|
|
|
173
179
|
method: "POST",
|
|
174
180
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
175
181
|
packageName: PACKAGE_NAME,
|
|
182
|
+
migrationOptions: {
|
|
183
|
+
optInTransformResponse: true
|
|
184
|
+
},
|
|
176
185
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
177
186
|
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
178
187
|
data: payload,
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/social-groups-v2-membership-question-membership-questions.universal.ts","../../src/social-groups-v2-membership-question-membership-questions.http.ts","../../src/social-groups-v2-membership-question-membership-questions.public.ts","../../src/social-groups-v2-membership-question-membership-questions.context.ts"],"sourcesContent":["export * from './src/social-groups-v2-membership-question-membership-questions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSocialGroupsV2MembershipQuestion from './social-groups-v2-membership-question-membership-questions.http.js';\n\n/**\n * Question asked to members when joining a group.\n * Only group admins can create or update membership questions\n * and can set whether it is required to answer membership questions.\n */\nexport interface MembershipQuestion {\n /**\n * Question ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Whether a member must answer this question when joining the group. */\n required?: boolean;\n /**\n * Question text.\n * @minLength 1\n * @maxLength 300\n */\n text?: string;\n}\n\nexport interface ListMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n}\n\nexport interface ListMembershipQuestionsResponse {\n /** Retrieved membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsResponse {\n /** Membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface ListAnswersRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListAnswersResponse {\n /** Answers to the membership questions, grouped by member. */\n memberAnswers?: MemberMembershipQuestionAnswers[];\n /** Membership questions by question ID. Includes only questions that have been answered by the specified members. */\n questions?: Record<string, MembershipQuestion>;\n metadata?: PagingMetadata;\n}\n\nexport interface MemberMembershipQuestionAnswers {\n /**\n * Member ID. See the Members API for more details.\n * @format GUID\n */\n memberId?: string;\n /** Answers to the membership question. */\n answers?: MembershipQuestionAnswer[];\n}\n\n/** Answer to a membership question. */\nexport interface MembershipQuestionAnswer {\n /**\n * Question ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Answer text.\n * @maxLength 300\n */\n text?: string | null;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAnswerCountsRequest {\n /**\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n}\n\nexport interface ListAnswerCountsResponse {\n memberAnswerCounts?: MemberAnswerCount[];\n}\n\nexport interface MemberAnswerCount {\n /** @format GUID */\n memberId?: string;\n /** @format GUID */\n groupId?: string;\n count?: number;\n}\n\ntype MembershipQuestionNonNullablePaths = `required` | `text`;\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions\n */\nexport async function listMembershipQuestions(\n groupId: string\n): Promise<\n NonNullablePaths<\n ListMembershipQuestionsResponse,\n {\n [P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;\n }[MembershipQuestionNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ groupId: groupId });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { groupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['groupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions\n */\nexport async function createOrReplaceAllMembershipQuestions(\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n): Promise<\n NonNullablePaths<\n CreateOrReplaceAllMembershipQuestionsResponse,\n {\n [P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;\n }[MembershipQuestionNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n questions: options?.questions,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.createOrReplaceAllMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n questions: '$[1].questions',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsOptions {\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers\n */\nexport async function listAnswers(\n groupId: string,\n options?: ListAnswersOptions\n): Promise<\n NonNullablePaths<\n ListAnswersResponse,\n `memberAnswers` | `memberAnswers.${number}.memberId`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n memberIds: options?.memberIds,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listAnswers(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n memberIds: '$[1].memberIds',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAnswersOptions {\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\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 { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateOrReplaceAllMembershipQuestionsOptions,\n CreateOrReplaceAllMembershipQuestionsResponse,\n ListAnswersOptions,\n ListAnswersResponse,\n ListMembershipQuestionsResponse,\n createOrReplaceAllMembershipQuestions as universalCreateOrReplaceAllMembershipQuestions,\n listAnswers as universalListAnswers,\n listMembershipQuestions as universalListMembershipQuestions,\n} from './social-groups-v2-membership-question-membership-questions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/groups' };\n\ntype MembershipQuestionNonNullablePaths = `required` | `text`;\n\nexport function listMembershipQuestions(\n httpClient: HttpClient\n): ListMembershipQuestionsSignature {\n return (groupId: string) =>\n universalListMembershipQuestions(\n groupId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListMembershipQuestionsSignature {\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 * @param - Group ID.\n */\n (groupId: string): Promise<\n NonNullablePaths<\n ListMembershipQuestionsResponse,\n {\n [P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;\n }[MembershipQuestionNonNullablePaths]\n >\n >;\n}\n\nexport function createOrReplaceAllMembershipQuestions(\n httpClient: HttpClient\n): CreateOrReplaceAllMembershipQuestionsSignature {\n return (\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n ) =>\n universalCreateOrReplaceAllMembershipQuestions(\n groupId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateOrReplaceAllMembershipQuestionsSignature {\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 * @param - Group ID.\n */\n (\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n ): Promise<\n NonNullablePaths<\n CreateOrReplaceAllMembershipQuestionsResponse,\n {\n [P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;\n }[MembershipQuestionNonNullablePaths]\n >\n >;\n}\n\nexport function listAnswers(httpClient: HttpClient): ListAnswersSignature {\n return (groupId: string, options?: ListAnswersOptions) =>\n universalListAnswers(\n groupId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAnswersSignature {\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 * @param - Group ID.\n */\n (groupId: string, options?: ListAnswersOptions): Promise<\n NonNullablePaths<\n ListAnswersResponse,\n `memberAnswers` | `memberAnswers.${number}.memberId`\n >\n >;\n}\n\nexport {\n CreateOrReplaceAllMembershipQuestionsOptions,\n CreateOrReplaceAllMembershipQuestionsRequest,\n CreateOrReplaceAllMembershipQuestionsResponse,\n ListAnswerCountsRequest,\n ListAnswerCountsResponse,\n ListAnswersOptions,\n ListAnswersRequest,\n ListAnswersResponse,\n ListMembershipQuestionsRequest,\n ListMembershipQuestionsResponse,\n MemberAnswerCount,\n MemberMembershipQuestionAnswers,\n MembershipQuestion,\n MembershipQuestionAnswer,\n Paging,\n PagingMetadata,\n} from './social-groups-v2-membership-question-membership-questions.universal.js';\n","import {\n listMembershipQuestions as publicListMembershipQuestions,\n createOrReplaceAllMembershipQuestions as publicCreateOrReplaceAllMembershipQuestions,\n listAnswers as publicListAnswers,\n} from './social-groups-v2-membership-question-membership-questions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listMembershipQuestions: MaybeContext<\n BuildRESTFunction<typeof publicListMembershipQuestions> &\n typeof publicListMembershipQuestions\n> = /*#__PURE__*/ createRESTModule(publicListMembershipQuestions);\nexport const createOrReplaceAllMembershipQuestions: MaybeContext<\n BuildRESTFunction<typeof publicCreateOrReplaceAllMembershipQuestions> &\n typeof publicCreateOrReplaceAllMembershipQuestions\n> = /*#__PURE__*/ createRESTModule(publicCreateOrReplaceAllMembershipQuestions);\nexport const listAnswers: MaybeContext<\n BuildRESTFunction<typeof publicListAnswers> & typeof publicListAnswers\n> = /*#__PURE__*/ createRESTModule(publicListAnswers);\n\nexport {\n MembershipQuestion,\n ListMembershipQuestionsRequest,\n ListMembershipQuestionsResponse,\n CreateOrReplaceAllMembershipQuestionsRequest,\n CreateOrReplaceAllMembershipQuestionsResponse,\n ListAnswersRequest,\n Paging,\n ListAnswersResponse,\n MemberMembershipQuestionAnswers,\n MembershipQuestionAnswer,\n PagingMetadata,\n ListAnswerCountsRequest,\n ListAnswerCountsResponse,\n MemberAnswerCount,\n CreateOrReplaceAllMembershipQuestionsOptions,\n ListAnswersOptions,\n} from './social-groups-v2-membership-question-membership-questions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+CAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MACh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,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoBO,SAASC,uCACd,YACgD;AAChD,SAAO,CACL,SACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA0BO,SAASC,aAAY,YAA8C;AACxE,SAAO,CAAC,SAAiB,YACvBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACvFA,IAAAC,uBAAiC;AAG1B,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,yCAGK,2DAAiBA,sCAA2C;AACvE,IAAMC,eAEK,2DAAiBA,YAAiB;","names":["createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","import_rest_modules","listMembershipQuestions","sdkTransformError","createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers","import_rest_modules","listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/social-groups-v2-membership-question-membership-questions.universal.ts","../../src/social-groups-v2-membership-question-membership-questions.http.ts","../../src/social-groups-v2-membership-question-membership-questions.public.ts","../../src/social-groups-v2-membership-question-membership-questions.context.ts"],"sourcesContent":["export * from './src/social-groups-v2-membership-question-membership-questions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSocialGroupsV2MembershipQuestion from './social-groups-v2-membership-question-membership-questions.http.js';\n\n/**\n * Question asked to members when joining a group.\n * Only group admins can create or update membership questions\n * and can set whether it is required to answer membership questions.\n */\nexport interface MembershipQuestion {\n /**\n * Question ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Whether a member must answer this question when joining the group. */\n required?: boolean;\n /**\n * Question text.\n * @minLength 1\n * @maxLength 300\n */\n text?: string;\n}\n\nexport interface ListMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n}\n\nexport interface ListMembershipQuestionsResponse {\n /** Retrieved membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsResponse {\n /** Membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface ListAnswersRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListAnswersResponse {\n /** Answers to the membership questions, grouped by member. */\n memberAnswers?: MemberMembershipQuestionAnswers[];\n /** Membership questions by question ID. Includes only questions that have been answered by the specified members. */\n questions?: Record<string, MembershipQuestion>;\n metadata?: PagingMetadata;\n}\n\nexport interface MemberMembershipQuestionAnswers {\n /**\n * Member ID. See the Members API for more details.\n * @format GUID\n */\n memberId?: string;\n /** Answers to the membership question. */\n answers?: MembershipQuestionAnswer[];\n}\n\n/** Answer to a membership question. */\nexport interface MembershipQuestionAnswer {\n /**\n * Question ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Answer text.\n * @maxLength 300\n */\n text?: string | null;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAnswerCountsRequest {\n /**\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n}\n\nexport interface ListAnswerCountsResponse {\n memberAnswerCounts?: MemberAnswerCount[];\n}\n\nexport interface MemberAnswerCount {\n /** @format GUID */\n memberId?: string;\n /** @format GUID */\n groupId?: string;\n count?: number;\n}\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions\n */\nexport async function listMembershipQuestions(\n groupId: string\n): Promise<\n NonNullablePaths<\n ListMembershipQuestionsResponse,\n `questions` | `questions.${number}.required` | `questions.${number}.text`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ groupId: groupId });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { groupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['groupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions\n */\nexport async function createOrReplaceAllMembershipQuestions(\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n): Promise<\n NonNullablePaths<\n CreateOrReplaceAllMembershipQuestionsResponse,\n `questions` | `questions.${number}.required` | `questions.${number}.text`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n questions: options?.questions,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.createOrReplaceAllMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n questions: '$[1].questions',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsOptions {\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers\n */\nexport async function listAnswers(\n groupId: string,\n options?: ListAnswersOptions\n): Promise<\n NonNullablePaths<\n ListAnswersResponse,\n `memberAnswers` | `memberAnswers.${number}.memberId`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n memberIds: options?.memberIds,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listAnswers(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n memberIds: '$[1].memberIds',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAnswersOptions {\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateOrReplaceAllMembershipQuestionsOptions,\n CreateOrReplaceAllMembershipQuestionsResponse,\n ListAnswersOptions,\n ListAnswersResponse,\n ListMembershipQuestionsResponse,\n createOrReplaceAllMembershipQuestions as universalCreateOrReplaceAllMembershipQuestions,\n listAnswers as universalListAnswers,\n listMembershipQuestions as universalListMembershipQuestions,\n} from './social-groups-v2-membership-question-membership-questions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/groups' };\n\nexport function listMembershipQuestions(\n httpClient: HttpClient\n): ListMembershipQuestionsSignature {\n return (groupId: string) =>\n universalListMembershipQuestions(\n groupId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListMembershipQuestionsSignature {\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 * @param - Group ID.\n */\n (groupId: string): Promise<\n NonNullablePaths<\n ListMembershipQuestionsResponse,\n `questions` | `questions.${number}.required` | `questions.${number}.text`,\n 4\n >\n >;\n}\n\nexport function createOrReplaceAllMembershipQuestions(\n httpClient: HttpClient\n): CreateOrReplaceAllMembershipQuestionsSignature {\n return (\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n ) =>\n universalCreateOrReplaceAllMembershipQuestions(\n groupId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateOrReplaceAllMembershipQuestionsSignature {\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 * @param - Group ID.\n */\n (\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n ): Promise<\n NonNullablePaths<\n CreateOrReplaceAllMembershipQuestionsResponse,\n `questions` | `questions.${number}.required` | `questions.${number}.text`,\n 4\n >\n >;\n}\n\nexport function listAnswers(httpClient: HttpClient): ListAnswersSignature {\n return (groupId: string, options?: ListAnswersOptions) =>\n universalListAnswers(\n groupId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAnswersSignature {\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 * @param - Group ID.\n */\n (groupId: string, options?: ListAnswersOptions): Promise<\n NonNullablePaths<\n ListAnswersResponse,\n `memberAnswers` | `memberAnswers.${number}.memberId`,\n 4\n >\n >;\n}\n\nexport {\n CreateOrReplaceAllMembershipQuestionsOptions,\n CreateOrReplaceAllMembershipQuestionsRequest,\n CreateOrReplaceAllMembershipQuestionsResponse,\n ListAnswerCountsRequest,\n ListAnswerCountsResponse,\n ListAnswersOptions,\n ListAnswersRequest,\n ListAnswersResponse,\n ListMembershipQuestionsRequest,\n ListMembershipQuestionsResponse,\n MemberAnswerCount,\n MemberMembershipQuestionAnswers,\n MembershipQuestion,\n MembershipQuestionAnswer,\n Paging,\n PagingMetadata,\n} from './social-groups-v2-membership-question-membership-questions.universal.js';\n","import {\n listMembershipQuestions as publicListMembershipQuestions,\n createOrReplaceAllMembershipQuestions as publicCreateOrReplaceAllMembershipQuestions,\n listAnswers as publicListAnswers,\n} from './social-groups-v2-membership-question-membership-questions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listMembershipQuestions: MaybeContext<\n BuildRESTFunction<typeof publicListMembershipQuestions> &\n typeof publicListMembershipQuestions\n> = /*#__PURE__*/ createRESTModule(publicListMembershipQuestions);\nexport const createOrReplaceAllMembershipQuestions: MaybeContext<\n BuildRESTFunction<typeof publicCreateOrReplaceAllMembershipQuestions> &\n typeof publicCreateOrReplaceAllMembershipQuestions\n> = /*#__PURE__*/ createRESTModule(publicCreateOrReplaceAllMembershipQuestions);\nexport const listAnswers: MaybeContext<\n BuildRESTFunction<typeof publicListAnswers> & typeof publicListAnswers\n> = /*#__PURE__*/ createRESTModule(publicListAnswers);\n\nexport {\n MembershipQuestion,\n ListMembershipQuestionsRequest,\n ListMembershipQuestionsResponse,\n CreateOrReplaceAllMembershipQuestionsRequest,\n CreateOrReplaceAllMembershipQuestionsResponse,\n ListAnswersRequest,\n Paging,\n ListAnswersResponse,\n MemberMembershipQuestionAnswers,\n MembershipQuestionAnswer,\n PagingMetadata,\n ListAnswerCountsRequest,\n ListAnswerCountsResponse,\n MemberAnswerCount,\n CreateOrReplaceAllMembershipQuestionsOptions,\n ListAnswersOptions,\n} from './social-groups-v2-membership-question-membership-questions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+CAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,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,CAAC,WAAW,SAAS;AAAA,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE7TO,SAASG,yBACd,YACkC;AAClC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,SAASC,uCACd,YACgD;AAChD,SAAO,CACL,SACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAyBO,SAASC,aAAY,YAA8C;AACxE,SAAO,CAAC,SAAiB,YACvBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnFA,IAAAC,uBAAiC;AAG1B,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,yCAGK,2DAAiBA,sCAA2C;AACvE,IAAMC,eAEK,2DAAiBA,YAAiB;","names":["createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","import_rest_modules","listMembershipQuestions","sdkTransformError","createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers","import_rest_modules","listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
|
@@ -124,7 +124,6 @@ interface MemberAnswerCount {
|
|
|
124
124
|
groupId?: string;
|
|
125
125
|
count?: number;
|
|
126
126
|
}
|
|
127
|
-
type MembershipQuestionNonNullablePaths = `required` | `text`;
|
|
128
127
|
/**
|
|
129
128
|
* Retrieves the membership questions for a group.
|
|
130
129
|
*
|
|
@@ -135,9 +134,7 @@ type MembershipQuestionNonNullablePaths = `required` | `text`;
|
|
|
135
134
|
* @requiredField groupId
|
|
136
135
|
* @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions
|
|
137
136
|
*/
|
|
138
|
-
declare function listMembershipQuestions(groupId: string): Promise<NonNullablePaths<ListMembershipQuestionsResponse, {
|
|
139
|
-
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
140
|
-
}[MembershipQuestionNonNullablePaths]>>;
|
|
137
|
+
declare function listMembershipQuestions(groupId: string): Promise<NonNullablePaths<ListMembershipQuestionsResponse, `questions` | `questions.${number}.required` | `questions.${number}.text`, 4>>;
|
|
141
138
|
/**
|
|
142
139
|
* Creates membership questions if none have been set up. Otherwise, replaces all existing questions.
|
|
143
140
|
*
|
|
@@ -151,9 +148,7 @@ declare function listMembershipQuestions(groupId: string): Promise<NonNullablePa
|
|
|
151
148
|
* @requiredField groupId
|
|
152
149
|
* @fqn wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions
|
|
153
150
|
*/
|
|
154
|
-
declare function createOrReplaceAllMembershipQuestions(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions): Promise<NonNullablePaths<CreateOrReplaceAllMembershipQuestionsResponse, {
|
|
155
|
-
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
156
|
-
}[MembershipQuestionNonNullablePaths]>>;
|
|
151
|
+
declare function createOrReplaceAllMembershipQuestions(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions): Promise<NonNullablePaths<CreateOrReplaceAllMembershipQuestionsResponse, `questions` | `questions.${number}.required` | `questions.${number}.text`, 4>>;
|
|
157
152
|
interface CreateOrReplaceAllMembershipQuestionsOptions {
|
|
158
153
|
/**
|
|
159
154
|
* New membership questions.
|
|
@@ -171,7 +166,7 @@ interface CreateOrReplaceAllMembershipQuestionsOptions {
|
|
|
171
166
|
* @requiredField groupId
|
|
172
167
|
* @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers
|
|
173
168
|
*/
|
|
174
|
-
declare function listAnswers(groupId: string, options?: ListAnswersOptions): Promise<NonNullablePaths<ListAnswersResponse, `memberAnswers` | `memberAnswers.${number}.memberId
|
|
169
|
+
declare function listAnswers(groupId: string, options?: ListAnswersOptions): Promise<NonNullablePaths<ListAnswersResponse, `memberAnswers` | `memberAnswers.${number}.memberId`, 4>>;
|
|
175
170
|
interface ListAnswersOptions {
|
|
176
171
|
/**
|
|
177
172
|
* Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.
|
|
@@ -126,6 +126,9 @@ function listMembershipQuestions(payload) {
|
|
|
126
126
|
method: "GET",
|
|
127
127
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
128
128
|
packageName: PACKAGE_NAME,
|
|
129
|
+
migrationOptions: {
|
|
130
|
+
optInTransformResponse: true
|
|
131
|
+
},
|
|
129
132
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
130
133
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
131
134
|
data: payload,
|
|
@@ -155,6 +158,9 @@ function createOrReplaceAllMembershipQuestions(payload) {
|
|
|
155
158
|
method: "PUT",
|
|
156
159
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
157
160
|
packageName: PACKAGE_NAME,
|
|
161
|
+
migrationOptions: {
|
|
162
|
+
optInTransformResponse: true
|
|
163
|
+
},
|
|
158
164
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
159
165
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
160
166
|
data: payload,
|
|
@@ -173,6 +179,9 @@ function listAnswers(payload) {
|
|
|
173
179
|
method: "POST",
|
|
174
180
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
175
181
|
packageName: PACKAGE_NAME,
|
|
182
|
+
migrationOptions: {
|
|
183
|
+
optInTransformResponse: true
|
|
184
|
+
},
|
|
176
185
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
177
186
|
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
178
187
|
data: payload,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/social-groups-v2-membership-question-membership-questions.universal.ts","../../src/social-groups-v2-membership-question-membership-questions.http.ts"],"sourcesContent":["export * from './src/social-groups-v2-membership-question-membership-questions.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSocialGroupsV2MembershipQuestion from './social-groups-v2-membership-question-membership-questions.http.js';\n\n/**\n * Question asked to members when joining a group.\n * Only group admins can create or update membership questions\n * and can set whether it is required to answer membership questions.\n */\nexport interface MembershipQuestion {\n /**\n * Question ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Whether a member must answer this question when joining the group. */\n required?: boolean;\n /**\n * Question text.\n * @minLength 1\n * @maxLength 300\n */\n text?: string;\n}\n\nexport interface ListMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n}\n\nexport interface ListMembershipQuestionsResponse {\n /** Retrieved membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsResponse {\n /** Membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface ListAnswersRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListAnswersResponse {\n /** Answers to the membership questions, grouped by member. */\n memberAnswers?: MemberMembershipQuestionAnswers[];\n /** Membership questions by question ID. Includes only questions that have been answered by the specified members. */\n questions?: Record<string, MembershipQuestion>;\n metadata?: PagingMetadata;\n}\n\nexport interface MemberMembershipQuestionAnswers {\n /**\n * Member ID. See the Members API for more details.\n * @format GUID\n */\n memberId?: string;\n /** Answers to the membership question. */\n answers?: MembershipQuestionAnswer[];\n}\n\n/** Answer to a membership question. */\nexport interface MembershipQuestionAnswer {\n /**\n * Question ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Answer text.\n * @maxLength 300\n */\n text?: string | null;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAnswerCountsRequest {\n /**\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n}\n\nexport interface ListAnswerCountsResponse {\n memberAnswerCounts?: MemberAnswerCount[];\n}\n\nexport interface MemberAnswerCount {\n /** @format GUID */\n memberId?: string;\n /** @format GUID */\n groupId?: string;\n count?: number;\n}\n\ntype MembershipQuestionNonNullablePaths = `required` | `text`;\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions\n */\nexport async function listMembershipQuestions(\n groupId: string\n): Promise<\n NonNullablePaths<\n ListMembershipQuestionsResponse,\n {\n [P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;\n }[MembershipQuestionNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ groupId: groupId });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { groupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['groupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions\n */\nexport async function createOrReplaceAllMembershipQuestions(\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n): Promise<\n NonNullablePaths<\n CreateOrReplaceAllMembershipQuestionsResponse,\n {\n [P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;\n }[MembershipQuestionNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n questions: options?.questions,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.createOrReplaceAllMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n questions: '$[1].questions',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsOptions {\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers\n */\nexport async function listAnswers(\n groupId: string,\n options?: ListAnswersOptions\n): Promise<\n NonNullablePaths<\n ListAnswersResponse,\n `memberAnswers` | `memberAnswers.${number}.memberId`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n memberIds: options?.memberIds,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listAnswers(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n memberIds: '$[1].memberIds',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAnswersOptions {\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+CAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA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C;AAAA,IAC5C;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,SAAS;AAAA,UACT,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,WAAW,SAAS;AAAA,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAoBA,eAAsBE,aACpB,SACA,SAMA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,WAAW,SAAS;AAAA,IACpB,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAC0C,YAAY,OAAO;AAEnE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,SAAS;AAAA,UACT,WAAW;AAAA,UACX,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,WAAW,SAAS;AAAA,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","import_rest_modules","listMembershipQuestions","sdkTransformError","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/social-groups-v2-membership-question-membership-questions.universal.ts","../../src/social-groups-v2-membership-question-membership-questions.http.ts"],"sourcesContent":["export * from './src/social-groups-v2-membership-question-membership-questions.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSocialGroupsV2MembershipQuestion from './social-groups-v2-membership-question-membership-questions.http.js';\n\n/**\n * Question asked to members when joining a group.\n * Only group admins can create or update membership questions\n * and can set whether it is required to answer membership questions.\n */\nexport interface MembershipQuestion {\n /**\n * Question ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Whether a member must answer this question when joining the group. */\n required?: boolean;\n /**\n * Question text.\n * @minLength 1\n * @maxLength 300\n */\n text?: string;\n}\n\nexport interface ListMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n}\n\nexport interface ListMembershipQuestionsResponse {\n /** Retrieved membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsResponse {\n /** Membership questions. */\n questions?: MembershipQuestion[];\n}\n\nexport interface ListAnswersRequest {\n /**\n * Group ID.\n * @format GUID\n */\n groupId: string;\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListAnswersResponse {\n /** Answers to the membership questions, grouped by member. */\n memberAnswers?: MemberMembershipQuestionAnswers[];\n /** Membership questions by question ID. Includes only questions that have been answered by the specified members. */\n questions?: Record<string, MembershipQuestion>;\n metadata?: PagingMetadata;\n}\n\nexport interface MemberMembershipQuestionAnswers {\n /**\n * Member ID. See the Members API for more details.\n * @format GUID\n */\n memberId?: string;\n /** Answers to the membership question. */\n answers?: MembershipQuestionAnswer[];\n}\n\n/** Answer to a membership question. */\nexport interface MembershipQuestionAnswer {\n /**\n * Question ID.\n * @format GUID\n */\n _id?: string;\n /**\n * Answer text.\n * @maxLength 300\n */\n text?: string | null;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAnswerCountsRequest {\n /**\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n}\n\nexport interface ListAnswerCountsResponse {\n memberAnswerCounts?: MemberAnswerCount[];\n}\n\nexport interface MemberAnswerCount {\n /** @format GUID */\n memberId?: string;\n /** @format GUID */\n groupId?: string;\n count?: number;\n}\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions\n */\nexport async function listMembershipQuestions(\n groupId: string\n): Promise<\n NonNullablePaths<\n ListMembershipQuestionsResponse,\n `questions` | `questions.${number}.required` | `questions.${number}.text`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ groupId: groupId });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { groupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['groupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions\n */\nexport async function createOrReplaceAllMembershipQuestions(\n groupId: string,\n options?: CreateOrReplaceAllMembershipQuestionsOptions\n): Promise<\n NonNullablePaths<\n CreateOrReplaceAllMembershipQuestionsResponse,\n `questions` | `questions.${number}.required` | `questions.${number}.text`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n questions: options?.questions,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.createOrReplaceAllMembershipQuestions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n questions: '$[1].questions',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateOrReplaceAllMembershipQuestionsOptions {\n /**\n * New membership questions.\n * @maxSize 50\n */\n questions?: MembershipQuestion[];\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 * @param groupId - Group ID.\n * @public\n * @requiredField groupId\n * @fqn wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers\n */\nexport async function listAnswers(\n groupId: string,\n options?: ListAnswersOptions\n): Promise<\n NonNullablePaths<\n ListAnswersResponse,\n `memberAnswers` | `memberAnswers.${number}.memberId`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n groupId: groupId,\n memberIds: options?.memberIds,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixSocialGroupsV2MembershipQuestion.listAnswers(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n groupId: '$[0]',\n memberIds: '$[1].memberIds',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['groupId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAnswersOptions {\n /**\n * Member IDs. If no member ID is provided, answers for all members will be returned. See the Members API for more details.\n * @format GUID\n * @maxSize 500\n */\n memberIds?: string[];\n paging?: Paging;\n}\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+CAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT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A,CAAC,WAAW,SAAS;AAAA,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","import_rest_modules","listMembershipQuestions","sdkTransformError","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
package/build/cjs/meta.js
CHANGED
|
@@ -122,6 +122,9 @@ function listMembershipQuestions(payload) {
|
|
|
122
122
|
method: "GET",
|
|
123
123
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
124
124
|
packageName: PACKAGE_NAME,
|
|
125
|
+
migrationOptions: {
|
|
126
|
+
optInTransformResponse: true
|
|
127
|
+
},
|
|
125
128
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
126
129
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
127
130
|
data: payload,
|
|
@@ -151,6 +154,9 @@ function createOrReplaceAllMembershipQuestions(payload) {
|
|
|
151
154
|
method: "PUT",
|
|
152
155
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
153
156
|
packageName: PACKAGE_NAME,
|
|
157
|
+
migrationOptions: {
|
|
158
|
+
optInTransformResponse: true
|
|
159
|
+
},
|
|
154
160
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
155
161
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
156
162
|
data: payload,
|
|
@@ -169,6 +175,9 @@ function listAnswers(payload) {
|
|
|
169
175
|
method: "POST",
|
|
170
176
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
171
177
|
packageName: PACKAGE_NAME,
|
|
178
|
+
migrationOptions: {
|
|
179
|
+
optInTransformResponse: true
|
|
180
|
+
},
|
|
172
181
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
173
182
|
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
174
183
|
data: payload,
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+CAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QAC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AOd;AACA,QAAM,UAAU,EAAE,SAAS,WAAW;AAEtC,QAAM,oBAC0C,YAAY,OAAO;AAEnE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,SAAS,UAAU;AAAA,IACjC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","import_rest_modules","listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
|
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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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 migrationOptions: {\n optInTransformResponse: true,\n },\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+CAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF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ACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,SAAS,UAAU;AAAA,IACjC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,yCAOd;AACA,QAAM,UAAU,EAAE,SAAS,WAAW;AAEtC,QAAM,oBAC0C;AAAA,IAC5C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,SAAS,UAAU;AAAA,IACjC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,eAOd;AACA,QAAM,UAAU,EAAE,SAAS,WAAW;AAEtC,QAAM,oBAC0C,YAAY,OAAO;AAEnE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,SAAS,UAAU;AAAA,IACjC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createOrReplaceAllMembershipQuestions","listAnswers","listMembershipQuestions","import_rest_modules","listMembershipQuestions","createOrReplaceAllMembershipQuestions","listAnswers"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@
|
|
|
2
2
|
import { ListMembershipQuestionsResponse, CreateOrReplaceAllMembershipQuestionsOptions, CreateOrReplaceAllMembershipQuestionsResponse, ListAnswersOptions, ListAnswersResponse } from './index.typings.mjs';
|
|
3
3
|
export { CreateOrReplaceAllMembershipQuestionsRequest, ListAnswerCountsRequest, ListAnswerCountsResponse, ListAnswersRequest, ListMembershipQuestionsRequest, MemberAnswerCount, MemberMembershipQuestionAnswers, MembershipQuestion, MembershipQuestionAnswer, Paging, PagingMetadata } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
-
type MembershipQuestionNonNullablePaths = `required` | `text`;
|
|
6
5
|
declare function listMembershipQuestions$1(httpClient: HttpClient): ListMembershipQuestionsSignature;
|
|
7
6
|
interface ListMembershipQuestionsSignature {
|
|
8
7
|
/**
|
|
@@ -12,9 +11,7 @@ interface ListMembershipQuestionsSignature {
|
|
|
12
11
|
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
13
12
|
* @param - Group ID.
|
|
14
13
|
*/
|
|
15
|
-
(groupId: string): Promise<NonNullablePaths<ListMembershipQuestionsResponse, {
|
|
16
|
-
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
17
|
-
}[MembershipQuestionNonNullablePaths]>>;
|
|
14
|
+
(groupId: string): Promise<NonNullablePaths<ListMembershipQuestionsResponse, `questions` | `questions.${number}.required` | `questions.${number}.text`, 4>>;
|
|
18
15
|
}
|
|
19
16
|
declare function createOrReplaceAllMembershipQuestions$1(httpClient: HttpClient): CreateOrReplaceAllMembershipQuestionsSignature;
|
|
20
17
|
interface CreateOrReplaceAllMembershipQuestionsSignature {
|
|
@@ -28,9 +25,7 @@ interface CreateOrReplaceAllMembershipQuestionsSignature {
|
|
|
28
25
|
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
29
26
|
* @param - Group ID.
|
|
30
27
|
*/
|
|
31
|
-
(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions): Promise<NonNullablePaths<CreateOrReplaceAllMembershipQuestionsResponse, {
|
|
32
|
-
[P in MembershipQuestionNonNullablePaths]: `questions.${number}.${P}`;
|
|
33
|
-
}[MembershipQuestionNonNullablePaths]>>;
|
|
28
|
+
(groupId: string, options?: CreateOrReplaceAllMembershipQuestionsOptions): Promise<NonNullablePaths<CreateOrReplaceAllMembershipQuestionsResponse, `questions` | `questions.${number}.required` | `questions.${number}.text`, 4>>;
|
|
34
29
|
}
|
|
35
30
|
declare function listAnswers$1(httpClient: HttpClient): ListAnswersSignature;
|
|
36
31
|
interface ListAnswersSignature {
|
|
@@ -41,7 +36,7 @@ interface ListAnswersSignature {
|
|
|
41
36
|
* >This endpoint requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
42
37
|
* @param - Group ID.
|
|
43
38
|
*/
|
|
44
|
-
(groupId: string, options?: ListAnswersOptions): Promise<NonNullablePaths<ListAnswersResponse, `memberAnswers` | `memberAnswers.${number}.memberId
|
|
39
|
+
(groupId: string, options?: ListAnswersOptions): Promise<NonNullablePaths<ListAnswersResponse, `memberAnswers` | `memberAnswers.${number}.memberId`, 4>>;
|
|
45
40
|
}
|
|
46
41
|
|
|
47
42
|
declare const listMembershipQuestions: MaybeContext<BuildRESTFunction<typeof listMembershipQuestions$1> & typeof listMembershipQuestions$1>;
|
package/build/es/index.mjs
CHANGED
|
@@ -101,6 +101,9 @@ function listMembershipQuestions(payload) {
|
|
|
101
101
|
method: "GET",
|
|
102
102
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListMembershipQuestions",
|
|
103
103
|
packageName: PACKAGE_NAME,
|
|
104
|
+
migrationOptions: {
|
|
105
|
+
optInTransformResponse: true
|
|
106
|
+
},
|
|
104
107
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
105
108
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
106
109
|
data: payload,
|
|
@@ -130,6 +133,9 @@ function createOrReplaceAllMembershipQuestions(payload) {
|
|
|
130
133
|
method: "PUT",
|
|
131
134
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.CreateOrReplaceAllMembershipQuestions",
|
|
132
135
|
packageName: PACKAGE_NAME,
|
|
136
|
+
migrationOptions: {
|
|
137
|
+
optInTransformResponse: true
|
|
138
|
+
},
|
|
133
139
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
134
140
|
protoPath: "/v2/membership-questions/{groupId}",
|
|
135
141
|
data: payload,
|
|
@@ -148,6 +154,9 @@ function listAnswers(payload) {
|
|
|
148
154
|
method: "POST",
|
|
149
155
|
methodFqn: "wix.social.groups.api.v2.MembershipQuestionsService.ListAnswers",
|
|
150
156
|
packageName: PACKAGE_NAME,
|
|
157
|
+
migrationOptions: {
|
|
158
|
+
optInTransformResponse: true
|
|
159
|
+
},
|
|
151
160
|
url: resolveWixSocialGroupsApiV2MembershipQuestionsServiceUrl({
|
|
152
161
|
protoPath: "/v2/membership-questions/{groupId}/answers",
|
|
153
162
|
data: payload,
|