hostinger-api-sdk 1.28.0 → 1.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.29.0
6
+ * API Version: 1.30.1
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
@@ -759,43 +759,6 @@ export interface AgencyHostingV1WebsitesSslCertResource {
759
759
  */
760
760
  'created_at': string;
761
761
  }
762
- /**
763
- *
764
- * @export
765
- * @interface AgencyHostingV1WebsitesWebsiteDeletionResource
766
- */
767
- export interface AgencyHostingV1WebsitesWebsiteDeletionResource {
768
- /**
769
- * Deleted website UID
770
- * @type {string}
771
- * @memberof AgencyHostingV1WebsitesWebsiteDeletionResource
772
- */
773
- 'website_uid': string;
774
- /**
775
- * Deletion status
776
- * @type {string}
777
- * @memberof AgencyHostingV1WebsitesWebsiteDeletionResource
778
- */
779
- 'status': string;
780
- /**
781
- * Human-readable result message
782
- * @type {string}
783
- * @memberof AgencyHostingV1WebsitesWebsiteDeletionResource
784
- */
785
- 'message': string;
786
- /**
787
- *
788
- * @type {string}
789
- * @memberof AgencyHostingV1WebsitesWebsiteDeletionResource
790
- */
791
- 'deleted_at': string;
792
- /**
793
- * Whether background cleanup has been scheduled
794
- * @type {boolean}
795
- * @memberof AgencyHostingV1WebsitesWebsiteDeletionResource
796
- */
797
- 'is_cleanup_scheduled': boolean;
798
- }
799
762
  /**
800
763
  *
801
764
  * @export
@@ -7650,6 +7613,25 @@ export interface ReachListProfileSegmentContactsV1200Response {
7650
7613
  */
7651
7614
  'meta': CommonSchemaPaginationMetaSchema;
7652
7615
  }
7616
+ /**
7617
+ *
7618
+ * @export
7619
+ * @interface ReachListProfileSegmentsV1200Response
7620
+ */
7621
+ export interface ReachListProfileSegmentsV1200Response {
7622
+ /**
7623
+ * Array of [`Reach.V1.Contacts.Segments.SegmentListItemResource`](#model/reachv1contactssegmentssegmentlistitemresource)
7624
+ * @type {Array<ReachV1ContactsSegmentsSegmentListItemResource>}
7625
+ * @memberof ReachListProfileSegmentsV1200Response
7626
+ */
7627
+ 'data': Array<ReachV1ContactsSegmentsSegmentListItemResource>;
7628
+ /**
7629
+ *
7630
+ * @type {CommonSchemaPaginationMetaSchema}
7631
+ * @memberof ReachListProfileSegmentsV1200Response
7632
+ */
7633
+ 'meta': CommonSchemaPaginationMetaSchema;
7634
+ }
7653
7635
  /**
7654
7636
  * Create many contacts in one call
7655
7637
  * @export
@@ -8310,6 +8292,179 @@ export interface ReachV1ContactsSegmentsContactSegmentResource {
8310
8292
  */
8311
8293
  'updated_at': string;
8312
8294
  }
8295
+ /**
8296
+ * Create a segment from a set of conditions
8297
+ * @export
8298
+ * @interface ReachV1ContactsSegmentsProfileStoreRequest
8299
+ */
8300
+ export interface ReachV1ContactsSegmentsProfileStoreRequest {
8301
+ /**
8302
+ *
8303
+ * @type {string}
8304
+ * @memberof ReachV1ContactsSegmentsProfileStoreRequest
8305
+ */
8306
+ 'name': string;
8307
+ /**
8308
+ * Conditions a contact must satisfy to fall into the segment
8309
+ * @type {Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>}
8310
+ * @memberof ReachV1ContactsSegmentsProfileStoreRequest
8311
+ */
8312
+ 'conditions': Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>;
8313
+ /**
8314
+ * How to combine multiple conditions
8315
+ * @type {string}
8316
+ * @memberof ReachV1ContactsSegmentsProfileStoreRequest
8317
+ */
8318
+ 'logic': ReachV1ContactsSegmentsProfileStoreRequestLogicEnum;
8319
+ }
8320
+
8321
+ export const ReachV1ContactsSegmentsProfileStoreRequestLogicEnum = {
8322
+ And: 'AND',
8323
+ Or: 'OR'
8324
+ } as const;
8325
+
8326
+ export type ReachV1ContactsSegmentsProfileStoreRequestLogicEnum = typeof ReachV1ContactsSegmentsProfileStoreRequestLogicEnum[keyof typeof ReachV1ContactsSegmentsProfileStoreRequestLogicEnum];
8327
+
8328
+ /**
8329
+ *
8330
+ * @export
8331
+ * @interface ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
8332
+ */
8333
+ export interface ReachV1ContactsSegmentsProfileStoreRequestConditionsInner {
8334
+ /**
8335
+ * 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.
8336
+ * @type {string}
8337
+ * @memberof ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
8338
+ */
8339
+ 'attribute': string;
8340
+ /**
8341
+ *
8342
+ * @type {string}
8343
+ * @memberof ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
8344
+ */
8345
+ 'operator': ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum;
8346
+ /**
8347
+ * Always a string, including for numeric and date comparisons
8348
+ * @type {string}
8349
+ * @memberof ReachV1ContactsSegmentsProfileStoreRequestConditionsInner
8350
+ */
8351
+ 'value': string;
8352
+ }
8353
+
8354
+ export const ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum = {
8355
+ Equals: 'equals',
8356
+ NotEquals: 'not_equals',
8357
+ Contains: 'contains',
8358
+ NotContains: 'not_contains',
8359
+ Gte: 'gte',
8360
+ Lte: 'lte',
8361
+ Exists: 'exists',
8362
+ WithinLastDays: 'within_last_days',
8363
+ NotWithinLastDays: 'not_within_last_days',
8364
+ OlderThanDays: 'older_than_days',
8365
+ Processed: 'processed',
8366
+ NotProcessed: 'not_processed',
8367
+ Delivered: 'delivered',
8368
+ NotDelivered: 'not_delivered',
8369
+ Dropped: 'dropped',
8370
+ NotDropped: 'not_dropped',
8371
+ Bounced: 'bounced',
8372
+ NotBounced: 'not_bounced',
8373
+ SoftBounced: 'soft_bounced',
8374
+ NotSoftBounced: 'not_soft_bounced',
8375
+ Opened: 'opened',
8376
+ NotOpened: 'not_opened',
8377
+ Clicked: 'clicked',
8378
+ NotClicked: 'not_clicked',
8379
+ Unsubscribed: 'unsubscribed',
8380
+ NotUnsubscribed: 'not_unsubscribed'
8381
+ } as const;
8382
+
8383
+ export type ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum = typeof ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum[keyof typeof ReachV1ContactsSegmentsProfileStoreRequestConditionsInnerOperatorEnum];
8384
+
8385
+ /**
8386
+ * Rename a segment and/or replace the conditions that define it
8387
+ * @export
8388
+ * @interface ReachV1ContactsSegmentsProfileUpdateRequest
8389
+ */
8390
+ export interface ReachV1ContactsSegmentsProfileUpdateRequest {
8391
+ /**
8392
+ *
8393
+ * @type {string}
8394
+ * @memberof ReachV1ContactsSegmentsProfileUpdateRequest
8395
+ */
8396
+ 'name': string;
8397
+ /**
8398
+ * Replaces the existing conditions entirely. Omit to keep the current ones.
8399
+ * @type {Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>}
8400
+ * @memberof ReachV1ContactsSegmentsProfileUpdateRequest
8401
+ */
8402
+ 'conditions': Array<ReachV1ContactsSegmentsProfileStoreRequestConditionsInner>;
8403
+ /**
8404
+ * How to combine multiple conditions. Required when conditions are given.
8405
+ * @type {string}
8406
+ * @memberof ReachV1ContactsSegmentsProfileUpdateRequest
8407
+ */
8408
+ 'logic': ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum;
8409
+ }
8410
+
8411
+ export const ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum = {
8412
+ And: 'AND',
8413
+ Or: 'OR'
8414
+ } as const;
8415
+
8416
+ export type ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum = typeof ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum[keyof typeof ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum];
8417
+
8418
+ /**
8419
+ *
8420
+ * @export
8421
+ * @interface ReachV1ContactsSegmentsSegmentContactsCountResource
8422
+ */
8423
+ export interface ReachV1ContactsSegmentsSegmentContactsCountResource {
8424
+ /**
8425
+ * Contacts currently matching the segment conditions
8426
+ * @type {number}
8427
+ * @memberof ReachV1ContactsSegmentsSegmentContactsCountResource
8428
+ */
8429
+ 'count': number;
8430
+ }
8431
+ /**
8432
+ *
8433
+ * @export
8434
+ * @interface ReachV1ContactsSegmentsSegmentListItemResource
8435
+ */
8436
+ export interface ReachV1ContactsSegmentsSegmentListItemResource {
8437
+ /**
8438
+ *
8439
+ * @type {string}
8440
+ * @memberof ReachV1ContactsSegmentsSegmentListItemResource
8441
+ */
8442
+ 'uuid': string;
8443
+ /**
8444
+ *
8445
+ * @type {string}
8446
+ * @memberof ReachV1ContactsSegmentsSegmentListItemResource
8447
+ */
8448
+ 'name': string;
8449
+ /**
8450
+ * Contacts currently matching the segment conditions
8451
+ * @type {number}
8452
+ * @memberof ReachV1ContactsSegmentsSegmentListItemResource
8453
+ */
8454
+ 'contacts_count': number;
8455
+ /**
8456
+ *
8457
+ * @type {string}
8458
+ * @memberof ReachV1ContactsSegmentsSegmentListItemResource
8459
+ */
8460
+ 'created_at': string;
8461
+ /**
8462
+ *
8463
+ * @type {string}
8464
+ * @memberof ReachV1ContactsSegmentsSegmentListItemResource
8465
+ */
8466
+ 'updated_at': string;
8467
+ }
8313
8468
  /**
8314
8469
  *
8315
8470
  * @export
@@ -8501,6 +8656,8 @@ export const ReachV1ContactsSegmentsStoreRequestConditionsInnerOperatorEnum = {
8501
8656
  NotDropped: 'not_dropped',
8502
8657
  Bounced: 'bounced',
8503
8658
  NotBounced: 'not_bounced',
8659
+ SoftBounced: 'soft_bounced',
8660
+ NotSoftBounced: 'not_soft_bounced',
8504
8661
  Opened: 'opened',
8505
8662
  NotOpened: 'not_opened',
8506
8663
  Clicked: 'clicked',
@@ -13406,7 +13563,7 @@ export const AgencyHostingWebsitesApiAxiosParamCreator = function (configuration
13406
13563
  };
13407
13564
  },
13408
13565
  /**
13409
- * Deletes an Agency Plan website and schedules cleanup of its resources. This action is irreversible. Website files, databases, and linked domains are removed.
13566
+ * Permanently deletes an Agency Plan website. Deletion is processed asynchronously: the website is immediately transitioned to a deleting state and the underlying server resources are removed in the background.
13410
13567
  * @summary Delete Agency Plan website
13411
13568
  * @param {string} websiteUid Agency Plan website UID
13412
13569
  * @param {*} [options] Override http request option.
@@ -13543,13 +13700,13 @@ export const AgencyHostingWebsitesApiFp = function(configuration?: Configuration
13543
13700
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13544
13701
  },
13545
13702
  /**
13546
- * Deletes an Agency Plan website and schedules cleanup of its resources. This action is irreversible. Website files, databases, and linked domains are removed.
13703
+ * Permanently deletes an Agency Plan website. Deletion is processed asynchronously: the website is immediately transitioned to a deleting state and the underlying server resources are removed in the background.
13547
13704
  * @summary Delete Agency Plan website
13548
13705
  * @param {string} websiteUid Agency Plan website UID
13549
13706
  * @param {*} [options] Override http request option.
13550
13707
  * @throws {RequiredError}
13551
13708
  */
13552
- async deleteAgencyPlanWebsiteV1(websiteUid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgencyHostingV1WebsitesWebsiteDeletionResource>> {
13709
+ async deleteAgencyPlanWebsiteV1(websiteUid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
13553
13710
  const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAgencyPlanWebsiteV1(websiteUid, options);
13554
13711
  const localVarOperationServerBasePath = operationServerMap['AgencyHostingWebsitesApi.deleteAgencyPlanWebsiteV1']?.[0]?.url;
13555
13712
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -13600,13 +13757,13 @@ export const AgencyHostingWebsitesApiFactory = function (configuration?: Configu
13600
13757
  return localVarFp.buildAgencyPlanWebsiteNodeJSAssetsV1(websiteUid, agencyHostingV1WebsitesBuildAssetsRequest, options).then((request) => request(axios, basePath));
13601
13758
  },
13602
13759
  /**
13603
- * Deletes an Agency Plan website and schedules cleanup of its resources. This action is irreversible. Website files, databases, and linked domains are removed.
13760
+ * Permanently deletes an Agency Plan website. Deletion is processed asynchronously: the website is immediately transitioned to a deleting state and the underlying server resources are removed in the background.
13604
13761
  * @summary Delete Agency Plan website
13605
13762
  * @param {string} websiteUid Agency Plan website UID
13606
13763
  * @param {*} [options] Override http request option.
13607
13764
  * @throws {RequiredError}
13608
13765
  */
13609
- deleteAgencyPlanWebsiteV1(websiteUid: string, options?: RawAxiosRequestConfig): AxiosPromise<AgencyHostingV1WebsitesWebsiteDeletionResource> {
13766
+ deleteAgencyPlanWebsiteV1(websiteUid: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
13610
13767
  return localVarFp.deleteAgencyPlanWebsiteV1(websiteUid, options).then((request) => request(axios, basePath));
13611
13768
  },
13612
13769
  /**
@@ -13653,7 +13810,7 @@ export class AgencyHostingWebsitesApi extends BaseAPI {
13653
13810
  }
13654
13811
 
13655
13812
  /**
13656
- * Deletes an Agency Plan website and schedules cleanup of its resources. This action is irreversible. Website files, databases, and linked domains are removed.
13813
+ * Permanently deletes an Agency Plan website. Deletion is processed asynchronously: the website is immediately transitioned to a deleting state and the underlying server resources are removed in the background.
13657
13814
  * @summary Delete Agency Plan website
13658
13815
  * @param {string} websiteUid Agency Plan website UID
13659
13816
  * @param {*} [options] Override http request option.
@@ -28988,10 +29145,53 @@ export class ReachProfilesApi extends BaseAPI {
28988
29145
  export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Configuration) {
28989
29146
  return {
28990
29147
  /**
28991
- * 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.
29148
+ * Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
29149
+ * @summary Count profile segment contacts
29150
+ * @param {string} profileUuid Profile uuid parameter
29151
+ * @param {string} segmentUuid Segment uuid parameter
29152
+ * @param {*} [options] Override http request option.
29153
+ * @throws {RequiredError}
29154
+ */
29155
+ countProfileSegmentContactsV1: async (profileUuid: string, segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29156
+ // verify required parameter 'profileUuid' is not null or undefined
29157
+ assertParamExists('countProfileSegmentContactsV1', 'profileUuid', profileUuid)
29158
+ // verify required parameter 'segmentUuid' is not null or undefined
29159
+ assertParamExists('countProfileSegmentContactsV1', 'segmentUuid', segmentUuid)
29160
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/count`
29161
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
29162
+ .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29163
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29164
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29165
+ let baseOptions;
29166
+ if (configuration) {
29167
+ baseOptions = configuration.baseOptions;
29168
+ }
29169
+
29170
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29171
+ const localVarHeaderParameter = {} as any;
29172
+ const localVarQueryParameter = {} as any;
29173
+
29174
+ // authentication apiToken required
29175
+ // http bearer authentication required
29176
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29177
+
29178
+
29179
+
29180
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29181
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29182
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29183
+
29184
+ return {
29185
+ url: toPathString(localVarUrlObj),
29186
+ options: localVarRequestOptions,
29187
+ };
29188
+ },
29189
+ /**
29190
+ * 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
29191
  * @summary Create a new contact segment
28993
29192
  * @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
28994
29193
  * @param {*} [options] Override http request option.
29194
+ * @deprecated
28995
29195
  * @throws {RequiredError}
28996
29196
  */
28997
29197
  createANewContactSegmentV1: async (reachV1ContactsSegmentsStoreRequest: ReachV1ContactsSegmentsStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
@@ -29028,17 +29228,20 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29028
29228
  };
29029
29229
  },
29030
29230
  /**
29031
- * 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.
29032
- * @summary Get segment details
29033
- * @param {string} segmentUuid Segment uuid parameter
29231
+ * 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.
29232
+ * @summary Create a profile segment
29233
+ * @param {string} profileUuid Profile uuid parameter
29234
+ * @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
29034
29235
  * @param {*} [options] Override http request option.
29035
29236
  * @throws {RequiredError}
29036
29237
  */
29037
- getSegmentDetailsV1: async (segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29038
- // verify required parameter 'segmentUuid' is not null or undefined
29039
- assertParamExists('getSegmentDetailsV1', 'segmentUuid', segmentUuid)
29040
- const localVarPath = `/api/reach/v1/segmentation/segments/{segmentUuid}`
29041
- .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29238
+ createAProfileSegmentV1: async (profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29239
+ // verify required parameter 'profileUuid' is not null or undefined
29240
+ assertParamExists('createAProfileSegmentV1', 'profileUuid', profileUuid)
29241
+ // verify required parameter 'reachV1ContactsSegmentsProfileStoreRequest' is not null or undefined
29242
+ assertParamExists('createAProfileSegmentV1', 'reachV1ContactsSegmentsProfileStoreRequest', reachV1ContactsSegmentsProfileStoreRequest)
29243
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments`
29244
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
29042
29245
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
29043
29246
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29044
29247
  let baseOptions;
@@ -29046,7 +29249,7 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29046
29249
  baseOptions = configuration.baseOptions;
29047
29250
  }
29048
29251
 
29049
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29252
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
29050
29253
  const localVarHeaderParameter = {} as any;
29051
29254
  const localVarQueryParameter = {} as any;
29052
29255
 
@@ -29056,9 +29259,12 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29056
29259
 
29057
29260
 
29058
29261
 
29262
+ localVarHeaderParameter['Content-Type'] = 'application/json';
29263
+
29059
29264
  setSearchParams(localVarUrlObj, localVarQueryParameter);
29060
29265
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29061
29266
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29267
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsSegmentsProfileStoreRequest, localVarRequestOptions, configuration)
29062
29268
 
29063
29269
  return {
29064
29270
  url: toPathString(localVarUrlObj),
@@ -29066,21 +29272,19 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29066
29272
  };
29067
29273
  },
29068
29274
  /**
29069
- * 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.
29070
- * @summary List profile segment contacts
29275
+ * Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
29276
+ * @summary Delete a profile segment
29071
29277
  * @param {string} profileUuid Profile uuid parameter
29072
29278
  * @param {string} segmentUuid Segment uuid parameter
29073
- * @param {number} [page] Page number
29074
- * @param {number} [perPage] Number of items per page
29075
29279
  * @param {*} [options] Override http request option.
29076
29280
  * @throws {RequiredError}
29077
29281
  */
29078
- listProfileSegmentContactsV1: async (profileUuid: string, segmentUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29282
+ deleteAProfileSegmentV1: async (profileUuid: string, segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29079
29283
  // verify required parameter 'profileUuid' is not null or undefined
29080
- assertParamExists('listProfileSegmentContactsV1', 'profileUuid', profileUuid)
29284
+ assertParamExists('deleteAProfileSegmentV1', 'profileUuid', profileUuid)
29081
29285
  // verify required parameter 'segmentUuid' is not null or undefined
29082
- assertParamExists('listProfileSegmentContactsV1', 'segmentUuid', segmentUuid)
29083
- const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts`
29286
+ assertParamExists('deleteAProfileSegmentV1', 'segmentUuid', segmentUuid)
29287
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}`
29084
29288
  .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
29085
29289
  .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29086
29290
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -29090,7 +29294,7 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29090
29294
  baseOptions = configuration.baseOptions;
29091
29295
  }
29092
29296
 
29093
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29297
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
29094
29298
  const localVarHeaderParameter = {} as any;
29095
29299
  const localVarQueryParameter = {} as any;
29096
29300
 
@@ -29098,14 +29302,6 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29098
29302
  // http bearer authentication required
29099
29303
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
29100
29304
 
29101
- if (page !== undefined) {
29102
- localVarQueryParameter['page'] = page;
29103
- }
29104
-
29105
- if (perPage !== undefined) {
29106
- localVarQueryParameter['per_page'] = perPage;
29107
- }
29108
-
29109
29305
 
29110
29306
 
29111
29307
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -29118,18 +29314,20 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29118
29314
  };
29119
29315
  },
29120
29316
  /**
29121
- * 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.
29122
- * @summary List segment contacts
29317
+ * 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.
29318
+ * @summary Get profile segment details
29319
+ * @param {string} profileUuid Profile uuid parameter
29123
29320
  * @param {string} segmentUuid Segment uuid parameter
29124
- * @param {number} [page] Page number
29125
- * @param {number} [perPage] Number of items per page
29126
29321
  * @param {*} [options] Override http request option.
29127
29322
  * @throws {RequiredError}
29128
29323
  */
29129
- listSegmentContactsV1: async (segmentUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29324
+ getProfileSegmentDetailsV1: async (profileUuid: string, segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29325
+ // verify required parameter 'profileUuid' is not null or undefined
29326
+ assertParamExists('getProfileSegmentDetailsV1', 'profileUuid', profileUuid)
29130
29327
  // verify required parameter 'segmentUuid' is not null or undefined
29131
- assertParamExists('listSegmentContactsV1', 'segmentUuid', segmentUuid)
29132
- const localVarPath = `/api/reach/v1/segmentation/segments/{segmentUuid}/contacts`
29328
+ assertParamExists('getProfileSegmentDetailsV1', 'segmentUuid', segmentUuid)
29329
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}`
29330
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
29133
29331
  .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29134
29332
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
29135
29333
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -29146,14 +29344,6 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29146
29344
  // http bearer authentication required
29147
29345
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
29148
29346
 
29149
- if (page !== undefined) {
29150
- localVarQueryParameter['page'] = page;
29151
- }
29152
-
29153
- if (perPage !== undefined) {
29154
- localVarQueryParameter['per_page'] = perPage;
29155
- }
29156
-
29157
29347
 
29158
29348
 
29159
29349
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -29166,13 +29356,18 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29166
29356
  };
29167
29357
  },
29168
29358
  /**
29169
- * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts.
29170
- * @summary List segments
29359
+ * 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.
29360
+ * @summary Get segment details
29361
+ * @param {string} segmentUuid Segment uuid parameter
29171
29362
  * @param {*} [options] Override http request option.
29363
+ * @deprecated
29172
29364
  * @throws {RequiredError}
29173
29365
  */
29174
- listSegmentsV1: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29175
- const localVarPath = `/api/reach/v1/segmentation/segments`;
29366
+ getSegmentDetailsV1: async (segmentUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29367
+ // verify required parameter 'segmentUuid' is not null or undefined
29368
+ assertParamExists('getSegmentDetailsV1', 'segmentUuid', segmentUuid)
29369
+ const localVarPath = `/api/reach/v1/segmentation/segments/{segmentUuid}`
29370
+ .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29176
29371
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
29177
29372
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29178
29373
  let baseOptions;
@@ -29199,9 +29394,246 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration?: Confi
29199
29394
  options: localVarRequestOptions,
29200
29395
  };
29201
29396
  },
29202
- }
29203
- };
29204
-
29397
+ /**
29398
+ * 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.
29399
+ * @summary List profile segment contacts
29400
+ * @param {string} profileUuid Profile uuid parameter
29401
+ * @param {string} segmentUuid Segment uuid parameter
29402
+ * @param {number} [page] Page number
29403
+ * @param {number} [perPage] Number of items per page
29404
+ * @param {*} [options] Override http request option.
29405
+ * @throws {RequiredError}
29406
+ */
29407
+ listProfileSegmentContactsV1: async (profileUuid: string, segmentUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29408
+ // verify required parameter 'profileUuid' is not null or undefined
29409
+ assertParamExists('listProfileSegmentContactsV1', 'profileUuid', profileUuid)
29410
+ // verify required parameter 'segmentUuid' is not null or undefined
29411
+ assertParamExists('listProfileSegmentContactsV1', 'segmentUuid', segmentUuid)
29412
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts`
29413
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
29414
+ .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29415
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29416
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29417
+ let baseOptions;
29418
+ if (configuration) {
29419
+ baseOptions = configuration.baseOptions;
29420
+ }
29421
+
29422
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29423
+ const localVarHeaderParameter = {} as any;
29424
+ const localVarQueryParameter = {} as any;
29425
+
29426
+ // authentication apiToken required
29427
+ // http bearer authentication required
29428
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29429
+
29430
+ if (page !== undefined) {
29431
+ localVarQueryParameter['page'] = page;
29432
+ }
29433
+
29434
+ if (perPage !== undefined) {
29435
+ localVarQueryParameter['per_page'] = perPage;
29436
+ }
29437
+
29438
+
29439
+
29440
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29441
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29442
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29443
+
29444
+ return {
29445
+ url: toPathString(localVarUrlObj),
29446
+ options: localVarRequestOptions,
29447
+ };
29448
+ },
29449
+ /**
29450
+ * 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.
29451
+ * @summary List profile segments
29452
+ * @param {string} profileUuid Profile uuid parameter
29453
+ * @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
29454
+ * @param {number} [page] Page number
29455
+ * @param {number} [perPage] Number of items per page
29456
+ * @param {*} [options] Override http request option.
29457
+ * @throws {RequiredError}
29458
+ */
29459
+ listProfileSegmentsV1: async (profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29460
+ // verify required parameter 'profileUuid' is not null or undefined
29461
+ assertParamExists('listProfileSegmentsV1', 'profileUuid', profileUuid)
29462
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments`
29463
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
29464
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29465
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29466
+ let baseOptions;
29467
+ if (configuration) {
29468
+ baseOptions = configuration.baseOptions;
29469
+ }
29470
+
29471
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29472
+ const localVarHeaderParameter = {} as any;
29473
+ const localVarQueryParameter = {} as any;
29474
+
29475
+ // authentication apiToken required
29476
+ // http bearer authentication required
29477
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29478
+
29479
+ if (countType !== undefined) {
29480
+ localVarQueryParameter['count_type'] = countType;
29481
+ }
29482
+
29483
+ if (page !== undefined) {
29484
+ localVarQueryParameter['page'] = page;
29485
+ }
29486
+
29487
+ if (perPage !== undefined) {
29488
+ localVarQueryParameter['per_page'] = perPage;
29489
+ }
29490
+
29491
+
29492
+
29493
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29494
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29495
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29496
+
29497
+ return {
29498
+ url: toPathString(localVarUrlObj),
29499
+ options: localVarRequestOptions,
29500
+ };
29501
+ },
29502
+ /**
29503
+ * 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.
29504
+ * @summary List segment contacts
29505
+ * @param {string} segmentUuid Segment uuid parameter
29506
+ * @param {number} [page] Page number
29507
+ * @param {number} [perPage] Number of items per page
29508
+ * @param {*} [options] Override http request option.
29509
+ * @deprecated
29510
+ * @throws {RequiredError}
29511
+ */
29512
+ listSegmentContactsV1: async (segmentUuid: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29513
+ // verify required parameter 'segmentUuid' is not null or undefined
29514
+ assertParamExists('listSegmentContactsV1', 'segmentUuid', segmentUuid)
29515
+ const localVarPath = `/api/reach/v1/segmentation/segments/{segmentUuid}/contacts`
29516
+ .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29517
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29518
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29519
+ let baseOptions;
29520
+ if (configuration) {
29521
+ baseOptions = configuration.baseOptions;
29522
+ }
29523
+
29524
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29525
+ const localVarHeaderParameter = {} as any;
29526
+ const localVarQueryParameter = {} as any;
29527
+
29528
+ // authentication apiToken required
29529
+ // http bearer authentication required
29530
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29531
+
29532
+ if (page !== undefined) {
29533
+ localVarQueryParameter['page'] = page;
29534
+ }
29535
+
29536
+ if (perPage !== undefined) {
29537
+ localVarQueryParameter['per_page'] = perPage;
29538
+ }
29539
+
29540
+
29541
+
29542
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29543
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29544
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29545
+
29546
+ return {
29547
+ url: toPathString(localVarUrlObj),
29548
+ options: localVarRequestOptions,
29549
+ };
29550
+ },
29551
+ /**
29552
+ * 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.
29553
+ * @summary List segments
29554
+ * @param {*} [options] Override http request option.
29555
+ * @deprecated
29556
+ * @throws {RequiredError}
29557
+ */
29558
+ listSegmentsV1: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29559
+ const localVarPath = `/api/reach/v1/segmentation/segments`;
29560
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29561
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29562
+ let baseOptions;
29563
+ if (configuration) {
29564
+ baseOptions = configuration.baseOptions;
29565
+ }
29566
+
29567
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
29568
+ const localVarHeaderParameter = {} as any;
29569
+ const localVarQueryParameter = {} as any;
29570
+
29571
+ // authentication apiToken required
29572
+ // http bearer authentication required
29573
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29574
+
29575
+
29576
+
29577
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29578
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29579
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29580
+
29581
+ return {
29582
+ url: toPathString(localVarUrlObj),
29583
+ options: localVarRequestOptions,
29584
+ };
29585
+ },
29586
+ /**
29587
+ * 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.
29588
+ * @summary Update a profile segment
29589
+ * @param {string} profileUuid Profile uuid parameter
29590
+ * @param {string} segmentUuid Segment uuid parameter
29591
+ * @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
29592
+ * @param {*} [options] Override http request option.
29593
+ * @throws {RequiredError}
29594
+ */
29595
+ updateAProfileSegmentV1: async (profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29596
+ // verify required parameter 'profileUuid' is not null or undefined
29597
+ assertParamExists('updateAProfileSegmentV1', 'profileUuid', profileUuid)
29598
+ // verify required parameter 'segmentUuid' is not null or undefined
29599
+ assertParamExists('updateAProfileSegmentV1', 'segmentUuid', segmentUuid)
29600
+ // verify required parameter 'reachV1ContactsSegmentsProfileUpdateRequest' is not null or undefined
29601
+ assertParamExists('updateAProfileSegmentV1', 'reachV1ContactsSegmentsProfileUpdateRequest', reachV1ContactsSegmentsProfileUpdateRequest)
29602
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}`
29603
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
29604
+ .replace(`{${"segmentUuid"}}`, encodeURIComponent(String(segmentUuid)));
29605
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
29606
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29607
+ let baseOptions;
29608
+ if (configuration) {
29609
+ baseOptions = configuration.baseOptions;
29610
+ }
29611
+
29612
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
29613
+ const localVarHeaderParameter = {} as any;
29614
+ const localVarQueryParameter = {} as any;
29615
+
29616
+ // authentication apiToken required
29617
+ // http bearer authentication required
29618
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
29619
+
29620
+
29621
+
29622
+ localVarHeaderParameter['Content-Type'] = 'application/json';
29623
+
29624
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
29625
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
29626
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
29627
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsSegmentsProfileUpdateRequest, localVarRequestOptions, configuration)
29628
+
29629
+ return {
29630
+ url: toPathString(localVarUrlObj),
29631
+ options: localVarRequestOptions,
29632
+ };
29633
+ },
29634
+ }
29635
+ };
29636
+
29205
29637
  /**
29206
29638
  * ReachSegmentsApi - functional programming interface
29207
29639
  * @export
@@ -29210,10 +29642,24 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
29210
29642
  const localVarAxiosParamCreator = ReachSegmentsApiAxiosParamCreator(configuration)
29211
29643
  return {
29212
29644
  /**
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.
29645
+ * Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
29646
+ * @summary Count profile segment contacts
29647
+ * @param {string} profileUuid Profile uuid parameter
29648
+ * @param {string} segmentUuid Segment uuid parameter
29649
+ * @param {*} [options] Override http request option.
29650
+ * @throws {RequiredError}
29651
+ */
29652
+ async countProfileSegmentContactsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentContactsCountResource>> {
29653
+ const localVarAxiosArgs = await localVarAxiosParamCreator.countProfileSegmentContactsV1(profileUuid, segmentUuid, options);
29654
+ const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.countProfileSegmentContactsV1']?.[0]?.url;
29655
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29656
+ },
29657
+ /**
29658
+ * 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.
29214
29659
  * @summary Create a new contact segment
29215
29660
  * @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
29216
29661
  * @param {*} [options] Override http request option.
29662
+ * @deprecated
29217
29663
  * @throws {RequiredError}
29218
29664
  */
29219
29665
  async createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest: ReachV1ContactsSegmentsStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
@@ -29222,10 +29668,50 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
29222
29668
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29223
29669
  },
29224
29670
  /**
29225
- * 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.
29671
+ * 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.
29672
+ * @summary Create a profile segment
29673
+ * @param {string} profileUuid Profile uuid parameter
29674
+ * @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
29675
+ * @param {*} [options] Override http request option.
29676
+ * @throws {RequiredError}
29677
+ */
29678
+ async createAProfileSegmentV1(profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
29679
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAProfileSegmentV1(profileUuid, reachV1ContactsSegmentsProfileStoreRequest, options);
29680
+ const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.createAProfileSegmentV1']?.[0]?.url;
29681
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29682
+ },
29683
+ /**
29684
+ * Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
29685
+ * @summary Delete a profile segment
29686
+ * @param {string} profileUuid Profile uuid parameter
29687
+ * @param {string} segmentUuid Segment uuid parameter
29688
+ * @param {*} [options] Override http request option.
29689
+ * @throws {RequiredError}
29690
+ */
29691
+ async deleteAProfileSegmentV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
29692
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAProfileSegmentV1(profileUuid, segmentUuid, options);
29693
+ const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.deleteAProfileSegmentV1']?.[0]?.url;
29694
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29695
+ },
29696
+ /**
29697
+ * 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.
29698
+ * @summary Get profile segment details
29699
+ * @param {string} profileUuid Profile uuid parameter
29700
+ * @param {string} segmentUuid Segment uuid parameter
29701
+ * @param {*} [options] Override http request option.
29702
+ * @throws {RequiredError}
29703
+ */
29704
+ async getProfileSegmentDetailsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
29705
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileSegmentDetailsV1(profileUuid, segmentUuid, options);
29706
+ const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.getProfileSegmentDetailsV1']?.[0]?.url;
29707
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29708
+ },
29709
+ /**
29710
+ * 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.
29226
29711
  * @summary Get segment details
29227
29712
  * @param {string} segmentUuid Segment uuid parameter
29228
29713
  * @param {*} [options] Override http request option.
29714
+ * @deprecated
29229
29715
  * @throws {RequiredError}
29230
29716
  */
29231
29717
  async getSegmentDetailsV1(segmentUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
@@ -29249,12 +29735,28 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
29249
29735
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29250
29736
  },
29251
29737
  /**
29252
- * 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.
29738
+ * 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.
29739
+ * @summary List profile segments
29740
+ * @param {string} profileUuid Profile uuid parameter
29741
+ * @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
29742
+ * @param {number} [page] Page number
29743
+ * @param {number} [perPage] Number of items per page
29744
+ * @param {*} [options] Override http request option.
29745
+ * @throws {RequiredError}
29746
+ */
29747
+ async listProfileSegmentsV1(profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListProfileSegmentsV1200Response>> {
29748
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listProfileSegmentsV1(profileUuid, countType, page, perPage, options);
29749
+ const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.listProfileSegmentsV1']?.[0]?.url;
29750
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29751
+ },
29752
+ /**
29753
+ * 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
29754
  * @summary List segment contacts
29254
29755
  * @param {string} segmentUuid Segment uuid parameter
29255
29756
  * @param {number} [page] Page number
29256
29757
  * @param {number} [perPage] Number of items per page
29257
29758
  * @param {*} [options] Override http request option.
29759
+ * @deprecated
29258
29760
  * @throws {RequiredError}
29259
29761
  */
29260
29762
  async listSegmentContactsV1(segmentUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachListProfileSegmentContactsV1200Response>> {
@@ -29263,9 +29765,10 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
29263
29765
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29264
29766
  },
29265
29767
  /**
29266
- * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts.
29768
+ * 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
29769
  * @summary List segments
29268
29770
  * @param {*} [options] Override http request option.
29771
+ * @deprecated
29269
29772
  * @throws {RequiredError}
29270
29773
  */
29271
29774
  async listSegmentsV1(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ReachV1ContactsSegmentsContactSegmentResource>>> {
@@ -29273,6 +29776,20 @@ export const ReachSegmentsApiFp = function(configuration?: Configuration) {
29273
29776
  const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.listSegmentsV1']?.[0]?.url;
29274
29777
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29275
29778
  },
29779
+ /**
29780
+ * 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.
29781
+ * @summary Update a profile segment
29782
+ * @param {string} profileUuid Profile uuid parameter
29783
+ * @param {string} segmentUuid Segment uuid parameter
29784
+ * @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
29785
+ * @param {*} [options] Override http request option.
29786
+ * @throws {RequiredError}
29787
+ */
29788
+ async updateAProfileSegmentV1(profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1ContactsSegmentsSegmentResource>> {
29789
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateAProfileSegmentV1(profileUuid, segmentUuid, reachV1ContactsSegmentsProfileUpdateRequest, options);
29790
+ const localVarOperationServerBasePath = operationServerMap['ReachSegmentsApi.updateAProfileSegmentV1']?.[0]?.url;
29791
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
29792
+ },
29276
29793
  }
29277
29794
  };
29278
29795
 
@@ -29284,20 +29801,66 @@ export const ReachSegmentsApiFactory = function (configuration?: Configuration,
29284
29801
  const localVarFp = ReachSegmentsApiFp(configuration)
29285
29802
  return {
29286
29803
  /**
29287
- * 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.
29804
+ * Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
29805
+ * @summary Count profile segment contacts
29806
+ * @param {string} profileUuid Profile uuid parameter
29807
+ * @param {string} segmentUuid Segment uuid parameter
29808
+ * @param {*} [options] Override http request option.
29809
+ * @throws {RequiredError}
29810
+ */
29811
+ countProfileSegmentContactsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentContactsCountResource> {
29812
+ return localVarFp.countProfileSegmentContactsV1(profileUuid, segmentUuid, options).then((request) => request(axios, basePath));
29813
+ },
29814
+ /**
29815
+ * 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
29816
  * @summary Create a new contact segment
29289
29817
  * @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
29290
29818
  * @param {*} [options] Override http request option.
29819
+ * @deprecated
29291
29820
  * @throws {RequiredError}
29292
29821
  */
29293
29822
  createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest: ReachV1ContactsSegmentsStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
29294
29823
  return localVarFp.createANewContactSegmentV1(reachV1ContactsSegmentsStoreRequest, options).then((request) => request(axios, basePath));
29295
29824
  },
29296
29825
  /**
29297
- * 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.
29826
+ * 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.
29827
+ * @summary Create a profile segment
29828
+ * @param {string} profileUuid Profile uuid parameter
29829
+ * @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
29830
+ * @param {*} [options] Override http request option.
29831
+ * @throws {RequiredError}
29832
+ */
29833
+ createAProfileSegmentV1(profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
29834
+ return localVarFp.createAProfileSegmentV1(profileUuid, reachV1ContactsSegmentsProfileStoreRequest, options).then((request) => request(axios, basePath));
29835
+ },
29836
+ /**
29837
+ * Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
29838
+ * @summary Delete a profile segment
29839
+ * @param {string} profileUuid Profile uuid parameter
29840
+ * @param {string} segmentUuid Segment uuid parameter
29841
+ * @param {*} [options] Override http request option.
29842
+ * @throws {RequiredError}
29843
+ */
29844
+ deleteAProfileSegmentV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
29845
+ return localVarFp.deleteAProfileSegmentV1(profileUuid, segmentUuid, options).then((request) => request(axios, basePath));
29846
+ },
29847
+ /**
29848
+ * 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.
29849
+ * @summary Get profile segment details
29850
+ * @param {string} profileUuid Profile uuid parameter
29851
+ * @param {string} segmentUuid Segment uuid parameter
29852
+ * @param {*} [options] Override http request option.
29853
+ * @throws {RequiredError}
29854
+ */
29855
+ getProfileSegmentDetailsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
29856
+ return localVarFp.getProfileSegmentDetailsV1(profileUuid, segmentUuid, options).then((request) => request(axios, basePath));
29857
+ },
29858
+ /**
29859
+ * 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
29860
  * @summary Get segment details
29299
29861
  * @param {string} segmentUuid Segment uuid parameter
29300
29862
  * @param {*} [options] Override http request option.
29863
+ * @deprecated
29301
29864
  * @throws {RequiredError}
29302
29865
  */
29303
29866
  getSegmentDetailsV1(segmentUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
@@ -29317,26 +29880,53 @@ export const ReachSegmentsApiFactory = function (configuration?: Configuration,
29317
29880
  return localVarFp.listProfileSegmentContactsV1(profileUuid, segmentUuid, page, perPage, options).then((request) => request(axios, basePath));
29318
29881
  },
29319
29882
  /**
29320
- * 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.
29883
+ * 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.
29884
+ * @summary List profile segments
29885
+ * @param {string} profileUuid Profile uuid parameter
29886
+ * @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
29887
+ * @param {number} [page] Page number
29888
+ * @param {number} [perPage] Number of items per page
29889
+ * @param {*} [options] Override http request option.
29890
+ * @throws {RequiredError}
29891
+ */
29892
+ listProfileSegmentsV1(profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ReachListProfileSegmentsV1200Response> {
29893
+ return localVarFp.listProfileSegmentsV1(profileUuid, countType, page, perPage, options).then((request) => request(axios, basePath));
29894
+ },
29895
+ /**
29896
+ * 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
29897
  * @summary List segment contacts
29322
29898
  * @param {string} segmentUuid Segment uuid parameter
29323
29899
  * @param {number} [page] Page number
29324
29900
  * @param {number} [perPage] Number of items per page
29325
29901
  * @param {*} [options] Override http request option.
29902
+ * @deprecated
29326
29903
  * @throws {RequiredError}
29327
29904
  */
29328
29905
  listSegmentContactsV1(segmentUuid: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<ReachListProfileSegmentContactsV1200Response> {
29329
29906
  return localVarFp.listSegmentContactsV1(segmentUuid, page, perPage, options).then((request) => request(axios, basePath));
29330
29907
  },
29331
29908
  /**
29332
- * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts.
29909
+ * 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
29910
  * @summary List segments
29334
29911
  * @param {*} [options] Override http request option.
29912
+ * @deprecated
29335
29913
  * @throws {RequiredError}
29336
29914
  */
29337
29915
  listSegmentsV1(options?: RawAxiosRequestConfig): AxiosPromise<Array<ReachV1ContactsSegmentsContactSegmentResource>> {
29338
29916
  return localVarFp.listSegmentsV1(options).then((request) => request(axios, basePath));
29339
29917
  },
29918
+ /**
29919
+ * 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.
29920
+ * @summary Update a profile segment
29921
+ * @param {string} profileUuid Profile uuid parameter
29922
+ * @param {string} segmentUuid Segment uuid parameter
29923
+ * @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
29924
+ * @param {*} [options] Override http request option.
29925
+ * @throws {RequiredError}
29926
+ */
29927
+ updateAProfileSegmentV1(profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1ContactsSegmentsSegmentResource> {
29928
+ return localVarFp.updateAProfileSegmentV1(profileUuid, segmentUuid, reachV1ContactsSegmentsProfileUpdateRequest, options).then((request) => request(axios, basePath));
29929
+ },
29340
29930
  };
29341
29931
  };
29342
29932
 
@@ -29348,10 +29938,24 @@ export const ReachSegmentsApiFactory = function (configuration?: Configuration,
29348
29938
  */
29349
29939
  export class ReachSegmentsApi extends BaseAPI {
29350
29940
  /**
29351
- * 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.
29941
+ * Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
29942
+ * @summary Count profile segment contacts
29943
+ * @param {string} profileUuid Profile uuid parameter
29944
+ * @param {string} segmentUuid Segment uuid parameter
29945
+ * @param {*} [options] Override http request option.
29946
+ * @throws {RequiredError}
29947
+ * @memberof ReachSegmentsApi
29948
+ */
29949
+ public countProfileSegmentContactsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig) {
29950
+ return ReachSegmentsApiFp(this.configuration).countProfileSegmentContactsV1(profileUuid, segmentUuid, options).then((request) => request(this.axios, this.basePath));
29951
+ }
29952
+
29953
+ /**
29954
+ * 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
29955
  * @summary Create a new contact segment
29353
29956
  * @param {ReachV1ContactsSegmentsStoreRequest} reachV1ContactsSegmentsStoreRequest
29354
29957
  * @param {*} [options] Override http request option.
29958
+ * @deprecated
29355
29959
  * @throws {RequiredError}
29356
29960
  * @memberof ReachSegmentsApi
29357
29961
  */
@@ -29360,10 +29964,50 @@ export class ReachSegmentsApi extends BaseAPI {
29360
29964
  }
29361
29965
 
29362
29966
  /**
29363
- * 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.
29967
+ * 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.
29968
+ * @summary Create a profile segment
29969
+ * @param {string} profileUuid Profile uuid parameter
29970
+ * @param {ReachV1ContactsSegmentsProfileStoreRequest} reachV1ContactsSegmentsProfileStoreRequest
29971
+ * @param {*} [options] Override http request option.
29972
+ * @throws {RequiredError}
29973
+ * @memberof ReachSegmentsApi
29974
+ */
29975
+ public createAProfileSegmentV1(profileUuid: string, reachV1ContactsSegmentsProfileStoreRequest: ReachV1ContactsSegmentsProfileStoreRequest, options?: RawAxiosRequestConfig) {
29976
+ return ReachSegmentsApiFp(this.configuration).createAProfileSegmentV1(profileUuid, reachV1ContactsSegmentsProfileStoreRequest, options).then((request) => request(this.axios, this.basePath));
29977
+ }
29978
+
29979
+ /**
29980
+ * Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
29981
+ * @summary Delete a profile segment
29982
+ * @param {string} profileUuid Profile uuid parameter
29983
+ * @param {string} segmentUuid Segment uuid parameter
29984
+ * @param {*} [options] Override http request option.
29985
+ * @throws {RequiredError}
29986
+ * @memberof ReachSegmentsApi
29987
+ */
29988
+ public deleteAProfileSegmentV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig) {
29989
+ return ReachSegmentsApiFp(this.configuration).deleteAProfileSegmentV1(profileUuid, segmentUuid, options).then((request) => request(this.axios, this.basePath));
29990
+ }
29991
+
29992
+ /**
29993
+ * 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.
29994
+ * @summary Get profile segment details
29995
+ * @param {string} profileUuid Profile uuid parameter
29996
+ * @param {string} segmentUuid Segment uuid parameter
29997
+ * @param {*} [options] Override http request option.
29998
+ * @throws {RequiredError}
29999
+ * @memberof ReachSegmentsApi
30000
+ */
30001
+ public getProfileSegmentDetailsV1(profileUuid: string, segmentUuid: string, options?: RawAxiosRequestConfig) {
30002
+ return ReachSegmentsApiFp(this.configuration).getProfileSegmentDetailsV1(profileUuid, segmentUuid, options).then((request) => request(this.axios, this.basePath));
30003
+ }
30004
+
30005
+ /**
30006
+ * 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
30007
  * @summary Get segment details
29365
30008
  * @param {string} segmentUuid Segment uuid parameter
29366
30009
  * @param {*} [options] Override http request option.
30010
+ * @deprecated
29367
30011
  * @throws {RequiredError}
29368
30012
  * @memberof ReachSegmentsApi
29369
30013
  */
@@ -29387,12 +30031,28 @@ export class ReachSegmentsApi extends BaseAPI {
29387
30031
  }
29388
30032
 
29389
30033
  /**
29390
- * 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.
30034
+ * 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.
30035
+ * @summary List profile segments
30036
+ * @param {string} profileUuid Profile uuid parameter
30037
+ * @param {ListProfileSegmentsV1CountTypeEnum} [countType] Which matching contacts to count for each segment
30038
+ * @param {number} [page] Page number
30039
+ * @param {number} [perPage] Number of items per page
30040
+ * @param {*} [options] Override http request option.
30041
+ * @throws {RequiredError}
30042
+ * @memberof ReachSegmentsApi
30043
+ */
30044
+ public listProfileSegmentsV1(profileUuid: string, countType?: ListProfileSegmentsV1CountTypeEnum, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
30045
+ return ReachSegmentsApiFp(this.configuration).listProfileSegmentsV1(profileUuid, countType, page, perPage, options).then((request) => request(this.axios, this.basePath));
30046
+ }
30047
+
30048
+ /**
30049
+ * 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
30050
  * @summary List segment contacts
29392
30051
  * @param {string} segmentUuid Segment uuid parameter
29393
30052
  * @param {number} [page] Page number
29394
30053
  * @param {number} [perPage] Number of items per page
29395
30054
  * @param {*} [options] Override http request option.
30055
+ * @deprecated
29396
30056
  * @throws {RequiredError}
29397
30057
  * @memberof ReachSegmentsApi
29398
30058
  */
@@ -29401,17 +30061,40 @@ export class ReachSegmentsApi extends BaseAPI {
29401
30061
  }
29402
30062
 
29403
30063
  /**
29404
- * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts.
30064
+ * 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
30065
  * @summary List segments
29406
30066
  * @param {*} [options] Override http request option.
30067
+ * @deprecated
29407
30068
  * @throws {RequiredError}
29408
30069
  * @memberof ReachSegmentsApi
29409
30070
  */
29410
30071
  public listSegmentsV1(options?: RawAxiosRequestConfig) {
29411
30072
  return ReachSegmentsApiFp(this.configuration).listSegmentsV1(options).then((request) => request(this.axios, this.basePath));
29412
30073
  }
30074
+
30075
+ /**
30076
+ * 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.
30077
+ * @summary Update a profile segment
30078
+ * @param {string} profileUuid Profile uuid parameter
30079
+ * @param {string} segmentUuid Segment uuid parameter
30080
+ * @param {ReachV1ContactsSegmentsProfileUpdateRequest} reachV1ContactsSegmentsProfileUpdateRequest
30081
+ * @param {*} [options] Override http request option.
30082
+ * @throws {RequiredError}
30083
+ * @memberof ReachSegmentsApi
30084
+ */
30085
+ public updateAProfileSegmentV1(profileUuid: string, segmentUuid: string, reachV1ContactsSegmentsProfileUpdateRequest: ReachV1ContactsSegmentsProfileUpdateRequest, options?: RawAxiosRequestConfig) {
30086
+ return ReachSegmentsApiFp(this.configuration).updateAProfileSegmentV1(profileUuid, segmentUuid, reachV1ContactsSegmentsProfileUpdateRequest, options).then((request) => request(this.axios, this.basePath));
30087
+ }
29413
30088
  }
29414
30089
 
30090
+ /**
30091
+ * @export
30092
+ */
30093
+ export const ListProfileSegmentsV1CountTypeEnum = {
30094
+ All: 'all',
30095
+ Subscribed: 'subscribed'
30096
+ } as const;
30097
+ export type ListProfileSegmentsV1CountTypeEnum = typeof ListProfileSegmentsV1CountTypeEnum[keyof typeof ListProfileSegmentsV1CountTypeEnum];
29415
30098
 
29416
30099
 
29417
30100
  /**