hostinger-api-sdk 1.26.0 → 1.27.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/README.md +2 -2
- package/api.ts +1625 -119
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +1074 -13
- package/dist/api.js +1067 -216
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +1074 -13
- package/dist/esm/api.js +1051 -205
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/ReachContactFieldsApi.md +239 -0
- package/docs/ReachContactsApi.md +308 -4
- package/docs/ReachListProfileContactsV1200Response.md +22 -0
- package/docs/ReachV1ContactsBulkStoreRequest.md +25 -0
- package/docs/ReachV1ContactsBulkStoreRequestContactsInner.md +26 -0
- package/docs/ReachV1ContactsContactDetailsResource.md +46 -0
- package/docs/ReachV1ContactsFieldsContactFieldOptionResource.md +24 -0
- package/docs/ReachV1ContactsFieldsContactFieldResource.md +30 -0
- package/docs/ReachV1ContactsFieldsContactFieldValueResource.md +33 -0
- package/docs/ReachV1ContactsFieldsStoreRequest.md +25 -0
- package/docs/ReachV1ContactsFieldsUpdateRequest.md +23 -0
- package/docs/ReachV1ContactsFieldsUpdateRequestOptionsInner.md +22 -0
- package/docs/ReachV1ContactsProfileContactResource.md +38 -0
- package/docs/ReachV1ContactsProfileContactUpdateResource.md +34 -0
- package/docs/ReachV1ContactsTagsTagResource.md +26 -0
- package/docs/ReachV1ContactsUpdateRequest.md +33 -0
- package/docs/ReachV1ContactsUpdateRequestFieldsInner.md +24 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.28.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
|
|
@@ -349,23 +349,92 @@ export const MailV1WebhooksWebhookSecretResourceStatusEnum = {
|
|
|
349
349
|
Disabled: 'disabled',
|
|
350
350
|
Paused: 'paused'
|
|
351
351
|
};
|
|
352
|
+
export const ReachV1ContactsContactDetailsResourceSubscriptionStatusEnum = {
|
|
353
|
+
Subscribed: 'subscribed',
|
|
354
|
+
Unsubscribed: 'unsubscribed',
|
|
355
|
+
Confirmed: 'confirmed',
|
|
356
|
+
Pending: 'pending'
|
|
357
|
+
};
|
|
358
|
+
export const ReachV1ContactsContactDetailsResourceSourceEnum = {
|
|
359
|
+
Sync: 'sync',
|
|
360
|
+
Import: 'import',
|
|
361
|
+
Manual: 'manual',
|
|
362
|
+
Api: 'api',
|
|
363
|
+
Form: 'form',
|
|
364
|
+
Checkout: 'checkout',
|
|
365
|
+
Horizons: 'horizons'
|
|
366
|
+
};
|
|
352
367
|
export const ReachV1ContactsContactResourceSubscriptionStatusEnum = {
|
|
353
368
|
Subscribed: 'subscribed',
|
|
354
|
-
Unsubscribed: 'unsubscribed'
|
|
369
|
+
Unsubscribed: 'unsubscribed',
|
|
370
|
+
Confirmed: 'confirmed',
|
|
371
|
+
Pending: 'pending'
|
|
355
372
|
};
|
|
356
373
|
export const ReachV1ContactsContactResourceSourceEnum = {
|
|
357
374
|
Sync: 'sync',
|
|
358
375
|
Import: 'import',
|
|
359
|
-
Manual: 'manual'
|
|
376
|
+
Manual: 'manual',
|
|
377
|
+
Api: 'api',
|
|
378
|
+
Form: 'form',
|
|
379
|
+
Checkout: 'checkout',
|
|
380
|
+
Horizons: 'horizons'
|
|
381
|
+
};
|
|
382
|
+
export const ReachV1ContactsFieldsContactFieldResourceTypeEnum = {
|
|
383
|
+
Text: 'text',
|
|
384
|
+
Number: 'number',
|
|
385
|
+
Date: 'date',
|
|
386
|
+
SingleChoice: 'single_choice',
|
|
387
|
+
MultiChoice: 'multi_choice'
|
|
388
|
+
};
|
|
389
|
+
export const ReachV1ContactsFieldsContactFieldValueResourceTypeEnum = {
|
|
390
|
+
Text: 'text',
|
|
391
|
+
Number: 'number',
|
|
392
|
+
Date: 'date',
|
|
393
|
+
SingleChoice: 'single_choice',
|
|
394
|
+
MultiChoice: 'multi_choice'
|
|
395
|
+
};
|
|
396
|
+
export const ReachV1ContactsFieldsStoreRequestTypeEnum = {
|
|
397
|
+
Text: 'text',
|
|
398
|
+
Number: 'number',
|
|
399
|
+
Date: 'date',
|
|
400
|
+
SingleChoice: 'single_choice',
|
|
401
|
+
MultiChoice: 'multi_choice'
|
|
402
|
+
};
|
|
403
|
+
export const ReachV1ContactsProfileContactResourceSubscriptionStatusEnum = {
|
|
404
|
+
Subscribed: 'subscribed',
|
|
405
|
+
Unsubscribed: 'unsubscribed',
|
|
406
|
+
Confirmed: 'confirmed',
|
|
407
|
+
Pending: 'pending'
|
|
408
|
+
};
|
|
409
|
+
export const ReachV1ContactsProfileContactResourceSourceEnum = {
|
|
410
|
+
Sync: 'sync',
|
|
411
|
+
Import: 'import',
|
|
412
|
+
Manual: 'manual',
|
|
413
|
+
Api: 'api',
|
|
414
|
+
Form: 'form',
|
|
415
|
+
Checkout: 'checkout',
|
|
416
|
+
Horizons: 'horizons'
|
|
417
|
+
};
|
|
418
|
+
export const ReachV1ContactsProfileContactUpdateResourceSubscriptionStatusEnum = {
|
|
419
|
+
Subscribed: 'subscribed',
|
|
420
|
+
Unsubscribed: 'unsubscribed',
|
|
421
|
+
Confirmed: 'confirmed',
|
|
422
|
+
Pending: 'pending'
|
|
360
423
|
};
|
|
361
424
|
export const ReachV1ContactsSegmentsSegmentationContactResourceSubscriptionStatusEnum = {
|
|
362
425
|
Subscribed: 'subscribed',
|
|
363
|
-
Unsubscribed: 'unsubscribed'
|
|
426
|
+
Unsubscribed: 'unsubscribed',
|
|
427
|
+
Confirmed: 'confirmed',
|
|
428
|
+
Pending: 'pending'
|
|
364
429
|
};
|
|
365
430
|
export const ReachV1ContactsSegmentsSegmentationContactResourceSourceEnum = {
|
|
366
431
|
Sync: 'sync',
|
|
367
432
|
Import: 'import',
|
|
368
|
-
Manual: 'manual'
|
|
433
|
+
Manual: 'manual',
|
|
434
|
+
Api: 'api',
|
|
435
|
+
Form: 'form',
|
|
436
|
+
Checkout: 'checkout',
|
|
437
|
+
Horizons: 'horizons'
|
|
369
438
|
};
|
|
370
439
|
export const ReachV1ContactsSegmentsStoreRequestLogicEnum = {
|
|
371
440
|
And: 'AND',
|
|
@@ -419,6 +488,16 @@ export const ReachV1ContactsSegmentsStoreRequestConditionsInnerAttributeEnum = {
|
|
|
419
488
|
Tag: 'tag',
|
|
420
489
|
Campaigns: 'campaigns'
|
|
421
490
|
};
|
|
491
|
+
export const ReachV1ContactsTagsTagResourceTypeEnum = {
|
|
492
|
+
Form: 'form',
|
|
493
|
+
Custom: 'custom'
|
|
494
|
+
};
|
|
495
|
+
export const ReachV1ContactsUpdateRequestSubscriptionStatusEnum = {
|
|
496
|
+
Subscribed: 'subscribed',
|
|
497
|
+
Unsubscribed: 'unsubscribed',
|
|
498
|
+
Confirmed: 'confirmed',
|
|
499
|
+
Pending: 'pending'
|
|
500
|
+
};
|
|
422
501
|
export const VPSV1ActionActionResourceStateEnum = {
|
|
423
502
|
Success: 'success',
|
|
424
503
|
Error: 'error',
|
|
@@ -15439,59 +15518,25 @@ export const ListWebhooksV1StatusEnum = {
|
|
|
15439
15518
|
Paused: 'paused'
|
|
15440
15519
|
};
|
|
15441
15520
|
/**
|
|
15442
|
-
*
|
|
15521
|
+
* ReachContactFieldsApi - axios parameter creator
|
|
15443
15522
|
* @export
|
|
15444
15523
|
*/
|
|
15445
|
-
export const
|
|
15524
|
+
export const ReachContactFieldsApiAxiosParamCreator = function (configuration) {
|
|
15446
15525
|
return {
|
|
15447
15526
|
/**
|
|
15448
|
-
*
|
|
15449
|
-
* @summary Create a
|
|
15450
|
-
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
15451
|
-
* @param {*} [options] Override http request option.
|
|
15452
|
-
* @deprecated
|
|
15453
|
-
* @throws {RequiredError}
|
|
15454
|
-
*/
|
|
15455
|
-
createANewContactV1: (reachV1ContactsStoreRequest_1, ...args_1) => __awaiter(this, [reachV1ContactsStoreRequest_1, ...args_1], void 0, function* (reachV1ContactsStoreRequest, options = {}) {
|
|
15456
|
-
// verify required parameter 'reachV1ContactsStoreRequest' is not null or undefined
|
|
15457
|
-
assertParamExists('createANewContactV1', 'reachV1ContactsStoreRequest', reachV1ContactsStoreRequest);
|
|
15458
|
-
const localVarPath = `/api/reach/v1/contacts`;
|
|
15459
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15460
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15461
|
-
let baseOptions;
|
|
15462
|
-
if (configuration) {
|
|
15463
|
-
baseOptions = configuration.baseOptions;
|
|
15464
|
-
}
|
|
15465
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
15466
|
-
const localVarHeaderParameter = {};
|
|
15467
|
-
const localVarQueryParameter = {};
|
|
15468
|
-
// authentication apiToken required
|
|
15469
|
-
// http bearer authentication required
|
|
15470
|
-
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
15471
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
15472
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
15473
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15474
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15475
|
-
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsStoreRequest, localVarRequestOptions, configuration);
|
|
15476
|
-
return {
|
|
15477
|
-
url: toPathString(localVarUrlObj),
|
|
15478
|
-
options: localVarRequestOptions,
|
|
15479
|
-
};
|
|
15480
|
-
}),
|
|
15481
|
-
/**
|
|
15482
|
-
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
15483
|
-
* @summary Create new contacts
|
|
15527
|
+
* Define a new custom contact field in a profile. The `slug` is derived from the label and, like the field type, cannot be changed later. Use the returned uuid to set values on contacts.
|
|
15528
|
+
* @summary Create a contact field
|
|
15484
15529
|
* @param {string} profileUuid Profile uuid parameter
|
|
15485
|
-
* @param {
|
|
15530
|
+
* @param {ReachV1ContactsFieldsStoreRequest} reachV1ContactsFieldsStoreRequest
|
|
15486
15531
|
* @param {*} [options] Override http request option.
|
|
15487
15532
|
* @throws {RequiredError}
|
|
15488
15533
|
*/
|
|
15489
|
-
|
|
15534
|
+
createAContactFieldV1: (profileUuid_1, reachV1ContactsFieldsStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1ContactsFieldsStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1ContactsFieldsStoreRequest, options = {}) {
|
|
15490
15535
|
// verify required parameter 'profileUuid' is not null or undefined
|
|
15491
|
-
assertParamExists('
|
|
15492
|
-
// verify required parameter '
|
|
15493
|
-
assertParamExists('
|
|
15494
|
-
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts`
|
|
15536
|
+
assertParamExists('createAContactFieldV1', 'profileUuid', profileUuid);
|
|
15537
|
+
// verify required parameter 'reachV1ContactsFieldsStoreRequest' is not null or undefined
|
|
15538
|
+
assertParamExists('createAContactFieldV1', 'reachV1ContactsFieldsStoreRequest', reachV1ContactsFieldsStoreRequest);
|
|
15539
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/fields`
|
|
15495
15540
|
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
15496
15541
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15497
15542
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -15509,24 +15554,28 @@ export const ReachContactsApiAxiosParamCreator = function (configuration) {
|
|
|
15509
15554
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
15510
15555
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15511
15556
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15512
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
15557
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsFieldsStoreRequest, localVarRequestOptions, configuration);
|
|
15513
15558
|
return {
|
|
15514
15559
|
url: toPathString(localVarUrlObj),
|
|
15515
15560
|
options: localVarRequestOptions,
|
|
15516
15561
|
};
|
|
15517
15562
|
}),
|
|
15518
15563
|
/**
|
|
15519
|
-
* Delete a contact with the
|
|
15520
|
-
* @summary Delete a contact
|
|
15521
|
-
* @param {string}
|
|
15564
|
+
* Delete a custom contact field. Every value contacts hold for the field is deleted with it, and for the choice types so are its options. The contacts themselves are not affected.
|
|
15565
|
+
* @summary Delete a contact field
|
|
15566
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15567
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15522
15568
|
* @param {*} [options] Override http request option.
|
|
15523
15569
|
* @throws {RequiredError}
|
|
15524
15570
|
*/
|
|
15525
|
-
|
|
15526
|
-
// verify required parameter '
|
|
15527
|
-
assertParamExists('
|
|
15528
|
-
|
|
15529
|
-
|
|
15571
|
+
deleteAContactFieldV1: (profileUuid_1, fieldUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, fieldUuid_1, ...args_1], void 0, function* (profileUuid, fieldUuid, options = {}) {
|
|
15572
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
15573
|
+
assertParamExists('deleteAContactFieldV1', 'profileUuid', profileUuid);
|
|
15574
|
+
// verify required parameter 'fieldUuid' is not null or undefined
|
|
15575
|
+
assertParamExists('deleteAContactFieldV1', 'fieldUuid', fieldUuid);
|
|
15576
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/fields/{fieldUuid}`
|
|
15577
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
15578
|
+
.replace(`{${"fieldUuid"}}`, encodeURIComponent(String(fieldUuid)));
|
|
15530
15579
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15531
15580
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15532
15581
|
let baseOptions;
|
|
@@ -15548,14 +15597,17 @@ export const ReachContactsApiAxiosParamCreator = function (configuration) {
|
|
|
15548
15597
|
};
|
|
15549
15598
|
}),
|
|
15550
15599
|
/**
|
|
15551
|
-
* Get
|
|
15552
|
-
* @summary List contact
|
|
15600
|
+
* Get the custom contact fields defined in a profile. Custom fields let you store your own attributes on contacts. The returned uuids are what you pass to the contact update endpoint to set values, and choice fields also list the options available to pick from.
|
|
15601
|
+
* @summary List contact fields
|
|
15602
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15553
15603
|
* @param {*} [options] Override http request option.
|
|
15554
|
-
* @deprecated
|
|
15555
15604
|
* @throws {RequiredError}
|
|
15556
15605
|
*/
|
|
15557
|
-
|
|
15558
|
-
|
|
15606
|
+
listContactFieldsV1: (profileUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, ...args_1], void 0, function* (profileUuid, options = {}) {
|
|
15607
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
15608
|
+
assertParamExists('listContactFieldsV1', 'profileUuid', profileUuid);
|
|
15609
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/fields`
|
|
15610
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
15559
15611
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15560
15612
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15561
15613
|
let baseOptions;
|
|
@@ -15577,40 +15629,41 @@ export const ReachContactsApiAxiosParamCreator = function (configuration) {
|
|
|
15577
15629
|
};
|
|
15578
15630
|
}),
|
|
15579
15631
|
/**
|
|
15580
|
-
*
|
|
15581
|
-
* @summary
|
|
15582
|
-
* @param {string}
|
|
15583
|
-
* @param {
|
|
15584
|
-
* @param {
|
|
15632
|
+
* Rename a custom contact field and, for the choice types, replace its option set. Options carrying a uuid are kept and relabelled, options without one are created, and any existing option left out of the list is deleted along with the values contacts hold for it. The field type and slug cannot be changed.
|
|
15633
|
+
* @summary Update a contact field
|
|
15634
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15635
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15636
|
+
* @param {ReachV1ContactsFieldsUpdateRequest} reachV1ContactsFieldsUpdateRequest
|
|
15585
15637
|
* @param {*} [options] Override http request option.
|
|
15586
15638
|
* @throws {RequiredError}
|
|
15587
15639
|
*/
|
|
15588
|
-
|
|
15589
|
-
|
|
15640
|
+
updateAContactFieldV1: (profileUuid_1, fieldUuid_1, reachV1ContactsFieldsUpdateRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, fieldUuid_1, reachV1ContactsFieldsUpdateRequest_1, ...args_1], void 0, function* (profileUuid, fieldUuid, reachV1ContactsFieldsUpdateRequest, options = {}) {
|
|
15641
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
15642
|
+
assertParamExists('updateAContactFieldV1', 'profileUuid', profileUuid);
|
|
15643
|
+
// verify required parameter 'fieldUuid' is not null or undefined
|
|
15644
|
+
assertParamExists('updateAContactFieldV1', 'fieldUuid', fieldUuid);
|
|
15645
|
+
// verify required parameter 'reachV1ContactsFieldsUpdateRequest' is not null or undefined
|
|
15646
|
+
assertParamExists('updateAContactFieldV1', 'reachV1ContactsFieldsUpdateRequest', reachV1ContactsFieldsUpdateRequest);
|
|
15647
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/fields/{fieldUuid}`
|
|
15648
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
15649
|
+
.replace(`{${"fieldUuid"}}`, encodeURIComponent(String(fieldUuid)));
|
|
15590
15650
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15591
15651
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15592
15652
|
let baseOptions;
|
|
15593
15653
|
if (configuration) {
|
|
15594
15654
|
baseOptions = configuration.baseOptions;
|
|
15595
15655
|
}
|
|
15596
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: '
|
|
15656
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
15597
15657
|
const localVarHeaderParameter = {};
|
|
15598
15658
|
const localVarQueryParameter = {};
|
|
15599
15659
|
// authentication apiToken required
|
|
15600
15660
|
// http bearer authentication required
|
|
15601
15661
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
15602
|
-
|
|
15603
|
-
localVarQueryParameter['group_uuid'] = groupUuid;
|
|
15604
|
-
}
|
|
15605
|
-
if (subscriptionStatus !== undefined) {
|
|
15606
|
-
localVarQueryParameter['subscription_status'] = subscriptionStatus;
|
|
15607
|
-
}
|
|
15608
|
-
if (page !== undefined) {
|
|
15609
|
-
localVarQueryParameter['page'] = page;
|
|
15610
|
-
}
|
|
15662
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
15611
15663
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
15612
15664
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15613
15665
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15666
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsFieldsUpdateRequest, localVarRequestOptions, configuration);
|
|
15614
15667
|
return {
|
|
15615
15668
|
url: toPathString(localVarUrlObj),
|
|
15616
15669
|
options: localVarRequestOptions,
|
|
@@ -15619,229 +15672,1022 @@ export const ReachContactsApiAxiosParamCreator = function (configuration) {
|
|
|
15619
15672
|
};
|
|
15620
15673
|
};
|
|
15621
15674
|
/**
|
|
15622
|
-
*
|
|
15675
|
+
* ReachContactFieldsApi - functional programming interface
|
|
15623
15676
|
* @export
|
|
15624
15677
|
*/
|
|
15625
|
-
export const
|
|
15626
|
-
const localVarAxiosParamCreator =
|
|
15678
|
+
export const ReachContactFieldsApiFp = function (configuration) {
|
|
15679
|
+
const localVarAxiosParamCreator = ReachContactFieldsApiAxiosParamCreator(configuration);
|
|
15627
15680
|
return {
|
|
15628
15681
|
/**
|
|
15629
|
-
*
|
|
15630
|
-
* @summary Create a
|
|
15631
|
-
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
15632
|
-
* @param {*} [options] Override http request option.
|
|
15633
|
-
* @deprecated
|
|
15634
|
-
* @throws {RequiredError}
|
|
15635
|
-
*/
|
|
15636
|
-
createANewContactV1(reachV1ContactsStoreRequest, options) {
|
|
15637
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
15638
|
-
var _a, _b;
|
|
15639
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.createANewContactV1(reachV1ContactsStoreRequest, options);
|
|
15640
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.createANewContactV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15641
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15642
|
-
});
|
|
15643
|
-
},
|
|
15644
|
-
/**
|
|
15645
|
-
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
15646
|
-
* @summary Create new contacts
|
|
15682
|
+
* Define a new custom contact field in a profile. The `slug` is derived from the label and, like the field type, cannot be changed later. Use the returned uuid to set values on contacts.
|
|
15683
|
+
* @summary Create a contact field
|
|
15647
15684
|
* @param {string} profileUuid Profile uuid parameter
|
|
15648
|
-
* @param {
|
|
15685
|
+
* @param {ReachV1ContactsFieldsStoreRequest} reachV1ContactsFieldsStoreRequest
|
|
15649
15686
|
* @param {*} [options] Override http request option.
|
|
15650
15687
|
* @throws {RequiredError}
|
|
15651
15688
|
*/
|
|
15652
|
-
|
|
15689
|
+
createAContactFieldV1(profileUuid, reachV1ContactsFieldsStoreRequest, options) {
|
|
15653
15690
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15654
15691
|
var _a, _b;
|
|
15655
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
15656
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['
|
|
15692
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createAContactFieldV1(profileUuid, reachV1ContactsFieldsStoreRequest, options);
|
|
15693
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactFieldsApi.createAContactFieldV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15657
15694
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15658
15695
|
});
|
|
15659
15696
|
},
|
|
15660
15697
|
/**
|
|
15661
|
-
* Delete a contact with the
|
|
15662
|
-
* @summary Delete a contact
|
|
15663
|
-
* @param {string}
|
|
15698
|
+
* Delete a custom contact field. Every value contacts hold for the field is deleted with it, and for the choice types so are its options. The contacts themselves are not affected.
|
|
15699
|
+
* @summary Delete a contact field
|
|
15700
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15701
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15664
15702
|
* @param {*} [options] Override http request option.
|
|
15665
15703
|
* @throws {RequiredError}
|
|
15666
15704
|
*/
|
|
15667
|
-
|
|
15705
|
+
deleteAContactFieldV1(profileUuid, fieldUuid, options) {
|
|
15668
15706
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15669
15707
|
var _a, _b;
|
|
15670
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
15671
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['
|
|
15708
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAContactFieldV1(profileUuid, fieldUuid, options);
|
|
15709
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactFieldsApi.deleteAContactFieldV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15672
15710
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15673
15711
|
});
|
|
15674
15712
|
},
|
|
15675
15713
|
/**
|
|
15676
|
-
* Get
|
|
15677
|
-
* @summary List contact
|
|
15714
|
+
* Get the custom contact fields defined in a profile. Custom fields let you store your own attributes on contacts. The returned uuids are what you pass to the contact update endpoint to set values, and choice fields also list the options available to pick from.
|
|
15715
|
+
* @summary List contact fields
|
|
15716
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15678
15717
|
* @param {*} [options] Override http request option.
|
|
15679
|
-
* @deprecated
|
|
15680
15718
|
* @throws {RequiredError}
|
|
15681
15719
|
*/
|
|
15682
|
-
|
|
15720
|
+
listContactFieldsV1(profileUuid, options) {
|
|
15683
15721
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15684
15722
|
var _a, _b;
|
|
15685
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
15686
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['
|
|
15723
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listContactFieldsV1(profileUuid, options);
|
|
15724
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactFieldsApi.listContactFieldsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15687
15725
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15688
15726
|
});
|
|
15689
15727
|
},
|
|
15690
15728
|
/**
|
|
15691
|
-
*
|
|
15692
|
-
* @summary
|
|
15693
|
-
* @param {string}
|
|
15694
|
-
* @param {
|
|
15695
|
-
* @param {
|
|
15729
|
+
* Rename a custom contact field and, for the choice types, replace its option set. Options carrying a uuid are kept and relabelled, options without one are created, and any existing option left out of the list is deleted along with the values contacts hold for it. The field type and slug cannot be changed.
|
|
15730
|
+
* @summary Update a contact field
|
|
15731
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15732
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15733
|
+
* @param {ReachV1ContactsFieldsUpdateRequest} reachV1ContactsFieldsUpdateRequest
|
|
15696
15734
|
* @param {*} [options] Override http request option.
|
|
15697
15735
|
* @throws {RequiredError}
|
|
15698
15736
|
*/
|
|
15699
|
-
|
|
15737
|
+
updateAContactFieldV1(profileUuid, fieldUuid, reachV1ContactsFieldsUpdateRequest, options) {
|
|
15700
15738
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15701
15739
|
var _a, _b;
|
|
15702
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
15703
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['
|
|
15740
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAContactFieldV1(profileUuid, fieldUuid, reachV1ContactsFieldsUpdateRequest, options);
|
|
15741
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactFieldsApi.updateAContactFieldV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15704
15742
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15705
15743
|
});
|
|
15706
15744
|
},
|
|
15707
15745
|
};
|
|
15708
15746
|
};
|
|
15709
15747
|
/**
|
|
15710
|
-
*
|
|
15748
|
+
* ReachContactFieldsApi - factory interface
|
|
15711
15749
|
* @export
|
|
15712
15750
|
*/
|
|
15713
|
-
export const
|
|
15714
|
-
const localVarFp =
|
|
15751
|
+
export const ReachContactFieldsApiFactory = function (configuration, basePath, axios) {
|
|
15752
|
+
const localVarFp = ReachContactFieldsApiFp(configuration);
|
|
15715
15753
|
return {
|
|
15716
15754
|
/**
|
|
15717
|
-
*
|
|
15718
|
-
* @summary Create a
|
|
15719
|
-
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
15720
|
-
* @param {*} [options] Override http request option.
|
|
15721
|
-
* @deprecated
|
|
15722
|
-
* @throws {RequiredError}
|
|
15723
|
-
*/
|
|
15724
|
-
createANewContactV1(reachV1ContactsStoreRequest, options) {
|
|
15725
|
-
return localVarFp.createANewContactV1(reachV1ContactsStoreRequest, options).then((request) => request(axios, basePath));
|
|
15726
|
-
},
|
|
15727
|
-
/**
|
|
15728
|
-
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
15729
|
-
* @summary Create new contacts
|
|
15755
|
+
* Define a new custom contact field in a profile. The `slug` is derived from the label and, like the field type, cannot be changed later. Use the returned uuid to set values on contacts.
|
|
15756
|
+
* @summary Create a contact field
|
|
15730
15757
|
* @param {string} profileUuid Profile uuid parameter
|
|
15731
|
-
* @param {
|
|
15758
|
+
* @param {ReachV1ContactsFieldsStoreRequest} reachV1ContactsFieldsStoreRequest
|
|
15732
15759
|
* @param {*} [options] Override http request option.
|
|
15733
15760
|
* @throws {RequiredError}
|
|
15734
15761
|
*/
|
|
15735
|
-
|
|
15736
|
-
return localVarFp.
|
|
15762
|
+
createAContactFieldV1(profileUuid, reachV1ContactsFieldsStoreRequest, options) {
|
|
15763
|
+
return localVarFp.createAContactFieldV1(profileUuid, reachV1ContactsFieldsStoreRequest, options).then((request) => request(axios, basePath));
|
|
15737
15764
|
},
|
|
15738
15765
|
/**
|
|
15739
|
-
* Delete a contact with the
|
|
15740
|
-
* @summary Delete a contact
|
|
15741
|
-
* @param {string}
|
|
15766
|
+
* Delete a custom contact field. Every value contacts hold for the field is deleted with it, and for the choice types so are its options. The contacts themselves are not affected.
|
|
15767
|
+
* @summary Delete a contact field
|
|
15768
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15769
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15742
15770
|
* @param {*} [options] Override http request option.
|
|
15743
15771
|
* @throws {RequiredError}
|
|
15744
15772
|
*/
|
|
15745
|
-
|
|
15746
|
-
return localVarFp.
|
|
15773
|
+
deleteAContactFieldV1(profileUuid, fieldUuid, options) {
|
|
15774
|
+
return localVarFp.deleteAContactFieldV1(profileUuid, fieldUuid, options).then((request) => request(axios, basePath));
|
|
15747
15775
|
},
|
|
15748
15776
|
/**
|
|
15749
|
-
* Get
|
|
15750
|
-
* @summary List contact
|
|
15777
|
+
* Get the custom contact fields defined in a profile. Custom fields let you store your own attributes on contacts. The returned uuids are what you pass to the contact update endpoint to set values, and choice fields also list the options available to pick from.
|
|
15778
|
+
* @summary List contact fields
|
|
15779
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15751
15780
|
* @param {*} [options] Override http request option.
|
|
15752
|
-
* @deprecated
|
|
15753
15781
|
* @throws {RequiredError}
|
|
15754
15782
|
*/
|
|
15755
|
-
|
|
15756
|
-
return localVarFp.
|
|
15783
|
+
listContactFieldsV1(profileUuid, options) {
|
|
15784
|
+
return localVarFp.listContactFieldsV1(profileUuid, options).then((request) => request(axios, basePath));
|
|
15757
15785
|
},
|
|
15758
15786
|
/**
|
|
15759
|
-
*
|
|
15760
|
-
* @summary
|
|
15761
|
-
* @param {string}
|
|
15762
|
-
* @param {
|
|
15763
|
-
* @param {
|
|
15787
|
+
* Rename a custom contact field and, for the choice types, replace its option set. Options carrying a uuid are kept and relabelled, options without one are created, and any existing option left out of the list is deleted along with the values contacts hold for it. The field type and slug cannot be changed.
|
|
15788
|
+
* @summary Update a contact field
|
|
15789
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15790
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15791
|
+
* @param {ReachV1ContactsFieldsUpdateRequest} reachV1ContactsFieldsUpdateRequest
|
|
15764
15792
|
* @param {*} [options] Override http request option.
|
|
15765
15793
|
* @throws {RequiredError}
|
|
15766
15794
|
*/
|
|
15767
|
-
|
|
15768
|
-
return localVarFp.
|
|
15795
|
+
updateAContactFieldV1(profileUuid, fieldUuid, reachV1ContactsFieldsUpdateRequest, options) {
|
|
15796
|
+
return localVarFp.updateAContactFieldV1(profileUuid, fieldUuid, reachV1ContactsFieldsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
15769
15797
|
},
|
|
15770
15798
|
};
|
|
15771
15799
|
};
|
|
15772
15800
|
/**
|
|
15773
|
-
*
|
|
15801
|
+
* ReachContactFieldsApi - object-oriented interface
|
|
15774
15802
|
* @export
|
|
15775
|
-
* @class
|
|
15803
|
+
* @class ReachContactFieldsApi
|
|
15776
15804
|
* @extends {BaseAPI}
|
|
15777
15805
|
*/
|
|
15778
|
-
export class
|
|
15779
|
-
/**
|
|
15780
|
-
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
15781
|
-
* @summary Create a new contact
|
|
15782
|
-
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
15783
|
-
* @param {*} [options] Override http request option.
|
|
15784
|
-
* @deprecated
|
|
15785
|
-
* @throws {RequiredError}
|
|
15786
|
-
* @memberof ReachContactsApi
|
|
15787
|
-
*/
|
|
15788
|
-
createANewContactV1(reachV1ContactsStoreRequest, options) {
|
|
15789
|
-
return ReachContactsApiFp(this.configuration).createANewContactV1(reachV1ContactsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
15790
|
-
}
|
|
15806
|
+
export class ReachContactFieldsApi extends BaseAPI {
|
|
15791
15807
|
/**
|
|
15792
|
-
*
|
|
15793
|
-
* @summary Create
|
|
15808
|
+
* Define a new custom contact field in a profile. The `slug` is derived from the label and, like the field type, cannot be changed later. Use the returned uuid to set values on contacts.
|
|
15809
|
+
* @summary Create a contact field
|
|
15794
15810
|
* @param {string} profileUuid Profile uuid parameter
|
|
15795
|
-
* @param {
|
|
15811
|
+
* @param {ReachV1ContactsFieldsStoreRequest} reachV1ContactsFieldsStoreRequest
|
|
15796
15812
|
* @param {*} [options] Override http request option.
|
|
15797
15813
|
* @throws {RequiredError}
|
|
15798
|
-
* @memberof
|
|
15814
|
+
* @memberof ReachContactFieldsApi
|
|
15799
15815
|
*/
|
|
15800
|
-
|
|
15801
|
-
return
|
|
15816
|
+
createAContactFieldV1(profileUuid, reachV1ContactsFieldsStoreRequest, options) {
|
|
15817
|
+
return ReachContactFieldsApiFp(this.configuration).createAContactFieldV1(profileUuid, reachV1ContactsFieldsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
15802
15818
|
}
|
|
15803
15819
|
/**
|
|
15804
|
-
* Delete a contact with the
|
|
15805
|
-
* @summary Delete a contact
|
|
15806
|
-
* @param {string}
|
|
15820
|
+
* Delete a custom contact field. Every value contacts hold for the field is deleted with it, and for the choice types so are its options. The contacts themselves are not affected.
|
|
15821
|
+
* @summary Delete a contact field
|
|
15822
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15823
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15807
15824
|
* @param {*} [options] Override http request option.
|
|
15808
15825
|
* @throws {RequiredError}
|
|
15809
|
-
* @memberof
|
|
15826
|
+
* @memberof ReachContactFieldsApi
|
|
15810
15827
|
*/
|
|
15811
|
-
|
|
15812
|
-
return
|
|
15828
|
+
deleteAContactFieldV1(profileUuid, fieldUuid, options) {
|
|
15829
|
+
return ReachContactFieldsApiFp(this.configuration).deleteAContactFieldV1(profileUuid, fieldUuid, options).then((request) => request(this.axios, this.basePath));
|
|
15813
15830
|
}
|
|
15814
15831
|
/**
|
|
15815
|
-
* Get
|
|
15816
|
-
* @summary List contact
|
|
15832
|
+
* Get the custom contact fields defined in a profile. Custom fields let you store your own attributes on contacts. The returned uuids are what you pass to the contact update endpoint to set values, and choice fields also list the options available to pick from.
|
|
15833
|
+
* @summary List contact fields
|
|
15834
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15817
15835
|
* @param {*} [options] Override http request option.
|
|
15818
|
-
* @deprecated
|
|
15819
15836
|
* @throws {RequiredError}
|
|
15820
|
-
* @memberof
|
|
15837
|
+
* @memberof ReachContactFieldsApi
|
|
15821
15838
|
*/
|
|
15822
|
-
|
|
15823
|
-
return
|
|
15839
|
+
listContactFieldsV1(profileUuid, options) {
|
|
15840
|
+
return ReachContactFieldsApiFp(this.configuration).listContactFieldsV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
|
|
15824
15841
|
}
|
|
15825
15842
|
/**
|
|
15826
|
-
*
|
|
15827
|
-
* @summary
|
|
15828
|
-
* @param {string}
|
|
15829
|
-
* @param {
|
|
15830
|
-
* @param {
|
|
15843
|
+
* Rename a custom contact field and, for the choice types, replace its option set. Options carrying a uuid are kept and relabelled, options without one are created, and any existing option left out of the list is deleted along with the values contacts hold for it. The field type and slug cannot be changed.
|
|
15844
|
+
* @summary Update a contact field
|
|
15845
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15846
|
+
* @param {string} fieldUuid Contact field uuid parameter
|
|
15847
|
+
* @param {ReachV1ContactsFieldsUpdateRequest} reachV1ContactsFieldsUpdateRequest
|
|
15831
15848
|
* @param {*} [options] Override http request option.
|
|
15832
15849
|
* @throws {RequiredError}
|
|
15833
|
-
* @memberof
|
|
15850
|
+
* @memberof ReachContactFieldsApi
|
|
15834
15851
|
*/
|
|
15835
|
-
|
|
15836
|
-
return
|
|
15852
|
+
updateAContactFieldV1(profileUuid, fieldUuid, reachV1ContactsFieldsUpdateRequest, options) {
|
|
15853
|
+
return ReachContactFieldsApiFp(this.configuration).updateAContactFieldV1(profileUuid, fieldUuid, reachV1ContactsFieldsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
15837
15854
|
}
|
|
15838
15855
|
}
|
|
15839
15856
|
/**
|
|
15857
|
+
* ReachContactsApi - axios parameter creator
|
|
15840
15858
|
* @export
|
|
15841
15859
|
*/
|
|
15842
|
-
export const
|
|
15843
|
-
|
|
15844
|
-
|
|
15860
|
+
export const ReachContactsApiAxiosParamCreator = function (configuration) {
|
|
15861
|
+
return {
|
|
15862
|
+
/**
|
|
15863
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
15864
|
+
* @summary Create a new contact
|
|
15865
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
15866
|
+
* @param {*} [options] Override http request option.
|
|
15867
|
+
* @deprecated
|
|
15868
|
+
* @throws {RequiredError}
|
|
15869
|
+
*/
|
|
15870
|
+
createANewContactV1: (reachV1ContactsStoreRequest_1, ...args_1) => __awaiter(this, [reachV1ContactsStoreRequest_1, ...args_1], void 0, function* (reachV1ContactsStoreRequest, options = {}) {
|
|
15871
|
+
// verify required parameter 'reachV1ContactsStoreRequest' is not null or undefined
|
|
15872
|
+
assertParamExists('createANewContactV1', 'reachV1ContactsStoreRequest', reachV1ContactsStoreRequest);
|
|
15873
|
+
const localVarPath = `/api/reach/v1/contacts`;
|
|
15874
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15875
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15876
|
+
let baseOptions;
|
|
15877
|
+
if (configuration) {
|
|
15878
|
+
baseOptions = configuration.baseOptions;
|
|
15879
|
+
}
|
|
15880
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
15881
|
+
const localVarHeaderParameter = {};
|
|
15882
|
+
const localVarQueryParameter = {};
|
|
15883
|
+
// authentication apiToken required
|
|
15884
|
+
// http bearer authentication required
|
|
15885
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
15886
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
15887
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
15888
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15889
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15890
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsStoreRequest, localVarRequestOptions, configuration);
|
|
15891
|
+
return {
|
|
15892
|
+
url: toPathString(localVarUrlObj),
|
|
15893
|
+
options: localVarRequestOptions,
|
|
15894
|
+
};
|
|
15895
|
+
}),
|
|
15896
|
+
/**
|
|
15897
|
+
* Create many contacts in a profile in a single call. The contacts are imported in the background, so a success response means the import was accepted rather than finished. Contacts whose email already exists in the profile are left as they are. If double opt-in is enabled, new contacts start off pending and are sent a confirmation email.
|
|
15898
|
+
* @summary Create contacts in bulk
|
|
15899
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15900
|
+
* @param {ReachV1ContactsBulkStoreRequest} reachV1ContactsBulkStoreRequest
|
|
15901
|
+
* @param {*} [options] Override http request option.
|
|
15902
|
+
* @throws {RequiredError}
|
|
15903
|
+
*/
|
|
15904
|
+
createContactsInBulkV1: (profileUuid_1, reachV1ContactsBulkStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1ContactsBulkStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1ContactsBulkStoreRequest, options = {}) {
|
|
15905
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
15906
|
+
assertParamExists('createContactsInBulkV1', 'profileUuid', profileUuid);
|
|
15907
|
+
// verify required parameter 'reachV1ContactsBulkStoreRequest' is not null or undefined
|
|
15908
|
+
assertParamExists('createContactsInBulkV1', 'reachV1ContactsBulkStoreRequest', reachV1ContactsBulkStoreRequest);
|
|
15909
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/bulk`
|
|
15910
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
15911
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15912
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15913
|
+
let baseOptions;
|
|
15914
|
+
if (configuration) {
|
|
15915
|
+
baseOptions = configuration.baseOptions;
|
|
15916
|
+
}
|
|
15917
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
15918
|
+
const localVarHeaderParameter = {};
|
|
15919
|
+
const localVarQueryParameter = {};
|
|
15920
|
+
// authentication apiToken required
|
|
15921
|
+
// http bearer authentication required
|
|
15922
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
15923
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
15924
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
15925
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15926
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15927
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsBulkStoreRequest, localVarRequestOptions, configuration);
|
|
15928
|
+
return {
|
|
15929
|
+
url: toPathString(localVarUrlObj),
|
|
15930
|
+
options: localVarRequestOptions,
|
|
15931
|
+
};
|
|
15932
|
+
}),
|
|
15933
|
+
/**
|
|
15934
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
15935
|
+
* @summary Create new contacts
|
|
15936
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
15937
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
15938
|
+
* @param {*} [options] Override http request option.
|
|
15939
|
+
* @throws {RequiredError}
|
|
15940
|
+
*/
|
|
15941
|
+
createNewContactsV1: (profileUuid_1, reachV1ContactsStoreRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1ContactsStoreRequest_1, ...args_1], void 0, function* (profileUuid, reachV1ContactsStoreRequest, options = {}) {
|
|
15942
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
15943
|
+
assertParamExists('createNewContactsV1', 'profileUuid', profileUuid);
|
|
15944
|
+
// verify required parameter 'reachV1ContactsStoreRequest' is not null or undefined
|
|
15945
|
+
assertParamExists('createNewContactsV1', 'reachV1ContactsStoreRequest', reachV1ContactsStoreRequest);
|
|
15946
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts`
|
|
15947
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
15948
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15949
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15950
|
+
let baseOptions;
|
|
15951
|
+
if (configuration) {
|
|
15952
|
+
baseOptions = configuration.baseOptions;
|
|
15953
|
+
}
|
|
15954
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
15955
|
+
const localVarHeaderParameter = {};
|
|
15956
|
+
const localVarQueryParameter = {};
|
|
15957
|
+
// authentication apiToken required
|
|
15958
|
+
// http bearer authentication required
|
|
15959
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
15960
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
15961
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
15962
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15963
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15964
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsStoreRequest, localVarRequestOptions, configuration);
|
|
15965
|
+
return {
|
|
15966
|
+
url: toPathString(localVarUrlObj),
|
|
15967
|
+
options: localVarRequestOptions,
|
|
15968
|
+
};
|
|
15969
|
+
}),
|
|
15970
|
+
/**
|
|
15971
|
+
* Delete a contact with the specified UUID. This endpoint permanently removes a contact from the email marketing system. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot delete contacts of any other profile. Use `DELETE /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}` instead.
|
|
15972
|
+
* @summary Delete a contact
|
|
15973
|
+
* @param {string} uuid UUID of the contact to delete
|
|
15974
|
+
* @param {*} [options] Override http request option.
|
|
15975
|
+
* @deprecated
|
|
15976
|
+
* @throws {RequiredError}
|
|
15977
|
+
*/
|
|
15978
|
+
deleteAContactV1: (uuid_1, ...args_1) => __awaiter(this, [uuid_1, ...args_1], void 0, function* (uuid, options = {}) {
|
|
15979
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
15980
|
+
assertParamExists('deleteAContactV1', 'uuid', uuid);
|
|
15981
|
+
const localVarPath = `/api/reach/v1/contacts/{uuid}`
|
|
15982
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
15983
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15984
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
15985
|
+
let baseOptions;
|
|
15986
|
+
if (configuration) {
|
|
15987
|
+
baseOptions = configuration.baseOptions;
|
|
15988
|
+
}
|
|
15989
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
15990
|
+
const localVarHeaderParameter = {};
|
|
15991
|
+
const localVarQueryParameter = {};
|
|
15992
|
+
// authentication apiToken required
|
|
15993
|
+
// http bearer authentication required
|
|
15994
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
15995
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
15996
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15997
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15998
|
+
return {
|
|
15999
|
+
url: toPathString(localVarUrlObj),
|
|
16000
|
+
options: localVarRequestOptions,
|
|
16001
|
+
};
|
|
16002
|
+
}),
|
|
16003
|
+
/**
|
|
16004
|
+
* Permanently delete a contact from a profile. The contact is removed together with its custom field values and tag assignments.
|
|
16005
|
+
* @summary Delete a profile contact
|
|
16006
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16007
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16008
|
+
* @param {*} [options] Override http request option.
|
|
16009
|
+
* @throws {RequiredError}
|
|
16010
|
+
*/
|
|
16011
|
+
deleteAProfileContactV1: (profileUuid_1, contactUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, contactUuid_1, ...args_1], void 0, function* (profileUuid, contactUuid, options = {}) {
|
|
16012
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
16013
|
+
assertParamExists('deleteAProfileContactV1', 'profileUuid', profileUuid);
|
|
16014
|
+
// verify required parameter 'contactUuid' is not null or undefined
|
|
16015
|
+
assertParamExists('deleteAProfileContactV1', 'contactUuid', contactUuid);
|
|
16016
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}`
|
|
16017
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
16018
|
+
.replace(`{${"contactUuid"}}`, encodeURIComponent(String(contactUuid)));
|
|
16019
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
16020
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
16021
|
+
let baseOptions;
|
|
16022
|
+
if (configuration) {
|
|
16023
|
+
baseOptions = configuration.baseOptions;
|
|
16024
|
+
}
|
|
16025
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
16026
|
+
const localVarHeaderParameter = {};
|
|
16027
|
+
const localVarQueryParameter = {};
|
|
16028
|
+
// authentication apiToken required
|
|
16029
|
+
// http bearer authentication required
|
|
16030
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
16031
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
16032
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16033
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
16034
|
+
return {
|
|
16035
|
+
url: toPathString(localVarUrlObj),
|
|
16036
|
+
options: localVarRequestOptions,
|
|
16037
|
+
};
|
|
16038
|
+
}),
|
|
16039
|
+
/**
|
|
16040
|
+
* Get the full details of a single contact. Alongside the contact\'s own attributes this returns the tags assigned to it and the values it holds for the profile\'s custom contact fields.
|
|
16041
|
+
* @summary Get contact details
|
|
16042
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16043
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16044
|
+
* @param {*} [options] Override http request option.
|
|
16045
|
+
* @throws {RequiredError}
|
|
16046
|
+
*/
|
|
16047
|
+
getContactDetailsV1: (profileUuid_1, contactUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, contactUuid_1, ...args_1], void 0, function* (profileUuid, contactUuid, options = {}) {
|
|
16048
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
16049
|
+
assertParamExists('getContactDetailsV1', 'profileUuid', profileUuid);
|
|
16050
|
+
// verify required parameter 'contactUuid' is not null or undefined
|
|
16051
|
+
assertParamExists('getContactDetailsV1', 'contactUuid', contactUuid);
|
|
16052
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}`
|
|
16053
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
16054
|
+
.replace(`{${"contactUuid"}}`, encodeURIComponent(String(contactUuid)));
|
|
16055
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
16056
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
16057
|
+
let baseOptions;
|
|
16058
|
+
if (configuration) {
|
|
16059
|
+
baseOptions = configuration.baseOptions;
|
|
16060
|
+
}
|
|
16061
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
16062
|
+
const localVarHeaderParameter = {};
|
|
16063
|
+
const localVarQueryParameter = {};
|
|
16064
|
+
// authentication apiToken required
|
|
16065
|
+
// http bearer authentication required
|
|
16066
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
16067
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
16068
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16069
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
16070
|
+
return {
|
|
16071
|
+
url: toPathString(localVarUrlObj),
|
|
16072
|
+
options: localVarRequestOptions,
|
|
16073
|
+
};
|
|
16074
|
+
}),
|
|
16075
|
+
/**
|
|
16076
|
+
* Get a list of all contact groups. This endpoint returns a list of contact groups that can be used to organize contacts.
|
|
16077
|
+
* @summary List contact groups
|
|
16078
|
+
* @param {*} [options] Override http request option.
|
|
16079
|
+
* @deprecated
|
|
16080
|
+
* @throws {RequiredError}
|
|
16081
|
+
*/
|
|
16082
|
+
listContactGroupsV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
16083
|
+
const localVarPath = `/api/reach/v1/contacts/groups`;
|
|
16084
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
16085
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
16086
|
+
let baseOptions;
|
|
16087
|
+
if (configuration) {
|
|
16088
|
+
baseOptions = configuration.baseOptions;
|
|
16089
|
+
}
|
|
16090
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
16091
|
+
const localVarHeaderParameter = {};
|
|
16092
|
+
const localVarQueryParameter = {};
|
|
16093
|
+
// authentication apiToken required
|
|
16094
|
+
// http bearer authentication required
|
|
16095
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
16096
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
16097
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16098
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
16099
|
+
return {
|
|
16100
|
+
url: toPathString(localVarUrlObj),
|
|
16101
|
+
options: localVarRequestOptions,
|
|
16102
|
+
};
|
|
16103
|
+
}),
|
|
16104
|
+
/**
|
|
16105
|
+
* Get a list of contacts, optionally filtered by group and subscription status. This endpoint returns a paginated list of contacts with their basic information. You can filter contacts by group UUID and subscription status. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list contacts of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/contacts` instead, which also replaces the group filter with a tag filter.
|
|
16106
|
+
* @summary List contacts
|
|
16107
|
+
* @param {string} [groupUuid] Filter contacts by group UUID
|
|
16108
|
+
* @param {ListContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16109
|
+
* @param {number} [page] Page number
|
|
16110
|
+
* @param {*} [options] Override http request option.
|
|
16111
|
+
* @deprecated
|
|
16112
|
+
* @throws {RequiredError}
|
|
16113
|
+
*/
|
|
16114
|
+
listContactsV1: (groupUuid_1, subscriptionStatus_1, page_1, ...args_1) => __awaiter(this, [groupUuid_1, subscriptionStatus_1, page_1, ...args_1], void 0, function* (groupUuid, subscriptionStatus, page, options = {}) {
|
|
16115
|
+
const localVarPath = `/api/reach/v1/contacts`;
|
|
16116
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
16117
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
16118
|
+
let baseOptions;
|
|
16119
|
+
if (configuration) {
|
|
16120
|
+
baseOptions = configuration.baseOptions;
|
|
16121
|
+
}
|
|
16122
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
16123
|
+
const localVarHeaderParameter = {};
|
|
16124
|
+
const localVarQueryParameter = {};
|
|
16125
|
+
// authentication apiToken required
|
|
16126
|
+
// http bearer authentication required
|
|
16127
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
16128
|
+
if (groupUuid !== undefined) {
|
|
16129
|
+
localVarQueryParameter['group_uuid'] = groupUuid;
|
|
16130
|
+
}
|
|
16131
|
+
if (subscriptionStatus !== undefined) {
|
|
16132
|
+
localVarQueryParameter['subscription_status'] = subscriptionStatus;
|
|
16133
|
+
}
|
|
16134
|
+
if (page !== undefined) {
|
|
16135
|
+
localVarQueryParameter['page'] = page;
|
|
16136
|
+
}
|
|
16137
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
16138
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16139
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
16140
|
+
return {
|
|
16141
|
+
url: toPathString(localVarUrlObj),
|
|
16142
|
+
options: localVarRequestOptions,
|
|
16143
|
+
};
|
|
16144
|
+
}),
|
|
16145
|
+
/**
|
|
16146
|
+
* Get a paginated list of contacts belonging to a profile. Contacts can be filtered by subscription status, by tag, and by an email search term. The `meta.total` field of the response is the number of contacts matching the filters, so calling this endpoint without filters gives the profile\'s total contact count.
|
|
16147
|
+
* @summary List profile contacts
|
|
16148
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16149
|
+
* @param {ListProfileContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16150
|
+
* @param {string} [tagUuid] Filter contacts by tag UUID
|
|
16151
|
+
* @param {string} [search] Search contacts by email
|
|
16152
|
+
* @param {number} [page] Page number
|
|
16153
|
+
* @param {number} [perPage] Number of items per page
|
|
16154
|
+
* @param {*} [options] Override http request option.
|
|
16155
|
+
* @throws {RequiredError}
|
|
16156
|
+
*/
|
|
16157
|
+
listProfileContactsV1: (profileUuid_1, subscriptionStatus_1, tagUuid_1, search_1, page_1, perPage_1, ...args_1) => __awaiter(this, [profileUuid_1, subscriptionStatus_1, tagUuid_1, search_1, page_1, perPage_1, ...args_1], void 0, function* (profileUuid, subscriptionStatus, tagUuid, search, page, perPage, options = {}) {
|
|
16158
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
16159
|
+
assertParamExists('listProfileContactsV1', 'profileUuid', profileUuid);
|
|
16160
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts`
|
|
16161
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
16162
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
16163
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
16164
|
+
let baseOptions;
|
|
16165
|
+
if (configuration) {
|
|
16166
|
+
baseOptions = configuration.baseOptions;
|
|
16167
|
+
}
|
|
16168
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
16169
|
+
const localVarHeaderParameter = {};
|
|
16170
|
+
const localVarQueryParameter = {};
|
|
16171
|
+
// authentication apiToken required
|
|
16172
|
+
// http bearer authentication required
|
|
16173
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
16174
|
+
if (subscriptionStatus !== undefined) {
|
|
16175
|
+
localVarQueryParameter['subscription_status'] = subscriptionStatus;
|
|
16176
|
+
}
|
|
16177
|
+
if (tagUuid !== undefined) {
|
|
16178
|
+
localVarQueryParameter['tag_uuid'] = tagUuid;
|
|
16179
|
+
}
|
|
16180
|
+
if (search !== undefined) {
|
|
16181
|
+
localVarQueryParameter['search'] = search;
|
|
16182
|
+
}
|
|
16183
|
+
if (page !== undefined) {
|
|
16184
|
+
localVarQueryParameter['page'] = page;
|
|
16185
|
+
}
|
|
16186
|
+
if (perPage !== undefined) {
|
|
16187
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
16188
|
+
}
|
|
16189
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
16190
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16191
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
16192
|
+
return {
|
|
16193
|
+
url: toPathString(localVarUrlObj),
|
|
16194
|
+
options: localVarRequestOptions,
|
|
16195
|
+
};
|
|
16196
|
+
}),
|
|
16197
|
+
/**
|
|
16198
|
+
* Update a contact\'s attributes and custom field values. Only the properties present in the request body are changed, so a partial body is enough to change a single attribute. Sending a property as `null` clears it. The response carries the contact\'s core attributes. Read back its tags, custom field values, source and note with `GET /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}`.
|
|
16199
|
+
* @summary Update a contact
|
|
16200
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16201
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16202
|
+
* @param {ReachV1ContactsUpdateRequest} reachV1ContactsUpdateRequest
|
|
16203
|
+
* @param {*} [options] Override http request option.
|
|
16204
|
+
* @throws {RequiredError}
|
|
16205
|
+
*/
|
|
16206
|
+
updateAContactV1: (profileUuid_1, contactUuid_1, reachV1ContactsUpdateRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, contactUuid_1, reachV1ContactsUpdateRequest_1, ...args_1], void 0, function* (profileUuid, contactUuid, reachV1ContactsUpdateRequest, options = {}) {
|
|
16207
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
16208
|
+
assertParamExists('updateAContactV1', 'profileUuid', profileUuid);
|
|
16209
|
+
// verify required parameter 'contactUuid' is not null or undefined
|
|
16210
|
+
assertParamExists('updateAContactV1', 'contactUuid', contactUuid);
|
|
16211
|
+
// verify required parameter 'reachV1ContactsUpdateRequest' is not null or undefined
|
|
16212
|
+
assertParamExists('updateAContactV1', 'reachV1ContactsUpdateRequest', reachV1ContactsUpdateRequest);
|
|
16213
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}`
|
|
16214
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
16215
|
+
.replace(`{${"contactUuid"}}`, encodeURIComponent(String(contactUuid)));
|
|
16216
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
16217
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
16218
|
+
let baseOptions;
|
|
16219
|
+
if (configuration) {
|
|
16220
|
+
baseOptions = configuration.baseOptions;
|
|
16221
|
+
}
|
|
16222
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
16223
|
+
const localVarHeaderParameter = {};
|
|
16224
|
+
const localVarQueryParameter = {};
|
|
16225
|
+
// authentication apiToken required
|
|
16226
|
+
// http bearer authentication required
|
|
16227
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
16228
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
16229
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
16230
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16231
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
16232
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsUpdateRequest, localVarRequestOptions, configuration);
|
|
16233
|
+
return {
|
|
16234
|
+
url: toPathString(localVarUrlObj),
|
|
16235
|
+
options: localVarRequestOptions,
|
|
16236
|
+
};
|
|
16237
|
+
}),
|
|
16238
|
+
};
|
|
16239
|
+
};
|
|
16240
|
+
/**
|
|
16241
|
+
* ReachContactsApi - functional programming interface
|
|
16242
|
+
* @export
|
|
16243
|
+
*/
|
|
16244
|
+
export const ReachContactsApiFp = function (configuration) {
|
|
16245
|
+
const localVarAxiosParamCreator = ReachContactsApiAxiosParamCreator(configuration);
|
|
16246
|
+
return {
|
|
16247
|
+
/**
|
|
16248
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
16249
|
+
* @summary Create a new contact
|
|
16250
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
16251
|
+
* @param {*} [options] Override http request option.
|
|
16252
|
+
* @deprecated
|
|
16253
|
+
* @throws {RequiredError}
|
|
16254
|
+
*/
|
|
16255
|
+
createANewContactV1(reachV1ContactsStoreRequest, options) {
|
|
16256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16257
|
+
var _a, _b;
|
|
16258
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createANewContactV1(reachV1ContactsStoreRequest, options);
|
|
16259
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.createANewContactV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16260
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16261
|
+
});
|
|
16262
|
+
},
|
|
16263
|
+
/**
|
|
16264
|
+
* Create many contacts in a profile in a single call. The contacts are imported in the background, so a success response means the import was accepted rather than finished. Contacts whose email already exists in the profile are left as they are. If double opt-in is enabled, new contacts start off pending and are sent a confirmation email.
|
|
16265
|
+
* @summary Create contacts in bulk
|
|
16266
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16267
|
+
* @param {ReachV1ContactsBulkStoreRequest} reachV1ContactsBulkStoreRequest
|
|
16268
|
+
* @param {*} [options] Override http request option.
|
|
16269
|
+
* @throws {RequiredError}
|
|
16270
|
+
*/
|
|
16271
|
+
createContactsInBulkV1(profileUuid, reachV1ContactsBulkStoreRequest, options) {
|
|
16272
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16273
|
+
var _a, _b;
|
|
16274
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createContactsInBulkV1(profileUuid, reachV1ContactsBulkStoreRequest, options);
|
|
16275
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.createContactsInBulkV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16276
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16277
|
+
});
|
|
16278
|
+
},
|
|
16279
|
+
/**
|
|
16280
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
16281
|
+
* @summary Create new contacts
|
|
16282
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16283
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
16284
|
+
* @param {*} [options] Override http request option.
|
|
16285
|
+
* @throws {RequiredError}
|
|
16286
|
+
*/
|
|
16287
|
+
createNewContactsV1(profileUuid, reachV1ContactsStoreRequest, options) {
|
|
16288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16289
|
+
var _a, _b;
|
|
16290
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createNewContactsV1(profileUuid, reachV1ContactsStoreRequest, options);
|
|
16291
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.createNewContactsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16292
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16293
|
+
});
|
|
16294
|
+
},
|
|
16295
|
+
/**
|
|
16296
|
+
* Delete a contact with the specified UUID. This endpoint permanently removes a contact from the email marketing system. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot delete contacts of any other profile. Use `DELETE /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}` instead.
|
|
16297
|
+
* @summary Delete a contact
|
|
16298
|
+
* @param {string} uuid UUID of the contact to delete
|
|
16299
|
+
* @param {*} [options] Override http request option.
|
|
16300
|
+
* @deprecated
|
|
16301
|
+
* @throws {RequiredError}
|
|
16302
|
+
*/
|
|
16303
|
+
deleteAContactV1(uuid, options) {
|
|
16304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16305
|
+
var _a, _b;
|
|
16306
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAContactV1(uuid, options);
|
|
16307
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.deleteAContactV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16308
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16309
|
+
});
|
|
16310
|
+
},
|
|
16311
|
+
/**
|
|
16312
|
+
* Permanently delete a contact from a profile. The contact is removed together with its custom field values and tag assignments.
|
|
16313
|
+
* @summary Delete a profile contact
|
|
16314
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16315
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16316
|
+
* @param {*} [options] Override http request option.
|
|
16317
|
+
* @throws {RequiredError}
|
|
16318
|
+
*/
|
|
16319
|
+
deleteAProfileContactV1(profileUuid, contactUuid, options) {
|
|
16320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16321
|
+
var _a, _b;
|
|
16322
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAProfileContactV1(profileUuid, contactUuid, options);
|
|
16323
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.deleteAProfileContactV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16324
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16325
|
+
});
|
|
16326
|
+
},
|
|
16327
|
+
/**
|
|
16328
|
+
* Get the full details of a single contact. Alongside the contact\'s own attributes this returns the tags assigned to it and the values it holds for the profile\'s custom contact fields.
|
|
16329
|
+
* @summary Get contact details
|
|
16330
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16331
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16332
|
+
* @param {*} [options] Override http request option.
|
|
16333
|
+
* @throws {RequiredError}
|
|
16334
|
+
*/
|
|
16335
|
+
getContactDetailsV1(profileUuid, contactUuid, options) {
|
|
16336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16337
|
+
var _a, _b;
|
|
16338
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getContactDetailsV1(profileUuid, contactUuid, options);
|
|
16339
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.getContactDetailsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16340
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16341
|
+
});
|
|
16342
|
+
},
|
|
16343
|
+
/**
|
|
16344
|
+
* Get a list of all contact groups. This endpoint returns a list of contact groups that can be used to organize contacts.
|
|
16345
|
+
* @summary List contact groups
|
|
16346
|
+
* @param {*} [options] Override http request option.
|
|
16347
|
+
* @deprecated
|
|
16348
|
+
* @throws {RequiredError}
|
|
16349
|
+
*/
|
|
16350
|
+
listContactGroupsV1(options) {
|
|
16351
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16352
|
+
var _a, _b;
|
|
16353
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listContactGroupsV1(options);
|
|
16354
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.listContactGroupsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16355
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16356
|
+
});
|
|
16357
|
+
},
|
|
16358
|
+
/**
|
|
16359
|
+
* Get a list of contacts, optionally filtered by group and subscription status. This endpoint returns a paginated list of contacts with their basic information. You can filter contacts by group UUID and subscription status. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list contacts of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/contacts` instead, which also replaces the group filter with a tag filter.
|
|
16360
|
+
* @summary List contacts
|
|
16361
|
+
* @param {string} [groupUuid] Filter contacts by group UUID
|
|
16362
|
+
* @param {ListContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16363
|
+
* @param {number} [page] Page number
|
|
16364
|
+
* @param {*} [options] Override http request option.
|
|
16365
|
+
* @deprecated
|
|
16366
|
+
* @throws {RequiredError}
|
|
16367
|
+
*/
|
|
16368
|
+
listContactsV1(groupUuid, subscriptionStatus, page, options) {
|
|
16369
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16370
|
+
var _a, _b;
|
|
16371
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listContactsV1(groupUuid, subscriptionStatus, page, options);
|
|
16372
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.listContactsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16373
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16374
|
+
});
|
|
16375
|
+
},
|
|
16376
|
+
/**
|
|
16377
|
+
* Get a paginated list of contacts belonging to a profile. Contacts can be filtered by subscription status, by tag, and by an email search term. The `meta.total` field of the response is the number of contacts matching the filters, so calling this endpoint without filters gives the profile\'s total contact count.
|
|
16378
|
+
* @summary List profile contacts
|
|
16379
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16380
|
+
* @param {ListProfileContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16381
|
+
* @param {string} [tagUuid] Filter contacts by tag UUID
|
|
16382
|
+
* @param {string} [search] Search contacts by email
|
|
16383
|
+
* @param {number} [page] Page number
|
|
16384
|
+
* @param {number} [perPage] Number of items per page
|
|
16385
|
+
* @param {*} [options] Override http request option.
|
|
16386
|
+
* @throws {RequiredError}
|
|
16387
|
+
*/
|
|
16388
|
+
listProfileContactsV1(profileUuid, subscriptionStatus, tagUuid, search, page, perPage, options) {
|
|
16389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16390
|
+
var _a, _b;
|
|
16391
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listProfileContactsV1(profileUuid, subscriptionStatus, tagUuid, search, page, perPage, options);
|
|
16392
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.listProfileContactsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16393
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16394
|
+
});
|
|
16395
|
+
},
|
|
16396
|
+
/**
|
|
16397
|
+
* Update a contact\'s attributes and custom field values. Only the properties present in the request body are changed, so a partial body is enough to change a single attribute. Sending a property as `null` clears it. The response carries the contact\'s core attributes. Read back its tags, custom field values, source and note with `GET /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}`.
|
|
16398
|
+
* @summary Update a contact
|
|
16399
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16400
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16401
|
+
* @param {ReachV1ContactsUpdateRequest} reachV1ContactsUpdateRequest
|
|
16402
|
+
* @param {*} [options] Override http request option.
|
|
16403
|
+
* @throws {RequiredError}
|
|
16404
|
+
*/
|
|
16405
|
+
updateAContactV1(profileUuid, contactUuid, reachV1ContactsUpdateRequest, options) {
|
|
16406
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16407
|
+
var _a, _b;
|
|
16408
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAContactV1(profileUuid, contactUuid, reachV1ContactsUpdateRequest, options);
|
|
16409
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachContactsApi.updateAContactV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
16410
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16411
|
+
});
|
|
16412
|
+
},
|
|
16413
|
+
};
|
|
16414
|
+
};
|
|
16415
|
+
/**
|
|
16416
|
+
* ReachContactsApi - factory interface
|
|
16417
|
+
* @export
|
|
16418
|
+
*/
|
|
16419
|
+
export const ReachContactsApiFactory = function (configuration, basePath, axios) {
|
|
16420
|
+
const localVarFp = ReachContactsApiFp(configuration);
|
|
16421
|
+
return {
|
|
16422
|
+
/**
|
|
16423
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
16424
|
+
* @summary Create a new contact
|
|
16425
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
16426
|
+
* @param {*} [options] Override http request option.
|
|
16427
|
+
* @deprecated
|
|
16428
|
+
* @throws {RequiredError}
|
|
16429
|
+
*/
|
|
16430
|
+
createANewContactV1(reachV1ContactsStoreRequest, options) {
|
|
16431
|
+
return localVarFp.createANewContactV1(reachV1ContactsStoreRequest, options).then((request) => request(axios, basePath));
|
|
16432
|
+
},
|
|
16433
|
+
/**
|
|
16434
|
+
* Create many contacts in a profile in a single call. The contacts are imported in the background, so a success response means the import was accepted rather than finished. Contacts whose email already exists in the profile are left as they are. If double opt-in is enabled, new contacts start off pending and are sent a confirmation email.
|
|
16435
|
+
* @summary Create contacts in bulk
|
|
16436
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16437
|
+
* @param {ReachV1ContactsBulkStoreRequest} reachV1ContactsBulkStoreRequest
|
|
16438
|
+
* @param {*} [options] Override http request option.
|
|
16439
|
+
* @throws {RequiredError}
|
|
16440
|
+
*/
|
|
16441
|
+
createContactsInBulkV1(profileUuid, reachV1ContactsBulkStoreRequest, options) {
|
|
16442
|
+
return localVarFp.createContactsInBulkV1(profileUuid, reachV1ContactsBulkStoreRequest, options).then((request) => request(axios, basePath));
|
|
16443
|
+
},
|
|
16444
|
+
/**
|
|
16445
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
16446
|
+
* @summary Create new contacts
|
|
16447
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16448
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
16449
|
+
* @param {*} [options] Override http request option.
|
|
16450
|
+
* @throws {RequiredError}
|
|
16451
|
+
*/
|
|
16452
|
+
createNewContactsV1(profileUuid, reachV1ContactsStoreRequest, options) {
|
|
16453
|
+
return localVarFp.createNewContactsV1(profileUuid, reachV1ContactsStoreRequest, options).then((request) => request(axios, basePath));
|
|
16454
|
+
},
|
|
16455
|
+
/**
|
|
16456
|
+
* Delete a contact with the specified UUID. This endpoint permanently removes a contact from the email marketing system. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot delete contacts of any other profile. Use `DELETE /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}` instead.
|
|
16457
|
+
* @summary Delete a contact
|
|
16458
|
+
* @param {string} uuid UUID of the contact to delete
|
|
16459
|
+
* @param {*} [options] Override http request option.
|
|
16460
|
+
* @deprecated
|
|
16461
|
+
* @throws {RequiredError}
|
|
16462
|
+
*/
|
|
16463
|
+
deleteAContactV1(uuid, options) {
|
|
16464
|
+
return localVarFp.deleteAContactV1(uuid, options).then((request) => request(axios, basePath));
|
|
16465
|
+
},
|
|
16466
|
+
/**
|
|
16467
|
+
* Permanently delete a contact from a profile. The contact is removed together with its custom field values and tag assignments.
|
|
16468
|
+
* @summary Delete a profile contact
|
|
16469
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16470
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16471
|
+
* @param {*} [options] Override http request option.
|
|
16472
|
+
* @throws {RequiredError}
|
|
16473
|
+
*/
|
|
16474
|
+
deleteAProfileContactV1(profileUuid, contactUuid, options) {
|
|
16475
|
+
return localVarFp.deleteAProfileContactV1(profileUuid, contactUuid, options).then((request) => request(axios, basePath));
|
|
16476
|
+
},
|
|
16477
|
+
/**
|
|
16478
|
+
* Get the full details of a single contact. Alongside the contact\'s own attributes this returns the tags assigned to it and the values it holds for the profile\'s custom contact fields.
|
|
16479
|
+
* @summary Get contact details
|
|
16480
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16481
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16482
|
+
* @param {*} [options] Override http request option.
|
|
16483
|
+
* @throws {RequiredError}
|
|
16484
|
+
*/
|
|
16485
|
+
getContactDetailsV1(profileUuid, contactUuid, options) {
|
|
16486
|
+
return localVarFp.getContactDetailsV1(profileUuid, contactUuid, options).then((request) => request(axios, basePath));
|
|
16487
|
+
},
|
|
16488
|
+
/**
|
|
16489
|
+
* Get a list of all contact groups. This endpoint returns a list of contact groups that can be used to organize contacts.
|
|
16490
|
+
* @summary List contact groups
|
|
16491
|
+
* @param {*} [options] Override http request option.
|
|
16492
|
+
* @deprecated
|
|
16493
|
+
* @throws {RequiredError}
|
|
16494
|
+
*/
|
|
16495
|
+
listContactGroupsV1(options) {
|
|
16496
|
+
return localVarFp.listContactGroupsV1(options).then((request) => request(axios, basePath));
|
|
16497
|
+
},
|
|
16498
|
+
/**
|
|
16499
|
+
* Get a list of contacts, optionally filtered by group and subscription status. This endpoint returns a paginated list of contacts with their basic information. You can filter contacts by group UUID and subscription status. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list contacts of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/contacts` instead, which also replaces the group filter with a tag filter.
|
|
16500
|
+
* @summary List contacts
|
|
16501
|
+
* @param {string} [groupUuid] Filter contacts by group UUID
|
|
16502
|
+
* @param {ListContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16503
|
+
* @param {number} [page] Page number
|
|
16504
|
+
* @param {*} [options] Override http request option.
|
|
16505
|
+
* @deprecated
|
|
16506
|
+
* @throws {RequiredError}
|
|
16507
|
+
*/
|
|
16508
|
+
listContactsV1(groupUuid, subscriptionStatus, page, options) {
|
|
16509
|
+
return localVarFp.listContactsV1(groupUuid, subscriptionStatus, page, options).then((request) => request(axios, basePath));
|
|
16510
|
+
},
|
|
16511
|
+
/**
|
|
16512
|
+
* Get a paginated list of contacts belonging to a profile. Contacts can be filtered by subscription status, by tag, and by an email search term. The `meta.total` field of the response is the number of contacts matching the filters, so calling this endpoint without filters gives the profile\'s total contact count.
|
|
16513
|
+
* @summary List profile contacts
|
|
16514
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16515
|
+
* @param {ListProfileContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16516
|
+
* @param {string} [tagUuid] Filter contacts by tag UUID
|
|
16517
|
+
* @param {string} [search] Search contacts by email
|
|
16518
|
+
* @param {number} [page] Page number
|
|
16519
|
+
* @param {number} [perPage] Number of items per page
|
|
16520
|
+
* @param {*} [options] Override http request option.
|
|
16521
|
+
* @throws {RequiredError}
|
|
16522
|
+
*/
|
|
16523
|
+
listProfileContactsV1(profileUuid, subscriptionStatus, tagUuid, search, page, perPage, options) {
|
|
16524
|
+
return localVarFp.listProfileContactsV1(profileUuid, subscriptionStatus, tagUuid, search, page, perPage, options).then((request) => request(axios, basePath));
|
|
16525
|
+
},
|
|
16526
|
+
/**
|
|
16527
|
+
* Update a contact\'s attributes and custom field values. Only the properties present in the request body are changed, so a partial body is enough to change a single attribute. Sending a property as `null` clears it. The response carries the contact\'s core attributes. Read back its tags, custom field values, source and note with `GET /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}`.
|
|
16528
|
+
* @summary Update a contact
|
|
16529
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16530
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16531
|
+
* @param {ReachV1ContactsUpdateRequest} reachV1ContactsUpdateRequest
|
|
16532
|
+
* @param {*} [options] Override http request option.
|
|
16533
|
+
* @throws {RequiredError}
|
|
16534
|
+
*/
|
|
16535
|
+
updateAContactV1(profileUuid, contactUuid, reachV1ContactsUpdateRequest, options) {
|
|
16536
|
+
return localVarFp.updateAContactV1(profileUuid, contactUuid, reachV1ContactsUpdateRequest, options).then((request) => request(axios, basePath));
|
|
16537
|
+
},
|
|
16538
|
+
};
|
|
16539
|
+
};
|
|
16540
|
+
/**
|
|
16541
|
+
* ReachContactsApi - object-oriented interface
|
|
16542
|
+
* @export
|
|
16543
|
+
* @class ReachContactsApi
|
|
16544
|
+
* @extends {BaseAPI}
|
|
16545
|
+
*/
|
|
16546
|
+
export class ReachContactsApi extends BaseAPI {
|
|
16547
|
+
/**
|
|
16548
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
16549
|
+
* @summary Create a new contact
|
|
16550
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
16551
|
+
* @param {*} [options] Override http request option.
|
|
16552
|
+
* @deprecated
|
|
16553
|
+
* @throws {RequiredError}
|
|
16554
|
+
* @memberof ReachContactsApi
|
|
16555
|
+
*/
|
|
16556
|
+
createANewContactV1(reachV1ContactsStoreRequest, options) {
|
|
16557
|
+
return ReachContactsApiFp(this.configuration).createANewContactV1(reachV1ContactsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
16558
|
+
}
|
|
16559
|
+
/**
|
|
16560
|
+
* Create many contacts in a profile in a single call. The contacts are imported in the background, so a success response means the import was accepted rather than finished. Contacts whose email already exists in the profile are left as they are. If double opt-in is enabled, new contacts start off pending and are sent a confirmation email.
|
|
16561
|
+
* @summary Create contacts in bulk
|
|
16562
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16563
|
+
* @param {ReachV1ContactsBulkStoreRequest} reachV1ContactsBulkStoreRequest
|
|
16564
|
+
* @param {*} [options] Override http request option.
|
|
16565
|
+
* @throws {RequiredError}
|
|
16566
|
+
* @memberof ReachContactsApi
|
|
16567
|
+
*/
|
|
16568
|
+
createContactsInBulkV1(profileUuid, reachV1ContactsBulkStoreRequest, options) {
|
|
16569
|
+
return ReachContactsApiFp(this.configuration).createContactsInBulkV1(profileUuid, reachV1ContactsBulkStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
16570
|
+
}
|
|
16571
|
+
/**
|
|
16572
|
+
* Create a new contact in the email marketing system. This endpoint allows you to create a new contact with basic information like name, email, and surname. If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
|
|
16573
|
+
* @summary Create new contacts
|
|
16574
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16575
|
+
* @param {ReachV1ContactsStoreRequest} reachV1ContactsStoreRequest
|
|
16576
|
+
* @param {*} [options] Override http request option.
|
|
16577
|
+
* @throws {RequiredError}
|
|
16578
|
+
* @memberof ReachContactsApi
|
|
16579
|
+
*/
|
|
16580
|
+
createNewContactsV1(profileUuid, reachV1ContactsStoreRequest, options) {
|
|
16581
|
+
return ReachContactsApiFp(this.configuration).createNewContactsV1(profileUuid, reachV1ContactsStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
16582
|
+
}
|
|
16583
|
+
/**
|
|
16584
|
+
* Delete a contact with the specified UUID. This endpoint permanently removes a contact from the email marketing system. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot delete contacts of any other profile. Use `DELETE /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}` instead.
|
|
16585
|
+
* @summary Delete a contact
|
|
16586
|
+
* @param {string} uuid UUID of the contact to delete
|
|
16587
|
+
* @param {*} [options] Override http request option.
|
|
16588
|
+
* @deprecated
|
|
16589
|
+
* @throws {RequiredError}
|
|
16590
|
+
* @memberof ReachContactsApi
|
|
16591
|
+
*/
|
|
16592
|
+
deleteAContactV1(uuid, options) {
|
|
16593
|
+
return ReachContactsApiFp(this.configuration).deleteAContactV1(uuid, options).then((request) => request(this.axios, this.basePath));
|
|
16594
|
+
}
|
|
16595
|
+
/**
|
|
16596
|
+
* Permanently delete a contact from a profile. The contact is removed together with its custom field values and tag assignments.
|
|
16597
|
+
* @summary Delete a profile contact
|
|
16598
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16599
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16600
|
+
* @param {*} [options] Override http request option.
|
|
16601
|
+
* @throws {RequiredError}
|
|
16602
|
+
* @memberof ReachContactsApi
|
|
16603
|
+
*/
|
|
16604
|
+
deleteAProfileContactV1(profileUuid, contactUuid, options) {
|
|
16605
|
+
return ReachContactsApiFp(this.configuration).deleteAProfileContactV1(profileUuid, contactUuid, options).then((request) => request(this.axios, this.basePath));
|
|
16606
|
+
}
|
|
16607
|
+
/**
|
|
16608
|
+
* Get the full details of a single contact. Alongside the contact\'s own attributes this returns the tags assigned to it and the values it holds for the profile\'s custom contact fields.
|
|
16609
|
+
* @summary Get contact details
|
|
16610
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16611
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16612
|
+
* @param {*} [options] Override http request option.
|
|
16613
|
+
* @throws {RequiredError}
|
|
16614
|
+
* @memberof ReachContactsApi
|
|
16615
|
+
*/
|
|
16616
|
+
getContactDetailsV1(profileUuid, contactUuid, options) {
|
|
16617
|
+
return ReachContactsApiFp(this.configuration).getContactDetailsV1(profileUuid, contactUuid, options).then((request) => request(this.axios, this.basePath));
|
|
16618
|
+
}
|
|
16619
|
+
/**
|
|
16620
|
+
* Get a list of all contact groups. This endpoint returns a list of contact groups that can be used to organize contacts.
|
|
16621
|
+
* @summary List contact groups
|
|
16622
|
+
* @param {*} [options] Override http request option.
|
|
16623
|
+
* @deprecated
|
|
16624
|
+
* @throws {RequiredError}
|
|
16625
|
+
* @memberof ReachContactsApi
|
|
16626
|
+
*/
|
|
16627
|
+
listContactGroupsV1(options) {
|
|
16628
|
+
return ReachContactsApiFp(this.configuration).listContactGroupsV1(options).then((request) => request(this.axios, this.basePath));
|
|
16629
|
+
}
|
|
16630
|
+
/**
|
|
16631
|
+
* Get a list of contacts, optionally filtered by group and subscription status. This endpoint returns a paginated list of contacts with their basic information. You can filter contacts by group UUID and subscription status. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list contacts of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/contacts` instead, which also replaces the group filter with a tag filter.
|
|
16632
|
+
* @summary List contacts
|
|
16633
|
+
* @param {string} [groupUuid] Filter contacts by group UUID
|
|
16634
|
+
* @param {ListContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16635
|
+
* @param {number} [page] Page number
|
|
16636
|
+
* @param {*} [options] Override http request option.
|
|
16637
|
+
* @deprecated
|
|
16638
|
+
* @throws {RequiredError}
|
|
16639
|
+
* @memberof ReachContactsApi
|
|
16640
|
+
*/
|
|
16641
|
+
listContactsV1(groupUuid, subscriptionStatus, page, options) {
|
|
16642
|
+
return ReachContactsApiFp(this.configuration).listContactsV1(groupUuid, subscriptionStatus, page, options).then((request) => request(this.axios, this.basePath));
|
|
16643
|
+
}
|
|
16644
|
+
/**
|
|
16645
|
+
* Get a paginated list of contacts belonging to a profile. Contacts can be filtered by subscription status, by tag, and by an email search term. The `meta.total` field of the response is the number of contacts matching the filters, so calling this endpoint without filters gives the profile\'s total contact count.
|
|
16646
|
+
* @summary List profile contacts
|
|
16647
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16648
|
+
* @param {ListProfileContactsV1SubscriptionStatusEnum} [subscriptionStatus] Filter contacts by subscription status
|
|
16649
|
+
* @param {string} [tagUuid] Filter contacts by tag UUID
|
|
16650
|
+
* @param {string} [search] Search contacts by email
|
|
16651
|
+
* @param {number} [page] Page number
|
|
16652
|
+
* @param {number} [perPage] Number of items per page
|
|
16653
|
+
* @param {*} [options] Override http request option.
|
|
16654
|
+
* @throws {RequiredError}
|
|
16655
|
+
* @memberof ReachContactsApi
|
|
16656
|
+
*/
|
|
16657
|
+
listProfileContactsV1(profileUuid, subscriptionStatus, tagUuid, search, page, perPage, options) {
|
|
16658
|
+
return ReachContactsApiFp(this.configuration).listProfileContactsV1(profileUuid, subscriptionStatus, tagUuid, search, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
16659
|
+
}
|
|
16660
|
+
/**
|
|
16661
|
+
* Update a contact\'s attributes and custom field values. Only the properties present in the request body are changed, so a partial body is enough to change a single attribute. Sending a property as `null` clears it. The response carries the contact\'s core attributes. Read back its tags, custom field values, source and note with `GET /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}`.
|
|
16662
|
+
* @summary Update a contact
|
|
16663
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
16664
|
+
* @param {string} contactUuid Contact uuid parameter
|
|
16665
|
+
* @param {ReachV1ContactsUpdateRequest} reachV1ContactsUpdateRequest
|
|
16666
|
+
* @param {*} [options] Override http request option.
|
|
16667
|
+
* @throws {RequiredError}
|
|
16668
|
+
* @memberof ReachContactsApi
|
|
16669
|
+
*/
|
|
16670
|
+
updateAContactV1(profileUuid, contactUuid, reachV1ContactsUpdateRequest, options) {
|
|
16671
|
+
return ReachContactsApiFp(this.configuration).updateAContactV1(profileUuid, contactUuid, reachV1ContactsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
16672
|
+
}
|
|
16673
|
+
}
|
|
16674
|
+
/**
|
|
16675
|
+
* @export
|
|
16676
|
+
*/
|
|
16677
|
+
export const ListContactsV1SubscriptionStatusEnum = {
|
|
16678
|
+
Subscribed: 'subscribed',
|
|
16679
|
+
Unsubscribed: 'unsubscribed',
|
|
16680
|
+
Confirmed: 'confirmed',
|
|
16681
|
+
Pending: 'pending'
|
|
16682
|
+
};
|
|
16683
|
+
/**
|
|
16684
|
+
* @export
|
|
16685
|
+
*/
|
|
16686
|
+
export const ListProfileContactsV1SubscriptionStatusEnum = {
|
|
16687
|
+
Subscribed: 'subscribed',
|
|
16688
|
+
Unsubscribed: 'unsubscribed',
|
|
16689
|
+
Confirmed: 'confirmed',
|
|
16690
|
+
Pending: 'pending'
|
|
15845
16691
|
};
|
|
15846
16692
|
/**
|
|
15847
16693
|
* ReachProfilesApi - axios parameter creator
|