@wix/auto_sdk_user-management_contributors 1.0.19 → 1.0.21
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 +32 -0
- package/build/{identity-v1-contributor-contributors.universal-B0tzR-hk.d.mts → cjs/index.typings.d.ts} +37 -1
- package/build/cjs/index.typings.js +473 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/{internal → cjs}/meta.d.ts +2 -1
- package/build/es/index.d.mts +32 -0
- package/build/{identity-v1-contributor-contributors.universal-B0tzR-hk.d.ts → es/index.typings.d.mts} +37 -1
- package/build/es/index.typings.mjs +438 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/{internal → es}/meta.d.mts +2 -1
- package/build/es/package.json +3 -0
- package/build/internal/{index.d.ts → cjs/index.d.ts} +2 -2
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/{identity-v1-contributor-contributors.universal-DLzpcW8B.d.mts → cjs/index.typings.d.ts} +59 -1
- package/build/internal/cjs/index.typings.js +473 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/{meta.d.ts → internal/cjs/meta.d.ts} +2 -1
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/{index.d.mts → es/index.d.mts} +2 -2
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/{identity-v1-contributor-contributors.universal-DLzpcW8B.d.ts → es/index.typings.d.mts} +59 -1
- package/build/internal/es/index.typings.mjs +438 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/{meta.d.mts → internal/es/meta.d.mts} +2 -1
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +11 -11
- package/build/index.d.mts +0 -32
- package/build/index.d.ts +0 -32
- package/build/index.js.map +0 -1
- package/build/index.mjs.map +0 -1
- package/build/meta.js.map +0 -1
- package/build/meta.mjs.map +0 -1
- /package/build/{index.js → cjs/index.js} +0 -0
- /package/build/{internal → cjs}/index.js.map +0 -0
- /package/build/{internal → cjs}/meta.js +0 -0
- /package/build/{internal → cjs}/meta.js.map +0 -0
- /package/build/{index.mjs → es/index.mjs} +0 -0
- /package/build/{internal → es}/index.mjs.map +0 -0
- /package/build/{internal → es}/meta.mjs +0 -0
- /package/build/{internal → es}/meta.mjs.map +0 -0
- /package/build/internal/{index.js → cjs/index.js} +0 -0
- /package/build/{meta.js → internal/cjs/meta.js} +0 -0
- /package/build/internal/{index.mjs → es/index.mjs} +0 -0
- /package/build/{meta.mjs → internal/es/meta.mjs} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { ChangeRoleOptions, ChangeContributorRoleResponse, ChangeContributorLocationOptions, ChangeContributorLocationResponse, QuerySiteContributorsOptions, QuerySiteContributorsResponse } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, AppInvite, AssignedPolicy, Assignment, BulkGetUserRolesOnSiteRequest, BulkGetUserRolesOnSiteResponse, BulkValidateEmailInviteEligibilityRequest, BulkValidateEmailInviteEligibilityResponse, ChangeContributorLocationRequest, ChangeContributorRoleRequest, CompanionResource, Condition, ConditionAttributeType, Conditions, Contributor, ContributorLimit, ContributorV2, ContributorsQuota, ContributorsQuotaOptionsOneOf, EmailInviteEligibility, FieldSet, GetAppContributorsRequest, GetAppContributorsResponse, GetContributorsQuotaRequest, GetContributorsQuotaResponse, GetCurrentUserRolesRequest, GetCurrentUserRolesResponse, GetSiteContributorsRequest, GetSiteContributorsResponse, GetSiteContributorsV2Options, GetSiteContributorsV2Request, GetSiteContributorsV2Response, HandleSiteTransferRequest, HandleSiteTransferResponse, InviteStatus, LimitedOptions, LocalizedRole, LocationsRestriction, Name, PendingOwner, PersonMetaData, Policy, PredefinedRole, PredefinedRoles, QuerySiteContributorsFilter, QuerySiteContributorsRequest, Resource, ResourceType, Restriction, RestrictionRestrictionsOneOf, Role, SiteInvite, SiteLocationAssignment, SiteRestriction, SiteRoleAssignment, Subject, SubjectContext, SubjectContextType, SubjectType, Team, Type, User, UserLocalizedRoles, UserSubject } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function changeRole$1(httpClient: HttpClient): ChangeRoleSignature;
|
|
6
|
+
interface ChangeRoleSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Overrides all the roles of a contributor for the specified site.
|
|
9
|
+
* @param - Contributor's account ID.
|
|
10
|
+
* @param - Filter options. The `newRoles` field **must** be passed.
|
|
11
|
+
*/
|
|
12
|
+
(accountId: string, options: ChangeRoleOptions): Promise<ChangeContributorRoleResponse>;
|
|
13
|
+
}
|
|
14
|
+
declare function changeContributorLocation$1(httpClient: HttpClient): ChangeContributorLocationSignature;
|
|
15
|
+
interface ChangeContributorLocationSignature {
|
|
16
|
+
/** @param - Contributor's account ID. */
|
|
17
|
+
(accountId: string, options: ChangeContributorLocationOptions): Promise<ChangeContributorLocationResponse>;
|
|
18
|
+
}
|
|
19
|
+
declare function querySiteContributors$1(httpClient: HttpClient): QuerySiteContributorsSignature;
|
|
20
|
+
interface QuerySiteContributorsSignature {
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves a list of contributors for the specified site, given the provided filters.
|
|
23
|
+
* @param - Filter options.
|
|
24
|
+
*/
|
|
25
|
+
(options?: QuerySiteContributorsOptions | undefined): Promise<QuerySiteContributorsResponse>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare const changeRole: MaybeContext<BuildRESTFunction<typeof changeRole$1> & typeof changeRole$1>;
|
|
29
|
+
declare const changeContributorLocation: MaybeContext<BuildRESTFunction<typeof changeContributorLocation$1> & typeof changeContributorLocation$1>;
|
|
30
|
+
declare const querySiteContributors: MaybeContext<BuildRESTFunction<typeof querySiteContributors$1> & typeof querySiteContributors$1>;
|
|
31
|
+
|
|
32
|
+
export { ChangeContributorLocationOptions, ChangeContributorLocationResponse, ChangeContributorRoleResponse, ChangeRoleOptions, QuerySiteContributorsOptions, QuerySiteContributorsResponse, changeContributorLocation, changeRole, querySiteContributors };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
interface Contributor {
|
|
2
4
|
/** Contributor's metadata. */
|
|
3
5
|
metaData?: PersonMetaData;
|
|
@@ -506,6 +508,8 @@ declare enum FieldSet {
|
|
|
506
508
|
/** Include only `account_id` and `account_owner_id` fields. */
|
|
507
509
|
META_DATA = "META_DATA"
|
|
508
510
|
}
|
|
511
|
+
/** @enumType */
|
|
512
|
+
type FieldSetWithLiterals = FieldSet | 'UNKNOWN' | 'META_DATA';
|
|
509
513
|
interface QuerySiteContributorsResponse {
|
|
510
514
|
/** List of site contributors. */
|
|
511
515
|
contributors?: ContributorV2[];
|
|
@@ -570,10 +574,33 @@ interface GetSiteContributorsV2Options {
|
|
|
570
574
|
/** The set of desired fields. */
|
|
571
575
|
fields?: string[];
|
|
572
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* Overrides all the roles of a contributor for the specified site.
|
|
579
|
+
* @param accountId - Contributor's account ID.
|
|
580
|
+
* @public
|
|
581
|
+
* @requiredField accountId
|
|
582
|
+
* @requiredField options
|
|
583
|
+
* @requiredField options.newRoles
|
|
584
|
+
* @param options - Filter options. The `newRoles` field **must** be passed.
|
|
585
|
+
* @permissionId SITE_ROLES.CHANGE_ROLE
|
|
586
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole
|
|
587
|
+
*/
|
|
588
|
+
declare function changeRole(accountId: string, options: NonNullablePaths<ChangeRoleOptions, `newRoles`>): Promise<NonNullablePaths<ChangeContributorRoleResponse, `newAssignedRoles` | `newAssignedRoles.${number}.roleId` | `newAssignedRoles.${number}.assignmentId`>>;
|
|
573
589
|
interface ChangeRoleOptions {
|
|
574
590
|
/** New roles to assign to the contributor on the site. */
|
|
575
591
|
newRoles: SiteRoleAssignment[];
|
|
576
592
|
}
|
|
593
|
+
/** @param accountId - Contributor's account ID.
|
|
594
|
+
* @public
|
|
595
|
+
* @documentationMaturity preview
|
|
596
|
+
* @requiredField accountId
|
|
597
|
+
* @requiredField options
|
|
598
|
+
* @requiredField options.newLocations
|
|
599
|
+
* @permissionId SITE_ROLES.CHANGE_LOCATION
|
|
600
|
+
* @applicableIdentity APP
|
|
601
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation
|
|
602
|
+
*/
|
|
603
|
+
declare function changeContributorLocation(accountId: string, options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>): Promise<NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>>;
|
|
577
604
|
interface ChangeContributorLocationOptions {
|
|
578
605
|
/**
|
|
579
606
|
* New locations to assign to the contributor on the site.
|
|
@@ -582,8 +609,17 @@ interface ChangeContributorLocationOptions {
|
|
|
582
609
|
*/
|
|
583
610
|
newLocations: string[];
|
|
584
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* Retrieves a list of contributors for the specified site, given the provided filters.
|
|
614
|
+
* @public
|
|
615
|
+
* @param options - Filter options.
|
|
616
|
+
* @permissionId site-users.view-users
|
|
617
|
+
* @applicableIdentity APP
|
|
618
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors
|
|
619
|
+
*/
|
|
620
|
+
declare function querySiteContributors(options?: QuerySiteContributorsOptions): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>>;
|
|
585
621
|
interface QuerySiteContributorsOptions {
|
|
586
622
|
filter?: QuerySiteContributorsFilter;
|
|
587
623
|
}
|
|
588
624
|
|
|
589
|
-
export { type
|
|
625
|
+
export { type AccountInfo, type AppInvite, type AssignedPolicy, type Assignment, type BulkGetUserRolesOnSiteRequest, type BulkGetUserRolesOnSiteResponse, type BulkValidateEmailInviteEligibilityRequest, type BulkValidateEmailInviteEligibilityResponse, type ChangeContributorLocationOptions, type ChangeContributorLocationRequest, type ChangeContributorLocationResponse, type ChangeContributorRoleRequest, type ChangeContributorRoleResponse, type ChangeRoleOptions, type CompanionResource, type Condition, ConditionAttributeType, type ConditionAttributeTypeWithLiterals, type Conditions, type Contributor, type ContributorLimit, type ContributorV2, type ContributorsQuota, type ContributorsQuotaOptionsOneOf, type EmailInviteEligibility, FieldSet, type FieldSetWithLiterals, type GetAppContributorsRequest, type GetAppContributorsResponse, type GetContributorsQuotaRequest, type GetContributorsQuotaResponse, type GetCurrentUserRolesRequest, type GetCurrentUserRolesResponse, type GetSiteContributorsRequest, type GetSiteContributorsResponse, type GetSiteContributorsV2Options, type GetSiteContributorsV2Request, type GetSiteContributorsV2Response, type HandleSiteTransferRequest, type HandleSiteTransferResponse, InviteStatus, type InviteStatusWithLiterals, type LimitedOptions, type LocalizedRole, type LocationsRestriction, type Name, type PendingOwner, type PersonMetaData, type Policy, type PredefinedRole, type PredefinedRoles, type QuerySiteContributorsFilter, type QuerySiteContributorsOptions, type QuerySiteContributorsRequest, type QuerySiteContributorsResponse, type Resource, ResourceType, type ResourceTypeWithLiterals, type Restriction, type RestrictionRestrictionsOneOf, type Role, type SiteInvite, type SiteLocationAssignment, type SiteRestriction, type SiteRoleAssignment, type Subject, type SubjectContext, SubjectContextType, type SubjectContextTypeWithLiterals, SubjectType, type SubjectTypeWithLiterals, type Team, Type, type TypeWithLiterals, type User, type UserLocalizedRoles, type UserSubject, changeContributorLocation, changeRole, querySiteContributors };
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_exports, {
|
|
23
|
+
ConditionAttributeType: () => ConditionAttributeType,
|
|
24
|
+
FieldSet: () => FieldSet,
|
|
25
|
+
InviteStatus: () => InviteStatus,
|
|
26
|
+
ResourceType: () => ResourceType,
|
|
27
|
+
SubjectContextType: () => SubjectContextType,
|
|
28
|
+
SubjectType: () => SubjectType,
|
|
29
|
+
Type: () => Type,
|
|
30
|
+
changeContributorLocation: () => changeContributorLocation2,
|
|
31
|
+
changeRole: () => changeRole2,
|
|
32
|
+
getContributorsQuota: () => getContributorsQuota2,
|
|
33
|
+
getSiteContributorsV2: () => getSiteContributorsV22,
|
|
34
|
+
querySiteContributors: () => querySiteContributors2
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
37
|
+
|
|
38
|
+
// src/identity-v1-contributor-contributors.universal.ts
|
|
39
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
40
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
41
|
+
|
|
42
|
+
// src/identity-v1-contributor-contributors.http.ts
|
|
43
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
44
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
45
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
46
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
47
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
48
|
+
function resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl(opts) {
|
|
49
|
+
const domainToMappings = {
|
|
50
|
+
"manage._base_domain_": [
|
|
51
|
+
{
|
|
52
|
+
srcPath: "/contributors/accept",
|
|
53
|
+
destPath: "/contributors/accept"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/roles-management-web",
|
|
57
|
+
destPath: ""
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/team/accept",
|
|
61
|
+
destPath: "/team/accept"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
srcPath: "/_api/roles-management-web",
|
|
65
|
+
destPath: ""
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/app/accept",
|
|
69
|
+
destPath: "/app/accept"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"api._api_base_domain_": [
|
|
73
|
+
{
|
|
74
|
+
srcPath: "/roles-management-web",
|
|
75
|
+
destPath: ""
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"editor._base_domain_": [
|
|
79
|
+
{
|
|
80
|
+
srcPath: "/_api/roles-management-web",
|
|
81
|
+
destPath: ""
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"blocks._base_domain_": [
|
|
85
|
+
{
|
|
86
|
+
srcPath: "/_api/roles-management-web",
|
|
87
|
+
destPath: ""
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"create.editorx": [
|
|
91
|
+
{
|
|
92
|
+
srcPath: "/_api/roles-management-web",
|
|
93
|
+
destPath: ""
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"www._base_domain_": [
|
|
97
|
+
{
|
|
98
|
+
srcPath: "/_api/roles-management-web",
|
|
99
|
+
destPath: ""
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
srcPath: "/roles-management-web",
|
|
103
|
+
destPath: ""
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
srcPath: "/contributors/accept",
|
|
107
|
+
destPath: "/contributors/accept"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
srcPath: "/team/accept",
|
|
111
|
+
destPath: "/team/accept"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"dev._base_domain_": [
|
|
115
|
+
{
|
|
116
|
+
srcPath: "/_api/roles-management-web",
|
|
117
|
+
destPath: ""
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"platform.rise.ai": [
|
|
121
|
+
{
|
|
122
|
+
srcPath: "/v2/contributors",
|
|
123
|
+
destPath: "/v2/contributors"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
srcPath: "/contributor/change/role",
|
|
127
|
+
destPath: "/contributor/change/role"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"www.wixapis.com": [
|
|
131
|
+
{
|
|
132
|
+
srcPath: "/roles-management",
|
|
133
|
+
destPath: ""
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
srcPath: "/roles-management-web",
|
|
137
|
+
destPath: ""
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
srcPath: "/roles-management/roles",
|
|
141
|
+
destPath: "/roles"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
srcPath: "/roles-management/team",
|
|
145
|
+
destPath: "/team"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
srcPath: "/roles-management/v3/team",
|
|
149
|
+
destPath: "/v3/team"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
srcPath: "/roles-management/v2/team",
|
|
153
|
+
destPath: "/v2/team"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
srcPath: "/roles-management/contributor/change",
|
|
157
|
+
destPath: "/contributor/change"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
srcPath: "/roles-management/v2/contributors",
|
|
161
|
+
destPath: "/v2/contributors"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
};
|
|
165
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
166
|
+
}
|
|
167
|
+
var PACKAGE_NAME = "@wix/auto_sdk_user-management_contributors";
|
|
168
|
+
function getSiteContributorsV2(payload) {
|
|
169
|
+
function __getSiteContributorsV2({ host }) {
|
|
170
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
171
|
+
{
|
|
172
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
173
|
+
paths: [{ path: "fields" }]
|
|
174
|
+
}
|
|
175
|
+
]);
|
|
176
|
+
const metadata = {
|
|
177
|
+
entityFqdn: "wix.identity.v1.contributor",
|
|
178
|
+
method: "GET",
|
|
179
|
+
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2",
|
|
180
|
+
packageName: PACKAGE_NAME,
|
|
181
|
+
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
182
|
+
protoPath: "/v2/contributors",
|
|
183
|
+
data: serializedData,
|
|
184
|
+
host
|
|
185
|
+
}),
|
|
186
|
+
params: (0, import_rest_modules.toURLSearchParams)(serializedData),
|
|
187
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
188
|
+
{
|
|
189
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
190
|
+
paths: [
|
|
191
|
+
{ path: "contributors.joinedAt" },
|
|
192
|
+
{ path: "invites.dateCreated" },
|
|
193
|
+
{ path: "invites.expirationDate" }
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
])
|
|
197
|
+
};
|
|
198
|
+
return metadata;
|
|
199
|
+
}
|
|
200
|
+
return __getSiteContributorsV2;
|
|
201
|
+
}
|
|
202
|
+
function changeRole(payload) {
|
|
203
|
+
function __changeRole({ host }) {
|
|
204
|
+
const metadata = {
|
|
205
|
+
entityFqdn: "wix.identity.v1.contributor",
|
|
206
|
+
method: "PUT",
|
|
207
|
+
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole",
|
|
208
|
+
packageName: PACKAGE_NAME,
|
|
209
|
+
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
210
|
+
protoPath: "/contributor/change/role",
|
|
211
|
+
data: payload,
|
|
212
|
+
host
|
|
213
|
+
}),
|
|
214
|
+
data: payload
|
|
215
|
+
};
|
|
216
|
+
return metadata;
|
|
217
|
+
}
|
|
218
|
+
return __changeRole;
|
|
219
|
+
}
|
|
220
|
+
function changeContributorLocation(payload) {
|
|
221
|
+
function __changeContributorLocation({ host }) {
|
|
222
|
+
const metadata = {
|
|
223
|
+
entityFqdn: "wix.identity.v1.contributor",
|
|
224
|
+
method: "PUT",
|
|
225
|
+
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation",
|
|
226
|
+
packageName: PACKAGE_NAME,
|
|
227
|
+
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
228
|
+
protoPath: "/contributor/change/locations",
|
|
229
|
+
data: payload,
|
|
230
|
+
host
|
|
231
|
+
}),
|
|
232
|
+
data: payload
|
|
233
|
+
};
|
|
234
|
+
return metadata;
|
|
235
|
+
}
|
|
236
|
+
return __changeContributorLocation;
|
|
237
|
+
}
|
|
238
|
+
function querySiteContributors(payload) {
|
|
239
|
+
function __querySiteContributors({ host }) {
|
|
240
|
+
const metadata = {
|
|
241
|
+
entityFqdn: "wix.identity.v1.contributor",
|
|
242
|
+
method: "GET",
|
|
243
|
+
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors",
|
|
244
|
+
packageName: PACKAGE_NAME,
|
|
245
|
+
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
246
|
+
protoPath: "/v2/contributors/query",
|
|
247
|
+
data: payload,
|
|
248
|
+
host
|
|
249
|
+
}),
|
|
250
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
251
|
+
};
|
|
252
|
+
return metadata;
|
|
253
|
+
}
|
|
254
|
+
return __querySiteContributors;
|
|
255
|
+
}
|
|
256
|
+
function getContributorsQuota(payload) {
|
|
257
|
+
function __getContributorsQuota({ host }) {
|
|
258
|
+
const metadata = {
|
|
259
|
+
entityFqdn: "wix.identity.v1.contributor",
|
|
260
|
+
method: "GET",
|
|
261
|
+
methodFqn: "com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota",
|
|
262
|
+
packageName: PACKAGE_NAME,
|
|
263
|
+
url: resolveComWixpressRolesManagementApiSiteRolesManagementServiceUrl({
|
|
264
|
+
protoPath: "/v2/contributors/quota",
|
|
265
|
+
data: payload,
|
|
266
|
+
host
|
|
267
|
+
}),
|
|
268
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
269
|
+
};
|
|
270
|
+
return metadata;
|
|
271
|
+
}
|
|
272
|
+
return __getContributorsQuota;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// src/identity-v1-contributor-contributors.universal.ts
|
|
276
|
+
var ResourceType = /* @__PURE__ */ ((ResourceType2) => {
|
|
277
|
+
ResourceType2["UNKNOWN_RESOURCE_TYPE"] = "UNKNOWN_RESOURCE_TYPE";
|
|
278
|
+
ResourceType2["SITE"] = "SITE";
|
|
279
|
+
return ResourceType2;
|
|
280
|
+
})(ResourceType || {});
|
|
281
|
+
var ConditionAttributeType = /* @__PURE__ */ ((ConditionAttributeType2) => {
|
|
282
|
+
ConditionAttributeType2["UNKNOWN_CONDITION_TYPE"] = "UNKNOWN_CONDITION_TYPE";
|
|
283
|
+
ConditionAttributeType2["FOLDER"] = "FOLDER";
|
|
284
|
+
return ConditionAttributeType2;
|
|
285
|
+
})(ConditionAttributeType || {});
|
|
286
|
+
var SubjectType = /* @__PURE__ */ ((SubjectType2) => {
|
|
287
|
+
SubjectType2["UNKNOWN"] = "UNKNOWN";
|
|
288
|
+
SubjectType2["ACCOUNT"] = "ACCOUNT";
|
|
289
|
+
SubjectType2["USER"] = "USER";
|
|
290
|
+
SubjectType2["USER_GROUP"] = "USER_GROUP";
|
|
291
|
+
SubjectType2["MEMBER_GROUP"] = "MEMBER_GROUP";
|
|
292
|
+
SubjectType2["VISITOR_GROUP"] = "VISITOR_GROUP";
|
|
293
|
+
SubjectType2["EXTERNAL_APP"] = "EXTERNAL_APP";
|
|
294
|
+
SubjectType2["ACCOUNT_GROUP"] = "ACCOUNT_GROUP";
|
|
295
|
+
SubjectType2["WIX_APP"] = "WIX_APP";
|
|
296
|
+
return SubjectType2;
|
|
297
|
+
})(SubjectType || {});
|
|
298
|
+
var SubjectContextType = /* @__PURE__ */ ((SubjectContextType2) => {
|
|
299
|
+
SubjectContextType2["UNKNOWN_CTX"] = "UNKNOWN_CTX";
|
|
300
|
+
SubjectContextType2["ORG_CTX"] = "ORG_CTX";
|
|
301
|
+
SubjectContextType2["ACCOUNT_CTX"] = "ACCOUNT_CTX";
|
|
302
|
+
return SubjectContextType2;
|
|
303
|
+
})(SubjectContextType || {});
|
|
304
|
+
var InviteStatus = /* @__PURE__ */ ((InviteStatus2) => {
|
|
305
|
+
InviteStatus2["Pending"] = "Pending";
|
|
306
|
+
InviteStatus2["Used"] = "Used";
|
|
307
|
+
InviteStatus2["Deleted"] = "Deleted";
|
|
308
|
+
InviteStatus2["Declined"] = "Declined";
|
|
309
|
+
InviteStatus2["Expired"] = "Expired";
|
|
310
|
+
return InviteStatus2;
|
|
311
|
+
})(InviteStatus || {});
|
|
312
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
313
|
+
Type2["UNKNOWN"] = "UNKNOWN";
|
|
314
|
+
Type2["LIMITED"] = "LIMITED";
|
|
315
|
+
Type2["UNLIMITED"] = "UNLIMITED";
|
|
316
|
+
return Type2;
|
|
317
|
+
})(Type || {});
|
|
318
|
+
var FieldSet = /* @__PURE__ */ ((FieldSet2) => {
|
|
319
|
+
FieldSet2["UNKNOWN"] = "UNKNOWN";
|
|
320
|
+
FieldSet2["META_DATA"] = "META_DATA";
|
|
321
|
+
return FieldSet2;
|
|
322
|
+
})(FieldSet || {});
|
|
323
|
+
async function getSiteContributorsV22(options) {
|
|
324
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
325
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
326
|
+
locale: options?.locale,
|
|
327
|
+
fields: options?.fields
|
|
328
|
+
});
|
|
329
|
+
const reqOpts = getSiteContributorsV2(payload);
|
|
330
|
+
sideEffects?.onSiteCall?.();
|
|
331
|
+
try {
|
|
332
|
+
const result = await httpClient.request(reqOpts);
|
|
333
|
+
sideEffects?.onSuccess?.(result);
|
|
334
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
335
|
+
} catch (err) {
|
|
336
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
337
|
+
err,
|
|
338
|
+
{
|
|
339
|
+
spreadPathsToArguments: {},
|
|
340
|
+
explicitPathsToArguments: {
|
|
341
|
+
locale: "$[0].locale",
|
|
342
|
+
fields: "$[0].fields"
|
|
343
|
+
},
|
|
344
|
+
singleArgumentUnchanged: false
|
|
345
|
+
},
|
|
346
|
+
["options"]
|
|
347
|
+
);
|
|
348
|
+
sideEffects?.onError?.(err);
|
|
349
|
+
throw transformedError;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
async function changeRole2(accountId, options) {
|
|
353
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
354
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
355
|
+
accountId,
|
|
356
|
+
newRoles: options?.newRoles
|
|
357
|
+
});
|
|
358
|
+
const reqOpts = changeRole(payload);
|
|
359
|
+
sideEffects?.onSiteCall?.();
|
|
360
|
+
try {
|
|
361
|
+
const result = await httpClient.request(reqOpts);
|
|
362
|
+
sideEffects?.onSuccess?.(result);
|
|
363
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
364
|
+
} catch (err) {
|
|
365
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
366
|
+
err,
|
|
367
|
+
{
|
|
368
|
+
spreadPathsToArguments: {},
|
|
369
|
+
explicitPathsToArguments: {
|
|
370
|
+
accountId: "$[0]",
|
|
371
|
+
newRoles: "$[1].newRoles"
|
|
372
|
+
},
|
|
373
|
+
singleArgumentUnchanged: false
|
|
374
|
+
},
|
|
375
|
+
["accountId", "options"]
|
|
376
|
+
);
|
|
377
|
+
sideEffects?.onError?.(err);
|
|
378
|
+
throw transformedError;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
async function changeContributorLocation2(accountId, options) {
|
|
382
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
383
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
384
|
+
accountId,
|
|
385
|
+
newLocations: options?.newLocations
|
|
386
|
+
});
|
|
387
|
+
const reqOpts = changeContributorLocation(payload);
|
|
388
|
+
sideEffects?.onSiteCall?.();
|
|
389
|
+
try {
|
|
390
|
+
const result = await httpClient.request(reqOpts);
|
|
391
|
+
sideEffects?.onSuccess?.(result);
|
|
392
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
393
|
+
} catch (err) {
|
|
394
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
395
|
+
err,
|
|
396
|
+
{
|
|
397
|
+
spreadPathsToArguments: {},
|
|
398
|
+
explicitPathsToArguments: {
|
|
399
|
+
accountId: "$[0]",
|
|
400
|
+
newLocations: "$[1].newLocations"
|
|
401
|
+
},
|
|
402
|
+
singleArgumentUnchanged: false
|
|
403
|
+
},
|
|
404
|
+
["accountId", "options"]
|
|
405
|
+
);
|
|
406
|
+
sideEffects?.onError?.(err);
|
|
407
|
+
throw transformedError;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
async function querySiteContributors2(options) {
|
|
411
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
412
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
413
|
+
filter: options?.filter
|
|
414
|
+
});
|
|
415
|
+
const reqOpts = querySiteContributors(payload);
|
|
416
|
+
sideEffects?.onSiteCall?.();
|
|
417
|
+
try {
|
|
418
|
+
const result = await httpClient.request(reqOpts);
|
|
419
|
+
sideEffects?.onSuccess?.(result);
|
|
420
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
421
|
+
} catch (err) {
|
|
422
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
423
|
+
err,
|
|
424
|
+
{
|
|
425
|
+
spreadPathsToArguments: {},
|
|
426
|
+
explicitPathsToArguments: { filter: "$[0].filter" },
|
|
427
|
+
singleArgumentUnchanged: false
|
|
428
|
+
},
|
|
429
|
+
["options"]
|
|
430
|
+
);
|
|
431
|
+
sideEffects?.onError?.(err);
|
|
432
|
+
throw transformedError;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
async function getContributorsQuota2() {
|
|
436
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
437
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
438
|
+
const reqOpts = getContributorsQuota(payload);
|
|
439
|
+
sideEffects?.onSiteCall?.();
|
|
440
|
+
try {
|
|
441
|
+
const result = await httpClient.request(reqOpts);
|
|
442
|
+
sideEffects?.onSuccess?.(result);
|
|
443
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
444
|
+
} catch (err) {
|
|
445
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
446
|
+
err,
|
|
447
|
+
{
|
|
448
|
+
spreadPathsToArguments: {},
|
|
449
|
+
explicitPathsToArguments: {},
|
|
450
|
+
singleArgumentUnchanged: false
|
|
451
|
+
},
|
|
452
|
+
[]
|
|
453
|
+
);
|
|
454
|
+
sideEffects?.onError?.(err);
|
|
455
|
+
throw transformedError;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
459
|
+
0 && (module.exports = {
|
|
460
|
+
ConditionAttributeType,
|
|
461
|
+
FieldSet,
|
|
462
|
+
InviteStatus,
|
|
463
|
+
ResourceType,
|
|
464
|
+
SubjectContextType,
|
|
465
|
+
SubjectType,
|
|
466
|
+
Type,
|
|
467
|
+
changeContributorLocation,
|
|
468
|
+
changeRole,
|
|
469
|
+
getContributorsQuota,
|
|
470
|
+
getSiteContributorsV2,
|
|
471
|
+
querySiteContributors
|
|
472
|
+
});
|
|
473
|
+
//# sourceMappingURL=index.typings.js.map
|