@flipdish/authorization 0.2.54 → 0.2.55

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
@@ -281,6 +281,27 @@ export const AccessRequestResponseRoleNameEnum = {
281
281
 
282
282
  export type AccessRequestResponseRoleNameEnum = typeof AccessRequestResponseRoleNameEnum[keyof typeof AccessRequestResponseRoleNameEnum];
283
283
 
284
+ /**
285
+ *
286
+ * @export
287
+ * @interface ApplyNamedRoleRequestBody
288
+ */
289
+ export interface ApplyNamedRoleRequestBody {
290
+ /**
291
+ * The user receiving the role
292
+ * @type {string}
293
+ * @memberof ApplyNamedRoleRequestBody
294
+ */
295
+ 'userId': string;
296
+ /**
297
+ *
298
+ * @type {RoleNames}
299
+ * @memberof ApplyNamedRoleRequestBody
300
+ */
301
+ 'roleName': RoleNames;
302
+ }
303
+
304
+
284
305
  /**
285
306
  * 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.
286
307
  * @export
@@ -965,10 +986,10 @@ export interface CreateGlobalApiKeyRequest {
965
986
  'permissions': Array<string>;
966
987
  /**
967
988
  *
968
- * @type {Array<AuthorizationRequestResource>}
989
+ * @type {CreateGlobalApiKeyRequestResource}
969
990
  * @memberof CreateGlobalApiKeyRequest
970
991
  */
971
- 'resources'?: Array<AuthorizationRequestResource>;
992
+ 'resource'?: CreateGlobalApiKeyRequestResource;
972
993
  /**
973
994
  *
974
995
  * @type {boolean}
@@ -988,6 +1009,13 @@ export interface CreateGlobalApiKeyRequest {
988
1009
  */
989
1010
  'orgId'?: string;
990
1011
  }
1012
+ /**
1013
+ * @type CreateGlobalApiKeyRequestResource
1014
+ * Single resource the key is scoped to (required when global is false)
1015
+ * @export
1016
+ */
1017
+ export type CreateGlobalApiKeyRequestResource = AuthorizationRequestResourceOneOf | AuthorizationRequestResourceOneOf1 | AuthorizationRequestResourceOneOf2 | AuthorizationRequestResourceOneOf3;
1018
+
991
1019
  /**
992
1020
  *
993
1021
  * @export
@@ -1840,6 +1868,25 @@ export const JoinAccessErrorResponseCodeEnum = {
1840
1868
 
1841
1869
  export type JoinAccessErrorResponseCodeEnum = typeof JoinAccessErrorResponseCodeEnum[keyof typeof JoinAccessErrorResponseCodeEnum];
1842
1870
 
1871
+ /**
1872
+ * An org\'s expired timed access grants, most recent first
1873
+ * @export
1874
+ * @interface ListExpiredTimedAccessGrantsResponse
1875
+ */
1876
+ export interface ListExpiredTimedAccessGrantsResponse {
1877
+ /**
1878
+ *
1879
+ * @type {Array<TimedAccessGrant>}
1880
+ * @memberof ListExpiredTimedAccessGrantsResponse
1881
+ */
1882
+ 'grants': Array<TimedAccessGrant>;
1883
+ /**
1884
+ * Pass as the cursor query param to fetch the next page. Absent on the last page
1885
+ * @type {string}
1886
+ * @memberof ListExpiredTimedAccessGrantsResponse
1887
+ */
1888
+ 'nextCursor'?: string;
1889
+ }
1843
1890
  /**
1844
1891
  *
1845
1892
  * @export
@@ -2075,6 +2122,39 @@ export interface ListTimedAccessGrantsResponse {
2075
2122
  */
2076
2123
  'grants': Array<TimedAccessGrant>;
2077
2124
  }
2125
+ /**
2126
+ * The named role assignment
2127
+ * @export
2128
+ * @interface NamedRoleAssignmentResponse
2129
+ */
2130
+ export interface NamedRoleAssignmentResponse {
2131
+ /**
2132
+ *
2133
+ * @type {string}
2134
+ * @memberof NamedRoleAssignmentResponse
2135
+ */
2136
+ 'userId': string;
2137
+ /**
2138
+ * Best-effort; omitted if the principal has no known email on file
2139
+ * @type {string}
2140
+ * @memberof NamedRoleAssignmentResponse
2141
+ */
2142
+ 'email'?: string;
2143
+ /**
2144
+ *
2145
+ * @type {RoleNames}
2146
+ * @memberof NamedRoleAssignmentResponse
2147
+ */
2148
+ 'role': RoleNames;
2149
+ /**
2150
+ *
2151
+ * @type {string}
2152
+ * @memberof NamedRoleAssignmentResponse
2153
+ */
2154
+ 'assignedAt': string;
2155
+ }
2156
+
2157
+
2078
2158
  /**
2079
2159
  * Permissions
2080
2160
  * @export
@@ -2209,6 +2289,7 @@ export const Permissions = {
2209
2289
  ViewUserEventsAuditLogs: 'ViewUserEventsAuditLogs',
2210
2290
  ViewCampaignsAuditLogs: 'ViewCampaignsAuditLogs',
2211
2291
  ViewTeammatesAuditLogs: 'ViewTeammatesAuditLogs',
2292
+ ViewTimedAccessAuditLogs: 'ViewTimedAccessAuditLogs',
2212
2293
  ViewAppAuditLogs: 'ViewAppAuditLogs',
2213
2294
  ViewCustomerAuditLogs: 'ViewCustomerAuditLogs',
2214
2295
  ViewPrinterAuditLogs: 'ViewPrinterAuditLogs',
@@ -2491,6 +2572,27 @@ export interface RematerializeRoleAssignmentSuccessResponseRoleAssignment {
2491
2572
  */
2492
2573
  'assignmentId': string;
2493
2574
  }
2575
+ /**
2576
+ *
2577
+ * @export
2578
+ * @interface RemoveNamedRoleRequestBody
2579
+ */
2580
+ export interface RemoveNamedRoleRequestBody {
2581
+ /**
2582
+ * The user losing the role
2583
+ * @type {string}
2584
+ * @memberof RemoveNamedRoleRequestBody
2585
+ */
2586
+ 'userId': string;
2587
+ /**
2588
+ *
2589
+ * @type {RoleNames}
2590
+ * @memberof RemoveNamedRoleRequestBody
2591
+ */
2592
+ 'roleName': RoleNames;
2593
+ }
2594
+
2595
+
2494
2596
  /**
2495
2597
  *
2496
2598
  * @export
@@ -3174,10 +3276,10 @@ export interface UpdateGlobalApiKeyRequest {
3174
3276
  'permissions'?: Array<string>;
3175
3277
  /**
3176
3278
  *
3177
- * @type {Array<AuthorizationRequestResource>}
3279
+ * @type {AuthorizationRequestResource}
3178
3280
  * @memberof UpdateGlobalApiKeyRequest
3179
3281
  */
3180
- 'resources'?: Array<AuthorizationRequestResource>;
3282
+ 'resource'?: AuthorizationRequestResource;
3181
3283
  /**
3182
3284
  *
3183
3285
  * @type {boolean}
@@ -5283,6 +5385,189 @@ export class JoinAccessApi extends BaseAPI {
5283
5385
 
5284
5386
 
5285
5387
 
5388
+ /**
5389
+ * NamedRolesApi - axios parameter creator
5390
+ * @export
5391
+ */
5392
+ export const NamedRolesApiAxiosParamCreator = function (configuration?: Configuration) {
5393
+ return {
5394
+ /**
5395
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
5396
+ * @summary Assign a named role
5397
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
5398
+ * @param {*} [options] Override http request option.
5399
+ * @throws {RequiredError}
5400
+ */
5401
+ applyNamedRole: async (applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5402
+ const localVarPath = `/namedRoles/apply`;
5403
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5404
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5405
+ let baseOptions;
5406
+ if (configuration) {
5407
+ baseOptions = configuration.baseOptions;
5408
+ }
5409
+
5410
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
5411
+ const localVarHeaderParameter = {} as any;
5412
+ const localVarQueryParameter = {} as any;
5413
+
5414
+ // authentication ApiKeyAuth required
5415
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
5416
+
5417
+
5418
+
5419
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5420
+
5421
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5422
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5423
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5424
+ localVarRequestOptions.data = serializeDataIfNeeded(applyNamedRoleRequestBody, localVarRequestOptions, configuration)
5425
+
5426
+ return {
5427
+ url: toPathString(localVarUrlObj),
5428
+ options: localVarRequestOptions,
5429
+ };
5430
+ },
5431
+ /**
5432
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
5433
+ * @summary Remove a named role
5434
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
5435
+ * @param {*} [options] Override http request option.
5436
+ * @throws {RequiredError}
5437
+ */
5438
+ removeNamedRole: async (removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5439
+ const localVarPath = `/namedRoles/remove`;
5440
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5441
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5442
+ let baseOptions;
5443
+ if (configuration) {
5444
+ baseOptions = configuration.baseOptions;
5445
+ }
5446
+
5447
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
5448
+ const localVarHeaderParameter = {} as any;
5449
+ const localVarQueryParameter = {} as any;
5450
+
5451
+ // authentication ApiKeyAuth required
5452
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
5453
+
5454
+
5455
+
5456
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5457
+
5458
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5459
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5460
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5461
+ localVarRequestOptions.data = serializeDataIfNeeded(removeNamedRoleRequestBody, localVarRequestOptions, configuration)
5462
+
5463
+ return {
5464
+ url: toPathString(localVarUrlObj),
5465
+ options: localVarRequestOptions,
5466
+ };
5467
+ },
5468
+ }
5469
+ };
5470
+
5471
+ /**
5472
+ * NamedRolesApi - functional programming interface
5473
+ * @export
5474
+ */
5475
+ export const NamedRolesApiFp = function(configuration?: Configuration) {
5476
+ const localVarAxiosParamCreator = NamedRolesApiAxiosParamCreator(configuration)
5477
+ return {
5478
+ /**
5479
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
5480
+ * @summary Assign a named role
5481
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
5482
+ * @param {*} [options] Override http request option.
5483
+ * @throws {RequiredError}
5484
+ */
5485
+ async applyNamedRole(applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NamedRoleAssignmentResponse>> {
5486
+ const localVarAxiosArgs = await localVarAxiosParamCreator.applyNamedRole(applyNamedRoleRequestBody, options);
5487
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5488
+ const localVarOperationServerBasePath = operationServerMap['NamedRolesApi.applyNamedRole']?.[localVarOperationServerIndex]?.url;
5489
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5490
+ },
5491
+ /**
5492
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
5493
+ * @summary Remove a named role
5494
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
5495
+ * @param {*} [options] Override http request option.
5496
+ * @throws {RequiredError}
5497
+ */
5498
+ async removeNamedRole(removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
5499
+ const localVarAxiosArgs = await localVarAxiosParamCreator.removeNamedRole(removeNamedRoleRequestBody, options);
5500
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5501
+ const localVarOperationServerBasePath = operationServerMap['NamedRolesApi.removeNamedRole']?.[localVarOperationServerIndex]?.url;
5502
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5503
+ },
5504
+ }
5505
+ };
5506
+
5507
+ /**
5508
+ * NamedRolesApi - factory interface
5509
+ * @export
5510
+ */
5511
+ export const NamedRolesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
5512
+ const localVarFp = NamedRolesApiFp(configuration)
5513
+ return {
5514
+ /**
5515
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
5516
+ * @summary Assign a named role
5517
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
5518
+ * @param {*} [options] Override http request option.
5519
+ * @throws {RequiredError}
5520
+ */
5521
+ applyNamedRole(applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<NamedRoleAssignmentResponse> {
5522
+ return localVarFp.applyNamedRole(applyNamedRoleRequestBody, options).then((request) => request(axios, basePath));
5523
+ },
5524
+ /**
5525
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
5526
+ * @summary Remove a named role
5527
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
5528
+ * @param {*} [options] Override http request option.
5529
+ * @throws {RequiredError}
5530
+ */
5531
+ removeNamedRole(removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<void> {
5532
+ return localVarFp.removeNamedRole(removeNamedRoleRequestBody, options).then((request) => request(axios, basePath));
5533
+ },
5534
+ };
5535
+ };
5536
+
5537
+ /**
5538
+ * NamedRolesApi - object-oriented interface
5539
+ * @export
5540
+ * @class NamedRolesApi
5541
+ * @extends {BaseAPI}
5542
+ */
5543
+ export class NamedRolesApi extends BaseAPI {
5544
+ /**
5545
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
5546
+ * @summary Assign a named role
5547
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
5548
+ * @param {*} [options] Override http request option.
5549
+ * @throws {RequiredError}
5550
+ * @memberof NamedRolesApi
5551
+ */
5552
+ public applyNamedRole(applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options?: RawAxiosRequestConfig) {
5553
+ return NamedRolesApiFp(this.configuration).applyNamedRole(applyNamedRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
5554
+ }
5555
+
5556
+ /**
5557
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
5558
+ * @summary Remove a named role
5559
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
5560
+ * @param {*} [options] Override http request option.
5561
+ * @throws {RequiredError}
5562
+ * @memberof NamedRolesApi
5563
+ */
5564
+ public removeNamedRole(removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options?: RawAxiosRequestConfig) {
5565
+ return NamedRolesApiFp(this.configuration).removeNamedRole(removeNamedRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
5566
+ }
5567
+ }
5568
+
5569
+
5570
+
5286
5571
  /**
5287
5572
  * PrincipalAccessBlockApi - axios parameter creator
5288
5573
  * @export
@@ -5937,7 +6222,7 @@ export const TimedAccessApiAxiosParamCreator = function (configuration?: Configu
5937
6222
  createTimedAccessGrant: async (orgId: string, timedAccessGrantRequestBody?: TimedAccessGrantRequestBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5938
6223
  // verify required parameter 'orgId' is not null or undefined
5939
6224
  assertParamExists('createTimedAccessGrant', 'orgId', orgId)
5940
- const localVarPath = `/timedAccess/orgs/{orgId}/grants`
6225
+ const localVarPath = `/orgs/{orgId}/timedAccess/grants`
5941
6226
  .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
5942
6227
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5943
6228
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -5967,6 +6252,53 @@ export const TimedAccessApiAxiosParamCreator = function (configuration?: Configu
5967
6252
  options: localVarRequestOptions,
5968
6253
  };
5969
6254
  },
6255
+ /**
6256
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
6257
+ * @summary An org\'s expired timed access grant history
6258
+ * @param {string} orgId
6259
+ * @param {number} [limit] Page size, defaults to a server-chosen value
6260
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
6261
+ * @param {*} [options] Override http request option.
6262
+ * @throws {RequiredError}
6263
+ */
6264
+ listExpiredTimedAccessGrantsForOrg: async (orgId: string, limit?: number, cursor?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6265
+ // verify required parameter 'orgId' is not null or undefined
6266
+ assertParamExists('listExpiredTimedAccessGrantsForOrg', 'orgId', orgId)
6267
+ const localVarPath = `/orgs/{orgId}/timedAccess/grants/expired`
6268
+ .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
6269
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
6270
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
6271
+ let baseOptions;
6272
+ if (configuration) {
6273
+ baseOptions = configuration.baseOptions;
6274
+ }
6275
+
6276
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
6277
+ const localVarHeaderParameter = {} as any;
6278
+ const localVarQueryParameter = {} as any;
6279
+
6280
+ // authentication ApiKeyAuth required
6281
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
6282
+
6283
+ if (limit !== undefined) {
6284
+ localVarQueryParameter['limit'] = limit;
6285
+ }
6286
+
6287
+ if (cursor !== undefined) {
6288
+ localVarQueryParameter['cursor'] = cursor;
6289
+ }
6290
+
6291
+
6292
+
6293
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
6294
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6295
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
6296
+
6297
+ return {
6298
+ url: toPathString(localVarUrlObj),
6299
+ options: localVarRequestOptions,
6300
+ };
6301
+ },
5970
6302
  /**
5971
6303
  * Returns the authenticated caller\'s active pass for the requested org.
5972
6304
  * @summary List the caller\'s active timed access pass for an org
@@ -5978,7 +6310,7 @@ export const TimedAccessApiAxiosParamCreator = function (configuration?: Configu
5978
6310
  listMyTimedAccessGrants: async (orgId: string, status?: ListMyTimedAccessGrantsStatusEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5979
6311
  // verify required parameter 'orgId' is not null or undefined
5980
6312
  assertParamExists('listMyTimedAccessGrants', 'orgId', orgId)
5981
- const localVarPath = `/timedAccess/orgs/{orgId}/grants`
6313
+ const localVarPath = `/orgs/{orgId}/timedAccess/grants`
5982
6314
  .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
5983
6315
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5984
6316
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -6033,6 +6365,21 @@ export const TimedAccessApiFp = function(configuration?: Configuration) {
6033
6365
  const localVarOperationServerBasePath = operationServerMap['TimedAccessApi.createTimedAccessGrant']?.[localVarOperationServerIndex]?.url;
6034
6366
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
6035
6367
  },
6368
+ /**
6369
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
6370
+ * @summary An org\'s expired timed access grant history
6371
+ * @param {string} orgId
6372
+ * @param {number} [limit] Page size, defaults to a server-chosen value
6373
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
6374
+ * @param {*} [options] Override http request option.
6375
+ * @throws {RequiredError}
6376
+ */
6377
+ async listExpiredTimedAccessGrantsForOrg(orgId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListExpiredTimedAccessGrantsResponse>> {
6378
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listExpiredTimedAccessGrantsForOrg(orgId, limit, cursor, options);
6379
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
6380
+ const localVarOperationServerBasePath = operationServerMap['TimedAccessApi.listExpiredTimedAccessGrantsForOrg']?.[localVarOperationServerIndex]?.url;
6381
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
6382
+ },
6036
6383
  /**
6037
6384
  * Returns the authenticated caller\'s active pass for the requested org.
6038
6385
  * @summary List the caller\'s active timed access pass for an org
@@ -6068,6 +6415,18 @@ export const TimedAccessApiFactory = function (configuration?: Configuration, ba
6068
6415
  createTimedAccessGrant(orgId: string, timedAccessGrantRequestBody?: TimedAccessGrantRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<TimedAccessGrantResponse> {
6069
6416
  return localVarFp.createTimedAccessGrant(orgId, timedAccessGrantRequestBody, options).then((request) => request(axios, basePath));
6070
6417
  },
6418
+ /**
6419
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
6420
+ * @summary An org\'s expired timed access grant history
6421
+ * @param {string} orgId
6422
+ * @param {number} [limit] Page size, defaults to a server-chosen value
6423
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
6424
+ * @param {*} [options] Override http request option.
6425
+ * @throws {RequiredError}
6426
+ */
6427
+ listExpiredTimedAccessGrantsForOrg(orgId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise<ListExpiredTimedAccessGrantsResponse> {
6428
+ return localVarFp.listExpiredTimedAccessGrantsForOrg(orgId, limit, cursor, options).then((request) => request(axios, basePath));
6429
+ },
6071
6430
  /**
6072
6431
  * Returns the authenticated caller\'s active pass for the requested org.
6073
6432
  * @summary List the caller\'s active timed access pass for an org
@@ -6102,6 +6461,20 @@ export class TimedAccessApi extends BaseAPI {
6102
6461
  return TimedAccessApiFp(this.configuration).createTimedAccessGrant(orgId, timedAccessGrantRequestBody, options).then((request) => request(this.axios, this.basePath));
6103
6462
  }
6104
6463
 
6464
+ /**
6465
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
6466
+ * @summary An org\'s expired timed access grant history
6467
+ * @param {string} orgId
6468
+ * @param {number} [limit] Page size, defaults to a server-chosen value
6469
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
6470
+ * @param {*} [options] Override http request option.
6471
+ * @throws {RequiredError}
6472
+ * @memberof TimedAccessApi
6473
+ */
6474
+ public listExpiredTimedAccessGrantsForOrg(orgId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) {
6475
+ return TimedAccessApiFp(this.configuration).listExpiredTimedAccessGrantsForOrg(orgId, limit, cursor, options).then((request) => request(this.axios, this.basePath));
6476
+ }
6477
+
6105
6478
  /**
6106
6479
  * Returns the authenticated caller\'s active pass for the requested org.
6107
6480
  * @summary List the caller\'s active timed access pass for an org
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.54"
103
+ "user-agent": "Flipdish authorization typescript SDK / 0.2.55"
104
104
  }
105
105
  };
106
106
 
package/dist/api.d.ts CHANGED
@@ -261,6 +261,25 @@ export declare const AccessRequestResponseRoleNameEnum: {
261
261
  readonly Terminal: "Terminal";
262
262
  };
263
263
  export type AccessRequestResponseRoleNameEnum = typeof AccessRequestResponseRoleNameEnum[keyof typeof AccessRequestResponseRoleNameEnum];
264
+ /**
265
+ *
266
+ * @export
267
+ * @interface ApplyNamedRoleRequestBody
268
+ */
269
+ export interface ApplyNamedRoleRequestBody {
270
+ /**
271
+ * The user receiving the role
272
+ * @type {string}
273
+ * @memberof ApplyNamedRoleRequestBody
274
+ */
275
+ 'userId': string;
276
+ /**
277
+ *
278
+ * @type {RoleNames}
279
+ * @memberof ApplyNamedRoleRequestBody
280
+ */
281
+ 'roleName': RoleNames;
282
+ }
264
283
  /**
265
284
  * 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.
266
285
  * @export
@@ -911,10 +930,10 @@ export interface CreateGlobalApiKeyRequest {
911
930
  'permissions': Array<string>;
912
931
  /**
913
932
  *
914
- * @type {Array<AuthorizationRequestResource>}
933
+ * @type {CreateGlobalApiKeyRequestResource}
915
934
  * @memberof CreateGlobalApiKeyRequest
916
935
  */
917
- 'resources'?: Array<AuthorizationRequestResource>;
936
+ 'resource'?: CreateGlobalApiKeyRequestResource;
918
937
  /**
919
938
  *
920
939
  * @type {boolean}
@@ -934,6 +953,12 @@ export interface CreateGlobalApiKeyRequest {
934
953
  */
935
954
  'orgId'?: string;
936
955
  }
956
+ /**
957
+ * @type CreateGlobalApiKeyRequestResource
958
+ * Single resource the key is scoped to (required when global is false)
959
+ * @export
960
+ */
961
+ export type CreateGlobalApiKeyRequestResource = AuthorizationRequestResourceOneOf | AuthorizationRequestResourceOneOf1 | AuthorizationRequestResourceOneOf2 | AuthorizationRequestResourceOneOf3;
937
962
  /**
938
963
  *
939
964
  * @export
@@ -1760,6 +1785,25 @@ export declare const JoinAccessErrorResponseCodeEnum: {
1760
1785
  readonly AlreadyMember: "ALREADY_MEMBER";
1761
1786
  };
1762
1787
  export type JoinAccessErrorResponseCodeEnum = typeof JoinAccessErrorResponseCodeEnum[keyof typeof JoinAccessErrorResponseCodeEnum];
1788
+ /**
1789
+ * An org\'s expired timed access grants, most recent first
1790
+ * @export
1791
+ * @interface ListExpiredTimedAccessGrantsResponse
1792
+ */
1793
+ export interface ListExpiredTimedAccessGrantsResponse {
1794
+ /**
1795
+ *
1796
+ * @type {Array<TimedAccessGrant>}
1797
+ * @memberof ListExpiredTimedAccessGrantsResponse
1798
+ */
1799
+ 'grants': Array<TimedAccessGrant>;
1800
+ /**
1801
+ * Pass as the cursor query param to fetch the next page. Absent on the last page
1802
+ * @type {string}
1803
+ * @memberof ListExpiredTimedAccessGrantsResponse
1804
+ */
1805
+ 'nextCursor'?: string;
1806
+ }
1763
1807
  /**
1764
1808
  *
1765
1809
  * @export
@@ -1989,6 +2033,37 @@ export interface ListTimedAccessGrantsResponse {
1989
2033
  */
1990
2034
  'grants': Array<TimedAccessGrant>;
1991
2035
  }
2036
+ /**
2037
+ * The named role assignment
2038
+ * @export
2039
+ * @interface NamedRoleAssignmentResponse
2040
+ */
2041
+ export interface NamedRoleAssignmentResponse {
2042
+ /**
2043
+ *
2044
+ * @type {string}
2045
+ * @memberof NamedRoleAssignmentResponse
2046
+ */
2047
+ 'userId': string;
2048
+ /**
2049
+ * Best-effort; omitted if the principal has no known email on file
2050
+ * @type {string}
2051
+ * @memberof NamedRoleAssignmentResponse
2052
+ */
2053
+ 'email'?: string;
2054
+ /**
2055
+ *
2056
+ * @type {RoleNames}
2057
+ * @memberof NamedRoleAssignmentResponse
2058
+ */
2059
+ 'role': RoleNames;
2060
+ /**
2061
+ *
2062
+ * @type {string}
2063
+ * @memberof NamedRoleAssignmentResponse
2064
+ */
2065
+ 'assignedAt': string;
2066
+ }
1992
2067
  /**
1993
2068
  * Permissions
1994
2069
  * @export
@@ -2122,6 +2197,7 @@ export declare const Permissions: {
2122
2197
  readonly ViewUserEventsAuditLogs: "ViewUserEventsAuditLogs";
2123
2198
  readonly ViewCampaignsAuditLogs: "ViewCampaignsAuditLogs";
2124
2199
  readonly ViewTeammatesAuditLogs: "ViewTeammatesAuditLogs";
2200
+ readonly ViewTimedAccessAuditLogs: "ViewTimedAccessAuditLogs";
2125
2201
  readonly ViewAppAuditLogs: "ViewAppAuditLogs";
2126
2202
  readonly ViewCustomerAuditLogs: "ViewCustomerAuditLogs";
2127
2203
  readonly ViewPrinterAuditLogs: "ViewPrinterAuditLogs";
@@ -2398,6 +2474,25 @@ export interface RematerializeRoleAssignmentSuccessResponseRoleAssignment {
2398
2474
  */
2399
2475
  'assignmentId': string;
2400
2476
  }
2477
+ /**
2478
+ *
2479
+ * @export
2480
+ * @interface RemoveNamedRoleRequestBody
2481
+ */
2482
+ export interface RemoveNamedRoleRequestBody {
2483
+ /**
2484
+ * The user losing the role
2485
+ * @type {string}
2486
+ * @memberof RemoveNamedRoleRequestBody
2487
+ */
2488
+ 'userId': string;
2489
+ /**
2490
+ *
2491
+ * @type {RoleNames}
2492
+ * @memberof RemoveNamedRoleRequestBody
2493
+ */
2494
+ 'roleName': RoleNames;
2495
+ }
2401
2496
  /**
2402
2497
  *
2403
2498
  * @export
@@ -3045,10 +3140,10 @@ export interface UpdateGlobalApiKeyRequest {
3045
3140
  'permissions'?: Array<string>;
3046
3141
  /**
3047
3142
  *
3048
- * @type {Array<AuthorizationRequestResource>}
3143
+ * @type {AuthorizationRequestResource}
3049
3144
  * @memberof UpdateGlobalApiKeyRequest
3050
3145
  */
3051
- 'resources'?: Array<AuthorizationRequestResource>;
3146
+ 'resource'?: AuthorizationRequestResource;
3052
3147
  /**
3053
3148
  *
3054
3149
  * @type {boolean}
@@ -4075,6 +4170,98 @@ export declare class JoinAccessApi extends BaseAPI {
4075
4170
  */
4076
4171
  rejectJoinAccessRequest(orgId: string, requestId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetJoinAccessRequest200Response, any, {}, any>>;
4077
4172
  }
4173
+ /**
4174
+ * NamedRolesApi - axios parameter creator
4175
+ * @export
4176
+ */
4177
+ export declare const NamedRolesApiAxiosParamCreator: (configuration?: Configuration) => {
4178
+ /**
4179
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
4180
+ * @summary Assign a named role
4181
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
4182
+ * @param {*} [options] Override http request option.
4183
+ * @throws {RequiredError}
4184
+ */
4185
+ applyNamedRole: (applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4186
+ /**
4187
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
4188
+ * @summary Remove a named role
4189
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
4190
+ * @param {*} [options] Override http request option.
4191
+ * @throws {RequiredError}
4192
+ */
4193
+ removeNamedRole: (removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4194
+ };
4195
+ /**
4196
+ * NamedRolesApi - functional programming interface
4197
+ * @export
4198
+ */
4199
+ export declare const NamedRolesApiFp: (configuration?: Configuration) => {
4200
+ /**
4201
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
4202
+ * @summary Assign a named role
4203
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
4204
+ * @param {*} [options] Override http request option.
4205
+ * @throws {RequiredError}
4206
+ */
4207
+ applyNamedRole(applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NamedRoleAssignmentResponse>>;
4208
+ /**
4209
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
4210
+ * @summary Remove a named role
4211
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
4212
+ * @param {*} [options] Override http request option.
4213
+ * @throws {RequiredError}
4214
+ */
4215
+ removeNamedRole(removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4216
+ };
4217
+ /**
4218
+ * NamedRolesApi - factory interface
4219
+ * @export
4220
+ */
4221
+ export declare const NamedRolesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
4222
+ /**
4223
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
4224
+ * @summary Assign a named role
4225
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
4226
+ * @param {*} [options] Override http request option.
4227
+ * @throws {RequiredError}
4228
+ */
4229
+ applyNamedRole(applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<NamedRoleAssignmentResponse>;
4230
+ /**
4231
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
4232
+ * @summary Remove a named role
4233
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
4234
+ * @param {*} [options] Override http request option.
4235
+ * @throws {RequiredError}
4236
+ */
4237
+ removeNamedRole(removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4238
+ };
4239
+ /**
4240
+ * NamedRolesApi - object-oriented interface
4241
+ * @export
4242
+ * @class NamedRolesApi
4243
+ * @extends {BaseAPI}
4244
+ */
4245
+ export declare class NamedRolesApi extends BaseAPI {
4246
+ /**
4247
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
4248
+ * @summary Assign a named role
4249
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
4250
+ * @param {*} [options] Override http request option.
4251
+ * @throws {RequiredError}
4252
+ * @memberof NamedRolesApi
4253
+ */
4254
+ applyNamedRole(applyNamedRoleRequestBody?: ApplyNamedRoleRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<NamedRoleAssignmentResponse, any, {}, any>>;
4255
+ /**
4256
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
4257
+ * @summary Remove a named role
4258
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
4259
+ * @param {*} [options] Override http request option.
4260
+ * @throws {RequiredError}
4261
+ * @memberof NamedRolesApi
4262
+ */
4263
+ removeNamedRole(removeNamedRoleRequestBody?: RemoveNamedRoleRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
4264
+ }
4078
4265
  /**
4079
4266
  * PrincipalAccessBlockApi - axios parameter creator
4080
4267
  * @export
@@ -4408,6 +4595,16 @@ export declare const TimedAccessApiAxiosParamCreator: (configuration?: Configura
4408
4595
  * @throws {RequiredError}
4409
4596
  */
4410
4597
  createTimedAccessGrant: (orgId: string, timedAccessGrantRequestBody?: TimedAccessGrantRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4598
+ /**
4599
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4600
+ * @summary An org\'s expired timed access grant history
4601
+ * @param {string} orgId
4602
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4603
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4604
+ * @param {*} [options] Override http request option.
4605
+ * @throws {RequiredError}
4606
+ */
4607
+ listExpiredTimedAccessGrantsForOrg: (orgId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4411
4608
  /**
4412
4609
  * Returns the authenticated caller\'s active pass for the requested org.
4413
4610
  * @summary List the caller\'s active timed access pass for an org
@@ -4432,6 +4629,16 @@ export declare const TimedAccessApiFp: (configuration?: Configuration) => {
4432
4629
  * @throws {RequiredError}
4433
4630
  */
4434
4631
  createTimedAccessGrant(orgId: string, timedAccessGrantRequestBody?: TimedAccessGrantRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TimedAccessGrantResponse>>;
4632
+ /**
4633
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4634
+ * @summary An org\'s expired timed access grant history
4635
+ * @param {string} orgId
4636
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4637
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4638
+ * @param {*} [options] Override http request option.
4639
+ * @throws {RequiredError}
4640
+ */
4641
+ listExpiredTimedAccessGrantsForOrg(orgId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListExpiredTimedAccessGrantsResponse>>;
4435
4642
  /**
4436
4643
  * Returns the authenticated caller\'s active pass for the requested org.
4437
4644
  * @summary List the caller\'s active timed access pass for an org
@@ -4456,6 +4663,16 @@ export declare const TimedAccessApiFactory: (configuration?: Configuration, base
4456
4663
  * @throws {RequiredError}
4457
4664
  */
4458
4665
  createTimedAccessGrant(orgId: string, timedAccessGrantRequestBody?: TimedAccessGrantRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<TimedAccessGrantResponse>;
4666
+ /**
4667
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4668
+ * @summary An org\'s expired timed access grant history
4669
+ * @param {string} orgId
4670
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4671
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4672
+ * @param {*} [options] Override http request option.
4673
+ * @throws {RequiredError}
4674
+ */
4675
+ listExpiredTimedAccessGrantsForOrg(orgId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise<ListExpiredTimedAccessGrantsResponse>;
4459
4676
  /**
4460
4677
  * Returns the authenticated caller\'s active pass for the requested org.
4461
4678
  * @summary List the caller\'s active timed access pass for an org
@@ -4483,6 +4700,17 @@ export declare class TimedAccessApi extends BaseAPI {
4483
4700
  * @memberof TimedAccessApi
4484
4701
  */
4485
4702
  createTimedAccessGrant(orgId: string, timedAccessGrantRequestBody?: TimedAccessGrantRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TimedAccessGrantResponse, any, {}, any>>;
4703
+ /**
4704
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4705
+ * @summary An org\'s expired timed access grant history
4706
+ * @param {string} orgId
4707
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4708
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4709
+ * @param {*} [options] Override http request option.
4710
+ * @throws {RequiredError}
4711
+ * @memberof TimedAccessApi
4712
+ */
4713
+ listExpiredTimedAccessGrantsForOrg(orgId: string, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListExpiredTimedAccessGrantsResponse, any, {}, any>>;
4486
4714
  /**
4487
4715
  * Returns the authenticated caller\'s active pass for the requested org.
4488
4716
  * @summary List the caller\'s active timed access pass for an org
package/dist/api.js CHANGED
@@ -85,7 +85,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
85
85
  };
86
86
  Object.defineProperty(exports, "__esModule", { value: true });
87
87
  exports.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = exports.ListGlobalApiKeysStatusEnum = exports.APIKeysApi = exports.APIKeysApiFactory = exports.APIKeysApiFp = exports.APIKeysApiAxiosParamCreator = exports.UnblockPrincipalAccessResponseStatusEnum = exports.TimedAccessGrantResponseStatusEnum = exports.TimedAccessGrantResponsePrincipalTypeEnum = exports.TimedAccessGrantRequestBodyRoleNameEnum = exports.TimedAccessGrantStatusEnum = exports.TimedAccessGrantPrincipalTypeEnum = exports.RoleNames = exports.RoleLevelDefinitionScopeEnum = exports.RoleAssignmentRequestBodyPrincipalTypeEnum = exports.RoleAssignmentRequestBodyActorTypeEnum = exports.RoleAssignmentRequestBodyRoleNameEnum = exports.RemoveTeammateRequestBodyPrincipalTypeEnum = exports.RemoveTeammateRequestBodyActorTypeEnum = exports.PrincipalInOrgTypeEnum = exports.Permissions = exports.ListRoleDefinitionsSuccessResponseRolesInnerNameEnum = exports.ListOrgRolesSuccessResponseValueRolesEnum = exports.JoinAccessErrorResponseCodeEnum = exports.IsInRoleRequestCheckModeEnum = exports.InviteTokenResponseRoleNameEnum = exports.GlobalApiKeyStateResponseUpdatedStatusEnum = exports.GlobalApiKeyStateResponseRevokedStatusEnum = exports.GlobalApiKeyStateResponseStatusEnum = exports.GetUserPermissionsSuccessResponseResourcesValueResourceTypeEnum = exports.GetJoinAccessRequest200ResponseRoleNameEnum = exports.GetJoinAccessRequest200ResponseStateEnum = exports.GetAuthorizedOrgsRequestPrincipalTypeEnum = exports.AuthorizationRequestResourceOneOf3TypeEnum = exports.AuthorizationRequestResourceOneOf2TypeEnum = exports.AuthorizationRequestResourceOneOf1TypeEnum = exports.AuthorizationRequestResourceOneOfTypeEnum = exports.AuthorizationRequestPrincipalTypeEnum = exports.AuthorizationRequestCheckModeEnum = exports.AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum = exports.AuthenticateApiKey200ResponseOkEnum = exports.AuthenticateAndCheckIsInRoleRequestCheckModeEnum = exports.AuthenticateAndAuthorizeRequestCheckModeEnum = exports.AccessRequestResponseRoleNameEnum = exports.AccessRequestResponseStateEnum = exports.AccessBlockStateResponseBlockedPrincipalTypeEnum = exports.AcceptJoinRequestRoleNameEnum = void 0;
88
- exports.UserPermissionsApi = exports.UserPermissionsApiFactory = exports.UserPermissionsApiFp = exports.UserPermissionsApiAxiosParamCreator = exports.UserManagementApi = exports.UserManagementApiFactory = exports.UserManagementApiFp = exports.UserManagementApiAxiosParamCreator = exports.ListMyTimedAccessGrantsStatusEnum = exports.TimedAccessApi = exports.TimedAccessApiFactory = exports.TimedAccessApiFp = exports.TimedAccessApiAxiosParamCreator = exports.RoleAssignmentApi = exports.RoleAssignmentApiFactory = exports.RoleAssignmentApiFp = exports.RoleAssignmentApiAxiosParamCreator = exports.ListPrincipalAccessBlocksTypeEnum = exports.GetPrincipalAccessBlockTypeEnum = exports.PrincipalAccessBlockApi = exports.PrincipalAccessBlockApiFactory = exports.PrincipalAccessBlockApiFp = exports.PrincipalAccessBlockApiAxiosParamCreator = 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 = void 0;
88
+ exports.UserPermissionsApi = exports.UserPermissionsApiFactory = exports.UserPermissionsApiFp = exports.UserPermissionsApiAxiosParamCreator = exports.UserManagementApi = exports.UserManagementApiFactory = exports.UserManagementApiFp = exports.UserManagementApiAxiosParamCreator = exports.ListMyTimedAccessGrantsStatusEnum = exports.TimedAccessApi = exports.TimedAccessApiFactory = exports.TimedAccessApiFp = exports.TimedAccessApiAxiosParamCreator = exports.RoleAssignmentApi = exports.RoleAssignmentApiFactory = exports.RoleAssignmentApiFp = exports.RoleAssignmentApiAxiosParamCreator = exports.ListPrincipalAccessBlocksTypeEnum = exports.GetPrincipalAccessBlockTypeEnum = exports.PrincipalAccessBlockApi = exports.PrincipalAccessBlockApiFactory = exports.PrincipalAccessBlockApiFp = exports.PrincipalAccessBlockApiAxiosParamCreator = exports.NamedRolesApi = exports.NamedRolesApiFactory = exports.NamedRolesApiFp = exports.NamedRolesApiAxiosParamCreator = 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 = void 0;
89
89
  var axios_1 = require("axios");
90
90
  // Some imports not used depending on template conditions
91
91
  // @ts-ignore
@@ -379,6 +379,7 @@ exports.Permissions = {
379
379
  ViewUserEventsAuditLogs: 'ViewUserEventsAuditLogs',
380
380
  ViewCampaignsAuditLogs: 'ViewCampaignsAuditLogs',
381
381
  ViewTeammatesAuditLogs: 'ViewTeammatesAuditLogs',
382
+ ViewTimedAccessAuditLogs: 'ViewTimedAccessAuditLogs',
382
383
  ViewAppAuditLogs: 'ViewAppAuditLogs',
383
384
  ViewCustomerAuditLogs: 'ViewCustomerAuditLogs',
384
385
  ViewPrinterAuditLogs: 'ViewPrinterAuditLogs',
@@ -3145,6 +3146,228 @@ var JoinAccessApi = /** @class */ (function (_super) {
3145
3146
  return JoinAccessApi;
3146
3147
  }(base_1.BaseAPI));
3147
3148
  exports.JoinAccessApi = JoinAccessApi;
3149
+ /**
3150
+ * NamedRolesApi - axios parameter creator
3151
+ * @export
3152
+ */
3153
+ var NamedRolesApiAxiosParamCreator = function (configuration) {
3154
+ var _this = this;
3155
+ return {
3156
+ /**
3157
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
3158
+ * @summary Assign a named role
3159
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
3160
+ * @param {*} [options] Override http request option.
3161
+ * @throws {RequiredError}
3162
+ */
3163
+ applyNamedRole: function (applyNamedRoleRequestBody_1) {
3164
+ var args_1 = [];
3165
+ for (var _i = 1; _i < arguments.length; _i++) {
3166
+ args_1[_i - 1] = arguments[_i];
3167
+ }
3168
+ return __awaiter(_this, __spreadArray([applyNamedRoleRequestBody_1], args_1, true), void 0, function (applyNamedRoleRequestBody, options) {
3169
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3170
+ if (options === void 0) { options = {}; }
3171
+ return __generator(this, function (_a) {
3172
+ switch (_a.label) {
3173
+ case 0:
3174
+ localVarPath = "/namedRoles/apply";
3175
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3176
+ if (configuration) {
3177
+ baseOptions = configuration.baseOptions;
3178
+ }
3179
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
3180
+ localVarHeaderParameter = {};
3181
+ localVarQueryParameter = {};
3182
+ // authentication ApiKeyAuth required
3183
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
3184
+ case 1:
3185
+ // authentication ApiKeyAuth required
3186
+ _a.sent();
3187
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3188
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3189
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3190
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3191
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(applyNamedRoleRequestBody, localVarRequestOptions, configuration);
3192
+ return [2 /*return*/, {
3193
+ url: (0, common_1.toPathString)(localVarUrlObj),
3194
+ options: localVarRequestOptions,
3195
+ }];
3196
+ }
3197
+ });
3198
+ });
3199
+ },
3200
+ /**
3201
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
3202
+ * @summary Remove a named role
3203
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
3204
+ * @param {*} [options] Override http request option.
3205
+ * @throws {RequiredError}
3206
+ */
3207
+ removeNamedRole: function (removeNamedRoleRequestBody_1) {
3208
+ var args_1 = [];
3209
+ for (var _i = 1; _i < arguments.length; _i++) {
3210
+ args_1[_i - 1] = arguments[_i];
3211
+ }
3212
+ return __awaiter(_this, __spreadArray([removeNamedRoleRequestBody_1], args_1, true), void 0, function (removeNamedRoleRequestBody, options) {
3213
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3214
+ if (options === void 0) { options = {}; }
3215
+ return __generator(this, function (_a) {
3216
+ switch (_a.label) {
3217
+ case 0:
3218
+ localVarPath = "/namedRoles/remove";
3219
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3220
+ if (configuration) {
3221
+ baseOptions = configuration.baseOptions;
3222
+ }
3223
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
3224
+ localVarHeaderParameter = {};
3225
+ localVarQueryParameter = {};
3226
+ // authentication ApiKeyAuth required
3227
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
3228
+ case 1:
3229
+ // authentication ApiKeyAuth required
3230
+ _a.sent();
3231
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3232
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3233
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3234
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3235
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(removeNamedRoleRequestBody, localVarRequestOptions, configuration);
3236
+ return [2 /*return*/, {
3237
+ url: (0, common_1.toPathString)(localVarUrlObj),
3238
+ options: localVarRequestOptions,
3239
+ }];
3240
+ }
3241
+ });
3242
+ });
3243
+ },
3244
+ };
3245
+ };
3246
+ exports.NamedRolesApiAxiosParamCreator = NamedRolesApiAxiosParamCreator;
3247
+ /**
3248
+ * NamedRolesApi - functional programming interface
3249
+ * @export
3250
+ */
3251
+ var NamedRolesApiFp = function (configuration) {
3252
+ var localVarAxiosParamCreator = (0, exports.NamedRolesApiAxiosParamCreator)(configuration);
3253
+ return {
3254
+ /**
3255
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
3256
+ * @summary Assign a named role
3257
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
3258
+ * @param {*} [options] Override http request option.
3259
+ * @throws {RequiredError}
3260
+ */
3261
+ applyNamedRole: function (applyNamedRoleRequestBody, options) {
3262
+ return __awaiter(this, void 0, void 0, function () {
3263
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3264
+ var _a, _b, _c;
3265
+ return __generator(this, function (_d) {
3266
+ switch (_d.label) {
3267
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.applyNamedRole(applyNamedRoleRequestBody, options)];
3268
+ case 1:
3269
+ localVarAxiosArgs = _d.sent();
3270
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3271
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['NamedRolesApi.applyNamedRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3272
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3273
+ }
3274
+ });
3275
+ });
3276
+ },
3277
+ /**
3278
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
3279
+ * @summary Remove a named role
3280
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
3281
+ * @param {*} [options] Override http request option.
3282
+ * @throws {RequiredError}
3283
+ */
3284
+ removeNamedRole: function (removeNamedRoleRequestBody, options) {
3285
+ return __awaiter(this, void 0, void 0, function () {
3286
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3287
+ var _a, _b, _c;
3288
+ return __generator(this, function (_d) {
3289
+ switch (_d.label) {
3290
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.removeNamedRole(removeNamedRoleRequestBody, options)];
3291
+ case 1:
3292
+ localVarAxiosArgs = _d.sent();
3293
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3294
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['NamedRolesApi.removeNamedRole']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3295
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3296
+ }
3297
+ });
3298
+ });
3299
+ },
3300
+ };
3301
+ };
3302
+ exports.NamedRolesApiFp = NamedRolesApiFp;
3303
+ /**
3304
+ * NamedRolesApi - factory interface
3305
+ * @export
3306
+ */
3307
+ var NamedRolesApiFactory = function (configuration, basePath, axios) {
3308
+ var localVarFp = (0, exports.NamedRolesApiFp)(configuration);
3309
+ return {
3310
+ /**
3311
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
3312
+ * @summary Assign a named role
3313
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
3314
+ * @param {*} [options] Override http request option.
3315
+ * @throws {RequiredError}
3316
+ */
3317
+ applyNamedRole: function (applyNamedRoleRequestBody, options) {
3318
+ return localVarFp.applyNamedRole(applyNamedRoleRequestBody, options).then(function (request) { return request(axios, basePath); });
3319
+ },
3320
+ /**
3321
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
3322
+ * @summary Remove a named role
3323
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
3324
+ * @param {*} [options] Override http request option.
3325
+ * @throws {RequiredError}
3326
+ */
3327
+ removeNamedRole: function (removeNamedRoleRequestBody, options) {
3328
+ return localVarFp.removeNamedRole(removeNamedRoleRequestBody, options).then(function (request) { return request(axios, basePath); });
3329
+ },
3330
+ };
3331
+ };
3332
+ exports.NamedRolesApiFactory = NamedRolesApiFactory;
3333
+ /**
3334
+ * NamedRolesApi - object-oriented interface
3335
+ * @export
3336
+ * @class NamedRolesApi
3337
+ * @extends {BaseAPI}
3338
+ */
3339
+ var NamedRolesApi = /** @class */ (function (_super) {
3340
+ __extends(NamedRolesApi, _super);
3341
+ function NamedRolesApi() {
3342
+ return _super !== null && _super.apply(this, arguments) || this;
3343
+ }
3344
+ /**
3345
+ * Grants a user the named role given in the body. The caller must themselves hold a named role, and may only assign roles at or below their own privilege level (see NamedRolePrivilegeLevel in auth-config); AuthDeveloper can never be assigned here, it\'s IaC-only. Idempotent: assigning twice returns the same result. Mirrors /orgs/{orgId}/roleAssignments/apply.
3346
+ * @summary Assign a named role
3347
+ * @param {ApplyNamedRoleRequestBody} [applyNamedRoleRequestBody]
3348
+ * @param {*} [options] Override http request option.
3349
+ * @throws {RequiredError}
3350
+ * @memberof NamedRolesApi
3351
+ */
3352
+ NamedRolesApi.prototype.applyNamedRole = function (applyNamedRoleRequestBody, options) {
3353
+ var _this = this;
3354
+ return (0, exports.NamedRolesApiFp)(this.configuration).applyNamedRole(applyNamedRoleRequestBody, options).then(function (request) { return request(_this.axios, _this.basePath); });
3355
+ };
3356
+ /**
3357
+ * Removes the named role given in the body so the user can no longer act as it. Does not end passes already held; those run to their own expiry. Subject to the same privilege-level gate and AuthDeveloper block as assignment. Mirrors /orgs/{orgId}/roleAssignments/remove.
3358
+ * @summary Remove a named role
3359
+ * @param {RemoveNamedRoleRequestBody} [removeNamedRoleRequestBody]
3360
+ * @param {*} [options] Override http request option.
3361
+ * @throws {RequiredError}
3362
+ * @memberof NamedRolesApi
3363
+ */
3364
+ NamedRolesApi.prototype.removeNamedRole = function (removeNamedRoleRequestBody, options) {
3365
+ var _this = this;
3366
+ return (0, exports.NamedRolesApiFp)(this.configuration).removeNamedRole(removeNamedRoleRequestBody, options).then(function (request) { return request(_this.axios, _this.basePath); });
3367
+ };
3368
+ return NamedRolesApi;
3369
+ }(base_1.BaseAPI));
3370
+ exports.NamedRolesApi = NamedRolesApi;
3148
3371
  /**
3149
3372
  * PrincipalAccessBlockApi - axios parameter creator
3150
3373
  * @export
@@ -3936,7 +4159,7 @@ var TimedAccessApiAxiosParamCreator = function (configuration) {
3936
4159
  case 0:
3937
4160
  // verify required parameter 'orgId' is not null or undefined
3938
4161
  (0, common_1.assertParamExists)('createTimedAccessGrant', 'orgId', orgId);
3939
- localVarPath = "/timedAccess/orgs/{orgId}/grants"
4162
+ localVarPath = "/orgs/{orgId}/timedAccess/grants"
3940
4163
  .replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)));
3941
4164
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3942
4165
  if (configuration) {
@@ -3963,6 +4186,59 @@ var TimedAccessApiAxiosParamCreator = function (configuration) {
3963
4186
  });
3964
4187
  });
3965
4188
  },
4189
+ /**
4190
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4191
+ * @summary An org\'s expired timed access grant history
4192
+ * @param {string} orgId
4193
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4194
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4195
+ * @param {*} [options] Override http request option.
4196
+ * @throws {RequiredError}
4197
+ */
4198
+ listExpiredTimedAccessGrantsForOrg: function (orgId_1, limit_1, cursor_1) {
4199
+ var args_1 = [];
4200
+ for (var _i = 3; _i < arguments.length; _i++) {
4201
+ args_1[_i - 3] = arguments[_i];
4202
+ }
4203
+ return __awaiter(_this, __spreadArray([orgId_1, limit_1, cursor_1], args_1, true), void 0, function (orgId, limit, cursor, options) {
4204
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
4205
+ if (options === void 0) { options = {}; }
4206
+ return __generator(this, function (_a) {
4207
+ switch (_a.label) {
4208
+ case 0:
4209
+ // verify required parameter 'orgId' is not null or undefined
4210
+ (0, common_1.assertParamExists)('listExpiredTimedAccessGrantsForOrg', 'orgId', orgId);
4211
+ localVarPath = "/orgs/{orgId}/timedAccess/grants/expired"
4212
+ .replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)));
4213
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
4214
+ if (configuration) {
4215
+ baseOptions = configuration.baseOptions;
4216
+ }
4217
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
4218
+ localVarHeaderParameter = {};
4219
+ localVarQueryParameter = {};
4220
+ // authentication ApiKeyAuth required
4221
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
4222
+ case 1:
4223
+ // authentication ApiKeyAuth required
4224
+ _a.sent();
4225
+ if (limit !== undefined) {
4226
+ localVarQueryParameter['limit'] = limit;
4227
+ }
4228
+ if (cursor !== undefined) {
4229
+ localVarQueryParameter['cursor'] = cursor;
4230
+ }
4231
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4232
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4233
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4234
+ return [2 /*return*/, {
4235
+ url: (0, common_1.toPathString)(localVarUrlObj),
4236
+ options: localVarRequestOptions,
4237
+ }];
4238
+ }
4239
+ });
4240
+ });
4241
+ },
3966
4242
  /**
3967
4243
  * Returns the authenticated caller\'s active pass for the requested org.
3968
4244
  * @summary List the caller\'s active timed access pass for an org
@@ -3984,7 +4260,7 @@ var TimedAccessApiAxiosParamCreator = function (configuration) {
3984
4260
  case 0:
3985
4261
  // verify required parameter 'orgId' is not null or undefined
3986
4262
  (0, common_1.assertParamExists)('listMyTimedAccessGrants', 'orgId', orgId);
3987
- localVarPath = "/timedAccess/orgs/{orgId}/grants"
4263
+ localVarPath = "/orgs/{orgId}/timedAccess/grants"
3988
4264
  .replace("{".concat("orgId", "}"), encodeURIComponent(String(orgId)));
3989
4265
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3990
4266
  if (configuration) {
@@ -4046,6 +4322,31 @@ var TimedAccessApiFp = function (configuration) {
4046
4322
  });
4047
4323
  });
4048
4324
  },
4325
+ /**
4326
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4327
+ * @summary An org\'s expired timed access grant history
4328
+ * @param {string} orgId
4329
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4330
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4331
+ * @param {*} [options] Override http request option.
4332
+ * @throws {RequiredError}
4333
+ */
4334
+ listExpiredTimedAccessGrantsForOrg: function (orgId, limit, cursor, options) {
4335
+ return __awaiter(this, void 0, void 0, function () {
4336
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
4337
+ var _a, _b, _c;
4338
+ return __generator(this, function (_d) {
4339
+ switch (_d.label) {
4340
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listExpiredTimedAccessGrantsForOrg(orgId, limit, cursor, options)];
4341
+ case 1:
4342
+ localVarAxiosArgs = _d.sent();
4343
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4344
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TimedAccessApi.listExpiredTimedAccessGrantsForOrg']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4345
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
4346
+ }
4347
+ });
4348
+ });
4349
+ },
4049
4350
  /**
4050
4351
  * Returns the authenticated caller\'s active pass for the requested org.
4051
4352
  * @summary List the caller\'s active timed access pass for an org
@@ -4091,6 +4392,18 @@ var TimedAccessApiFactory = function (configuration, basePath, axios) {
4091
4392
  createTimedAccessGrant: function (orgId, timedAccessGrantRequestBody, options) {
4092
4393
  return localVarFp.createTimedAccessGrant(orgId, timedAccessGrantRequestBody, options).then(function (request) { return request(axios, basePath); });
4093
4394
  },
4395
+ /**
4396
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4397
+ * @summary An org\'s expired timed access grant history
4398
+ * @param {string} orgId
4399
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4400
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4401
+ * @param {*} [options] Override http request option.
4402
+ * @throws {RequiredError}
4403
+ */
4404
+ listExpiredTimedAccessGrantsForOrg: function (orgId, limit, cursor, options) {
4405
+ return localVarFp.listExpiredTimedAccessGrantsForOrg(orgId, limit, cursor, options).then(function (request) { return request(axios, basePath); });
4406
+ },
4094
4407
  /**
4095
4408
  * Returns the authenticated caller\'s active pass for the requested org.
4096
4409
  * @summary List the caller\'s active timed access pass for an org
@@ -4129,6 +4442,20 @@ var TimedAccessApi = /** @class */ (function (_super) {
4129
4442
  var _this = this;
4130
4443
  return (0, exports.TimedAccessApiFp)(this.configuration).createTimedAccessGrant(orgId, timedAccessGrantRequestBody, options).then(function (request) { return request(_this.axios, _this.basePath); });
4131
4444
  };
4445
+ /**
4446
+ * Returns the org’s expired timed access passes, most recent first. Intended for client-facing visibility into Flipdish staff access to their org, not for the staff member themselves.
4447
+ * @summary An org\'s expired timed access grant history
4448
+ * @param {string} orgId
4449
+ * @param {number} [limit] Page size, defaults to a server-chosen value
4450
+ * @param {string} [cursor] Opaque pagination cursor returned as nextCursor on a previous page
4451
+ * @param {*} [options] Override http request option.
4452
+ * @throws {RequiredError}
4453
+ * @memberof TimedAccessApi
4454
+ */
4455
+ TimedAccessApi.prototype.listExpiredTimedAccessGrantsForOrg = function (orgId, limit, cursor, options) {
4456
+ var _this = this;
4457
+ return (0, exports.TimedAccessApiFp)(this.configuration).listExpiredTimedAccessGrantsForOrg(orgId, limit, cursor, options).then(function (request) { return request(_this.axios, _this.basePath); });
4458
+ };
4132
4459
  /**
4133
4460
  * Returns the authenticated caller\'s active pass for the requested org.
4134
4461
  * @summary List the caller\'s active timed access pass for an org
@@ -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.54"
39
+ "user-agent": "Flipdish authorization typescript SDK / 0.2.55"
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.54",
3
+ "version": "0.2.55",
4
4
  "description": "OpenAPI client for @flipdish/authorization",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {