@flipdish/authorization 0.2.45-rc.1786458545 → 0.2.47-rc.1786464525

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
@@ -584,6 +584,68 @@ export interface AuthorizationResponse {
584
584
  */
585
585
  'policyIds': Array<string>;
586
586
  }
587
+ /**
588
+ *
589
+ * @export
590
+ * @interface CreateGlobalApiKeyRequest
591
+ */
592
+ export interface CreateGlobalApiKeyRequest {
593
+ /**
594
+ *
595
+ * @type {string}
596
+ * @memberof CreateGlobalApiKeyRequest
597
+ */
598
+ 'name': string;
599
+ /**
600
+ *
601
+ * @type {Array<string>}
602
+ * @memberof CreateGlobalApiKeyRequest
603
+ */
604
+ 'permissions': Array<string>;
605
+ /**
606
+ *
607
+ * @type {Array<AuthorizationRequestResource>}
608
+ * @memberof CreateGlobalApiKeyRequest
609
+ */
610
+ 'resources'?: Array<AuthorizationRequestResource>;
611
+ /**
612
+ *
613
+ * @type {boolean}
614
+ * @memberof CreateGlobalApiKeyRequest
615
+ */
616
+ 'global'?: boolean;
617
+ /**
618
+ *
619
+ * @type {string}
620
+ * @memberof CreateGlobalApiKeyRequest
621
+ */
622
+ 'expiresAt'?: string;
623
+ /**
624
+ *
625
+ * @type {string}
626
+ * @memberof CreateGlobalApiKeyRequest
627
+ */
628
+ 'orgId'?: string;
629
+ }
630
+ /**
631
+ *
632
+ * @export
633
+ * @interface CreateGlobalApiKeyResponse
634
+ */
635
+ export interface CreateGlobalApiKeyResponse {
636
+ /**
637
+ * Raw API key secret — returned only once at creation
638
+ * @type {string}
639
+ * @memberof CreateGlobalApiKeyResponse
640
+ */
641
+ 'apiKey': string;
642
+ /**
643
+ *
644
+ * @type {GlobalApiKeyStateResponse}
645
+ * @memberof CreateGlobalApiKeyResponse
646
+ */
647
+ 'state': GlobalApiKeyStateResponse;
648
+ }
587
649
  /**
588
650
  *
589
651
  * @export
@@ -983,6 +1045,285 @@ export type GetUserPermissionsSuccessResponseResourcesValueResourceTypeEnum = ty
983
1045
  */
984
1046
  export interface GetUserPermissionsSuccessResponseResourcesValueResourceId {
985
1047
  }
1048
+ /**
1049
+ *
1050
+ * @export
1051
+ * @interface GlobalApiKeyStateResponse
1052
+ */
1053
+ export interface GlobalApiKeyStateResponse {
1054
+ /**
1055
+ *
1056
+ * @type {string}
1057
+ * @memberof GlobalApiKeyStateResponse
1058
+ */
1059
+ 'principalId': string;
1060
+ /**
1061
+ *
1062
+ * @type {string}
1063
+ * @memberof GlobalApiKeyStateResponse
1064
+ */
1065
+ 'name'?: string;
1066
+ /**
1067
+ *
1068
+ * @type {string}
1069
+ * @memberof GlobalApiKeyStateResponse
1070
+ */
1071
+ 'status': GlobalApiKeyStateResponseStatusEnum;
1072
+ /**
1073
+ *
1074
+ * @type {string}
1075
+ * @memberof GlobalApiKeyStateResponse
1076
+ */
1077
+ 'expiresAt'?: string;
1078
+ /**
1079
+ *
1080
+ * @type {string}
1081
+ * @memberof GlobalApiKeyStateResponse
1082
+ */
1083
+ 'orgId'?: string;
1084
+ /**
1085
+ *
1086
+ * @type {string}
1087
+ * @memberof GlobalApiKeyStateResponse
1088
+ */
1089
+ 'createdByEmail': string;
1090
+ /**
1091
+ *
1092
+ * @type {Array<string>}
1093
+ * @memberof GlobalApiKeyStateResponse
1094
+ */
1095
+ 'permissions': Array<string>;
1096
+ /**
1097
+ *
1098
+ * @type {Array<AuthorizationRequestResource>}
1099
+ * @memberof GlobalApiKeyStateResponse
1100
+ */
1101
+ 'resources'?: Array<AuthorizationRequestResource>;
1102
+ /**
1103
+ * When true, the key is authorized for all resources (unbound Cedar resource)
1104
+ * @type {boolean}
1105
+ * @memberof GlobalApiKeyStateResponse
1106
+ */
1107
+ 'global': boolean;
1108
+ /**
1109
+ *
1110
+ * @type {string}
1111
+ * @memberof GlobalApiKeyStateResponse
1112
+ */
1113
+ 'avpPolicyId': string;
1114
+ /**
1115
+ *
1116
+ * @type {string}
1117
+ * @memberof GlobalApiKeyStateResponse
1118
+ */
1119
+ 'createdAt': string;
1120
+ /**
1121
+ *
1122
+ * @type {string}
1123
+ * @memberof GlobalApiKeyStateResponse
1124
+ */
1125
+ 'updatedAt': string;
1126
+ /**
1127
+ * ISO-8601 timestamp of the most recent successful authentication with this key
1128
+ * @type {string}
1129
+ * @memberof GlobalApiKeyStateResponse
1130
+ */
1131
+ 'lastUsedAt'?: string;
1132
+ }
1133
+
1134
+ export const GlobalApiKeyStateResponseStatusEnum = {
1135
+ Active: 'active',
1136
+ Revoked: 'revoked'
1137
+ } as const;
1138
+
1139
+ export type GlobalApiKeyStateResponseStatusEnum = typeof GlobalApiKeyStateResponseStatusEnum[keyof typeof GlobalApiKeyStateResponseStatusEnum];
1140
+
1141
+ /**
1142
+ *
1143
+ * @export
1144
+ * @interface GlobalApiKeyStateResponseRevoked
1145
+ */
1146
+ export interface GlobalApiKeyStateResponseRevoked {
1147
+ /**
1148
+ *
1149
+ * @type {string}
1150
+ * @memberof GlobalApiKeyStateResponseRevoked
1151
+ */
1152
+ 'principalId': string;
1153
+ /**
1154
+ *
1155
+ * @type {string}
1156
+ * @memberof GlobalApiKeyStateResponseRevoked
1157
+ */
1158
+ 'name'?: string;
1159
+ /**
1160
+ *
1161
+ * @type {string}
1162
+ * @memberof GlobalApiKeyStateResponseRevoked
1163
+ */
1164
+ 'status': GlobalApiKeyStateResponseRevokedStatusEnum;
1165
+ /**
1166
+ *
1167
+ * @type {string}
1168
+ * @memberof GlobalApiKeyStateResponseRevoked
1169
+ */
1170
+ 'expiresAt'?: string;
1171
+ /**
1172
+ *
1173
+ * @type {string}
1174
+ * @memberof GlobalApiKeyStateResponseRevoked
1175
+ */
1176
+ 'orgId'?: string;
1177
+ /**
1178
+ *
1179
+ * @type {string}
1180
+ * @memberof GlobalApiKeyStateResponseRevoked
1181
+ */
1182
+ 'createdByEmail': string;
1183
+ /**
1184
+ *
1185
+ * @type {Array<string>}
1186
+ * @memberof GlobalApiKeyStateResponseRevoked
1187
+ */
1188
+ 'permissions': Array<string>;
1189
+ /**
1190
+ *
1191
+ * @type {Array<AuthorizationRequestResource>}
1192
+ * @memberof GlobalApiKeyStateResponseRevoked
1193
+ */
1194
+ 'resources'?: Array<AuthorizationRequestResource>;
1195
+ /**
1196
+ * When true, the key is authorized for all resources (unbound Cedar resource)
1197
+ * @type {boolean}
1198
+ * @memberof GlobalApiKeyStateResponseRevoked
1199
+ */
1200
+ 'global': boolean;
1201
+ /**
1202
+ *
1203
+ * @type {string}
1204
+ * @memberof GlobalApiKeyStateResponseRevoked
1205
+ */
1206
+ 'avpPolicyId': string;
1207
+ /**
1208
+ *
1209
+ * @type {string}
1210
+ * @memberof GlobalApiKeyStateResponseRevoked
1211
+ */
1212
+ 'createdAt': string;
1213
+ /**
1214
+ *
1215
+ * @type {string}
1216
+ * @memberof GlobalApiKeyStateResponseRevoked
1217
+ */
1218
+ 'updatedAt': string;
1219
+ /**
1220
+ * ISO-8601 timestamp of the most recent successful authentication with this key
1221
+ * @type {string}
1222
+ * @memberof GlobalApiKeyStateResponseRevoked
1223
+ */
1224
+ 'lastUsedAt'?: string;
1225
+ }
1226
+
1227
+ export const GlobalApiKeyStateResponseRevokedStatusEnum = {
1228
+ Active: 'active',
1229
+ Revoked: 'revoked'
1230
+ } as const;
1231
+
1232
+ export type GlobalApiKeyStateResponseRevokedStatusEnum = typeof GlobalApiKeyStateResponseRevokedStatusEnum[keyof typeof GlobalApiKeyStateResponseRevokedStatusEnum];
1233
+
1234
+ /**
1235
+ *
1236
+ * @export
1237
+ * @interface GlobalApiKeyStateResponseUpdated
1238
+ */
1239
+ export interface GlobalApiKeyStateResponseUpdated {
1240
+ /**
1241
+ *
1242
+ * @type {string}
1243
+ * @memberof GlobalApiKeyStateResponseUpdated
1244
+ */
1245
+ 'principalId': string;
1246
+ /**
1247
+ *
1248
+ * @type {string}
1249
+ * @memberof GlobalApiKeyStateResponseUpdated
1250
+ */
1251
+ 'name'?: string;
1252
+ /**
1253
+ *
1254
+ * @type {string}
1255
+ * @memberof GlobalApiKeyStateResponseUpdated
1256
+ */
1257
+ 'status': GlobalApiKeyStateResponseUpdatedStatusEnum;
1258
+ /**
1259
+ *
1260
+ * @type {string}
1261
+ * @memberof GlobalApiKeyStateResponseUpdated
1262
+ */
1263
+ 'expiresAt'?: string;
1264
+ /**
1265
+ *
1266
+ * @type {string}
1267
+ * @memberof GlobalApiKeyStateResponseUpdated
1268
+ */
1269
+ 'orgId'?: string;
1270
+ /**
1271
+ *
1272
+ * @type {string}
1273
+ * @memberof GlobalApiKeyStateResponseUpdated
1274
+ */
1275
+ 'createdByEmail': string;
1276
+ /**
1277
+ *
1278
+ * @type {Array<string>}
1279
+ * @memberof GlobalApiKeyStateResponseUpdated
1280
+ */
1281
+ 'permissions': Array<string>;
1282
+ /**
1283
+ *
1284
+ * @type {Array<AuthorizationRequestResource>}
1285
+ * @memberof GlobalApiKeyStateResponseUpdated
1286
+ */
1287
+ 'resources'?: Array<AuthorizationRequestResource>;
1288
+ /**
1289
+ * When true, the key is authorized for all resources (unbound Cedar resource)
1290
+ * @type {boolean}
1291
+ * @memberof GlobalApiKeyStateResponseUpdated
1292
+ */
1293
+ 'global': boolean;
1294
+ /**
1295
+ *
1296
+ * @type {string}
1297
+ * @memberof GlobalApiKeyStateResponseUpdated
1298
+ */
1299
+ 'avpPolicyId': string;
1300
+ /**
1301
+ *
1302
+ * @type {string}
1303
+ * @memberof GlobalApiKeyStateResponseUpdated
1304
+ */
1305
+ 'createdAt': string;
1306
+ /**
1307
+ *
1308
+ * @type {string}
1309
+ * @memberof GlobalApiKeyStateResponseUpdated
1310
+ */
1311
+ 'updatedAt': string;
1312
+ /**
1313
+ * ISO-8601 timestamp of the most recent successful authentication with this key
1314
+ * @type {string}
1315
+ * @memberof GlobalApiKeyStateResponseUpdated
1316
+ */
1317
+ 'lastUsedAt'?: string;
1318
+ }
1319
+
1320
+ export const GlobalApiKeyStateResponseUpdatedStatusEnum = {
1321
+ Active: 'active',
1322
+ Revoked: 'revoked'
1323
+ } as const;
1324
+
1325
+ export type GlobalApiKeyStateResponseUpdatedStatusEnum = typeof GlobalApiKeyStateResponseUpdatedStatusEnum[keyof typeof GlobalApiKeyStateResponseUpdatedStatusEnum];
1326
+
986
1327
  /**
987
1328
  *
988
1329
  * @export
@@ -1318,6 +1659,7 @@ export const Permissions = {
1318
1659
  UpdateDeliveryZones: 'UpdateDeliveryZones',
1319
1660
  DeleteDeliveryZones: 'DeleteDeliveryZones',
1320
1661
  ViewMenu: 'ViewMenu',
1662
+ CreateGlobalApiKey: 'CreateGlobalAPIKey',
1321
1663
  CreateMenu: 'CreateMenu',
1322
1664
  UpdateMenu: 'UpdateMenu',
1323
1665
  DeleteMenu: 'DeleteMenu',
@@ -1481,6 +1823,7 @@ export const Permissions = {
1481
1823
  ViewEntityFeatureFlags: 'ViewEntityFeatureFlags',
1482
1824
  EditEntityFeatureFlags: 'EditEntityFeatureFlags',
1483
1825
  CreateOrg: 'CreateOrg',
1826
+ CreateOrgApiKey: 'CreateOrgAPIKey',
1484
1827
  EditOrg: 'EditOrg',
1485
1828
  ViewOrg: 'ViewOrg',
1486
1829
  ViewWebhooks: 'ViewWebhooks',
@@ -1978,6 +2321,43 @@ export const RoleNames = {
1978
2321
  export type RoleNames = typeof RoleNames[keyof typeof RoleNames];
1979
2322
 
1980
2323
 
2324
+ /**
2325
+ *
2326
+ * @export
2327
+ * @interface UpdateGlobalApiKeyRequest
2328
+ */
2329
+ export interface UpdateGlobalApiKeyRequest {
2330
+ /**
2331
+ *
2332
+ * @type {string}
2333
+ * @memberof UpdateGlobalApiKeyRequest
2334
+ */
2335
+ 'name'?: string;
2336
+ /**
2337
+ *
2338
+ * @type {Array<string>}
2339
+ * @memberof UpdateGlobalApiKeyRequest
2340
+ */
2341
+ 'permissions'?: Array<string>;
2342
+ /**
2343
+ *
2344
+ * @type {Array<AuthorizationRequestResource>}
2345
+ * @memberof UpdateGlobalApiKeyRequest
2346
+ */
2347
+ 'resources'?: Array<AuthorizationRequestResource>;
2348
+ /**
2349
+ *
2350
+ * @type {boolean}
2351
+ * @memberof UpdateGlobalApiKeyRequest
2352
+ */
2353
+ 'global'?: boolean;
2354
+ /**
2355
+ *
2356
+ * @type {string}
2357
+ * @memberof UpdateGlobalApiKeyRequest
2358
+ */
2359
+ 'expiresAt'?: string;
2360
+ }
1981
2361
  /**
1982
2362
  *
1983
2363
  * @export
@@ -2005,6 +2385,333 @@ export interface ValidationErrorsInner {
2005
2385
  export interface ValidationErrorsInnerPathInner {
2006
2386
  }
2007
2387
 
2388
+ /**
2389
+ * APIKeysApi - axios parameter creator
2390
+ * @export
2391
+ */
2392
+ export const APIKeysApiAxiosParamCreator = function (configuration?: Configuration) {
2393
+ return {
2394
+ /**
2395
+ * Create an Automation API key (optional org association). Requires CreateGlobalAPIKey. Raw secret is returned once.
2396
+ * @summary Create global API key
2397
+ * @param {CreateGlobalApiKeyRequest} [createGlobalApiKeyRequest]
2398
+ * @param {*} [options] Override http request option.
2399
+ * @throws {RequiredError}
2400
+ */
2401
+ createGlobalApiKey: async (createGlobalApiKeyRequest?: CreateGlobalApiKeyRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2402
+ const localVarPath = `/apiKeys`;
2403
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2404
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2405
+ let baseOptions;
2406
+ if (configuration) {
2407
+ baseOptions = configuration.baseOptions;
2408
+ }
2409
+
2410
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2411
+ const localVarHeaderParameter = {} as any;
2412
+ const localVarQueryParameter = {} as any;
2413
+
2414
+ // authentication ApiKeyAuth required
2415
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2416
+
2417
+
2418
+
2419
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2420
+
2421
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2422
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2423
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2424
+ localVarRequestOptions.data = serializeDataIfNeeded(createGlobalApiKeyRequest, localVarRequestOptions, configuration)
2425
+
2426
+ return {
2427
+ url: toPathString(localVarUrlObj),
2428
+ options: localVarRequestOptions,
2429
+ };
2430
+ },
2431
+ /**
2432
+ * Self-introspection for the authenticated Automation API key (x-api-key). Returns non-secret fields only.
2433
+ * @summary Get current API key state
2434
+ * @param {*} [options] Override http request option.
2435
+ * @throws {RequiredError}
2436
+ */
2437
+ getGlobalApiKeyMe: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2438
+ const localVarPath = `/apiKeys/me`;
2439
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2440
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2441
+ let baseOptions;
2442
+ if (configuration) {
2443
+ baseOptions = configuration.baseOptions;
2444
+ }
2445
+
2446
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2447
+ const localVarHeaderParameter = {} as any;
2448
+ const localVarQueryParameter = {} as any;
2449
+
2450
+ // authentication ApiKeyAuth required
2451
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2452
+
2453
+
2454
+
2455
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2456
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2457
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2458
+
2459
+ return {
2460
+ url: toPathString(localVarUrlObj),
2461
+ options: localVarRequestOptions,
2462
+ };
2463
+ },
2464
+ /**
2465
+ * Delete the STATIC AVP policy and mark the API key revoked.
2466
+ * @summary Revoke global API key
2467
+ * @param {string} apiKeyId
2468
+ * @param {*} [options] Override http request option.
2469
+ * @throws {RequiredError}
2470
+ */
2471
+ revokeGlobalApiKey: async (apiKeyId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2472
+ // verify required parameter 'apiKeyId' is not null or undefined
2473
+ assertParamExists('revokeGlobalApiKey', 'apiKeyId', apiKeyId)
2474
+ const localVarPath = `/apiKeys/{apiKeyId}/revoke`
2475
+ .replace(`{${"apiKeyId"}}`, encodeURIComponent(String(apiKeyId)));
2476
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2477
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2478
+ let baseOptions;
2479
+ if (configuration) {
2480
+ baseOptions = configuration.baseOptions;
2481
+ }
2482
+
2483
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2484
+ const localVarHeaderParameter = {} as any;
2485
+ const localVarQueryParameter = {} as any;
2486
+
2487
+ // authentication ApiKeyAuth required
2488
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2489
+
2490
+
2491
+
2492
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2493
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2494
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2495
+
2496
+ return {
2497
+ url: toPathString(localVarUrlObj),
2498
+ options: localVarRequestOptions,
2499
+ };
2500
+ },
2501
+ /**
2502
+ * Update permissions, resources, and/or expiry for any Automation API key. Rotates the STATIC AVP policy.
2503
+ * @summary Update global API key
2504
+ * @param {string} apiKeyId
2505
+ * @param {UpdateGlobalApiKeyRequest} [updateGlobalApiKeyRequest]
2506
+ * @param {*} [options] Override http request option.
2507
+ * @throws {RequiredError}
2508
+ */
2509
+ updateGlobalApiKey: async (apiKeyId: string, updateGlobalApiKeyRequest?: UpdateGlobalApiKeyRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2510
+ // verify required parameter 'apiKeyId' is not null or undefined
2511
+ assertParamExists('updateGlobalApiKey', 'apiKeyId', apiKeyId)
2512
+ const localVarPath = `/apiKeys/{apiKeyId}`
2513
+ .replace(`{${"apiKeyId"}}`, encodeURIComponent(String(apiKeyId)));
2514
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2515
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2516
+ let baseOptions;
2517
+ if (configuration) {
2518
+ baseOptions = configuration.baseOptions;
2519
+ }
2520
+
2521
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2522
+ const localVarHeaderParameter = {} as any;
2523
+ const localVarQueryParameter = {} as any;
2524
+
2525
+ // authentication ApiKeyAuth required
2526
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2527
+
2528
+
2529
+
2530
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2531
+
2532
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2533
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2534
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2535
+ localVarRequestOptions.data = serializeDataIfNeeded(updateGlobalApiKeyRequest, localVarRequestOptions, configuration)
2536
+
2537
+ return {
2538
+ url: toPathString(localVarUrlObj),
2539
+ options: localVarRequestOptions,
2540
+ };
2541
+ },
2542
+ }
2543
+ };
2544
+
2545
+ /**
2546
+ * APIKeysApi - functional programming interface
2547
+ * @export
2548
+ */
2549
+ export const APIKeysApiFp = function(configuration?: Configuration) {
2550
+ const localVarAxiosParamCreator = APIKeysApiAxiosParamCreator(configuration)
2551
+ return {
2552
+ /**
2553
+ * Create an Automation API key (optional org association). Requires CreateGlobalAPIKey. Raw secret is returned once.
2554
+ * @summary Create global API key
2555
+ * @param {CreateGlobalApiKeyRequest} [createGlobalApiKeyRequest]
2556
+ * @param {*} [options] Override http request option.
2557
+ * @throws {RequiredError}
2558
+ */
2559
+ async createGlobalApiKey(createGlobalApiKeyRequest?: CreateGlobalApiKeyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateGlobalApiKeyResponse>> {
2560
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createGlobalApiKey(createGlobalApiKeyRequest, options);
2561
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2562
+ const localVarOperationServerBasePath = operationServerMap['APIKeysApi.createGlobalApiKey']?.[localVarOperationServerIndex]?.url;
2563
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2564
+ },
2565
+ /**
2566
+ * Self-introspection for the authenticated Automation API key (x-api-key). Returns non-secret fields only.
2567
+ * @summary Get current API key state
2568
+ * @param {*} [options] Override http request option.
2569
+ * @throws {RequiredError}
2570
+ */
2571
+ async getGlobalApiKeyMe(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GlobalApiKeyStateResponse>> {
2572
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getGlobalApiKeyMe(options);
2573
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2574
+ const localVarOperationServerBasePath = operationServerMap['APIKeysApi.getGlobalApiKeyMe']?.[localVarOperationServerIndex]?.url;
2575
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2576
+ },
2577
+ /**
2578
+ * Delete the STATIC AVP policy and mark the API key revoked.
2579
+ * @summary Revoke global API key
2580
+ * @param {string} apiKeyId
2581
+ * @param {*} [options] Override http request option.
2582
+ * @throws {RequiredError}
2583
+ */
2584
+ async revokeGlobalApiKey(apiKeyId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GlobalApiKeyStateResponseRevoked>> {
2585
+ const localVarAxiosArgs = await localVarAxiosParamCreator.revokeGlobalApiKey(apiKeyId, options);
2586
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2587
+ const localVarOperationServerBasePath = operationServerMap['APIKeysApi.revokeGlobalApiKey']?.[localVarOperationServerIndex]?.url;
2588
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2589
+ },
2590
+ /**
2591
+ * Update permissions, resources, and/or expiry for any Automation API key. Rotates the STATIC AVP policy.
2592
+ * @summary Update global API key
2593
+ * @param {string} apiKeyId
2594
+ * @param {UpdateGlobalApiKeyRequest} [updateGlobalApiKeyRequest]
2595
+ * @param {*} [options] Override http request option.
2596
+ * @throws {RequiredError}
2597
+ */
2598
+ async updateGlobalApiKey(apiKeyId: string, updateGlobalApiKeyRequest?: UpdateGlobalApiKeyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GlobalApiKeyStateResponseUpdated>> {
2599
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateGlobalApiKey(apiKeyId, updateGlobalApiKeyRequest, options);
2600
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2601
+ const localVarOperationServerBasePath = operationServerMap['APIKeysApi.updateGlobalApiKey']?.[localVarOperationServerIndex]?.url;
2602
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2603
+ },
2604
+ }
2605
+ };
2606
+
2607
+ /**
2608
+ * APIKeysApi - factory interface
2609
+ * @export
2610
+ */
2611
+ export const APIKeysApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2612
+ const localVarFp = APIKeysApiFp(configuration)
2613
+ return {
2614
+ /**
2615
+ * Create an Automation API key (optional org association). Requires CreateGlobalAPIKey. Raw secret is returned once.
2616
+ * @summary Create global API key
2617
+ * @param {CreateGlobalApiKeyRequest} [createGlobalApiKeyRequest]
2618
+ * @param {*} [options] Override http request option.
2619
+ * @throws {RequiredError}
2620
+ */
2621
+ createGlobalApiKey(createGlobalApiKeyRequest?: CreateGlobalApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateGlobalApiKeyResponse> {
2622
+ return localVarFp.createGlobalApiKey(createGlobalApiKeyRequest, options).then((request) => request(axios, basePath));
2623
+ },
2624
+ /**
2625
+ * Self-introspection for the authenticated Automation API key (x-api-key). Returns non-secret fields only.
2626
+ * @summary Get current API key state
2627
+ * @param {*} [options] Override http request option.
2628
+ * @throws {RequiredError}
2629
+ */
2630
+ getGlobalApiKeyMe(options?: RawAxiosRequestConfig): AxiosPromise<GlobalApiKeyStateResponse> {
2631
+ return localVarFp.getGlobalApiKeyMe(options).then((request) => request(axios, basePath));
2632
+ },
2633
+ /**
2634
+ * Delete the STATIC AVP policy and mark the API key revoked.
2635
+ * @summary Revoke global API key
2636
+ * @param {string} apiKeyId
2637
+ * @param {*} [options] Override http request option.
2638
+ * @throws {RequiredError}
2639
+ */
2640
+ revokeGlobalApiKey(apiKeyId: string, options?: RawAxiosRequestConfig): AxiosPromise<GlobalApiKeyStateResponseRevoked> {
2641
+ return localVarFp.revokeGlobalApiKey(apiKeyId, options).then((request) => request(axios, basePath));
2642
+ },
2643
+ /**
2644
+ * Update permissions, resources, and/or expiry for any Automation API key. Rotates the STATIC AVP policy.
2645
+ * @summary Update global API key
2646
+ * @param {string} apiKeyId
2647
+ * @param {UpdateGlobalApiKeyRequest} [updateGlobalApiKeyRequest]
2648
+ * @param {*} [options] Override http request option.
2649
+ * @throws {RequiredError}
2650
+ */
2651
+ updateGlobalApiKey(apiKeyId: string, updateGlobalApiKeyRequest?: UpdateGlobalApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<GlobalApiKeyStateResponseUpdated> {
2652
+ return localVarFp.updateGlobalApiKey(apiKeyId, updateGlobalApiKeyRequest, options).then((request) => request(axios, basePath));
2653
+ },
2654
+ };
2655
+ };
2656
+
2657
+ /**
2658
+ * APIKeysApi - object-oriented interface
2659
+ * @export
2660
+ * @class APIKeysApi
2661
+ * @extends {BaseAPI}
2662
+ */
2663
+ export class APIKeysApi extends BaseAPI {
2664
+ /**
2665
+ * Create an Automation API key (optional org association). Requires CreateGlobalAPIKey. Raw secret is returned once.
2666
+ * @summary Create global API key
2667
+ * @param {CreateGlobalApiKeyRequest} [createGlobalApiKeyRequest]
2668
+ * @param {*} [options] Override http request option.
2669
+ * @throws {RequiredError}
2670
+ * @memberof APIKeysApi
2671
+ */
2672
+ public createGlobalApiKey(createGlobalApiKeyRequest?: CreateGlobalApiKeyRequest, options?: RawAxiosRequestConfig) {
2673
+ return APIKeysApiFp(this.configuration).createGlobalApiKey(createGlobalApiKeyRequest, options).then((request) => request(this.axios, this.basePath));
2674
+ }
2675
+
2676
+ /**
2677
+ * Self-introspection for the authenticated Automation API key (x-api-key). Returns non-secret fields only.
2678
+ * @summary Get current API key state
2679
+ * @param {*} [options] Override http request option.
2680
+ * @throws {RequiredError}
2681
+ * @memberof APIKeysApi
2682
+ */
2683
+ public getGlobalApiKeyMe(options?: RawAxiosRequestConfig) {
2684
+ return APIKeysApiFp(this.configuration).getGlobalApiKeyMe(options).then((request) => request(this.axios, this.basePath));
2685
+ }
2686
+
2687
+ /**
2688
+ * Delete the STATIC AVP policy and mark the API key revoked.
2689
+ * @summary Revoke global API key
2690
+ * @param {string} apiKeyId
2691
+ * @param {*} [options] Override http request option.
2692
+ * @throws {RequiredError}
2693
+ * @memberof APIKeysApi
2694
+ */
2695
+ public revokeGlobalApiKey(apiKeyId: string, options?: RawAxiosRequestConfig) {
2696
+ return APIKeysApiFp(this.configuration).revokeGlobalApiKey(apiKeyId, options).then((request) => request(this.axios, this.basePath));
2697
+ }
2698
+
2699
+ /**
2700
+ * Update permissions, resources, and/or expiry for any Automation API key. Rotates the STATIC AVP policy.
2701
+ * @summary Update global API key
2702
+ * @param {string} apiKeyId
2703
+ * @param {UpdateGlobalApiKeyRequest} [updateGlobalApiKeyRequest]
2704
+ * @param {*} [options] Override http request option.
2705
+ * @throws {RequiredError}
2706
+ * @memberof APIKeysApi
2707
+ */
2708
+ public updateGlobalApiKey(apiKeyId: string, updateGlobalApiKeyRequest?: UpdateGlobalApiKeyRequest, options?: RawAxiosRequestConfig) {
2709
+ return APIKeysApiFp(this.configuration).updateGlobalApiKey(apiKeyId, updateGlobalApiKeyRequest, options).then((request) => request(this.axios, this.basePath));
2710
+ }
2711
+ }
2712
+
2713
+
2714
+
2008
2715
  /**
2009
2716
  * AuthenticationApi - axios parameter creator
2010
2717
  * @export