hostinger-api-sdk 1.28.0 → 1.29.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 +801 -81
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +460 -17
- package/dist/api.js +559 -25
- 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 +460 -17
- package/dist/esm/api.js +551 -17
- 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/ReachListProfileSegmentsV1200Response.md +22 -0
- package/docs/ReachSegmentsApi.md +359 -4
- package/docs/ReachV1ContactsSegmentsProfileStoreRequest.md +25 -0
- package/docs/ReachV1ContactsSegmentsProfileStoreRequestConditionsInner.md +24 -0
- package/docs/ReachV1ContactsSegmentsProfileUpdateRequest.md +25 -0
- package/docs/ReachV1ContactsSegmentsSegmentContactsCountResource.md +20 -0
- package/docs/ReachV1ContactsSegmentsSegmentListItemResource.md +28 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.30.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
|
|
@@ -7650,6 +7650,25 @@ export interface ReachListProfileSegmentContactsV1200Response {
|
|
|
7650
7650
|
*/
|
|
7651
7651
|
'meta': CommonSchemaPaginationMetaSchema;
|
|
7652
7652
|
}
|
|
7653
|
+
/**
|
|
7654
|
+
*
|
|
7655
|
+
* @export
|
|
7656
|
+
* @interface ReachListProfileSegmentsV1200Response
|
|
7657
|
+
*/
|
|
7658
|
+
export interface ReachListProfileSegmentsV1200Response {
|
|
7659
|
+
/**
|
|
7660
|
+
* Array of [`Reach.V1.Contacts.Segments.SegmentListItemResource`](#model/reachv1contactssegmentssegmentlistitemresource)
|
|
7661
|
+
* @type {Array<ReachV1ContactsSegmentsSegmentListItemResource>}
|
|
7662
|
+
* @memberof ReachListProfileSegmentsV1200Response
|
|
7663
|
+
*/
|
|
7664
|
+
'data': Array<ReachV1ContactsSegmentsSegmentListItemResource>;
|
|
7665
|
+
/**
|
|
7666
|
+
*
|
|
7667
|
+
* @type {CommonSchemaPaginationMetaSchema}
|
|
7668
|
+
* @memberof ReachListProfileSegmentsV1200Response
|
|
7669
|
+
*/
|
|
7670
|
+
'meta': CommonSchemaPaginationMetaSchema;
|
|
7671
|
+
}
|
|
7653
7672
|
/**
|
|
7654
7673
|
* Create many contacts in one call
|
|
7655
7674
|
* @export
|
|
@@ -8310,6 +8329,179 @@ export interface ReachV1ContactsSegmentsContactSegmentResource {
|
|
|
8310
8329
|
*/
|
|
8311
8330
|
'updated_at': string;
|
|
8312
8331
|
}
|
|
8332
|
+
/**
|
|
8333
|
+
* Create a segment from a set of conditions
|
|
8334
|
+
* @export
|
|
8335
|
+
* @interface ReachV1ContactsSegmentsProfileStoreRequest
|
|
8336
|
+
*/
|
|
8337
|
+
export interface ReachV1ContactsSegmentsProfileStoreRequest {
|
|
8338
|
+
/**
|
|
8339
|
+
*
|
|
8340
|
+
* @type {string}
|
|
8341
|
+
* @memberof ReachV1ContactsSegmentsProfileStoreRequest
|
|
8342
|
+
*/
|
|
8343
|
+
'name': string;
|
|
8344
|
+
/**
|
|
8345
|
+
* Conditions a contact must satisfy to fall into the segment
|
|
8346
|
+
* @type {Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>}
|
|
8347
|
+
* @memberof ReachV1ContactsSegmentsProfileStoreRequest
|
|
8348
|
+
*/
|
|
8349
|
+
'conditions': Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>;
|
|
8350
|
+
/**
|
|
8351
|
+
* How to combine multiple conditions
|
|
8352
|
+
* @type {string}
|
|
8353
|
+
* @memberof ReachV1ContactsSegmentsProfileStoreRequest
|
|
8354
|
+
*/
|
|
8355
|
+
'logic': ReachV1ContactsSegmentsProfileStoreRequestLogicEnum;
|
|
8356
|
+
}
|
|
8357
|
+
|
|
8358
|
+
export const ReachV1ContactsSegmentsProfileStoreRequestLogicEnum = {
|
|
8359
|
+
And: 'AND',
|
|
8360
|
+
Or: 'OR'
|
|
8361
|
+
} as const;
|
|
8362
|
+
|
|
8363
|
+
export type ReachV1ContactsSegmentsProfileStoreRequestLogicEnum = typeof ReachV1ContactsSegmentsProfileStoreRequestLogicEnum[keyof typeof ReachV1ContactsSegmentsProfileStoreRequestLogicEnum];
|
|
8364
|
+
|
|
8365
|
+
/**
|
|
8366
|
+
*
|
|
8367
|
+
* @export
|
|
8368
|
+
* @interface ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
|
|
8369
|
+
*/
|
|
8370
|
+
export interface ReachV1ContactsSegmentsProfileStoreRequestConditionsInner {
|
|
8371
|
+
/**
|
|
8372
|
+
* A built-in contact attribute, or `cf:{fieldUuid}` to target a custom contact field. Custom fields are addressed by field UUID; their slug is not accepted. Built-in attributes: `email`, `note`, `domain`, `source`, `opt_in_method`, `subscription_status`, `subscribed_at`, `unsubscribed_at`, `created_at`, `tag`, `campaigns`, `processed`, `opened`, `clicked`, `delivered`, `bounced`, `soft_bounced`, `dropped`. Which operators are accepted depends on the attribute.
|
|
8373
|
+
* @type {string}
|
|
8374
|
+
* @memberof ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
|
|
8375
|
+
*/
|
|
8376
|
+
'attribute': string;
|
|
8377
|
+
/**
|
|
8378
|
+
*
|
|
8379
|
+
* @type {string}
|
|
8380
|
+
* @memberof ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
|
|
8381
|
+
*/
|
|
8382
|
+
'operator': ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum;
|
|
8383
|
+
/**
|
|
8384
|
+
* Always a string, including for numeric and date comparisons
|
|
8385
|
+
* @type {string}
|
|
8386
|
+
* @memberof ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
|
|
8387
|
+
*/
|
|
8388
|
+
'value': string;
|
|
8389
|
+
}
|
|
8390
|
+
|
|
8391
|
+
export const ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum = {
|
|
8392
|
+
Equals: 'equals',
|
|
8393
|
+
NotEquals: 'not_equals',
|
|
8394
|
+
Contains: 'contains',
|
|
8395
|
+
NotContains: 'not_contains',
|
|
8396
|
+
Gte: 'gte',
|
|
8397
|
+
Lte: 'lte',
|
|
8398
|
+
Exists: 'exists',
|
|
8399
|
+
WithinLastDays: 'within_last_days',
|
|
8400
|
+
NotWithinLastDays: 'not_within_last_days',
|
|
8401
|
+
OlderThanDays: 'older_than_days',
|
|
8402
|
+
Processed: 'processed',
|
|
8403
|
+
NotProcessed: 'not_processed',
|
|
8404
|
+
Delivered: 'delivered',
|
|
8405
|
+
NotDelivered: 'not_delivered',
|
|
8406
|
+
Dropped: 'dropped',
|
|
8407
|
+
NotDropped: 'not_dropped',
|
|
8408
|
+
Bounced: 'bounced',
|
|
8409
|
+
NotBounced: 'not_bounced',
|
|
8410
|
+
SoftBounced: 'soft_bounced',
|
|
8411
|
+
NotSoftBounced: 'not_soft_bounced',
|
|
8412
|
+
Opened: 'opened',
|
|
8413
|
+
NotOpened: 'not_opened',
|
|
8414
|
+
Clicked: 'clicked',
|
|
8415
|
+
NotClicked: 'not_clicked',
|
|
8416
|
+
Unsubscribed: 'unsubscribed',
|
|
8417
|
+
NotUnsubscribed: 'not_unsubscribed'
|
|
8418
|
+
} as const;
|
|
8419
|
+
|
|
8420
|
+
export type ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum = typeof ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum[keyof typeof ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum];
|
|
8421
|
+
|
|
8422
|
+
/**
|
|
8423
|
+
* Rename a segment and/or replace the conditions that define it
|
|
8424
|
+
* @export
|
|
8425
|
+
* @interface ReachV1ContactsSegmentsProfileUpdateRequest
|
|
8426
|
+
*/
|
|
8427
|
+
export interface ReachV1ContactsSegmentsProfileUpdateRequest {
|
|
8428
|
+
/**
|
|
8429
|
+
*
|
|
8430
|
+
* @type {string}
|
|
8431
|
+
* @memberof ReachV1ContactsSegmentsProfileUpdateRequest
|
|
8432
|
+
*/
|
|
8433
|
+
'name': string;
|
|
8434
|
+
/**
|
|
8435
|
+
* Replaces the existing conditions entirely. Omit to keep the current ones.
|
|
8436
|
+
* @type {Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>}
|
|
8437
|
+
* @memberof ReachV1ContactsSegmentsProfileUpdateRequest
|
|
8438
|
+
*/
|
|
8439
|
+
'conditions': Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>;
|
|
8440
|
+
/**
|
|
8441
|
+
* How to combine multiple conditions. Required when conditions are given.
|
|
8442
|
+
* @type {string}
|
|
8443
|
+
* @memberof ReachV1ContactsSegmentsProfileUpdateRequest
|
|
8444
|
+
*/
|
|
8445
|
+
'logic': ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum;
|
|
8446
|
+
}
|
|
8447
|
+
|
|
8448
|
+
export const ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum = {
|
|
8449
|
+
And: 'AND',
|
|
8450
|
+
Or: 'OR'
|
|
8451
|
+
} as const;
|
|
8452
|
+
|
|
8453
|
+
export type ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum = typeof ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum[keyof typeof ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum];
|
|
8454
|
+
|
|
8455
|
+
/**
|
|
8456
|
+
*
|
|
8457
|
+
* @export
|
|
8458
|
+
* @interface ReachV1ContactsSegmentsSegmentContactsCountResource
|
|
8459
|
+
*/
|
|
8460
|
+
export interface ReachV1ContactsSegmentsSegmentContactsCountResource {
|
|
8461
|
+
/**
|
|
8462
|
+
* Contacts currently matching the segment conditions
|
|
8463
|
+
* @type {number}
|
|
8464
|
+
* @memberof ReachV1ContactsSegmentsSegmentContactsCountResource
|
|
8465
|
+
*/
|
|
8466
|
+
'count': number;
|
|
8467
|
+
}
|
|
8468
|
+
/**
|
|
8469
|
+
*
|
|
8470
|
+
* @export
|
|
8471
|
+
* @interface ReachV1ContactsSegmentsSegmentListItemResource
|
|
8472
|
+
*/
|
|
8473
|
+
export interface ReachV1ContactsSegmentsSegmentListItemResource {
|
|
8474
|
+
/**
|
|
8475
|
+
*
|
|
8476
|
+
* @type {string}
|
|
8477
|
+
* @memberof ReachV1ContactsSegmentsSegmentListItemResource
|
|
8478
|
+
*/
|
|
8479
|
+
'uuid': string;
|
|
8480
|
+
/**
|
|
8481
|
+
*
|
|
8482
|
+
* @type {string}
|
|
8483
|
+
* @memberof ReachV1ContactsSegmentsSegmentListItemResource
|
|
8484
|
+
*/
|
|
8485
|
+
'name': string;
|
|
8486
|
+
/**
|
|
8487
|
+
* Contacts currently matching the segment conditions
|
|
8488
|
+
* @type {number}
|
|
8489
|
+
* @memberof ReachV1ContactsSegmentsSegmentListItemResource
|
|
8490
|
+
*/
|
|
8491
|
+
'contacts_count': number;
|
|
8492
|
+
/**
|
|
8493
|
+
*
|
|
8494
|
+
* @type {string}
|
|
8495
|
+
* @memberof ReachV1ContactsSegmentsSegmentListItemResource
|
|
8496
|
+
*/
|
|
8497
|
+
'created_at': string;
|
|
8498
|
+
/**
|
|
8499
|
+
*
|
|
8500
|
+
* @type {string}
|
|
8501
|
+
* @memberof ReachV1ContactsSegmentsSegmentListItemResource
|
|
8502
|
+
*/
|
|
8503
|
+
'updated_at': string;
|
|
8504
|
+
}
|
|
8313
8505
|
/**
|
|
8314
8506
|
*
|
|
8315
8507
|
* @export
|
|
@@ -8501,6 +8693,8 @@ export const ReachV1ContactsSegmentsStoreRequestConditionsInnerOperatorEnum = {
|
|
|
8501
8693
|
NotDropped: 'not_dropped',
|
|
8502
8694
|
Bounced: 'bounced',
|
|
8503
8695
|
NotBounced: 'not_bounced',
|
|
8696
|
+
SoftBounced: 'soft_bounced',
|
|
8697
|
+
NotSoftBounced: 'not_soft_bounced',
|
|
8504
8698
|
Opened: 'opened',
|
|
8505
8699
|
NotOpened: 'not_opened',
|
|
8506
8700
|
Clicked: 'clicked',
|
|
@@ -28988,10 +29182,53 @@ export class ReachProfilesApi extends BaseAPI {
|
|
|
28988
29182
|
export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
28989
29183
|
return {
|
|
28990
29184
|
/**
|
|
28991
|
-
*
|
|
29185
|
+
* Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
|
|
29186
|
+
* @summary Count profile segment contacts
|
|
29187
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29188
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29189
|
+
* @param {*} [options] Override http request option.
|
|
29190
|
+
* @throws {RequiredError}
|
|
29191
|
+
*/
|
|
29192
|
+
countProfileSegmentContactsV1: async (profileUuid: string, segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29193
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
29194
|
+
assertParamExists('countProfileSegmentContactsV1', 'profileUuid', profileUuid)
|
|
29195
|
+
// verify required parameter 'segmentUuid' is not null or undefined
|
|
29196
|
+
assertParamExists('countProfileSegmentContactsV1', 'segmentUuid', segmentUuid)
|
|
29197
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/count`
|
|
29198
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
29199
|
+
.replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
|
|
29200
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29201
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29202
|
+
let baseOptions;
|
|
29203
|
+
if (configuration) {
|
|
29204
|
+
baseOptions = configuration.baseOptions;
|
|
29205
|
+
}
|
|
29206
|
+
|
|
29207
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
29208
|
+
const localVarHeaderParameter = {} as any;
|
|
29209
|
+
const localVarQueryParameter = {} as any;
|
|
29210
|
+
|
|
29211
|
+
// authentication apiToken required
|
|
29212
|
+
// http bearer authentication required
|
|
29213
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29214
|
+
|
|
29215
|
+
|
|
29216
|
+
|
|
29217
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29218
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29219
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29220
|
+
|
|
29221
|
+
return {
|
|
29222
|
+
url: toPathString(localVarUrlObj),
|
|
29223
|
+
options: localVarRequestOptions,
|
|
29224
|
+
};
|
|
29225
|
+
},
|
|
29226
|
+
/**
|
|
29227
|
+
* Create a new contact segment. This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot create segments in any other profile. Use `POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
28992
29228
|
* @summary Create a new contact segment
|
|
28993
29229
|
* @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
|
|
28994
29230
|
* @param {*} [options] Override http request option.
|
|
29231
|
+
* @deprecated
|
|
28995
29232
|
* @throws {RequiredError}
|
|
28996
29233
|
*/
|
|
28997
29234
|
createANewContactSegmentV1: async (reachV1ContactsSegmentsStoreRequest: ReachV1ContactsSegmentsStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
@@ -29028,17 +29265,20 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29028
29265
|
};
|
|
29029
29266
|
},
|
|
29030
29267
|
/**
|
|
29031
|
-
*
|
|
29032
|
-
* @summary
|
|
29033
|
-
* @param {string}
|
|
29268
|
+
* Create a segment in a profile. A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.
|
|
29269
|
+
* @summary Create a profile segment
|
|
29270
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29271
|
+
* @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
|
|
29034
29272
|
* @param {*} [options] Override http request option.
|
|
29035
29273
|
* @throws {RequiredError}
|
|
29036
29274
|
*/
|
|
29037
|
-
|
|
29038
|
-
// verify required parameter '
|
|
29039
|
-
assertParamExists('
|
|
29040
|
-
|
|
29041
|
-
|
|
29275
|
+
createAProfileSegmentV1: async (profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29276
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
29277
|
+
assertParamExists('createAProfileSegmentV1', 'profileUuid', profileUuid)
|
|
29278
|
+
// verify required parameter 'reachV1ContactsSegmentsProfileStoreRequest' is not null or undefined
|
|
29279
|
+
assertParamExists('createAProfileSegmentV1', 'reachV1ContactsSegmentsProfileStoreRequest', reachV1ContactsSegmentsProfileStoreRequest)
|
|
29280
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments`
|
|
29281
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
29042
29282
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29043
29283
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29044
29284
|
let baseOptions;
|
|
@@ -29046,7 +29286,7 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29046
29286
|
baseOptions = configuration.baseOptions;
|
|
29047
29287
|
}
|
|
29048
29288
|
|
|
29049
|
-
const localVarRequestOptions = { method: '
|
|
29289
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
29050
29290
|
const localVarHeaderParameter = {} as any;
|
|
29051
29291
|
const localVarQueryParameter = {} as any;
|
|
29052
29292
|
|
|
@@ -29056,9 +29296,12 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29056
29296
|
|
|
29057
29297
|
|
|
29058
29298
|
|
|
29299
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
29300
|
+
|
|
29059
29301
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29060
29302
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29061
29303
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29304
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsSegmentsProfileStoreRequest, localVarRequestOptions, configuration)
|
|
29062
29305
|
|
|
29063
29306
|
return {
|
|
29064
29307
|
url: toPathString(localVarUrlObj),
|
|
@@ -29066,21 +29309,19 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29066
29309
|
};
|
|
29067
29310
|
},
|
|
29068
29311
|
/**
|
|
29069
|
-
*
|
|
29070
|
-
* @summary
|
|
29312
|
+
* Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
|
|
29313
|
+
* @summary Delete a profile segment
|
|
29071
29314
|
* @param {string} profileUuid Profile uuid parameter
|
|
29072
29315
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29073
|
-
* @param {number} [page] Page number
|
|
29074
|
-
* @param {number} [perPage] Number of items per page
|
|
29075
29316
|
* @param {*} [options] Override http request option.
|
|
29076
29317
|
* @throws {RequiredError}
|
|
29077
29318
|
*/
|
|
29078
|
-
|
|
29319
|
+
deleteAProfileSegmentV1: async (profileUuid: string, segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29079
29320
|
// verify required parameter 'profileUuid' is not null or undefined
|
|
29080
|
-
assertParamExists('
|
|
29321
|
+
assertParamExists('deleteAProfileSegmentV1', 'profileUuid', profileUuid)
|
|
29081
29322
|
// verify required parameter 'segmentUuid' is not null or undefined
|
|
29082
|
-
assertParamExists('
|
|
29083
|
-
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}
|
|
29323
|
+
assertParamExists('deleteAProfileSegmentV1', 'segmentUuid', segmentUuid)
|
|
29324
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}`
|
|
29084
29325
|
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
29085
29326
|
.replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
|
|
29086
29327
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -29090,7 +29331,7 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29090
29331
|
baseOptions = configuration.baseOptions;
|
|
29091
29332
|
}
|
|
29092
29333
|
|
|
29093
|
-
const localVarRequestOptions = { method: '
|
|
29334
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
29094
29335
|
const localVarHeaderParameter = {} as any;
|
|
29095
29336
|
const localVarQueryParameter = {} as any;
|
|
29096
29337
|
|
|
@@ -29098,14 +29339,6 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29098
29339
|
// http bearer authentication required
|
|
29099
29340
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29100
29341
|
|
|
29101
|
-
if (page !== undefined) {
|
|
29102
|
-
localVarQueryParameter['page'] = page;
|
|
29103
|
-
}
|
|
29104
|
-
|
|
29105
|
-
if (perPage !== undefined) {
|
|
29106
|
-
localVarQueryParameter['per_page'] = perPage;
|
|
29107
|
-
}
|
|
29108
|
-
|
|
29109
29342
|
|
|
29110
29343
|
|
|
29111
29344
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -29118,18 +29351,20 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29118
29351
|
};
|
|
29119
29352
|
},
|
|
29120
29353
|
/**
|
|
29121
|
-
*
|
|
29122
|
-
* @summary
|
|
29354
|
+
* Get a single segment of a profile, including the conditions that define it. To retrieve the contacts currently matching those conditions, use the segment contacts endpoint instead.
|
|
29355
|
+
* @summary Get profile segment details
|
|
29356
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29123
29357
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29124
|
-
* @param {number} [page] Page number
|
|
29125
|
-
* @param {number} [perPage] Number of items per page
|
|
29126
29358
|
* @param {*} [options] Override http request option.
|
|
29127
29359
|
* @throws {RequiredError}
|
|
29128
29360
|
*/
|
|
29129
|
-
|
|
29361
|
+
getProfileSegmentDetailsV1: async (profileUuid: string, segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29362
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
29363
|
+
assertParamExists('getProfileSegmentDetailsV1', 'profileUuid', profileUuid)
|
|
29130
29364
|
// verify required parameter 'segmentUuid' is not null or undefined
|
|
29131
|
-
assertParamExists('
|
|
29132
|
-
const localVarPath = `/api/reach/v1/segmentation/segments/{segmentUuid}
|
|
29365
|
+
assertParamExists('getProfileSegmentDetailsV1', 'segmentUuid', segmentUuid)
|
|
29366
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}`
|
|
29367
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
29133
29368
|
.replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
|
|
29134
29369
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29135
29370
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -29146,14 +29381,6 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29146
29381
|
// http bearer authentication required
|
|
29147
29382
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29148
29383
|
|
|
29149
|
-
if (page !== undefined) {
|
|
29150
|
-
localVarQueryParameter['page'] = page;
|
|
29151
|
-
}
|
|
29152
|
-
|
|
29153
|
-
if (perPage !== undefined) {
|
|
29154
|
-
localVarQueryParameter['per_page'] = perPage;
|
|
29155
|
-
}
|
|
29156
|
-
|
|
29157
29384
|
|
|
29158
29385
|
|
|
29159
29386
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -29166,13 +29393,18 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29166
29393
|
};
|
|
29167
29394
|
},
|
|
29168
29395
|
/**
|
|
29169
|
-
* Get
|
|
29170
|
-
* @summary
|
|
29396
|
+
* Get details of a specific segment. This endpoint retrieves information about a single segment identified by UUID. Segments are used to organize and group contacts based on specific criteria. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}` instead.
|
|
29397
|
+
* @summary Get segment details
|
|
29398
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29171
29399
|
* @param {*} [options] Override http request option.
|
|
29400
|
+
* @deprecated
|
|
29172
29401
|
* @throws {RequiredError}
|
|
29173
29402
|
*/
|
|
29174
|
-
|
|
29175
|
-
|
|
29403
|
+
getSegmentDetailsV1: async (segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29404
|
+
// verify required parameter 'segmentUuid' is not null or undefined
|
|
29405
|
+
assertParamExists('getSegmentDetailsV1', 'segmentUuid', segmentUuid)
|
|
29406
|
+
const localVarPath = `/api/reach/v1/segmentation/segments/{segmentUuid}`
|
|
29407
|
+
.replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
|
|
29176
29408
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29177
29409
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29178
29410
|
let baseOptions;
|
|
@@ -29199,35 +29431,326 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29199
29431
|
options: localVarRequestOptions,
|
|
29200
29432
|
};
|
|
29201
29433
|
},
|
|
29202
|
-
}
|
|
29203
|
-
};
|
|
29204
|
-
|
|
29205
|
-
/**
|
|
29206
|
-
* ReachSegmentsApi - functional programming interface
|
|
29207
|
-
* @export
|
|
29208
|
-
*/
|
|
29209
|
-
export const ReachSegmentsApiFp = function(configuration?: Configuration) {
|
|
29210
|
-
const localVarAxiosParamCreator = ReachSegmentsApiAxiosParamCreator(configuration)
|
|
29211
|
-
return {
|
|
29212
|
-
/**
|
|
29213
|
-
* Create a new contact segment. This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc.
|
|
29214
|
-
* @summary Create a new contact segment
|
|
29215
|
-
* @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
|
|
29216
|
-
* @param {*} [options] Override http request option.
|
|
29217
|
-
* @throws {RequiredError}
|
|
29218
|
-
*/
|
|
29219
|
-
async createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest: ReachV1ContactsSegmentsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
|
|
29220
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest, options);
|
|
29221
|
-
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.createANewContactSegmentV1']?.[0]?.url;
|
|
29222
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29223
|
-
},
|
|
29224
29434
|
/**
|
|
29225
|
-
*
|
|
29226
|
-
* @summary
|
|
29435
|
+
* Retrieve contacts associated with a specific segment for a given profile. This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID, scoped to a specific profile.
|
|
29436
|
+
* @summary List profile segment contacts
|
|
29437
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29227
29438
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29439
|
+
* @param {number} [page] Page number
|
|
29440
|
+
* @param {number} [perPage] Number of items per page
|
|
29228
29441
|
* @param {*} [options] Override http request option.
|
|
29229
29442
|
* @throws {RequiredError}
|
|
29230
29443
|
*/
|
|
29444
|
+
listProfileSegmentContactsV1: async (profileUuid: string, segmentUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29445
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
29446
|
+
assertParamExists('listProfileSegmentContactsV1', 'profileUuid', profileUuid)
|
|
29447
|
+
// verify required parameter 'segmentUuid' is not null or undefined
|
|
29448
|
+
assertParamExists('listProfileSegmentContactsV1', 'segmentUuid', segmentUuid)
|
|
29449
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts`
|
|
29450
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
29451
|
+
.replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
|
|
29452
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29453
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29454
|
+
let baseOptions;
|
|
29455
|
+
if (configuration) {
|
|
29456
|
+
baseOptions = configuration.baseOptions;
|
|
29457
|
+
}
|
|
29458
|
+
|
|
29459
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
29460
|
+
const localVarHeaderParameter = {} as any;
|
|
29461
|
+
const localVarQueryParameter = {} as any;
|
|
29462
|
+
|
|
29463
|
+
// authentication apiToken required
|
|
29464
|
+
// http bearer authentication required
|
|
29465
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29466
|
+
|
|
29467
|
+
if (page !== undefined) {
|
|
29468
|
+
localVarQueryParameter['page'] = page;
|
|
29469
|
+
}
|
|
29470
|
+
|
|
29471
|
+
if (perPage !== undefined) {
|
|
29472
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
29473
|
+
}
|
|
29474
|
+
|
|
29475
|
+
|
|
29476
|
+
|
|
29477
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29478
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29479
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29480
|
+
|
|
29481
|
+
return {
|
|
29482
|
+
url: toPathString(localVarUrlObj),
|
|
29483
|
+
options: localVarRequestOptions,
|
|
29484
|
+
};
|
|
29485
|
+
},
|
|
29486
|
+
/**
|
|
29487
|
+
* Get a paginated list of the segments defined in a profile. Each entry carries the number of contacts currently matching it, which is recalculated on read rather than stored. Use `count_type` to count either every matching contact or only the subscribed ones.
|
|
29488
|
+
* @summary List profile segments
|
|
29489
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29490
|
+
* @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
|
|
29491
|
+
* @param {number} [page] Page number
|
|
29492
|
+
* @param {number} [perPage] Number of items per page
|
|
29493
|
+
* @param {*} [options] Override http request option.
|
|
29494
|
+
* @throws {RequiredError}
|
|
29495
|
+
*/
|
|
29496
|
+
listProfileSegmentsV1: async (profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29497
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
29498
|
+
assertParamExists('listProfileSegmentsV1', 'profileUuid', profileUuid)
|
|
29499
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments`
|
|
29500
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
|
|
29501
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29502
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29503
|
+
let baseOptions;
|
|
29504
|
+
if (configuration) {
|
|
29505
|
+
baseOptions = configuration.baseOptions;
|
|
29506
|
+
}
|
|
29507
|
+
|
|
29508
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
29509
|
+
const localVarHeaderParameter = {} as any;
|
|
29510
|
+
const localVarQueryParameter = {} as any;
|
|
29511
|
+
|
|
29512
|
+
// authentication apiToken required
|
|
29513
|
+
// http bearer authentication required
|
|
29514
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29515
|
+
|
|
29516
|
+
if (countType !== undefined) {
|
|
29517
|
+
localVarQueryParameter['count_type'] = countType;
|
|
29518
|
+
}
|
|
29519
|
+
|
|
29520
|
+
if (page !== undefined) {
|
|
29521
|
+
localVarQueryParameter['page'] = page;
|
|
29522
|
+
}
|
|
29523
|
+
|
|
29524
|
+
if (perPage !== undefined) {
|
|
29525
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
29526
|
+
}
|
|
29527
|
+
|
|
29528
|
+
|
|
29529
|
+
|
|
29530
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29531
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29532
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29533
|
+
|
|
29534
|
+
return {
|
|
29535
|
+
url: toPathString(localVarUrlObj),
|
|
29536
|
+
options: localVarRequestOptions,
|
|
29537
|
+
};
|
|
29538
|
+
},
|
|
29539
|
+
/**
|
|
29540
|
+
* Retrieve contacts associated with a specific segment. This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts` instead.
|
|
29541
|
+
* @summary List segment contacts
|
|
29542
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29543
|
+
* @param {number} [page] Page number
|
|
29544
|
+
* @param {number} [perPage] Number of items per page
|
|
29545
|
+
* @param {*} [options] Override http request option.
|
|
29546
|
+
* @deprecated
|
|
29547
|
+
* @throws {RequiredError}
|
|
29548
|
+
*/
|
|
29549
|
+
listSegmentContactsV1: async (segmentUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29550
|
+
// verify required parameter 'segmentUuid' is not null or undefined
|
|
29551
|
+
assertParamExists('listSegmentContactsV1', 'segmentUuid', segmentUuid)
|
|
29552
|
+
const localVarPath = `/api/reach/v1/segmentation/segments/{segmentUuid}/contacts`
|
|
29553
|
+
.replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
|
|
29554
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29555
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29556
|
+
let baseOptions;
|
|
29557
|
+
if (configuration) {
|
|
29558
|
+
baseOptions = configuration.baseOptions;
|
|
29559
|
+
}
|
|
29560
|
+
|
|
29561
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
29562
|
+
const localVarHeaderParameter = {} as any;
|
|
29563
|
+
const localVarQueryParameter = {} as any;
|
|
29564
|
+
|
|
29565
|
+
// authentication apiToken required
|
|
29566
|
+
// http bearer authentication required
|
|
29567
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29568
|
+
|
|
29569
|
+
if (page !== undefined) {
|
|
29570
|
+
localVarQueryParameter['page'] = page;
|
|
29571
|
+
}
|
|
29572
|
+
|
|
29573
|
+
if (perPage !== undefined) {
|
|
29574
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
29575
|
+
}
|
|
29576
|
+
|
|
29577
|
+
|
|
29578
|
+
|
|
29579
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29580
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29581
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29582
|
+
|
|
29583
|
+
return {
|
|
29584
|
+
url: toPathString(localVarUrlObj),
|
|
29585
|
+
options: localVarRequestOptions,
|
|
29586
|
+
};
|
|
29587
|
+
},
|
|
29588
|
+
/**
|
|
29589
|
+
* Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
29590
|
+
* @summary List segments
|
|
29591
|
+
* @param {*} [options] Override http request option.
|
|
29592
|
+
* @deprecated
|
|
29593
|
+
* @throws {RequiredError}
|
|
29594
|
+
*/
|
|
29595
|
+
listSegmentsV1: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29596
|
+
const localVarPath = `/api/reach/v1/segmentation/segments`;
|
|
29597
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29598
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29599
|
+
let baseOptions;
|
|
29600
|
+
if (configuration) {
|
|
29601
|
+
baseOptions = configuration.baseOptions;
|
|
29602
|
+
}
|
|
29603
|
+
|
|
29604
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
29605
|
+
const localVarHeaderParameter = {} as any;
|
|
29606
|
+
const localVarQueryParameter = {} as any;
|
|
29607
|
+
|
|
29608
|
+
// authentication apiToken required
|
|
29609
|
+
// http bearer authentication required
|
|
29610
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29611
|
+
|
|
29612
|
+
|
|
29613
|
+
|
|
29614
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29615
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29616
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29617
|
+
|
|
29618
|
+
return {
|
|
29619
|
+
url: toPathString(localVarUrlObj),
|
|
29620
|
+
options: localVarRequestOptions,
|
|
29621
|
+
};
|
|
29622
|
+
},
|
|
29623
|
+
/**
|
|
29624
|
+
* Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
|
|
29625
|
+
* @summary Update a profile segment
|
|
29626
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29627
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29628
|
+
* @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
|
|
29629
|
+
* @param {*} [options] Override http request option.
|
|
29630
|
+
* @throws {RequiredError}
|
|
29631
|
+
*/
|
|
29632
|
+
updateAProfileSegmentV1: async (profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29633
|
+
// verify required parameter 'profileUuid' is not null or undefined
|
|
29634
|
+
assertParamExists('updateAProfileSegmentV1', 'profileUuid', profileUuid)
|
|
29635
|
+
// verify required parameter 'segmentUuid' is not null or undefined
|
|
29636
|
+
assertParamExists('updateAProfileSegmentV1', 'segmentUuid', segmentUuid)
|
|
29637
|
+
// verify required parameter 'reachV1ContactsSegmentsProfileUpdateRequest' is not null or undefined
|
|
29638
|
+
assertParamExists('updateAProfileSegmentV1', 'reachV1ContactsSegmentsProfileUpdateRequest', reachV1ContactsSegmentsProfileUpdateRequest)
|
|
29639
|
+
const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}`
|
|
29640
|
+
.replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
|
|
29641
|
+
.replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
|
|
29642
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29643
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29644
|
+
let baseOptions;
|
|
29645
|
+
if (configuration) {
|
|
29646
|
+
baseOptions = configuration.baseOptions;
|
|
29647
|
+
}
|
|
29648
|
+
|
|
29649
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
29650
|
+
const localVarHeaderParameter = {} as any;
|
|
29651
|
+
const localVarQueryParameter = {} as any;
|
|
29652
|
+
|
|
29653
|
+
// authentication apiToken required
|
|
29654
|
+
// http bearer authentication required
|
|
29655
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
29656
|
+
|
|
29657
|
+
|
|
29658
|
+
|
|
29659
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
29660
|
+
|
|
29661
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29662
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29663
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29664
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsSegmentsProfileUpdateRequest, localVarRequestOptions, configuration)
|
|
29665
|
+
|
|
29666
|
+
return {
|
|
29667
|
+
url: toPathString(localVarUrlObj),
|
|
29668
|
+
options: localVarRequestOptions,
|
|
29669
|
+
};
|
|
29670
|
+
},
|
|
29671
|
+
}
|
|
29672
|
+
};
|
|
29673
|
+
|
|
29674
|
+
/**
|
|
29675
|
+
* ReachSegmentsApi - functional programming interface
|
|
29676
|
+
* @export
|
|
29677
|
+
*/
|
|
29678
|
+
export const ReachSegmentsApiFp = function(configuration?: Configuration) {
|
|
29679
|
+
const localVarAxiosParamCreator = ReachSegmentsApiAxiosParamCreator(configuration)
|
|
29680
|
+
return {
|
|
29681
|
+
/**
|
|
29682
|
+
* Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
|
|
29683
|
+
* @summary Count profile segment contacts
|
|
29684
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29685
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29686
|
+
* @param {*} [options] Override http request option.
|
|
29687
|
+
* @throws {RequiredError}
|
|
29688
|
+
*/
|
|
29689
|
+
async countProfileSegmentContactsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentContactsCountResource>> {
|
|
29690
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.countProfileSegmentContactsV1(profileUuid, segmentUuid, options);
|
|
29691
|
+
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.countProfileSegmentContactsV1']?.[0]?.url;
|
|
29692
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29693
|
+
},
|
|
29694
|
+
/**
|
|
29695
|
+
* Create a new contact segment. This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot create segments in any other profile. Use `POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
29696
|
+
* @summary Create a new contact segment
|
|
29697
|
+
* @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
|
|
29698
|
+
* @param {*} [options] Override http request option.
|
|
29699
|
+
* @deprecated
|
|
29700
|
+
* @throws {RequiredError}
|
|
29701
|
+
*/
|
|
29702
|
+
async createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest: ReachV1ContactsSegmentsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
|
|
29703
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest, options);
|
|
29704
|
+
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.createANewContactSegmentV1']?.[0]?.url;
|
|
29705
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29706
|
+
},
|
|
29707
|
+
/**
|
|
29708
|
+
* Create a segment in a profile. A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.
|
|
29709
|
+
* @summary Create a profile segment
|
|
29710
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29711
|
+
* @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
|
|
29712
|
+
* @param {*} [options] Override http request option.
|
|
29713
|
+
* @throws {RequiredError}
|
|
29714
|
+
*/
|
|
29715
|
+
async createAProfileSegmentV1(profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
|
|
29716
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createAProfileSegmentV1(profileUuid, reachV1ContactsSegmentsProfileStoreRequest, options);
|
|
29717
|
+
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.createAProfileSegmentV1']?.[0]?.url;
|
|
29718
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29719
|
+
},
|
|
29720
|
+
/**
|
|
29721
|
+
* Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
|
|
29722
|
+
* @summary Delete a profile segment
|
|
29723
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29724
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29725
|
+
* @param {*} [options] Override http request option.
|
|
29726
|
+
* @throws {RequiredError}
|
|
29727
|
+
*/
|
|
29728
|
+
async deleteAProfileSegmentV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
29729
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAProfileSegmentV1(profileUuid, segmentUuid, options);
|
|
29730
|
+
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.deleteAProfileSegmentV1']?.[0]?.url;
|
|
29731
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29732
|
+
},
|
|
29733
|
+
/**
|
|
29734
|
+
* Get a single segment of a profile, including the conditions that define it. To retrieve the contacts currently matching those conditions, use the segment contacts endpoint instead.
|
|
29735
|
+
* @summary Get profile segment details
|
|
29736
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29737
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29738
|
+
* @param {*} [options] Override http request option.
|
|
29739
|
+
* @throws {RequiredError}
|
|
29740
|
+
*/
|
|
29741
|
+
async getProfileSegmentDetailsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
|
|
29742
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileSegmentDetailsV1(profileUuid, segmentUuid, options);
|
|
29743
|
+
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.getProfileSegmentDetailsV1']?.[0]?.url;
|
|
29744
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29745
|
+
},
|
|
29746
|
+
/**
|
|
29747
|
+
* Get details of a specific segment. This endpoint retrieves information about a single segment identified by UUID. Segments are used to organize and group contacts based on specific criteria. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}` instead.
|
|
29748
|
+
* @summary Get segment details
|
|
29749
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29750
|
+
* @param {*} [options] Override http request option.
|
|
29751
|
+
* @deprecated
|
|
29752
|
+
* @throws {RequiredError}
|
|
29753
|
+
*/
|
|
29231
29754
|
async getSegmentDetailsV1(segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
|
|
29232
29755
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getSegmentDetailsV1(segmentUuid, options);
|
|
29233
29756
|
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.getSegmentDetailsV1']?.[0]?.url;
|
|
@@ -29249,12 +29772,28 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
|
|
|
29249
29772
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29250
29773
|
},
|
|
29251
29774
|
/**
|
|
29252
|
-
*
|
|
29775
|
+
* Get a paginated list of the segments defined in a profile. Each entry carries the number of contacts currently matching it, which is recalculated on read rather than stored. Use `count_type` to count either every matching contact or only the subscribed ones.
|
|
29776
|
+
* @summary List profile segments
|
|
29777
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29778
|
+
* @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
|
|
29779
|
+
* @param {number} [page] Page number
|
|
29780
|
+
* @param {number} [perPage] Number of items per page
|
|
29781
|
+
* @param {*} [options] Override http request option.
|
|
29782
|
+
* @throws {RequiredError}
|
|
29783
|
+
*/
|
|
29784
|
+
async listProfileSegmentsV1(profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListProfileSegmentsV1200Response>> {
|
|
29785
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listProfileSegmentsV1(profileUuid, countType, page, perPage, options);
|
|
29786
|
+
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.listProfileSegmentsV1']?.[0]?.url;
|
|
29787
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29788
|
+
},
|
|
29789
|
+
/**
|
|
29790
|
+
* Retrieve contacts associated with a specific segment. This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts` instead.
|
|
29253
29791
|
* @summary List segment contacts
|
|
29254
29792
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29255
29793
|
* @param {number} [page] Page number
|
|
29256
29794
|
* @param {number} [perPage] Number of items per page
|
|
29257
29795
|
* @param {*} [options] Override http request option.
|
|
29796
|
+
* @deprecated
|
|
29258
29797
|
* @throws {RequiredError}
|
|
29259
29798
|
*/
|
|
29260
29799
|
async listSegmentContactsV1(segmentUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListProfileSegmentContactsV1200Response>> {
|
|
@@ -29263,9 +29802,10 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
|
|
|
29263
29802
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29264
29803
|
},
|
|
29265
29804
|
/**
|
|
29266
|
-
* Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts.
|
|
29805
|
+
* Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
29267
29806
|
* @summary List segments
|
|
29268
29807
|
* @param {*} [options] Override http request option.
|
|
29808
|
+
* @deprecated
|
|
29269
29809
|
* @throws {RequiredError}
|
|
29270
29810
|
*/
|
|
29271
29811
|
async listSegmentsV1(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ReachV1ContactsSegmentsContactSegmentResource>>> {
|
|
@@ -29273,6 +29813,20 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
|
|
|
29273
29813
|
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.listSegmentsV1']?.[0]?.url;
|
|
29274
29814
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29275
29815
|
},
|
|
29816
|
+
/**
|
|
29817
|
+
* Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
|
|
29818
|
+
* @summary Update a profile segment
|
|
29819
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29820
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29821
|
+
* @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
|
|
29822
|
+
* @param {*} [options] Override http request option.
|
|
29823
|
+
* @throws {RequiredError}
|
|
29824
|
+
*/
|
|
29825
|
+
async updateAProfileSegmentV1(profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
|
|
29826
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAProfileSegmentV1(profileUuid, segmentUuid, reachV1ContactsSegmentsProfileUpdateRequest, options);
|
|
29827
|
+
const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.updateAProfileSegmentV1']?.[0]?.url;
|
|
29828
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29829
|
+
},
|
|
29276
29830
|
}
|
|
29277
29831
|
};
|
|
29278
29832
|
|
|
@@ -29284,20 +29838,66 @@ export const ReachSegmentsApiFactory = function (configuration?: Configuration,
|
|
|
29284
29838
|
const localVarFp = ReachSegmentsApiFp(configuration)
|
|
29285
29839
|
return {
|
|
29286
29840
|
/**
|
|
29287
|
-
*
|
|
29841
|
+
* Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
|
|
29842
|
+
* @summary Count profile segment contacts
|
|
29843
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29844
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29845
|
+
* @param {*} [options] Override http request option.
|
|
29846
|
+
* @throws {RequiredError}
|
|
29847
|
+
*/
|
|
29848
|
+
countProfileSegmentContactsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentContactsCountResource> {
|
|
29849
|
+
return localVarFp.countProfileSegmentContactsV1(profileUuid, segmentUuid, options).then((request) => request(axios, basePath));
|
|
29850
|
+
},
|
|
29851
|
+
/**
|
|
29852
|
+
* Create a new contact segment. This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot create segments in any other profile. Use `POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
29288
29853
|
* @summary Create a new contact segment
|
|
29289
29854
|
* @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
|
|
29290
29855
|
* @param {*} [options] Override http request option.
|
|
29856
|
+
* @deprecated
|
|
29291
29857
|
* @throws {RequiredError}
|
|
29292
29858
|
*/
|
|
29293
29859
|
createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest: ReachV1ContactsSegmentsStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
|
|
29294
29860
|
return localVarFp.createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest, options).then((request) => request(axios, basePath));
|
|
29295
29861
|
},
|
|
29296
29862
|
/**
|
|
29297
|
-
*
|
|
29863
|
+
* Create a segment in a profile. A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.
|
|
29864
|
+
* @summary Create a profile segment
|
|
29865
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29866
|
+
* @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
|
|
29867
|
+
* @param {*} [options] Override http request option.
|
|
29868
|
+
* @throws {RequiredError}
|
|
29869
|
+
*/
|
|
29870
|
+
createAProfileSegmentV1(profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
|
|
29871
|
+
return localVarFp.createAProfileSegmentV1(profileUuid, reachV1ContactsSegmentsProfileStoreRequest, options).then((request) => request(axios, basePath));
|
|
29872
|
+
},
|
|
29873
|
+
/**
|
|
29874
|
+
* Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
|
|
29875
|
+
* @summary Delete a profile segment
|
|
29876
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29877
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29878
|
+
* @param {*} [options] Override http request option.
|
|
29879
|
+
* @throws {RequiredError}
|
|
29880
|
+
*/
|
|
29881
|
+
deleteAProfileSegmentV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
29882
|
+
return localVarFp.deleteAProfileSegmentV1(profileUuid, segmentUuid, options).then((request) => request(axios, basePath));
|
|
29883
|
+
},
|
|
29884
|
+
/**
|
|
29885
|
+
* Get a single segment of a profile, including the conditions that define it. To retrieve the contacts currently matching those conditions, use the segment contacts endpoint instead.
|
|
29886
|
+
* @summary Get profile segment details
|
|
29887
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29888
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29889
|
+
* @param {*} [options] Override http request option.
|
|
29890
|
+
* @throws {RequiredError}
|
|
29891
|
+
*/
|
|
29892
|
+
getProfileSegmentDetailsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
|
|
29893
|
+
return localVarFp.getProfileSegmentDetailsV1(profileUuid, segmentUuid, options).then((request) => request(axios, basePath));
|
|
29894
|
+
},
|
|
29895
|
+
/**
|
|
29896
|
+
* Get details of a specific segment. This endpoint retrieves information about a single segment identified by UUID. Segments are used to organize and group contacts based on specific criteria. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}` instead.
|
|
29298
29897
|
* @summary Get segment details
|
|
29299
29898
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29300
29899
|
* @param {*} [options] Override http request option.
|
|
29900
|
+
* @deprecated
|
|
29301
29901
|
* @throws {RequiredError}
|
|
29302
29902
|
*/
|
|
29303
29903
|
getSegmentDetailsV1(segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
|
|
@@ -29317,26 +29917,53 @@ export const ReachSegmentsApiFactory = function (configuration?: Configuration,
|
|
|
29317
29917
|
return localVarFp.listProfileSegmentContactsV1(profileUuid, segmentUuid, page, perPage, options).then((request) => request(axios, basePath));
|
|
29318
29918
|
},
|
|
29319
29919
|
/**
|
|
29320
|
-
*
|
|
29920
|
+
* Get a paginated list of the segments defined in a profile. Each entry carries the number of contacts currently matching it, which is recalculated on read rather than stored. Use `count_type` to count either every matching contact or only the subscribed ones.
|
|
29921
|
+
* @summary List profile segments
|
|
29922
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29923
|
+
* @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
|
|
29924
|
+
* @param {number} [page] Page number
|
|
29925
|
+
* @param {number} [perPage] Number of items per page
|
|
29926
|
+
* @param {*} [options] Override http request option.
|
|
29927
|
+
* @throws {RequiredError}
|
|
29928
|
+
*/
|
|
29929
|
+
listProfileSegmentsV1(profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ReachListProfileSegmentsV1200Response> {
|
|
29930
|
+
return localVarFp.listProfileSegmentsV1(profileUuid, countType, page, perPage, options).then((request) => request(axios, basePath));
|
|
29931
|
+
},
|
|
29932
|
+
/**
|
|
29933
|
+
* Retrieve contacts associated with a specific segment. This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts` instead.
|
|
29321
29934
|
* @summary List segment contacts
|
|
29322
29935
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29323
29936
|
* @param {number} [page] Page number
|
|
29324
29937
|
* @param {number} [perPage] Number of items per page
|
|
29325
29938
|
* @param {*} [options] Override http request option.
|
|
29939
|
+
* @deprecated
|
|
29326
29940
|
* @throws {RequiredError}
|
|
29327
29941
|
*/
|
|
29328
29942
|
listSegmentContactsV1(segmentUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ReachListProfileSegmentContactsV1200Response> {
|
|
29329
29943
|
return localVarFp.listSegmentContactsV1(segmentUuid, page, perPage, options).then((request) => request(axios, basePath));
|
|
29330
29944
|
},
|
|
29331
29945
|
/**
|
|
29332
|
-
* Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts.
|
|
29946
|
+
* Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
29333
29947
|
* @summary List segments
|
|
29334
29948
|
* @param {*} [options] Override http request option.
|
|
29949
|
+
* @deprecated
|
|
29335
29950
|
* @throws {RequiredError}
|
|
29336
29951
|
*/
|
|
29337
29952
|
listSegmentsV1(options?: RawAxiosRequestConfig): AxiosPromise<Array<ReachV1ContactsSegmentsContactSegmentResource>> {
|
|
29338
29953
|
return localVarFp.listSegmentsV1(options).then((request) => request(axios, basePath));
|
|
29339
29954
|
},
|
|
29955
|
+
/**
|
|
29956
|
+
* Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
|
|
29957
|
+
* @summary Update a profile segment
|
|
29958
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29959
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29960
|
+
* @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
|
|
29961
|
+
* @param {*} [options] Override http request option.
|
|
29962
|
+
* @throws {RequiredError}
|
|
29963
|
+
*/
|
|
29964
|
+
updateAProfileSegmentV1(profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
|
|
29965
|
+
return localVarFp.updateAProfileSegmentV1(profileUuid, segmentUuid, reachV1ContactsSegmentsProfileUpdateRequest, options).then((request) => request(axios, basePath));
|
|
29966
|
+
},
|
|
29340
29967
|
};
|
|
29341
29968
|
};
|
|
29342
29969
|
|
|
@@ -29348,10 +29975,24 @@ export const ReachSegmentsApiFactory = function (configuration?: Configuration,
|
|
|
29348
29975
|
*/
|
|
29349
29976
|
export class ReachSegmentsApi extends BaseAPI {
|
|
29350
29977
|
/**
|
|
29351
|
-
*
|
|
29978
|
+
* Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
|
|
29979
|
+
* @summary Count profile segment contacts
|
|
29980
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
29981
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
29982
|
+
* @param {*} [options] Override http request option.
|
|
29983
|
+
* @throws {RequiredError}
|
|
29984
|
+
* @memberof ReachSegmentsApi
|
|
29985
|
+
*/
|
|
29986
|
+
public countProfileSegmentContactsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig) {
|
|
29987
|
+
return ReachSegmentsApiFp(this.configuration).countProfileSegmentContactsV1(profileUuid, segmentUuid, options).then((request) => request(this.axios, this.basePath));
|
|
29988
|
+
}
|
|
29989
|
+
|
|
29990
|
+
/**
|
|
29991
|
+
* Create a new contact segment. This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot create segments in any other profile. Use `POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
29352
29992
|
* @summary Create a new contact segment
|
|
29353
29993
|
* @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
|
|
29354
29994
|
* @param {*} [options] Override http request option.
|
|
29995
|
+
* @deprecated
|
|
29355
29996
|
* @throws {RequiredError}
|
|
29356
29997
|
* @memberof ReachSegmentsApi
|
|
29357
29998
|
*/
|
|
@@ -29360,10 +30001,50 @@ export class ReachSegmentsApi extends BaseAPI {
|
|
|
29360
30001
|
}
|
|
29361
30002
|
|
|
29362
30003
|
/**
|
|
29363
|
-
*
|
|
30004
|
+
* Create a segment in a profile. A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.
|
|
30005
|
+
* @summary Create a profile segment
|
|
30006
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
30007
|
+
* @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
|
|
30008
|
+
* @param {*} [options] Override http request option.
|
|
30009
|
+
* @throws {RequiredError}
|
|
30010
|
+
* @memberof ReachSegmentsApi
|
|
30011
|
+
*/
|
|
30012
|
+
public createAProfileSegmentV1(profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options?: RawAxiosRequestConfig) {
|
|
30013
|
+
return ReachSegmentsApiFp(this.configuration).createAProfileSegmentV1(profileUuid, reachV1ContactsSegmentsProfileStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
30014
|
+
}
|
|
30015
|
+
|
|
30016
|
+
/**
|
|
30017
|
+
* Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
|
|
30018
|
+
* @summary Delete a profile segment
|
|
30019
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
30020
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
30021
|
+
* @param {*} [options] Override http request option.
|
|
30022
|
+
* @throws {RequiredError}
|
|
30023
|
+
* @memberof ReachSegmentsApi
|
|
30024
|
+
*/
|
|
30025
|
+
public deleteAProfileSegmentV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig) {
|
|
30026
|
+
return ReachSegmentsApiFp(this.configuration).deleteAProfileSegmentV1(profileUuid, segmentUuid, options).then((request) => request(this.axios, this.basePath));
|
|
30027
|
+
}
|
|
30028
|
+
|
|
30029
|
+
/**
|
|
30030
|
+
* Get a single segment of a profile, including the conditions that define it. To retrieve the contacts currently matching those conditions, use the segment contacts endpoint instead.
|
|
30031
|
+
* @summary Get profile segment details
|
|
30032
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
30033
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
30034
|
+
* @param {*} [options] Override http request option.
|
|
30035
|
+
* @throws {RequiredError}
|
|
30036
|
+
* @memberof ReachSegmentsApi
|
|
30037
|
+
*/
|
|
30038
|
+
public getProfileSegmentDetailsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig) {
|
|
30039
|
+
return ReachSegmentsApiFp(this.configuration).getProfileSegmentDetailsV1(profileUuid, segmentUuid, options).then((request) => request(this.axios, this.basePath));
|
|
30040
|
+
}
|
|
30041
|
+
|
|
30042
|
+
/**
|
|
30043
|
+
* Get details of a specific segment. This endpoint retrieves information about a single segment identified by UUID. Segments are used to organize and group contacts based on specific criteria. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}` instead.
|
|
29364
30044
|
* @summary Get segment details
|
|
29365
30045
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29366
30046
|
* @param {*} [options] Override http request option.
|
|
30047
|
+
* @deprecated
|
|
29367
30048
|
* @throws {RequiredError}
|
|
29368
30049
|
* @memberof ReachSegmentsApi
|
|
29369
30050
|
*/
|
|
@@ -29387,12 +30068,28 @@ export class ReachSegmentsApi extends BaseAPI {
|
|
|
29387
30068
|
}
|
|
29388
30069
|
|
|
29389
30070
|
/**
|
|
29390
|
-
*
|
|
30071
|
+
* Get a paginated list of the segments defined in a profile. Each entry carries the number of contacts currently matching it, which is recalculated on read rather than stored. Use `count_type` to count either every matching contact or only the subscribed ones.
|
|
30072
|
+
* @summary List profile segments
|
|
30073
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
30074
|
+
* @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
|
|
30075
|
+
* @param {number} [page] Page number
|
|
30076
|
+
* @param {number} [perPage] Number of items per page
|
|
30077
|
+
* @param {*} [options] Override http request option.
|
|
30078
|
+
* @throws {RequiredError}
|
|
30079
|
+
* @memberof ReachSegmentsApi
|
|
30080
|
+
*/
|
|
30081
|
+
public listProfileSegmentsV1(profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
|
|
30082
|
+
return ReachSegmentsApiFp(this.configuration).listProfileSegmentsV1(profileUuid, countType, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
30083
|
+
}
|
|
30084
|
+
|
|
30085
|
+
/**
|
|
30086
|
+
* Retrieve contacts associated with a specific segment. This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot read segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts` instead.
|
|
29391
30087
|
* @summary List segment contacts
|
|
29392
30088
|
* @param {string} segmentUuid Segment uuid parameter
|
|
29393
30089
|
* @param {number} [page] Page number
|
|
29394
30090
|
* @param {number} [perPage] Number of items per page
|
|
29395
30091
|
* @param {*} [options] Override http request option.
|
|
30092
|
+
* @deprecated
|
|
29396
30093
|
* @throws {RequiredError}
|
|
29397
30094
|
* @memberof ReachSegmentsApi
|
|
29398
30095
|
*/
|
|
@@ -29401,17 +30098,40 @@ export class ReachSegmentsApi extends BaseAPI {
|
|
|
29401
30098
|
}
|
|
29402
30099
|
|
|
29403
30100
|
/**
|
|
29404
|
-
* Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts.
|
|
30101
|
+
* Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
|
|
29405
30102
|
* @summary List segments
|
|
29406
30103
|
* @param {*} [options] Override http request option.
|
|
30104
|
+
* @deprecated
|
|
29407
30105
|
* @throws {RequiredError}
|
|
29408
30106
|
* @memberof ReachSegmentsApi
|
|
29409
30107
|
*/
|
|
29410
30108
|
public listSegmentsV1(options?: RawAxiosRequestConfig) {
|
|
29411
30109
|
return ReachSegmentsApiFp(this.configuration).listSegmentsV1(options).then((request) => request(this.axios, this.basePath));
|
|
29412
30110
|
}
|
|
30111
|
+
|
|
30112
|
+
/**
|
|
30113
|
+
* Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
|
|
30114
|
+
* @summary Update a profile segment
|
|
30115
|
+
* @param {string} profileUuid Profile uuid parameter
|
|
30116
|
+
* @param {string} segmentUuid Segment uuid parameter
|
|
30117
|
+
* @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
|
|
30118
|
+
* @param {*} [options] Override http request option.
|
|
30119
|
+
* @throws {RequiredError}
|
|
30120
|
+
* @memberof ReachSegmentsApi
|
|
30121
|
+
*/
|
|
30122
|
+
public updateAProfileSegmentV1(profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
30123
|
+
return ReachSegmentsApiFp(this.configuration).updateAProfileSegmentV1(profileUuid, segmentUuid, reachV1ContactsSegmentsProfileUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
30124
|
+
}
|
|
29413
30125
|
}
|
|
29414
30126
|
|
|
30127
|
+
/**
|
|
30128
|
+
* @export
|
|
30129
|
+
*/
|
|
30130
|
+
export const ListProfileSegmentsV1CountTypeEnum = {
|
|
30131
|
+
All: 'all',
|
|
30132
|
+
Subscribed: 'subscribed'
|
|
30133
|
+
} as const;
|
|
30134
|
+
export type ListProfileSegmentsV1CountTypeEnum = typeof ListProfileSegmentsV1CountTypeEnum[keyof typeof ListProfileSegmentsV1CountTypeEnum];
|
|
29415
30135
|
|
|
29416
30136
|
|
|
29417
30137
|
/**
|