@wix/auto_sdk_user-management_contributors 1.0.20 → 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 +2 -2
- package/build/cjs/{identity-v1-contributor-contributors.universal-B0tzR-hk.d.ts → 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/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/{identity-v1-contributor-contributors.universal-B0tzR-hk.d.mts → 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/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/{identity-v1-contributor-contributors.universal-DLzpcW8B.d.ts → 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/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/{identity-v1-contributor-contributors.universal-DLzpcW8B.d.mts → 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/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { GetSiteContributorsV2Options, GetSiteContributorsV2Response, ChangeRoleOptions, ChangeContributorRoleResponse, ChangeContributorLocationOptions, ChangeContributorLocationResponse, QuerySiteContributorsOptions, QuerySiteContributorsResponse, GetContributorsQuotaResponse } 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, GetCurrentUserRolesRequest, GetCurrentUserRolesResponse, GetSiteContributorsRequest, GetSiteContributorsResponse, GetSiteContributorsV2Request, 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
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
declare function getSiteContributorsV2$1(httpClient: HttpClient): GetSiteContributorsV2Signature;
|
|
@@ -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[];
|
|
@@ -564,16 +568,52 @@ interface AppInvite {
|
|
|
564
568
|
/** @readonly */
|
|
565
569
|
dateUpdated?: Date | null;
|
|
566
570
|
}
|
|
571
|
+
type ContributorNonNullablePaths = `metaData._id` | `metaData.assignments` | `metaData.assignments.${number}.policy.policyId` | `metaData.assignments.${number}.assignmentId` | `metaData.assignments.${number}.subject._id` | `metaData.assignments.${number}.subject.subjectType` | `metaData.assignments.${number}.subject.context._id` | `metaData.assignments.${number}.subject.context.contextType` | `_id`;
|
|
572
|
+
/**
|
|
573
|
+
* returns a list of all the contributors + invites to be contributors of a given meta site ID taken from the
|
|
574
|
+
* context.
|
|
575
|
+
* @internal
|
|
576
|
+
* @documentationMaturity preview
|
|
577
|
+
* @permissionId site-users.view-users
|
|
578
|
+
* @applicableIdentity APP
|
|
579
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetSiteContributorsV2
|
|
580
|
+
*/
|
|
581
|
+
declare function getSiteContributorsV2(options?: GetSiteContributorsV2Options): Promise<NonNullablePaths<GetSiteContributorsV2Response, {
|
|
582
|
+
[P in ContributorNonNullablePaths]: `contributors.${number}.${P}`;
|
|
583
|
+
}[ContributorNonNullablePaths] | `invites` | `invites.${number}._id` | `invites.${number}.siteId` | `invites.${number}.email` | `invites.${number}.inviterId` | `invites.${number}.status` | `invites.${number}.acceptLink` | `invites.${number}.inviterAccountId` | `contributorsQuota.limitedOptions.limit` | `contributorsQuota.limitedOptions.used` | `contributorsQuota.type`>>;
|
|
567
584
|
interface GetSiteContributorsV2Options {
|
|
568
585
|
/** The locale of the request. Defaults to en-us. */
|
|
569
586
|
locale?: string | null;
|
|
570
587
|
/** The set of desired fields. */
|
|
571
588
|
fields?: string[];
|
|
572
589
|
}
|
|
590
|
+
/**
|
|
591
|
+
* Overrides all the roles of a contributor for the specified site.
|
|
592
|
+
* @param accountId - Contributor's account ID.
|
|
593
|
+
* @public
|
|
594
|
+
* @requiredField accountId
|
|
595
|
+
* @requiredField options
|
|
596
|
+
* @requiredField options.newRoles
|
|
597
|
+
* @param options - Filter options. The `newRoles` field **must** be passed.
|
|
598
|
+
* @permissionId SITE_ROLES.CHANGE_ROLE
|
|
599
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeRole
|
|
600
|
+
*/
|
|
601
|
+
declare function changeRole(accountId: string, options: NonNullablePaths<ChangeRoleOptions, `newRoles`>): Promise<NonNullablePaths<ChangeContributorRoleResponse, `newAssignedRoles` | `newAssignedRoles.${number}.roleId` | `newAssignedRoles.${number}.assignmentId`>>;
|
|
573
602
|
interface ChangeRoleOptions {
|
|
574
603
|
/** New roles to assign to the contributor on the site. */
|
|
575
604
|
newRoles: SiteRoleAssignment[];
|
|
576
605
|
}
|
|
606
|
+
/** @param accountId - Contributor's account ID.
|
|
607
|
+
* @public
|
|
608
|
+
* @documentationMaturity preview
|
|
609
|
+
* @requiredField accountId
|
|
610
|
+
* @requiredField options
|
|
611
|
+
* @requiredField options.newLocations
|
|
612
|
+
* @permissionId SITE_ROLES.CHANGE_LOCATION
|
|
613
|
+
* @applicableIdentity APP
|
|
614
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.ChangeContributorLocation
|
|
615
|
+
*/
|
|
616
|
+
declare function changeContributorLocation(accountId: string, options: NonNullablePaths<ChangeContributorLocationOptions, `newLocations`>): Promise<NonNullablePaths<ChangeContributorLocationResponse, `newAssignedLocations`>>;
|
|
577
617
|
interface ChangeContributorLocationOptions {
|
|
578
618
|
/**
|
|
579
619
|
* New locations to assign to the contributor on the site.
|
|
@@ -582,8 +622,26 @@ interface ChangeContributorLocationOptions {
|
|
|
582
622
|
*/
|
|
583
623
|
newLocations: string[];
|
|
584
624
|
}
|
|
625
|
+
/**
|
|
626
|
+
* Retrieves a list of contributors for the specified site, given the provided filters.
|
|
627
|
+
* @public
|
|
628
|
+
* @param options - Filter options.
|
|
629
|
+
* @permissionId site-users.view-users
|
|
630
|
+
* @applicableIdentity APP
|
|
631
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.QuerySiteContributors
|
|
632
|
+
*/
|
|
633
|
+
declare function querySiteContributors(options?: QuerySiteContributorsOptions): Promise<NonNullablePaths<QuerySiteContributorsResponse, `contributors`>>;
|
|
585
634
|
interface QuerySiteContributorsOptions {
|
|
586
635
|
filter?: QuerySiteContributorsFilter;
|
|
587
636
|
}
|
|
637
|
+
/**
|
|
638
|
+
* returns the quota information for contributors on the given site.
|
|
639
|
+
* @internal
|
|
640
|
+
* @documentationMaturity preview
|
|
641
|
+
* @permissionId site-users.view-users
|
|
642
|
+
* @applicableIdentity APP
|
|
643
|
+
* @fqn com.wixpress.roles.management.api.SiteRolesManagementService.GetContributorsQuota
|
|
644
|
+
*/
|
|
645
|
+
declare function getContributorsQuota(): Promise<NonNullablePaths<GetContributorsQuotaResponse, `contributorsQuota.limitedOptions.limit` | `contributorsQuota.limitedOptions.used` | `contributorsQuota.type`>>;
|
|
588
646
|
|
|
589
|
-
export { type
|
|
647
|
+
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, getContributorsQuota, getSiteContributorsV2, 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
|