Skip to content

Commit

Permalink
Merge pull request #408 from HubSpot/feature/v10.0.0
Browse files Browse the repository at this point in the history
v10.0.0
  • Loading branch information
ksvirkou-hubspot authored Sep 25, 2023
2 parents bd5a8a0 + 1d2c2fd commit 2c67c28
Show file tree
Hide file tree
Showing 102 changed files with 2,863 additions and 2,341 deletions.
40 changes: 39 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>, userId?: Array<string>, after?: string, before?: string, sort?: Array<string>, eventType?: Array<string>, limit?: number, objectType?: Array<string>, _options?: Configuration)` => `cms.auditLogs.auditLogsApi.getPage(userId?: Array<string>, eventType?: Array<string>, objectType?: Array<string>, objectId?: Array<string>, after?: string, before?: string, limit?: number, sort?: Array<string>, _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

Expand Down Expand Up @@ -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
38 changes: 19 additions & 19 deletions codegen/cms/audit_logs/apis/AuditLogsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>, userId?: Array<string>, after?: string, before?: string, sort?: Array<string>, eventType?: Array<string>, limit?: number, objectType?: Array<string>, _options?: Configuration): Promise<RequestContext> {
public async getPage(userId?: Array<string>, eventType?: Array<string>, objectType?: Array<string>, objectId?: Array<string>, after?: string, before?: string, limit?: number, sort?: Array<string>, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;


Expand All @@ -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<string>", ""));
if (userId !== undefined) {
requestContext.setQueryParam("userId", ObjectSerializer.serialize(userId, "Array<string>", ""));
}

// Query Params
if (userId !== undefined) {
requestContext.setQueryParam("userId", ObjectSerializer.serialize(userId, "Array<string>", ""));
if (eventType !== undefined) {
requestContext.setQueryParam("eventType", ObjectSerializer.serialize(eventType, "Array<string>", ""));
}

// Query Params
if (after !== undefined) {
requestContext.setQueryParam("after", ObjectSerializer.serialize(after, "string", ""));
if (objectType !== undefined) {
requestContext.setQueryParam("objectType", ObjectSerializer.serialize(objectType, "Array<string>", ""));
}

// Query Params
if (before !== undefined) {
requestContext.setQueryParam("before", ObjectSerializer.serialize(before, "string", ""));
if (objectId !== undefined) {
requestContext.setQueryParam("objectId", ObjectSerializer.serialize(objectId, "Array<string>", ""));
}

// Query Params
if (sort !== undefined) {
requestContext.setQueryParam("sort", ObjectSerializer.serialize(sort, "Array<string>", ""));
if (after !== undefined) {
requestContext.setQueryParam("after", ObjectSerializer.serialize(after, "string", ""));
}

// Query Params
if (eventType !== undefined) {
requestContext.setQueryParam("eventType", ObjectSerializer.serialize(eventType, "Array<string>", ""));
if (before !== undefined) {
requestContext.setQueryParam("before", ObjectSerializer.serialize(before, "string", ""));
}

// Query Params
Expand All @@ -81,8 +81,8 @@ export class AuditLogsApiRequestFactory extends BaseAPIRequestFactory {
}

// Query Params
if (objectType !== undefined) {
requestContext.setQueryParam("objectType", ObjectSerializer.serialize(objectType, "Array<string>", ""));
if (sort !== undefined) {
requestContext.setQueryParam("sort", ObjectSerializer.serialize(sort, "Array<string>", ""));
}


Expand Down
5 changes: 4 additions & 1 deletion codegen/cms/audit_logs/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ 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';
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 = [
Expand Down Expand Up @@ -42,6 +44,7 @@ let typeMap: {[index: string]: any} = {
"ModelError": ModelError,
"NextPage": NextPage,
"Paging": Paging,
"PreviousPage": PreviousPage,
"PublicAuditLog": PublicAuditLog,
}

Expand Down
8 changes: 8 additions & 0 deletions codegen/cms/audit_logs/models/Paging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -23,6 +25,12 @@ export class Paging {
"baseName": "next",
"type": "NextPage",
"format": ""
},
{
"name": "prev",
"baseName": "prev",
"type": "PreviousPage",
"format": ""
} ];

static getAttributeTypeMap() {
Expand Down
41 changes: 41 additions & 0 deletions codegen/cms/audit_logs/models/PreviousPage.ts
Original file line number Diff line number Diff line change
@@ -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() {
}
}

45 changes: 26 additions & 19 deletions codegen/cms/audit_logs/models/PublicAuditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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",
Expand Down Expand Up @@ -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": ""
} ];

Expand All @@ -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" ;

1 change: 1 addition & 0 deletions codegen/cms/audit_logs/models/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
38 changes: 19 additions & 19 deletions codegen/cms/audit_logs/types/ObjectParamAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,53 @@ 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&lt;string&gt;
* @memberof AuditLogsApigetPage
*/
objectId?: Array<string>
userId?: Array<string>
/**
* 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&lt;string&gt;
* @memberof AuditLogsApigetPage
*/
userId?: Array<string>
eventType?: Array<string>
/**
* 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&lt;string&gt;
* @memberof AuditLogsApigetPage
*/
after?: string
objectType?: Array<string>
/**
* Timestamp before which audit logs will be returned
* @type string
* Comma separated list of object ids to filter by.
* @type Array&lt;string&gt;
* @memberof AuditLogsApigetPage
*/
before?: string
objectId?: Array<string>
/**
* The sort direction for the audit logs. (Can only sort by timestamp).
* @type Array&lt;string&gt;
* Timestamp after which audit logs will be returned
* @type string
* @memberof AuditLogsApigetPage
*/
sort?: Array<string>
after?: string
/**
* Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED).
* @type Array&lt;string&gt;
* Timestamp before which audit logs will be returned
* @type string
* @memberof AuditLogsApigetPage
*/
eventType?: Array<string>
before?: string
/**
* The number of logs to return.
* @type number
* @memberof AuditLogsApigetPage
*/
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&lt;string&gt;
* @memberof AuditLogsApigetPage
*/
objectType?: Array<string>
sort?: Array<string>
}

export class ObjectAuditLogsApi {
Expand All @@ -69,7 +69,7 @@ export class ObjectAuditLogsApi {
* @param param the request object
*/
public getPage(param: AuditLogsApiGetPageRequest = {}, options?: Configuration): Promise<CollectionResponsePublicAuditLog> {
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();
}

}
Loading

0 comments on commit 2c67c28

Please sign in to comment.