hostinger-api-sdk 1.27.0 → 1.28.0

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/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.28.0
6
+ * API Version: 1.29.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -17255,6 +17255,672 @@ export class ReachSegmentsApi extends BaseAPI {
17255
17255
  return ReachSegmentsApiFp(this.configuration).listSegmentsV1(options).then((request) => request(this.axios, this.basePath));
17256
17256
  }
17257
17257
  }
17258
+ /**
17259
+ * ReachTagsApi - axios parameter creator
17260
+ * @export
17261
+ */
17262
+ export const ReachTagsApiAxiosParamCreator = function (configuration) {
17263
+ return {
17264
+ /**
17265
+ * Assign a tag to a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Assigning a tag the contact already carries succeeds without duplicating it.
17266
+ * @summary Assign a contact to a tag
17267
+ * @param {string} profileUuid Profile uuid parameter
17268
+ * @param {string} tagUuid Tag uuid parameter
17269
+ * @param {string} contactUuid Contact uuid parameter
17270
+ * @param {*} [options] Override http request option.
17271
+ * @throws {RequiredError}
17272
+ */
17273
+ assignAContactToATagV1: (profileUuid_1, tagUuid_1, contactUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, tagUuid_1, contactUuid_1, ...args_1], void 0, function* (profileUuid, tagUuid, contactUuid, options = {}) {
17274
+ // verify required parameter 'profileUuid' is not null or undefined
17275
+ assertParamExists('assignAContactToATagV1', 'profileUuid', profileUuid);
17276
+ // verify required parameter 'tagUuid' is not null or undefined
17277
+ assertParamExists('assignAContactToATagV1', 'tagUuid', tagUuid);
17278
+ // verify required parameter 'contactUuid' is not null or undefined
17279
+ assertParamExists('assignAContactToATagV1', 'contactUuid', contactUuid);
17280
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts/{contactUuid}`
17281
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
17282
+ .replace(`{${"tagUuid"}}`, encodeURIComponent(String(tagUuid)))
17283
+ .replace(`{${"contactUuid"}}`, encodeURIComponent(String(contactUuid)));
17284
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17285
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17286
+ let baseOptions;
17287
+ if (configuration) {
17288
+ baseOptions = configuration.baseOptions;
17289
+ }
17290
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
17291
+ const localVarHeaderParameter = {};
17292
+ const localVarQueryParameter = {};
17293
+ // authentication apiToken required
17294
+ // http bearer authentication required
17295
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17296
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17297
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17298
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17299
+ return {
17300
+ url: toPathString(localVarUrlObj),
17301
+ options: localVarRequestOptions,
17302
+ };
17303
+ }),
17304
+ /**
17305
+ * Assign a tag to many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. Contacts that already carry the tag are left alone.
17306
+ * @summary Assign contacts to a tag
17307
+ * @param {string} profileUuid Profile uuid parameter
17308
+ * @param {string} tagUuid Tag uuid parameter
17309
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17310
+ * @param {*} [options] Override http request option.
17311
+ * @throws {RequiredError}
17312
+ */
17313
+ assignContactsToATagV1: (profileUuid_1, tagUuid_1, reachV1ContactsTagsManageContactsRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, tagUuid_1, reachV1ContactsTagsManageContactsRequest_1, ...args_1], void 0, function* (profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options = {}) {
17314
+ // verify required parameter 'profileUuid' is not null or undefined
17315
+ assertParamExists('assignContactsToATagV1', 'profileUuid', profileUuid);
17316
+ // verify required parameter 'tagUuid' is not null or undefined
17317
+ assertParamExists('assignContactsToATagV1', 'tagUuid', tagUuid);
17318
+ // verify required parameter 'reachV1ContactsTagsManageContactsRequest' is not null or undefined
17319
+ assertParamExists('assignContactsToATagV1', 'reachV1ContactsTagsManageContactsRequest', reachV1ContactsTagsManageContactsRequest);
17320
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts`
17321
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
17322
+ .replace(`{${"tagUuid"}}`, encodeURIComponent(String(tagUuid)));
17323
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17324
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17325
+ let baseOptions;
17326
+ if (configuration) {
17327
+ baseOptions = configuration.baseOptions;
17328
+ }
17329
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
17330
+ const localVarHeaderParameter = {};
17331
+ const localVarQueryParameter = {};
17332
+ // authentication apiToken required
17333
+ // http bearer authentication required
17334
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17335
+ localVarHeaderParameter['Content-Type'] = 'application/json';
17336
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17337
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17338
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17339
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsTagsManageContactsRequest, localVarRequestOptions, configuration);
17340
+ return {
17341
+ url: toPathString(localVarUrlObj),
17342
+ options: localVarRequestOptions,
17343
+ };
17344
+ }),
17345
+ /**
17346
+ * Create tags in a profile. Names that already exist in the profile are not duplicated: the existing tag is returned instead, so the call is safe to repeat. Every tag in the request is returned, whether it was created now or already existed.
17347
+ * @summary Create or find tags
17348
+ * @param {string} profileUuid Profile uuid parameter
17349
+ * @param {ReachV1ContactsTagsStoreRequest} reachV1ContactsTagsStoreRequest
17350
+ * @param {*} [options] Override http request option.
17351
+ * @throws {RequiredError}
17352
+ */
17353
+ createOrFindTagsV1: (profileUuid_1, reachV1ContactsTagsStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1ContactsTagsStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1ContactsTagsStoreRequest, options = {}) {
17354
+ // verify required parameter 'profileUuid' is not null or undefined
17355
+ assertParamExists('createOrFindTagsV1', 'profileUuid', profileUuid);
17356
+ // verify required parameter 'reachV1ContactsTagsStoreRequest' is not null or undefined
17357
+ assertParamExists('createOrFindTagsV1', 'reachV1ContactsTagsStoreRequest', reachV1ContactsTagsStoreRequest);
17358
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags`
17359
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
17360
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17361
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17362
+ let baseOptions;
17363
+ if (configuration) {
17364
+ baseOptions = configuration.baseOptions;
17365
+ }
17366
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
17367
+ const localVarHeaderParameter = {};
17368
+ const localVarQueryParameter = {};
17369
+ // authentication apiToken required
17370
+ // http bearer authentication required
17371
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17372
+ localVarHeaderParameter['Content-Type'] = 'application/json';
17373
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17374
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17375
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17376
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsTagsStoreRequest, localVarRequestOptions, configuration);
17377
+ return {
17378
+ url: toPathString(localVarUrlObj),
17379
+ options: localVarRequestOptions,
17380
+ };
17381
+ }),
17382
+ /**
17383
+ * Delete a tag and remove it from every contact carrying it. The contacts themselves are not deleted. This is idempotent: deleting a tag that does not exist in the profile still succeeds.
17384
+ * @summary Delete a tag
17385
+ * @param {string} profileUuid Profile uuid parameter
17386
+ * @param {string} tagUuid Tag uuid parameter
17387
+ * @param {*} [options] Override http request option.
17388
+ * @throws {RequiredError}
17389
+ */
17390
+ deleteATagV1: (profileUuid_1, tagUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, tagUuid_1, ...args_1], void 0, function* (profileUuid, tagUuid, options = {}) {
17391
+ // verify required parameter 'profileUuid' is not null or undefined
17392
+ assertParamExists('deleteATagV1', 'profileUuid', profileUuid);
17393
+ // verify required parameter 'tagUuid' is not null or undefined
17394
+ assertParamExists('deleteATagV1', 'tagUuid', tagUuid);
17395
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}`
17396
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
17397
+ .replace(`{${"tagUuid"}}`, encodeURIComponent(String(tagUuid)));
17398
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17399
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17400
+ let baseOptions;
17401
+ if (configuration) {
17402
+ baseOptions = configuration.baseOptions;
17403
+ }
17404
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
17405
+ const localVarHeaderParameter = {};
17406
+ const localVarQueryParameter = {};
17407
+ // authentication apiToken required
17408
+ // http bearer authentication required
17409
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17410
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17411
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17412
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17413
+ return {
17414
+ url: toPathString(localVarUrlObj),
17415
+ options: localVarRequestOptions,
17416
+ };
17417
+ }),
17418
+ /**
17419
+ * Get all tags defined in a profile. Tags are the way contacts are grouped in Reach, and can be used to filter the contact list or to build segments.
17420
+ * @summary List profile tags
17421
+ * @param {string} profileUuid Profile uuid parameter
17422
+ * @param {*} [options] Override http request option.
17423
+ * @throws {RequiredError}
17424
+ */
17425
+ listProfileTagsV1: (profileUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, ...args_1], void 0, function* (profileUuid, options = {}) {
17426
+ // verify required parameter 'profileUuid' is not null or undefined
17427
+ assertParamExists('listProfileTagsV1', 'profileUuid', profileUuid);
17428
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags`
17429
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
17430
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17431
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17432
+ let baseOptions;
17433
+ if (configuration) {
17434
+ baseOptions = configuration.baseOptions;
17435
+ }
17436
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
17437
+ const localVarHeaderParameter = {};
17438
+ const localVarQueryParameter = {};
17439
+ // authentication apiToken required
17440
+ // http bearer authentication required
17441
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17442
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17443
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17444
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17445
+ return {
17446
+ url: toPathString(localVarUrlObj),
17447
+ options: localVarRequestOptions,
17448
+ };
17449
+ }),
17450
+ /**
17451
+ * Remove a tag from a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Neither the tag nor the contact is deleted.
17452
+ * @summary Remove a contact from a tag
17453
+ * @param {string} profileUuid Profile uuid parameter
17454
+ * @param {string} tagUuid Tag uuid parameter
17455
+ * @param {string} contactUuid Contact uuid parameter
17456
+ * @param {*} [options] Override http request option.
17457
+ * @throws {RequiredError}
17458
+ */
17459
+ removeAContactFromATagV1: (profileUuid_1, tagUuid_1, contactUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, tagUuid_1, contactUuid_1, ...args_1], void 0, function* (profileUuid, tagUuid, contactUuid, options = {}) {
17460
+ // verify required parameter 'profileUuid' is not null or undefined
17461
+ assertParamExists('removeAContactFromATagV1', 'profileUuid', profileUuid);
17462
+ // verify required parameter 'tagUuid' is not null or undefined
17463
+ assertParamExists('removeAContactFromATagV1', 'tagUuid', tagUuid);
17464
+ // verify required parameter 'contactUuid' is not null or undefined
17465
+ assertParamExists('removeAContactFromATagV1', 'contactUuid', contactUuid);
17466
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts/{contactUuid}`
17467
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
17468
+ .replace(`{${"tagUuid"}}`, encodeURIComponent(String(tagUuid)))
17469
+ .replace(`{${"contactUuid"}}`, encodeURIComponent(String(contactUuid)));
17470
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17471
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17472
+ let baseOptions;
17473
+ if (configuration) {
17474
+ baseOptions = configuration.baseOptions;
17475
+ }
17476
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
17477
+ const localVarHeaderParameter = {};
17478
+ const localVarQueryParameter = {};
17479
+ // authentication apiToken required
17480
+ // http bearer authentication required
17481
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17482
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17483
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17484
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17485
+ return {
17486
+ url: toPathString(localVarUrlObj),
17487
+ options: localVarRequestOptions,
17488
+ };
17489
+ }),
17490
+ /**
17491
+ * Remove a tag from many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. The tag itself and the contacts are not deleted.
17492
+ * @summary Remove contacts from a tag
17493
+ * @param {string} profileUuid Profile uuid parameter
17494
+ * @param {string} tagUuid Tag uuid parameter
17495
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17496
+ * @param {*} [options] Override http request option.
17497
+ * @throws {RequiredError}
17498
+ */
17499
+ removeContactsFromATagV1: (profileUuid_1, tagUuid_1, reachV1ContactsTagsManageContactsRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, tagUuid_1, reachV1ContactsTagsManageContactsRequest_1, ...args_1], void 0, function* (profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options = {}) {
17500
+ // verify required parameter 'profileUuid' is not null or undefined
17501
+ assertParamExists('removeContactsFromATagV1', 'profileUuid', profileUuid);
17502
+ // verify required parameter 'tagUuid' is not null or undefined
17503
+ assertParamExists('removeContactsFromATagV1', 'tagUuid', tagUuid);
17504
+ // verify required parameter 'reachV1ContactsTagsManageContactsRequest' is not null or undefined
17505
+ assertParamExists('removeContactsFromATagV1', 'reachV1ContactsTagsManageContactsRequest', reachV1ContactsTagsManageContactsRequest);
17506
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts`
17507
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
17508
+ .replace(`{${"tagUuid"}}`, encodeURIComponent(String(tagUuid)));
17509
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17510
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17511
+ let baseOptions;
17512
+ if (configuration) {
17513
+ baseOptions = configuration.baseOptions;
17514
+ }
17515
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
17516
+ const localVarHeaderParameter = {};
17517
+ const localVarQueryParameter = {};
17518
+ // authentication apiToken required
17519
+ // http bearer authentication required
17520
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17521
+ localVarHeaderParameter['Content-Type'] = 'application/json';
17522
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17523
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17524
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17525
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsTagsManageContactsRequest, localVarRequestOptions, configuration);
17526
+ return {
17527
+ url: toPathString(localVarUrlObj),
17528
+ options: localVarRequestOptions,
17529
+ };
17530
+ }),
17531
+ /**
17532
+ * Rename a tag. The contacts assigned to the tag are unaffected. Names are unique within a profile, so renaming a tag to a name that is already taken is rejected.
17533
+ * @summary Rename a tag
17534
+ * @param {string} profileUuid Profile uuid parameter
17535
+ * @param {string} tagUuid Tag uuid parameter
17536
+ * @param {ReachV1ContactsTagsUpdateRequest} reachV1ContactsTagsUpdateRequest
17537
+ * @param {*} [options] Override http request option.
17538
+ * @throws {RequiredError}
17539
+ */
17540
+ renameATagV1: (profileUuid_1, tagUuid_1, reachV1ContactsTagsUpdateRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, tagUuid_1, reachV1ContactsTagsUpdateRequest_1, ...args_1], void 0, function* (profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options = {}) {
17541
+ // verify required parameter 'profileUuid' is not null or undefined
17542
+ assertParamExists('renameATagV1', 'profileUuid', profileUuid);
17543
+ // verify required parameter 'tagUuid' is not null or undefined
17544
+ assertParamExists('renameATagV1', 'tagUuid', tagUuid);
17545
+ // verify required parameter 'reachV1ContactsTagsUpdateRequest' is not null or undefined
17546
+ assertParamExists('renameATagV1', 'reachV1ContactsTagsUpdateRequest', reachV1ContactsTagsUpdateRequest);
17547
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}`
17548
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
17549
+ .replace(`{${"tagUuid"}}`, encodeURIComponent(String(tagUuid)));
17550
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17551
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17552
+ let baseOptions;
17553
+ if (configuration) {
17554
+ baseOptions = configuration.baseOptions;
17555
+ }
17556
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
17557
+ const localVarHeaderParameter = {};
17558
+ const localVarQueryParameter = {};
17559
+ // authentication apiToken required
17560
+ // http bearer authentication required
17561
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17562
+ localVarHeaderParameter['Content-Type'] = 'application/json';
17563
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17564
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17565
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17566
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsTagsUpdateRequest, localVarRequestOptions, configuration);
17567
+ return {
17568
+ url: toPathString(localVarUrlObj),
17569
+ options: localVarRequestOptions,
17570
+ };
17571
+ }),
17572
+ };
17573
+ };
17574
+ /**
17575
+ * ReachTagsApi - functional programming interface
17576
+ * @export
17577
+ */
17578
+ export const ReachTagsApiFp = function (configuration) {
17579
+ const localVarAxiosParamCreator = ReachTagsApiAxiosParamCreator(configuration);
17580
+ return {
17581
+ /**
17582
+ * Assign a tag to a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Assigning a tag the contact already carries succeeds without duplicating it.
17583
+ * @summary Assign a contact to a tag
17584
+ * @param {string} profileUuid Profile uuid parameter
17585
+ * @param {string} tagUuid Tag uuid parameter
17586
+ * @param {string} contactUuid Contact uuid parameter
17587
+ * @param {*} [options] Override http request option.
17588
+ * @throws {RequiredError}
17589
+ */
17590
+ assignAContactToATagV1(profileUuid, tagUuid, contactUuid, options) {
17591
+ return __awaiter(this, void 0, void 0, function* () {
17592
+ var _a, _b;
17593
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.assignAContactToATagV1(profileUuid, tagUuid, contactUuid, options);
17594
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.assignAContactToATagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17595
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17596
+ });
17597
+ },
17598
+ /**
17599
+ * Assign a tag to many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. Contacts that already carry the tag are left alone.
17600
+ * @summary Assign contacts to a tag
17601
+ * @param {string} profileUuid Profile uuid parameter
17602
+ * @param {string} tagUuid Tag uuid parameter
17603
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17604
+ * @param {*} [options] Override http request option.
17605
+ * @throws {RequiredError}
17606
+ */
17607
+ assignContactsToATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options) {
17608
+ return __awaiter(this, void 0, void 0, function* () {
17609
+ var _a, _b;
17610
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.assignContactsToATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options);
17611
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.assignContactsToATagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17612
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17613
+ });
17614
+ },
17615
+ /**
17616
+ * Create tags in a profile. Names that already exist in the profile are not duplicated: the existing tag is returned instead, so the call is safe to repeat. Every tag in the request is returned, whether it was created now or already existed.
17617
+ * @summary Create or find tags
17618
+ * @param {string} profileUuid Profile uuid parameter
17619
+ * @param {ReachV1ContactsTagsStoreRequest} reachV1ContactsTagsStoreRequest
17620
+ * @param {*} [options] Override http request option.
17621
+ * @throws {RequiredError}
17622
+ */
17623
+ createOrFindTagsV1(profileUuid, reachV1ContactsTagsStoreRequest, options) {
17624
+ return __awaiter(this, void 0, void 0, function* () {
17625
+ var _a, _b;
17626
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrFindTagsV1(profileUuid, reachV1ContactsTagsStoreRequest, options);
17627
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.createOrFindTagsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17628
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17629
+ });
17630
+ },
17631
+ /**
17632
+ * Delete a tag and remove it from every contact carrying it. The contacts themselves are not deleted. This is idempotent: deleting a tag that does not exist in the profile still succeeds.
17633
+ * @summary Delete a tag
17634
+ * @param {string} profileUuid Profile uuid parameter
17635
+ * @param {string} tagUuid Tag uuid parameter
17636
+ * @param {*} [options] Override http request option.
17637
+ * @throws {RequiredError}
17638
+ */
17639
+ deleteATagV1(profileUuid, tagUuid, options) {
17640
+ return __awaiter(this, void 0, void 0, function* () {
17641
+ var _a, _b;
17642
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteATagV1(profileUuid, tagUuid, options);
17643
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.deleteATagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17644
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17645
+ });
17646
+ },
17647
+ /**
17648
+ * Get all tags defined in a profile. Tags are the way contacts are grouped in Reach, and can be used to filter the contact list or to build segments.
17649
+ * @summary List profile tags
17650
+ * @param {string} profileUuid Profile uuid parameter
17651
+ * @param {*} [options] Override http request option.
17652
+ * @throws {RequiredError}
17653
+ */
17654
+ listProfileTagsV1(profileUuid, options) {
17655
+ return __awaiter(this, void 0, void 0, function* () {
17656
+ var _a, _b;
17657
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProfileTagsV1(profileUuid, options);
17658
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.listProfileTagsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17659
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17660
+ });
17661
+ },
17662
+ /**
17663
+ * Remove a tag from a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Neither the tag nor the contact is deleted.
17664
+ * @summary Remove a contact from a tag
17665
+ * @param {string} profileUuid Profile uuid parameter
17666
+ * @param {string} tagUuid Tag uuid parameter
17667
+ * @param {string} contactUuid Contact uuid parameter
17668
+ * @param {*} [options] Override http request option.
17669
+ * @throws {RequiredError}
17670
+ */
17671
+ removeAContactFromATagV1(profileUuid, tagUuid, contactUuid, options) {
17672
+ return __awaiter(this, void 0, void 0, function* () {
17673
+ var _a, _b;
17674
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.removeAContactFromATagV1(profileUuid, tagUuid, contactUuid, options);
17675
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.removeAContactFromATagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17676
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17677
+ });
17678
+ },
17679
+ /**
17680
+ * Remove a tag from many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. The tag itself and the contacts are not deleted.
17681
+ * @summary Remove contacts from a tag
17682
+ * @param {string} profileUuid Profile uuid parameter
17683
+ * @param {string} tagUuid Tag uuid parameter
17684
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17685
+ * @param {*} [options] Override http request option.
17686
+ * @throws {RequiredError}
17687
+ */
17688
+ removeContactsFromATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options) {
17689
+ return __awaiter(this, void 0, void 0, function* () {
17690
+ var _a, _b;
17691
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.removeContactsFromATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options);
17692
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.removeContactsFromATagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17693
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17694
+ });
17695
+ },
17696
+ /**
17697
+ * Rename a tag. The contacts assigned to the tag are unaffected. Names are unique within a profile, so renaming a tag to a name that is already taken is rejected.
17698
+ * @summary Rename a tag
17699
+ * @param {string} profileUuid Profile uuid parameter
17700
+ * @param {string} tagUuid Tag uuid parameter
17701
+ * @param {ReachV1ContactsTagsUpdateRequest} reachV1ContactsTagsUpdateRequest
17702
+ * @param {*} [options] Override http request option.
17703
+ * @throws {RequiredError}
17704
+ */
17705
+ renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options) {
17706
+ return __awaiter(this, void 0, void 0, function* () {
17707
+ var _a, _b;
17708
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options);
17709
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachTagsApi.renameATagV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17710
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17711
+ });
17712
+ },
17713
+ };
17714
+ };
17715
+ /**
17716
+ * ReachTagsApi - factory interface
17717
+ * @export
17718
+ */
17719
+ export const ReachTagsApiFactory = function (configuration, basePath, axios) {
17720
+ const localVarFp = ReachTagsApiFp(configuration);
17721
+ return {
17722
+ /**
17723
+ * Assign a tag to a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Assigning a tag the contact already carries succeeds without duplicating it.
17724
+ * @summary Assign a contact to a tag
17725
+ * @param {string} profileUuid Profile uuid parameter
17726
+ * @param {string} tagUuid Tag uuid parameter
17727
+ * @param {string} contactUuid Contact uuid parameter
17728
+ * @param {*} [options] Override http request option.
17729
+ * @throws {RequiredError}
17730
+ */
17731
+ assignAContactToATagV1(profileUuid, tagUuid, contactUuid, options) {
17732
+ return localVarFp.assignAContactToATagV1(profileUuid, tagUuid, contactUuid, options).then((request) => request(axios, basePath));
17733
+ },
17734
+ /**
17735
+ * Assign a tag to many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. Contacts that already carry the tag are left alone.
17736
+ * @summary Assign contacts to a tag
17737
+ * @param {string} profileUuid Profile uuid parameter
17738
+ * @param {string} tagUuid Tag uuid parameter
17739
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17740
+ * @param {*} [options] Override http request option.
17741
+ * @throws {RequiredError}
17742
+ */
17743
+ assignContactsToATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options) {
17744
+ return localVarFp.assignContactsToATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options).then((request) => request(axios, basePath));
17745
+ },
17746
+ /**
17747
+ * Create tags in a profile. Names that already exist in the profile are not duplicated: the existing tag is returned instead, so the call is safe to repeat. Every tag in the request is returned, whether it was created now or already existed.
17748
+ * @summary Create or find tags
17749
+ * @param {string} profileUuid Profile uuid parameter
17750
+ * @param {ReachV1ContactsTagsStoreRequest} reachV1ContactsTagsStoreRequest
17751
+ * @param {*} [options] Override http request option.
17752
+ * @throws {RequiredError}
17753
+ */
17754
+ createOrFindTagsV1(profileUuid, reachV1ContactsTagsStoreRequest, options) {
17755
+ return localVarFp.createOrFindTagsV1(profileUuid, reachV1ContactsTagsStoreRequest, options).then((request) => request(axios, basePath));
17756
+ },
17757
+ /**
17758
+ * Delete a tag and remove it from every contact carrying it. The contacts themselves are not deleted. This is idempotent: deleting a tag that does not exist in the profile still succeeds.
17759
+ * @summary Delete a tag
17760
+ * @param {string} profileUuid Profile uuid parameter
17761
+ * @param {string} tagUuid Tag uuid parameter
17762
+ * @param {*} [options] Override http request option.
17763
+ * @throws {RequiredError}
17764
+ */
17765
+ deleteATagV1(profileUuid, tagUuid, options) {
17766
+ return localVarFp.deleteATagV1(profileUuid, tagUuid, options).then((request) => request(axios, basePath));
17767
+ },
17768
+ /**
17769
+ * Get all tags defined in a profile. Tags are the way contacts are grouped in Reach, and can be used to filter the contact list or to build segments.
17770
+ * @summary List profile tags
17771
+ * @param {string} profileUuid Profile uuid parameter
17772
+ * @param {*} [options] Override http request option.
17773
+ * @throws {RequiredError}
17774
+ */
17775
+ listProfileTagsV1(profileUuid, options) {
17776
+ return localVarFp.listProfileTagsV1(profileUuid, options).then((request) => request(axios, basePath));
17777
+ },
17778
+ /**
17779
+ * Remove a tag from a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Neither the tag nor the contact is deleted.
17780
+ * @summary Remove a contact from a tag
17781
+ * @param {string} profileUuid Profile uuid parameter
17782
+ * @param {string} tagUuid Tag uuid parameter
17783
+ * @param {string} contactUuid Contact uuid parameter
17784
+ * @param {*} [options] Override http request option.
17785
+ * @throws {RequiredError}
17786
+ */
17787
+ removeAContactFromATagV1(profileUuid, tagUuid, contactUuid, options) {
17788
+ return localVarFp.removeAContactFromATagV1(profileUuid, tagUuid, contactUuid, options).then((request) => request(axios, basePath));
17789
+ },
17790
+ /**
17791
+ * Remove a tag from many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. The tag itself and the contacts are not deleted.
17792
+ * @summary Remove contacts from a tag
17793
+ * @param {string} profileUuid Profile uuid parameter
17794
+ * @param {string} tagUuid Tag uuid parameter
17795
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17796
+ * @param {*} [options] Override http request option.
17797
+ * @throws {RequiredError}
17798
+ */
17799
+ removeContactsFromATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options) {
17800
+ return localVarFp.removeContactsFromATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options).then((request) => request(axios, basePath));
17801
+ },
17802
+ /**
17803
+ * Rename a tag. The contacts assigned to the tag are unaffected. Names are unique within a profile, so renaming a tag to a name that is already taken is rejected.
17804
+ * @summary Rename a tag
17805
+ * @param {string} profileUuid Profile uuid parameter
17806
+ * @param {string} tagUuid Tag uuid parameter
17807
+ * @param {ReachV1ContactsTagsUpdateRequest} reachV1ContactsTagsUpdateRequest
17808
+ * @param {*} [options] Override http request option.
17809
+ * @throws {RequiredError}
17810
+ */
17811
+ renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options) {
17812
+ return localVarFp.renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options).then((request) => request(axios, basePath));
17813
+ },
17814
+ };
17815
+ };
17816
+ /**
17817
+ * ReachTagsApi - object-oriented interface
17818
+ * @export
17819
+ * @class ReachTagsApi
17820
+ * @extends {BaseAPI}
17821
+ */
17822
+ export class ReachTagsApi extends BaseAPI {
17823
+ /**
17824
+ * Assign a tag to a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Assigning a tag the contact already carries succeeds without duplicating it.
17825
+ * @summary Assign a contact to a tag
17826
+ * @param {string} profileUuid Profile uuid parameter
17827
+ * @param {string} tagUuid Tag uuid parameter
17828
+ * @param {string} contactUuid Contact uuid parameter
17829
+ * @param {*} [options] Override http request option.
17830
+ * @throws {RequiredError}
17831
+ * @memberof ReachTagsApi
17832
+ */
17833
+ assignAContactToATagV1(profileUuid, tagUuid, contactUuid, options) {
17834
+ return ReachTagsApiFp(this.configuration).assignAContactToATagV1(profileUuid, tagUuid, contactUuid, options).then((request) => request(this.axios, this.basePath));
17835
+ }
17836
+ /**
17837
+ * Assign a tag to many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. Contacts that already carry the tag are left alone.
17838
+ * @summary Assign contacts to a tag
17839
+ * @param {string} profileUuid Profile uuid parameter
17840
+ * @param {string} tagUuid Tag uuid parameter
17841
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17842
+ * @param {*} [options] Override http request option.
17843
+ * @throws {RequiredError}
17844
+ * @memberof ReachTagsApi
17845
+ */
17846
+ assignContactsToATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options) {
17847
+ return ReachTagsApiFp(this.configuration).assignContactsToATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options).then((request) => request(this.axios, this.basePath));
17848
+ }
17849
+ /**
17850
+ * Create tags in a profile. Names that already exist in the profile are not duplicated: the existing tag is returned instead, so the call is safe to repeat. Every tag in the request is returned, whether it was created now or already existed.
17851
+ * @summary Create or find tags
17852
+ * @param {string} profileUuid Profile uuid parameter
17853
+ * @param {ReachV1ContactsTagsStoreRequest} reachV1ContactsTagsStoreRequest
17854
+ * @param {*} [options] Override http request option.
17855
+ * @throws {RequiredError}
17856
+ * @memberof ReachTagsApi
17857
+ */
17858
+ createOrFindTagsV1(profileUuid, reachV1ContactsTagsStoreRequest, options) {
17859
+ return ReachTagsApiFp(this.configuration).createOrFindTagsV1(profileUuid, reachV1ContactsTagsStoreRequest, options).then((request) => request(this.axios, this.basePath));
17860
+ }
17861
+ /**
17862
+ * Delete a tag and remove it from every contact carrying it. The contacts themselves are not deleted. This is idempotent: deleting a tag that does not exist in the profile still succeeds.
17863
+ * @summary Delete a tag
17864
+ * @param {string} profileUuid Profile uuid parameter
17865
+ * @param {string} tagUuid Tag uuid parameter
17866
+ * @param {*} [options] Override http request option.
17867
+ * @throws {RequiredError}
17868
+ * @memberof ReachTagsApi
17869
+ */
17870
+ deleteATagV1(profileUuid, tagUuid, options) {
17871
+ return ReachTagsApiFp(this.configuration).deleteATagV1(profileUuid, tagUuid, options).then((request) => request(this.axios, this.basePath));
17872
+ }
17873
+ /**
17874
+ * Get all tags defined in a profile. Tags are the way contacts are grouped in Reach, and can be used to filter the contact list or to build segments.
17875
+ * @summary List profile tags
17876
+ * @param {string} profileUuid Profile uuid parameter
17877
+ * @param {*} [options] Override http request option.
17878
+ * @throws {RequiredError}
17879
+ * @memberof ReachTagsApi
17880
+ */
17881
+ listProfileTagsV1(profileUuid, options) {
17882
+ return ReachTagsApiFp(this.configuration).listProfileTagsV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
17883
+ }
17884
+ /**
17885
+ * Remove a tag from a single contact. Unlike the bulk endpoint this is applied immediately rather than queued. Neither the tag nor the contact is deleted.
17886
+ * @summary Remove a contact from a tag
17887
+ * @param {string} profileUuid Profile uuid parameter
17888
+ * @param {string} tagUuid Tag uuid parameter
17889
+ * @param {string} contactUuid Contact uuid parameter
17890
+ * @param {*} [options] Override http request option.
17891
+ * @throws {RequiredError}
17892
+ * @memberof ReachTagsApi
17893
+ */
17894
+ removeAContactFromATagV1(profileUuid, tagUuid, contactUuid, options) {
17895
+ return ReachTagsApiFp(this.configuration).removeAContactFromATagV1(profileUuid, tagUuid, contactUuid, options).then((request) => request(this.axios, this.basePath));
17896
+ }
17897
+ /**
17898
+ * Remove a tag from many contacts at once. Pass `contact_uuids` to target specific contacts, or `all_contacts` to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. The tag itself and the contacts are not deleted.
17899
+ * @summary Remove contacts from a tag
17900
+ * @param {string} profileUuid Profile uuid parameter
17901
+ * @param {string} tagUuid Tag uuid parameter
17902
+ * @param {ReachV1ContactsTagsManageContactsRequest} reachV1ContactsTagsManageContactsRequest
17903
+ * @param {*} [options] Override http request option.
17904
+ * @throws {RequiredError}
17905
+ * @memberof ReachTagsApi
17906
+ */
17907
+ removeContactsFromATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options) {
17908
+ return ReachTagsApiFp(this.configuration).removeContactsFromATagV1(profileUuid, tagUuid, reachV1ContactsTagsManageContactsRequest, options).then((request) => request(this.axios, this.basePath));
17909
+ }
17910
+ /**
17911
+ * Rename a tag. The contacts assigned to the tag are unaffected. Names are unique within a profile, so renaming a tag to a name that is already taken is rejected.
17912
+ * @summary Rename a tag
17913
+ * @param {string} profileUuid Profile uuid parameter
17914
+ * @param {string} tagUuid Tag uuid parameter
17915
+ * @param {ReachV1ContactsTagsUpdateRequest} reachV1ContactsTagsUpdateRequest
17916
+ * @param {*} [options] Override http request option.
17917
+ * @throws {RequiredError}
17918
+ * @memberof ReachTagsApi
17919
+ */
17920
+ renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options) {
17921
+ return ReachTagsApiFp(this.configuration).renameATagV1(profileUuid, tagUuid, reachV1ContactsTagsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
17922
+ }
17923
+ }
17258
17924
  /**
17259
17925
  * VPSActionsApi - axios parameter creator
17260
17926
  * @export