@flipdish/authorization 0.2.4 → 0.2.5

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/api.ts CHANGED
@@ -215,7 +215,114 @@ export interface AuthenticateAndAuthorizeResponseAuthentication {
215
215
  'reason'?: string;
216
216
  }
217
217
  /**
218
- * Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on an AND of the result for each permission). For a granular response to multiple permissions, call the /authorize/batch endpoint.
218
+ *
219
+ * @export
220
+ * @interface AuthorizationBatchRequest
221
+ */
222
+ export interface AuthorizationBatchRequest {
223
+ /**
224
+ *
225
+ * @type {AuthorizationRequestPrincipal}
226
+ * @memberof AuthorizationBatchRequest
227
+ */
228
+ 'principal': AuthorizationRequestPrincipal;
229
+ /**
230
+ *
231
+ * @type {Permissions}
232
+ * @memberof AuthorizationBatchRequest
233
+ */
234
+ 'action': Permissions;
235
+ /**
236
+ * Array of resources to check authorisation for
237
+ * @type {Array<AuthorizationRequestResource>}
238
+ * @memberof AuthorizationBatchRequest
239
+ */
240
+ 'resources': Array<AuthorizationRequestResource>;
241
+ }
242
+ /**
243
+ *
244
+ * @export
245
+ * @interface AuthorizationBatchResponse
246
+ */
247
+ export interface AuthorizationBatchResponse {
248
+ /**
249
+ *
250
+ * @type {AuthorizationBatchResponseRequest}
251
+ * @memberof AuthorizationBatchResponse
252
+ */
253
+ 'request': AuthorizationBatchResponseRequest;
254
+ /**
255
+ * Array of allowed resources
256
+ * @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
257
+ * @memberof AuthorizationBatchResponse
258
+ */
259
+ 'allowedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
260
+ /**
261
+ * Array of denied resources
262
+ * @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
263
+ * @memberof AuthorizationBatchResponse
264
+ */
265
+ 'deniedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
266
+ }
267
+ /**
268
+ *
269
+ * @export
270
+ * @interface AuthorizationBatchResponseAllowedResourcesInner
271
+ */
272
+ export interface AuthorizationBatchResponseAllowedResourcesInner {
273
+ /**
274
+ * The authorization decision
275
+ * @type {string}
276
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
277
+ */
278
+ 'decision': string;
279
+ /**
280
+ * Whether the action is allowed
281
+ * @type {boolean}
282
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
283
+ */
284
+ 'allowed': boolean;
285
+ /**
286
+ * The policy IDs that were used to make the decision
287
+ * @type {Array<string>}
288
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
289
+ */
290
+ 'policyIds': Array<string>;
291
+ /**
292
+ *
293
+ * @type {AuthorizationBatchResponseAllowedResourcesInnerResource}
294
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
295
+ */
296
+ 'resource': AuthorizationBatchResponseAllowedResourcesInnerResource;
297
+ }
298
+ /**
299
+ * @type AuthorizationBatchResponseAllowedResourcesInnerResource
300
+ *
301
+ * @export
302
+ */
303
+ export type AuthorizationBatchResponseAllowedResourcesInnerResource = AuthorizationRequestResourceOneOf | AuthorizationRequestResourceOneOf1 | AuthorizationRequestResourceOneOf2 | AuthorizationRequestResourceOneOf3;
304
+
305
+ /**
306
+ * The request that was checked
307
+ * @export
308
+ * @interface AuthorizationBatchResponseRequest
309
+ */
310
+ export interface AuthorizationBatchResponseRequest {
311
+ /**
312
+ *
313
+ * @type {AuthorizationRequestPrincipal}
314
+ * @memberof AuthorizationBatchResponseRequest
315
+ */
316
+ 'principal': AuthorizationRequestPrincipal;
317
+ /**
318
+ *
319
+ * @type {AuthorizationRequestAction}
320
+ * @memberof AuthorizationBatchResponseRequest
321
+ */
322
+ 'action': AuthorizationRequestAction;
323
+ }
324
+ /**
325
+ * Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on an AND of the result for each permission).
219
326
  * @export
220
327
  * @interface AuthorizationRequest
221
328
  */
@@ -407,6 +514,12 @@ export type AuthorizationRequestResourceOneOf3TypeEnum = typeof AuthorizationReq
407
514
  * @interface AuthorizationResponse
408
515
  */
409
516
  export interface AuthorizationResponse {
517
+ /**
518
+ *
519
+ * @type {AuthorizationRequest}
520
+ * @memberof AuthorizationResponse
521
+ */
522
+ 'request': AuthorizationRequest;
410
523
  /**
411
524
  * Whether the action is allowed
412
525
  * @type {boolean}
@@ -1662,6 +1775,43 @@ export const AuthorizationApiAxiosParamCreator = function (configuration?: Confi
1662
1775
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1663
1776
  localVarRequestOptions.data = serializeDataIfNeeded(authorizationRequest, localVarRequestOptions, configuration)
1664
1777
 
1778
+ return {
1779
+ url: toPathString(localVarUrlObj),
1780
+ options: localVarRequestOptions,
1781
+ };
1782
+ },
1783
+ /**
1784
+ * Check if a user is authorized to perform an action on multiple resources
1785
+ * @summary Authorize Batch Request
1786
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1787
+ * @param {*} [options] Override http request option.
1788
+ * @throws {RequiredError}
1789
+ */
1790
+ authorizeBatch: async (authorizationBatchRequest?: AuthorizationBatchRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1791
+ const localVarPath = `/authorize/batch`;
1792
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1793
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1794
+ let baseOptions;
1795
+ if (configuration) {
1796
+ baseOptions = configuration.baseOptions;
1797
+ }
1798
+
1799
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1800
+ const localVarHeaderParameter = {} as any;
1801
+ const localVarQueryParameter = {} as any;
1802
+
1803
+ // authentication ApiKeyAuth required
1804
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1805
+
1806
+
1807
+
1808
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1809
+
1810
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1811
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1812
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1813
+ localVarRequestOptions.data = serializeDataIfNeeded(authorizationBatchRequest, localVarRequestOptions, configuration)
1814
+
1665
1815
  return {
1666
1816
  url: toPathString(localVarUrlObj),
1667
1817
  options: localVarRequestOptions,
@@ -1703,6 +1853,19 @@ export const AuthorizationApiFp = function(configuration?: Configuration) {
1703
1853
  const localVarOperationServerBasePath = operationServerMap['AuthorizationApi.authorize']?.[localVarOperationServerIndex]?.url;
1704
1854
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1705
1855
  },
1856
+ /**
1857
+ * Check if a user is authorized to perform an action on multiple resources
1858
+ * @summary Authorize Batch Request
1859
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1860
+ * @param {*} [options] Override http request option.
1861
+ * @throws {RequiredError}
1862
+ */
1863
+ async authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizationBatchResponse>> {
1864
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authorizeBatch(authorizationBatchRequest, options);
1865
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1866
+ const localVarOperationServerBasePath = operationServerMap['AuthorizationApi.authorizeBatch']?.[localVarOperationServerIndex]?.url;
1867
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1868
+ },
1706
1869
  }
1707
1870
  };
1708
1871
 
@@ -1733,6 +1896,16 @@ export const AuthorizationApiFactory = function (configuration?: Configuration,
1733
1896
  authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationResponse> {
1734
1897
  return localVarFp.authorize(authorizationRequest, options).then((request) => request(axios, basePath));
1735
1898
  },
1899
+ /**
1900
+ * Check if a user is authorized to perform an action on multiple resources
1901
+ * @summary Authorize Batch Request
1902
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1903
+ * @param {*} [options] Override http request option.
1904
+ * @throws {RequiredError}
1905
+ */
1906
+ authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationBatchResponse> {
1907
+ return localVarFp.authorizeBatch(authorizationBatchRequest, options).then((request) => request(axios, basePath));
1908
+ },
1736
1909
  };
1737
1910
  };
1738
1911
 
@@ -1766,6 +1939,18 @@ export class AuthorizationApi extends BaseAPI {
1766
1939
  public authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig) {
1767
1940
  return AuthorizationApiFp(this.configuration).authorize(authorizationRequest, options).then((request) => request(this.axios, this.basePath));
1768
1941
  }
1942
+
1943
+ /**
1944
+ * Check if a user is authorized to perform an action on multiple resources
1945
+ * @summary Authorize Batch Request
1946
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1947
+ * @param {*} [options] Override http request option.
1948
+ * @throws {RequiredError}
1949
+ * @memberof AuthorizationApi
1950
+ */
1951
+ public authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig) {
1952
+ return AuthorizationApiFp(this.configuration).authorizeBatch(authorizationBatchRequest, options).then((request) => request(this.axios, this.basePath));
1953
+ }
1769
1954
  }
1770
1955
 
1771
1956
 
package/configuration.ts CHANGED
@@ -100,7 +100,7 @@ export class Configuration {
100
100
 
101
101
  const extraHeaders = param.useDefaultUserAgent ? {} : {
102
102
  headers: {
103
- "user-agent": "Flipdish authorization typescript SDK / 0.2.4"
103
+ "user-agent": "Flipdish authorization typescript SDK / 0.2.5"
104
104
  }
105
105
  };
106
106
 
package/dist/api.d.ts CHANGED
@@ -204,7 +204,113 @@ export interface AuthenticateAndAuthorizeResponseAuthentication {
204
204
  'reason'?: string;
205
205
  }
206
206
  /**
207
- * Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on an AND of the result for each permission). For a granular response to multiple permissions, call the /authorize/batch endpoint.
207
+ *
208
+ * @export
209
+ * @interface AuthorizationBatchRequest
210
+ */
211
+ export interface AuthorizationBatchRequest {
212
+ /**
213
+ *
214
+ * @type {AuthorizationRequestPrincipal}
215
+ * @memberof AuthorizationBatchRequest
216
+ */
217
+ 'principal': AuthorizationRequestPrincipal;
218
+ /**
219
+ *
220
+ * @type {Permissions}
221
+ * @memberof AuthorizationBatchRequest
222
+ */
223
+ 'action': Permissions;
224
+ /**
225
+ * Array of resources to check authorisation for
226
+ * @type {Array<AuthorizationRequestResource>}
227
+ * @memberof AuthorizationBatchRequest
228
+ */
229
+ 'resources': Array<AuthorizationRequestResource>;
230
+ }
231
+ /**
232
+ *
233
+ * @export
234
+ * @interface AuthorizationBatchResponse
235
+ */
236
+ export interface AuthorizationBatchResponse {
237
+ /**
238
+ *
239
+ * @type {AuthorizationBatchResponseRequest}
240
+ * @memberof AuthorizationBatchResponse
241
+ */
242
+ 'request': AuthorizationBatchResponseRequest;
243
+ /**
244
+ * Array of allowed resources
245
+ * @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
246
+ * @memberof AuthorizationBatchResponse
247
+ */
248
+ 'allowedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
249
+ /**
250
+ * Array of denied resources
251
+ * @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
252
+ * @memberof AuthorizationBatchResponse
253
+ */
254
+ 'deniedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
255
+ }
256
+ /**
257
+ *
258
+ * @export
259
+ * @interface AuthorizationBatchResponseAllowedResourcesInner
260
+ */
261
+ export interface AuthorizationBatchResponseAllowedResourcesInner {
262
+ /**
263
+ * The authorization decision
264
+ * @type {string}
265
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
266
+ */
267
+ 'decision': string;
268
+ /**
269
+ * Whether the action is allowed
270
+ * @type {boolean}
271
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
272
+ */
273
+ 'allowed': boolean;
274
+ /**
275
+ * The policy IDs that were used to make the decision
276
+ * @type {Array<string>}
277
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
278
+ */
279
+ 'policyIds': Array<string>;
280
+ /**
281
+ *
282
+ * @type {AuthorizationBatchResponseAllowedResourcesInnerResource}
283
+ * @memberof AuthorizationBatchResponseAllowedResourcesInner
284
+ */
285
+ 'resource': AuthorizationBatchResponseAllowedResourcesInnerResource;
286
+ }
287
+ /**
288
+ * @type AuthorizationBatchResponseAllowedResourcesInnerResource
289
+ *
290
+ * @export
291
+ */
292
+ export type AuthorizationBatchResponseAllowedResourcesInnerResource = AuthorizationRequestResourceOneOf | AuthorizationRequestResourceOneOf1 | AuthorizationRequestResourceOneOf2 | AuthorizationRequestResourceOneOf3;
293
+ /**
294
+ * The request that was checked
295
+ * @export
296
+ * @interface AuthorizationBatchResponseRequest
297
+ */
298
+ export interface AuthorizationBatchResponseRequest {
299
+ /**
300
+ *
301
+ * @type {AuthorizationRequestPrincipal}
302
+ * @memberof AuthorizationBatchResponseRequest
303
+ */
304
+ 'principal': AuthorizationRequestPrincipal;
305
+ /**
306
+ *
307
+ * @type {AuthorizationRequestAction}
308
+ * @memberof AuthorizationBatchResponseRequest
309
+ */
310
+ 'action': AuthorizationRequestAction;
311
+ }
312
+ /**
313
+ * Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on an AND of the result for each permission).
208
314
  * @export
209
315
  * @interface AuthorizationRequest
210
316
  */
@@ -380,6 +486,12 @@ export type AuthorizationRequestResourceOneOf3TypeEnum = typeof AuthorizationReq
380
486
  * @interface AuthorizationResponse
381
487
  */
382
488
  export interface AuthorizationResponse {
489
+ /**
490
+ *
491
+ * @type {AuthorizationRequest}
492
+ * @memberof AuthorizationResponse
493
+ */
494
+ 'request': AuthorizationRequest;
383
495
  /**
384
496
  * Whether the action is allowed
385
497
  * @type {boolean}
@@ -1503,6 +1615,14 @@ export declare const AuthorizationApiAxiosParamCreator: (configuration?: Configu
1503
1615
  * @throws {RequiredError}
1504
1616
  */
1505
1617
  authorize: (authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1618
+ /**
1619
+ * Check if a user is authorized to perform an action on multiple resources
1620
+ * @summary Authorize Batch Request
1621
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1622
+ * @param {*} [options] Override http request option.
1623
+ * @throws {RequiredError}
1624
+ */
1625
+ authorizeBatch: (authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1506
1626
  };
1507
1627
  /**
1508
1628
  * AuthorizationApi - functional programming interface
@@ -1525,6 +1645,14 @@ export declare const AuthorizationApiFp: (configuration?: Configuration) => {
1525
1645
  * @throws {RequiredError}
1526
1646
  */
1527
1647
  authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizationResponse>>;
1648
+ /**
1649
+ * Check if a user is authorized to perform an action on multiple resources
1650
+ * @summary Authorize Batch Request
1651
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1652
+ * @param {*} [options] Override http request option.
1653
+ * @throws {RequiredError}
1654
+ */
1655
+ authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizationBatchResponse>>;
1528
1656
  };
1529
1657
  /**
1530
1658
  * AuthorizationApi - factory interface
@@ -1547,6 +1675,14 @@ export declare const AuthorizationApiFactory: (configuration?: Configuration, ba
1547
1675
  * @throws {RequiredError}
1548
1676
  */
1549
1677
  authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationResponse>;
1678
+ /**
1679
+ * Check if a user is authorized to perform an action on multiple resources
1680
+ * @summary Authorize Batch Request
1681
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1682
+ * @param {*} [options] Override http request option.
1683
+ * @throws {RequiredError}
1684
+ */
1685
+ authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationBatchResponse>;
1550
1686
  };
1551
1687
  /**
1552
1688
  * AuthorizationApi - object-oriented interface
@@ -1573,6 +1709,15 @@ export declare class AuthorizationApi extends BaseAPI {
1573
1709
  * @memberof AuthorizationApi
1574
1710
  */
1575
1711
  authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthorizationResponse, any, {}>>;
1712
+ /**
1713
+ * Check if a user is authorized to perform an action on multiple resources
1714
+ * @summary Authorize Batch Request
1715
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1716
+ * @param {*} [options] Override http request option.
1717
+ * @throws {RequiredError}
1718
+ * @memberof AuthorizationApi
1719
+ */
1720
+ authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthorizationBatchResponse, any, {}>>;
1576
1721
  }
1577
1722
  /**
1578
1723
  * PermissionsApi - axios parameter creator
package/dist/api.js CHANGED
@@ -1058,6 +1058,50 @@ var AuthorizationApiAxiosParamCreator = function (configuration) {
1058
1058
  });
1059
1059
  });
1060
1060
  },
1061
+ /**
1062
+ * Check if a user is authorized to perform an action on multiple resources
1063
+ * @summary Authorize Batch Request
1064
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1065
+ * @param {*} [options] Override http request option.
1066
+ * @throws {RequiredError}
1067
+ */
1068
+ authorizeBatch: function (authorizationBatchRequest_1) {
1069
+ var args_1 = [];
1070
+ for (var _i = 1; _i < arguments.length; _i++) {
1071
+ args_1[_i - 1] = arguments[_i];
1072
+ }
1073
+ return __awaiter(_this, __spreadArray([authorizationBatchRequest_1], args_1, true), void 0, function (authorizationBatchRequest, options) {
1074
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1075
+ if (options === void 0) { options = {}; }
1076
+ return __generator(this, function (_a) {
1077
+ switch (_a.label) {
1078
+ case 0:
1079
+ localVarPath = "/authorize/batch";
1080
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1081
+ if (configuration) {
1082
+ baseOptions = configuration.baseOptions;
1083
+ }
1084
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1085
+ localVarHeaderParameter = {};
1086
+ localVarQueryParameter = {};
1087
+ // authentication ApiKeyAuth required
1088
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
1089
+ case 1:
1090
+ // authentication ApiKeyAuth required
1091
+ _a.sent();
1092
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1093
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1094
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1095
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1096
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(authorizationBatchRequest, localVarRequestOptions, configuration);
1097
+ return [2 /*return*/, {
1098
+ url: (0, common_1.toPathString)(localVarUrlObj),
1099
+ options: localVarRequestOptions,
1100
+ }];
1101
+ }
1102
+ });
1103
+ });
1104
+ },
1061
1105
  };
1062
1106
  };
1063
1107
  exports.AuthorizationApiAxiosParamCreator = AuthorizationApiAxiosParamCreator;
@@ -1114,6 +1158,29 @@ var AuthorizationApiFp = function (configuration) {
1114
1158
  });
1115
1159
  });
1116
1160
  },
1161
+ /**
1162
+ * Check if a user is authorized to perform an action on multiple resources
1163
+ * @summary Authorize Batch Request
1164
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1165
+ * @param {*} [options] Override http request option.
1166
+ * @throws {RequiredError}
1167
+ */
1168
+ authorizeBatch: function (authorizationBatchRequest, options) {
1169
+ return __awaiter(this, void 0, void 0, function () {
1170
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1171
+ var _a, _b, _c;
1172
+ return __generator(this, function (_d) {
1173
+ switch (_d.label) {
1174
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.authorizeBatch(authorizationBatchRequest, options)];
1175
+ case 1:
1176
+ localVarAxiosArgs = _d.sent();
1177
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1178
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthorizationApi.authorizeBatch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1179
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1180
+ }
1181
+ });
1182
+ });
1183
+ },
1117
1184
  };
1118
1185
  };
1119
1186
  exports.AuthorizationApiFp = AuthorizationApiFp;
@@ -1144,6 +1211,16 @@ var AuthorizationApiFactory = function (configuration, basePath, axios) {
1144
1211
  authorize: function (authorizationRequest, options) {
1145
1212
  return localVarFp.authorize(authorizationRequest, options).then(function (request) { return request(axios, basePath); });
1146
1213
  },
1214
+ /**
1215
+ * Check if a user is authorized to perform an action on multiple resources
1216
+ * @summary Authorize Batch Request
1217
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1218
+ * @param {*} [options] Override http request option.
1219
+ * @throws {RequiredError}
1220
+ */
1221
+ authorizeBatch: function (authorizationBatchRequest, options) {
1222
+ return localVarFp.authorizeBatch(authorizationBatchRequest, options).then(function (request) { return request(axios, basePath); });
1223
+ },
1147
1224
  };
1148
1225
  };
1149
1226
  exports.AuthorizationApiFactory = AuthorizationApiFactory;
@@ -1182,6 +1259,18 @@ var AuthorizationApi = /** @class */ (function (_super) {
1182
1259
  var _this = this;
1183
1260
  return (0, exports.AuthorizationApiFp)(this.configuration).authorize(authorizationRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
1184
1261
  };
1262
+ /**
1263
+ * Check if a user is authorized to perform an action on multiple resources
1264
+ * @summary Authorize Batch Request
1265
+ * @param {AuthorizationBatchRequest} [authorizationBatchRequest]
1266
+ * @param {*} [options] Override http request option.
1267
+ * @throws {RequiredError}
1268
+ * @memberof AuthorizationApi
1269
+ */
1270
+ AuthorizationApi.prototype.authorizeBatch = function (authorizationBatchRequest, options) {
1271
+ var _this = this;
1272
+ return (0, exports.AuthorizationApiFp)(this.configuration).authorizeBatch(authorizationBatchRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
1273
+ };
1185
1274
  return AuthorizationApi;
1186
1275
  }(base_1.BaseAPI));
1187
1276
  exports.AuthorizationApi = AuthorizationApi;
@@ -36,7 +36,7 @@ var Configuration = /** @class */ (function () {
36
36
  this.serverIndex = param.serverIndex;
37
37
  var extraHeaders = param.useDefaultUserAgent ? {} : {
38
38
  headers: {
39
- "user-agent": "Flipdish authorization typescript SDK / 0.2.4"
39
+ "user-agent": "Flipdish authorization typescript SDK / 0.2.5"
40
40
  }
41
41
  };
42
42
  this.baseOptions = __assign(__assign({}, extraHeaders), param.baseOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/authorization",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "OpenAPI client for @flipdish/authorization",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {