@flipdish/authorization 0.2.42 → 0.2.44-rc.1786457217
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/.openapi-generator/FILES +1 -0
- package/api.ts +986 -28
- package/common.ts +2 -2
- package/configuration.ts +1 -1
- package/dist/api.d.ts +692 -21
- package/dist/api.js +715 -9
- package/dist/common.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -84,13 +84,31 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
84
84
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
85
|
};
|
|
86
86
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
|
-
exports.
|
|
87
|
+
exports.RoleAssignmentApi = exports.RoleAssignmentApiFactory = exports.RoleAssignmentApiFp = exports.RoleAssignmentApiAxiosParamCreator = exports.JoinAccessApi = exports.JoinAccessApiFactory = exports.JoinAccessApiFp = exports.JoinAccessApiAxiosParamCreator = exports.ConfigurationDataApi = exports.ConfigurationDataApiFactory = exports.ConfigurationDataApiFp = exports.ConfigurationDataApiAxiosParamCreator = exports.AuthorizedEntitiesApi = exports.AuthorizedEntitiesApiFactory = exports.AuthorizedEntitiesApiFp = exports.AuthorizedEntitiesApiAxiosParamCreator = exports.AuthorizationApi = exports.AuthorizationApiFactory = exports.AuthorizationApiFp = exports.AuthorizationApiAxiosParamCreator = exports.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = exports.RoleNames = exports.RoleAssignmentRequestBodyPrincipalTypeEnum = exports.RoleAssignmentRequestBodyActorTypeEnum = exports.RoleAssignmentRequestBodyRoleNameEnum = exports.RemoveTeammateRequestBodyPrincipalTypeEnum = exports.RemoveTeammateRequestBodyActorTypeEnum = exports.PrincipalInOrgTypeEnum = exports.Permissions = exports.ListOrgRolesSuccessResponseValueRolesEnum = exports.JoinAccessErrorResponseCodeEnum = exports.IsInRoleRequestCheckModeEnum = exports.InviteTokenResponseRoleNameEnum = exports.GetUserPermissionsSuccessResponseResourcesValueResourceTypeEnum = exports.GetJoinAccessRequest200ResponseRoleNameEnum = exports.GetJoinAccessRequest200ResponseStateEnum = exports.GetAuthorizedOrgsRequestPrincipalTypeEnum = exports.AuthorizationRequestResourceOneOf3TypeEnum = exports.AuthorizationRequestResourceOneOf2TypeEnum = exports.AuthorizationRequestResourceOneOf1TypeEnum = exports.AuthorizationRequestResourceOneOfTypeEnum = exports.AuthorizationRequestPrincipalTypeEnum = exports.AuthorizationRequestCheckModeEnum = exports.AuthenticateAndCheckIsInRoleRequestCheckModeEnum = exports.AuthenticateAndAuthorizeRequestCheckModeEnum = exports.AccessRequestResponseRoleNameEnum = exports.AccessRequestResponseStateEnum = void 0;
|
|
88
|
+
exports.UserPermissionsApi = exports.UserPermissionsApiFactory = exports.UserPermissionsApiFp = exports.UserPermissionsApiAxiosParamCreator = exports.UserManagementApi = exports.UserManagementApiFactory = exports.UserManagementApiFp = exports.UserManagementApiAxiosParamCreator = void 0;
|
|
88
89
|
var axios_1 = require("axios");
|
|
89
90
|
// Some imports not used depending on template conditions
|
|
90
91
|
// @ts-ignore
|
|
91
92
|
var common_1 = require("./common");
|
|
92
93
|
// @ts-ignore
|
|
93
94
|
var base_1 = require("./base");
|
|
95
|
+
exports.AccessRequestResponseStateEnum = {
|
|
96
|
+
Pending: 'Pending',
|
|
97
|
+
Approved: 'Approved',
|
|
98
|
+
Rejected: 'Rejected',
|
|
99
|
+
Expired: 'Expired'
|
|
100
|
+
};
|
|
101
|
+
exports.AccessRequestResponseRoleNameEnum = {
|
|
102
|
+
Owner: 'Owner',
|
|
103
|
+
PropertyOwner: 'PropertyOwner',
|
|
104
|
+
ManagedOwner: 'ManagedOwner',
|
|
105
|
+
Integrator: 'Integrator',
|
|
106
|
+
PropertyManager: 'PropertyManager',
|
|
107
|
+
FinanceManager: 'FinanceManager',
|
|
108
|
+
StaffMember: 'StaffMember',
|
|
109
|
+
Kiosk: 'Kiosk',
|
|
110
|
+
Terminal: 'Terminal'
|
|
111
|
+
};
|
|
94
112
|
exports.AuthenticateAndAuthorizeRequestCheckModeEnum = {
|
|
95
113
|
Any: 'any',
|
|
96
114
|
All: 'all'
|
|
@@ -105,7 +123,9 @@ exports.AuthorizationRequestCheckModeEnum = {
|
|
|
105
123
|
};
|
|
106
124
|
exports.AuthorizationRequestPrincipalTypeEnum = {
|
|
107
125
|
User: 'User',
|
|
108
|
-
Automation: 'Automation'
|
|
126
|
+
Automation: 'Automation',
|
|
127
|
+
Kiosk: 'Kiosk',
|
|
128
|
+
Terminal: 'Terminal'
|
|
109
129
|
};
|
|
110
130
|
exports.AuthorizationRequestResourceOneOfTypeEnum = {
|
|
111
131
|
Property: 'Property'
|
|
@@ -121,7 +141,26 @@ exports.AuthorizationRequestResourceOneOf3TypeEnum = {
|
|
|
121
141
|
};
|
|
122
142
|
exports.GetAuthorizedOrgsRequestPrincipalTypeEnum = {
|
|
123
143
|
User: 'User',
|
|
124
|
-
Automation: 'Automation'
|
|
144
|
+
Automation: 'Automation',
|
|
145
|
+
Kiosk: 'Kiosk',
|
|
146
|
+
Terminal: 'Terminal'
|
|
147
|
+
};
|
|
148
|
+
exports.GetJoinAccessRequest200ResponseStateEnum = {
|
|
149
|
+
Pending: 'Pending',
|
|
150
|
+
Approved: 'Approved',
|
|
151
|
+
Rejected: 'Rejected',
|
|
152
|
+
Expired: 'Expired'
|
|
153
|
+
};
|
|
154
|
+
exports.GetJoinAccessRequest200ResponseRoleNameEnum = {
|
|
155
|
+
Owner: 'Owner',
|
|
156
|
+
PropertyOwner: 'PropertyOwner',
|
|
157
|
+
ManagedOwner: 'ManagedOwner',
|
|
158
|
+
Integrator: 'Integrator',
|
|
159
|
+
PropertyManager: 'PropertyManager',
|
|
160
|
+
FinanceManager: 'FinanceManager',
|
|
161
|
+
StaffMember: 'StaffMember',
|
|
162
|
+
Kiosk: 'Kiosk',
|
|
163
|
+
Terminal: 'Terminal'
|
|
125
164
|
};
|
|
126
165
|
exports.GetUserPermissionsSuccessResponseResourcesValueResourceTypeEnum = {
|
|
127
166
|
Property: 'Property',
|
|
@@ -129,17 +168,34 @@ exports.GetUserPermissionsSuccessResponseResourcesValueResourceTypeEnum = {
|
|
|
129
168
|
Brand: 'Brand',
|
|
130
169
|
SalesChannel: 'SalesChannel'
|
|
131
170
|
};
|
|
171
|
+
exports.InviteTokenResponseRoleNameEnum = {
|
|
172
|
+
Owner: 'Owner',
|
|
173
|
+
PropertyOwner: 'PropertyOwner',
|
|
174
|
+
ManagedOwner: 'ManagedOwner',
|
|
175
|
+
Integrator: 'Integrator',
|
|
176
|
+
PropertyManager: 'PropertyManager',
|
|
177
|
+
FinanceManager: 'FinanceManager',
|
|
178
|
+
StaffMember: 'StaffMember',
|
|
179
|
+
Kiosk: 'Kiosk',
|
|
180
|
+
Terminal: 'Terminal'
|
|
181
|
+
};
|
|
132
182
|
exports.IsInRoleRequestCheckModeEnum = {
|
|
133
183
|
Any: 'any',
|
|
134
184
|
All: 'all'
|
|
135
185
|
};
|
|
186
|
+
exports.JoinAccessErrorResponseCodeEnum = {
|
|
187
|
+
AlreadyMember: 'ALREADY_MEMBER'
|
|
188
|
+
};
|
|
136
189
|
exports.ListOrgRolesSuccessResponseValueRolesEnum = {
|
|
137
190
|
Owner: 'Owner',
|
|
138
191
|
PropertyOwner: 'PropertyOwner',
|
|
139
192
|
ManagedOwner: 'ManagedOwner',
|
|
140
193
|
Integrator: 'Integrator',
|
|
141
194
|
PropertyManager: 'PropertyManager',
|
|
142
|
-
FinanceManager: 'FinanceManager'
|
|
195
|
+
FinanceManager: 'FinanceManager',
|
|
196
|
+
StaffMember: 'StaffMember',
|
|
197
|
+
Kiosk: 'Kiosk',
|
|
198
|
+
Terminal: 'Terminal'
|
|
143
199
|
};
|
|
144
200
|
/**
|
|
145
201
|
* Permissions
|
|
@@ -167,6 +223,7 @@ exports.Permissions = {
|
|
|
167
223
|
CreateTeammateOnboarding: 'CreateTeammateOnboarding',
|
|
168
224
|
CreateTeammatePropertyManager: 'CreateTeammatePropertyManager',
|
|
169
225
|
CreateTeammatePropertyOwner: 'CreateTeammatePropertyOwner',
|
|
226
|
+
CreateTeammateStaffMember: 'CreateTeammateStaffMember',
|
|
170
227
|
ViewApmConfigurations: 'ViewApmConfigurations',
|
|
171
228
|
EditApmConfigurations: 'EditApmConfigurations',
|
|
172
229
|
ViewCampaignsConfigurations: 'ViewCampaignsConfigurations',
|
|
@@ -235,6 +292,7 @@ exports.Permissions = {
|
|
|
235
292
|
InitiateBluetoothPairingMode: 'InitiateBluetoothPairingMode',
|
|
236
293
|
DeleteTerminal: 'DeleteTerminal',
|
|
237
294
|
ViewKioskTelemetry: 'ViewKioskTelemetry',
|
|
295
|
+
HydraOnly: 'HydraOnly',
|
|
238
296
|
ViewCustomers: 'ViewCustomers',
|
|
239
297
|
EditCustomers: 'EditCustomers',
|
|
240
298
|
CreateCustomers: 'CreateCustomers',
|
|
@@ -378,13 +436,23 @@ exports.Permissions = {
|
|
|
378
436
|
RoleFactory: 'RoleFactory',
|
|
379
437
|
RoleAuthDeveloper: 'RoleAuthDeveloper'
|
|
380
438
|
};
|
|
439
|
+
exports.PrincipalInOrgTypeEnum = {
|
|
440
|
+
User: 'User',
|
|
441
|
+
Automation: 'Automation',
|
|
442
|
+
Kiosk: 'Kiosk',
|
|
443
|
+
Terminal: 'Terminal'
|
|
444
|
+
};
|
|
381
445
|
exports.RemoveTeammateRequestBodyActorTypeEnum = {
|
|
382
446
|
User: 'User',
|
|
383
|
-
Automation: 'Automation'
|
|
447
|
+
Automation: 'Automation',
|
|
448
|
+
Kiosk: 'Kiosk',
|
|
449
|
+
Terminal: 'Terminal'
|
|
384
450
|
};
|
|
385
451
|
exports.RemoveTeammateRequestBodyPrincipalTypeEnum = {
|
|
386
452
|
User: 'User',
|
|
387
|
-
Automation: 'Automation'
|
|
453
|
+
Automation: 'Automation',
|
|
454
|
+
Kiosk: 'Kiosk',
|
|
455
|
+
Terminal: 'Terminal'
|
|
388
456
|
};
|
|
389
457
|
exports.RoleAssignmentRequestBodyRoleNameEnum = {
|
|
390
458
|
Owner: 'Owner',
|
|
@@ -392,15 +460,22 @@ exports.RoleAssignmentRequestBodyRoleNameEnum = {
|
|
|
392
460
|
ManagedOwner: 'ManagedOwner',
|
|
393
461
|
Integrator: 'Integrator',
|
|
394
462
|
PropertyManager: 'PropertyManager',
|
|
395
|
-
FinanceManager: 'FinanceManager'
|
|
463
|
+
FinanceManager: 'FinanceManager',
|
|
464
|
+
StaffMember: 'StaffMember',
|
|
465
|
+
Kiosk: 'Kiosk',
|
|
466
|
+
Terminal: 'Terminal'
|
|
396
467
|
};
|
|
397
468
|
exports.RoleAssignmentRequestBodyActorTypeEnum = {
|
|
398
469
|
User: 'User',
|
|
399
|
-
Automation: 'Automation'
|
|
470
|
+
Automation: 'Automation',
|
|
471
|
+
Kiosk: 'Kiosk',
|
|
472
|
+
Terminal: 'Terminal'
|
|
400
473
|
};
|
|
401
474
|
exports.RoleAssignmentRequestBodyPrincipalTypeEnum = {
|
|
402
475
|
User: 'User',
|
|
403
|
-
Automation: 'Automation'
|
|
476
|
+
Automation: 'Automation',
|
|
477
|
+
Kiosk: 'Kiosk',
|
|
478
|
+
Terminal: 'Terminal'
|
|
404
479
|
};
|
|
405
480
|
/**
|
|
406
481
|
* Role names
|
|
@@ -1573,6 +1648,637 @@ var ConfigurationDataApi = /** @class */ (function (_super) {
|
|
|
1573
1648
|
return ConfigurationDataApi;
|
|
1574
1649
|
}(base_1.BaseAPI));
|
|
1575
1650
|
exports.ConfigurationDataApi = ConfigurationDataApi;
|
|
1651
|
+
/**
|
|
1652
|
+
* JoinAccessApi - axios parameter creator
|
|
1653
|
+
* @export
|
|
1654
|
+
*/
|
|
1655
|
+
var JoinAccessApiAxiosParamCreator = function (configuration) {
|
|
1656
|
+
var _this = this;
|
|
1657
|
+
return {
|
|
1658
|
+
/**
|
|
1659
|
+
* Grants the role stored on the access request (copied from the invite token at create time) via AuthZ V2 role assignment (source join).
|
|
1660
|
+
* @summary Accept a pending join access request
|
|
1661
|
+
* @param {string} orgId
|
|
1662
|
+
* @param {string} requestId
|
|
1663
|
+
* @param {*} [options] Override http request option.
|
|
1664
|
+
* @throws {RequiredError}
|
|
1665
|
+
*/
|
|
1666
|
+
acceptJoinAccessRequest: function (orgId_1, requestId_1) {
|
|
1667
|
+
var args_1 = [];
|
|
1668
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1669
|
+
args_1[_i - 2] = arguments[_i];
|
|
1670
|
+
}
|
|
1671
|
+
return __awaiter(_this, __spreadArray([orgId_1, requestId_1], args_1, true), void 0, function (orgId, requestId, options) {
|
|
1672
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1673
|
+
if (options === void 0) { options = {}; }
|
|
1674
|
+
return __generator(this, function (_a) {
|
|
1675
|
+
switch (_a.label) {
|
|
1676
|
+
case 0:
|
|
1677
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
1678
|
+
(0, common_1.assertParamExists)('acceptJoinAccessRequest', 'orgId', orgId);
|
|
1679
|
+
// verify required parameter 'requestId' is not null or undefined
|
|
1680
|
+
(0, common_1.assertParamExists)('acceptJoinAccessRequest', 'requestId', requestId);
|
|
1681
|
+
localVarPath = "/orgs/{orgId}/joinRequests/{requestId}/accept"
|
|
1682
|
+
.replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)))
|
|
1683
|
+
.replace("{".concat("requestId", "}"), encodeURIComponent(String(requestId)));
|
|
1684
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1685
|
+
if (configuration) {
|
|
1686
|
+
baseOptions = configuration.baseOptions;
|
|
1687
|
+
}
|
|
1688
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1689
|
+
localVarHeaderParameter = {};
|
|
1690
|
+
localVarQueryParameter = {};
|
|
1691
|
+
// authentication ApiKeyAuth required
|
|
1692
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
1693
|
+
case 1:
|
|
1694
|
+
// authentication ApiKeyAuth required
|
|
1695
|
+
_a.sent();
|
|
1696
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1697
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1698
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1699
|
+
return [2 /*return*/, {
|
|
1700
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1701
|
+
options: localVarRequestOptions,
|
|
1702
|
+
}];
|
|
1703
|
+
}
|
|
1704
|
+
});
|
|
1705
|
+
});
|
|
1706
|
+
},
|
|
1707
|
+
/**
|
|
1708
|
+
* Mints an opaque invite token after validating the RMS terminal passport. Call again when a previous token expires to get a new one.
|
|
1709
|
+
* @summary Create an invite token
|
|
1710
|
+
* @param {string} orgId
|
|
1711
|
+
* @param {CreateInviteTokenRequest} [createInviteTokenRequest]
|
|
1712
|
+
* @param {*} [options] Override http request option.
|
|
1713
|
+
* @throws {RequiredError}
|
|
1714
|
+
*/
|
|
1715
|
+
createInviteToken: function (orgId_1, createInviteTokenRequest_1) {
|
|
1716
|
+
var args_1 = [];
|
|
1717
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1718
|
+
args_1[_i - 2] = arguments[_i];
|
|
1719
|
+
}
|
|
1720
|
+
return __awaiter(_this, __spreadArray([orgId_1, createInviteTokenRequest_1], args_1, true), void 0, function (orgId, createInviteTokenRequest, options) {
|
|
1721
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1722
|
+
if (options === void 0) { options = {}; }
|
|
1723
|
+
return __generator(this, function (_a) {
|
|
1724
|
+
switch (_a.label) {
|
|
1725
|
+
case 0:
|
|
1726
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
1727
|
+
(0, common_1.assertParamExists)('createInviteToken', 'orgId', orgId);
|
|
1728
|
+
localVarPath = "/orgs/{orgId}/inviteTokens"
|
|
1729
|
+
.replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)));
|
|
1730
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1731
|
+
if (configuration) {
|
|
1732
|
+
baseOptions = configuration.baseOptions;
|
|
1733
|
+
}
|
|
1734
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1735
|
+
localVarHeaderParameter = {};
|
|
1736
|
+
localVarQueryParameter = {};
|
|
1737
|
+
// authentication ApiKeyAuth required
|
|
1738
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
1739
|
+
case 1:
|
|
1740
|
+
// authentication ApiKeyAuth required
|
|
1741
|
+
_a.sent();
|
|
1742
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1743
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1744
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1745
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1746
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInviteTokenRequest, localVarRequestOptions, configuration);
|
|
1747
|
+
return [2 /*return*/, {
|
|
1748
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1749
|
+
options: localVarRequestOptions,
|
|
1750
|
+
}];
|
|
1751
|
+
}
|
|
1752
|
+
});
|
|
1753
|
+
});
|
|
1754
|
+
},
|
|
1755
|
+
/**
|
|
1756
|
+
* Validates the opaque invite token and creates (or returns) a pending AccessRequest for the property/role encoded on the token.
|
|
1757
|
+
* @summary Submit a join access request from an invite token
|
|
1758
|
+
* @param {string} orgId
|
|
1759
|
+
* @param {CreateJoinRequest} [createJoinRequest]
|
|
1760
|
+
* @param {*} [options] Override http request option.
|
|
1761
|
+
* @throws {RequiredError}
|
|
1762
|
+
*/
|
|
1763
|
+
createJoinAccessRequest: function (orgId_1, createJoinRequest_1) {
|
|
1764
|
+
var args_1 = [];
|
|
1765
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1766
|
+
args_1[_i - 2] = arguments[_i];
|
|
1767
|
+
}
|
|
1768
|
+
return __awaiter(_this, __spreadArray([orgId_1, createJoinRequest_1], args_1, true), void 0, function (orgId, createJoinRequest, options) {
|
|
1769
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1770
|
+
if (options === void 0) { options = {}; }
|
|
1771
|
+
return __generator(this, function (_a) {
|
|
1772
|
+
switch (_a.label) {
|
|
1773
|
+
case 0:
|
|
1774
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
1775
|
+
(0, common_1.assertParamExists)('createJoinAccessRequest', 'orgId', orgId);
|
|
1776
|
+
localVarPath = "/orgs/{orgId}/joinRequests"
|
|
1777
|
+
.replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)));
|
|
1778
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1779
|
+
if (configuration) {
|
|
1780
|
+
baseOptions = configuration.baseOptions;
|
|
1781
|
+
}
|
|
1782
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1783
|
+
localVarHeaderParameter = {};
|
|
1784
|
+
localVarQueryParameter = {};
|
|
1785
|
+
// authentication ApiKeyAuth required
|
|
1786
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
1787
|
+
case 1:
|
|
1788
|
+
// authentication ApiKeyAuth required
|
|
1789
|
+
_a.sent();
|
|
1790
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1791
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1792
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1793
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1794
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createJoinRequest, localVarRequestOptions, configuration);
|
|
1795
|
+
return [2 /*return*/, {
|
|
1796
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1797
|
+
options: localVarRequestOptions,
|
|
1798
|
+
}];
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
});
|
|
1802
|
+
},
|
|
1803
|
+
/**
|
|
1804
|
+
* Returns request status for the authenticated requester only. Owners should use the list endpoint.
|
|
1805
|
+
* @summary Get a join access request by id
|
|
1806
|
+
* @param {string} orgId
|
|
1807
|
+
* @param {string} requestId
|
|
1808
|
+
* @param {*} [options] Override http request option.
|
|
1809
|
+
* @throws {RequiredError}
|
|
1810
|
+
*/
|
|
1811
|
+
getJoinAccessRequest: function (orgId_1, requestId_1) {
|
|
1812
|
+
var args_1 = [];
|
|
1813
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1814
|
+
args_1[_i - 2] = arguments[_i];
|
|
1815
|
+
}
|
|
1816
|
+
return __awaiter(_this, __spreadArray([orgId_1, requestId_1], args_1, true), void 0, function (orgId, requestId, options) {
|
|
1817
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1818
|
+
if (options === void 0) { options = {}; }
|
|
1819
|
+
return __generator(this, function (_a) {
|
|
1820
|
+
switch (_a.label) {
|
|
1821
|
+
case 0:
|
|
1822
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
1823
|
+
(0, common_1.assertParamExists)('getJoinAccessRequest', 'orgId', orgId);
|
|
1824
|
+
// verify required parameter 'requestId' is not null or undefined
|
|
1825
|
+
(0, common_1.assertParamExists)('getJoinAccessRequest', 'requestId', requestId);
|
|
1826
|
+
localVarPath = "/orgs/{orgId}/joinRequests/{requestId}"
|
|
1827
|
+
.replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)))
|
|
1828
|
+
.replace("{".concat("requestId", "}"), encodeURIComponent(String(requestId)));
|
|
1829
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1830
|
+
if (configuration) {
|
|
1831
|
+
baseOptions = configuration.baseOptions;
|
|
1832
|
+
}
|
|
1833
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1834
|
+
localVarHeaderParameter = {};
|
|
1835
|
+
localVarQueryParameter = {};
|
|
1836
|
+
// authentication ApiKeyAuth required
|
|
1837
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
1838
|
+
case 1:
|
|
1839
|
+
// authentication ApiKeyAuth required
|
|
1840
|
+
_a.sent();
|
|
1841
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1842
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1843
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1844
|
+
return [2 /*return*/, {
|
|
1845
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1846
|
+
options: localVarRequestOptions,
|
|
1847
|
+
}];
|
|
1848
|
+
}
|
|
1849
|
+
});
|
|
1850
|
+
});
|
|
1851
|
+
},
|
|
1852
|
+
/**
|
|
1853
|
+
* Returns pending AccessRequests for an org. Optional propertyId/brandId filters. Requires ViewTeammates on orgId.
|
|
1854
|
+
* @summary List pending join requests for an organization
|
|
1855
|
+
* @param {string} orgId
|
|
1856
|
+
* @param {string} [propertyId]
|
|
1857
|
+
* @param {string} [brandId]
|
|
1858
|
+
* @param {*} [options] Override http request option.
|
|
1859
|
+
* @throws {RequiredError}
|
|
1860
|
+
*/
|
|
1861
|
+
listJoinAccessRequests: function (orgId_1, propertyId_1, brandId_1) {
|
|
1862
|
+
var args_1 = [];
|
|
1863
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
1864
|
+
args_1[_i - 3] = arguments[_i];
|
|
1865
|
+
}
|
|
1866
|
+
return __awaiter(_this, __spreadArray([orgId_1, propertyId_1, brandId_1], args_1, true), void 0, function (orgId, propertyId, brandId, options) {
|
|
1867
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1868
|
+
if (options === void 0) { options = {}; }
|
|
1869
|
+
return __generator(this, function (_a) {
|
|
1870
|
+
switch (_a.label) {
|
|
1871
|
+
case 0:
|
|
1872
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
1873
|
+
(0, common_1.assertParamExists)('listJoinAccessRequests', 'orgId', orgId);
|
|
1874
|
+
localVarPath = "/orgs/{orgId}/joinRequests"
|
|
1875
|
+
.replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)));
|
|
1876
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1877
|
+
if (configuration) {
|
|
1878
|
+
baseOptions = configuration.baseOptions;
|
|
1879
|
+
}
|
|
1880
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1881
|
+
localVarHeaderParameter = {};
|
|
1882
|
+
localVarQueryParameter = {};
|
|
1883
|
+
// authentication ApiKeyAuth required
|
|
1884
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
1885
|
+
case 1:
|
|
1886
|
+
// authentication ApiKeyAuth required
|
|
1887
|
+
_a.sent();
|
|
1888
|
+
if (propertyId !== undefined) {
|
|
1889
|
+
localVarQueryParameter['propertyId'] = propertyId;
|
|
1890
|
+
}
|
|
1891
|
+
if (brandId !== undefined) {
|
|
1892
|
+
localVarQueryParameter['brandId'] = brandId;
|
|
1893
|
+
}
|
|
1894
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1895
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1896
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1897
|
+
return [2 /*return*/, {
|
|
1898
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1899
|
+
options: localVarRequestOptions,
|
|
1900
|
+
}];
|
|
1901
|
+
}
|
|
1902
|
+
});
|
|
1903
|
+
});
|
|
1904
|
+
},
|
|
1905
|
+
/**
|
|
1906
|
+
* Rejects a pending AccessRequest without granting access.
|
|
1907
|
+
* @summary Reject a pending join access request
|
|
1908
|
+
* @param {string} orgId
|
|
1909
|
+
* @param {string} requestId
|
|
1910
|
+
* @param {*} [options] Override http request option.
|
|
1911
|
+
* @throws {RequiredError}
|
|
1912
|
+
*/
|
|
1913
|
+
rejectJoinAccessRequest: function (orgId_1, requestId_1) {
|
|
1914
|
+
var args_1 = [];
|
|
1915
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1916
|
+
args_1[_i - 2] = arguments[_i];
|
|
1917
|
+
}
|
|
1918
|
+
return __awaiter(_this, __spreadArray([orgId_1, requestId_1], args_1, true), void 0, function (orgId, requestId, options) {
|
|
1919
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1920
|
+
if (options === void 0) { options = {}; }
|
|
1921
|
+
return __generator(this, function (_a) {
|
|
1922
|
+
switch (_a.label) {
|
|
1923
|
+
case 0:
|
|
1924
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
1925
|
+
(0, common_1.assertParamExists)('rejectJoinAccessRequest', 'orgId', orgId);
|
|
1926
|
+
// verify required parameter 'requestId' is not null or undefined
|
|
1927
|
+
(0, common_1.assertParamExists)('rejectJoinAccessRequest', 'requestId', requestId);
|
|
1928
|
+
localVarPath = "/orgs/{orgId}/joinRequests/{requestId}/reject"
|
|
1929
|
+
.replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)))
|
|
1930
|
+
.replace("{".concat("requestId", "}"), encodeURIComponent(String(requestId)));
|
|
1931
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1932
|
+
if (configuration) {
|
|
1933
|
+
baseOptions = configuration.baseOptions;
|
|
1934
|
+
}
|
|
1935
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1936
|
+
localVarHeaderParameter = {};
|
|
1937
|
+
localVarQueryParameter = {};
|
|
1938
|
+
// authentication ApiKeyAuth required
|
|
1939
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
1940
|
+
case 1:
|
|
1941
|
+
// authentication ApiKeyAuth required
|
|
1942
|
+
_a.sent();
|
|
1943
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1944
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1945
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1946
|
+
return [2 /*return*/, {
|
|
1947
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1948
|
+
options: localVarRequestOptions,
|
|
1949
|
+
}];
|
|
1950
|
+
}
|
|
1951
|
+
});
|
|
1952
|
+
});
|
|
1953
|
+
},
|
|
1954
|
+
};
|
|
1955
|
+
};
|
|
1956
|
+
exports.JoinAccessApiAxiosParamCreator = JoinAccessApiAxiosParamCreator;
|
|
1957
|
+
/**
|
|
1958
|
+
* JoinAccessApi - functional programming interface
|
|
1959
|
+
* @export
|
|
1960
|
+
*/
|
|
1961
|
+
var JoinAccessApiFp = function (configuration) {
|
|
1962
|
+
var localVarAxiosParamCreator = (0, exports.JoinAccessApiAxiosParamCreator)(configuration);
|
|
1963
|
+
return {
|
|
1964
|
+
/**
|
|
1965
|
+
* Grants the role stored on the access request (copied from the invite token at create time) via AuthZ V2 role assignment (source join).
|
|
1966
|
+
* @summary Accept a pending join access request
|
|
1967
|
+
* @param {string} orgId
|
|
1968
|
+
* @param {string} requestId
|
|
1969
|
+
* @param {*} [options] Override http request option.
|
|
1970
|
+
* @throws {RequiredError}
|
|
1971
|
+
*/
|
|
1972
|
+
acceptJoinAccessRequest: function (orgId, requestId, options) {
|
|
1973
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1974
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1975
|
+
var _a, _b, _c;
|
|
1976
|
+
return __generator(this, function (_d) {
|
|
1977
|
+
switch (_d.label) {
|
|
1978
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.acceptJoinAccessRequest(orgId, requestId, options)];
|
|
1979
|
+
case 1:
|
|
1980
|
+
localVarAxiosArgs = _d.sent();
|
|
1981
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1982
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['JoinAccessApi.acceptJoinAccessRequest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1983
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1984
|
+
}
|
|
1985
|
+
});
|
|
1986
|
+
});
|
|
1987
|
+
},
|
|
1988
|
+
/**
|
|
1989
|
+
* Mints an opaque invite token after validating the RMS terminal passport. Call again when a previous token expires to get a new one.
|
|
1990
|
+
* @summary Create an invite token
|
|
1991
|
+
* @param {string} orgId
|
|
1992
|
+
* @param {CreateInviteTokenRequest} [createInviteTokenRequest]
|
|
1993
|
+
* @param {*} [options] Override http request option.
|
|
1994
|
+
* @throws {RequiredError}
|
|
1995
|
+
*/
|
|
1996
|
+
createInviteToken: function (orgId, createInviteTokenRequest, options) {
|
|
1997
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1998
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1999
|
+
var _a, _b, _c;
|
|
2000
|
+
return __generator(this, function (_d) {
|
|
2001
|
+
switch (_d.label) {
|
|
2002
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createInviteToken(orgId, createInviteTokenRequest, options)];
|
|
2003
|
+
case 1:
|
|
2004
|
+
localVarAxiosArgs = _d.sent();
|
|
2005
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2006
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['JoinAccessApi.createInviteToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2007
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
});
|
|
2011
|
+
},
|
|
2012
|
+
/**
|
|
2013
|
+
* Validates the opaque invite token and creates (or returns) a pending AccessRequest for the property/role encoded on the token.
|
|
2014
|
+
* @summary Submit a join access request from an invite token
|
|
2015
|
+
* @param {string} orgId
|
|
2016
|
+
* @param {CreateJoinRequest} [createJoinRequest]
|
|
2017
|
+
* @param {*} [options] Override http request option.
|
|
2018
|
+
* @throws {RequiredError}
|
|
2019
|
+
*/
|
|
2020
|
+
createJoinAccessRequest: function (orgId, createJoinRequest, options) {
|
|
2021
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2022
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2023
|
+
var _a, _b, _c;
|
|
2024
|
+
return __generator(this, function (_d) {
|
|
2025
|
+
switch (_d.label) {
|
|
2026
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createJoinAccessRequest(orgId, createJoinRequest, options)];
|
|
2027
|
+
case 1:
|
|
2028
|
+
localVarAxiosArgs = _d.sent();
|
|
2029
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2030
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['JoinAccessApi.createJoinAccessRequest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2031
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2032
|
+
}
|
|
2033
|
+
});
|
|
2034
|
+
});
|
|
2035
|
+
},
|
|
2036
|
+
/**
|
|
2037
|
+
* Returns request status for the authenticated requester only. Owners should use the list endpoint.
|
|
2038
|
+
* @summary Get a join access request by id
|
|
2039
|
+
* @param {string} orgId
|
|
2040
|
+
* @param {string} requestId
|
|
2041
|
+
* @param {*} [options] Override http request option.
|
|
2042
|
+
* @throws {RequiredError}
|
|
2043
|
+
*/
|
|
2044
|
+
getJoinAccessRequest: function (orgId, requestId, options) {
|
|
2045
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2046
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2047
|
+
var _a, _b, _c;
|
|
2048
|
+
return __generator(this, function (_d) {
|
|
2049
|
+
switch (_d.label) {
|
|
2050
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getJoinAccessRequest(orgId, requestId, options)];
|
|
2051
|
+
case 1:
|
|
2052
|
+
localVarAxiosArgs = _d.sent();
|
|
2053
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2054
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['JoinAccessApi.getJoinAccessRequest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2055
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2056
|
+
}
|
|
2057
|
+
});
|
|
2058
|
+
});
|
|
2059
|
+
},
|
|
2060
|
+
/**
|
|
2061
|
+
* Returns pending AccessRequests for an org. Optional propertyId/brandId filters. Requires ViewTeammates on orgId.
|
|
2062
|
+
* @summary List pending join requests for an organization
|
|
2063
|
+
* @param {string} orgId
|
|
2064
|
+
* @param {string} [propertyId]
|
|
2065
|
+
* @param {string} [brandId]
|
|
2066
|
+
* @param {*} [options] Override http request option.
|
|
2067
|
+
* @throws {RequiredError}
|
|
2068
|
+
*/
|
|
2069
|
+
listJoinAccessRequests: function (orgId, propertyId, brandId, options) {
|
|
2070
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2071
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2072
|
+
var _a, _b, _c;
|
|
2073
|
+
return __generator(this, function (_d) {
|
|
2074
|
+
switch (_d.label) {
|
|
2075
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listJoinAccessRequests(orgId, propertyId, brandId, options)];
|
|
2076
|
+
case 1:
|
|
2077
|
+
localVarAxiosArgs = _d.sent();
|
|
2078
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2079
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['JoinAccessApi.listJoinAccessRequests']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2080
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2081
|
+
}
|
|
2082
|
+
});
|
|
2083
|
+
});
|
|
2084
|
+
},
|
|
2085
|
+
/**
|
|
2086
|
+
* Rejects a pending AccessRequest without granting access.
|
|
2087
|
+
* @summary Reject a pending join access request
|
|
2088
|
+
* @param {string} orgId
|
|
2089
|
+
* @param {string} requestId
|
|
2090
|
+
* @param {*} [options] Override http request option.
|
|
2091
|
+
* @throws {RequiredError}
|
|
2092
|
+
*/
|
|
2093
|
+
rejectJoinAccessRequest: function (orgId, requestId, options) {
|
|
2094
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2095
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2096
|
+
var _a, _b, _c;
|
|
2097
|
+
return __generator(this, function (_d) {
|
|
2098
|
+
switch (_d.label) {
|
|
2099
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rejectJoinAccessRequest(orgId, requestId, options)];
|
|
2100
|
+
case 1:
|
|
2101
|
+
localVarAxiosArgs = _d.sent();
|
|
2102
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2103
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['JoinAccessApi.rejectJoinAccessRequest']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2104
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2105
|
+
}
|
|
2106
|
+
});
|
|
2107
|
+
});
|
|
2108
|
+
},
|
|
2109
|
+
};
|
|
2110
|
+
};
|
|
2111
|
+
exports.JoinAccessApiFp = JoinAccessApiFp;
|
|
2112
|
+
/**
|
|
2113
|
+
* JoinAccessApi - factory interface
|
|
2114
|
+
* @export
|
|
2115
|
+
*/
|
|
2116
|
+
var JoinAccessApiFactory = function (configuration, basePath, axios) {
|
|
2117
|
+
var localVarFp = (0, exports.JoinAccessApiFp)(configuration);
|
|
2118
|
+
return {
|
|
2119
|
+
/**
|
|
2120
|
+
* Grants the role stored on the access request (copied from the invite token at create time) via AuthZ V2 role assignment (source join).
|
|
2121
|
+
* @summary Accept a pending join access request
|
|
2122
|
+
* @param {string} orgId
|
|
2123
|
+
* @param {string} requestId
|
|
2124
|
+
* @param {*} [options] Override http request option.
|
|
2125
|
+
* @throws {RequiredError}
|
|
2126
|
+
*/
|
|
2127
|
+
acceptJoinAccessRequest: function (orgId, requestId, options) {
|
|
2128
|
+
return localVarFp.acceptJoinAccessRequest(orgId, requestId, options).then(function (request) { return request(axios, basePath); });
|
|
2129
|
+
},
|
|
2130
|
+
/**
|
|
2131
|
+
* Mints an opaque invite token after validating the RMS terminal passport. Call again when a previous token expires to get a new one.
|
|
2132
|
+
* @summary Create an invite token
|
|
2133
|
+
* @param {string} orgId
|
|
2134
|
+
* @param {CreateInviteTokenRequest} [createInviteTokenRequest]
|
|
2135
|
+
* @param {*} [options] Override http request option.
|
|
2136
|
+
* @throws {RequiredError}
|
|
2137
|
+
*/
|
|
2138
|
+
createInviteToken: function (orgId, createInviteTokenRequest, options) {
|
|
2139
|
+
return localVarFp.createInviteToken(orgId, createInviteTokenRequest, options).then(function (request) { return request(axios, basePath); });
|
|
2140
|
+
},
|
|
2141
|
+
/**
|
|
2142
|
+
* Validates the opaque invite token and creates (or returns) a pending AccessRequest for the property/role encoded on the token.
|
|
2143
|
+
* @summary Submit a join access request from an invite token
|
|
2144
|
+
* @param {string} orgId
|
|
2145
|
+
* @param {CreateJoinRequest} [createJoinRequest]
|
|
2146
|
+
* @param {*} [options] Override http request option.
|
|
2147
|
+
* @throws {RequiredError}
|
|
2148
|
+
*/
|
|
2149
|
+
createJoinAccessRequest: function (orgId, createJoinRequest, options) {
|
|
2150
|
+
return localVarFp.createJoinAccessRequest(orgId, createJoinRequest, options).then(function (request) { return request(axios, basePath); });
|
|
2151
|
+
},
|
|
2152
|
+
/**
|
|
2153
|
+
* Returns request status for the authenticated requester only. Owners should use the list endpoint.
|
|
2154
|
+
* @summary Get a join access request by id
|
|
2155
|
+
* @param {string} orgId
|
|
2156
|
+
* @param {string} requestId
|
|
2157
|
+
* @param {*} [options] Override http request option.
|
|
2158
|
+
* @throws {RequiredError}
|
|
2159
|
+
*/
|
|
2160
|
+
getJoinAccessRequest: function (orgId, requestId, options) {
|
|
2161
|
+
return localVarFp.getJoinAccessRequest(orgId, requestId, options).then(function (request) { return request(axios, basePath); });
|
|
2162
|
+
},
|
|
2163
|
+
/**
|
|
2164
|
+
* Returns pending AccessRequests for an org. Optional propertyId/brandId filters. Requires ViewTeammates on orgId.
|
|
2165
|
+
* @summary List pending join requests for an organization
|
|
2166
|
+
* @param {string} orgId
|
|
2167
|
+
* @param {string} [propertyId]
|
|
2168
|
+
* @param {string} [brandId]
|
|
2169
|
+
* @param {*} [options] Override http request option.
|
|
2170
|
+
* @throws {RequiredError}
|
|
2171
|
+
*/
|
|
2172
|
+
listJoinAccessRequests: function (orgId, propertyId, brandId, options) {
|
|
2173
|
+
return localVarFp.listJoinAccessRequests(orgId, propertyId, brandId, options).then(function (request) { return request(axios, basePath); });
|
|
2174
|
+
},
|
|
2175
|
+
/**
|
|
2176
|
+
* Rejects a pending AccessRequest without granting access.
|
|
2177
|
+
* @summary Reject a pending join access request
|
|
2178
|
+
* @param {string} orgId
|
|
2179
|
+
* @param {string} requestId
|
|
2180
|
+
* @param {*} [options] Override http request option.
|
|
2181
|
+
* @throws {RequiredError}
|
|
2182
|
+
*/
|
|
2183
|
+
rejectJoinAccessRequest: function (orgId, requestId, options) {
|
|
2184
|
+
return localVarFp.rejectJoinAccessRequest(orgId, requestId, options).then(function (request) { return request(axios, basePath); });
|
|
2185
|
+
},
|
|
2186
|
+
};
|
|
2187
|
+
};
|
|
2188
|
+
exports.JoinAccessApiFactory = JoinAccessApiFactory;
|
|
2189
|
+
/**
|
|
2190
|
+
* JoinAccessApi - object-oriented interface
|
|
2191
|
+
* @export
|
|
2192
|
+
* @class JoinAccessApi
|
|
2193
|
+
* @extends {BaseAPI}
|
|
2194
|
+
*/
|
|
2195
|
+
var JoinAccessApi = /** @class */ (function (_super) {
|
|
2196
|
+
__extends(JoinAccessApi, _super);
|
|
2197
|
+
function JoinAccessApi() {
|
|
2198
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2199
|
+
}
|
|
2200
|
+
/**
|
|
2201
|
+
* Grants the role stored on the access request (copied from the invite token at create time) via AuthZ V2 role assignment (source join).
|
|
2202
|
+
* @summary Accept a pending join access request
|
|
2203
|
+
* @param {string} orgId
|
|
2204
|
+
* @param {string} requestId
|
|
2205
|
+
* @param {*} [options] Override http request option.
|
|
2206
|
+
* @throws {RequiredError}
|
|
2207
|
+
* @memberof JoinAccessApi
|
|
2208
|
+
*/
|
|
2209
|
+
JoinAccessApi.prototype.acceptJoinAccessRequest = function (orgId, requestId, options) {
|
|
2210
|
+
var _this = this;
|
|
2211
|
+
return (0, exports.JoinAccessApiFp)(this.configuration).acceptJoinAccessRequest(orgId, requestId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2212
|
+
};
|
|
2213
|
+
/**
|
|
2214
|
+
* Mints an opaque invite token after validating the RMS terminal passport. Call again when a previous token expires to get a new one.
|
|
2215
|
+
* @summary Create an invite token
|
|
2216
|
+
* @param {string} orgId
|
|
2217
|
+
* @param {CreateInviteTokenRequest} [createInviteTokenRequest]
|
|
2218
|
+
* @param {*} [options] Override http request option.
|
|
2219
|
+
* @throws {RequiredError}
|
|
2220
|
+
* @memberof JoinAccessApi
|
|
2221
|
+
*/
|
|
2222
|
+
JoinAccessApi.prototype.createInviteToken = function (orgId, createInviteTokenRequest, options) {
|
|
2223
|
+
var _this = this;
|
|
2224
|
+
return (0, exports.JoinAccessApiFp)(this.configuration).createInviteToken(orgId, createInviteTokenRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2225
|
+
};
|
|
2226
|
+
/**
|
|
2227
|
+
* Validates the opaque invite token and creates (or returns) a pending AccessRequest for the property/role encoded on the token.
|
|
2228
|
+
* @summary Submit a join access request from an invite token
|
|
2229
|
+
* @param {string} orgId
|
|
2230
|
+
* @param {CreateJoinRequest} [createJoinRequest]
|
|
2231
|
+
* @param {*} [options] Override http request option.
|
|
2232
|
+
* @throws {RequiredError}
|
|
2233
|
+
* @memberof JoinAccessApi
|
|
2234
|
+
*/
|
|
2235
|
+
JoinAccessApi.prototype.createJoinAccessRequest = function (orgId, createJoinRequest, options) {
|
|
2236
|
+
var _this = this;
|
|
2237
|
+
return (0, exports.JoinAccessApiFp)(this.configuration).createJoinAccessRequest(orgId, createJoinRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2238
|
+
};
|
|
2239
|
+
/**
|
|
2240
|
+
* Returns request status for the authenticated requester only. Owners should use the list endpoint.
|
|
2241
|
+
* @summary Get a join access request by id
|
|
2242
|
+
* @param {string} orgId
|
|
2243
|
+
* @param {string} requestId
|
|
2244
|
+
* @param {*} [options] Override http request option.
|
|
2245
|
+
* @throws {RequiredError}
|
|
2246
|
+
* @memberof JoinAccessApi
|
|
2247
|
+
*/
|
|
2248
|
+
JoinAccessApi.prototype.getJoinAccessRequest = function (orgId, requestId, options) {
|
|
2249
|
+
var _this = this;
|
|
2250
|
+
return (0, exports.JoinAccessApiFp)(this.configuration).getJoinAccessRequest(orgId, requestId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2251
|
+
};
|
|
2252
|
+
/**
|
|
2253
|
+
* Returns pending AccessRequests for an org. Optional propertyId/brandId filters. Requires ViewTeammates on orgId.
|
|
2254
|
+
* @summary List pending join requests for an organization
|
|
2255
|
+
* @param {string} orgId
|
|
2256
|
+
* @param {string} [propertyId]
|
|
2257
|
+
* @param {string} [brandId]
|
|
2258
|
+
* @param {*} [options] Override http request option.
|
|
2259
|
+
* @throws {RequiredError}
|
|
2260
|
+
* @memberof JoinAccessApi
|
|
2261
|
+
*/
|
|
2262
|
+
JoinAccessApi.prototype.listJoinAccessRequests = function (orgId, propertyId, brandId, options) {
|
|
2263
|
+
var _this = this;
|
|
2264
|
+
return (0, exports.JoinAccessApiFp)(this.configuration).listJoinAccessRequests(orgId, propertyId, brandId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2265
|
+
};
|
|
2266
|
+
/**
|
|
2267
|
+
* Rejects a pending AccessRequest without granting access.
|
|
2268
|
+
* @summary Reject a pending join access request
|
|
2269
|
+
* @param {string} orgId
|
|
2270
|
+
* @param {string} requestId
|
|
2271
|
+
* @param {*} [options] Override http request option.
|
|
2272
|
+
* @throws {RequiredError}
|
|
2273
|
+
* @memberof JoinAccessApi
|
|
2274
|
+
*/
|
|
2275
|
+
JoinAccessApi.prototype.rejectJoinAccessRequest = function (orgId, requestId, options) {
|
|
2276
|
+
var _this = this;
|
|
2277
|
+
return (0, exports.JoinAccessApiFp)(this.configuration).rejectJoinAccessRequest(orgId, requestId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2278
|
+
};
|
|
2279
|
+
return JoinAccessApi;
|
|
2280
|
+
}(base_1.BaseAPI));
|
|
2281
|
+
exports.JoinAccessApi = JoinAccessApi;
|
|
1576
2282
|
/**
|
|
1577
2283
|
* RoleAssignmentApi - axios parameter creator
|
|
1578
2284
|
* @export
|