@nexgencloud/hyperstack-sdk-typescript 1.51.2-alpha → 1.52.0-alpha

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
@@ -1794,6 +1794,106 @@ export interface ComplianceResponse {
1794
1794
  */
1795
1795
  'status'?: boolean;
1796
1796
  }
1797
+ /**
1798
+ *
1799
+ * @export
1800
+ * @interface ConsentActionResponse
1801
+ */
1802
+ export interface ConsentActionResponse {
1803
+ /**
1804
+ *
1805
+ * @type {UserConsent}
1806
+ * @memberof ConsentActionResponse
1807
+ */
1808
+ 'consent'?: UserConsent;
1809
+ /**
1810
+ *
1811
+ * @type {string}
1812
+ * @memberof ConsentActionResponse
1813
+ */
1814
+ 'message'?: string;
1815
+ }
1816
+ /**
1817
+ *
1818
+ * @export
1819
+ * @interface ConsentBlock
1820
+ */
1821
+ export interface ConsentBlock {
1822
+ /**
1823
+ * Block text, may contain ${variable} placeholders
1824
+ * @type {string}
1825
+ * @memberof ConsentBlock
1826
+ */
1827
+ 'text'?: string;
1828
+ /**
1829
+ * Block display type
1830
+ * @type {string}
1831
+ * @memberof ConsentBlock
1832
+ */
1833
+ 'type'?: ConsentBlockTypeEnum;
1834
+ }
1835
+
1836
+ export const ConsentBlockTypeEnum = {
1837
+ Text: 'text',
1838
+ Warning: 'warning',
1839
+ Info: 'info',
1840
+ Success: 'success',
1841
+ Failure: 'failure'
1842
+ } as const;
1843
+
1844
+ export type ConsentBlockTypeEnum = typeof ConsentBlockTypeEnum[keyof typeof ConsentBlockTypeEnum];
1845
+
1846
+ /**
1847
+ *
1848
+ * @export
1849
+ * @interface ConsentEventsResponse
1850
+ */
1851
+ export interface ConsentEventsResponse {
1852
+ /**
1853
+ *
1854
+ * @type {UserConsent}
1855
+ * @memberof ConsentEventsResponse
1856
+ */
1857
+ 'consent'?: UserConsent;
1858
+ /**
1859
+ *
1860
+ * @type {Array<UserConsentEvent>}
1861
+ * @memberof ConsentEventsResponse
1862
+ */
1863
+ 'events'?: Array<UserConsentEvent>;
1864
+ }
1865
+ /**
1866
+ *
1867
+ * @export
1868
+ * @interface ConsentTemplate
1869
+ */
1870
+ export interface ConsentTemplate {
1871
+ /**
1872
+ *
1873
+ * @type {Array<ConsentBlock>}
1874
+ * @memberof ConsentTemplate
1875
+ */
1876
+ 'blocks'?: Array<ConsentBlock>;
1877
+ /**
1878
+ * Template version identifier
1879
+ * @type {string}
1880
+ * @memberof ConsentTemplate
1881
+ */
1882
+ 'version'?: string;
1883
+ }
1884
+ /**
1885
+ *
1886
+ * @export
1887
+ * @interface ConsentTemplatesResponse
1888
+ */
1889
+ export interface ConsentTemplatesResponse {
1890
+ /**
1891
+ * Templates keyed by consent type
1892
+ * @type {object}
1893
+ * @memberof ConsentTemplatesResponse
1894
+ */
1895
+ 'templates'?: object;
1896
+ }
1797
1897
  /**
1798
1898
  *
1799
1899
  * @export
@@ -6974,6 +7074,63 @@ export interface RbacRoleFields {
6974
7074
  */
6975
7075
  'policies'?: Array<RolePolicyFields>;
6976
7076
  }
7077
+ /**
7078
+ *
7079
+ * @export
7080
+ * @interface RecordConsentRequest
7081
+ */
7082
+ export interface RecordConsentRequest {
7083
+ /**
7084
+ *
7085
+ * @type {string}
7086
+ * @memberof RecordConsentRequest
7087
+ */
7088
+ 'action': RecordConsentRequestActionEnum;
7089
+ /**
7090
+ *
7091
+ * @type {string}
7092
+ * @memberof RecordConsentRequest
7093
+ */
7094
+ 'consent_method'?: RecordConsentRequestConsentMethodEnum;
7095
+ /**
7096
+ *
7097
+ * @type {string}
7098
+ * @memberof RecordConsentRequest
7099
+ */
7100
+ 'consent_type': RecordConsentRequestConsentTypeEnum;
7101
+ /**
7102
+ * Version identifier. Defaults to the current version for the consent type
7103
+ * @type {string}
7104
+ * @memberof RecordConsentRequest
7105
+ */
7106
+ 'consent_version'?: string;
7107
+ /**
7108
+ * Consent-type-specific metadata
7109
+ * @type {object}
7110
+ * @memberof RecordConsentRequest
7111
+ */
7112
+ 'metadata'?: object;
7113
+ }
7114
+
7115
+ export const RecordConsentRequestActionEnum = {
7116
+ Granted: 'granted',
7117
+ Revoked: 'revoked'
7118
+ } as const;
7119
+
7120
+ export type RecordConsentRequestActionEnum = typeof RecordConsentRequestActionEnum[keyof typeof RecordConsentRequestActionEnum];
7121
+ export const RecordConsentRequestConsentMethodEnum = {
7122
+ WebCheckbox: 'web_checkbox',
7123
+ Api: 'api',
7124
+ AdminOverride: 'admin_override'
7125
+ } as const;
7126
+
7127
+ export type RecordConsentRequestConsentMethodEnum = typeof RecordConsentRequestConsentMethodEnum[keyof typeof RecordConsentRequestConsentMethodEnum];
7128
+ export const RecordConsentRequestConsentTypeEnum = {
7129
+ AutoTopUp: 'auto_top_up'
7130
+ } as const;
7131
+
7132
+ export type RecordConsentRequestConsentTypeEnum = typeof RecordConsentRequestConsentTypeEnum[keyof typeof RecordConsentRequestConsentTypeEnum];
7133
+
6977
7134
  /**
6978
7135
  *
6979
7136
  * @export
@@ -9106,6 +9263,52 @@ export interface UpdateClusterNodeGroupPayload {
9106
9263
  */
9107
9264
  'min_count'?: number;
9108
9265
  }
9266
+ /**
9267
+ *
9268
+ * @export
9269
+ * @interface UpdateConsentRequest
9270
+ */
9271
+ export interface UpdateConsentRequest {
9272
+ /**
9273
+ *
9274
+ * @type {string}
9275
+ * @memberof UpdateConsentRequest
9276
+ */
9277
+ 'action': UpdateConsentRequestActionEnum;
9278
+ /**
9279
+ *
9280
+ * @type {string}
9281
+ * @memberof UpdateConsentRequest
9282
+ */
9283
+ 'consent_method'?: UpdateConsentRequestConsentMethodEnum;
9284
+ /**
9285
+ * Version identifier. Defaults to the current version for the consent type
9286
+ * @type {string}
9287
+ * @memberof UpdateConsentRequest
9288
+ */
9289
+ 'consent_version'?: string;
9290
+ /**
9291
+ * Consent-type-specific metadata
9292
+ * @type {object}
9293
+ * @memberof UpdateConsentRequest
9294
+ */
9295
+ 'metadata'?: object;
9296
+ }
9297
+
9298
+ export const UpdateConsentRequestActionEnum = {
9299
+ Granted: 'granted',
9300
+ Revoked: 'revoked'
9301
+ } as const;
9302
+
9303
+ export type UpdateConsentRequestActionEnum = typeof UpdateConsentRequestActionEnum[keyof typeof UpdateConsentRequestActionEnum];
9304
+ export const UpdateConsentRequestConsentMethodEnum = {
9305
+ WebCheckbox: 'web_checkbox',
9306
+ Api: 'api',
9307
+ AdminOverride: 'admin_override'
9308
+ } as const;
9309
+
9310
+ export type UpdateConsentRequestConsentMethodEnum = typeof UpdateConsentRequestConsentMethodEnum[keyof typeof UpdateConsentRequestConsentMethodEnum];
9311
+
9109
9312
  /**
9110
9313
  *
9111
9314
  * @export
@@ -9271,6 +9474,129 @@ export interface UpdateVolumeResponse {
9271
9474
  */
9272
9475
  'volume'?: VolumeFields;
9273
9476
  }
9477
+ /**
9478
+ *
9479
+ * @export
9480
+ * @interface UserConsent
9481
+ */
9482
+ export interface UserConsent {
9483
+ /**
9484
+ *
9485
+ * @type {string}
9486
+ * @memberof UserConsent
9487
+ */
9488
+ 'action'?: string;
9489
+ /**
9490
+ *
9491
+ * @type {string}
9492
+ * @memberof UserConsent
9493
+ */
9494
+ 'consent_method'?: string;
9495
+ /**
9496
+ *
9497
+ * @type {string}
9498
+ * @memberof UserConsent
9499
+ */
9500
+ 'consent_type'?: string;
9501
+ /**
9502
+ *
9503
+ * @type {string}
9504
+ * @memberof UserConsent
9505
+ */
9506
+ 'created_at'?: string;
9507
+ /**
9508
+ *
9509
+ * @type {number}
9510
+ * @memberof UserConsent
9511
+ */
9512
+ 'id'?: number;
9513
+ /**
9514
+ *
9515
+ * @type {string}
9516
+ * @memberof UserConsent
9517
+ */
9518
+ 'ip_address'?: string;
9519
+ /**
9520
+ *
9521
+ * @type {number}
9522
+ * @memberof UserConsent
9523
+ */
9524
+ 'org_id'?: number;
9525
+ /**
9526
+ *
9527
+ * @type {string}
9528
+ * @memberof UserConsent
9529
+ */
9530
+ 'updated_at'?: string;
9531
+ /**
9532
+ *
9533
+ * @type {number}
9534
+ * @memberof UserConsent
9535
+ */
9536
+ 'user_id'?: number;
9537
+ }
9538
+ /**
9539
+ *
9540
+ * @export
9541
+ * @interface UserConsentEvent
9542
+ */
9543
+ export interface UserConsentEvent {
9544
+ /**
9545
+ *
9546
+ * @type {string}
9547
+ * @memberof UserConsentEvent
9548
+ */
9549
+ 'action'?: string;
9550
+ /**
9551
+ *
9552
+ * @type {number}
9553
+ * @memberof UserConsentEvent
9554
+ */
9555
+ 'consent_id'?: number;
9556
+ /**
9557
+ *
9558
+ * @type {string}
9559
+ * @memberof UserConsentEvent
9560
+ */
9561
+ 'consent_method'?: string;
9562
+ /**
9563
+ *
9564
+ * @type {string}
9565
+ * @memberof UserConsentEvent
9566
+ */
9567
+ 'created_at'?: string;
9568
+ /**
9569
+ *
9570
+ * @type {number}
9571
+ * @memberof UserConsentEvent
9572
+ */
9573
+ 'id'?: number;
9574
+ /**
9575
+ *
9576
+ * @type {string}
9577
+ * @memberof UserConsentEvent
9578
+ */
9579
+ 'ip_address'?: string;
9580
+ /**
9581
+ *
9582
+ * @type {number}
9583
+ * @memberof UserConsentEvent
9584
+ */
9585
+ 'user_id'?: number;
9586
+ }
9587
+ /**
9588
+ *
9589
+ * @export
9590
+ * @interface UserConsentsResponse
9591
+ */
9592
+ export interface UserConsentsResponse {
9593
+ /**
9594
+ *
9595
+ * @type {Array<UserConsent>}
9596
+ * @memberof UserConsentsResponse
9597
+ */
9598
+ 'consents'?: Array<UserConsent>;
9599
+ }
9274
9600
  /**
9275
9601
  *
9276
9602
  * @export
@@ -24873,6 +25199,521 @@ export class UserApi extends BaseAPI {
24873
25199
 
24874
25200
 
24875
25201
 
25202
+ /**
25203
+ * UserConsentApi - axios parameter creator
25204
+ * @export
25205
+ */
25206
+ export const UserConsentApiAxiosParamCreator = function (configuration?: Configuration) {
25207
+ return {
25208
+ /**
25209
+ * Add a new consent given by the User
25210
+ * @summary Add a new User consent
25211
+ * @param {RecordConsentRequest} payload
25212
+ * @param {*} [options] Override http request option.
25213
+ * @throws {RequiredError}
25214
+ */
25215
+ addANewConsentForAUser: async (payload: RecordConsentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
25216
+ // verify required parameter 'payload' is not null or undefined
25217
+ assertParamExists('addANewConsentForAUser', 'payload', payload)
25218
+ const localVarPath = `/auth/user-consent`;
25219
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25220
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25221
+ let baseOptions;
25222
+ if (configuration) {
25223
+ baseOptions = configuration.baseOptions;
25224
+ }
25225
+
25226
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
25227
+ const localVarHeaderParameter = {} as any;
25228
+ const localVarQueryParameter = {} as any;
25229
+
25230
+ // authentication apiKey required
25231
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
25232
+
25233
+
25234
+
25235
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25236
+
25237
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25238
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25239
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25240
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
25241
+
25242
+ return {
25243
+ url: toPathString(localVarUrlObj),
25244
+ options: localVarRequestOptions,
25245
+ };
25246
+ },
25247
+ /**
25248
+ * Returns current consent templates for all consent types
25249
+ * @summary Get all consent templates
25250
+ * @param {*} [options] Override http request option.
25251
+ * @throws {RequiredError}
25252
+ */
25253
+ getAllConsentTemplates: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
25254
+ const localVarPath = `/auth/user-consent/templates`;
25255
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25256
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25257
+ let baseOptions;
25258
+ if (configuration) {
25259
+ baseOptions = configuration.baseOptions;
25260
+ }
25261
+
25262
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
25263
+ const localVarHeaderParameter = {} as any;
25264
+ const localVarQueryParameter = {} as any;
25265
+
25266
+ // authentication apiKey required
25267
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
25268
+
25269
+
25270
+
25271
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25272
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25273
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25274
+
25275
+ return {
25276
+ url: toPathString(localVarUrlObj),
25277
+ options: localVarRequestOptions,
25278
+ };
25279
+ },
25280
+ /**
25281
+ * Fetch all the recorded consents given from a User
25282
+ * @summary Get Consents for a User
25283
+ * @param {string} [consentType] Filter by consent type
25284
+ * @param {*} [options] Override http request option.
25285
+ * @throws {RequiredError}
25286
+ */
25287
+ getAllConsentsForAUser: async (consentType?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
25288
+ const localVarPath = `/auth/user-consent`;
25289
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25290
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25291
+ let baseOptions;
25292
+ if (configuration) {
25293
+ baseOptions = configuration.baseOptions;
25294
+ }
25295
+
25296
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
25297
+ const localVarHeaderParameter = {} as any;
25298
+ const localVarQueryParameter = {} as any;
25299
+
25300
+ // authentication apiKey required
25301
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
25302
+
25303
+ if (consentType !== undefined) {
25304
+ localVarQueryParameter['consent_type'] = consentType;
25305
+ }
25306
+
25307
+
25308
+
25309
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25310
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25311
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25312
+
25313
+ return {
25314
+ url: toPathString(localVarUrlObj),
25315
+ options: localVarRequestOptions,
25316
+ };
25317
+ },
25318
+ /**
25319
+ * Returns the current consent template for a specific consent type
25320
+ * @summary Get consent template for a specific type
25321
+ * @param {string} consentType
25322
+ * @param {*} [options] Override http request option.
25323
+ * @throws {RequiredError}
25324
+ */
25325
+ getConsentTemplateByType: async (consentType: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
25326
+ // verify required parameter 'consentType' is not null or undefined
25327
+ assertParamExists('getConsentTemplateByType', 'consentType', consentType)
25328
+ const localVarPath = `/auth/user-consent/templates/{consent_type}`
25329
+ .replace(`{${"consent_type"}}`, encodeURIComponent(String(consentType)));
25330
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25331
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25332
+ let baseOptions;
25333
+ if (configuration) {
25334
+ baseOptions = configuration.baseOptions;
25335
+ }
25336
+
25337
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
25338
+ const localVarHeaderParameter = {} as any;
25339
+ const localVarQueryParameter = {} as any;
25340
+
25341
+ // authentication apiKey required
25342
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
25343
+
25344
+
25345
+
25346
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25347
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25348
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25349
+
25350
+ return {
25351
+ url: toPathString(localVarUrlObj),
25352
+ options: localVarRequestOptions,
25353
+ };
25354
+ },
25355
+ /**
25356
+ * Revoke or grant a consent to the User
25357
+ * @summary Grant or revoke an existing consent
25358
+ * @param {string} consentType
25359
+ * @param {UpdateConsentRequest} payload
25360
+ * @param {*} [options] Override http request option.
25361
+ * @throws {RequiredError}
25362
+ */
25363
+ updateAConsentActionByType: async (consentType: string, payload: UpdateConsentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
25364
+ // verify required parameter 'consentType' is not null or undefined
25365
+ assertParamExists('updateAConsentActionByType', 'consentType', consentType)
25366
+ // verify required parameter 'payload' is not null or undefined
25367
+ assertParamExists('updateAConsentActionByType', 'payload', payload)
25368
+ const localVarPath = `/auth/user-consent/{consent_type}`
25369
+ .replace(`{${"consent_type"}}`, encodeURIComponent(String(consentType)));
25370
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25371
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25372
+ let baseOptions;
25373
+ if (configuration) {
25374
+ baseOptions = configuration.baseOptions;
25375
+ }
25376
+
25377
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
25378
+ const localVarHeaderParameter = {} as any;
25379
+ const localVarQueryParameter = {} as any;
25380
+
25381
+ // authentication apiKey required
25382
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
25383
+
25384
+
25385
+
25386
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25387
+
25388
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25389
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25390
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25391
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration)
25392
+
25393
+ return {
25394
+ url: toPathString(localVarUrlObj),
25395
+ options: localVarRequestOptions,
25396
+ };
25397
+ },
25398
+ }
25399
+ };
25400
+
25401
+ /**
25402
+ * UserConsentApi - functional programming interface
25403
+ * @export
25404
+ */
25405
+ export const UserConsentApiFp = function(configuration?: Configuration) {
25406
+ const localVarAxiosParamCreator = UserConsentApiAxiosParamCreator(configuration)
25407
+ return {
25408
+ /**
25409
+ * Add a new consent given by the User
25410
+ * @summary Add a new User consent
25411
+ * @param {RecordConsentRequest} payload
25412
+ * @param {*} [options] Override http request option.
25413
+ * @throws {RequiredError}
25414
+ */
25415
+ async addANewConsentForAUser(payload: RecordConsentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConsentActionResponse>> {
25416
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addANewConsentForAUser(payload, options);
25417
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
25418
+ const localVarOperationServerBasePath = operationServerMap['UserConsentApi.addANewConsentForAUser']?.[localVarOperationServerIndex]?.url;
25419
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25420
+ },
25421
+ /**
25422
+ * Returns current consent templates for all consent types
25423
+ * @summary Get all consent templates
25424
+ * @param {*} [options] Override http request option.
25425
+ * @throws {RequiredError}
25426
+ */
25427
+ async getAllConsentTemplates(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConsentTemplatesResponse>> {
25428
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAllConsentTemplates(options);
25429
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
25430
+ const localVarOperationServerBasePath = operationServerMap['UserConsentApi.getAllConsentTemplates']?.[localVarOperationServerIndex]?.url;
25431
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25432
+ },
25433
+ /**
25434
+ * Fetch all the recorded consents given from a User
25435
+ * @summary Get Consents for a User
25436
+ * @param {string} [consentType] Filter by consent type
25437
+ * @param {*} [options] Override http request option.
25438
+ * @throws {RequiredError}
25439
+ */
25440
+ async getAllConsentsForAUser(consentType?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserConsentsResponse>> {
25441
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAllConsentsForAUser(consentType, options);
25442
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
25443
+ const localVarOperationServerBasePath = operationServerMap['UserConsentApi.getAllConsentsForAUser']?.[localVarOperationServerIndex]?.url;
25444
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25445
+ },
25446
+ /**
25447
+ * Returns the current consent template for a specific consent type
25448
+ * @summary Get consent template for a specific type
25449
+ * @param {string} consentType
25450
+ * @param {*} [options] Override http request option.
25451
+ * @throws {RequiredError}
25452
+ */
25453
+ async getConsentTemplateByType(consentType: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConsentTemplate>> {
25454
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConsentTemplateByType(consentType, options);
25455
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
25456
+ const localVarOperationServerBasePath = operationServerMap['UserConsentApi.getConsentTemplateByType']?.[localVarOperationServerIndex]?.url;
25457
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25458
+ },
25459
+ /**
25460
+ * Revoke or grant a consent to the User
25461
+ * @summary Grant or revoke an existing consent
25462
+ * @param {string} consentType
25463
+ * @param {UpdateConsentRequest} payload
25464
+ * @param {*} [options] Override http request option.
25465
+ * @throws {RequiredError}
25466
+ */
25467
+ async updateAConsentActionByType(consentType: string, payload: UpdateConsentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConsentActionResponse>> {
25468
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateAConsentActionByType(consentType, payload, options);
25469
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
25470
+ const localVarOperationServerBasePath = operationServerMap['UserConsentApi.updateAConsentActionByType']?.[localVarOperationServerIndex]?.url;
25471
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25472
+ },
25473
+ }
25474
+ };
25475
+
25476
+ /**
25477
+ * UserConsentApi - factory interface
25478
+ * @export
25479
+ */
25480
+ export const UserConsentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
25481
+ const localVarFp = UserConsentApiFp(configuration)
25482
+ return {
25483
+ /**
25484
+ * Add a new consent given by the User
25485
+ * @summary Add a new User consent
25486
+ * @param {RecordConsentRequest} payload
25487
+ * @param {*} [options] Override http request option.
25488
+ * @throws {RequiredError}
25489
+ */
25490
+ addANewConsentForAUser(payload: RecordConsentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ConsentActionResponse> {
25491
+ return localVarFp.addANewConsentForAUser(payload, options).then((request) => request(axios, basePath));
25492
+ },
25493
+ /**
25494
+ * Returns current consent templates for all consent types
25495
+ * @summary Get all consent templates
25496
+ * @param {*} [options] Override http request option.
25497
+ * @throws {RequiredError}
25498
+ */
25499
+ getAllConsentTemplates(options?: RawAxiosRequestConfig): AxiosPromise<ConsentTemplatesResponse> {
25500
+ return localVarFp.getAllConsentTemplates(options).then((request) => request(axios, basePath));
25501
+ },
25502
+ /**
25503
+ * Fetch all the recorded consents given from a User
25504
+ * @summary Get Consents for a User
25505
+ * @param {string} [consentType] Filter by consent type
25506
+ * @param {*} [options] Override http request option.
25507
+ * @throws {RequiredError}
25508
+ */
25509
+ getAllConsentsForAUser(consentType?: string, options?: RawAxiosRequestConfig): AxiosPromise<UserConsentsResponse> {
25510
+ return localVarFp.getAllConsentsForAUser(consentType, options).then((request) => request(axios, basePath));
25511
+ },
25512
+ /**
25513
+ * Returns the current consent template for a specific consent type
25514
+ * @summary Get consent template for a specific type
25515
+ * @param {string} consentType
25516
+ * @param {*} [options] Override http request option.
25517
+ * @throws {RequiredError}
25518
+ */
25519
+ getConsentTemplateByType(consentType: string, options?: RawAxiosRequestConfig): AxiosPromise<ConsentTemplate> {
25520
+ return localVarFp.getConsentTemplateByType(consentType, options).then((request) => request(axios, basePath));
25521
+ },
25522
+ /**
25523
+ * Revoke or grant a consent to the User
25524
+ * @summary Grant or revoke an existing consent
25525
+ * @param {string} consentType
25526
+ * @param {UpdateConsentRequest} payload
25527
+ * @param {*} [options] Override http request option.
25528
+ * @throws {RequiredError}
25529
+ */
25530
+ updateAConsentActionByType(consentType: string, payload: UpdateConsentRequest, options?: RawAxiosRequestConfig): AxiosPromise<ConsentActionResponse> {
25531
+ return localVarFp.updateAConsentActionByType(consentType, payload, options).then((request) => request(axios, basePath));
25532
+ },
25533
+ };
25534
+ };
25535
+
25536
+ /**
25537
+ * UserConsentApi - object-oriented interface
25538
+ * @export
25539
+ * @class UserConsentApi
25540
+ * @extends {BaseAPI}
25541
+ */
25542
+ export class UserConsentApi extends BaseAPI {
25543
+ /**
25544
+ * Add a new consent given by the User
25545
+ * @summary Add a new User consent
25546
+ * @param {RecordConsentRequest} payload
25547
+ * @param {*} [options] Override http request option.
25548
+ * @throws {RequiredError}
25549
+ * @memberof UserConsentApi
25550
+ */
25551
+ public addANewConsentForAUser(payload: RecordConsentRequest, options?: RawAxiosRequestConfig) {
25552
+ return UserConsentApiFp(this.configuration).addANewConsentForAUser(payload, options).then((request) => request(this.axios, this.basePath));
25553
+ }
25554
+
25555
+ /**
25556
+ * Returns current consent templates for all consent types
25557
+ * @summary Get all consent templates
25558
+ * @param {*} [options] Override http request option.
25559
+ * @throws {RequiredError}
25560
+ * @memberof UserConsentApi
25561
+ */
25562
+ public getAllConsentTemplates(options?: RawAxiosRequestConfig) {
25563
+ return UserConsentApiFp(this.configuration).getAllConsentTemplates(options).then((request) => request(this.axios, this.basePath));
25564
+ }
25565
+
25566
+ /**
25567
+ * Fetch all the recorded consents given from a User
25568
+ * @summary Get Consents for a User
25569
+ * @param {string} [consentType] Filter by consent type
25570
+ * @param {*} [options] Override http request option.
25571
+ * @throws {RequiredError}
25572
+ * @memberof UserConsentApi
25573
+ */
25574
+ public getAllConsentsForAUser(consentType?: string, options?: RawAxiosRequestConfig) {
25575
+ return UserConsentApiFp(this.configuration).getAllConsentsForAUser(consentType, options).then((request) => request(this.axios, this.basePath));
25576
+ }
25577
+
25578
+ /**
25579
+ * Returns the current consent template for a specific consent type
25580
+ * @summary Get consent template for a specific type
25581
+ * @param {string} consentType
25582
+ * @param {*} [options] Override http request option.
25583
+ * @throws {RequiredError}
25584
+ * @memberof UserConsentApi
25585
+ */
25586
+ public getConsentTemplateByType(consentType: string, options?: RawAxiosRequestConfig) {
25587
+ return UserConsentApiFp(this.configuration).getConsentTemplateByType(consentType, options).then((request) => request(this.axios, this.basePath));
25588
+ }
25589
+
25590
+ /**
25591
+ * Revoke or grant a consent to the User
25592
+ * @summary Grant or revoke an existing consent
25593
+ * @param {string} consentType
25594
+ * @param {UpdateConsentRequest} payload
25595
+ * @param {*} [options] Override http request option.
25596
+ * @throws {RequiredError}
25597
+ * @memberof UserConsentApi
25598
+ */
25599
+ public updateAConsentActionByType(consentType: string, payload: UpdateConsentRequest, options?: RawAxiosRequestConfig) {
25600
+ return UserConsentApiFp(this.configuration).updateAConsentActionByType(consentType, payload, options).then((request) => request(this.axios, this.basePath));
25601
+ }
25602
+ }
25603
+
25604
+
25605
+
25606
+ /**
25607
+ * UserConsentEventsApi - axios parameter creator
25608
+ * @export
25609
+ */
25610
+ export const UserConsentEventsApiAxiosParamCreator = function (configuration?: Configuration) {
25611
+ return {
25612
+ /**
25613
+ * Get all consent audit events
25614
+ * @summary Get audit trail for a consent
25615
+ * @param {string} consentType
25616
+ * @param {*} [options] Override http request option.
25617
+ * @throws {RequiredError}
25618
+ */
25619
+ getConsentAuditEvents: async (consentType: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
25620
+ // verify required parameter 'consentType' is not null or undefined
25621
+ assertParamExists('getConsentAuditEvents', 'consentType', consentType)
25622
+ const localVarPath = `/auth/user-consent-events/{consent_type}/events`
25623
+ .replace(`{${"consent_type"}}`, encodeURIComponent(String(consentType)));
25624
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25625
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25626
+ let baseOptions;
25627
+ if (configuration) {
25628
+ baseOptions = configuration.baseOptions;
25629
+ }
25630
+
25631
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
25632
+ const localVarHeaderParameter = {} as any;
25633
+ const localVarQueryParameter = {} as any;
25634
+
25635
+ // authentication apiKey required
25636
+ await setApiKeyToObject(localVarHeaderParameter, "api_key", configuration)
25637
+
25638
+
25639
+
25640
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25641
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25642
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25643
+
25644
+ return {
25645
+ url: toPathString(localVarUrlObj),
25646
+ options: localVarRequestOptions,
25647
+ };
25648
+ },
25649
+ }
25650
+ };
25651
+
25652
+ /**
25653
+ * UserConsentEventsApi - functional programming interface
25654
+ * @export
25655
+ */
25656
+ export const UserConsentEventsApiFp = function(configuration?: Configuration) {
25657
+ const localVarAxiosParamCreator = UserConsentEventsApiAxiosParamCreator(configuration)
25658
+ return {
25659
+ /**
25660
+ * Get all consent audit events
25661
+ * @summary Get audit trail for a consent
25662
+ * @param {string} consentType
25663
+ * @param {*} [options] Override http request option.
25664
+ * @throws {RequiredError}
25665
+ */
25666
+ async getConsentAuditEvents(consentType: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConsentEventsResponse>> {
25667
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getConsentAuditEvents(consentType, options);
25668
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
25669
+ const localVarOperationServerBasePath = operationServerMap['UserConsentEventsApi.getConsentAuditEvents']?.[localVarOperationServerIndex]?.url;
25670
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25671
+ },
25672
+ }
25673
+ };
25674
+
25675
+ /**
25676
+ * UserConsentEventsApi - factory interface
25677
+ * @export
25678
+ */
25679
+ export const UserConsentEventsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
25680
+ const localVarFp = UserConsentEventsApiFp(configuration)
25681
+ return {
25682
+ /**
25683
+ * Get all consent audit events
25684
+ * @summary Get audit trail for a consent
25685
+ * @param {string} consentType
25686
+ * @param {*} [options] Override http request option.
25687
+ * @throws {RequiredError}
25688
+ */
25689
+ getConsentAuditEvents(consentType: string, options?: RawAxiosRequestConfig): AxiosPromise<ConsentEventsResponse> {
25690
+ return localVarFp.getConsentAuditEvents(consentType, options).then((request) => request(axios, basePath));
25691
+ },
25692
+ };
25693
+ };
25694
+
25695
+ /**
25696
+ * UserConsentEventsApi - object-oriented interface
25697
+ * @export
25698
+ * @class UserConsentEventsApi
25699
+ * @extends {BaseAPI}
25700
+ */
25701
+ export class UserConsentEventsApi extends BaseAPI {
25702
+ /**
25703
+ * Get all consent audit events
25704
+ * @summary Get audit trail for a consent
25705
+ * @param {string} consentType
25706
+ * @param {*} [options] Override http request option.
25707
+ * @throws {RequiredError}
25708
+ * @memberof UserConsentEventsApi
25709
+ */
25710
+ public getConsentAuditEvents(consentType: string, options?: RawAxiosRequestConfig) {
25711
+ return UserConsentEventsApiFp(this.configuration).getConsentAuditEvents(consentType, options).then((request) => request(this.axios, this.basePath));
25712
+ }
25713
+ }
25714
+
25715
+
25716
+
24876
25717
  /**
24877
25718
  * UserDetailChoiceApi - axios parameter creator
24878
25719
  * @export