diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e14f84ae..6e7979d29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,44 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/HubSpot/hubspot-api-nodejs/compare/9.1.1...HEAD) +## [Unreleased](https://github.com/HubSpot/hubspot-api-nodejs/compare/10.0.0...HEAD) + +## [10.0.0] - 2023-09-25 + +## Updated + +- `cms.auditLogs.auditLogsApi.getPage(objectId?: Array, userId?: Array, after?: string, before?: string, sort?: Array, eventType?: Array, limit?: number, objectType?: Array, _options?: Configuration)` => `cms.auditLogs.auditLogsApi.getPage(userId?: Array, eventType?: Array, objectType?: Array, objectId?: Array, after?: string, before?: string, limit?: number, sort?: Array, _options?: Configuration)` +- Cnange type from `number` to `string` in `cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.id`. +- Nullable `startDatetime`, `endDatetime` and `totalRequestTime` in `cms/performance/models/PerformanceView`. +- Rename `cms.sourceCode.contentApi.get()` => `cms.sourceCode.contentApi.download()` +- Rename `cms.sourceCode.contentApi.replace()` => `cms.sourceCode.contentApi.createOrUpdate()` +- `crm.timeline.eventsApi.createBatch() BatchResponseTimelineEventResponse | BatchResponseTimelineEventResponseWithErrors` => `crm.timeline.eventsApi.createBatch() BatchResponseTimelineEventResponse | void | BatchResponseTimelineEventResponseWithErrors` +- Cnange type from `ErrorCategory` to `string` in `crm/timeline/models/StandardError::category`. +- Nullable `options` in `crm/timeline/models/TimelineEventTemplateToken` and `codegen/crm/timeline/models/TimelineEventTemplateTokenUpdateRequest`. +- Required `links` in `files/models/FolderUpdateTaskLocator` and `files/models/ImportFromUrlTaskLocator`. +- Nullable `duplicateValidationStrategy`, `duplicateValidationScope` and `overwrite` in `files/models/ImportFromUrlInput`. +- Cnange type from `ErrorCategory` to `string` in `files/models/StandardError::category`. +- Move method `archive` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`. +- Move method `create` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`. +- Move method `doCancel` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`. +- Move method `getById` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`. +- Move method `replace` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`. +- Move method `update` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`. +- Move method `archiveBatch` from `marketing.events.marketingEventsExternalApi` to `marketing.events.batchApi`. +- Move method `doUpsert` from `marketing.events.marketingEventsExternalApi` to `marketing.events.batchApi`. +- Move method `doEmailUpsertById` from `marketing.events.marketingEventsExternalApi` to `marketing.events.subscriberStateChanges`. +- Move method `doUpsertById` from `marketing.events.marketingEventsExternalApi` to `marketing.events.subscriberStateChanges`. +- Rename `marketing.events.settingsExternalApi` => `marketing.events.settingsApi` +- Cnange type from `ErrorCategory` to `string` in `marketing/events/models/StandardError::category`. + +## Added + +- Added param `prev` to `cms/audit_logs/models/PreviousPage`. +- Added param `properties` to `cms.sourceCode.metadataApi.get()`. +- Added param `hash` to `cms/source_code/models/AssetFileMetadata`. +- Added method `getMetadata` to `files.filesApi`. +- Added param `expiresAt` to `files/models/FileUpdateInput` and `files/models/ModelFile`. +- Added params `roleIds`, `sendWelcomeEmail` and `superAdmin` to `settings/users/models/PublicUser` ## [9.1.1] - 2023-08-16 @@ -671,3 +708,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [9.0.1]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/9.0.1 [9.1.0]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/9.1.0 [9.1.1]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/9.1.1 +[10.0.0]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/10.0.0 diff --git a/codegen/cms/audit_logs/apis/AuditLogsApi.ts b/codegen/cms/audit_logs/apis/AuditLogsApi.ts index cb978c26e..e795ec839 100644 --- a/codegen/cms/audit_logs/apis/AuditLogsApi.ts +++ b/codegen/cms/audit_logs/apis/AuditLogsApi.ts @@ -18,16 +18,16 @@ export class AuditLogsApiRequestFactory extends BaseAPIRequestFactory { /** * Returns audit logs based on filters. * Query audit logs - * @param objectId Comma separated list of object ids to filter by. * @param userId Comma separated list of user ids to filter by. + * @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). + * @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * @param objectId Comma separated list of object ids to filter by. * @param after Timestamp after which audit logs will be returned * @param before Timestamp before which audit logs will be returned - * @param sort The sort direction for the audit logs. (Can only sort by timestamp). - * @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). * @param limit The number of logs to return. - * @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * @param sort The sort direction for the audit logs. (Can only sort by timestamp). */ - public async getPage(objectId?: Array, userId?: Array, after?: string, before?: string, sort?: Array, eventType?: Array, limit?: number, objectType?: Array, _options?: Configuration): Promise { + public async getPage(userId?: Array, eventType?: Array, objectType?: Array, objectId?: Array, after?: string, before?: string, limit?: number, sort?: Array, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -46,33 +46,33 @@ export class AuditLogsApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Query Params - if (objectId !== undefined) { - requestContext.setQueryParam("objectId", ObjectSerializer.serialize(objectId, "Array", "")); + if (userId !== undefined) { + requestContext.setQueryParam("userId", ObjectSerializer.serialize(userId, "Array", "")); } // Query Params - if (userId !== undefined) { - requestContext.setQueryParam("userId", ObjectSerializer.serialize(userId, "Array", "")); + if (eventType !== undefined) { + requestContext.setQueryParam("eventType", ObjectSerializer.serialize(eventType, "Array", "")); } // Query Params - if (after !== undefined) { - requestContext.setQueryParam("after", ObjectSerializer.serialize(after, "string", "")); + if (objectType !== undefined) { + requestContext.setQueryParam("objectType", ObjectSerializer.serialize(objectType, "Array", "")); } // Query Params - if (before !== undefined) { - requestContext.setQueryParam("before", ObjectSerializer.serialize(before, "string", "")); + if (objectId !== undefined) { + requestContext.setQueryParam("objectId", ObjectSerializer.serialize(objectId, "Array", "")); } // Query Params - if (sort !== undefined) { - requestContext.setQueryParam("sort", ObjectSerializer.serialize(sort, "Array", "")); + if (after !== undefined) { + requestContext.setQueryParam("after", ObjectSerializer.serialize(after, "string", "")); } // Query Params - if (eventType !== undefined) { - requestContext.setQueryParam("eventType", ObjectSerializer.serialize(eventType, "Array", "")); + if (before !== undefined) { + requestContext.setQueryParam("before", ObjectSerializer.serialize(before, "string", "")); } // Query Params @@ -81,8 +81,8 @@ export class AuditLogsApiRequestFactory extends BaseAPIRequestFactory { } // Query Params - if (objectType !== undefined) { - requestContext.setQueryParam("objectType", ObjectSerializer.serialize(objectType, "Array", "")); + if (sort !== undefined) { + requestContext.setQueryParam("sort", ObjectSerializer.serialize(sort, "Array", "")); } diff --git a/codegen/cms/audit_logs/models/ObjectSerializer.ts b/codegen/cms/audit_logs/models/ObjectSerializer.ts index 509e18ff9..ae205a183 100644 --- a/codegen/cms/audit_logs/models/ObjectSerializer.ts +++ b/codegen/cms/audit_logs/models/ObjectSerializer.ts @@ -3,6 +3,7 @@ export * from '../models/ErrorDetail'; export * from '../models/ModelError'; export * from '../models/NextPage'; export * from '../models/Paging'; +export * from '../models/PreviousPage'; export * from '../models/PublicAuditLog'; import { CollectionResponsePublicAuditLog } from '../models/CollectionResponsePublicAuditLog'; @@ -10,7 +11,8 @@ import { ErrorDetail } from '../models/ErrorDetail'; import { ModelError } from '../models/ModelError'; import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; -import { PublicAuditLog } from '../models/PublicAuditLog'; +import { PreviousPage } from '../models/PreviousPage'; +import { PublicAuditLog } from '../models/PublicAuditLog'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -42,6 +44,7 @@ let typeMap: {[index: string]: any} = { "ModelError": ModelError, "NextPage": NextPage, "Paging": Paging, + "PreviousPage": PreviousPage, "PublicAuditLog": PublicAuditLog, } diff --git a/codegen/cms/audit_logs/models/Paging.ts b/codegen/cms/audit_logs/models/Paging.ts index 286e3b2e9..f5921b17f 100644 --- a/codegen/cms/audit_logs/models/Paging.ts +++ b/codegen/cms/audit_logs/models/Paging.ts @@ -11,9 +11,11 @@ */ import { NextPage } from '../models/NextPage'; +import { PreviousPage } from '../models/PreviousPage'; export class Paging { 'next'?: NextPage; + 'prev'?: PreviousPage; static readonly discriminator: string | undefined = undefined; @@ -23,6 +25,12 @@ export class Paging { "baseName": "next", "type": "NextPage", "format": "" + }, + { + "name": "prev", + "baseName": "prev", + "type": "PreviousPage", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/cms/audit_logs/models/PreviousPage.ts b/codegen/cms/audit_logs/models/PreviousPage.ts new file mode 100644 index 000000000..e483aedae --- /dev/null +++ b/codegen/cms/audit_logs/models/PreviousPage.ts @@ -0,0 +1,41 @@ +/** + * CMS Audit Logs + * Use this endpoint to query audit logs of CMS changes that occurred on your HubSpot account. + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export class PreviousPage { + 'before': string; + 'link'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "before", + "baseName": "before", + "type": "string", + "format": "" + }, + { + "name": "link", + "baseName": "link", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PreviousPage.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/cms/audit_logs/models/PublicAuditLog.ts b/codegen/cms/audit_logs/models/PublicAuditLog.ts index 7d33b12d5..352a9c0bc 100644 --- a/codegen/cms/audit_logs/models/PublicAuditLog.ts +++ b/codegen/cms/audit_logs/models/PublicAuditLog.ts @@ -12,6 +12,14 @@ export class PublicAuditLog { + /** + * The type of event that took place (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). + */ + 'event': PublicAuditLogEventEnum; + /** + * The type of the object (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + */ + 'objectType': PublicAuditLogObjectTypeEnum; /** * The ID of the object. */ @@ -32,18 +40,23 @@ export class PublicAuditLog { * The name of the user who caused the event. */ 'fullName': string; - /** - * The type of event that took place (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). - */ - 'event': PublicAuditLogEventEnum; - /** - * The type of the object (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) - */ - 'objectType': PublicAuditLogObjectTypeEnum; + 'meta'?: any; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "event", + "baseName": "event", + "type": "PublicAuditLogEventEnum", + "format": "" + }, + { + "name": "objectType", + "baseName": "objectType", + "type": "PublicAuditLogObjectTypeEnum", + "format": "" + }, { "name": "objectId", "baseName": "objectId", @@ -75,15 +88,9 @@ export class PublicAuditLog { "format": "" }, { - "name": "event", - "baseName": "event", - "type": "PublicAuditLogEventEnum", - "format": "" - }, - { - "name": "objectType", - "baseName": "objectType", - "type": "PublicAuditLogObjectTypeEnum", + "name": "meta", + "baseName": "meta", + "type": "any", "format": "" } ]; @@ -96,6 +103,6 @@ export class PublicAuditLog { } -export type PublicAuditLogEventEnum = "CREATED" | "UPDATED" | "PUBLISHED" | "DELETED" | "UNPUBLISHED" ; -export type PublicAuditLogObjectTypeEnum = "BLOG" | "BLOG_POST" | "LANDING_PAGE" | "WEBSITE_PAGE" | "TEMPLATE" | "MODULE" | "GLOBAL_MODULE" | "SERVERLESS_FUNCTION" | "DOMAIN" | "URL_MAPPING" | "EMAIL" | "CONTENT_SETTINGS" | "HUBDB_TABLE" | "KNOWLEDGE_BASE_ARTICLE" | "KNOWLEDGE_BASE" | "THEME" | "CSS" | "JS" ; +export type PublicAuditLogEventEnum = "CREATED" | "UPDATED" | "PUBLISHED" | "DELETED" | "UNPUBLISHED" | "RESTORE" ; +export type PublicAuditLogObjectTypeEnum = "BLOG" | "BLOG_POST" | "LANDING_PAGE" | "WEBSITE_PAGE" | "TEMPLATE" | "MODULE" | "GLOBAL_MODULE" | "SERVERLESS_FUNCTION" | "DOMAIN" | "URL_MAPPING" | "EMAIL" | "CONTENT_SETTINGS" | "HUBDB_TABLE" | "KNOWLEDGE_BASE_ARTICLE" | "KNOWLEDGE_BASE" | "THEME" | "CSS" | "JS" | "CTA" | "FILE" ; diff --git a/codegen/cms/audit_logs/models/all.ts b/codegen/cms/audit_logs/models/all.ts index 6290ddf23..814771a16 100644 --- a/codegen/cms/audit_logs/models/all.ts +++ b/codegen/cms/audit_logs/models/all.ts @@ -3,4 +3,5 @@ export * from '../models/ErrorDetail' export * from '../models/ModelError' export * from '../models/NextPage' export * from '../models/Paging' +export * from '../models/PreviousPage' export * from '../models/PublicAuditLog' diff --git a/codegen/cms/audit_logs/types/ObjectParamAPI.ts b/codegen/cms/audit_logs/types/ObjectParamAPI.ts index 1d3d0de9f..2daf89137 100644 --- a/codegen/cms/audit_logs/types/ObjectParamAPI.ts +++ b/codegen/cms/audit_logs/types/ObjectParamAPI.ts @@ -7,41 +7,41 @@ import { AuditLogsApiRequestFactory, AuditLogsApiResponseProcessor} from "../api export interface AuditLogsApiGetPageRequest { /** - * Comma separated list of object ids to filter by. + * Comma separated list of user ids to filter by. * @type Array<string> * @memberof AuditLogsApigetPage */ - objectId?: Array + userId?: Array /** - * Comma separated list of user ids to filter by. + * Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). * @type Array<string> * @memberof AuditLogsApigetPage */ - userId?: Array + eventType?: Array /** - * Timestamp after which audit logs will be returned - * @type string + * Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * @type Array<string> * @memberof AuditLogsApigetPage */ - after?: string + objectType?: Array /** - * Timestamp before which audit logs will be returned - * @type string + * Comma separated list of object ids to filter by. + * @type Array<string> * @memberof AuditLogsApigetPage */ - before?: string + objectId?: Array /** - * The sort direction for the audit logs. (Can only sort by timestamp). - * @type Array<string> + * Timestamp after which audit logs will be returned + * @type string * @memberof AuditLogsApigetPage */ - sort?: Array + after?: string /** - * Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). - * @type Array<string> + * Timestamp before which audit logs will be returned + * @type string * @memberof AuditLogsApigetPage */ - eventType?: Array + before?: string /** * The number of logs to return. * @type number @@ -49,11 +49,11 @@ export interface AuditLogsApiGetPageRequest { */ limit?: number /** - * Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * The sort direction for the audit logs. (Can only sort by timestamp). * @type Array<string> * @memberof AuditLogsApigetPage */ - objectType?: Array + sort?: Array } export class ObjectAuditLogsApi { @@ -69,7 +69,7 @@ export class ObjectAuditLogsApi { * @param param the request object */ public getPage(param: AuditLogsApiGetPageRequest = {}, options?: Configuration): Promise { - return this.api.getPage(param.objectId, param.userId, param.after, param.before, param.sort, param.eventType, param.limit, param.objectType, options).toPromise(); + return this.api.getPage(param.userId, param.eventType, param.objectType, param.objectId, param.after, param.before, param.limit, param.sort, options).toPromise(); } } diff --git a/codegen/cms/audit_logs/types/ObservableAPI.ts b/codegen/cms/audit_logs/types/ObservableAPI.ts index da616ca2a..b80097dd5 100644 --- a/codegen/cms/audit_logs/types/ObservableAPI.ts +++ b/codegen/cms/audit_logs/types/ObservableAPI.ts @@ -23,17 +23,17 @@ export class ObservableAuditLogsApi { /** * Returns audit logs based on filters. * Query audit logs - * @param objectId Comma separated list of object ids to filter by. * @param userId Comma separated list of user ids to filter by. + * @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). + * @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * @param objectId Comma separated list of object ids to filter by. * @param after Timestamp after which audit logs will be returned * @param before Timestamp before which audit logs will be returned - * @param sort The sort direction for the audit logs. (Can only sort by timestamp). - * @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). * @param limit The number of logs to return. - * @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * @param sort The sort direction for the audit logs. (Can only sort by timestamp). */ - public getPage(objectId?: Array, userId?: Array, after?: string, before?: string, sort?: Array, eventType?: Array, limit?: number, objectType?: Array, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.getPage(objectId, userId, after, before, sort, eventType, limit, objectType, _options); + public getPage(userId?: Array, eventType?: Array, objectType?: Array, objectId?: Array, after?: string, before?: string, limit?: number, sort?: Array, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getPage(userId, eventType, objectType, objectId, after, before, limit, sort, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); diff --git a/codegen/cms/audit_logs/types/PromiseAPI.ts b/codegen/cms/audit_logs/types/PromiseAPI.ts index 04ab253c2..0462c7cb5 100644 --- a/codegen/cms/audit_logs/types/PromiseAPI.ts +++ b/codegen/cms/audit_logs/types/PromiseAPI.ts @@ -18,17 +18,17 @@ export class PromiseAuditLogsApi { /** * Returns audit logs based on filters. * Query audit logs - * @param objectId Comma separated list of object ids to filter by. * @param userId Comma separated list of user ids to filter by. + * @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). + * @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * @param objectId Comma separated list of object ids to filter by. * @param after Timestamp after which audit logs will be returned * @param before Timestamp before which audit logs will be returned - * @param sort The sort direction for the audit logs. (Can only sort by timestamp). - * @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED). * @param limit The number of logs to return. - * @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.) + * @param sort The sort direction for the audit logs. (Can only sort by timestamp). */ - public getPage(objectId?: Array, userId?: Array, after?: string, before?: string, sort?: Array, eventType?: Array, limit?: number, objectType?: Array, _options?: Configuration): Promise { - const result = this.api.getPage(objectId, userId, after, before, sort, eventType, limit, objectType, _options); + public getPage(userId?: Array, eventType?: Array, objectType?: Array, objectId?: Array, after?: string, before?: string, limit?: number, sort?: Array, _options?: Configuration): Promise { + const result = this.api.getPage(userId, eventType, objectType, objectId, after, before, limit, sort, _options); return result.toPromise(); } diff --git a/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts b/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts index d3e157147..a8cba2aa7 100644 --- a/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts +++ b/codegen/cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.ts @@ -32,7 +32,7 @@ export class HubDbTableRowV3BatchUpdateRequest { /** * The id of the table row */ - 'id': number; + 'id': string; static readonly discriminator: string | undefined = undefined; @@ -70,8 +70,8 @@ export class HubDbTableRowV3BatchUpdateRequest { { "name": "id", "baseName": "id", - "type": "number", - "format": "int64" + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/cms/performance/models/PerformanceView.ts b/codegen/cms/performance/models/PerformanceView.ts index 7ae38f5a7..2de3d0e6d 100644 --- a/codegen/cms/performance/models/PerformanceView.ts +++ b/codegen/cms/performance/models/PerformanceView.ts @@ -39,8 +39,8 @@ export class PerformanceView { * The timestamp in milliseconds of the end of this interval. */ 'endTimestamp': number; - 'startDatetime': string; - 'endDatetime': string; + 'startDatetime'?: string; + 'endDatetime'?: string; /** * The total number of requests received in this period. */ @@ -53,7 +53,7 @@ export class PerformanceView { * The percentage of requests that were served cached responses. */ 'cacheHitRate': number; - 'totalRequestTime': number; + 'totalRequestTime'?: number; /** * The average response time in milliseconds from the origin to the edge. */ diff --git a/codegen/cms/performance/models/PublicPerformanceResponse.ts b/codegen/cms/performance/models/PublicPerformanceResponse.ts index 4c4b82472..6d5185689 100644 --- a/codegen/cms/performance/models/PublicPerformanceResponse.ts +++ b/codegen/cms/performance/models/PublicPerformanceResponse.ts @@ -13,23 +13,17 @@ import { PerformanceView } from '../models/PerformanceView'; export class PublicPerformanceResponse { - 'data': Array; 'domain'?: string; 'path'?: string; 'startInterval': number; 'endInterval': number; + 'data': Array; 'interval': PublicPerformanceResponseIntervalEnum; 'period'?: PublicPerformanceResponsePeriodEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "data", - "baseName": "data", - "type": "Array", - "format": "" - }, { "name": "domain", "baseName": "domain", @@ -54,6 +48,12 @@ export class PublicPerformanceResponse { "type": "number", "format": "int64" }, + { + "name": "data", + "baseName": "data", + "type": "Array", + "format": "" + }, { "name": "interval", "baseName": "interval", diff --git a/codegen/cms/site_search/apis/PublicApi.ts b/codegen/cms/site_search/apis/PublicApi.ts index f6d7e95e0..6b8acafdf 100644 --- a/codegen/cms/site_search/apis/PublicApi.ts +++ b/codegen/cms/site_search/apis/PublicApi.ts @@ -82,7 +82,7 @@ export class PublicApiRequestFactory extends BaseAPIRequestFactory { * @param length Specifies the length of the search results. Can be set to `LONG` or `SHORT`. `SHORT` will return the first 128 characters of the content's meta description. `LONG` will build a more detailed content snippet based on the html/content of the page. * @param groupId Specifies which blog(s) to be searched by blog ID. Can be used multiple times to search more than one blog. */ - public async search(q?: string, limit?: number, offset?: number, language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za', matchPrefix?: boolean, autocomplete?: boolean, popularityBoost?: number, boostLimit?: number, boostRecent?: string, tableId?: number, hubdbQuery?: string, domain?: Array, type?: Array<'LANDING_PAGE' | 'BLOG_POST' | 'SITE_PAGE' | 'KNOWLEDGE_ARTICLE' | 'LISTING_PAGE'>, pathPrefix?: Array, property?: Array, length?: 'SHORT' | 'LONG', groupId?: Array, _options?: Configuration): Promise { + public async search(q?: string, limit?: number, offset?: number, language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cn' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-mx' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za', matchPrefix?: boolean, autocomplete?: boolean, popularityBoost?: number, boostLimit?: number, boostRecent?: string, tableId?: number, hubdbQuery?: string, domain?: Array, type?: Array<'LANDING_PAGE' | 'BLOG_POST' | 'SITE_PAGE' | 'KNOWLEDGE_ARTICLE' | 'LISTING_PAGE'>, pathPrefix?: Array, property?: Array, length?: 'SHORT' | 'LONG', groupId?: Array, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -126,7 +126,7 @@ export class PublicApiRequestFactory extends BaseAPIRequestFactory { // Query Params if (language !== undefined) { - requestContext.setQueryParam("language", ObjectSerializer.serialize(language, "'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za'", "")); + requestContext.setQueryParam("language", ObjectSerializer.serialize(language, "'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cn' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-mx' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za'", "")); } // Query Params diff --git a/codegen/cms/site_search/models/ContentSearchResult.ts b/codegen/cms/site_search/models/ContentSearchResult.ts index d98365702..9e7c29b0b 100644 --- a/codegen/cms/site_search/models/ContentSearchResult.ts +++ b/codegen/cms/site_search/models/ContentSearchResult.ts @@ -200,5 +200,5 @@ export class ContentSearchResult { export type ContentSearchResultTypeEnum = "LANDING_PAGE" | "BLOG_POST" | "SITE_PAGE" | "KNOWLEDGE_ARTICLE" | "LISTING_PAGE" ; -export type ContentSearchResultLanguageEnum = "af" | "af-na" | "af-za" | "agq" | "agq-cm" | "ak" | "ak-gh" | "am" | "am-et" | "ar" | "ar-001" | "ar-ae" | "ar-bh" | "ar-dj" | "ar-dz" | "ar-eg" | "ar-eh" | "ar-er" | "ar-il" | "ar-iq" | "ar-jo" | "ar-km" | "ar-kw" | "ar-lb" | "ar-ly" | "ar-ma" | "ar-mr" | "ar-om" | "ar-ps" | "ar-qa" | "ar-sa" | "ar-sd" | "ar-so" | "ar-ss" | "ar-sy" | "ar-td" | "ar-tn" | "ar-ye" | "as" | "as-in" | "asa" | "asa-tz" | "ast" | "ast-es" | "az" | "az-az" | "bas" | "bas-cm" | "be" | "be-by" | "bem" | "bem-zm" | "bez" | "bez-tz" | "bg" | "bg-bg" | "bm" | "bm-ml" | "bn" | "bn-bd" | "bn-in" | "bo" | "bo-cn" | "bo-in" | "br" | "br-fr" | "brx" | "brx-in" | "bs" | "bs-ba" | "ca" | "ca-ad" | "ca-es" | "ca-fr" | "ca-it" | "ccp" | "ccp-bd" | "ccp-in" | "ce" | "ce-ru" | "ceb" | "ceb-ph" | "cgg" | "cgg-ug" | "chr" | "chr-us" | "ckb" | "ckb-iq" | "ckb-ir" | "cs" | "cs-cz" | "cu" | "cu-ru" | "cy" | "cy-gb" | "da" | "da-dk" | "da-gl" | "dav" | "dav-ke" | "de" | "de-at" | "de-be" | "de-ch" | "de-de" | "de-gr" | "de-it" | "de-li" | "de-lu" | "dje" | "dje-ne" | "doi" | "doi-in" | "dsb" | "dsb-de" | "dua" | "dua-cm" | "dyo" | "dyo-sn" | "dz" | "dz-bt" | "ebu" | "ebu-ke" | "ee" | "ee-gh" | "ee-tg" | "el" | "el-cy" | "el-gr" | "en" | "en-001" | "en-150" | "en-ae" | "en-ag" | "en-ai" | "en-as" | "en-at" | "en-au" | "en-bb" | "en-be" | "en-bi" | "en-bm" | "en-bs" | "en-bw" | "en-bz" | "en-ca" | "en-cc" | "en-ch" | "en-ck" | "en-cm" | "en-cx" | "en-cy" | "en-de" | "en-dg" | "en-dk" | "en-dm" | "en-er" | "en-fi" | "en-fj" | "en-fk" | "en-fm" | "en-gb" | "en-gd" | "en-gg" | "en-gh" | "en-gi" | "en-gm" | "en-gu" | "en-gy" | "en-hk" | "en-ie" | "en-il" | "en-im" | "en-in" | "en-io" | "en-je" | "en-jm" | "en-ke" | "en-ki" | "en-kn" | "en-ky" | "en-lc" | "en-lr" | "en-ls" | "en-lu" | "en-mg" | "en-mh" | "en-mo" | "en-mp" | "en-ms" | "en-mt" | "en-mu" | "en-mw" | "en-my" | "en-na" | "en-nf" | "en-ng" | "en-nl" | "en-nr" | "en-nu" | "en-nz" | "en-pg" | "en-ph" | "en-pk" | "en-pn" | "en-pr" | "en-pw" | "en-rw" | "en-sb" | "en-sc" | "en-sd" | "en-se" | "en-sg" | "en-sh" | "en-si" | "en-sl" | "en-ss" | "en-sx" | "en-sz" | "en-tc" | "en-tk" | "en-to" | "en-tt" | "en-tv" | "en-tz" | "en-ug" | "en-um" | "en-us" | "en-vc" | "en-vg" | "en-vi" | "en-vu" | "en-ws" | "en-za" | "en-zm" | "en-zw" | "eo" | "eo-001" | "es" | "es-419" | "es-ar" | "es-bo" | "es-br" | "es-bz" | "es-cl" | "es-co" | "es-cr" | "es-cu" | "es-do" | "es-ea" | "es-ec" | "es-es" | "es-gq" | "es-gt" | "es-hn" | "es-ic" | "es-mx" | "es-ni" | "es-pa" | "es-pe" | "es-ph" | "es-pr" | "es-py" | "es-sv" | "es-us" | "es-uy" | "es-ve" | "et" | "et-ee" | "eu" | "eu-es" | "ewo" | "ewo-cm" | "fa" | "fa-af" | "fa-ir" | "ff" | "ff-bf" | "ff-cm" | "ff-gh" | "ff-gm" | "ff-gn" | "ff-gw" | "ff-lr" | "ff-mr" | "ff-ne" | "ff-ng" | "ff-sl" | "ff-sn" | "fi" | "fi-fi" | "fil" | "fil-ph" | "fo" | "fo-dk" | "fo-fo" | "fr" | "fr-be" | "fr-bf" | "fr-bi" | "fr-bj" | "fr-bl" | "fr-ca" | "fr-cd" | "fr-cf" | "fr-cg" | "fr-ch" | "fr-ci" | "fr-cm" | "fr-dj" | "fr-dz" | "fr-fr" | "fr-ga" | "fr-gf" | "fr-gn" | "fr-gp" | "fr-gq" | "fr-ht" | "fr-km" | "fr-lu" | "fr-ma" | "fr-mc" | "fr-mf" | "fr-mg" | "fr-ml" | "fr-mq" | "fr-mr" | "fr-mu" | "fr-nc" | "fr-ne" | "fr-pf" | "fr-pm" | "fr-re" | "fr-rw" | "fr-sc" | "fr-sn" | "fr-sy" | "fr-td" | "fr-tg" | "fr-tn" | "fr-vu" | "fr-wf" | "fr-yt" | "fur" | "fur-it" | "fy" | "fy-nl" | "ga" | "ga-gb" | "ga-ie" | "gd" | "gd-gb" | "gl" | "gl-es" | "gsw" | "gsw-ch" | "gsw-fr" | "gsw-li" | "gu" | "gu-in" | "guz" | "guz-ke" | "gv" | "gv-im" | "ha" | "ha-gh" | "ha-ne" | "ha-ng" | "haw" | "haw-us" | "he" | "hi" | "hi-in" | "hr" | "hr-ba" | "hr-hr" | "hsb" | "hsb-de" | "hu" | "hu-hu" | "hy" | "hy-am" | "ia" | "ia-001" | "id" | "ig" | "ig-ng" | "ii" | "ii-cn" | "id-id" | "is" | "is-is" | "it" | "it-ch" | "it-it" | "it-sm" | "it-va" | "he-il" | "ja" | "ja-jp" | "jgo" | "jgo-cm" | "yi" | "yi-001" | "jmc" | "jmc-tz" | "jv" | "jv-id" | "ka" | "ka-ge" | "kab" | "kab-dz" | "kam" | "kam-ke" | "kde" | "kde-tz" | "kea" | "kea-cv" | "khq" | "khq-ml" | "ki" | "ki-ke" | "kk" | "kk-kz" | "kkj" | "kkj-cm" | "kl" | "kl-gl" | "kln" | "kln-ke" | "km" | "km-kh" | "kn" | "kn-in" | "ko" | "ko-kp" | "ko-kr" | "kok" | "kok-in" | "ks" | "ks-in" | "ksb" | "ksb-tz" | "ksf" | "ksf-cm" | "ksh" | "ksh-de" | "kw" | "kw-gb" | "ku" | "ku-tr" | "ky" | "ky-kg" | "lag" | "lag-tz" | "lb" | "lb-lu" | "lg" | "lg-ug" | "lkt" | "lkt-us" | "ln" | "ln-ao" | "ln-cd" | "ln-cf" | "ln-cg" | "lo" | "lo-la" | "lrc" | "lrc-iq" | "lrc-ir" | "lt" | "lt-lt" | "lu" | "lu-cd" | "luo" | "luo-ke" | "luy" | "luy-ke" | "lv" | "lv-lv" | "mai" | "mai-in" | "mas" | "mas-ke" | "mas-tz" | "mer" | "mer-ke" | "mfe" | "mfe-mu" | "mg" | "mg-mg" | "mgh" | "mgh-mz" | "mgo" | "mgo-cm" | "mi" | "mi-nz" | "mk" | "mk-mk" | "ml" | "ml-in" | "mn" | "mn-mn" | "mni" | "mni-in" | "mr" | "mr-in" | "ms" | "ms-bn" | "ms-id" | "ms-my" | "ms-sg" | "mt" | "mt-mt" | "mua" | "mua-cm" | "my" | "my-mm" | "mzn" | "mzn-ir" | "naq" | "naq-na" | "nb" | "nb-no" | "nb-sj" | "nd" | "nd-zw" | "nds" | "nds-de" | "nds-nl" | "ne" | "ne-in" | "ne-np" | "nl" | "nl-aw" | "nl-be" | "nl-ch" | "nl-bq" | "nl-cw" | "nl-lu" | "nl-nl" | "nl-sr" | "nl-sx" | "nmg" | "nmg-cm" | "nn" | "nn-no" | "nnh" | "nnh-cm" | "no" | "no-no" | "nus" | "nus-ss" | "nyn" | "nyn-ug" | "om" | "om-et" | "om-ke" | "or" | "or-in" | "os" | "os-ge" | "os-ru" | "pa" | "pa-in" | "pa-pk" | "pcm" | "pcm-ng" | "pl" | "pl-pl" | "prg" | "prg-001" | "ps" | "ps-af" | "ps-pk" | "pt" | "pt-ao" | "pt-br" | "pt-ch" | "pt-cv" | "pt-gq" | "pt-gw" | "pt-lu" | "pt-mo" | "pt-mz" | "pt-pt" | "pt-st" | "pt-tl" | "qu" | "qu-bo" | "qu-ec" | "qu-pe" | "rm" | "rm-ch" | "rn" | "rn-bi" | "ro" | "ro-md" | "ro-ro" | "rof" | "rof-tz" | "ru" | "ru-by" | "ru-kg" | "ru-kz" | "ru-md" | "ru-ru" | "ru-ua" | "rw" | "rw-rw" | "rwk" | "rwk-tz" | "sa" | "sa-in" | "sah" | "sah-ru" | "saq" | "saq-ke" | "sat" | "sat-in" | "sbp" | "sbp-tz" | "sd" | "sd-in" | "sd-pk" | "se" | "se-fi" | "se-no" | "se-se" | "seh" | "seh-mz" | "ses" | "ses-ml" | "sg" | "sg-cf" | "shi" | "shi-ma" | "si" | "si-lk" | "sk" | "sk-sk" | "sl" | "sl-si" | "smn" | "smn-fi" | "sn" | "sn-zw" | "so" | "so-dj" | "so-et" | "so-ke" | "so-so" | "sq" | "sq-al" | "sq-mk" | "sq-xk" | "sr" | "sr-ba" | "sr-cs" | "sr-me" | "sr-rs" | "sr-xk" | "su" | "su-id" | "sv" | "sv-ax" | "sv-fi" | "sv-se" | "sw" | "sw-cd" | "sw-ke" | "sw-tz" | "sw-ug" | "sy" | "ta" | "ta-in" | "ta-lk" | "ta-my" | "ta-sg" | "te" | "te-in" | "teo" | "teo-ke" | "teo-ug" | "tg" | "tg-tj" | "th" | "th-th" | "ti" | "ti-er" | "ti-et" | "tk" | "tk-tm" | "tl" | "to" | "to-to" | "tr" | "tr-cy" | "tr-tr" | "tt" | "tt-ru" | "twq" | "twq-ne" | "tzm" | "tzm-ma" | "ug" | "ug-cn" | "uk" | "uk-ua" | "ur" | "ur-in" | "ur-pk" | "uz" | "uz-af" | "uz-uz" | "vai" | "vai-lr" | "vi" | "vi-vn" | "vo" | "vo-001" | "vun" | "vun-tz" | "wae" | "wae-ch" | "wo" | "wo-sn" | "xh" | "xh-za" | "xog" | "xog-ug" | "yav" | "yav-cm" | "yo" | "yo-bj" | "yo-ng" | "yue" | "yue-cn" | "yue-hk" | "zgh" | "zgh-ma" | "zh" | "zh-cn" | "zh-hk" | "zh-mo" | "zh-sg" | "zh-tw" | "zh-hans" | "zh-hant" | "zu" | "zu-za" ; +export type ContentSearchResultLanguageEnum = "af" | "af-na" | "af-za" | "agq" | "agq-cm" | "ak" | "ak-gh" | "am" | "am-et" | "ar" | "ar-001" | "ar-ae" | "ar-bh" | "ar-dj" | "ar-dz" | "ar-eg" | "ar-eh" | "ar-er" | "ar-il" | "ar-iq" | "ar-jo" | "ar-km" | "ar-kw" | "ar-lb" | "ar-ly" | "ar-ma" | "ar-mr" | "ar-om" | "ar-ps" | "ar-qa" | "ar-sa" | "ar-sd" | "ar-so" | "ar-ss" | "ar-sy" | "ar-td" | "ar-tn" | "ar-ye" | "as" | "as-in" | "asa" | "asa-tz" | "ast" | "ast-es" | "az" | "az-az" | "bas" | "bas-cm" | "be" | "be-by" | "bem" | "bem-zm" | "bez" | "bez-tz" | "bg" | "bg-bg" | "bm" | "bm-ml" | "bn" | "bn-bd" | "bn-in" | "bo" | "bo-cn" | "bo-in" | "br" | "br-fr" | "brx" | "brx-in" | "bs" | "bs-ba" | "ca" | "ca-ad" | "ca-es" | "ca-fr" | "ca-it" | "ccp" | "ccp-bd" | "ccp-in" | "ce" | "ce-ru" | "ceb" | "ceb-ph" | "cgg" | "cgg-ug" | "chr" | "chr-us" | "ckb" | "ckb-iq" | "ckb-ir" | "cs" | "cs-cz" | "cu" | "cu-ru" | "cy" | "cy-gb" | "da" | "da-dk" | "da-gl" | "dav" | "dav-ke" | "de" | "de-at" | "de-be" | "de-ch" | "de-de" | "de-gr" | "de-it" | "de-li" | "de-lu" | "dje" | "dje-ne" | "doi" | "doi-in" | "dsb" | "dsb-de" | "dua" | "dua-cm" | "dyo" | "dyo-sn" | "dz" | "dz-bt" | "ebu" | "ebu-ke" | "ee" | "ee-gh" | "ee-tg" | "el" | "el-cy" | "el-gr" | "en" | "en-001" | "en-150" | "en-ae" | "en-ag" | "en-ai" | "en-as" | "en-at" | "en-au" | "en-bb" | "en-be" | "en-bi" | "en-bm" | "en-bs" | "en-bw" | "en-bz" | "en-ca" | "en-cc" | "en-ch" | "en-ck" | "en-cm" | "en-cn" | "en-cx" | "en-cy" | "en-de" | "en-dg" | "en-dk" | "en-dm" | "en-er" | "en-fi" | "en-fj" | "en-fk" | "en-fm" | "en-gb" | "en-gd" | "en-gg" | "en-gh" | "en-gi" | "en-gm" | "en-gu" | "en-gy" | "en-hk" | "en-ie" | "en-il" | "en-im" | "en-in" | "en-io" | "en-je" | "en-jm" | "en-ke" | "en-ki" | "en-kn" | "en-ky" | "en-lc" | "en-lr" | "en-ls" | "en-lu" | "en-mg" | "en-mh" | "en-mo" | "en-mp" | "en-ms" | "en-mt" | "en-mu" | "en-mw" | "en-mx" | "en-my" | "en-na" | "en-nf" | "en-ng" | "en-nl" | "en-nr" | "en-nu" | "en-nz" | "en-pg" | "en-ph" | "en-pk" | "en-pn" | "en-pr" | "en-pw" | "en-rw" | "en-sb" | "en-sc" | "en-sd" | "en-se" | "en-sg" | "en-sh" | "en-si" | "en-sl" | "en-ss" | "en-sx" | "en-sz" | "en-tc" | "en-tk" | "en-to" | "en-tt" | "en-tv" | "en-tz" | "en-ug" | "en-um" | "en-us" | "en-vc" | "en-vg" | "en-vi" | "en-vu" | "en-ws" | "en-za" | "en-zm" | "en-zw" | "eo" | "eo-001" | "es" | "es-419" | "es-ar" | "es-bo" | "es-br" | "es-bz" | "es-cl" | "es-co" | "es-cr" | "es-cu" | "es-do" | "es-ea" | "es-ec" | "es-es" | "es-gq" | "es-gt" | "es-hn" | "es-ic" | "es-mx" | "es-ni" | "es-pa" | "es-pe" | "es-ph" | "es-pr" | "es-py" | "es-sv" | "es-us" | "es-uy" | "es-ve" | "et" | "et-ee" | "eu" | "eu-es" | "ewo" | "ewo-cm" | "fa" | "fa-af" | "fa-ir" | "ff" | "ff-bf" | "ff-cm" | "ff-gh" | "ff-gm" | "ff-gn" | "ff-gw" | "ff-lr" | "ff-mr" | "ff-ne" | "ff-ng" | "ff-sl" | "ff-sn" | "fi" | "fi-fi" | "fil" | "fil-ph" | "fo" | "fo-dk" | "fo-fo" | "fr" | "fr-be" | "fr-bf" | "fr-bi" | "fr-bj" | "fr-bl" | "fr-ca" | "fr-cd" | "fr-cf" | "fr-cg" | "fr-ch" | "fr-ci" | "fr-cm" | "fr-dj" | "fr-dz" | "fr-fr" | "fr-ga" | "fr-gf" | "fr-gn" | "fr-gp" | "fr-gq" | "fr-ht" | "fr-km" | "fr-lu" | "fr-ma" | "fr-mc" | "fr-mf" | "fr-mg" | "fr-ml" | "fr-mq" | "fr-mr" | "fr-mu" | "fr-nc" | "fr-ne" | "fr-pf" | "fr-pm" | "fr-re" | "fr-rw" | "fr-sc" | "fr-sn" | "fr-sy" | "fr-td" | "fr-tg" | "fr-tn" | "fr-vu" | "fr-wf" | "fr-yt" | "fur" | "fur-it" | "fy" | "fy-nl" | "ga" | "ga-gb" | "ga-ie" | "gd" | "gd-gb" | "gl" | "gl-es" | "gsw" | "gsw-ch" | "gsw-fr" | "gsw-li" | "gu" | "gu-in" | "guz" | "guz-ke" | "gv" | "gv-im" | "ha" | "ha-gh" | "ha-ne" | "ha-ng" | "haw" | "haw-us" | "he" | "hi" | "hi-in" | "hr" | "hr-ba" | "hr-hr" | "hsb" | "hsb-de" | "hu" | "hu-hu" | "hy" | "hy-am" | "ia" | "ia-001" | "id" | "ig" | "ig-ng" | "ii" | "ii-cn" | "id-id" | "is" | "is-is" | "it" | "it-ch" | "it-it" | "it-sm" | "it-va" | "he-il" | "ja" | "ja-jp" | "jgo" | "jgo-cm" | "yi" | "yi-001" | "jmc" | "jmc-tz" | "jv" | "jv-id" | "ka" | "ka-ge" | "kab" | "kab-dz" | "kam" | "kam-ke" | "kde" | "kde-tz" | "kea" | "kea-cv" | "khq" | "khq-ml" | "ki" | "ki-ke" | "kk" | "kk-kz" | "kkj" | "kkj-cm" | "kl" | "kl-gl" | "kln" | "kln-ke" | "km" | "km-kh" | "kn" | "kn-in" | "ko" | "ko-kp" | "ko-kr" | "kok" | "kok-in" | "ks" | "ks-in" | "ksb" | "ksb-tz" | "ksf" | "ksf-cm" | "ksh" | "ksh-de" | "kw" | "kw-gb" | "ku" | "ku-tr" | "ky" | "ky-kg" | "lag" | "lag-tz" | "lb" | "lb-lu" | "lg" | "lg-ug" | "lkt" | "lkt-us" | "ln" | "ln-ao" | "ln-cd" | "ln-cf" | "ln-cg" | "lo" | "lo-la" | "lrc" | "lrc-iq" | "lrc-ir" | "lt" | "lt-lt" | "lu" | "lu-cd" | "luo" | "luo-ke" | "luy" | "luy-ke" | "lv" | "lv-lv" | "mai" | "mai-in" | "mas" | "mas-ke" | "mas-tz" | "mer" | "mer-ke" | "mfe" | "mfe-mu" | "mg" | "mg-mg" | "mgh" | "mgh-mz" | "mgo" | "mgo-cm" | "mi" | "mi-nz" | "mk" | "mk-mk" | "ml" | "ml-in" | "mn" | "mn-mn" | "mni" | "mni-in" | "mr" | "mr-in" | "ms" | "ms-bn" | "ms-id" | "ms-my" | "ms-sg" | "mt" | "mt-mt" | "mua" | "mua-cm" | "my" | "my-mm" | "mzn" | "mzn-ir" | "naq" | "naq-na" | "nb" | "nb-no" | "nb-sj" | "nd" | "nd-zw" | "nds" | "nds-de" | "nds-nl" | "ne" | "ne-in" | "ne-np" | "nl" | "nl-aw" | "nl-be" | "nl-ch" | "nl-bq" | "nl-cw" | "nl-lu" | "nl-nl" | "nl-sr" | "nl-sx" | "nmg" | "nmg-cm" | "nn" | "nn-no" | "nnh" | "nnh-cm" | "no" | "no-no" | "nus" | "nus-ss" | "nyn" | "nyn-ug" | "om" | "om-et" | "om-ke" | "or" | "or-in" | "os" | "os-ge" | "os-ru" | "pa" | "pa-in" | "pa-pk" | "pcm" | "pcm-ng" | "pl" | "pl-pl" | "prg" | "prg-001" | "ps" | "ps-af" | "ps-pk" | "pt" | "pt-ao" | "pt-br" | "pt-ch" | "pt-cv" | "pt-gq" | "pt-gw" | "pt-lu" | "pt-mo" | "pt-mz" | "pt-pt" | "pt-st" | "pt-tl" | "qu" | "qu-bo" | "qu-ec" | "qu-pe" | "rm" | "rm-ch" | "rn" | "rn-bi" | "ro" | "ro-md" | "ro-ro" | "rof" | "rof-tz" | "ru" | "ru-by" | "ru-kg" | "ru-kz" | "ru-md" | "ru-ru" | "ru-ua" | "rw" | "rw-rw" | "rwk" | "rwk-tz" | "sa" | "sa-in" | "sah" | "sah-ru" | "saq" | "saq-ke" | "sat" | "sat-in" | "sbp" | "sbp-tz" | "sd" | "sd-in" | "sd-pk" | "se" | "se-fi" | "se-no" | "se-se" | "seh" | "seh-mz" | "ses" | "ses-ml" | "sg" | "sg-cf" | "shi" | "shi-ma" | "si" | "si-lk" | "sk" | "sk-sk" | "sl" | "sl-si" | "smn" | "smn-fi" | "sn" | "sn-zw" | "so" | "so-dj" | "so-et" | "so-ke" | "so-so" | "sq" | "sq-al" | "sq-mk" | "sq-xk" | "sr" | "sr-ba" | "sr-cs" | "sr-me" | "sr-rs" | "sr-xk" | "su" | "su-id" | "sv" | "sv-ax" | "sv-fi" | "sv-se" | "sw" | "sw-cd" | "sw-ke" | "sw-tz" | "sw-ug" | "sy" | "ta" | "ta-in" | "ta-lk" | "ta-my" | "ta-sg" | "te" | "te-in" | "teo" | "teo-ke" | "teo-ug" | "tg" | "tg-tj" | "th" | "th-th" | "ti" | "ti-er" | "ti-et" | "tk" | "tk-tm" | "tl" | "to" | "to-to" | "tr" | "tr-cy" | "tr-tr" | "tt" | "tt-ru" | "twq" | "twq-ne" | "tzm" | "tzm-ma" | "ug" | "ug-cn" | "uk" | "uk-ua" | "ur" | "ur-in" | "ur-pk" | "uz" | "uz-af" | "uz-uz" | "vai" | "vai-lr" | "vi" | "vi-vn" | "vo" | "vo-001" | "vun" | "vun-tz" | "wae" | "wae-ch" | "wo" | "wo-sn" | "xh" | "xh-za" | "xog" | "xog-ug" | "yav" | "yav-cm" | "yo" | "yo-bj" | "yo-ng" | "yue" | "yue-cn" | "yue-hk" | "zgh" | "zgh-ma" | "zh" | "zh-cn" | "zh-hk" | "zh-mo" | "zh-sg" | "zh-tw" | "zh-hans" | "zh-hant" | "zu" | "zu-za" ; diff --git a/codegen/cms/site_search/models/ErrorDetail.ts b/codegen/cms/site_search/models/ErrorDetail.ts index d2a28c004..1202d1db2 100644 --- a/codegen/cms/site_search/models/ErrorDetail.ts +++ b/codegen/cms/site_search/models/ErrorDetail.ts @@ -13,38 +13,32 @@ export class ErrorDetail { /** - * A human readable message describing the error along with remediation steps where appropriate - */ - 'message': string; - /** - * The name of the field or parameter in which the error was found. + * A specific category that contains more specific detail about the error */ - '_in'?: string; + 'subCategory'?: string; /** * The status code associated with the error detail */ 'code'?: string; /** - * A specific category that contains more specific detail about the error + * The name of the field or parameter in which the error was found. */ - 'subCategory'?: string; + '_in'?: string; /** * Context about the error condition */ 'context'?: { [key: string]: Array; }; + /** + * A human readable message describing the error along with remediation steps where appropriate + */ + 'message': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "message", - "baseName": "message", - "type": "string", - "format": "" - }, - { - "name": "_in", - "baseName": "in", + "name": "subCategory", + "baseName": "subCategory", "type": "string", "format": "" }, @@ -55,8 +49,8 @@ export class ErrorDetail { "format": "" }, { - "name": "subCategory", - "baseName": "subCategory", + "name": "_in", + "baseName": "in", "type": "string", "format": "" }, @@ -65,6 +59,12 @@ export class ErrorDetail { "baseName": "context", "type": "{ [key: string]: Array; }", "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/cms/site_search/models/IndexedField.ts b/codegen/cms/site_search/models/IndexedField.ts index 1e6a44179..af6c255b5 100644 --- a/codegen/cms/site_search/models/IndexedField.ts +++ b/codegen/cms/site_search/models/IndexedField.ts @@ -12,14 +12,20 @@ export class IndexedField { + 'values': Array; 'name': string; 'value': any; - 'values': Array; 'metadataField': boolean; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "values", + "baseName": "values", + "type": "Array", + "format": "" + }, { "name": "name", "baseName": "name", @@ -32,12 +38,6 @@ export class IndexedField { "type": "any", "format": "" }, - { - "name": "values", - "baseName": "values", - "type": "Array", - "format": "" - }, { "name": "metadataField", "baseName": "metadataField", diff --git a/codegen/cms/site_search/models/ModelError.ts b/codegen/cms/site_search/models/ModelError.ts index cf036c26c..ef51a351d 100644 --- a/codegen/cms/site_search/models/ModelError.ts +++ b/codegen/cms/site_search/models/ModelError.ts @@ -14,43 +14,49 @@ import { ErrorDetail } from '../models/ErrorDetail'; export class ModelError { /** - * A human readable message describing the error along with remediation steps where appropriate + * A specific category that contains more specific detail about the error */ - 'message': string; + 'subCategory'?: string; /** - * A unique identifier for the request. Include this value with any error reports or support tickets + * Context about the error condition */ - 'correlationId': string; + 'context'?: { [key: string]: Array; }; /** - * The error category + * A unique identifier for the request. Include this value with any error reports or support tickets */ - 'category': string; + 'correlationId': string; /** - * A specific category that contains more specific detail about the error + * A map of link names to associated URIs containing documentation about the error or recommended remediation steps */ - 'subCategory'?: string; + 'links'?: { [key: string]: string; }; /** - * further information about the error + * A human readable message describing the error along with remediation steps where appropriate */ - 'errors'?: Array; + 'message': string; /** - * Context about the error condition + * The error category */ - 'context'?: { [key: string]: Array; }; + 'category': string; /** - * A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * further information about the error */ - 'links'?: { [key: string]: string; }; + 'errors'?: Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "message", - "baseName": "message", + "name": "subCategory", + "baseName": "subCategory", "type": "string", "format": "" }, + { + "name": "context", + "baseName": "context", + "type": "{ [key: string]: Array; }", + "format": "" + }, { "name": "correlationId", "baseName": "correlationId", @@ -58,14 +64,20 @@ export class ModelError { "format": "uuid" }, { - "name": "category", - "baseName": "category", + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "message", + "baseName": "message", "type": "string", "format": "" }, { - "name": "subCategory", - "baseName": "subCategory", + "name": "category", + "baseName": "category", "type": "string", "format": "" }, @@ -74,18 +86,6 @@ export class ModelError { "baseName": "errors", "type": "Array", "format": "" - }, - { - "name": "context", - "baseName": "context", - "type": "{ [key: string]: Array; }", - "format": "" - }, - { - "name": "links", - "baseName": "links", - "type": "{ [key: string]: string; }", - "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/cms/site_search/types/ObjectParamAPI.ts b/codegen/cms/site_search/types/ObjectParamAPI.ts index 8464a5a14..262229aea 100644 --- a/codegen/cms/site_search/types/ObjectParamAPI.ts +++ b/codegen/cms/site_search/types/ObjectParamAPI.ts @@ -42,10 +42,10 @@ export interface PublicApiSearchRequest { offset?: number /** * Specifies the language of content to be searched. This value must be a valid [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `es` for Spanish) - * @type 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za' + * @type 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cn' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-mx' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za' * @memberof PublicApisearch */ - language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za' + language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cn' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-mx' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za' /** * Inverts the behavior of the pathPrefix filter when set to `false`. Defaults to `true`. * @type boolean diff --git a/codegen/cms/site_search/types/ObservableAPI.ts b/codegen/cms/site_search/types/ObservableAPI.ts index 64b647434..e0deac99b 100644 --- a/codegen/cms/site_search/types/ObservableAPI.ts +++ b/codegen/cms/site_search/types/ObservableAPI.ts @@ -67,7 +67,7 @@ export class ObservablePublicApi { * @param length Specifies the length of the search results. Can be set to `LONG` or `SHORT`. `SHORT` will return the first 128 characters of the content's meta description. `LONG` will build a more detailed content snippet based on the html/content of the page. * @param groupId Specifies which blog(s) to be searched by blog ID. Can be used multiple times to search more than one blog. */ - public search(q?: string, limit?: number, offset?: number, language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za', matchPrefix?: boolean, autocomplete?: boolean, popularityBoost?: number, boostLimit?: number, boostRecent?: string, tableId?: number, hubdbQuery?: string, domain?: Array, type?: Array<'LANDING_PAGE' | 'BLOG_POST' | 'SITE_PAGE' | 'KNOWLEDGE_ARTICLE' | 'LISTING_PAGE'>, pathPrefix?: Array, property?: Array, length?: 'SHORT' | 'LONG', groupId?: Array, _options?: Configuration): Observable { + public search(q?: string, limit?: number, offset?: number, language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cn' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-mx' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za', matchPrefix?: boolean, autocomplete?: boolean, popularityBoost?: number, boostLimit?: number, boostRecent?: string, tableId?: number, hubdbQuery?: string, domain?: Array, type?: Array<'LANDING_PAGE' | 'BLOG_POST' | 'SITE_PAGE' | 'KNOWLEDGE_ARTICLE' | 'LISTING_PAGE'>, pathPrefix?: Array, property?: Array, length?: 'SHORT' | 'LONG', groupId?: Array, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.search(q, limit, offset, language, matchPrefix, autocomplete, popularityBoost, boostLimit, boostRecent, tableId, hubdbQuery, domain, type, pathPrefix, property, length, groupId, _options); // build promise chain diff --git a/codegen/cms/site_search/types/PromiseAPI.ts b/codegen/cms/site_search/types/PromiseAPI.ts index b720ccd09..24d6e120d 100644 --- a/codegen/cms/site_search/types/PromiseAPI.ts +++ b/codegen/cms/site_search/types/PromiseAPI.ts @@ -48,7 +48,7 @@ export class PromisePublicApi { * @param length Specifies the length of the search results. Can be set to `LONG` or `SHORT`. `SHORT` will return the first 128 characters of the content's meta description. `LONG` will build a more detailed content snippet based on the html/content of the page. * @param groupId Specifies which blog(s) to be searched by blog ID. Can be used multiple times to search more than one blog. */ - public search(q?: string, limit?: number, offset?: number, language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za', matchPrefix?: boolean, autocomplete?: boolean, popularityBoost?: number, boostLimit?: number, boostRecent?: string, tableId?: number, hubdbQuery?: string, domain?: Array, type?: Array<'LANDING_PAGE' | 'BLOG_POST' | 'SITE_PAGE' | 'KNOWLEDGE_ARTICLE' | 'LISTING_PAGE'>, pathPrefix?: Array, property?: Array, length?: 'SHORT' | 'LONG', groupId?: Array, _options?: Configuration): Promise { + public search(q?: string, limit?: number, offset?: number, language?: 'af' | 'af-na' | 'af-za' | 'agq' | 'agq-cm' | 'ak' | 'ak-gh' | 'am' | 'am-et' | 'ar' | 'ar-001' | 'ar-ae' | 'ar-bh' | 'ar-dj' | 'ar-dz' | 'ar-eg' | 'ar-eh' | 'ar-er' | 'ar-il' | 'ar-iq' | 'ar-jo' | 'ar-km' | 'ar-kw' | 'ar-lb' | 'ar-ly' | 'ar-ma' | 'ar-mr' | 'ar-om' | 'ar-ps' | 'ar-qa' | 'ar-sa' | 'ar-sd' | 'ar-so' | 'ar-ss' | 'ar-sy' | 'ar-td' | 'ar-tn' | 'ar-ye' | 'as' | 'as-in' | 'asa' | 'asa-tz' | 'ast' | 'ast-es' | 'az' | 'az-az' | 'bas' | 'bas-cm' | 'be' | 'be-by' | 'bem' | 'bem-zm' | 'bez' | 'bez-tz' | 'bg' | 'bg-bg' | 'bm' | 'bm-ml' | 'bn' | 'bn-bd' | 'bn-in' | 'bo' | 'bo-cn' | 'bo-in' | 'br' | 'br-fr' | 'brx' | 'brx-in' | 'bs' | 'bs-ba' | 'ca' | 'ca-ad' | 'ca-es' | 'ca-fr' | 'ca-it' | 'ccp' | 'ccp-bd' | 'ccp-in' | 'ce' | 'ce-ru' | 'ceb' | 'ceb-ph' | 'cgg' | 'cgg-ug' | 'chr' | 'chr-us' | 'ckb' | 'ckb-iq' | 'ckb-ir' | 'cs' | 'cs-cz' | 'cu' | 'cu-ru' | 'cy' | 'cy-gb' | 'da' | 'da-dk' | 'da-gl' | 'dav' | 'dav-ke' | 'de' | 'de-at' | 'de-be' | 'de-ch' | 'de-de' | 'de-gr' | 'de-it' | 'de-li' | 'de-lu' | 'dje' | 'dje-ne' | 'doi' | 'doi-in' | 'dsb' | 'dsb-de' | 'dua' | 'dua-cm' | 'dyo' | 'dyo-sn' | 'dz' | 'dz-bt' | 'ebu' | 'ebu-ke' | 'ee' | 'ee-gh' | 'ee-tg' | 'el' | 'el-cy' | 'el-gr' | 'en' | 'en-001' | 'en-150' | 'en-ae' | 'en-ag' | 'en-ai' | 'en-as' | 'en-at' | 'en-au' | 'en-bb' | 'en-be' | 'en-bi' | 'en-bm' | 'en-bs' | 'en-bw' | 'en-bz' | 'en-ca' | 'en-cc' | 'en-ch' | 'en-ck' | 'en-cm' | 'en-cn' | 'en-cx' | 'en-cy' | 'en-de' | 'en-dg' | 'en-dk' | 'en-dm' | 'en-er' | 'en-fi' | 'en-fj' | 'en-fk' | 'en-fm' | 'en-gb' | 'en-gd' | 'en-gg' | 'en-gh' | 'en-gi' | 'en-gm' | 'en-gu' | 'en-gy' | 'en-hk' | 'en-ie' | 'en-il' | 'en-im' | 'en-in' | 'en-io' | 'en-je' | 'en-jm' | 'en-ke' | 'en-ki' | 'en-kn' | 'en-ky' | 'en-lc' | 'en-lr' | 'en-ls' | 'en-lu' | 'en-mg' | 'en-mh' | 'en-mo' | 'en-mp' | 'en-ms' | 'en-mt' | 'en-mu' | 'en-mw' | 'en-mx' | 'en-my' | 'en-na' | 'en-nf' | 'en-ng' | 'en-nl' | 'en-nr' | 'en-nu' | 'en-nz' | 'en-pg' | 'en-ph' | 'en-pk' | 'en-pn' | 'en-pr' | 'en-pw' | 'en-rw' | 'en-sb' | 'en-sc' | 'en-sd' | 'en-se' | 'en-sg' | 'en-sh' | 'en-si' | 'en-sl' | 'en-ss' | 'en-sx' | 'en-sz' | 'en-tc' | 'en-tk' | 'en-to' | 'en-tt' | 'en-tv' | 'en-tz' | 'en-ug' | 'en-um' | 'en-us' | 'en-vc' | 'en-vg' | 'en-vi' | 'en-vu' | 'en-ws' | 'en-za' | 'en-zm' | 'en-zw' | 'eo' | 'eo-001' | 'es' | 'es-419' | 'es-ar' | 'es-bo' | 'es-br' | 'es-bz' | 'es-cl' | 'es-co' | 'es-cr' | 'es-cu' | 'es-do' | 'es-ea' | 'es-ec' | 'es-es' | 'es-gq' | 'es-gt' | 'es-hn' | 'es-ic' | 'es-mx' | 'es-ni' | 'es-pa' | 'es-pe' | 'es-ph' | 'es-pr' | 'es-py' | 'es-sv' | 'es-us' | 'es-uy' | 'es-ve' | 'et' | 'et-ee' | 'eu' | 'eu-es' | 'ewo' | 'ewo-cm' | 'fa' | 'fa-af' | 'fa-ir' | 'ff' | 'ff-bf' | 'ff-cm' | 'ff-gh' | 'ff-gm' | 'ff-gn' | 'ff-gw' | 'ff-lr' | 'ff-mr' | 'ff-ne' | 'ff-ng' | 'ff-sl' | 'ff-sn' | 'fi' | 'fi-fi' | 'fil' | 'fil-ph' | 'fo' | 'fo-dk' | 'fo-fo' | 'fr' | 'fr-be' | 'fr-bf' | 'fr-bi' | 'fr-bj' | 'fr-bl' | 'fr-ca' | 'fr-cd' | 'fr-cf' | 'fr-cg' | 'fr-ch' | 'fr-ci' | 'fr-cm' | 'fr-dj' | 'fr-dz' | 'fr-fr' | 'fr-ga' | 'fr-gf' | 'fr-gn' | 'fr-gp' | 'fr-gq' | 'fr-ht' | 'fr-km' | 'fr-lu' | 'fr-ma' | 'fr-mc' | 'fr-mf' | 'fr-mg' | 'fr-ml' | 'fr-mq' | 'fr-mr' | 'fr-mu' | 'fr-nc' | 'fr-ne' | 'fr-pf' | 'fr-pm' | 'fr-re' | 'fr-rw' | 'fr-sc' | 'fr-sn' | 'fr-sy' | 'fr-td' | 'fr-tg' | 'fr-tn' | 'fr-vu' | 'fr-wf' | 'fr-yt' | 'fur' | 'fur-it' | 'fy' | 'fy-nl' | 'ga' | 'ga-gb' | 'ga-ie' | 'gd' | 'gd-gb' | 'gl' | 'gl-es' | 'gsw' | 'gsw-ch' | 'gsw-fr' | 'gsw-li' | 'gu' | 'gu-in' | 'guz' | 'guz-ke' | 'gv' | 'gv-im' | 'ha' | 'ha-gh' | 'ha-ne' | 'ha-ng' | 'haw' | 'haw-us' | 'he' | 'hi' | 'hi-in' | 'hr' | 'hr-ba' | 'hr-hr' | 'hsb' | 'hsb-de' | 'hu' | 'hu-hu' | 'hy' | 'hy-am' | 'ia' | 'ia-001' | 'id' | 'ig' | 'ig-ng' | 'ii' | 'ii-cn' | 'id-id' | 'is' | 'is-is' | 'it' | 'it-ch' | 'it-it' | 'it-sm' | 'it-va' | 'he-il' | 'ja' | 'ja-jp' | 'jgo' | 'jgo-cm' | 'yi' | 'yi-001' | 'jmc' | 'jmc-tz' | 'jv' | 'jv-id' | 'ka' | 'ka-ge' | 'kab' | 'kab-dz' | 'kam' | 'kam-ke' | 'kde' | 'kde-tz' | 'kea' | 'kea-cv' | 'khq' | 'khq-ml' | 'ki' | 'ki-ke' | 'kk' | 'kk-kz' | 'kkj' | 'kkj-cm' | 'kl' | 'kl-gl' | 'kln' | 'kln-ke' | 'km' | 'km-kh' | 'kn' | 'kn-in' | 'ko' | 'ko-kp' | 'ko-kr' | 'kok' | 'kok-in' | 'ks' | 'ks-in' | 'ksb' | 'ksb-tz' | 'ksf' | 'ksf-cm' | 'ksh' | 'ksh-de' | 'kw' | 'kw-gb' | 'ku' | 'ku-tr' | 'ky' | 'ky-kg' | 'lag' | 'lag-tz' | 'lb' | 'lb-lu' | 'lg' | 'lg-ug' | 'lkt' | 'lkt-us' | 'ln' | 'ln-ao' | 'ln-cd' | 'ln-cf' | 'ln-cg' | 'lo' | 'lo-la' | 'lrc' | 'lrc-iq' | 'lrc-ir' | 'lt' | 'lt-lt' | 'lu' | 'lu-cd' | 'luo' | 'luo-ke' | 'luy' | 'luy-ke' | 'lv' | 'lv-lv' | 'mai' | 'mai-in' | 'mas' | 'mas-ke' | 'mas-tz' | 'mer' | 'mer-ke' | 'mfe' | 'mfe-mu' | 'mg' | 'mg-mg' | 'mgh' | 'mgh-mz' | 'mgo' | 'mgo-cm' | 'mi' | 'mi-nz' | 'mk' | 'mk-mk' | 'ml' | 'ml-in' | 'mn' | 'mn-mn' | 'mni' | 'mni-in' | 'mr' | 'mr-in' | 'ms' | 'ms-bn' | 'ms-id' | 'ms-my' | 'ms-sg' | 'mt' | 'mt-mt' | 'mua' | 'mua-cm' | 'my' | 'my-mm' | 'mzn' | 'mzn-ir' | 'naq' | 'naq-na' | 'nb' | 'nb-no' | 'nb-sj' | 'nd' | 'nd-zw' | 'nds' | 'nds-de' | 'nds-nl' | 'ne' | 'ne-in' | 'ne-np' | 'nl' | 'nl-aw' | 'nl-be' | 'nl-ch' | 'nl-bq' | 'nl-cw' | 'nl-lu' | 'nl-nl' | 'nl-sr' | 'nl-sx' | 'nmg' | 'nmg-cm' | 'nn' | 'nn-no' | 'nnh' | 'nnh-cm' | 'no' | 'no-no' | 'nus' | 'nus-ss' | 'nyn' | 'nyn-ug' | 'om' | 'om-et' | 'om-ke' | 'or' | 'or-in' | 'os' | 'os-ge' | 'os-ru' | 'pa' | 'pa-in' | 'pa-pk' | 'pcm' | 'pcm-ng' | 'pl' | 'pl-pl' | 'prg' | 'prg-001' | 'ps' | 'ps-af' | 'ps-pk' | 'pt' | 'pt-ao' | 'pt-br' | 'pt-ch' | 'pt-cv' | 'pt-gq' | 'pt-gw' | 'pt-lu' | 'pt-mo' | 'pt-mz' | 'pt-pt' | 'pt-st' | 'pt-tl' | 'qu' | 'qu-bo' | 'qu-ec' | 'qu-pe' | 'rm' | 'rm-ch' | 'rn' | 'rn-bi' | 'ro' | 'ro-md' | 'ro-ro' | 'rof' | 'rof-tz' | 'ru' | 'ru-by' | 'ru-kg' | 'ru-kz' | 'ru-md' | 'ru-ru' | 'ru-ua' | 'rw' | 'rw-rw' | 'rwk' | 'rwk-tz' | 'sa' | 'sa-in' | 'sah' | 'sah-ru' | 'saq' | 'saq-ke' | 'sat' | 'sat-in' | 'sbp' | 'sbp-tz' | 'sd' | 'sd-in' | 'sd-pk' | 'se' | 'se-fi' | 'se-no' | 'se-se' | 'seh' | 'seh-mz' | 'ses' | 'ses-ml' | 'sg' | 'sg-cf' | 'shi' | 'shi-ma' | 'si' | 'si-lk' | 'sk' | 'sk-sk' | 'sl' | 'sl-si' | 'smn' | 'smn-fi' | 'sn' | 'sn-zw' | 'so' | 'so-dj' | 'so-et' | 'so-ke' | 'so-so' | 'sq' | 'sq-al' | 'sq-mk' | 'sq-xk' | 'sr' | 'sr-ba' | 'sr-cs' | 'sr-me' | 'sr-rs' | 'sr-xk' | 'su' | 'su-id' | 'sv' | 'sv-ax' | 'sv-fi' | 'sv-se' | 'sw' | 'sw-cd' | 'sw-ke' | 'sw-tz' | 'sw-ug' | 'sy' | 'ta' | 'ta-in' | 'ta-lk' | 'ta-my' | 'ta-sg' | 'te' | 'te-in' | 'teo' | 'teo-ke' | 'teo-ug' | 'tg' | 'tg-tj' | 'th' | 'th-th' | 'ti' | 'ti-er' | 'ti-et' | 'tk' | 'tk-tm' | 'tl' | 'to' | 'to-to' | 'tr' | 'tr-cy' | 'tr-tr' | 'tt' | 'tt-ru' | 'twq' | 'twq-ne' | 'tzm' | 'tzm-ma' | 'ug' | 'ug-cn' | 'uk' | 'uk-ua' | 'ur' | 'ur-in' | 'ur-pk' | 'uz' | 'uz-af' | 'uz-uz' | 'vai' | 'vai-lr' | 'vi' | 'vi-vn' | 'vo' | 'vo-001' | 'vun' | 'vun-tz' | 'wae' | 'wae-ch' | 'wo' | 'wo-sn' | 'xh' | 'xh-za' | 'xog' | 'xog-ug' | 'yav' | 'yav-cm' | 'yo' | 'yo-bj' | 'yo-ng' | 'yue' | 'yue-cn' | 'yue-hk' | 'zgh' | 'zgh-ma' | 'zh' | 'zh-cn' | 'zh-hk' | 'zh-mo' | 'zh-sg' | 'zh-tw' | 'zh-hans' | 'zh-hant' | 'zu' | 'zu-za', matchPrefix?: boolean, autocomplete?: boolean, popularityBoost?: number, boostLimit?: number, boostRecent?: string, tableId?: number, hubdbQuery?: string, domain?: Array, type?: Array<'LANDING_PAGE' | 'BLOG_POST' | 'SITE_PAGE' | 'KNOWLEDGE_ARTICLE' | 'LISTING_PAGE'>, pathPrefix?: Array, property?: Array, length?: 'SHORT' | 'LONG', groupId?: Array, _options?: Configuration): Promise { const result = this.api.search(q, limit, offset, language, matchPrefix, autocomplete, popularityBoost, boostLimit, boostRecent, tableId, hubdbQuery, domain, type, pathPrefix, property, length, groupId, _options); return result.toPromise(); } diff --git a/codegen/cms/source_code/apis/ContentApi.ts b/codegen/cms/source_code/apis/ContentApi.ts index eb4600741..ffc4b1ce9 100644 --- a/codegen/cms/source_code/apis/ContentApi.ts +++ b/codegen/cms/source_code/apis/ContentApi.ts @@ -139,35 +139,64 @@ export class ContentApiRequestFactory extends BaseAPIRequestFactory { } /** - * Downloads the byte contents of the file at the specified path in the specified environment. - * Download a file + * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. + * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. + * @param file The file to upload. */ - public async get(environment: string, path: string, _options?: Configuration): Promise { + public async createOrUpdate(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'environment' is not null or undefined if (environment === null || environment === undefined) { - throw new RequiredError("ContentApi", "get", "environment"); + throw new RequiredError("ContentApi", "createOrUpdate", "environment"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { - throw new RequiredError("ContentApi", "get", "path"); + throw new RequiredError("ContentApi", "createOrUpdate", "path"); } + // Path Params const localVarPath = '/cms/v3/source-code/{environment}/content/{path}' .replace('{' + 'environment' + '}', encodeURIComponent(String(environment))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + // Form Params + const useForm = canConsumeForm([ + 'multipart/form-data', + ]); + + let localVarFormParams + if (useForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new URLSearchParams(); + } + + if (file !== undefined) { + // TODO: replace .append with .set + if (localVarFormParams instanceof FormData) { + localVarFormParams.append('file', file.data, file.name); + } + } + + requestContext.setBody(localVarFormParams); + + if(!useForm) { + const contentType = ObjectSerializer.getPreferredMediaType([ + "multipart/form-data" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + } let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -185,64 +214,35 @@ export class ContentApiRequestFactory extends BaseAPIRequestFactory { } /** - * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. - * Create or update a file + * Downloads the byte contents of the file at the specified path in the specified environment. + * Download a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. */ - public async replace(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { + public async download(environment: string, path: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'environment' is not null or undefined if (environment === null || environment === undefined) { - throw new RequiredError("ContentApi", "replace", "environment"); + throw new RequiredError("ContentApi", "download", "environment"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { - throw new RequiredError("ContentApi", "replace", "path"); + throw new RequiredError("ContentApi", "download", "path"); } - // Path Params const localVarPath = '/cms/v3/source-code/{environment}/content/{path}' .replace('{' + 'environment' + '}', encodeURIComponent(String(environment))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - // Form Params - const useForm = canConsumeForm([ - 'multipart/form-data', - ]); - - let localVarFormParams - if (useForm) { - localVarFormParams = new FormData(); - } else { - localVarFormParams = new URLSearchParams(); - } - - if (file !== undefined) { - // TODO: replace .append with .set - if (localVarFormParams instanceof FormData) { - localVarFormParams.append('file', file.data, file.name); - } - } - - requestContext.setBody(localVarFormParams); - - if(!useForm) { - const contentType = ObjectSerializer.getPreferredMediaType([ - "multipart/form-data" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - } let authMethod: SecurityAuthentication | undefined; // Apply auth methods @@ -335,11 +335,18 @@ export class ContentApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to get + * @params response Response returned by the server for a request to createOrUpdate * @throws ApiException if the response code was not in [200, 299] */ - public async get(response: ResponseContext): Promise< void> { + public async createOrUpdate(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AssetFileMetadata = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AssetFileMetadata", "" + ) as AssetFileMetadata; + return body; + } if (isCodeInRange("0", response.httpStatusCode)) { const body: Error = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -350,7 +357,11 @@ export class ContentApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + const body: AssetFileMetadata = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AssetFileMetadata", "" + ) as AssetFileMetadata; + return body; } throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); @@ -360,18 +371,11 @@ export class ContentApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to replace + * @params response Response returned by the server for a request to download * @throws ApiException if the response code was not in [200, 299] */ - public async replace(response: ResponseContext): Promise { + public async download(response: ResponseContext): Promise< void> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: AssetFileMetadata = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "AssetFileMetadata", "" - ) as AssetFileMetadata; - return body; - } if (isCodeInRange("0", response.httpStatusCode)) { const body: Error = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -382,11 +386,7 @@ export class ContentApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: AssetFileMetadata = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "AssetFileMetadata", "" - ) as AssetFileMetadata; - return body; + return; } throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); diff --git a/codegen/cms/source_code/apis/MetadataApi.ts b/codegen/cms/source_code/apis/MetadataApi.ts index 2fed2088c..7f428dafb 100644 --- a/codegen/cms/source_code/apis/MetadataApi.ts +++ b/codegen/cms/source_code/apis/MetadataApi.ts @@ -20,8 +20,9 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { * Get the metadata for a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. + * @param properties */ - public async get(environment: string, path: string, _options?: Configuration): Promise { + public async get(environment: string, path: string, properties?: string, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'environment' is not null or undefined @@ -36,6 +37,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { } + // Path Params const localVarPath = '/cms/v3/source-code/{environment}/metadata/{path}' .replace('{' + 'environment' + '}', encodeURIComponent(String(environment))) @@ -45,6 +47,11 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + // Query Params + if (properties !== undefined) { + requestContext.setQueryParam("properties", ObjectSerializer.serialize(properties, "string", "")); + } + let authMethod: SecurityAuthentication | undefined; // Apply auth methods diff --git a/codegen/cms/source_code/apis/SourceCodeExtractApi.ts b/codegen/cms/source_code/apis/SourceCodeExtractApi.ts index 5a1616c6b..3542b0239 100644 --- a/codegen/cms/source_code/apis/SourceCodeExtractApi.ts +++ b/codegen/cms/source_code/apis/SourceCodeExtractApi.ts @@ -38,7 +38,9 @@ export class SourceCodeExtractApiRequestFactory extends BaseAPIRequestFactory { // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([]); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( ObjectSerializer.serialize(fileExtractRequest, "FileExtractRequest", ""), diff --git a/codegen/cms/source_code/models/AssetFileMetadata.ts b/codegen/cms/source_code/models/AssetFileMetadata.ts index 6dbab0e1b..fa183f765 100644 --- a/codegen/cms/source_code/models/AssetFileMetadata.ts +++ b/codegen/cms/source_code/models/AssetFileMetadata.ts @@ -43,6 +43,7 @@ export class AssetFileMetadata { * Timestamp of when the object was archived (deleted). */ 'archivedAt'?: number; + 'hash'?: string; static readonly discriminator: string | undefined = undefined; @@ -88,6 +89,12 @@ export class AssetFileMetadata { "baseName": "archivedAt", "type": "number", "format": "int64" + }, + { + "name": "hash", + "baseName": "hash", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/cms/source_code/types/ObjectParamAPI.ts b/codegen/cms/source_code/types/ObjectParamAPI.ts index b1ca16467..e47bd2797 100644 --- a/codegen/cms/source_code/types/ObjectParamAPI.ts +++ b/codegen/cms/source_code/types/ObjectParamAPI.ts @@ -45,40 +45,40 @@ export interface ContentApiCreateRequest { file?: HttpFile } -export interface ContentApiGetRequest { +export interface ContentApiCreateOrUpdateRequest { /** * The environment of the file (\"draft\" or \"published\"). * @type string - * @memberof ContentApiget + * @memberof ContentApicreateOrUpdate */ environment: string /** * The file system location of the file. * @type string - * @memberof ContentApiget + * @memberof ContentApicreateOrUpdate */ path: string + /** + * The file to upload. + * @type HttpFile + * @memberof ContentApicreateOrUpdate + */ + file?: HttpFile } -export interface ContentApiReplaceRequest { +export interface ContentApiDownloadRequest { /** * The environment of the file (\"draft\" or \"published\"). * @type string - * @memberof ContentApireplace + * @memberof ContentApidownload */ environment: string /** * The file system location of the file. * @type string - * @memberof ContentApireplace + * @memberof ContentApidownload */ path: string - /** - * The file to upload. - * @type HttpFile - * @memberof ContentApireplace - */ - file?: HttpFile } export class ObjectContentApi { @@ -107,21 +107,21 @@ export class ObjectContentApi { } /** - * Downloads the byte contents of the file at the specified path in the specified environment. - * Download a file + * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. + * Create or update a file * @param param the request object */ - public get(param: ContentApiGetRequest, options?: Configuration): Promise { - return this.api.get(param.environment, param.path, options).toPromise(); + public createOrUpdate(param: ContentApiCreateOrUpdateRequest, options?: Configuration): Promise { + return this.api.createOrUpdate(param.environment, param.path, param.file, options).toPromise(); } /** - * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. - * Create or update a file + * Downloads the byte contents of the file at the specified path in the specified environment. + * Download a file * @param param the request object */ - public replace(param: ContentApiReplaceRequest, options?: Configuration): Promise { - return this.api.replace(param.environment, param.path, param.file, options).toPromise(); + public download(param: ContentApiDownloadRequest, options?: Configuration): Promise { + return this.api.download(param.environment, param.path, options).toPromise(); } } @@ -172,6 +172,12 @@ export interface MetadataApiGetRequest { * @memberof MetadataApiget */ path: string + /** + * + * @type string + * @memberof MetadataApiget + */ + properties?: string } export class ObjectMetadataApi { @@ -187,7 +193,7 @@ export class ObjectMetadataApi { * @param param the request object */ public get(param: MetadataApiGetRequest, options?: Configuration): Promise { - return this.api.get(param.environment, param.path, options).toPromise(); + return this.api.get(param.environment, param.path, param.properties, options).toPromise(); } } diff --git a/codegen/cms/source_code/types/ObservableAPI.ts b/codegen/cms/source_code/types/ObservableAPI.ts index 4e1d250d1..4baf79424 100644 --- a/codegen/cms/source_code/types/ObservableAPI.ts +++ b/codegen/cms/source_code/types/ObservableAPI.ts @@ -75,13 +75,14 @@ export class ObservableContentApi { } /** - * Downloads the byte contents of the file at the specified path in the specified environment. - * Download a file + * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. + * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. + * @param file The file to upload. */ - public get(environment: string, path: string, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.get(environment, path, _options); + public createOrUpdate(environment: string, path: string, file?: HttpFile, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createOrUpdate(environment, path, file, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -95,19 +96,18 @@ export class ObservableContentApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.get(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createOrUpdate(rsp))); })); } /** - * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. - * Create or update a file + * Downloads the byte contents of the file at the specified path in the specified environment. + * Download a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. */ - public replace(environment: string, path: string, file?: HttpFile, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.replace(environment, path, file, _options); + public download(environment: string, path: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.download(environment, path, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -121,7 +121,7 @@ export class ObservableContentApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replace(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.download(rsp))); })); } @@ -190,9 +190,10 @@ export class ObservableMetadataApi { * Get the metadata for a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. + * @param properties */ - public get(environment: string, path: string, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.get(environment, path, _options); + public get(environment: string, path: string, properties?: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.get(environment, path, properties, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); diff --git a/codegen/cms/source_code/types/PromiseAPI.ts b/codegen/cms/source_code/types/PromiseAPI.ts index 8fdf56a9e..47daaadc1 100644 --- a/codegen/cms/source_code/types/PromiseAPI.ts +++ b/codegen/cms/source_code/types/PromiseAPI.ts @@ -43,25 +43,25 @@ export class PromiseContentApi { } /** - * Downloads the byte contents of the file at the specified path in the specified environment. - * Download a file + * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. + * Create or update a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. + * @param file The file to upload. */ - public get(environment: string, path: string, _options?: Configuration): Promise { - const result = this.api.get(environment, path, _options); + public createOrUpdate(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { + const result = this.api.createOrUpdate(environment, path, file, _options); return result.toPromise(); } /** - * Upserts a file at the specified path in the specified environment. Accepts multipart/form-data content type. - * Create or update a file + * Downloads the byte contents of the file at the specified path in the specified environment. + * Download a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. - * @param file The file to upload. */ - public replace(environment: string, path: string, file?: HttpFile, _options?: Configuration): Promise { - const result = this.api.replace(environment, path, file, _options); + public download(environment: string, path: string, _options?: Configuration): Promise { + const result = this.api.download(environment, path, _options); return result.toPromise(); } @@ -118,9 +118,10 @@ export class PromiseMetadataApi { * Get the metadata for a file * @param environment The environment of the file (\"draft\" or \"published\"). * @param path The file system location of the file. + * @param properties */ - public get(environment: string, path: string, _options?: Configuration): Promise { - const result = this.api.get(environment, path, _options); + public get(environment: string, path: string, properties?: string, _options?: Configuration): Promise { + const result = this.api.get(environment, path, properties, _options); return result.toPromise(); } diff --git a/codegen/conversations/visitor_identification/apis/GenerateApi.ts b/codegen/conversations/visitor_identification/apis/GenerateApi.ts index 29c8158dc..f04b98999 100644 --- a/codegen/conversations/visitor_identification/apis/GenerateApi.ts +++ b/codegen/conversations/visitor_identification/apis/GenerateApi.ts @@ -31,7 +31,7 @@ export class GenerateApiRequestFactory extends BaseAPIRequestFactory { // Path Params - const localVarPath = '/conversations/v3/visitor-identification/tokens/create'; + const localVarPath = '/visitor-identification/v3/tokens/create'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); diff --git a/codegen/crm/timeline/apis/EventsApi.ts b/codegen/crm/timeline/apis/EventsApi.ts index 2505f24e4..048811088 100644 --- a/codegen/crm/timeline/apis/EventsApi.ts +++ b/codegen/crm/timeline/apis/EventsApi.ts @@ -308,8 +308,11 @@ export class EventsApiResponseProcessor { * @params response Response returned by the server for a request to createBatch * @throws ApiException if the response code was not in [200, 299] */ - public async createBatch(response: ResponseContext): Promise { + public async createBatch(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + return; + } if (isCodeInRange("201", response.httpStatusCode)) { const body: BatchResponseTimelineEventResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -334,10 +337,10 @@ export class EventsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: BatchResponseTimelineEventResponse | BatchResponseTimelineEventResponseWithErrors = ObjectSerializer.deserialize( + const body: BatchResponseTimelineEventResponse | void | BatchResponseTimelineEventResponseWithErrors = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseTimelineEventResponse | BatchResponseTimelineEventResponseWithErrors", "" - ) as BatchResponseTimelineEventResponse | BatchResponseTimelineEventResponseWithErrors; + "BatchResponseTimelineEventResponse | void | BatchResponseTimelineEventResponseWithErrors", "" + ) as BatchResponseTimelineEventResponse | void | BatchResponseTimelineEventResponseWithErrors; return body; } diff --git a/codegen/crm/timeline/models/ErrorCategory.ts b/codegen/crm/timeline/models/ErrorCategory.ts deleted file mode 100644 index 5f4691cc0..000000000 --- a/codegen/crm/timeline/models/ErrorCategory.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Timeline events - * This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ErrorCategory { - 'httpStatus': ErrorCategoryHttpStatusEnum; - 'name': string; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "httpStatus", - "baseName": "httpStatus", - "type": "ErrorCategoryHttpStatusEnum", - "format": "" - }, - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ErrorCategory.attributeTypeMap; - } - - public constructor() { - } -} - - -export type ErrorCategoryHttpStatusEnum = "CONTINUE" | "SWITCHING_PROTOCOLS" | "PROCESSING" | "OK" | "CREATED" | "ACCEPTED" | "NON_AUTHORITATIVE_INFORMATION" | "NO_CONTENT" | "RESET_CONTENT" | "PARTIAL_CONTENT" | "MULTI_STATUS" | "ALREADY_REPORTED" | "IM_USED" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "USE_PROXY" | "TEMPORARY_REDIRECT" | "PERMANENT_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "REQUEST_ENTITY_TOO_LARGE" | "REQUEST_URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "REQUESTED_RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "IM_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADERS_FIELDS_TOO_LARGE" | "INTERNAL_STALE_SERVICE_DISCOVERY" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "MIGRATION_IN_PROGRESS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED" ; - diff --git a/codegen/crm/timeline/models/ObjectSerializer.ts b/codegen/crm/timeline/models/ObjectSerializer.ts index 521b57b9a..a461628d7 100644 --- a/codegen/crm/timeline/models/ObjectSerializer.ts +++ b/codegen/crm/timeline/models/ObjectSerializer.ts @@ -2,7 +2,6 @@ export * from '../models/BatchInputTimelineEvent'; export * from '../models/BatchResponseTimelineEventResponse'; export * from '../models/BatchResponseTimelineEventResponseWithErrors'; export * from '../models/CollectionResponseTimelineEventTemplateNoPaging'; -export * from '../models/ErrorCategory'; export * from '../models/ErrorDetail'; export * from '../models/EventDetail'; export * from '../models/ModelError'; @@ -21,7 +20,6 @@ import { BatchInputTimelineEvent } from '../models/BatchInputTimelineEvent'; import { BatchResponseTimelineEventResponse } from '../models/BatchResponseTimelineEventResponse'; import { BatchResponseTimelineEventResponseWithErrors } from '../models/BatchResponseTimelineEventResponseWithErrors'; import { CollectionResponseTimelineEventTemplateNoPaging } from '../models/CollectionResponseTimelineEventTemplateNoPaging'; -import { ErrorCategory } from '../models/ErrorCategory'; import { ErrorDetail } from '../models/ErrorDetail'; import { EventDetail } from '../models/EventDetail'; import { ModelError } from '../models/ModelError'; @@ -58,7 +56,6 @@ const supportedMediaTypes: { [mediaType: string]: number } = { let enumsMap: Set = new Set([ "BatchResponseTimelineEventResponseStatusEnum", "BatchResponseTimelineEventResponseWithErrorsStatusEnum", - "ErrorCategoryHttpStatusEnum", "TimelineEventTemplateTokenTypeEnum", ]); @@ -67,7 +64,6 @@ let typeMap: {[index: string]: any} = { "BatchResponseTimelineEventResponse": BatchResponseTimelineEventResponse, "BatchResponseTimelineEventResponseWithErrors": BatchResponseTimelineEventResponseWithErrors, "CollectionResponseTimelineEventTemplateNoPaging": CollectionResponseTimelineEventTemplateNoPaging, - "ErrorCategory": ErrorCategory, "ErrorDetail": ErrorDetail, "EventDetail": EventDetail, "ModelError": ModelError, diff --git a/codegen/crm/timeline/models/StandardError.ts b/codegen/crm/timeline/models/StandardError.ts index d2584ccb9..db7da87cb 100644 --- a/codegen/crm/timeline/models/StandardError.ts +++ b/codegen/crm/timeline/models/StandardError.ts @@ -10,13 +10,12 @@ * Do not edit the class manually. */ -import { ErrorCategory } from '../models/ErrorCategory'; import { ErrorDetail } from '../models/ErrorDetail'; export class StandardError { 'status': string; 'id'?: string; - 'category': ErrorCategory; + 'category': string; 'subCategory'?: any; 'message': string; 'errors': Array; @@ -41,7 +40,7 @@ export class StandardError { { "name": "category", "baseName": "category", - "type": "ErrorCategory", + "type": "string", "format": "" }, { diff --git a/codegen/crm/timeline/models/TimelineEventTemplateToken.ts b/codegen/crm/timeline/models/TimelineEventTemplateToken.ts index 8e6d33c65..2b75f86a8 100644 --- a/codegen/crm/timeline/models/TimelineEventTemplateToken.ts +++ b/codegen/crm/timeline/models/TimelineEventTemplateToken.ts @@ -27,7 +27,7 @@ export class TimelineEventTemplateToken { /** * If type is `enumeration`, we should have a list of options to choose from. */ - 'options': Array; + 'options'?: Array; /** * The name of the token referenced in the templates. This must be unique for the specific template. It may only contain alphanumeric characters, periods, dashes, or underscores (. - _). */ diff --git a/codegen/crm/timeline/models/TimelineEventTemplateTokenUpdateRequest.ts b/codegen/crm/timeline/models/TimelineEventTemplateTokenUpdateRequest.ts index 0c82d8f69..bfeaee05e 100644 --- a/codegen/crm/timeline/models/TimelineEventTemplateTokenUpdateRequest.ts +++ b/codegen/crm/timeline/models/TimelineEventTemplateTokenUpdateRequest.ts @@ -27,7 +27,7 @@ export class TimelineEventTemplateTokenUpdateRequest { /** * If type is `enumeration`, we should have a list of options to choose from. */ - 'options': Array; + 'options'?: Array; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/crm/timeline/models/all.ts b/codegen/crm/timeline/models/all.ts index a1a73a637..7f06f8080 100644 --- a/codegen/crm/timeline/models/all.ts +++ b/codegen/crm/timeline/models/all.ts @@ -2,7 +2,6 @@ export * from '../models/BatchInputTimelineEvent' export * from '../models/BatchResponseTimelineEventResponse' export * from '../models/BatchResponseTimelineEventResponseWithErrors' export * from '../models/CollectionResponseTimelineEventTemplateNoPaging' -export * from '../models/ErrorCategory' export * from '../models/ErrorDetail' export * from '../models/EventDetail' export * from '../models/ModelError' diff --git a/codegen/crm/timeline/types/ObjectParamAPI.ts b/codegen/crm/timeline/types/ObjectParamAPI.ts index 4aeeee483..06d0bb7ae 100644 --- a/codegen/crm/timeline/types/ObjectParamAPI.ts +++ b/codegen/crm/timeline/types/ObjectParamAPI.ts @@ -106,7 +106,7 @@ export class ObjectEventsApi { * Creates multiple events * @param param the request object */ - public createBatch(param: EventsApiCreateBatchRequest, options?: Configuration): Promise { + public createBatch(param: EventsApiCreateBatchRequest, options?: Configuration): Promise { return this.api.createBatch(param.batchInputTimelineEvent, options).toPromise(); } diff --git a/codegen/crm/timeline/types/ObservableAPI.ts b/codegen/crm/timeline/types/ObservableAPI.ts index 53dc71039..e4f054b7c 100644 --- a/codegen/crm/timeline/types/ObservableAPI.ts +++ b/codegen/crm/timeline/types/ObservableAPI.ts @@ -60,7 +60,7 @@ export class ObservableEventsApi { * Creates multiple events * @param batchInputTimelineEvent The timeline event definition. */ - public createBatch(batchInputTimelineEvent: BatchInputTimelineEvent, _options?: Configuration): Observable { + public createBatch(batchInputTimelineEvent: BatchInputTimelineEvent, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.createBatch(batchInputTimelineEvent, _options); // build promise chain diff --git a/codegen/crm/timeline/types/PromiseAPI.ts b/codegen/crm/timeline/types/PromiseAPI.ts index fc9606d31..7d0800e0a 100644 --- a/codegen/crm/timeline/types/PromiseAPI.ts +++ b/codegen/crm/timeline/types/PromiseAPI.ts @@ -41,7 +41,7 @@ export class PromiseEventsApi { * Creates multiple events * @param batchInputTimelineEvent The timeline event definition. */ - public createBatch(batchInputTimelineEvent: BatchInputTimelineEvent, _options?: Configuration): Promise { + public createBatch(batchInputTimelineEvent: BatchInputTimelineEvent, _options?: Configuration): Promise { const result = this.api.createBatch(batchInputTimelineEvent, _options); return result.toPromise(); } diff --git a/codegen/files/apis/FilesApi.ts b/codegen/files/apis/FilesApi.ts index b32b7637b..8a4132413 100644 --- a/codegen/files/apis/FilesApi.ts +++ b/codegen/files/apis/FilesApi.ts @@ -12,6 +12,7 @@ import {SecurityAuthentication} from '../auth/auth'; import { CollectionResponseFile } from '../models/CollectionResponseFile'; import { FileActionResponse } from '../models/FileActionResponse'; +import { FileStat } from '../models/FileStat'; import { FileUpdateInput } from '../models/FileUpdateInput'; import { ImportFromUrlInput } from '../models/ImportFromUrlInput'; import { ImportFromUrlTaskLocator } from '../models/ImportFromUrlTaskLocator'; @@ -25,7 +26,7 @@ export class FilesApiRequestFactory extends BaseAPIRequestFactory { /** * Delete file by ID * Delete file - * @param fileId File ID to delete + * @param fileId FileId to delete */ public async archive(fileId: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -153,7 +154,7 @@ export class FilesApiRequestFactory extends BaseAPIRequestFactory { * @param updatedAtGte * @param name Search for files containing the given name. * @param path Search files by path. - * @param parentFolderId Search files within given folder ID. + * @param parentFolderId Search files within given folderId. * @param size Query by file size. * @param height Search files by height of image or video. * @param width Search files by width of image or video. @@ -337,7 +338,7 @@ export class FilesApiRequestFactory extends BaseAPIRequestFactory { /** * Get file by ID. * Get file. - * @param fileId Id of the desired file. + * @param fileId ID of the desired file. * @param properties */ public async getById(fileId: string, properties?: Array, _options?: Configuration): Promise { @@ -379,6 +380,49 @@ export class FilesApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * @param path + * @param properties + */ + public async getMetadata(path: string, properties?: Array, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new RequiredError("FilesApi", "getMetadata", "path"); + } + + + + // Path Params + const localVarPath = '/files/v3/files/stat/{path}' + .replace('{' + 'path' + '}', encodeURIComponent(String(path))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (properties !== undefined) { + requestContext.setQueryParam("properties", ObjectSerializer.serialize(properties, "Array", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Generates signed URL that allows temporary access to a private file. * Get signed URL to access private file. @@ -489,7 +533,7 @@ export class FilesApiRequestFactory extends BaseAPIRequestFactory { /** * Replace existing file data with new file data. Can be used to change image content without having to upload a new file and update all references. * Replace file. - * @param fileId Id of the desired file. + * @param fileId ID of the desired file. * @param file File data that will replace existing file in the file manager. * @param charsetHunch Character set of given file data. * @param options JSON String representing FileReplaceOptions @@ -886,6 +930,42 @@ export class FilesApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getMetadata + * @throws ApiException if the response code was not in [200, 299] + */ + public async getMetadata(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: FileStat = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FileStat", "" + ) as FileStat; + return body; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FileStat = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FileStat", "" + ) as FileStat; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/codegen/files/apis/FoldersApi.ts b/codegen/files/apis/FoldersApi.ts index 20515d999..3ff85cd3a 100644 --- a/codegen/files/apis/FoldersApi.ts +++ b/codegen/files/apis/FoldersApi.ts @@ -99,7 +99,7 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory { /** * Check status of folder update. Folder updates happen asynchronously. * Check folder update status. - * @param taskId Task ID of folder update + * @param taskId TaskId of folder update */ public async checkUpdateStatus(taskId: string, _options?: Configuration): Promise { let _config = _options || this.configuration; @@ -199,7 +199,7 @@ export class FoldersApiRequestFactory extends BaseAPIRequestFactory { * @param updatedAtGte * @param name Search for folders containing the specified name. * @param path Search for folders by path. - * @param parentFolderId Search for folders with the given parent folder ID. + * @param parentFolderId Search for folders with the given parent folderId. */ public async doSearch(properties?: Array, after?: string, before?: string, limit?: number, sort?: Array, id?: string, createdAt?: Date, createdAtLte?: Date, createdAtGte?: Date, updatedAt?: Date, updatedAtLte?: Date, updatedAtGte?: Date, name?: string, path?: string, parentFolderId?: number, _options?: Configuration): Promise { let _config = _options || this.configuration; diff --git a/codegen/files/models/ErrorCategory.ts b/codegen/files/models/ErrorCategory.ts deleted file mode 100644 index 2bbccca8d..000000000 --- a/codegen/files/models/ErrorCategory.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Files - * Upload and manage files. - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ErrorCategory { - 'name': string; - 'httpStatus': ErrorCategoryHttpStatusEnum; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "httpStatus", - "baseName": "httpStatus", - "type": "ErrorCategoryHttpStatusEnum", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ErrorCategory.attributeTypeMap; - } - - public constructor() { - } -} - - -export type ErrorCategoryHttpStatusEnum = "CONTINUE" | "SWITCHING_PROTOCOLS" | "PROCESSING" | "OK" | "CREATED" | "ACCEPTED" | "NON_AUTHORITATIVE_INFORMATION" | "NO_CONTENT" | "RESET_CONTENT" | "PARTIAL_CONTENT" | "MULTI_STATUS" | "ALREADY_REPORTED" | "IM_USED" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "USE_PROXY" | "TEMPORARY_REDIRECT" | "PERMANENT_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "REQUEST_ENTITY_TOO_LARGE" | "REQUEST_URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "REQUESTED_RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "IM_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADERS_FIELDS_TOO_LARGE" | "INTERNAL_STALE_SERVICE_DISCOVERY" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED" ; - diff --git a/codegen/files/models/FileActionResponse.ts b/codegen/files/models/FileActionResponse.ts index dbb332665..bbeff297a 100644 --- a/codegen/files/models/FileActionResponse.ts +++ b/codegen/files/models/FileActionResponse.ts @@ -43,7 +43,7 @@ export class FileActionResponse { */ 'links'?: { [key: string]: string; }; /** - * If of the requested task. + * ID of the requested task. */ 'taskId': string; diff --git a/codegen/files/models/FileStat.ts b/codegen/files/models/FileStat.ts new file mode 100644 index 000000000..5758df0d2 --- /dev/null +++ b/codegen/files/models/FileStat.ts @@ -0,0 +1,42 @@ +/** + * Files + * Upload and manage files. + * + * OpenAPI spec version: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Folder } from '../models/Folder'; + +export class FileStat { + 'file'?: any; + 'folder'?: Folder; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "file", + "baseName": "file", + "type": "any", + "format": "" + }, + { + "name": "folder", + "baseName": "folder", + "type": "Folder", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FileStat.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/codegen/files/models/FileUpdateInput.ts b/codegen/files/models/FileUpdateInput.ts index febee6cfd..329c77d13 100644 --- a/codegen/files/models/FileUpdateInput.ts +++ b/codegen/files/models/FileUpdateInput.ts @@ -20,21 +20,22 @@ export class FileUpdateInput { */ 'name'?: string; /** - * Folder ID where the file should be moved to. folderId and folderPath cannot be set at the same time. + * FolderId where the file should be moved to. folderId and folderPath parameters cannot be set at the same time. */ 'parentFolderId'?: string; /** - * Folder path where the file should be moved to. folderId and folderPath cannot be set at the same time. + * Folder path where the file should be moved to. folderId and folderPath parameters cannot be set at the same time. */ 'parentFolderPath'?: string; /** - * Mark weather the file should be used in new content or not. + * Mark whether the file should be used in new content or not. */ 'isUsableInContent'?: boolean; /** * NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead. */ 'access'?: FileUpdateInputAccessEnum; + 'expiresAt'?: number; static readonly discriminator: string | undefined = undefined; @@ -68,6 +69,12 @@ export class FileUpdateInput { "baseName": "access", "type": "FileUpdateInputAccessEnum", "format": "" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "number", + "format": "int64" } ]; static getAttributeTypeMap() { diff --git a/codegen/files/models/Folder.ts b/codegen/files/models/Folder.ts index fcf2d8d8f..2d893a52d 100644 --- a/codegen/files/models/Folder.ts +++ b/codegen/files/models/Folder.ts @@ -13,7 +13,7 @@ export class Folder { /** - * Id of the folder. + * ID of the folder. */ 'id': string; /** @@ -29,11 +29,11 @@ export class Folder { */ 'updatedAt': Date; /** - * Marks weather the folder is deleted or not. + * Marks whether the folder is deleted or not. */ 'archived': boolean; /** - * Id of the parent folder. + * ID of the parent folder. */ 'parentFolderId'?: string; /** diff --git a/codegen/files/models/FolderActionResponse.ts b/codegen/files/models/FolderActionResponse.ts index 9b9ac5273..02b8e4f5e 100644 --- a/codegen/files/models/FolderActionResponse.ts +++ b/codegen/files/models/FolderActionResponse.ts @@ -44,7 +44,7 @@ export class FolderActionResponse { */ 'links'?: { [key: string]: string; }; /** - * Id of the task. + * ID of the task. */ 'taskId': string; diff --git a/codegen/files/models/FolderInput.ts b/codegen/files/models/FolderInput.ts index 82c469489..78daffd8d 100644 --- a/codegen/files/models/FolderInput.ts +++ b/codegen/files/models/FolderInput.ts @@ -20,7 +20,7 @@ export class FolderInput { */ 'name': string; /** - * Folder ID of the parent of the created folder. If not specified, the folder will be created at the root level. parentFolderId and parentFolderPath cannot be set at the same time. + * FolderId of the parent of the created folder. If not specified, the folder will be created at the root level. parentFolderId and parentFolderPath cannot be set at the same time. */ 'parentFolderId'?: string; /** diff --git a/codegen/files/models/FolderUpdateInput.ts b/codegen/files/models/FolderUpdateInput.ts index fa1bb56d3..38fd771cd 100644 --- a/codegen/files/models/FolderUpdateInput.ts +++ b/codegen/files/models/FolderUpdateInput.ts @@ -16,7 +16,7 @@ */ export class FolderUpdateInput { /** - * Id of the folder to change. + * ID of the folder to change. */ 'id': string; /** @@ -24,7 +24,7 @@ export class FolderUpdateInput { */ 'name'?: string; /** - * New parent folder ID. If changed, the folder and all it's children will be moved into the specified folder. parentFolderId and parentFolderPath cannot be specified at the same time. + * New parent folderId. If changed, the folder and all it's children will be moved into the specified folder. parentFolderId and parentFolderPath cannot be specified at the same time. */ 'parentFolderId'?: number; diff --git a/codegen/files/models/FolderUpdateTaskLocator.ts b/codegen/files/models/FolderUpdateTaskLocator.ts index df871163e..ba16a10b8 100644 --- a/codegen/files/models/FolderUpdateTaskLocator.ts +++ b/codegen/files/models/FolderUpdateTaskLocator.ts @@ -16,13 +16,13 @@ */ export class FolderUpdateTaskLocator { /** - * The ID of the task + * ID of the task */ 'id': string; /** * Links for where to check information related to the task. The `status` link gives the URL for where to check the status of the task. */ - 'links'?: { [key: string]: string; }; + 'links': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/files/models/ImportFromUrlInput.ts b/codegen/files/models/ImportFromUrlInput.ts index 117b76002..f196a4103 100644 --- a/codegen/files/models/ImportFromUrlInput.ts +++ b/codegen/files/models/ImportFromUrlInput.ts @@ -17,7 +17,7 @@ export class ImportFromUrlInput { */ 'access': ImportFromUrlInputAccessEnum; /** - * Time to live. If specified the file will be deleted after the given time frame. + * Time to live. If specified the file will be deleted after the given time frame. If left unset, the file will exist indefinitely */ 'ttl'?: string; /** @@ -29,7 +29,7 @@ export class ImportFromUrlInput { */ 'url': string; /** - * One of folderId or folderPath is required. Destination folder ID for the uploaded file. + * One of folderId or folderPath is required. Destination folderId for the uploaded file. */ 'folderId'?: string; /** @@ -39,15 +39,15 @@ export class ImportFromUrlInput { /** * NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead. */ - 'duplicateValidationStrategy': ImportFromUrlInputDuplicateValidationStrategyEnum; + 'duplicateValidationStrategy'?: ImportFromUrlInputDuplicateValidationStrategyEnum; /** * ENTIRE_PORTAL: Look for a duplicate file in the entire account. EXACT_FOLDER: Look for a duplicate file in the provided folder. */ - 'duplicateValidationScope': ImportFromUrlInputDuplicateValidationScopeEnum; + 'duplicateValidationScope'?: ImportFromUrlInputDuplicateValidationScopeEnum; /** - * If true, it will overwrite existing files if a file with the same name exists in the given folder. + * If true, will overwrite existing file if one with the same name and extension exists in the given folder. The overwritten file will be deleted and the uploaded file will take its place with a new ID. If unset or set as false, the new file's name will be updated to prevent colliding with existing file if one exists with the same path, name, and extension */ - 'overwrite': boolean; + 'overwrite'?: boolean; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/files/models/ImportFromUrlTaskLocator.ts b/codegen/files/models/ImportFromUrlTaskLocator.ts index 4dc275e64..495aaea68 100644 --- a/codegen/files/models/ImportFromUrlTaskLocator.ts +++ b/codegen/files/models/ImportFromUrlTaskLocator.ts @@ -16,13 +16,13 @@ */ export class ImportFromUrlTaskLocator { /** - * The ID of the task + * ID of the task */ 'id': string; /** * Links for where to check information related to the task. The `status` link gives the URL for where to check the status of the task. */ - 'links'?: { [key: string]: string; }; + 'links': { [key: string]: string; }; static readonly discriminator: string | undefined = undefined; diff --git a/codegen/files/models/ModelFile.ts b/codegen/files/models/ModelFile.ts index 39c8607db..bad5f8136 100644 --- a/codegen/files/models/ModelFile.ts +++ b/codegen/files/models/ModelFile.ts @@ -36,7 +36,7 @@ export class ModelFile { */ 'archived': boolean; /** - * Id of the folder the file is in. + * ID of the folder the file is in. */ 'parentFolderId'?: string; /** @@ -48,7 +48,7 @@ export class ModelFile { */ 'path'?: string; /** - * Size in bytes of the file. + * Size of the file in bytes. */ 'size'?: number; /** @@ -68,7 +68,7 @@ export class ModelFile { */ 'type'?: string; /** - * Extension of the file. For example png. + * Extension of the file. ex: .jpg, .png, .gif, .pdf, etc. */ 'extension'?: string; /** @@ -87,6 +87,7 @@ export class ModelFile { * File access. Can be PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, PRIVATE. */ 'access': ModelFileAccessEnum; + 'expiresAt'?: number; static readonly discriminator: string | undefined = undefined; @@ -198,6 +199,12 @@ export class ModelFile { "baseName": "access", "type": "ModelFileAccessEnum", "format": "" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "number", + "format": "int64" } ]; static getAttributeTypeMap() { diff --git a/codegen/files/models/ObjectSerializer.ts b/codegen/files/models/ObjectSerializer.ts index 6d97f59d9..d2eb71dfe 100644 --- a/codegen/files/models/ObjectSerializer.ts +++ b/codegen/files/models/ObjectSerializer.ts @@ -1,8 +1,8 @@ export * from '../models/CollectionResponseFile'; export * from '../models/CollectionResponseFolder'; -export * from '../models/ErrorCategory'; export * from '../models/ErrorDetail'; export * from '../models/FileActionResponse'; +export * from '../models/FileStat'; export * from '../models/FileUpdateInput'; export * from '../models/Folder'; export * from '../models/FolderActionResponse'; @@ -21,10 +21,10 @@ export * from '../models/StandardError'; import { CollectionResponseFile } from '../models/CollectionResponseFile'; import { CollectionResponseFolder } from '../models/CollectionResponseFolder'; -import { ErrorCategory } from '../models/ErrorCategory'; import { ErrorDetail } from '../models/ErrorDetail'; import { FileActionResponse } from '../models/FileActionResponse'; -import { FileUpdateInput } from '../models/FileUpdateInput'; +import { FileStat } from '../models/FileStat'; +import { FileUpdateInput } from '../models/FileUpdateInput'; import { Folder } from '../models/Folder'; import { FolderActionResponse } from '../models/FolderActionResponse'; import { FolderInput } from '../models/FolderInput'; @@ -33,7 +33,7 @@ import { FolderUpdateTaskLocator } from '../models/FolderUpdateTaskLocator'; import { ImportFromUrlInput } from '../models/ImportFromUrlInput'; import { ImportFromUrlTaskLocator } from '../models/ImportFromUrlTaskLocator'; import { ModelError } from '../models/ModelError'; -import { ModelFile } from '../models/ModelFile'; +import { ModelFile } from '../models/ModelFile'; import { NextPage } from '../models/NextPage'; import { Paging } from '../models/Paging'; import { PreviousPage } from '../models/PreviousPage'; @@ -60,7 +60,6 @@ const supportedMediaTypes: { [mediaType: string]: number } = { let enumsMap: Set = new Set([ - "ErrorCategoryHttpStatusEnum", "FileActionResponseStatusEnum", "FileUpdateInputAccessEnum", "FolderActionResponseStatusEnum", @@ -73,9 +72,9 @@ let enumsMap: Set = new Set([ let typeMap: {[index: string]: any} = { "CollectionResponseFile": CollectionResponseFile, "CollectionResponseFolder": CollectionResponseFolder, - "ErrorCategory": ErrorCategory, "ErrorDetail": ErrorDetail, "FileActionResponse": FileActionResponse, + "FileStat": FileStat, "FileUpdateInput": FileUpdateInput, "Folder": Folder, "FolderActionResponse": FolderActionResponse, diff --git a/codegen/files/models/SignedUrl.ts b/codegen/files/models/SignedUrl.ts index 42ec4e976..11b88be07 100644 --- a/codegen/files/models/SignedUrl.ts +++ b/codegen/files/models/SignedUrl.ts @@ -11,6 +11,9 @@ */ +/** +* Signed Url object with optional ancillary metadata of requested file +*/ export class SignedUrl { /** * Timestamp of when the URL will no longer grant access to the file. diff --git a/codegen/files/models/StandardError.ts b/codegen/files/models/StandardError.ts index ae6420233..f33bca69d 100644 --- a/codegen/files/models/StandardError.ts +++ b/codegen/files/models/StandardError.ts @@ -10,13 +10,12 @@ * Do not edit the class manually. */ -import { ErrorCategory } from '../models/ErrorCategory'; import { ErrorDetail } from '../models/ErrorDetail'; export class StandardError { 'status': string; 'id'?: string; - 'category': ErrorCategory; + 'category': string; 'subCategory'?: any; 'message': string; 'errors': Array; @@ -41,7 +40,7 @@ export class StandardError { { "name": "category", "baseName": "category", - "type": "ErrorCategory", + "type": "string", "format": "" }, { diff --git a/codegen/files/models/all.ts b/codegen/files/models/all.ts index 4699a3bc4..9fb3a4f55 100644 --- a/codegen/files/models/all.ts +++ b/codegen/files/models/all.ts @@ -1,8 +1,8 @@ export * from '../models/CollectionResponseFile' export * from '../models/CollectionResponseFolder' -export * from '../models/ErrorCategory' export * from '../models/ErrorDetail' export * from '../models/FileActionResponse' +export * from '../models/FileStat' export * from '../models/FileUpdateInput' export * from '../models/Folder' export * from '../models/FolderActionResponse' diff --git a/codegen/files/types/ObjectParamAPI.ts b/codegen/files/types/ObjectParamAPI.ts index c46ce4110..a53bf64d7 100644 --- a/codegen/files/types/ObjectParamAPI.ts +++ b/codegen/files/types/ObjectParamAPI.ts @@ -4,6 +4,7 @@ import { Configuration} from '../configuration' import { CollectionResponseFile } from '../models/CollectionResponseFile'; import { CollectionResponseFolder } from '../models/CollectionResponseFolder'; import { FileActionResponse } from '../models/FileActionResponse'; +import { FileStat } from '../models/FileStat'; import { FileUpdateInput } from '../models/FileUpdateInput'; import { Folder } from '../models/Folder'; import { FolderActionResponse } from '../models/FolderActionResponse'; @@ -19,7 +20,7 @@ import { FilesApiRequestFactory, FilesApiResponseProcessor} from "../apis/FilesA export interface FilesApiArchiveRequest { /** - * File ID to delete + * FileId to delete * @type string * @memberof FilesApiarchive */ @@ -130,7 +131,7 @@ export interface FilesApiDoSearchRequest { */ path?: string /** - * Search files within given folder ID. + * Search files within given folderId. * @type number * @memberof FilesApidoSearch */ @@ -193,7 +194,7 @@ export interface FilesApiDoSearchRequest { export interface FilesApiGetByIdRequest { /** - * Id of the desired file. + * ID of the desired file. * @type string * @memberof FilesApigetById */ @@ -206,6 +207,21 @@ export interface FilesApiGetByIdRequest { properties?: Array } +export interface FilesApiGetMetadataRequest { + /** + * + * @type string + * @memberof FilesApigetMetadata + */ + path: string + /** + * + * @type Array<string> + * @memberof FilesApigetMetadata + */ + properties?: Array +} + export interface FilesApiGetSignedUrlRequest { /** * ID of file. @@ -244,7 +260,7 @@ export interface FilesApiImportFromUrlRequest { export interface FilesApiReplaceRequest { /** - * Id of the desired file. + * ID of the desired file. * @type string * @memberof FilesApireplace */ @@ -375,6 +391,13 @@ export class ObjectFilesApi { return this.api.getById(param.fileId, param.properties, options).toPromise(); } + /** + * @param param the request object + */ + public getMetadata(param: FilesApiGetMetadataRequest, options?: Configuration): Promise { + return this.api.getMetadata(param.path, param.properties, options).toPromise(); + } + /** * Generates signed URL that allows temporary access to a private file. * Get signed URL to access private file. @@ -445,7 +468,7 @@ export interface FoldersApiArchiveByPathRequest { export interface FoldersApiCheckUpdateStatusRequest { /** - * Task ID of folder update + * TaskId of folder update * @type string * @memberof FoldersApicheckUpdateStatus */ @@ -547,7 +570,7 @@ export interface FoldersApiDoSearchRequest { */ path?: string /** - * Search for folders with the given parent folder ID. + * Search for folders with the given parent folderId. * @type number * @memberof FoldersApidoSearch */ diff --git a/codegen/files/types/ObservableAPI.ts b/codegen/files/types/ObservableAPI.ts index 4fca04e5d..fc8bad139 100644 --- a/codegen/files/types/ObservableAPI.ts +++ b/codegen/files/types/ObservableAPI.ts @@ -5,6 +5,7 @@ import {mergeMap, map} from '../rxjsStub'; import { CollectionResponseFile } from '../models/CollectionResponseFile'; import { CollectionResponseFolder } from '../models/CollectionResponseFolder'; import { FileActionResponse } from '../models/FileActionResponse'; +import { FileStat } from '../models/FileStat'; import { FileUpdateInput } from '../models/FileUpdateInput'; import { Folder } from '../models/Folder'; import { FolderActionResponse } from '../models/FolderActionResponse'; @@ -34,7 +35,7 @@ export class ObservableFilesApi { /** * Delete file by ID * Delete file - * @param fileId File ID to delete + * @param fileId FileId to delete */ public archive(fileId: string, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.archive(fileId, _options); @@ -120,7 +121,7 @@ export class ObservableFilesApi { * @param updatedAtGte * @param name Search for files containing the given name. * @param path Search files by path. - * @param parentFolderId Search files within given folder ID. + * @param parentFolderId Search files within given folderId. * @param size Query by file size. * @param height Search files by height of image or video. * @param width Search files by width of image or video. @@ -153,7 +154,7 @@ export class ObservableFilesApi { /** * Get file by ID. * Get file. - * @param fileId Id of the desired file. + * @param fileId ID of the desired file. * @param properties */ public getById(fileId: string, properties?: Array, _options?: Configuration): Observable { @@ -175,6 +176,29 @@ export class ObservableFilesApi { })); } + /** + * @param path + * @param properties + */ + public getMetadata(path: string, properties?: Array, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getMetadata(path, properties, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getMetadata(rsp))); + })); + } + /** * Generates signed URL that allows temporary access to a private file. * Get signed URL to access private file. @@ -229,7 +253,7 @@ export class ObservableFilesApi { /** * Replace existing file data with new file data. Can be used to change image content without having to upload a new file and update all references. * Replace file. - * @param fileId Id of the desired file. + * @param fileId ID of the desired file. * @param file File data that will replace existing file in the file manager. * @param charsetHunch Character set of given file data. * @param options JSON String representing FileReplaceOptions @@ -376,7 +400,7 @@ export class ObservableFoldersApi { /** * Check status of folder update. Folder updates happen asynchronously. * Check folder update status. - * @param taskId Task ID of folder update + * @param taskId TaskId of folder update */ public checkUpdateStatus(taskId: string, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.checkUpdateStatus(taskId, _options); @@ -438,7 +462,7 @@ export class ObservableFoldersApi { * @param updatedAtGte * @param name Search for folders containing the specified name. * @param path Search for folders by path. - * @param parentFolderId Search for folders with the given parent folder ID. + * @param parentFolderId Search for folders with the given parent folderId. */ public doSearch(properties?: Array, after?: string, before?: string, limit?: number, sort?: Array, id?: string, createdAt?: Date, createdAtLte?: Date, createdAtGte?: Date, updatedAt?: Date, updatedAtLte?: Date, updatedAtGte?: Date, name?: string, path?: string, parentFolderId?: number, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.doSearch(properties, after, before, limit, sort, id, createdAt, createdAtLte, createdAtGte, updatedAt, updatedAtLte, updatedAtGte, name, path, parentFolderId, _options); diff --git a/codegen/files/types/PromiseAPI.ts b/codegen/files/types/PromiseAPI.ts index a1c894c7c..038c38554 100644 --- a/codegen/files/types/PromiseAPI.ts +++ b/codegen/files/types/PromiseAPI.ts @@ -4,6 +4,7 @@ import { Configuration} from '../configuration' import { CollectionResponseFile } from '../models/CollectionResponseFile'; import { CollectionResponseFolder } from '../models/CollectionResponseFolder'; import { FileActionResponse } from '../models/FileActionResponse'; +import { FileStat } from '../models/FileStat'; import { FileUpdateInput } from '../models/FileUpdateInput'; import { Folder } from '../models/Folder'; import { FolderActionResponse } from '../models/FolderActionResponse'; @@ -30,7 +31,7 @@ export class PromiseFilesApi { /** * Delete file by ID * Delete file - * @param fileId File ID to delete + * @param fileId FileId to delete */ public archive(fileId: string, _options?: Configuration): Promise { const result = this.api.archive(fileId, _options); @@ -74,7 +75,7 @@ export class PromiseFilesApi { * @param updatedAtGte * @param name Search for files containing the given name. * @param path Search files by path. - * @param parentFolderId Search files within given folder ID. + * @param parentFolderId Search files within given folderId. * @param size Query by file size. * @param height Search files by height of image or video. * @param width Search files by width of image or video. @@ -93,7 +94,7 @@ export class PromiseFilesApi { /** * Get file by ID. * Get file. - * @param fileId Id of the desired file. + * @param fileId ID of the desired file. * @param properties */ public getById(fileId: string, properties?: Array, _options?: Configuration): Promise { @@ -101,6 +102,15 @@ export class PromiseFilesApi { return result.toPromise(); } + /** + * @param path + * @param properties + */ + public getMetadata(path: string, properties?: Array, _options?: Configuration): Promise { + const result = this.api.getMetadata(path, properties, _options); + return result.toPromise(); + } + /** * Generates signed URL that allows temporary access to a private file. * Get signed URL to access private file. @@ -127,7 +137,7 @@ export class PromiseFilesApi { /** * Replace existing file data with new file data. Can be used to change image content without having to upload a new file and update all references. * Replace file. - * @param fileId Id of the desired file. + * @param fileId ID of the desired file. * @param file File data that will replace existing file in the file manager. * @param charsetHunch Character set of given file data. * @param options JSON String representing FileReplaceOptions @@ -205,7 +215,7 @@ export class PromiseFoldersApi { /** * Check status of folder update. Folder updates happen asynchronously. * Check folder update status. - * @param taskId Task ID of folder update + * @param taskId TaskId of folder update */ public checkUpdateStatus(taskId: string, _options?: Configuration): Promise { const result = this.api.checkUpdateStatus(taskId, _options); @@ -239,7 +249,7 @@ export class PromiseFoldersApi { * @param updatedAtGte * @param name Search for folders containing the specified name. * @param path Search for folders by path. - * @param parentFolderId Search for folders with the given parent folder ID. + * @param parentFolderId Search for folders with the given parent folderId. */ public doSearch(properties?: Array, after?: string, before?: string, limit?: number, sort?: Array, id?: string, createdAt?: Date, createdAtLte?: Date, createdAtGte?: Date, updatedAt?: Date, updatedAtLte?: Date, updatedAtGte?: Date, name?: string, path?: string, parentFolderId?: number, _options?: Configuration): Promise { const result = this.api.doSearch(properties, after, before, limit, sort, id, createdAt, createdAtLte, createdAtGte, updatedAt, updatedAtLte, updatedAtGte, name, path, parentFolderId, _options); diff --git a/codegen/marketing/events/apis/AttendanceSubscriberStateChangesApi.ts b/codegen/marketing/events/apis/AttendanceSubscriberStateChangesApi.ts index 9ceb093b2..0166d1701 100644 --- a/codegen/marketing/events/apis/AttendanceSubscriberStateChangesApi.ts +++ b/codegen/marketing/events/apis/AttendanceSubscriberStateChangesApi.ts @@ -90,7 +90,7 @@ export class AttendanceSubscriberStateChangesApiRequestFactory extends BaseAPIRe } /** - * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. If you set params + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. * Record * @param externalEventId The id of the marketing event * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. diff --git a/codegen/marketing/events/apis/BasicApi.ts b/codegen/marketing/events/apis/BasicApi.ts new file mode 100644 index 000000000..be478ea56 --- /dev/null +++ b/codegen/marketing/events/apis/BasicApi.ts @@ -0,0 +1,560 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import { isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { MarketingEventCreateRequestParams } from '../models/MarketingEventCreateRequestParams'; +import { MarketingEventDefaultResponse } from '../models/MarketingEventDefaultResponse'; +import { MarketingEventPublicDefaultResponse } from '../models/MarketingEventPublicDefaultResponse'; +import { MarketingEventPublicReadResponse } from '../models/MarketingEventPublicReadResponse'; +import { MarketingEventUpdateRequestParams } from '../models/MarketingEventUpdateRequestParams'; + +/** + * no description + */ +export class BasicApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Deletes an existing Marketing Event with the specified id, if one exists. + * Delete a marketing event + * @param externalEventId The id of the marketing event to delete + * @param externalAccountId The account id associated with the marketing event + */ + public async archive(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'externalEventId' is not null or undefined + if (externalEventId === null || externalEventId === undefined) { + throw new RequiredError("BasicApi", "archive", "externalEventId"); + } + + + // verify required parameter 'externalAccountId' is not null or undefined + if (externalAccountId === null || externalAccountId === undefined) { + throw new RequiredError("BasicApi", "archive", "externalAccountId"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' + .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (externalAccountId !== undefined) { + requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Creates a new marketing event in HubSpot + * Create a marketing event + * @param marketingEventCreateRequestParams The details of the marketing event to create + */ + public async create(marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'marketingEventCreateRequestParams' is not null or undefined + if (marketingEventCreateRequestParams === null || marketingEventCreateRequestParams === undefined) { + throw new RequiredError("BasicApi", "create", "marketingEventCreateRequestParams"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(marketingEventCreateRequestParams, "MarketingEventCreateRequestParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Mark a marketing event as cancelled. + * Mark a marketing event as cancelled + * @param externalEventId The id of the marketing event to mark as cancelled + * @param externalAccountId The account id associated with the marketing event + */ + public async doCancel(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'externalEventId' is not null or undefined + if (externalEventId === null || externalEventId === undefined) { + throw new RequiredError("BasicApi", "doCancel", "externalEventId"); + } + + + // verify required parameter 'externalAccountId' is not null or undefined + if (externalAccountId === null || externalAccountId === undefined) { + throw new RequiredError("BasicApi", "doCancel", "externalAccountId"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}/cancel' + .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (externalAccountId !== undefined) { + requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Returns the details of the Marketing Event with the specified id, if one exists. + * Get a marketing event + * @param externalEventId The id of the marketing event to return + * @param externalAccountId The account id associated with the marketing event + */ + public async getById(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'externalEventId' is not null or undefined + if (externalEventId === null || externalEventId === undefined) { + throw new RequiredError("BasicApi", "getById", "externalEventId"); + } + + + // verify required parameter 'externalAccountId' is not null or undefined + if (externalAccountId === null || externalAccountId === undefined) { + throw new RequiredError("BasicApi", "getById", "externalAccountId"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' + .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (externalAccountId !== undefined) { + requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Upsets a Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update a marketing event + * @param externalEventId The id of the marketing event to upsert + * @param marketingEventCreateRequestParams The details of the marketing event to upsert + */ + public async replace(externalEventId: string, marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'externalEventId' is not null or undefined + if (externalEventId === null || externalEventId === undefined) { + throw new RequiredError("BasicApi", "replace", "externalEventId"); + } + + + // verify required parameter 'marketingEventCreateRequestParams' is not null or undefined + if (marketingEventCreateRequestParams === null || marketingEventCreateRequestParams === undefined) { + throw new RequiredError("BasicApi", "replace", "marketingEventCreateRequestParams"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' + .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(marketingEventCreateRequestParams, "MarketingEventCreateRequestParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Updates an existing Marketing Event with the specified id, if one exists. + * Update a marketing event + * @param externalEventId The id of the marketing event to update + * @param externalAccountId The account id associated with the marketing event + * @param marketingEventUpdateRequestParams The details of the marketing event to update + */ + public async update(externalEventId: string, externalAccountId: string, marketingEventUpdateRequestParams: MarketingEventUpdateRequestParams, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'externalEventId' is not null or undefined + if (externalEventId === null || externalEventId === undefined) { + throw new RequiredError("BasicApi", "update", "externalEventId"); + } + + + // verify required parameter 'externalAccountId' is not null or undefined + if (externalAccountId === null || externalAccountId === undefined) { + throw new RequiredError("BasicApi", "update", "externalAccountId"); + } + + + // verify required parameter 'marketingEventUpdateRequestParams' is not null or undefined + if (marketingEventUpdateRequestParams === null || marketingEventUpdateRequestParams === undefined) { + throw new RequiredError("BasicApi", "update", "marketingEventUpdateRequestParams"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' + .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (externalAccountId !== undefined) { + requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); + } + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(marketingEventUpdateRequestParams, "MarketingEventUpdateRequestParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class BasicApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to archive + * @throws ApiException if the response code was not in [200, 299] + */ + public async archive(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to create + * @throws ApiException if the response code was not in [200, 299] + */ + public async create(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventDefaultResponse", "" + ) as MarketingEventDefaultResponse; + return body; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventDefaultResponse", "" + ) as MarketingEventDefaultResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to doCancel + * @throws ApiException if the response code was not in [200, 299] + */ + public async doCancel(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventDefaultResponse", "" + ) as MarketingEventDefaultResponse; + return body; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventDefaultResponse", "" + ) as MarketingEventDefaultResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getById + * @throws ApiException if the response code was not in [200, 299] + */ + public async getById(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MarketingEventPublicReadResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventPublicReadResponse", "" + ) as MarketingEventPublicReadResponse; + return body; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MarketingEventPublicReadResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventPublicReadResponse", "" + ) as MarketingEventPublicReadResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to replace + * @throws ApiException if the response code was not in [200, 299] + */ + public async replace(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventPublicDefaultResponse", "" + ) as MarketingEventPublicDefaultResponse; + return body; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventPublicDefaultResponse", "" + ) as MarketingEventPublicDefaultResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to update + * @throws ApiException if the response code was not in [200, 299] + */ + public async update(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventPublicDefaultResponse", "" + ) as MarketingEventPublicDefaultResponse; + return body; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventPublicDefaultResponse", "" + ) as MarketingEventPublicDefaultResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/codegen/marketing/events/apis/BatchApi.ts b/codegen/marketing/events/apis/BatchApi.ts new file mode 100644 index 000000000..f84401a6a --- /dev/null +++ b/codegen/marketing/events/apis/BatchApi.ts @@ -0,0 +1,181 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import { isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { BatchInputMarketingEventCreateRequestParams } from '../models/BatchInputMarketingEventCreateRequestParams'; +import { BatchInputMarketingEventExternalUniqueIdentifier } from '../models/BatchInputMarketingEventExternalUniqueIdentifier'; +import { BatchResponseMarketingEventPublicDefaultResponse } from '../models/BatchResponseMarketingEventPublicDefaultResponse'; + +/** + * no description + */ +export class BatchApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Bulk delete a number of marketing events in HubSpot + * Delete multiple marketing events + * @param batchInputMarketingEventExternalUniqueIdentifier The details of the marketing events to delete + */ + public async archiveBatch(batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputMarketingEventExternalUniqueIdentifier' is not null or undefined + if (batchInputMarketingEventExternalUniqueIdentifier === null || batchInputMarketingEventExternalUniqueIdentifier === undefined) { + throw new RequiredError("BatchApi", "archiveBatch", "batchInputMarketingEventExternalUniqueIdentifier"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputMarketingEventExternalUniqueIdentifier, "BatchInputMarketingEventExternalUniqueIdentifier", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Upset multiple Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update multiple marketing events + * @param batchInputMarketingEventCreateRequestParams The details of the marketing events to upsert + */ + public async doUpsert(batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'batchInputMarketingEventCreateRequestParams' is not null or undefined + if (batchInputMarketingEventCreateRequestParams === null || batchInputMarketingEventCreateRequestParams === undefined) { + throw new RequiredError("BatchApi", "doUpsert", "batchInputMarketingEventCreateRequestParams"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/upsert'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputMarketingEventCreateRequestParams, "BatchInputMarketingEventCreateRequestParams", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class BatchApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to archiveBatch + * @throws ApiException if the response code was not in [200, 299] + */ + public async archiveBatch(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to doUpsert + * @throws ApiException if the response code was not in [200, 299] + */ + public async doUpsert(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: BatchResponseMarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseMarketingEventPublicDefaultResponse", "" + ) as BatchResponseMarketingEventPublicDefaultResponse; + return body; + } + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: BatchResponseMarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "BatchResponseMarketingEventPublicDefaultResponse", "" + ) as BatchResponseMarketingEventPublicDefaultResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/codegen/marketing/events/apis/MarketingEventsExternalApi.ts b/codegen/marketing/events/apis/MarketingEventsExternalApi.ts index b159d6f53..a52de205c 100644 --- a/codegen/marketing/events/apis/MarketingEventsExternalApi.ts +++ b/codegen/marketing/events/apis/MarketingEventsExternalApi.ts @@ -8,117 +8,14 @@ import { isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; -import { BatchInputMarketingEventCreateRequestParams } from '../models/BatchInputMarketingEventCreateRequestParams'; -import { BatchInputMarketingEventEmailSubscriber } from '../models/BatchInputMarketingEventEmailSubscriber'; -import { BatchInputMarketingEventExternalUniqueIdentifier } from '../models/BatchInputMarketingEventExternalUniqueIdentifier'; -import { BatchInputMarketingEventSubscriber } from '../models/BatchInputMarketingEventSubscriber'; -import { BatchResponseMarketingEventPublicDefaultResponse } from '../models/BatchResponseMarketingEventPublicDefaultResponse'; import { MarketingEventCompleteRequestParams } from '../models/MarketingEventCompleteRequestParams'; -import { MarketingEventCreateRequestParams } from '../models/MarketingEventCreateRequestParams'; import { MarketingEventDefaultResponse } from '../models/MarketingEventDefaultResponse'; -import { MarketingEventPublicDefaultResponse } from '../models/MarketingEventPublicDefaultResponse'; -import { MarketingEventPublicReadResponse } from '../models/MarketingEventPublicReadResponse'; -import { MarketingEventUpdateRequestParams } from '../models/MarketingEventUpdateRequestParams'; /** * no description */ export class MarketingEventsExternalApiRequestFactory extends BaseAPIRequestFactory { - /** - * @param externalEventId - * @param externalAccountId - */ - public async archive(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'externalEventId' is not null or undefined - if (externalEventId === null || externalEventId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "archive", "externalEventId"); - } - - - // verify required parameter 'externalAccountId' is not null or undefined - if (externalAccountId === null || externalAccountId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "archive", "externalAccountId"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' - .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (externalAccountId !== undefined) { - requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); - } - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * @param batchInputMarketingEventExternalUniqueIdentifier - */ - public async archiveBatch(batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputMarketingEventExternalUniqueIdentifier' is not null or undefined - if (batchInputMarketingEventExternalUniqueIdentifier === null || batchInputMarketingEventExternalUniqueIdentifier === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "archiveBatch", "batchInputMarketingEventExternalUniqueIdentifier"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/delete'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputMarketingEventExternalUniqueIdentifier, "BatchInputMarketingEventExternalUniqueIdentifier", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - /** * @param externalEventId * @param externalAccountId @@ -185,617 +82,32 @@ export class MarketingEventsExternalApiRequestFactory extends BaseAPIRequestFact return requestContext; } - /** - * @param marketingEventCreateRequestParams - */ - public async create(marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'marketingEventCreateRequestParams' is not null or undefined - if (marketingEventCreateRequestParams === null || marketingEventCreateRequestParams === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "create", "marketingEventCreateRequestParams"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(marketingEventCreateRequestParams, "MarketingEventCreateRequestParams", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * @param externalEventId - * @param externalAccountId - */ - public async doCancel(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'externalEventId' is not null or undefined - if (externalEventId === null || externalEventId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doCancel", "externalEventId"); - } - - - // verify required parameter 'externalAccountId' is not null or undefined - if (externalAccountId === null || externalAccountId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doCancel", "externalAccountId"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}/cancel' - .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (externalAccountId !== undefined) { - requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); - } - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } +} - return requestContext; - } +export class MarketingEventsExternalApiResponseProcessor { /** - * @param externalEventId - * @param subscriberState - * @param externalAccountId - * @param batchInputMarketingEventEmailSubscriber + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to complete + * @throws ApiException if the response code was not in [200, 299] */ - public async doEmailUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'externalEventId' is not null or undefined - if (externalEventId === null || externalEventId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doEmailUpsertById", "externalEventId"); - } - - - // verify required parameter 'subscriberState' is not null or undefined - if (subscriberState === null || subscriberState === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doEmailUpsertById", "subscriberState"); - } - - - // verify required parameter 'externalAccountId' is not null or undefined - if (externalAccountId === null || externalAccountId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doEmailUpsertById", "externalAccountId"); - } - - - // verify required parameter 'batchInputMarketingEventEmailSubscriber' is not null or undefined - if (batchInputMarketingEventEmailSubscriber === null || batchInputMarketingEventEmailSubscriber === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doEmailUpsertById", "batchInputMarketingEventEmailSubscriber"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/email-upsert' - .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))) - .replace('{' + 'subscriberState' + '}', encodeURIComponent(String(subscriberState))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (externalAccountId !== undefined) { - requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); - } - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputMarketingEventEmailSubscriber, "BatchInputMarketingEventEmailSubscriber", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); + public async complete(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MarketingEventDefaultResponse", "" + ) as MarketingEventDefaultResponse; + return body; } - - return requestContext; - } - - /** - * @param batchInputMarketingEventCreateRequestParams - */ - public async doUpsert(batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'batchInputMarketingEventCreateRequestParams' is not null or undefined - if (batchInputMarketingEventCreateRequestParams === null || batchInputMarketingEventCreateRequestParams === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doUpsert", "batchInputMarketingEventCreateRequestParams"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/upsert'; - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputMarketingEventCreateRequestParams, "BatchInputMarketingEventCreateRequestParams", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * @param externalEventId - * @param subscriberState - * @param externalAccountId - * @param batchInputMarketingEventSubscriber - */ - public async doUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'externalEventId' is not null or undefined - if (externalEventId === null || externalEventId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doUpsertById", "externalEventId"); - } - - - // verify required parameter 'subscriberState' is not null or undefined - if (subscriberState === null || subscriberState === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doUpsertById", "subscriberState"); - } - - - // verify required parameter 'externalAccountId' is not null or undefined - if (externalAccountId === null || externalAccountId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doUpsertById", "externalAccountId"); - } - - - // verify required parameter 'batchInputMarketingEventSubscriber' is not null or undefined - if (batchInputMarketingEventSubscriber === null || batchInputMarketingEventSubscriber === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "doUpsertById", "batchInputMarketingEventSubscriber"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert' - .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))) - .replace('{' + 'subscriberState' + '}', encodeURIComponent(String(subscriberState))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (externalAccountId !== undefined) { - requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); - } - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(batchInputMarketingEventSubscriber, "BatchInputMarketingEventSubscriber", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * @param externalEventId - * @param externalAccountId - */ - public async getById(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'externalEventId' is not null or undefined - if (externalEventId === null || externalEventId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "getById", "externalEventId"); - } - - - // verify required parameter 'externalAccountId' is not null or undefined - if (externalAccountId === null || externalAccountId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "getById", "externalAccountId"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' - .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (externalAccountId !== undefined) { - requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); - } - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * @param externalEventId - * @param marketingEventCreateRequestParams - */ - public async replace(externalEventId: string, marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'externalEventId' is not null or undefined - if (externalEventId === null || externalEventId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "replace", "externalEventId"); - } - - - // verify required parameter 'marketingEventCreateRequestParams' is not null or undefined - if (marketingEventCreateRequestParams === null || marketingEventCreateRequestParams === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "replace", "marketingEventCreateRequestParams"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' - .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(marketingEventCreateRequestParams, "MarketingEventCreateRequestParams", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * @param externalEventId - * @param externalAccountId - * @param marketingEventUpdateRequestParams - */ - public async update(externalEventId: string, externalAccountId: string, marketingEventUpdateRequestParams: MarketingEventUpdateRequestParams, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'externalEventId' is not null or undefined - if (externalEventId === null || externalEventId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "update", "externalEventId"); - } - - - // verify required parameter 'externalAccountId' is not null or undefined - if (externalAccountId === null || externalAccountId === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "update", "externalAccountId"); - } - - - // verify required parameter 'marketingEventUpdateRequestParams' is not null or undefined - if (marketingEventUpdateRequestParams === null || marketingEventUpdateRequestParams === undefined) { - throw new RequiredError("MarketingEventsExternalApi", "update", "marketingEventUpdateRequestParams"); - } - - - // Path Params - const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}' - .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (externalAccountId !== undefined) { - requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); - } - - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json" - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(marketingEventUpdateRequestParams, "MarketingEventUpdateRequestParams", ""), - contentType - ); - requestContext.setBody(serializedBody); - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["oauth2"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - -} - -export class MarketingEventsExternalApiResponseProcessor { - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to archive - * @throws ApiException if the response code was not in [200, 299] - */ - public async archive(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: void = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "void", "" - ) as void; - return body; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to archiveBatch - * @throws ApiException if the response code was not in [200, 299] - */ - public async archiveBatch(response: ResponseContext): Promise< void> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to complete - * @throws ApiException if the response code was not in [200, 299] - */ - public async complete(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventDefaultResponse", "" - ) as MarketingEventDefaultResponse; - return body; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventDefaultResponse", "" - ) as MarketingEventDefaultResponse; - return body; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to create - * @throws ApiException if the response code was not in [200, 299] - */ - public async create(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventDefaultResponse", "" - ) as MarketingEventDefaultResponse; - return body; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventDefaultResponse", "" - ) as MarketingEventDefaultResponse; - return body; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doCancel - * @throws ApiException if the response code was not in [200, 299] - */ - public async doCancel(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: MarketingEventDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventDefaultResponse", "" - ) as MarketingEventDefaultResponse; - return body; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); } // Work around for missing responses in specification, e.g. for petstore.yaml @@ -810,198 +122,4 @@ export class MarketingEventsExternalApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doEmailUpsertById - * @throws ApiException if the response code was not in [200, 299] - */ - public async doEmailUpsertById(response: ResponseContext): Promise< void> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doUpsert - * @throws ApiException if the response code was not in [200, 299] - */ - public async doUpsert(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: BatchResponseMarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseMarketingEventPublicDefaultResponse", "" - ) as BatchResponseMarketingEventPublicDefaultResponse; - return body; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: BatchResponseMarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "BatchResponseMarketingEventPublicDefaultResponse", "" - ) as BatchResponseMarketingEventPublicDefaultResponse; - return body; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to doUpsertById - * @throws ApiException if the response code was not in [200, 299] - */ - public async doUpsertById(response: ResponseContext): Promise< void> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getById - * @throws ApiException if the response code was not in [200, 299] - */ - public async getById(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: MarketingEventPublicReadResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventPublicReadResponse", "" - ) as MarketingEventPublicReadResponse; - return body; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: MarketingEventPublicReadResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventPublicReadResponse", "" - ) as MarketingEventPublicReadResponse; - return body; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to replace - * @throws ApiException if the response code was not in [200, 299] - */ - public async replace(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventPublicDefaultResponse", "" - ) as MarketingEventPublicDefaultResponse; - return body; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventPublicDefaultResponse", "" - ) as MarketingEventPublicDefaultResponse; - return body; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to update - * @throws ApiException if the response code was not in [200, 299] - */ - public async update(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventPublicDefaultResponse", "" - ) as MarketingEventPublicDefaultResponse; - return body; - } - if (isCodeInRange("0", response.httpStatusCode)) { - const body: Error = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Error", "" - ) as Error; - throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: MarketingEventPublicDefaultResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "MarketingEventPublicDefaultResponse", "" - ) as MarketingEventPublicDefaultResponse; - return body; - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - } diff --git a/codegen/marketing/events/apis/SettingsExternalApi.ts b/codegen/marketing/events/apis/SettingsApi.ts similarity index 90% rename from codegen/marketing/events/apis/SettingsExternalApi.ts rename to codegen/marketing/events/apis/SettingsApi.ts index d81b6ce7e..218c15701 100644 --- a/codegen/marketing/events/apis/SettingsExternalApi.ts +++ b/codegen/marketing/events/apis/SettingsApi.ts @@ -14,24 +14,26 @@ import { EventDetailSettingsUrl } from '../models/EventDetailSettingsUrl'; /** * no description */ -export class SettingsExternalApiRequestFactory extends BaseAPIRequestFactory { +export class SettingsApiRequestFactory extends BaseAPIRequestFactory { /** - * @param appId - * @param eventDetailSettingsUrl + * Create or update the current settings for the application. + * Update the application settings + * @param appId The id of the application to update the settings for. + * @param eventDetailSettingsUrl The new application settings */ public async create(appId: number, eventDetailSettingsUrl: EventDetailSettingsUrl, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("SettingsExternalApi", "create", "appId"); + throw new RequiredError("SettingsApi", "create", "appId"); } // verify required parameter 'eventDetailSettingsUrl' is not null or undefined if (eventDetailSettingsUrl === null || eventDetailSettingsUrl === undefined) { - throw new RequiredError("SettingsExternalApi", "create", "eventDetailSettingsUrl"); + throw new RequiredError("SettingsApi", "create", "eventDetailSettingsUrl"); } @@ -71,14 +73,16 @@ export class SettingsExternalApiRequestFactory extends BaseAPIRequestFactory { } /** - * @param appId + * Retrieve the current settings for the application. + * Retrieve the application settings + * @param appId The id of the application to retrieve the settings for. */ public async getAll(appId: number, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'appId' is not null or undefined if (appId === null || appId === undefined) { - throw new RequiredError("SettingsExternalApi", "getAll", "appId"); + throw new RequiredError("SettingsApi", "getAll", "appId"); } @@ -108,7 +112,7 @@ export class SettingsExternalApiRequestFactory extends BaseAPIRequestFactory { } -export class SettingsExternalApiResponseProcessor { +export class SettingsApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content diff --git a/codegen/marketing/events/apis/SubscriberStateChangesApi.ts b/codegen/marketing/events/apis/SubscriberStateChangesApi.ts new file mode 100644 index 000000000..7cd215d48 --- /dev/null +++ b/codegen/marketing/events/apis/SubscriberStateChangesApi.ts @@ -0,0 +1,225 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import { isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { BatchInputMarketingEventEmailSubscriber } from '../models/BatchInputMarketingEventEmailSubscriber'; +import { BatchInputMarketingEventSubscriber } from '../models/BatchInputMarketingEventSubscriber'; + +/** + * no description + */ +export class SubscriberStateChangesApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. Note that the contact must already exist in HubSpot; a contact will not be created. + * Record + * @param externalEventId The id of the marketing event + * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event + * @param externalAccountId The account id associated with the marketing event + * @param batchInputMarketingEventEmailSubscriber The details of the contacts to subscribe to the event + */ + public async doEmailUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'externalEventId' is not null or undefined + if (externalEventId === null || externalEventId === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doEmailUpsertById", "externalEventId"); + } + + + // verify required parameter 'subscriberState' is not null or undefined + if (subscriberState === null || subscriberState === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doEmailUpsertById", "subscriberState"); + } + + + // verify required parameter 'externalAccountId' is not null or undefined + if (externalAccountId === null || externalAccountId === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doEmailUpsertById", "externalAccountId"); + } + + + // verify required parameter 'batchInputMarketingEventEmailSubscriber' is not null or undefined + if (batchInputMarketingEventEmailSubscriber === null || batchInputMarketingEventEmailSubscriber === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doEmailUpsertById", "batchInputMarketingEventEmailSubscriber"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/email-upsert' + .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))) + .replace('{' + 'subscriberState' + '}', encodeURIComponent(String(subscriberState))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (externalAccountId !== undefined) { + requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); + } + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputMarketingEventEmailSubscriber, "BatchInputMarketingEventEmailSubscriber", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using HubSpot contact ids. Note that the contact must already exist in HubSpot; a contact will not be create. + * Record + * @param externalEventId The id of the marketing event + * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event + * @param externalAccountId The account id associated with the marketing event + * @param batchInputMarketingEventSubscriber The details of the contacts to subscribe to the event + */ + public async doUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'externalEventId' is not null or undefined + if (externalEventId === null || externalEventId === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doUpsertById", "externalEventId"); + } + + + // verify required parameter 'subscriberState' is not null or undefined + if (subscriberState === null || subscriberState === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doUpsertById", "subscriberState"); + } + + + // verify required parameter 'externalAccountId' is not null or undefined + if (externalAccountId === null || externalAccountId === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doUpsertById", "externalAccountId"); + } + + + // verify required parameter 'batchInputMarketingEventSubscriber' is not null or undefined + if (batchInputMarketingEventSubscriber === null || batchInputMarketingEventSubscriber === undefined) { + throw new RequiredError("SubscriberStateChangesApi", "doUpsertById", "batchInputMarketingEventSubscriber"); + } + + + // Path Params + const localVarPath = '/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert' + .replace('{' + 'externalEventId' + '}', encodeURIComponent(String(externalEventId))) + .replace('{' + 'subscriberState' + '}', encodeURIComponent(String(subscriberState))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (externalAccountId !== undefined) { + requestContext.setQueryParam("externalAccountId", ObjectSerializer.serialize(externalAccountId, "string", "")); + } + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(batchInputMarketingEventSubscriber, "BatchInputMarketingEventSubscriber", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["oauth2"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class SubscriberStateChangesApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to doEmailUpsertById + * @throws ApiException if the response code was not in [200, 299] + */ + public async doEmailUpsertById(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to doUpsertById + * @throws ApiException if the response code was not in [200, 299] + */ + public async doUpsertById(response: ResponseContext): Promise< void> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("0", response.httpStatusCode)) { + const body: Error = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Error", "" + ) as Error; + throw new ApiException(response.httpStatusCode, "An error occurred.", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/codegen/marketing/events/index.ts b/codegen/marketing/events/index.ts index 17fa09179..abcbb417d 100644 --- a/codegen/marketing/events/index.ts +++ b/codegen/marketing/events/index.ts @@ -8,5 +8,5 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseAttendanceSubscriberStateChangesApi as AttendanceSubscriberStateChangesApi, PromiseMarketingEventsExternalApi as MarketingEventsExternalApi, PromiseSearchApi as SearchApi, PromiseSettingsExternalApi as SettingsExternalApi } from './types/PromiseAPI'; +export { PromiseAttendanceSubscriberStateChangesApi as AttendanceSubscriberStateChangesApi, PromiseBasicApi as BasicApi, PromiseBatchApi as BatchApi, PromiseMarketingEventsExternalApi as MarketingEventsExternalApi, PromiseSearchApi as SearchApi, PromiseSettingsApi as SettingsApi, PromiseSubscriberStateChangesApi as SubscriberStateChangesApi } from './types/PromiseAPI'; diff --git a/codegen/marketing/events/models/BatchResponseMarketingEventPublicDefaultResponse.ts b/codegen/marketing/events/models/BatchResponseMarketingEventPublicDefaultResponse.ts index 26c2b535d..893e0835c 100644 --- a/codegen/marketing/events/models/BatchResponseMarketingEventPublicDefaultResponse.ts +++ b/codegen/marketing/events/models/BatchResponseMarketingEventPublicDefaultResponse.ts @@ -14,29 +14,23 @@ import { MarketingEventPublicDefaultResponse } from '../models/MarketingEventPub import { StandardError } from '../models/StandardError'; export class BatchResponseMarketingEventPublicDefaultResponse { - 'status': BatchResponseMarketingEventPublicDefaultResponseStatusEnum; - 'results': Array; + 'completedAt': Date; 'numErrors'?: number; - 'errors'?: Array; 'requestedAt'?: Date; 'startedAt': Date; - 'completedAt': Date; 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseMarketingEventPublicDefaultResponseStatusEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "status", - "baseName": "status", - "type": "BatchResponseMarketingEventPublicDefaultResponseStatusEnum", - "format": "" - }, - { - "name": "results", - "baseName": "results", - "type": "Array", - "format": "" + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" }, { "name": "numErrors", @@ -44,12 +38,6 @@ export class BatchResponseMarketingEventPublicDefaultResponse { "type": "number", "format": "int32" }, - { - "name": "errors", - "baseName": "errors", - "type": "Array", - "format": "" - }, { "name": "requestedAt", "baseName": "requestedAt", @@ -62,17 +50,29 @@ export class BatchResponseMarketingEventPublicDefaultResponse { "type": "Date", "format": "date-time" }, - { - "name": "completedAt", - "baseName": "completedAt", - "type": "Date", - "format": "date-time" - }, { "name": "links", "baseName": "links", "type": "{ [key: string]: string; }", "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseMarketingEventPublicDefaultResponseStatusEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/BatchResponseSubscriberEmailResponse.ts b/codegen/marketing/events/models/BatchResponseSubscriberEmailResponse.ts index e78127b8b..ff2970795 100644 --- a/codegen/marketing/events/models/BatchResponseSubscriberEmailResponse.ts +++ b/codegen/marketing/events/models/BatchResponseSubscriberEmailResponse.ts @@ -14,29 +14,23 @@ import { StandardError } from '../models/StandardError'; import { SubscriberEmailResponse } from '../models/SubscriberEmailResponse'; export class BatchResponseSubscriberEmailResponse { - 'status': BatchResponseSubscriberEmailResponseStatusEnum; - 'results': Array; + 'completedAt': Date; 'numErrors'?: number; - 'errors'?: Array; 'requestedAt'?: Date; 'startedAt': Date; - 'completedAt': Date; 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSubscriberEmailResponseStatusEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "status", - "baseName": "status", - "type": "BatchResponseSubscriberEmailResponseStatusEnum", - "format": "" - }, - { - "name": "results", - "baseName": "results", - "type": "Array", - "format": "" + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" }, { "name": "numErrors", @@ -44,12 +38,6 @@ export class BatchResponseSubscriberEmailResponse { "type": "number", "format": "int32" }, - { - "name": "errors", - "baseName": "errors", - "type": "Array", - "format": "" - }, { "name": "requestedAt", "baseName": "requestedAt", @@ -62,17 +50,29 @@ export class BatchResponseSubscriberEmailResponse { "type": "Date", "format": "date-time" }, - { - "name": "completedAt", - "baseName": "completedAt", - "type": "Date", - "format": "date-time" - }, { "name": "links", "baseName": "links", "type": "{ [key: string]: string; }", "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSubscriberEmailResponseStatusEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/BatchResponseSubscriberVidResponse.ts b/codegen/marketing/events/models/BatchResponseSubscriberVidResponse.ts index bbcb7795f..3da8f9e1b 100644 --- a/codegen/marketing/events/models/BatchResponseSubscriberVidResponse.ts +++ b/codegen/marketing/events/models/BatchResponseSubscriberVidResponse.ts @@ -14,29 +14,23 @@ import { StandardError } from '../models/StandardError'; import { SubscriberVidResponse } from '../models/SubscriberVidResponse'; export class BatchResponseSubscriberVidResponse { - 'status': BatchResponseSubscriberVidResponseStatusEnum; - 'results': Array; + 'completedAt': Date; 'numErrors'?: number; - 'errors'?: Array; 'requestedAt'?: Date; 'startedAt': Date; - 'completedAt': Date; 'links'?: { [key: string]: string; }; + 'results': Array; + 'errors'?: Array; + 'status': BatchResponseSubscriberVidResponseStatusEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "status", - "baseName": "status", - "type": "BatchResponseSubscriberVidResponseStatusEnum", - "format": "" - }, - { - "name": "results", - "baseName": "results", - "type": "Array", - "format": "" + "name": "completedAt", + "baseName": "completedAt", + "type": "Date", + "format": "date-time" }, { "name": "numErrors", @@ -44,12 +38,6 @@ export class BatchResponseSubscriberVidResponse { "type": "number", "format": "int32" }, - { - "name": "errors", - "baseName": "errors", - "type": "Array", - "format": "" - }, { "name": "requestedAt", "baseName": "requestedAt", @@ -62,17 +50,29 @@ export class BatchResponseSubscriberVidResponse { "type": "Date", "format": "date-time" }, - { - "name": "completedAt", - "baseName": "completedAt", - "type": "Date", - "format": "date-time" - }, { "name": "links", "baseName": "links", "type": "{ [key: string]: string; }", "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "BatchResponseSubscriberVidResponseStatusEnum", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/ErrorCategory.ts b/codegen/marketing/events/models/ErrorCategory.ts deleted file mode 100644 index 30d65381c..000000000 --- a/codegen/marketing/events/models/ErrorCategory.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Marketing Events Extension - * These APIs allow you to interact with HubSpot's Marketing Events Extension. It allows you to: * Create, Read or update Marketing Event information in HubSpot * Specify whether a HubSpot contact has registered, attended or cancelled a registration to a Marketing Event. * Specify a URL that can be called to get the details of a Marketing Event. - * - * OpenAPI spec version: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export class ErrorCategory { - 'name': string; - 'httpStatus': ErrorCategoryHttpStatusEnum; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "httpStatus", - "baseName": "httpStatus", - "type": "ErrorCategoryHttpStatusEnum", - "format": "" - } ]; - - static getAttributeTypeMap() { - return ErrorCategory.attributeTypeMap; - } - - public constructor() { - } -} - - -export type ErrorCategoryHttpStatusEnum = "CONTINUE" | "SWITCHING_PROTOCOLS" | "PROCESSING" | "OK" | "CREATED" | "ACCEPTED" | "NON_AUTHORITATIVE_INFORMATION" | "NO_CONTENT" | "RESET_CONTENT" | "PARTIAL_CONTENT" | "MULTI_STATUS" | "ALREADY_REPORTED" | "IM_USED" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "USE_PROXY" | "TEMPORARY_REDIRECT" | "PERMANENT_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "REQUEST_ENTITY_TOO_LARGE" | "REQUEST_URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "REQUESTED_RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "IM_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADERS_FIELDS_TOO_LARGE" | "INTERNAL_STALE_SERVICE_DISCOVERY" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "MIGRATION_IN_PROGRESS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED" ; - diff --git a/codegen/marketing/events/models/ErrorDetail.ts b/codegen/marketing/events/models/ErrorDetail.ts index ed6960a85..cf4bf6769 100644 --- a/codegen/marketing/events/models/ErrorDetail.ts +++ b/codegen/marketing/events/models/ErrorDetail.ts @@ -13,38 +13,32 @@ export class ErrorDetail { /** - * A human readable message describing the error along with remediation steps where appropriate - */ - 'message': string; - /** - * The name of the field or parameter in which the error was found. + * A specific category that contains more specific detail about the error */ - '_in'?: string; + 'subCategory'?: string; /** * The status code associated with the error detail */ 'code'?: string; /** - * A specific category that contains more specific detail about the error + * The name of the field or parameter in which the error was found. */ - 'subCategory'?: string; + '_in'?: string; /** * Context about the error condition */ 'context'?: { [key: string]: Array; }; + /** + * A human readable message describing the error along with remediation steps where appropriate + */ + 'message': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "message", - "baseName": "message", - "type": "string", - "format": "" - }, - { - "name": "_in", - "baseName": "in", + "name": "subCategory", + "baseName": "subCategory", "type": "string", "format": "" }, @@ -55,8 +49,8 @@ export class ErrorDetail { "format": "" }, { - "name": "subCategory", - "baseName": "subCategory", + "name": "_in", + "baseName": "in", "type": "string", "format": "" }, @@ -65,6 +59,12 @@ export class ErrorDetail { "baseName": "context", "type": "{ [key: string]: Array; }", "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/MarketingEventCreateRequestParams.ts b/codegen/marketing/events/models/MarketingEventCreateRequestParams.ts index e47b41edd..a1360af60 100644 --- a/codegen/marketing/events/models/MarketingEventCreateRequestParams.ts +++ b/codegen/marketing/events/models/MarketingEventCreateRequestParams.ts @@ -14,65 +14,53 @@ import { PropertyValue } from '../models/PropertyValue'; export class MarketingEventCreateRequestParams { /** - * The name of the marketing event. + * The start date and time of the marketing event. */ - 'eventName': string; + 'startDateTime'?: Date; /** - * Describes what type of event this is. For example: `WEBINAR`, `CONFERENCE`, `WORKSHOP` + * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. */ - 'eventType'?: string; + 'customProperties'?: Array; /** - * The start date and time of the marketing event. + * The accountId that is associated with this marketing event in the external event application. */ - 'startDateTime'?: Date; + 'externalAccountId': string; /** - * The end date and time of the marketing event. + * Indicates if the marketing event has been cancelled. Defaults to `false` */ - 'endDateTime'?: Date; + 'eventCancelled'?: boolean; /** * The name of the organizer of the marketing event. */ 'eventOrganizer': string; /** - * The description of the marketing event. - */ - 'eventDescription'?: string; - /** * A URL in the external event application where the marketing event can be managed. */ 'eventUrl'?: string; /** - * Indicates if the marketing event has been cancelled. Defaults to `false` + * The id of the marketing event in the external event application. */ - 'eventCancelled'?: boolean; + 'externalEventId': string; /** - * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. + * The description of the marketing event. */ - 'customProperties'?: Array; + 'eventDescription'?: string; /** - * The accountId that is associated with this marketing event in the external event application. + * The name of the marketing event. */ - 'externalAccountId': string; + 'eventName': string; /** - * The id of the marketing event in the external event application. + * Describes what type of event this is. For example: `WEBINAR`, `CONFERENCE`, `WORKSHOP` */ - 'externalEventId': string; + 'eventType'?: string; + /** + * The end date and time of the marketing event. + */ + 'endDateTime'?: Date; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "eventName", - "baseName": "eventName", - "type": "string", - "format": "" - }, - { - "name": "eventType", - "baseName": "eventType", - "type": "string", - "format": "" - }, { "name": "startDateTime", "baseName": "startDateTime", @@ -80,20 +68,26 @@ export class MarketingEventCreateRequestParams { "format": "date-time" }, { - "name": "endDateTime", - "baseName": "endDateTime", - "type": "Date", - "format": "date-time" + "name": "customProperties", + "baseName": "customProperties", + "type": "Array", + "format": "" }, { - "name": "eventOrganizer", - "baseName": "eventOrganizer", + "name": "externalAccountId", + "baseName": "externalAccountId", "type": "string", "format": "" }, { - "name": "eventDescription", - "baseName": "eventDescription", + "name": "eventCancelled", + "baseName": "eventCancelled", + "type": "boolean", + "format": "" + }, + { + "name": "eventOrganizer", + "baseName": "eventOrganizer", "type": "string", "format": "" }, @@ -104,28 +98,34 @@ export class MarketingEventCreateRequestParams { "format": "" }, { - "name": "eventCancelled", - "baseName": "eventCancelled", - "type": "boolean", + "name": "externalEventId", + "baseName": "externalEventId", + "type": "string", "format": "" }, { - "name": "customProperties", - "baseName": "customProperties", - "type": "Array", + "name": "eventDescription", + "baseName": "eventDescription", + "type": "string", "format": "" }, { - "name": "externalAccountId", - "baseName": "externalAccountId", + "name": "eventName", + "baseName": "eventName", "type": "string", "format": "" }, { - "name": "externalEventId", - "baseName": "externalEventId", + "name": "eventType", + "baseName": "eventType", "type": "string", "format": "" + }, + { + "name": "endDateTime", + "baseName": "endDateTime", + "type": "Date", + "format": "date-time" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/MarketingEventDefaultResponse.ts b/codegen/marketing/events/models/MarketingEventDefaultResponse.ts index c776dc3a9..badac1117 100644 --- a/codegen/marketing/events/models/MarketingEventDefaultResponse.ts +++ b/codegen/marketing/events/models/MarketingEventDefaultResponse.ts @@ -13,58 +13,46 @@ import { PropertyValue } from '../models/PropertyValue'; export class MarketingEventDefaultResponse { - /** - * The name of the marketing event. - */ - 'eventName': string; - /** - * The type of the marketing event. - */ - 'eventType'?: string; /** * The start date and time of the marketing event. */ 'startDateTime'?: Date; /** - * The end date and time of the marketing event. + * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. */ - 'endDateTime'?: Date; + 'customProperties'?: Array; + /** + * Indicates if the marketing event has been cancelled. + */ + 'eventCancelled'?: boolean; /** * The name of the organizer of the marketing event. */ 'eventOrganizer': string; /** + * The URL in the external event application where the marketing event can be managed. + */ + 'eventUrl'?: string; + /** * The description of the marketing event. */ 'eventDescription'?: string; /** - * The URL in the external event application where the marketing event can be managed. + * The name of the marketing event. */ - 'eventUrl'?: string; + 'eventName': string; /** - * Indicates if the marketing event has been cancelled. + * The type of the marketing event. */ - 'eventCancelled'?: boolean; + 'eventType'?: string; /** - * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. + * The end date and time of the marketing event. */ - 'customProperties'?: Array; + 'endDateTime'?: Date; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "eventName", - "baseName": "eventName", - "type": "string", - "format": "" - }, - { - "name": "eventType", - "baseName": "eventType", - "type": "string", - "format": "" - }, { "name": "startDateTime", "baseName": "startDateTime", @@ -72,10 +60,16 @@ export class MarketingEventDefaultResponse { "format": "date-time" }, { - "name": "endDateTime", - "baseName": "endDateTime", - "type": "Date", - "format": "date-time" + "name": "customProperties", + "baseName": "customProperties", + "type": "Array", + "format": "" + }, + { + "name": "eventCancelled", + "baseName": "eventCancelled", + "type": "boolean", + "format": "" }, { "name": "eventOrganizer", @@ -83,6 +77,12 @@ export class MarketingEventDefaultResponse { "type": "string", "format": "" }, + { + "name": "eventUrl", + "baseName": "eventUrl", + "type": "string", + "format": "" + }, { "name": "eventDescription", "baseName": "eventDescription", @@ -90,22 +90,22 @@ export class MarketingEventDefaultResponse { "format": "" }, { - "name": "eventUrl", - "baseName": "eventUrl", + "name": "eventName", + "baseName": "eventName", "type": "string", "format": "" }, { - "name": "eventCancelled", - "baseName": "eventCancelled", - "type": "boolean", + "name": "eventType", + "baseName": "eventType", + "type": "string", "format": "" }, { - "name": "customProperties", - "baseName": "customProperties", - "type": "Array", - "format": "" + "name": "endDateTime", + "baseName": "endDateTime", + "type": "Date", + "format": "date-time" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/MarketingEventEmailSubscriber.ts b/codegen/marketing/events/models/MarketingEventEmailSubscriber.ts index 286449e3c..3b79972ff 100644 --- a/codegen/marketing/events/models/MarketingEventEmailSubscriber.ts +++ b/codegen/marketing/events/models/MarketingEventEmailSubscriber.ts @@ -12,25 +12,25 @@ export class MarketingEventEmailSubscriber { - /** - * The date and time at which the contact subscribed to the event. - */ - 'interactionDateTime': number; + 'contactProperties'?: { [key: string]: string; }; 'properties'?: { [key: string]: string; }; /** - * The email address of the contact in HubSpot to associate with the event. Note that the contact must already exist in HubSpot; a contact will not be created. + * The email address of the contact in HubSpot to associate with the event. */ 'email': string; - 'contactProperties'?: { [key: string]: string; }; + /** + * The date and time at which the contact subscribed to the event. + */ + 'interactionDateTime': number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "interactionDateTime", - "baseName": "interactionDateTime", - "type": "number", - "format": "int64" + "name": "contactProperties", + "baseName": "contactProperties", + "type": "{ [key: string]: string; }", + "format": "" }, { "name": "properties", @@ -45,10 +45,10 @@ export class MarketingEventEmailSubscriber { "format": "" }, { - "name": "contactProperties", - "baseName": "contactProperties", - "type": "{ [key: string]: string; }", - "format": "" + "name": "interactionDateTime", + "baseName": "interactionDateTime", + "type": "number", + "format": "int64" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/MarketingEventExternalUniqueIdentifier.ts b/codegen/marketing/events/models/MarketingEventExternalUniqueIdentifier.ts index d80788389..0acd94a60 100644 --- a/codegen/marketing/events/models/MarketingEventExternalUniqueIdentifier.ts +++ b/codegen/marketing/events/models/MarketingEventExternalUniqueIdentifier.ts @@ -12,10 +12,6 @@ export class MarketingEventExternalUniqueIdentifier { - /** - * The id of the application that created the marketing event in HubSpot. - */ - 'appId': number; /** * The accountId that is associated with this marketing event in the external event application. */ @@ -24,16 +20,14 @@ export class MarketingEventExternalUniqueIdentifier { * The id of the marketing event in the external event application. */ 'externalEventId': string; + /** + * The id of the application that created the marketing event in HubSpot. + */ + 'appId': number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "appId", - "baseName": "appId", - "type": "number", - "format": "int32" - }, { "name": "externalAccountId", "baseName": "externalAccountId", @@ -45,6 +39,12 @@ export class MarketingEventExternalUniqueIdentifier { "baseName": "externalEventId", "type": "string", "format": "" + }, + { + "name": "appId", + "baseName": "appId", + "type": "number", + "format": "int32" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/MarketingEventPublicDefaultResponse.ts b/codegen/marketing/events/models/MarketingEventPublicDefaultResponse.ts index 3f4eb7aac..fce82bad4 100644 --- a/codegen/marketing/events/models/MarketingEventPublicDefaultResponse.ts +++ b/codegen/marketing/events/models/MarketingEventPublicDefaultResponse.ts @@ -13,60 +13,54 @@ import { PropertyValue } from '../models/PropertyValue'; export class MarketingEventPublicDefaultResponse { - /** - * The name of the marketing event. - */ - 'eventName': string; - /** - * The type of the marketing event. - */ - 'eventType'?: string; + 'createdAt': Date; /** * The start date and time of the marketing event. */ 'startDateTime'?: Date; /** - * The end date and time of the marketing event. + * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. */ - 'endDateTime'?: Date; + 'customProperties'?: Array; + /** + * Indicates if the marketing event has been cancelled. + */ + 'eventCancelled'?: boolean; /** * The name of the organizer of the marketing event. */ 'eventOrganizer': string; /** + * A URL in the external event application where the marketing event can be managed. + */ + 'eventUrl'?: string; + /** * The description of the marketing event. */ 'eventDescription'?: string; /** - * A URL in the external event application where the marketing event can be managed. + * The name of the marketing event. */ - 'eventUrl'?: string; + 'eventName': string; /** - * Indicates if the marketing event has been cancelled. + * The type of the marketing event. */ - 'eventCancelled'?: boolean; + 'eventType'?: string; + 'id': string; /** - * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. + * The end date and time of the marketing event. */ - 'customProperties'?: Array; - 'id': string; - 'createdAt': Date; + 'endDateTime'?: Date; 'updatedAt': Date; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "eventName", - "baseName": "eventName", - "type": "string", - "format": "" - }, - { - "name": "eventType", - "baseName": "eventType", - "type": "string", - "format": "" + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" }, { "name": "startDateTime", @@ -75,10 +69,16 @@ export class MarketingEventPublicDefaultResponse { "format": "date-time" }, { - "name": "endDateTime", - "baseName": "endDateTime", - "type": "Date", - "format": "date-time" + "name": "customProperties", + "baseName": "customProperties", + "type": "Array", + "format": "" + }, + { + "name": "eventCancelled", + "baseName": "eventCancelled", + "type": "boolean", + "format": "" }, { "name": "eventOrganizer", @@ -87,27 +87,27 @@ export class MarketingEventPublicDefaultResponse { "format": "" }, { - "name": "eventDescription", - "baseName": "eventDescription", + "name": "eventUrl", + "baseName": "eventUrl", "type": "string", "format": "" }, { - "name": "eventUrl", - "baseName": "eventUrl", + "name": "eventDescription", + "baseName": "eventDescription", "type": "string", "format": "" }, { - "name": "eventCancelled", - "baseName": "eventCancelled", - "type": "boolean", + "name": "eventName", + "baseName": "eventName", + "type": "string", "format": "" }, { - "name": "customProperties", - "baseName": "customProperties", - "type": "Array", + "name": "eventType", + "baseName": "eventType", + "type": "string", "format": "" }, { @@ -117,8 +117,8 @@ export class MarketingEventPublicDefaultResponse { "format": "" }, { - "name": "createdAt", - "baseName": "createdAt", + "name": "endDateTime", + "baseName": "endDateTime", "type": "Date", "format": "date-time" }, diff --git a/codegen/marketing/events/models/MarketingEventPublicReadResponse.ts b/codegen/marketing/events/models/MarketingEventPublicReadResponse.ts index 289bd5434..9e963414b 100644 --- a/codegen/marketing/events/models/MarketingEventPublicReadResponse.ts +++ b/codegen/marketing/events/models/MarketingEventPublicReadResponse.ts @@ -14,91 +14,73 @@ import { PropertyValue } from '../models/PropertyValue'; export class MarketingEventPublicReadResponse { /** - * The name of the marketing event. + * The number of HubSpot contacts that registered for this marketing event. */ - 'eventName': string; + 'registrants': number; /** - * The type of the marketing event. + * The name of the organizer of the marketing event. */ - 'eventType'?: string; + 'eventOrganizer': string; /** - * The start date and time of the marketing event. + * A URL in the external event application where the marketing event can be managed. */ - 'startDateTime'?: Date; + 'eventUrl'?: string; /** - * The end date and time of the marketing event. + * The number of HubSpot contacts that attended this marketing event. */ - 'endDateTime'?: Date; + 'attendees': number; /** - * The name of the organizer of the marketing event. + * The type of the marketing event. */ - 'eventOrganizer': string; + 'eventType'?: string; /** - * The description of the marketing event. + * The end date and time of the marketing event. */ - 'eventDescription'?: string; + 'endDateTime'?: Date; /** - * A URL in the external event application where the marketing event can be managed. + * The number of HubSpot contacts that registered for this marketing event, but did not attend. This field only had a value when the event is over. */ - 'eventUrl'?: string; + 'noShows': number; /** - * Indicates if the marketing event has been cancelled. + * The number of HubSpot contacts that registered for this marketing event, but later cancelled their registration. */ - 'eventCancelled'?: boolean; + 'cancellations': number; + 'createdAt': Date; /** - * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. + * The start date and time of the marketing event. */ - 'customProperties'?: Array; + 'startDateTime'?: Date; /** - * The id of the marketing event in the external event application. + * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. */ - 'externalEventId': string; + 'customProperties'?: Array; /** - * The number of HubSpot contacts that registered for this marketing event. + * Indicates if the marketing event has been cancelled. */ - 'registrants': number; + 'eventCancelled'?: boolean; /** - * The number of HubSpot contacts that attended this marketing event. + * The id of the marketing event in the external event application. */ - 'attendees': number; + 'externalEventId': string; /** - * The number of HubSpot contacts that registered for this marketing event, but later cancelled their registration. + * The description of the marketing event. */ - 'cancellations': number; + 'eventDescription'?: string; /** - * The number of HubSpot contacts that registered for this marketing event, but did not attend. This field only had a value when the event is over. + * The name of the marketing event. */ - 'noShows': number; - 'createdAt': Date; - 'updatedAt': Date; + 'eventName': string; 'id': string; + 'updatedAt': Date; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "eventName", - "baseName": "eventName", - "type": "string", - "format": "" - }, - { - "name": "eventType", - "baseName": "eventType", - "type": "string", - "format": "" - }, - { - "name": "startDateTime", - "baseName": "startDateTime", - "type": "Date", - "format": "date-time" - }, - { - "name": "endDateTime", - "baseName": "endDateTime", - "type": "Date", - "format": "date-time" + "name": "registrants", + "baseName": "registrants", + "type": "number", + "format": "int32" }, { "name": "eventOrganizer", @@ -106,12 +88,6 @@ export class MarketingEventPublicReadResponse { "type": "string", "format": "" }, - { - "name": "eventDescription", - "baseName": "eventDescription", - "type": "string", - "format": "" - }, { "name": "eventUrl", "baseName": "eventUrl", @@ -119,32 +95,26 @@ export class MarketingEventPublicReadResponse { "format": "" }, { - "name": "eventCancelled", - "baseName": "eventCancelled", - "type": "boolean", - "format": "" - }, - { - "name": "customProperties", - "baseName": "customProperties", - "type": "Array", - "format": "" + "name": "attendees", + "baseName": "attendees", + "type": "number", + "format": "int32" }, { - "name": "externalEventId", - "baseName": "externalEventId", + "name": "eventType", + "baseName": "eventType", "type": "string", "format": "" }, { - "name": "registrants", - "baseName": "registrants", - "type": "number", - "format": "int32" + "name": "endDateTime", + "baseName": "endDateTime", + "type": "Date", + "format": "date-time" }, { - "name": "attendees", - "baseName": "attendees", + "name": "noShows", + "baseName": "noShows", "type": "number", "format": "int32" }, @@ -154,12 +124,6 @@ export class MarketingEventPublicReadResponse { "type": "number", "format": "int32" }, - { - "name": "noShows", - "baseName": "noShows", - "type": "number", - "format": "int32" - }, { "name": "createdAt", "baseName": "createdAt", @@ -167,16 +131,52 @@ export class MarketingEventPublicReadResponse { "format": "date-time" }, { - "name": "updatedAt", - "baseName": "updatedAt", + "name": "startDateTime", + "baseName": "startDateTime", "type": "Date", "format": "date-time" }, + { + "name": "customProperties", + "baseName": "customProperties", + "type": "Array", + "format": "" + }, + { + "name": "eventCancelled", + "baseName": "eventCancelled", + "type": "boolean", + "format": "" + }, + { + "name": "externalEventId", + "baseName": "externalEventId", + "type": "string", + "format": "" + }, + { + "name": "eventDescription", + "baseName": "eventDescription", + "type": "string", + "format": "" + }, + { + "name": "eventName", + "baseName": "eventName", + "type": "string", + "format": "" + }, { "name": "id", "baseName": "id", "type": "string", "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/MarketingEventSubscriber.ts b/codegen/marketing/events/models/MarketingEventSubscriber.ts index 86d22e6a0..d86535012 100644 --- a/codegen/marketing/events/models/MarketingEventSubscriber.ts +++ b/codegen/marketing/events/models/MarketingEventSubscriber.ts @@ -12,21 +12,21 @@ export class MarketingEventSubscriber { + 'vid'?: number; + 'properties'?: { [key: string]: string; }; /** * The date and time at which the contact subscribed to the event. */ 'interactionDateTime': number; - 'properties'?: { [key: string]: string; }; - 'vid'?: number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "interactionDateTime", - "baseName": "interactionDateTime", + "name": "vid", + "baseName": "vid", "type": "number", - "format": "int64" + "format": "int32" }, { "name": "properties", @@ -35,10 +35,10 @@ export class MarketingEventSubscriber { "format": "" }, { - "name": "vid", - "baseName": "vid", + "name": "interactionDateTime", + "baseName": "interactionDateTime", "type": "number", - "format": "int32" + "format": "int64" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/MarketingEventUpdateRequestParams.ts b/codegen/marketing/events/models/MarketingEventUpdateRequestParams.ts index e25732462..a171205a3 100644 --- a/codegen/marketing/events/models/MarketingEventUpdateRequestParams.ts +++ b/codegen/marketing/events/models/MarketingEventUpdateRequestParams.ts @@ -13,58 +13,46 @@ import { PropertyValue } from '../models/PropertyValue'; export class MarketingEventUpdateRequestParams { - /** - * The name of the marketing event. - */ - 'eventName'?: string; - /** - * Describes what type of event this is. For example: `WEBINAR`, `CONFERENCE`, `WORKSHOP` - */ - 'eventType'?: string; /** * The start date and time of the marketing event. */ 'startDateTime'?: Date; /** - * The end date and time of the marketing event. + * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. */ - 'endDateTime'?: Date; + 'customProperties'?: Array; + /** + * Indicates if the marketing event has been cancelled. Defaults to `false` + */ + 'eventCancelled'?: boolean; /** * The name of the organizer of the marketing event. */ 'eventOrganizer'?: string; /** + * A URL in the external event application where the marketing event can be managed. + */ + 'eventUrl'?: string; + /** * The description of the marketing event. */ 'eventDescription'?: string; /** - * A URL in the external event application where the marketing event can be managed. + * The name of the marketing event. */ - 'eventUrl'?: string; + 'eventName'?: string; /** - * Indicates if the marketing event has been cancelled. Defaults to `false` + * Describes what type of event this is. For example: `WEBINAR`, `CONFERENCE`, `WORKSHOP` */ - 'eventCancelled'?: boolean; + 'eventType'?: string; /** - * A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. + * The end date and time of the marketing event. */ - 'customProperties'?: Array; + 'endDateTime'?: Date; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "eventName", - "baseName": "eventName", - "type": "string", - "format": "" - }, - { - "name": "eventType", - "baseName": "eventType", - "type": "string", - "format": "" - }, { "name": "startDateTime", "baseName": "startDateTime", @@ -72,10 +60,16 @@ export class MarketingEventUpdateRequestParams { "format": "date-time" }, { - "name": "endDateTime", - "baseName": "endDateTime", - "type": "Date", - "format": "date-time" + "name": "customProperties", + "baseName": "customProperties", + "type": "Array", + "format": "" + }, + { + "name": "eventCancelled", + "baseName": "eventCancelled", + "type": "boolean", + "format": "" }, { "name": "eventOrganizer", @@ -83,6 +77,12 @@ export class MarketingEventUpdateRequestParams { "type": "string", "format": "" }, + { + "name": "eventUrl", + "baseName": "eventUrl", + "type": "string", + "format": "" + }, { "name": "eventDescription", "baseName": "eventDescription", @@ -90,22 +90,22 @@ export class MarketingEventUpdateRequestParams { "format": "" }, { - "name": "eventUrl", - "baseName": "eventUrl", + "name": "eventName", + "baseName": "eventName", "type": "string", "format": "" }, { - "name": "eventCancelled", - "baseName": "eventCancelled", - "type": "boolean", + "name": "eventType", + "baseName": "eventType", + "type": "string", "format": "" }, { - "name": "customProperties", - "baseName": "customProperties", - "type": "Array", - "format": "" + "name": "endDateTime", + "baseName": "endDateTime", + "type": "Date", + "format": "date-time" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/ModelError.ts b/codegen/marketing/events/models/ModelError.ts index b33d3a247..98d7d8478 100644 --- a/codegen/marketing/events/models/ModelError.ts +++ b/codegen/marketing/events/models/ModelError.ts @@ -14,43 +14,49 @@ import { ErrorDetail } from '../models/ErrorDetail'; export class ModelError { /** - * A human readable message describing the error along with remediation steps where appropriate + * A specific category that contains more specific detail about the error */ - 'message': string; + 'subCategory'?: string; /** - * A unique identifier for the request. Include this value with any error reports or support tickets + * Context about the error condition */ - 'correlationId': string; + 'context'?: { [key: string]: Array; }; /** - * The error category + * A unique identifier for the request. Include this value with any error reports or support tickets */ - 'category': string; + 'correlationId': string; /** - * A specific category that contains more specific detail about the error + * A map of link names to associated URIs containing documentation about the error or recommended remediation steps */ - 'subCategory'?: string; + 'links'?: { [key: string]: string; }; /** - * further information about the error + * A human readable message describing the error along with remediation steps where appropriate */ - 'errors'?: Array; + 'message': string; /** - * Context about the error condition + * The error category */ - 'context'?: { [key: string]: Array; }; + 'category': string; /** - * A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * further information about the error */ - 'links'?: { [key: string]: string; }; + 'errors'?: Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "message", - "baseName": "message", + "name": "subCategory", + "baseName": "subCategory", "type": "string", "format": "" }, + { + "name": "context", + "baseName": "context", + "type": "{ [key: string]: Array; }", + "format": "" + }, { "name": "correlationId", "baseName": "correlationId", @@ -58,14 +64,20 @@ export class ModelError { "format": "uuid" }, { - "name": "category", - "baseName": "category", + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "message", + "baseName": "message", "type": "string", "format": "" }, { - "name": "subCategory", - "baseName": "subCategory", + "name": "category", + "baseName": "category", "type": "string", "format": "" }, @@ -74,18 +86,6 @@ export class ModelError { "baseName": "errors", "type": "Array", "format": "" - }, - { - "name": "context", - "baseName": "context", - "type": "{ [key: string]: Array; }", - "format": "" - }, - { - "name": "links", - "baseName": "links", - "type": "{ [key: string]: string; }", - "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/marketing/events/models/ObjectSerializer.ts b/codegen/marketing/events/models/ObjectSerializer.ts index d0b3970bf..72bb61fdd 100644 --- a/codegen/marketing/events/models/ObjectSerializer.ts +++ b/codegen/marketing/events/models/ObjectSerializer.ts @@ -6,7 +6,6 @@ export * from '../models/BatchResponseMarketingEventPublicDefaultResponse'; export * from '../models/BatchResponseSubscriberEmailResponse'; export * from '../models/BatchResponseSubscriberVidResponse'; export * from '../models/CollectionResponseMarketingEventExternalUniqueIdentifierNoPaging'; -export * from '../models/ErrorCategory'; export * from '../models/ErrorDetail'; export * from '../models/EventDetailSettings'; export * from '../models/EventDetailSettingsUrl'; @@ -33,7 +32,6 @@ import { BatchResponseMarketingEventPublicDefaultResponse } from '../mo import { BatchResponseSubscriberEmailResponse } from '../models/BatchResponseSubscriberEmailResponse'; import { BatchResponseSubscriberVidResponse } from '../models/BatchResponseSubscriberVidResponse'; import { CollectionResponseMarketingEventExternalUniqueIdentifierNoPaging } from '../models/CollectionResponseMarketingEventExternalUniqueIdentifierNoPaging'; -import { ErrorCategory } from '../models/ErrorCategory'; import { ErrorDetail } from '../models/ErrorDetail'; import { EventDetailSettings } from '../models/EventDetailSettings'; import { EventDetailSettingsUrl } from '../models/EventDetailSettingsUrl'; @@ -47,7 +45,7 @@ import { MarketingEventPublicReadResponse } from '../models/MarketingEventPublic import { MarketingEventSubscriber } from '../models/MarketingEventSubscriber'; import { MarketingEventUpdateRequestParams } from '../models/MarketingEventUpdateRequestParams'; import { ModelError } from '../models/ModelError'; -import { PropertyValue } from '../models/PropertyValue'; +import { PropertyValue } from '../models/PropertyValue'; import { StandardError } from '../models/StandardError'; import { SubscriberEmailResponse } from '../models/SubscriberEmailResponse'; import { SubscriberVidResponse } from '../models/SubscriberVidResponse'; @@ -75,7 +73,6 @@ let enumsMap: Set = new Set([ "BatchResponseMarketingEventPublicDefaultResponseStatusEnum", "BatchResponseSubscriberEmailResponseStatusEnum", "BatchResponseSubscriberVidResponseStatusEnum", - "ErrorCategoryHttpStatusEnum", "PropertyValueSourceEnum", ]); @@ -88,7 +85,6 @@ let typeMap: {[index: string]: any} = { "BatchResponseSubscriberEmailResponse": BatchResponseSubscriberEmailResponse, "BatchResponseSubscriberVidResponse": BatchResponseSubscriberVidResponse, "CollectionResponseMarketingEventExternalUniqueIdentifierNoPaging": CollectionResponseMarketingEventExternalUniqueIdentifierNoPaging, - "ErrorCategory": ErrorCategory, "ErrorDetail": ErrorDetail, "EventDetailSettings": EventDetailSettings, "EventDetailSettingsUrl": EventDetailSettingsUrl, diff --git a/codegen/marketing/events/models/PropertyValue.ts b/codegen/marketing/events/models/PropertyValue.ts index 1ba10a7a7..69959a4d2 100644 --- a/codegen/marketing/events/models/PropertyValue.ts +++ b/codegen/marketing/events/models/PropertyValue.ts @@ -12,49 +12,38 @@ export class PropertyValue { - 'name': string; - 'value': string; - 'timestamp': number; 'sourceId': string; + 'selectedByUser': boolean; 'sourceLabel': string; 'source': PropertyValueSourceEnum; - 'selectedByUser': boolean; - 'selectedByUserTimestamp': number; - 'sourceVid': Array; + 'updatedByUserId'?: number; + 'persistenceTimestamp'?: number; /** * Source metadata encoded as a base64 string. For example: `ZXhhbXBsZSBzdHJpbmc=` */ 'sourceMetadata': string; + 'sourceVid': Array; 'requestId': string; - 'updatedByUserId'?: number; - 'persistenceTimestamp'?: number; + 'name': string; 'useTimestampAsPersistenceTimestamp'?: boolean; + 'value': string; + 'selectedByUserTimestamp': number; + 'timestamp': number; + 'isLargeValue'?: boolean; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "name", - "baseName": "name", - "type": "string", - "format": "" - }, - { - "name": "value", - "baseName": "value", + "name": "sourceId", + "baseName": "sourceId", "type": "string", "format": "" }, { - "name": "timestamp", - "baseName": "timestamp", - "type": "number", - "format": "int64" - }, - { - "name": "sourceId", - "baseName": "sourceId", - "type": "string", + "name": "selectedByUser", + "baseName": "selectedByUser", + "type": "boolean", "format": "" }, { @@ -70,17 +59,23 @@ export class PropertyValue { "format": "" }, { - "name": "selectedByUser", - "baseName": "selectedByUser", - "type": "boolean", - "format": "" + "name": "updatedByUserId", + "baseName": "updatedByUserId", + "type": "number", + "format": "int32" }, { - "name": "selectedByUserTimestamp", - "baseName": "selectedByUserTimestamp", + "name": "persistenceTimestamp", + "baseName": "persistenceTimestamp", "type": "number", "format": "int64" }, + { + "name": "sourceMetadata", + "baseName": "sourceMetadata", + "type": "string", + "format": "" + }, { "name": "sourceVid", "baseName": "sourceVid", @@ -88,32 +83,44 @@ export class PropertyValue { "format": "int64" }, { - "name": "sourceMetadata", - "baseName": "sourceMetadata", + "name": "requestId", + "baseName": "requestId", "type": "string", "format": "" }, { - "name": "requestId", - "baseName": "requestId", + "name": "name", + "baseName": "name", "type": "string", "format": "" }, { - "name": "updatedByUserId", - "baseName": "updatedByUserId", + "name": "useTimestampAsPersistenceTimestamp", + "baseName": "useTimestampAsPersistenceTimestamp", + "type": "boolean", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "selectedByUserTimestamp", + "baseName": "selectedByUserTimestamp", "type": "number", - "format": "int32" + "format": "int64" }, { - "name": "persistenceTimestamp", - "baseName": "persistenceTimestamp", + "name": "timestamp", + "baseName": "timestamp", "type": "number", "format": "int64" }, { - "name": "useTimestampAsPersistenceTimestamp", - "baseName": "useTimestampAsPersistenceTimestamp", + "name": "isLargeValue", + "baseName": "isLargeValue", "type": "boolean", "format": "" } ]; diff --git a/codegen/marketing/events/models/StandardError.ts b/codegen/marketing/events/models/StandardError.ts index 7b1c295f4..1610a42ef 100644 --- a/codegen/marketing/events/models/StandardError.ts +++ b/codegen/marketing/events/models/StandardError.ts @@ -10,26 +10,37 @@ * Do not edit the class manually. */ -import { ErrorCategory } from '../models/ErrorCategory'; import { ErrorDetail } from '../models/ErrorDetail'; export class StandardError { - 'status': string; - 'id'?: string; - 'category': ErrorCategory; 'subCategory'?: any; - 'message': string; - 'errors': Array; 'context': { [key: string]: Array; }; 'links': { [key: string]: string; }; + 'id'?: string; + 'category': string; + 'message': string; + 'errors': Array; + 'status': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "status", - "baseName": "status", - "type": "string", + "name": "subCategory", + "baseName": "subCategory", + "type": "any", + "format": "" + }, + { + "name": "context", + "baseName": "context", + "type": "{ [key: string]: Array; }", + "format": "" + }, + { + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", "format": "" }, { @@ -41,13 +52,7 @@ export class StandardError { { "name": "category", "baseName": "category", - "type": "ErrorCategory", - "format": "" - }, - { - "name": "subCategory", - "baseName": "subCategory", - "type": "any", + "type": "string", "format": "" }, { @@ -63,15 +68,9 @@ export class StandardError { "format": "" }, { - "name": "context", - "baseName": "context", - "type": "{ [key: string]: Array; }", - "format": "" - }, - { - "name": "links", - "baseName": "links", - "type": "{ [key: string]: string; }", + "name": "status", + "baseName": "status", + "type": "string", "format": "" } ]; diff --git a/codegen/marketing/events/models/all.ts b/codegen/marketing/events/models/all.ts index 139bc5cee..2e84017d1 100644 --- a/codegen/marketing/events/models/all.ts +++ b/codegen/marketing/events/models/all.ts @@ -6,7 +6,6 @@ export * from '../models/BatchResponseMarketingEventPublicDefaultResponse' export * from '../models/BatchResponseSubscriberEmailResponse' export * from '../models/BatchResponseSubscriberVidResponse' export * from '../models/CollectionResponseMarketingEventExternalUniqueIdentifierNoPaging' -export * from '../models/ErrorCategory' export * from '../models/ErrorDetail' export * from '../models/EventDetailSettings' export * from '../models/EventDetailSettingsUrl' diff --git a/codegen/marketing/events/types/ObjectParamAPI.ts b/codegen/marketing/events/types/ObjectParamAPI.ts index ec795ba06..7ee6a2be4 100644 --- a/codegen/marketing/events/types/ObjectParamAPI.ts +++ b/codegen/marketing/events/types/ObjectParamAPI.ts @@ -91,7 +91,7 @@ export class ObjectAttendanceSubscriberStateChangesApi { } /** - * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. If you set params + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. * Record * @param param the request object */ @@ -101,274 +101,246 @@ export class ObjectAttendanceSubscriberStateChangesApi { } -import { ObservableMarketingEventsExternalApi } from "./ObservableAPI"; -import { MarketingEventsExternalApiRequestFactory, MarketingEventsExternalApiResponseProcessor} from "../apis/MarketingEventsExternalApi"; +import { ObservableBasicApi } from "./ObservableAPI"; +import { BasicApiRequestFactory, BasicApiResponseProcessor} from "../apis/BasicApi"; -export interface MarketingEventsExternalApiArchiveRequest { +export interface BasicApiArchiveRequest { /** - * + * The id of the marketing event to delete * @type string - * @memberof MarketingEventsExternalApiarchive + * @memberof BasicApiarchive */ externalEventId: string /** - * - * @type string - * @memberof MarketingEventsExternalApiarchive - */ - externalAccountId: string -} - -export interface MarketingEventsExternalApiArchiveBatchRequest { - /** - * - * @type BatchInputMarketingEventExternalUniqueIdentifier - * @memberof MarketingEventsExternalApiarchiveBatch - */ - batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier -} - -export interface MarketingEventsExternalApiCompleteRequest { - /** - * - * @type string - * @memberof MarketingEventsExternalApicomplete - */ - externalEventId: string - /** - * + * The account id associated with the marketing event * @type string - * @memberof MarketingEventsExternalApicomplete + * @memberof BasicApiarchive */ externalAccountId: string - /** - * - * @type MarketingEventCompleteRequestParams - * @memberof MarketingEventsExternalApicomplete - */ - marketingEventCompleteRequestParams: MarketingEventCompleteRequestParams } -export interface MarketingEventsExternalApiCreateRequest { +export interface BasicApiCreateRequest { /** - * + * The details of the marketing event to create * @type MarketingEventCreateRequestParams - * @memberof MarketingEventsExternalApicreate + * @memberof BasicApicreate */ marketingEventCreateRequestParams: MarketingEventCreateRequestParams } -export interface MarketingEventsExternalApiDoCancelRequest { +export interface BasicApiDoCancelRequest { /** - * + * The id of the marketing event to mark as cancelled * @type string - * @memberof MarketingEventsExternalApidoCancel + * @memberof BasicApidoCancel */ externalEventId: string /** - * - * @type string - * @memberof MarketingEventsExternalApidoCancel - */ - externalAccountId: string -} - -export interface MarketingEventsExternalApiDoEmailUpsertByIdRequest { - /** - * - * @type string - * @memberof MarketingEventsExternalApidoEmailUpsertById - */ - externalEventId: string - /** - * - * @type string - * @memberof MarketingEventsExternalApidoEmailUpsertById - */ - subscriberState: string - /** - * - * @type string - * @memberof MarketingEventsExternalApidoEmailUpsertById - */ - externalAccountId: string - /** - * - * @type BatchInputMarketingEventEmailSubscriber - * @memberof MarketingEventsExternalApidoEmailUpsertById - */ - batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber -} - -export interface MarketingEventsExternalApiDoUpsertRequest { - /** - * - * @type BatchInputMarketingEventCreateRequestParams - * @memberof MarketingEventsExternalApidoUpsert - */ - batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams -} - -export interface MarketingEventsExternalApiDoUpsertByIdRequest { - /** - * - * @type string - * @memberof MarketingEventsExternalApidoUpsertById - */ - externalEventId: string - /** - * - * @type string - * @memberof MarketingEventsExternalApidoUpsertById - */ - subscriberState: string - /** - * + * The account id associated with the marketing event * @type string - * @memberof MarketingEventsExternalApidoUpsertById + * @memberof BasicApidoCancel */ externalAccountId: string - /** - * - * @type BatchInputMarketingEventSubscriber - * @memberof MarketingEventsExternalApidoUpsertById - */ - batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber } -export interface MarketingEventsExternalApiGetByIdRequest { +export interface BasicApiGetByIdRequest { /** - * + * The id of the marketing event to return * @type string - * @memberof MarketingEventsExternalApigetById + * @memberof BasicApigetById */ externalEventId: string /** - * + * The account id associated with the marketing event * @type string - * @memberof MarketingEventsExternalApigetById + * @memberof BasicApigetById */ externalAccountId: string } -export interface MarketingEventsExternalApiReplaceRequest { +export interface BasicApiReplaceRequest { /** - * + * The id of the marketing event to upsert * @type string - * @memberof MarketingEventsExternalApireplace + * @memberof BasicApireplace */ externalEventId: string /** - * + * The details of the marketing event to upsert * @type MarketingEventCreateRequestParams - * @memberof MarketingEventsExternalApireplace + * @memberof BasicApireplace */ marketingEventCreateRequestParams: MarketingEventCreateRequestParams } -export interface MarketingEventsExternalApiUpdateRequest { +export interface BasicApiUpdateRequest { /** - * + * The id of the marketing event to update * @type string - * @memberof MarketingEventsExternalApiupdate + * @memberof BasicApiupdate */ externalEventId: string /** - * + * The account id associated with the marketing event * @type string - * @memberof MarketingEventsExternalApiupdate + * @memberof BasicApiupdate */ externalAccountId: string /** - * + * The details of the marketing event to update * @type MarketingEventUpdateRequestParams - * @memberof MarketingEventsExternalApiupdate + * @memberof BasicApiupdate */ marketingEventUpdateRequestParams: MarketingEventUpdateRequestParams } -export class ObjectMarketingEventsExternalApi { - private api: ObservableMarketingEventsExternalApi +export class ObjectBasicApi { + private api: ObservableBasicApi - public constructor(configuration: Configuration, requestFactory?: MarketingEventsExternalApiRequestFactory, responseProcessor?: MarketingEventsExternalApiResponseProcessor) { - this.api = new ObservableMarketingEventsExternalApi(configuration, requestFactory, responseProcessor); + public constructor(configuration: Configuration, requestFactory?: BasicApiRequestFactory, responseProcessor?: BasicApiResponseProcessor) { + this.api = new ObservableBasicApi(configuration, requestFactory, responseProcessor); } /** + * Deletes an existing Marketing Event with the specified id, if one exists. + * Delete a marketing event * @param param the request object */ - public archive(param: MarketingEventsExternalApiArchiveRequest, options?: Configuration): Promise { + public archive(param: BasicApiArchiveRequest, options?: Configuration): Promise { return this.api.archive(param.externalEventId, param.externalAccountId, options).toPromise(); } /** + * Creates a new marketing event in HubSpot + * Create a marketing event * @param param the request object */ - public archiveBatch(param: MarketingEventsExternalApiArchiveBatchRequest, options?: Configuration): Promise { - return this.api.archiveBatch(param.batchInputMarketingEventExternalUniqueIdentifier, options).toPromise(); + public create(param: BasicApiCreateRequest, options?: Configuration): Promise { + return this.api.create(param.marketingEventCreateRequestParams, options).toPromise(); } /** + * Mark a marketing event as cancelled. + * Mark a marketing event as cancelled * @param param the request object */ - public complete(param: MarketingEventsExternalApiCompleteRequest, options?: Configuration): Promise { - return this.api.complete(param.externalEventId, param.externalAccountId, param.marketingEventCompleteRequestParams, options).toPromise(); + public doCancel(param: BasicApiDoCancelRequest, options?: Configuration): Promise { + return this.api.doCancel(param.externalEventId, param.externalAccountId, options).toPromise(); } /** + * Returns the details of the Marketing Event with the specified id, if one exists. + * Get a marketing event * @param param the request object */ - public create(param: MarketingEventsExternalApiCreateRequest, options?: Configuration): Promise { - return this.api.create(param.marketingEventCreateRequestParams, options).toPromise(); + public getById(param: BasicApiGetByIdRequest, options?: Configuration): Promise { + return this.api.getById(param.externalEventId, param.externalAccountId, options).toPromise(); } /** + * Upsets a Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update a marketing event * @param param the request object */ - public doCancel(param: MarketingEventsExternalApiDoCancelRequest, options?: Configuration): Promise { - return this.api.doCancel(param.externalEventId, param.externalAccountId, options).toPromise(); + public replace(param: BasicApiReplaceRequest, options?: Configuration): Promise { + return this.api.replace(param.externalEventId, param.marketingEventCreateRequestParams, options).toPromise(); } /** + * Updates an existing Marketing Event with the specified id, if one exists. + * Update a marketing event * @param param the request object */ - public doEmailUpsertById(param: MarketingEventsExternalApiDoEmailUpsertByIdRequest, options?: Configuration): Promise { - return this.api.doEmailUpsertById(param.externalEventId, param.subscriberState, param.externalAccountId, param.batchInputMarketingEventEmailSubscriber, options).toPromise(); + public update(param: BasicApiUpdateRequest, options?: Configuration): Promise { + return this.api.update(param.externalEventId, param.externalAccountId, param.marketingEventUpdateRequestParams, options).toPromise(); } +} + +import { ObservableBatchApi } from "./ObservableAPI"; +import { BatchApiRequestFactory, BatchApiResponseProcessor} from "../apis/BatchApi"; + +export interface BatchApiArchiveBatchRequest { /** - * @param param the request object + * The details of the marketing events to delete + * @type BatchInputMarketingEventExternalUniqueIdentifier + * @memberof BatchApiarchiveBatch */ - public doUpsert(param: MarketingEventsExternalApiDoUpsertRequest, options?: Configuration): Promise { - return this.api.doUpsert(param.batchInputMarketingEventCreateRequestParams, options).toPromise(); + batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier +} + +export interface BatchApiDoUpsertRequest { + /** + * The details of the marketing events to upsert + * @type BatchInputMarketingEventCreateRequestParams + * @memberof BatchApidoUpsert + */ + batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams +} + +export class ObjectBatchApi { + private api: ObservableBatchApi + + public constructor(configuration: Configuration, requestFactory?: BatchApiRequestFactory, responseProcessor?: BatchApiResponseProcessor) { + this.api = new ObservableBatchApi(configuration, requestFactory, responseProcessor); } /** + * Bulk delete a number of marketing events in HubSpot + * Delete multiple marketing events * @param param the request object */ - public doUpsertById(param: MarketingEventsExternalApiDoUpsertByIdRequest, options?: Configuration): Promise { - return this.api.doUpsertById(param.externalEventId, param.subscriberState, param.externalAccountId, param.batchInputMarketingEventSubscriber, options).toPromise(); + public archiveBatch(param: BatchApiArchiveBatchRequest, options?: Configuration): Promise { + return this.api.archiveBatch(param.batchInputMarketingEventExternalUniqueIdentifier, options).toPromise(); } /** + * Upset multiple Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update multiple marketing events * @param param the request object */ - public getById(param: MarketingEventsExternalApiGetByIdRequest, options?: Configuration): Promise { - return this.api.getById(param.externalEventId, param.externalAccountId, options).toPromise(); + public doUpsert(param: BatchApiDoUpsertRequest, options?: Configuration): Promise { + return this.api.doUpsert(param.batchInputMarketingEventCreateRequestParams, options).toPromise(); } +} + +import { ObservableMarketingEventsExternalApi } from "./ObservableAPI"; +import { MarketingEventsExternalApiRequestFactory, MarketingEventsExternalApiResponseProcessor} from "../apis/MarketingEventsExternalApi"; + +export interface MarketingEventsExternalApiCompleteRequest { /** - * @param param the request object + * + * @type string + * @memberof MarketingEventsExternalApicomplete */ - public replace(param: MarketingEventsExternalApiReplaceRequest, options?: Configuration): Promise { - return this.api.replace(param.externalEventId, param.marketingEventCreateRequestParams, options).toPromise(); + externalEventId: string + /** + * + * @type string + * @memberof MarketingEventsExternalApicomplete + */ + externalAccountId: string + /** + * + * @type MarketingEventCompleteRequestParams + * @memberof MarketingEventsExternalApicomplete + */ + marketingEventCompleteRequestParams: MarketingEventCompleteRequestParams +} + +export class ObjectMarketingEventsExternalApi { + private api: ObservableMarketingEventsExternalApi + + public constructor(configuration: Configuration, requestFactory?: MarketingEventsExternalApiRequestFactory, responseProcessor?: MarketingEventsExternalApiResponseProcessor) { + this.api = new ObservableMarketingEventsExternalApi(configuration, requestFactory, responseProcessor); } /** * @param param the request object */ - public update(param: MarketingEventsExternalApiUpdateRequest, options?: Configuration): Promise { - return this.api.update(param.externalEventId, param.externalAccountId, param.marketingEventUpdateRequestParams, options).toPromise(); + public complete(param: MarketingEventsExternalApiCompleteRequest, options?: Configuration): Promise { + return this.api.complete(param.externalEventId, param.externalAccountId, param.marketingEventCompleteRequestParams, options).toPromise(); } } @@ -403,52 +375,140 @@ export class ObjectSearchApi { } -import { ObservableSettingsExternalApi } from "./ObservableAPI"; -import { SettingsExternalApiRequestFactory, SettingsExternalApiResponseProcessor} from "../apis/SettingsExternalApi"; +import { ObservableSettingsApi } from "./ObservableAPI"; +import { SettingsApiRequestFactory, SettingsApiResponseProcessor} from "../apis/SettingsApi"; -export interface SettingsExternalApiCreateRequest { +export interface SettingsApiCreateRequest { /** - * + * The id of the application to update the settings for. * @type number - * @memberof SettingsExternalApicreate + * @memberof SettingsApicreate */ appId: number /** - * + * The new application settings * @type EventDetailSettingsUrl - * @memberof SettingsExternalApicreate + * @memberof SettingsApicreate */ eventDetailSettingsUrl: EventDetailSettingsUrl } -export interface SettingsExternalApiGetAllRequest { +export interface SettingsApiGetAllRequest { /** - * + * The id of the application to retrieve the settings for. * @type number - * @memberof SettingsExternalApigetAll + * @memberof SettingsApigetAll */ appId: number } -export class ObjectSettingsExternalApi { - private api: ObservableSettingsExternalApi +export class ObjectSettingsApi { + private api: ObservableSettingsApi - public constructor(configuration: Configuration, requestFactory?: SettingsExternalApiRequestFactory, responseProcessor?: SettingsExternalApiResponseProcessor) { - this.api = new ObservableSettingsExternalApi(configuration, requestFactory, responseProcessor); + public constructor(configuration: Configuration, requestFactory?: SettingsApiRequestFactory, responseProcessor?: SettingsApiResponseProcessor) { + this.api = new ObservableSettingsApi(configuration, requestFactory, responseProcessor); } /** + * Create or update the current settings for the application. + * Update the application settings * @param param the request object */ - public create(param: SettingsExternalApiCreateRequest, options?: Configuration): Promise { + public create(param: SettingsApiCreateRequest, options?: Configuration): Promise { return this.api.create(param.appId, param.eventDetailSettingsUrl, options).toPromise(); } /** + * Retrieve the current settings for the application. + * Retrieve the application settings * @param param the request object */ - public getAll(param: SettingsExternalApiGetAllRequest, options?: Configuration): Promise { + public getAll(param: SettingsApiGetAllRequest, options?: Configuration): Promise { return this.api.getAll(param.appId, options).toPromise(); } } + +import { ObservableSubscriberStateChangesApi } from "./ObservableAPI"; +import { SubscriberStateChangesApiRequestFactory, SubscriberStateChangesApiResponseProcessor} from "../apis/SubscriberStateChangesApi"; + +export interface SubscriberStateChangesApiDoEmailUpsertByIdRequest { + /** + * The id of the marketing event + * @type string + * @memberof SubscriberStateChangesApidoEmailUpsertById + */ + externalEventId: string + /** + * The new subscriber state for the HubSpot contacts and the specified marketing event + * @type string + * @memberof SubscriberStateChangesApidoEmailUpsertById + */ + subscriberState: string + /** + * The account id associated with the marketing event + * @type string + * @memberof SubscriberStateChangesApidoEmailUpsertById + */ + externalAccountId: string + /** + * The details of the contacts to subscribe to the event + * @type BatchInputMarketingEventEmailSubscriber + * @memberof SubscriberStateChangesApidoEmailUpsertById + */ + batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber +} + +export interface SubscriberStateChangesApiDoUpsertByIdRequest { + /** + * The id of the marketing event + * @type string + * @memberof SubscriberStateChangesApidoUpsertById + */ + externalEventId: string + /** + * The new subscriber state for the HubSpot contacts and the specified marketing event + * @type string + * @memberof SubscriberStateChangesApidoUpsertById + */ + subscriberState: string + /** + * The account id associated with the marketing event + * @type string + * @memberof SubscriberStateChangesApidoUpsertById + */ + externalAccountId: string + /** + * The details of the contacts to subscribe to the event + * @type BatchInputMarketingEventSubscriber + * @memberof SubscriberStateChangesApidoUpsertById + */ + batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber +} + +export class ObjectSubscriberStateChangesApi { + private api: ObservableSubscriberStateChangesApi + + public constructor(configuration: Configuration, requestFactory?: SubscriberStateChangesApiRequestFactory, responseProcessor?: SubscriberStateChangesApiResponseProcessor) { + this.api = new ObservableSubscriberStateChangesApi(configuration, requestFactory, responseProcessor); + } + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. Note that the contact must already exist in HubSpot; a contact will not be created. + * Record + * @param param the request object + */ + public doEmailUpsertById(param: SubscriberStateChangesApiDoEmailUpsertByIdRequest, options?: Configuration): Promise { + return this.api.doEmailUpsertById(param.externalEventId, param.subscriberState, param.externalAccountId, param.batchInputMarketingEventEmailSubscriber, options).toPromise(); + } + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using HubSpot contact ids. Note that the contact must already exist in HubSpot; a contact will not be create. + * Record + * @param param the request object + */ + public doUpsertById(param: SubscriberStateChangesApiDoUpsertByIdRequest, options?: Configuration): Promise { + return this.api.doUpsertById(param.externalEventId, param.subscriberState, param.externalAccountId, param.batchInputMarketingEventSubscriber, options).toPromise(); + } + +} diff --git a/codegen/marketing/events/types/ObservableAPI.ts b/codegen/marketing/events/types/ObservableAPI.ts index a04208907..be0c8737e 100644 --- a/codegen/marketing/events/types/ObservableAPI.ts +++ b/codegen/marketing/events/types/ObservableAPI.ts @@ -63,7 +63,7 @@ export class ObservableAttendanceSubscriberStateChangesApi { } /** - * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. If you set params + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. * Record * @param externalEventId The id of the marketing event * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. @@ -91,25 +91,27 @@ export class ObservableAttendanceSubscriberStateChangesApi { } -import { MarketingEventsExternalApiRequestFactory, MarketingEventsExternalApiResponseProcessor} from "../apis/MarketingEventsExternalApi"; -export class ObservableMarketingEventsExternalApi { - private requestFactory: MarketingEventsExternalApiRequestFactory; - private responseProcessor: MarketingEventsExternalApiResponseProcessor; +import { BasicApiRequestFactory, BasicApiResponseProcessor} from "../apis/BasicApi"; +export class ObservableBasicApi { + private requestFactory: BasicApiRequestFactory; + private responseProcessor: BasicApiResponseProcessor; private configuration: Configuration; public constructor( configuration: Configuration, - requestFactory?: MarketingEventsExternalApiRequestFactory, - responseProcessor?: MarketingEventsExternalApiResponseProcessor + requestFactory?: BasicApiRequestFactory, + responseProcessor?: BasicApiResponseProcessor ) { this.configuration = configuration; - this.requestFactory = requestFactory || new MarketingEventsExternalApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new MarketingEventsExternalApiResponseProcessor(); + this.requestFactory = requestFactory || new BasicApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new BasicApiResponseProcessor(); } /** - * @param externalEventId - * @param externalAccountId + * Deletes an existing Marketing Event with the specified id, if one exists. + * Delete a marketing event + * @param externalEventId The id of the marketing event to delete + * @param externalAccountId The account id associated with the marketing event */ public archive(externalEventId: string, externalAccountId: string, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.archive(externalEventId, externalAccountId, _options); @@ -131,10 +133,12 @@ export class ObservableMarketingEventsExternalApi { } /** - * @param batchInputMarketingEventExternalUniqueIdentifier + * Creates a new marketing event in HubSpot + * Create a marketing event + * @param marketingEventCreateRequestParams The details of the marketing event to create */ - public archiveBatch(batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.archiveBatch(batchInputMarketingEventExternalUniqueIdentifier, _options); + public create(marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.create(marketingEventCreateRequestParams, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -148,17 +152,18 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.archiveBatch(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.create(rsp))); })); } /** - * @param externalEventId - * @param externalAccountId - * @param marketingEventCompleteRequestParams + * Mark a marketing event as cancelled. + * Mark a marketing event as cancelled + * @param externalEventId The id of the marketing event to mark as cancelled + * @param externalAccountId The account id associated with the marketing event */ - public complete(externalEventId: string, externalAccountId: string, marketingEventCompleteRequestParams: MarketingEventCompleteRequestParams, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.complete(externalEventId, externalAccountId, marketingEventCompleteRequestParams, _options); + public doCancel(externalEventId: string, externalAccountId: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.doCancel(externalEventId, externalAccountId, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -172,15 +177,18 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.complete(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doCancel(rsp))); })); } /** - * @param marketingEventCreateRequestParams + * Returns the details of the Marketing Event with the specified id, if one exists. + * Get a marketing event + * @param externalEventId The id of the marketing event to return + * @param externalAccountId The account id associated with the marketing event */ - public create(marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.create(marketingEventCreateRequestParams, _options); + public getById(externalEventId: string, externalAccountId: string, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.getById(externalEventId, externalAccountId, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -194,16 +202,18 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.create(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getById(rsp))); })); } /** - * @param externalEventId - * @param externalAccountId + * Upsets a Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update a marketing event + * @param externalEventId The id of the marketing event to upsert + * @param marketingEventCreateRequestParams The details of the marketing event to upsert */ - public doCancel(externalEventId: string, externalAccountId: string, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.doCancel(externalEventId, externalAccountId, _options); + public replace(externalEventId: string, marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.replace(externalEventId, marketingEventCreateRequestParams, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -217,18 +227,19 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doCancel(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replace(rsp))); })); } /** - * @param externalEventId - * @param subscriberState - * @param externalAccountId - * @param batchInputMarketingEventEmailSubscriber + * Updates an existing Marketing Event with the specified id, if one exists. + * Update a marketing event + * @param externalEventId The id of the marketing event to update + * @param externalAccountId The account id associated with the marketing event + * @param marketingEventUpdateRequestParams The details of the marketing event to update */ - public doEmailUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.doEmailUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventEmailSubscriber, _options); + public update(externalEventId: string, externalAccountId: string, marketingEventUpdateRequestParams: MarketingEventUpdateRequestParams, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.update(externalEventId, externalAccountId, marketingEventUpdateRequestParams, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -242,40 +253,35 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doEmailUpsertById(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.update(rsp))); })); } - /** - * @param batchInputMarketingEventCreateRequestParams - */ - public doUpsert(batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.doUpsert(batchInputMarketingEventCreateRequestParams, _options); +} - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } +import { BatchApiRequestFactory, BatchApiResponseProcessor} from "../apis/BatchApi"; +export class ObservableBatchApi { + private requestFactory: BatchApiRequestFactory; + private responseProcessor: BatchApiResponseProcessor; + private configuration: Configuration; - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doUpsert(rsp))); - })); + public constructor( + configuration: Configuration, + requestFactory?: BatchApiRequestFactory, + responseProcessor?: BatchApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new BatchApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new BatchApiResponseProcessor(); } /** - * @param externalEventId - * @param subscriberState - * @param externalAccountId - * @param batchInputMarketingEventSubscriber + * Bulk delete a number of marketing events in HubSpot + * Delete multiple marketing events + * @param batchInputMarketingEventExternalUniqueIdentifier The details of the marketing events to delete */ - public doUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.doUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventSubscriber, _options); + public archiveBatch(batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.archiveBatch(batchInputMarketingEventExternalUniqueIdentifier, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -289,16 +295,17 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doUpsertById(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.archiveBatch(rsp))); })); } /** - * @param externalEventId - * @param externalAccountId + * Upset multiple Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update multiple marketing events + * @param batchInputMarketingEventCreateRequestParams The details of the marketing events to upsert */ - public getById(externalEventId: string, externalAccountId: string, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.getById(externalEventId, externalAccountId, _options); + public doUpsert(batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.doUpsert(batchInputMarketingEventCreateRequestParams, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -312,40 +319,35 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getById(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doUpsert(rsp))); })); } - /** - * @param externalEventId - * @param marketingEventCreateRequestParams - */ - public replace(externalEventId: string, marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.replace(externalEventId, marketingEventCreateRequestParams, _options); +} - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (let middleware of this.configuration.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } +import { MarketingEventsExternalApiRequestFactory, MarketingEventsExternalApiResponseProcessor} from "../apis/MarketingEventsExternalApi"; +export class ObservableMarketingEventsExternalApi { + private requestFactory: MarketingEventsExternalApiRequestFactory; + private responseProcessor: MarketingEventsExternalApiResponseProcessor; + private configuration: Configuration; - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (let middleware of this.configuration.middleware) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.replace(rsp))); - })); + public constructor( + configuration: Configuration, + requestFactory?: MarketingEventsExternalApiRequestFactory, + responseProcessor?: MarketingEventsExternalApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new MarketingEventsExternalApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new MarketingEventsExternalApiResponseProcessor(); } /** * @param externalEventId * @param externalAccountId - * @param marketingEventUpdateRequestParams + * @param marketingEventCompleteRequestParams */ - public update(externalEventId: string, externalAccountId: string, marketingEventUpdateRequestParams: MarketingEventUpdateRequestParams, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.update(externalEventId, externalAccountId, marketingEventUpdateRequestParams, _options); + public complete(externalEventId: string, externalAccountId: string, marketingEventCompleteRequestParams: MarketingEventCompleteRequestParams, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.complete(externalEventId, externalAccountId, marketingEventCompleteRequestParams, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); @@ -359,7 +361,7 @@ export class ObservableMarketingEventsExternalApi { for (let middleware of this.configuration.middleware) { middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.update(rsp))); + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.complete(rsp))); })); } @@ -407,25 +409,27 @@ export class ObservableSearchApi { } -import { SettingsExternalApiRequestFactory, SettingsExternalApiResponseProcessor} from "../apis/SettingsExternalApi"; -export class ObservableSettingsExternalApi { - private requestFactory: SettingsExternalApiRequestFactory; - private responseProcessor: SettingsExternalApiResponseProcessor; +import { SettingsApiRequestFactory, SettingsApiResponseProcessor} from "../apis/SettingsApi"; +export class ObservableSettingsApi { + private requestFactory: SettingsApiRequestFactory; + private responseProcessor: SettingsApiResponseProcessor; private configuration: Configuration; public constructor( configuration: Configuration, - requestFactory?: SettingsExternalApiRequestFactory, - responseProcessor?: SettingsExternalApiResponseProcessor + requestFactory?: SettingsApiRequestFactory, + responseProcessor?: SettingsApiResponseProcessor ) { this.configuration = configuration; - this.requestFactory = requestFactory || new SettingsExternalApiRequestFactory(configuration); - this.responseProcessor = responseProcessor || new SettingsExternalApiResponseProcessor(); + this.requestFactory = requestFactory || new SettingsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SettingsApiResponseProcessor(); } /** - * @param appId - * @param eventDetailSettingsUrl + * Create or update the current settings for the application. + * Update the application settings + * @param appId The id of the application to update the settings for. + * @param eventDetailSettingsUrl The new application settings */ public create(appId: number, eventDetailSettingsUrl: EventDetailSettingsUrl, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.create(appId, eventDetailSettingsUrl, _options); @@ -447,7 +451,9 @@ export class ObservableSettingsExternalApi { } /** - * @param appId + * Retrieve the current settings for the application. + * Retrieve the application settings + * @param appId The id of the application to retrieve the settings for. */ public getAll(appId: number, _options?: Configuration): Observable { const requestContextPromise = this.requestFactory.getAll(appId, _options); @@ -469,3 +475,75 @@ export class ObservableSettingsExternalApi { } } + +import { SubscriberStateChangesApiRequestFactory, SubscriberStateChangesApiResponseProcessor} from "../apis/SubscriberStateChangesApi"; +export class ObservableSubscriberStateChangesApi { + private requestFactory: SubscriberStateChangesApiRequestFactory; + private responseProcessor: SubscriberStateChangesApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: SubscriberStateChangesApiRequestFactory, + responseProcessor?: SubscriberStateChangesApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new SubscriberStateChangesApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new SubscriberStateChangesApiResponseProcessor(); + } + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. Note that the contact must already exist in HubSpot; a contact will not be created. + * Record + * @param externalEventId The id of the marketing event + * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event + * @param externalAccountId The account id associated with the marketing event + * @param batchInputMarketingEventEmailSubscriber The details of the contacts to subscribe to the event + */ + public doEmailUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.doEmailUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventEmailSubscriber, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doEmailUpsertById(rsp))); + })); + } + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using HubSpot contact ids. Note that the contact must already exist in HubSpot; a contact will not be create. + * Record + * @param externalEventId The id of the marketing event + * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event + * @param externalAccountId The account id associated with the marketing event + * @param batchInputMarketingEventSubscriber The details of the contacts to subscribe to the event + */ + public doUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.doUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventSubscriber, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.doUpsertById(rsp))); + })); + } + +} diff --git a/codegen/marketing/events/types/PromiseAPI.ts b/codegen/marketing/events/types/PromiseAPI.ts index d3e0a5463..f6f45ccbc 100644 --- a/codegen/marketing/events/types/PromiseAPI.ts +++ b/codegen/marketing/events/types/PromiseAPI.ts @@ -44,7 +44,7 @@ export class PromiseAttendanceSubscriberStateChangesApi { } /** - * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. If you set params + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created. * Record * @param externalEventId The id of the marketing event * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. @@ -61,23 +61,25 @@ export class PromiseAttendanceSubscriberStateChangesApi { -import { ObservableMarketingEventsExternalApi } from './ObservableAPI'; +import { ObservableBasicApi } from './ObservableAPI'; -import { MarketingEventsExternalApiRequestFactory, MarketingEventsExternalApiResponseProcessor} from "../apis/MarketingEventsExternalApi"; -export class PromiseMarketingEventsExternalApi { - private api: ObservableMarketingEventsExternalApi +import { BasicApiRequestFactory, BasicApiResponseProcessor} from "../apis/BasicApi"; +export class PromiseBasicApi { + private api: ObservableBasicApi public constructor( configuration: Configuration, - requestFactory?: MarketingEventsExternalApiRequestFactory, - responseProcessor?: MarketingEventsExternalApiResponseProcessor + requestFactory?: BasicApiRequestFactory, + responseProcessor?: BasicApiResponseProcessor ) { - this.api = new ObservableMarketingEventsExternalApi(configuration, requestFactory, responseProcessor); + this.api = new ObservableBasicApi(configuration, requestFactory, responseProcessor); } /** - * @param externalEventId - * @param externalAccountId + * Deletes an existing Marketing Event with the specified id, if one exists. + * Delete a marketing event + * @param externalEventId The id of the marketing event to delete + * @param externalAccountId The account id associated with the marketing event */ public archive(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { const result = this.api.archive(externalEventId, externalAccountId, _options); @@ -85,25 +87,9 @@ export class PromiseMarketingEventsExternalApi { } /** - * @param batchInputMarketingEventExternalUniqueIdentifier - */ - public archiveBatch(batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier, _options?: Configuration): Promise { - const result = this.api.archiveBatch(batchInputMarketingEventExternalUniqueIdentifier, _options); - return result.toPromise(); - } - - /** - * @param externalEventId - * @param externalAccountId - * @param marketingEventCompleteRequestParams - */ - public complete(externalEventId: string, externalAccountId: string, marketingEventCompleteRequestParams: MarketingEventCompleteRequestParams, _options?: Configuration): Promise { - const result = this.api.complete(externalEventId, externalAccountId, marketingEventCompleteRequestParams, _options); - return result.toPromise(); - } - - /** - * @param marketingEventCreateRequestParams + * Creates a new marketing event in HubSpot + * Create a marketing event + * @param marketingEventCreateRequestParams The details of the marketing event to create */ public create(marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Promise { const result = this.api.create(marketingEventCreateRequestParams, _options); @@ -111,8 +97,10 @@ export class PromiseMarketingEventsExternalApi { } /** - * @param externalEventId - * @param externalAccountId + * Mark a marketing event as cancelled. + * Mark a marketing event as cancelled + * @param externalEventId The id of the marketing event to mark as cancelled + * @param externalAccountId The account id associated with the marketing event */ public doCancel(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { const result = this.api.doCancel(externalEventId, externalAccountId, _options); @@ -120,60 +108,104 @@ export class PromiseMarketingEventsExternalApi { } /** - * @param externalEventId - * @param subscriberState - * @param externalAccountId - * @param batchInputMarketingEventEmailSubscriber + * Returns the details of the Marketing Event with the specified id, if one exists. + * Get a marketing event + * @param externalEventId The id of the marketing event to return + * @param externalAccountId The account id associated with the marketing event */ - public doEmailUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber, _options?: Configuration): Promise { - const result = this.api.doEmailUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventEmailSubscriber, _options); + public getById(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { + const result = this.api.getById(externalEventId, externalAccountId, _options); return result.toPromise(); } /** - * @param batchInputMarketingEventCreateRequestParams + * Upsets a Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update a marketing event + * @param externalEventId The id of the marketing event to upsert + * @param marketingEventCreateRequestParams The details of the marketing event to upsert */ - public doUpsert(batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams, _options?: Configuration): Promise { - const result = this.api.doUpsert(batchInputMarketingEventCreateRequestParams, _options); + public replace(externalEventId: string, marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Promise { + const result = this.api.replace(externalEventId, marketingEventCreateRequestParams, _options); return result.toPromise(); } /** - * @param externalEventId - * @param subscriberState - * @param externalAccountId - * @param batchInputMarketingEventSubscriber + * Updates an existing Marketing Event with the specified id, if one exists. + * Update a marketing event + * @param externalEventId The id of the marketing event to update + * @param externalAccountId The account id associated with the marketing event + * @param marketingEventUpdateRequestParams The details of the marketing event to update */ - public doUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber, _options?: Configuration): Promise { - const result = this.api.doUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventSubscriber, _options); + public update(externalEventId: string, externalAccountId: string, marketingEventUpdateRequestParams: MarketingEventUpdateRequestParams, _options?: Configuration): Promise { + const result = this.api.update(externalEventId, externalAccountId, marketingEventUpdateRequestParams, _options); return result.toPromise(); } + +} + + + +import { ObservableBatchApi } from './ObservableAPI'; + +import { BatchApiRequestFactory, BatchApiResponseProcessor} from "../apis/BatchApi"; +export class PromiseBatchApi { + private api: ObservableBatchApi + + public constructor( + configuration: Configuration, + requestFactory?: BatchApiRequestFactory, + responseProcessor?: BatchApiResponseProcessor + ) { + this.api = new ObservableBatchApi(configuration, requestFactory, responseProcessor); + } + /** - * @param externalEventId - * @param externalAccountId + * Bulk delete a number of marketing events in HubSpot + * Delete multiple marketing events + * @param batchInputMarketingEventExternalUniqueIdentifier The details of the marketing events to delete */ - public getById(externalEventId: string, externalAccountId: string, _options?: Configuration): Promise { - const result = this.api.getById(externalEventId, externalAccountId, _options); + public archiveBatch(batchInputMarketingEventExternalUniqueIdentifier: BatchInputMarketingEventExternalUniqueIdentifier, _options?: Configuration): Promise { + const result = this.api.archiveBatch(batchInputMarketingEventExternalUniqueIdentifier, _options); return result.toPromise(); } /** - * @param externalEventId - * @param marketingEventCreateRequestParams + * Upset multiple Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created. + * Create or update multiple marketing events + * @param batchInputMarketingEventCreateRequestParams The details of the marketing events to upsert */ - public replace(externalEventId: string, marketingEventCreateRequestParams: MarketingEventCreateRequestParams, _options?: Configuration): Promise { - const result = this.api.replace(externalEventId, marketingEventCreateRequestParams, _options); + public doUpsert(batchInputMarketingEventCreateRequestParams: BatchInputMarketingEventCreateRequestParams, _options?: Configuration): Promise { + const result = this.api.doUpsert(batchInputMarketingEventCreateRequestParams, _options); return result.toPromise(); } + +} + + + +import { ObservableMarketingEventsExternalApi } from './ObservableAPI'; + +import { MarketingEventsExternalApiRequestFactory, MarketingEventsExternalApiResponseProcessor} from "../apis/MarketingEventsExternalApi"; +export class PromiseMarketingEventsExternalApi { + private api: ObservableMarketingEventsExternalApi + + public constructor( + configuration: Configuration, + requestFactory?: MarketingEventsExternalApiRequestFactory, + responseProcessor?: MarketingEventsExternalApiResponseProcessor + ) { + this.api = new ObservableMarketingEventsExternalApi(configuration, requestFactory, responseProcessor); + } + /** * @param externalEventId * @param externalAccountId - * @param marketingEventUpdateRequestParams + * @param marketingEventCompleteRequestParams */ - public update(externalEventId: string, externalAccountId: string, marketingEventUpdateRequestParams: MarketingEventUpdateRequestParams, _options?: Configuration): Promise { - const result = this.api.update(externalEventId, externalAccountId, marketingEventUpdateRequestParams, _options); + public complete(externalEventId: string, externalAccountId: string, marketingEventCompleteRequestParams: MarketingEventCompleteRequestParams, _options?: Configuration): Promise { + const result = this.api.complete(externalEventId, externalAccountId, marketingEventCompleteRequestParams, _options); return result.toPromise(); } @@ -211,23 +243,25 @@ export class PromiseSearchApi { -import { ObservableSettingsExternalApi } from './ObservableAPI'; +import { ObservableSettingsApi } from './ObservableAPI'; -import { SettingsExternalApiRequestFactory, SettingsExternalApiResponseProcessor} from "../apis/SettingsExternalApi"; -export class PromiseSettingsExternalApi { - private api: ObservableSettingsExternalApi +import { SettingsApiRequestFactory, SettingsApiResponseProcessor} from "../apis/SettingsApi"; +export class PromiseSettingsApi { + private api: ObservableSettingsApi public constructor( configuration: Configuration, - requestFactory?: SettingsExternalApiRequestFactory, - responseProcessor?: SettingsExternalApiResponseProcessor + requestFactory?: SettingsApiRequestFactory, + responseProcessor?: SettingsApiResponseProcessor ) { - this.api = new ObservableSettingsExternalApi(configuration, requestFactory, responseProcessor); + this.api = new ObservableSettingsApi(configuration, requestFactory, responseProcessor); } /** - * @param appId - * @param eventDetailSettingsUrl + * Create or update the current settings for the application. + * Update the application settings + * @param appId The id of the application to update the settings for. + * @param eventDetailSettingsUrl The new application settings */ public create(appId: number, eventDetailSettingsUrl: EventDetailSettingsUrl, _options?: Configuration): Promise { const result = this.api.create(appId, eventDetailSettingsUrl, _options); @@ -235,7 +269,9 @@ export class PromiseSettingsExternalApi { } /** - * @param appId + * Retrieve the current settings for the application. + * Retrieve the application settings + * @param appId The id of the application to retrieve the settings for. */ public getAll(appId: number, _options?: Configuration): Promise { const result = this.api.getAll(appId, _options); @@ -247,3 +283,48 @@ export class PromiseSettingsExternalApi { +import { ObservableSubscriberStateChangesApi } from './ObservableAPI'; + +import { SubscriberStateChangesApiRequestFactory, SubscriberStateChangesApiResponseProcessor} from "../apis/SubscriberStateChangesApi"; +export class PromiseSubscriberStateChangesApi { + private api: ObservableSubscriberStateChangesApi + + public constructor( + configuration: Configuration, + requestFactory?: SubscriberStateChangesApiRequestFactory, + responseProcessor?: SubscriberStateChangesApiResponseProcessor + ) { + this.api = new ObservableSubscriberStateChangesApi(configuration, requestFactory, responseProcessor); + } + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. Note that the contact must already exist in HubSpot; a contact will not be created. + * Record + * @param externalEventId The id of the marketing event + * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event + * @param externalAccountId The account id associated with the marketing event + * @param batchInputMarketingEventEmailSubscriber The details of the contacts to subscribe to the event + */ + public doEmailUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventEmailSubscriber: BatchInputMarketingEventEmailSubscriber, _options?: Configuration): Promise { + const result = this.api.doEmailUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventEmailSubscriber, _options); + return result.toPromise(); + } + + /** + * Record a subscription state between multiple HubSpot contacts and a marketing event, using HubSpot contact ids. Note that the contact must already exist in HubSpot; a contact will not be create. + * Record + * @param externalEventId The id of the marketing event + * @param subscriberState The new subscriber state for the HubSpot contacts and the specified marketing event + * @param externalAccountId The account id associated with the marketing event + * @param batchInputMarketingEventSubscriber The details of the contacts to subscribe to the event + */ + public doUpsertById(externalEventId: string, subscriberState: string, externalAccountId: string, batchInputMarketingEventSubscriber: BatchInputMarketingEventSubscriber, _options?: Configuration): Promise { + const result = this.api.doUpsertById(externalEventId, subscriberState, externalAccountId, batchInputMarketingEventSubscriber, _options); + return result.toPromise(); + } + + +} + + + diff --git a/codegen/marketing/transactional/models/EmailSendStatusView.ts b/codegen/marketing/transactional/models/EmailSendStatusView.ts index 32418ef4e..3334cf665 100644 --- a/codegen/marketing/transactional/models/EmailSendStatusView.ts +++ b/codegen/marketing/transactional/models/EmailSendStatusView.ts @@ -97,6 +97,6 @@ export class EmailSendStatusView { } -export type EmailSendStatusViewSendResultEnum = "SENT" | "IDEMPOTENT_IGNORE" | "QUEUED" | "IDEMPOTENT_FAIL" | "THROTTLED" | "EMAIL_DISABLED" | "PORTAL_SUSPENDED" | "INVALID_TO_ADDRESS" | "BLOCKED_DOMAIN" | "PREVIOUSLY_BOUNCED" | "EMAIL_UNCONFIRMED" | "PREVIOUS_SPAM" | "PREVIOUSLY_UNSUBSCRIBED_MESSAGE" | "PREVIOUSLY_UNSUBSCRIBED_PORTAL" | "INVALID_FROM_ADDRESS" | "CAMPAIGN_CANCELLED" | "VALIDATION_FAILED" | "MTA_IGNORE" | "BLOCKED_ADDRESS" | "PORTAL_OVER_LIMIT" | "PORTAL_EXPIRED" | "PORTAL_MISSING_MARKETING_SCOPE" | "MISSING_TEMPLATE_PROPERTIES" | "MISSING_REQUIRED_PARAMETER" | "PORTAL_AUTHENTICATION_FAILURE" | "MISSING_CONTENT" | "CORRUPT_INPUT" | "TEMPLATE_RENDER_EXCEPTION" | "GRAYMAIL_SUPPRESSED" | "UNCONFIGURED_SENDING_DOMAIN" | "UNDELIVERABLE" | "CANCELLED_ABUSE" | "QUARANTINED_ADDRESS" | "ADDRESS_ONLY_ACCEPTED_ON_PROD" | "PORTAL_NOT_AUTHORIZED_FOR_APPLICATION" | "ADDRESS_LIST_BOMBED" | "ADDRESS_OPTED_OUT" | "RECIPIENT_FATIGUE_SUPPRESSED" | "TOO_MANY_RECIPIENTS" | "PREVIOUSLY_UNSUBSCRIBED_BRAND" | "NON_MARKETABLE_CONTACT" | "PREVIOUSLY_UNSUBSCRIBED_BUSINESS_UNIT" ; +export type EmailSendStatusViewSendResultEnum = "SENT" | "IDEMPOTENT_IGNORE" | "QUEUED" | "IDEMPOTENT_FAIL" | "THROTTLED" | "EMAIL_DISABLED" | "PORTAL_SUSPENDED" | "INVALID_TO_ADDRESS" | "BLOCKED_DOMAIN" | "PREVIOUSLY_BOUNCED" | "EMAIL_UNCONFIRMED" | "PREVIOUS_SPAM" | "PREVIOUSLY_UNSUBSCRIBED_MESSAGE" | "PREVIOUSLY_UNSUBSCRIBED_PORTAL" | "INVALID_FROM_ADDRESS" | "CAMPAIGN_CANCELLED" | "VALIDATION_FAILED" | "MTA_IGNORE" | "BLOCKED_ADDRESS" | "PORTAL_OVER_LIMIT" | "PORTAL_EXPIRED" | "PORTAL_MISSING_MARKETING_SCOPE" | "MISSING_TEMPLATE_PROPERTIES" | "MISSING_REQUIRED_PARAMETER" | "PORTAL_AUTHENTICATION_FAILURE" | "MISSING_CONTENT" | "CORRUPT_INPUT" | "TEMPLATE_RENDER_EXCEPTION" | "GRAYMAIL_SUPPRESSED" | "UNCONFIGURED_SENDING_DOMAIN" | "UNDELIVERABLE" | "CANCELLED_ABUSE" | "QUARANTINED_ADDRESS" | "ADDRESS_ONLY_ACCEPTED_ON_PROD" | "PORTAL_NOT_AUTHORIZED_FOR_APPLICATION" | "ADDRESS_LIST_BOMBED" | "ADDRESS_OPTED_OUT" | "RECIPIENT_FATIGUE_SUPPRESSED" | "TOO_MANY_RECIPIENTS" | "PREVIOUSLY_UNSUBSCRIBED_BRAND" | "NON_MARKETABLE_CONTACT" | "PREVIOUSLY_UNSUBSCRIBED_BUSINESS_UNIT" | "GDPR_DOI_ENABLED" ; export type EmailSendStatusViewStatusEnum = "PENDING" | "PROCESSING" | "CANCELED" | "COMPLETE" ; diff --git a/codegen/settings/users/models/CollectionResponsePublicUserForwardPaging.ts b/codegen/settings/users/models/CollectionResponsePublicUserForwardPaging.ts index d650a3bcd..a5e57819b 100644 --- a/codegen/settings/users/models/CollectionResponsePublicUserForwardPaging.ts +++ b/codegen/settings/users/models/CollectionResponsePublicUserForwardPaging.ts @@ -14,23 +14,23 @@ import { ForwardPaging } from '../models/ForwardPaging'; import { PublicUser } from '../models/PublicUser'; export class CollectionResponsePublicUserForwardPaging { - 'results': Array; 'paging'?: ForwardPaging; + 'results': Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "results", - "baseName": "results", - "type": "Array", - "format": "" - }, { "name": "paging", "baseName": "paging", "type": "ForwardPaging", "format": "" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/settings/users/models/ErrorDetail.ts b/codegen/settings/users/models/ErrorDetail.ts index b4fb5bb37..bf780b5e4 100644 --- a/codegen/settings/users/models/ErrorDetail.ts +++ b/codegen/settings/users/models/ErrorDetail.ts @@ -13,38 +13,32 @@ export class ErrorDetail { /** - * A human readable message describing the error along with remediation steps where appropriate - */ - 'message': string; - /** - * The name of the field or parameter in which the error was found. + * A specific category that contains more specific detail about the error */ - '_in'?: string; + 'subCategory'?: string; /** * The status code associated with the error detail */ 'code'?: string; /** - * A specific category that contains more specific detail about the error + * The name of the field or parameter in which the error was found. */ - 'subCategory'?: string; + '_in'?: string; /** * Context about the error condition */ 'context'?: { [key: string]: Array; }; + /** + * A human readable message describing the error along with remediation steps where appropriate + */ + 'message': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "message", - "baseName": "message", - "type": "string", - "format": "" - }, - { - "name": "_in", - "baseName": "in", + "name": "subCategory", + "baseName": "subCategory", "type": "string", "format": "" }, @@ -55,8 +49,8 @@ export class ErrorDetail { "format": "" }, { - "name": "subCategory", - "baseName": "subCategory", + "name": "_in", + "baseName": "in", "type": "string", "format": "" }, @@ -65,6 +59,12 @@ export class ErrorDetail { "baseName": "context", "type": "{ [key: string]: Array; }", "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/settings/users/models/ModelError.ts b/codegen/settings/users/models/ModelError.ts index ba916c553..a96776b6b 100644 --- a/codegen/settings/users/models/ModelError.ts +++ b/codegen/settings/users/models/ModelError.ts @@ -14,43 +14,49 @@ import { ErrorDetail } from '../models/ErrorDetail'; export class ModelError { /** - * A human readable message describing the error along with remediation steps where appropriate + * A specific category that contains more specific detail about the error */ - 'message': string; + 'subCategory'?: string; /** - * A unique identifier for the request. Include this value with any error reports or support tickets + * Context about the error condition */ - 'correlationId': string; + 'context'?: { [key: string]: Array; }; /** - * The error category + * A unique identifier for the request. Include this value with any error reports or support tickets */ - 'category': string; + 'correlationId': string; /** - * A specific category that contains more specific detail about the error + * A map of link names to associated URIs containing documentation about the error or recommended remediation steps */ - 'subCategory'?: string; + 'links'?: { [key: string]: string; }; /** - * further information about the error + * A human readable message describing the error along with remediation steps where appropriate */ - 'errors'?: Array; + 'message': string; /** - * Context about the error condition + * The error category */ - 'context'?: { [key: string]: Array; }; + 'category': string; /** - * A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * further information about the error */ - 'links'?: { [key: string]: string; }; + 'errors'?: Array; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "message", - "baseName": "message", + "name": "subCategory", + "baseName": "subCategory", "type": "string", "format": "" }, + { + "name": "context", + "baseName": "context", + "type": "{ [key: string]: Array; }", + "format": "" + }, { "name": "correlationId", "baseName": "correlationId", @@ -58,14 +64,20 @@ export class ModelError { "format": "uuid" }, { - "name": "category", - "baseName": "category", + "name": "links", + "baseName": "links", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "message", + "baseName": "message", "type": "string", "format": "" }, { - "name": "subCategory", - "baseName": "subCategory", + "name": "category", + "baseName": "category", "type": "string", "format": "" }, @@ -74,18 +86,6 @@ export class ModelError { "baseName": "errors", "type": "Array", "format": "" - }, - { - "name": "context", - "baseName": "context", - "type": "{ [key: string]: Array; }", - "format": "" - }, - { - "name": "links", - "baseName": "links", - "type": "{ [key: string]: string; }", - "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/settings/users/models/NextPage.ts b/codegen/settings/users/models/NextPage.ts index f95c8d21a..2046caac3 100644 --- a/codegen/settings/users/models/NextPage.ts +++ b/codegen/settings/users/models/NextPage.ts @@ -12,21 +12,21 @@ export class NextPage { - 'after': string; 'link'?: string; + 'after': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "after", - "baseName": "after", + "name": "link", + "baseName": "link", "type": "string", "format": "" }, { - "name": "link", - "baseName": "link", + "name": "after", + "baseName": "after", "type": "string", "format": "" } ]; diff --git a/codegen/settings/users/models/PublicPermissionSet.ts b/codegen/settings/users/models/PublicPermissionSet.ts index 319cffe60..f4e12ccfd 100644 --- a/codegen/settings/users/models/PublicPermissionSet.ts +++ b/codegen/settings/users/models/PublicPermissionSet.ts @@ -16,25 +16,25 @@ */ export class PublicPermissionSet { /** - * The role's unique ID + * Whether this role has a paid seat and requires the billing-write scope to assign/unassign to users */ - 'id': string; + 'requiresBillingWrite': boolean; /** * The role's name */ 'name': string; /** - * Whether this role has a paid seat and requires the billing-write scope to assign/unassign to users + * The role's unique ID */ - 'requiresBillingWrite': boolean; + 'id': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "id", - "baseName": "id", - "type": "string", + "name": "requiresBillingWrite", + "baseName": "requiresBillingWrite", + "type": "boolean", "format": "" }, { @@ -44,9 +44,9 @@ export class PublicPermissionSet { "format": "" }, { - "name": "requiresBillingWrite", - "baseName": "requiresBillingWrite", - "type": "boolean", + "name": "id", + "baseName": "id", + "type": "string", "format": "" } ]; diff --git a/codegen/settings/users/models/PublicTeam.ts b/codegen/settings/users/models/PublicTeam.ts index 1c5fa162c..4826453a6 100644 --- a/codegen/settings/users/models/PublicTeam.ts +++ b/codegen/settings/users/models/PublicTeam.ts @@ -16,17 +16,17 @@ */ export class PublicTeam { /** - * The team's unique ID + * Primary members of this team */ - 'id': string; + 'userIds': Array; /** * The team's name */ 'name': string; /** - * Primary members of this team + * The team's unique ID */ - 'userIds': Array; + 'id': string; /** * Secondary or additional members of this team */ @@ -36,9 +36,9 @@ export class PublicTeam { static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "id", - "baseName": "id", - "type": "string", + "name": "userIds", + "baseName": "userIds", + "type": "Array", "format": "" }, { @@ -48,9 +48,9 @@ export class PublicTeam { "format": "" }, { - "name": "userIds", - "baseName": "userIds", - "type": "Array", + "name": "id", + "baseName": "id", + "type": "string", "format": "" }, { diff --git a/codegen/settings/users/models/PublicUser.ts b/codegen/settings/users/models/PublicUser.ts index fa7f5e0cc..939424d7b 100644 --- a/codegen/settings/users/models/PublicUser.ts +++ b/codegen/settings/users/models/PublicUser.ts @@ -16,50 +16,53 @@ */ export class PublicUser { /** - * The user's unique ID - */ - 'id': string; - /** - * The user's email + * The user's primary team */ - 'email': string; + 'primaryTeamId'?: string; + 'roleIds'?: Array; + 'sendWelcomeEmail'?: boolean; /** * The user's role */ 'roleId'?: string; /** - * The user's primary team - */ - 'primaryTeamId'?: string; - /** * The user's additional teams */ 'secondaryTeamIds'?: Array; + /** + * The user's unique ID + */ + 'id': string; + 'superAdmin'?: boolean; + /** + * The user's email + */ + 'email': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "id", - "baseName": "id", + "name": "primaryTeamId", + "baseName": "primaryTeamId", "type": "string", "format": "" }, { - "name": "email", - "baseName": "email", - "type": "string", + "name": "roleIds", + "baseName": "roleIds", + "type": "Array", "format": "" }, { - "name": "roleId", - "baseName": "roleId", - "type": "string", + "name": "sendWelcomeEmail", + "baseName": "sendWelcomeEmail", + "type": "boolean", "format": "" }, { - "name": "primaryTeamId", - "baseName": "primaryTeamId", + "name": "roleId", + "baseName": "roleId", "type": "string", "format": "" }, @@ -68,6 +71,24 @@ export class PublicUser { "baseName": "secondaryTeamIds", "type": "Array", "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "superAdmin", + "baseName": "superAdmin", + "type": "boolean", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/codegen/settings/users/models/PublicUserUpdate.ts b/codegen/settings/users/models/PublicUserUpdate.ts index 68cf406a2..e0b295039 100644 --- a/codegen/settings/users/models/PublicUserUpdate.ts +++ b/codegen/settings/users/models/PublicUserUpdate.ts @@ -15,15 +15,15 @@ * A user to update */ export class PublicUserUpdate { - /** - * The user's role - */ - 'roleId'?: string; /** * The user's primary team */ 'primaryTeamId'?: string; /** + * The user's role + */ + 'roleId'?: string; + /** * The user's additional teams */ 'secondaryTeamIds'?: Array; @@ -32,14 +32,14 @@ export class PublicUserUpdate { static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "roleId", - "baseName": "roleId", + "name": "primaryTeamId", + "baseName": "primaryTeamId", "type": "string", "format": "" }, { - "name": "primaryTeamId", - "baseName": "primaryTeamId", + "name": "roleId", + "baseName": "roleId", "type": "string", "format": "" }, diff --git a/codegen/settings/users/models/UserProvisionRequest.ts b/codegen/settings/users/models/UserProvisionRequest.ts index e824c27f6..eb5cb1b01 100644 --- a/codegen/settings/users/models/UserProvisionRequest.ts +++ b/codegen/settings/users/models/UserProvisionRequest.ts @@ -16,44 +16,44 @@ */ export class UserProvisionRequest { /** - * The created user's email + * The user's primary team */ - 'email': string; + 'primaryTeamId'?: string; /** - * The user's role + * Whether to send a welcome email */ - 'roleId'?: string; + 'sendWelcomeEmail'?: boolean; /** - * The user's primary team + * The user's role */ - 'primaryTeamId'?: string; + 'roleId'?: string; /** * The user's additional teams */ 'secondaryTeamIds'?: Array; /** - * Whether to send a welcome email + * The created user's email */ - 'sendWelcomeEmail': boolean; + 'email': string; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "email", - "baseName": "email", + "name": "primaryTeamId", + "baseName": "primaryTeamId", "type": "string", "format": "" }, { - "name": "roleId", - "baseName": "roleId", - "type": "string", + "name": "sendWelcomeEmail", + "baseName": "sendWelcomeEmail", + "type": "boolean", "format": "" }, { - "name": "primaryTeamId", - "baseName": "primaryTeamId", + "name": "roleId", + "baseName": "roleId", "type": "string", "format": "" }, @@ -64,9 +64,9 @@ export class UserProvisionRequest { "format": "" }, { - "name": "sendWelcomeEmail", - "baseName": "sendWelcomeEmail", - "type": "boolean", + "name": "email", + "baseName": "email", + "type": "string", "format": "" } ]; diff --git a/package-lock.json b/package-lock.json index a7752b442..c3c25e76d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hubspot/api-client", - "version": "9.1.1", + "version": "10.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hubspot/api-client", - "version": "9.1.1", + "version": "10.0.0", "license": "ISC", "dependencies": { "@types/node-fetch": "^2.5.7", diff --git a/package.json b/package.json index da226bd76..ae0f20654 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hubspot/api-client", - "version": "9.1.1", + "version": "10.0.0", "description": "NodeJS v3 [HubSpot API](https://developers.hubspot.com/docs/api/overview) SDK(Client) files", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/discovery/marketing/events/EventsDiscovery.ts b/src/discovery/marketing/events/EventsDiscovery.ts index 9595cf097..f2ebdffe6 100644 --- a/src/discovery/marketing/events/EventsDiscovery.ts +++ b/src/discovery/marketing/events/EventsDiscovery.ts @@ -1,12 +1,15 @@ import { AttendanceSubscriberStateChangesApi, + BasicApi, + BatchApi, createConfiguration, MarketingEventsExternalApi, RequestContext, ResponseContext, SearchApi, ServerConfiguration, - SettingsExternalApi, + SettingsApi, + SubscriberStateChangesApi, } from '../../../../codegen/marketing/events/index' import { Observable } from '../../../../codegen/marketing/events/rxjsStub' import { ApiClientConfigurator } from '../../../configuration/ApiClientConfigurator' @@ -15,9 +18,12 @@ import ApiDecoratorService from '../../../services/ApiDecoratorService' export default class EventsDiscovery { public attendanceSubscriberStateChangesApi: AttendanceSubscriberStateChangesApi + public basicApi: BasicApi + public batchApi: BatchApi public marketingEventsExternalApi: MarketingEventsExternalApi public searchApi: SearchApi - public settingsExternalApi: SettingsExternalApi + public settingsApi: SettingsApi + public subscriberStateChangesApi: SubscriberStateChangesApi constructor(config: IConfiguration) { const configuration = createConfiguration( @@ -34,12 +40,15 @@ export default class EventsDiscovery { ApiDecoratorService.getInstance().apply( new AttendanceSubscriberStateChangesApi(configuration), ) + this.basicApi = ApiDecoratorService.getInstance().apply(new BasicApi(configuration)) + this.batchApi = ApiDecoratorService.getInstance().apply(new BatchApi(configuration)) this.marketingEventsExternalApi = ApiDecoratorService.getInstance().apply( new MarketingEventsExternalApi(configuration), ) this.searchApi = ApiDecoratorService.getInstance().apply(new SearchApi(configuration)) - this.settingsExternalApi = ApiDecoratorService.getInstance().apply( - new SettingsExternalApi(configuration), + this.settingsApi = ApiDecoratorService.getInstance().apply(new SettingsApi(configuration)) + this.subscriberStateChangesApi = ApiDecoratorService.getInstance().apply( + new SubscriberStateChangesApi(configuration), ) } } diff --git a/test/spec/marketing/events/events.spec.ts b/test/spec/marketing/events/events.spec.ts index e03c37019..bfc529761 100644 --- a/test/spec/marketing/events/events.spec.ts +++ b/test/spec/marketing/events/events.spec.ts @@ -4,8 +4,11 @@ describe('api client', () => { it('is discoverable', () => { const client = new Client().marketing.events expect(client.hasOwnProperty('attendanceSubscriberStateChangesApi')).toBeTruthy() + expect(client.hasOwnProperty('basicApi')).toBeTruthy() + expect(client.hasOwnProperty('batchApi')).toBeTruthy() expect(client.hasOwnProperty('marketingEventsExternalApi')).toBeTruthy() expect(client.hasOwnProperty('searchApi')).toBeTruthy() - expect(client.hasOwnProperty('settingsExternalApi')).toBeTruthy() + expect(client.hasOwnProperty('settingsApi')).toBeTruthy() + expect(client.hasOwnProperty('subscriberStateChangesApi')).toBeTruthy() }) })