Skip to content

Commit 2c67c28

Browse files
Merge pull request #408 from HubSpot/feature/v10.0.0
v10.0.0
2 parents bd5a8a0 + 1d2c2fd commit 2c67c28

File tree

102 files changed

+2863
-2341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2863
-2341
lines changed

CHANGELOG.md

+39-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,44 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased](https://github.com/HubSpot/hubspot-api-nodejs/compare/9.1.1...HEAD)
8+
## [Unreleased](https://github.com/HubSpot/hubspot-api-nodejs/compare/10.0.0...HEAD)
9+
10+
## [10.0.0] - 2023-09-25
11+
12+
## Updated
13+
14+
- `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)`
15+
- Cnange type from `number` to `string` in `cms/hubdb/models/HubDbTableRowV3BatchUpdateRequest.id`.
16+
- Nullable `startDatetime`, `endDatetime` and `totalRequestTime` in `cms/performance/models/PerformanceView`.
17+
- Rename `cms.sourceCode.contentApi.get()` => `cms.sourceCode.contentApi.download()`
18+
- Rename `cms.sourceCode.contentApi.replace()` => `cms.sourceCode.contentApi.createOrUpdate()`
19+
- `crm.timeline.eventsApi.createBatch() BatchResponseTimelineEventResponse | BatchResponseTimelineEventResponseWithErrors` => `crm.timeline.eventsApi.createBatch() BatchResponseTimelineEventResponse | void | BatchResponseTimelineEventResponseWithErrors`
20+
- Cnange type from `ErrorCategory` to `string` in `crm/timeline/models/StandardError::category`.
21+
- Nullable `options` in `crm/timeline/models/TimelineEventTemplateToken` and `codegen/crm/timeline/models/TimelineEventTemplateTokenUpdateRequest`.
22+
- Required `links` in `files/models/FolderUpdateTaskLocator` and `files/models/ImportFromUrlTaskLocator`.
23+
- Nullable `duplicateValidationStrategy`, `duplicateValidationScope` and `overwrite` in `files/models/ImportFromUrlInput`.
24+
- Cnange type from `ErrorCategory` to `string` in `files/models/StandardError::category`.
25+
- Move method `archive` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`.
26+
- Move method `create` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`.
27+
- Move method `doCancel` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`.
28+
- Move method `getById` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`.
29+
- Move method `replace` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`.
30+
- Move method `update` from `marketing.events.marketingEventsExternalApi` to `marketing.events.basicApi`.
31+
- Move method `archiveBatch` from `marketing.events.marketingEventsExternalApi` to `marketing.events.batchApi`.
32+
- Move method `doUpsert` from `marketing.events.marketingEventsExternalApi` to `marketing.events.batchApi`.
33+
- Move method `doEmailUpsertById` from `marketing.events.marketingEventsExternalApi` to `marketing.events.subscriberStateChanges`.
34+
- Move method `doUpsertById` from `marketing.events.marketingEventsExternalApi` to `marketing.events.subscriberStateChanges`.
35+
- Rename `marketing.events.settingsExternalApi` => `marketing.events.settingsApi`
36+
- Cnange type from `ErrorCategory` to `string` in `marketing/events/models/StandardError::category`.
37+
38+
## Added
39+
40+
- Added param `prev` to `cms/audit_logs/models/PreviousPage`.
41+
- Added param `properties` to `cms.sourceCode.metadataApi.get()`.
42+
- Added param `hash` to `cms/source_code/models/AssetFileMetadata`.
43+
- Added method `getMetadata` to `files.filesApi`.
44+
- Added param `expiresAt` to `files/models/FileUpdateInput` and `files/models/ModelFile`.
45+
- Added params `roleIds`, `sendWelcomeEmail` and `superAdmin` to `settings/users/models/PublicUser`
946

1047
## [9.1.1] - 2023-08-16
1148

@@ -671,3 +708,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
671708
[9.0.1]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/9.0.1
672709
[9.1.0]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/9.1.0
673710
[9.1.1]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/9.1.1
711+
[10.0.0]: https://github.com/HubSpot/hubspot-api-nodejs/releases/tag/10.0.0

codegen/cms/audit_logs/apis/AuditLogsApi.ts

+19-19
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ export class AuditLogsApiRequestFactory extends BaseAPIRequestFactory {
1818
/**
1919
* Returns audit logs based on filters.
2020
* Query audit logs
21-
* @param objectId Comma separated list of object ids to filter by.
2221
* @param userId Comma separated list of user ids to filter by.
22+
* @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED).
23+
* @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.)
24+
* @param objectId Comma separated list of object ids to filter by.
2325
* @param after Timestamp after which audit logs will be returned
2426
* @param before Timestamp before which audit logs will be returned
25-
* @param sort The sort direction for the audit logs. (Can only sort by timestamp).
26-
* @param eventType Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED).
2727
* @param limit The number of logs to return.
28-
* @param objectType Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.)
28+
* @param sort The sort direction for the audit logs. (Can only sort by timestamp).
2929
*/
30-
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> {
30+
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> {
3131
let _config = _options || this.configuration;
3232

3333

@@ -46,33 +46,33 @@ export class AuditLogsApiRequestFactory extends BaseAPIRequestFactory {
4646
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
4747

4848
// Query Params
49-
if (objectId !== undefined) {
50-
requestContext.setQueryParam("objectId", ObjectSerializer.serialize(objectId, "Array<string>", ""));
49+
if (userId !== undefined) {
50+
requestContext.setQueryParam("userId", ObjectSerializer.serialize(userId, "Array<string>", ""));
5151
}
5252

5353
// Query Params
54-
if (userId !== undefined) {
55-
requestContext.setQueryParam("userId", ObjectSerializer.serialize(userId, "Array<string>", ""));
54+
if (eventType !== undefined) {
55+
requestContext.setQueryParam("eventType", ObjectSerializer.serialize(eventType, "Array<string>", ""));
5656
}
5757

5858
// Query Params
59-
if (after !== undefined) {
60-
requestContext.setQueryParam("after", ObjectSerializer.serialize(after, "string", ""));
59+
if (objectType !== undefined) {
60+
requestContext.setQueryParam("objectType", ObjectSerializer.serialize(objectType, "Array<string>", ""));
6161
}
6262

6363
// Query Params
64-
if (before !== undefined) {
65-
requestContext.setQueryParam("before", ObjectSerializer.serialize(before, "string", ""));
64+
if (objectId !== undefined) {
65+
requestContext.setQueryParam("objectId", ObjectSerializer.serialize(objectId, "Array<string>", ""));
6666
}
6767

6868
// Query Params
69-
if (sort !== undefined) {
70-
requestContext.setQueryParam("sort", ObjectSerializer.serialize(sort, "Array<string>", ""));
69+
if (after !== undefined) {
70+
requestContext.setQueryParam("after", ObjectSerializer.serialize(after, "string", ""));
7171
}
7272

7373
// Query Params
74-
if (eventType !== undefined) {
75-
requestContext.setQueryParam("eventType", ObjectSerializer.serialize(eventType, "Array<string>", ""));
74+
if (before !== undefined) {
75+
requestContext.setQueryParam("before", ObjectSerializer.serialize(before, "string", ""));
7676
}
7777

7878
// Query Params
@@ -81,8 +81,8 @@ export class AuditLogsApiRequestFactory extends BaseAPIRequestFactory {
8181
}
8282

8383
// Query Params
84-
if (objectType !== undefined) {
85-
requestContext.setQueryParam("objectType", ObjectSerializer.serialize(objectType, "Array<string>", ""));
84+
if (sort !== undefined) {
85+
requestContext.setQueryParam("sort", ObjectSerializer.serialize(sort, "Array<string>", ""));
8686
}
8787

8888

codegen/cms/audit_logs/models/ObjectSerializer.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ export * from '../models/ErrorDetail';
33
export * from '../models/ModelError';
44
export * from '../models/NextPage';
55
export * from '../models/Paging';
6+
export * from '../models/PreviousPage';
67
export * from '../models/PublicAuditLog';
78

89
import { CollectionResponsePublicAuditLog } from '../models/CollectionResponsePublicAuditLog';
910
import { ErrorDetail } from '../models/ErrorDetail';
1011
import { ModelError } from '../models/ModelError';
1112
import { NextPage } from '../models/NextPage';
1213
import { Paging } from '../models/Paging';
13-
import { PublicAuditLog } from '../models/PublicAuditLog';
14+
import { PreviousPage } from '../models/PreviousPage';
15+
import { PublicAuditLog } from '../models/PublicAuditLog';
1416

1517
/* tslint:disable:no-unused-variable */
1618
let primitives = [
@@ -42,6 +44,7 @@ let typeMap: {[index: string]: any} = {
4244
"ModelError": ModelError,
4345
"NextPage": NextPage,
4446
"Paging": Paging,
47+
"PreviousPage": PreviousPage,
4548
"PublicAuditLog": PublicAuditLog,
4649
}
4750

codegen/cms/audit_logs/models/Paging.ts

+8
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
*/
1212

1313
import { NextPage } from '../models/NextPage';
14+
import { PreviousPage } from '../models/PreviousPage';
1415

1516
export class Paging {
1617
'next'?: NextPage;
18+
'prev'?: PreviousPage;
1719

1820
static readonly discriminator: string | undefined = undefined;
1921

@@ -23,6 +25,12 @@ export class Paging {
2325
"baseName": "next",
2426
"type": "NextPage",
2527
"format": ""
28+
},
29+
{
30+
"name": "prev",
31+
"baseName": "prev",
32+
"type": "PreviousPage",
33+
"format": ""
2634
} ];
2735

2836
static getAttributeTypeMap() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* CMS Audit Logs
3+
* Use this endpoint to query audit logs of CMS changes that occurred on your HubSpot account.
4+
*
5+
* OpenAPI spec version: v3
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
export class PreviousPage {
15+
'before': string;
16+
'link'?: string;
17+
18+
static readonly discriminator: string | undefined = undefined;
19+
20+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
21+
{
22+
"name": "before",
23+
"baseName": "before",
24+
"type": "string",
25+
"format": ""
26+
},
27+
{
28+
"name": "link",
29+
"baseName": "link",
30+
"type": "string",
31+
"format": ""
32+
} ];
33+
34+
static getAttributeTypeMap() {
35+
return PreviousPage.attributeTypeMap;
36+
}
37+
38+
public constructor() {
39+
}
40+
}
41+

codegen/cms/audit_logs/models/PublicAuditLog.ts

+26-19
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212

1313

1414
export class PublicAuditLog {
15+
/**
16+
* The type of event that took place (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED).
17+
*/
18+
'event': PublicAuditLogEventEnum;
19+
/**
20+
* The type of the object (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.)
21+
*/
22+
'objectType': PublicAuditLogObjectTypeEnum;
1523
/**
1624
* The ID of the object.
1725
*/
@@ -32,18 +40,23 @@ export class PublicAuditLog {
3240
* The name of the user who caused the event.
3341
*/
3442
'fullName': string;
35-
/**
36-
* The type of event that took place (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED).
37-
*/
38-
'event': PublicAuditLogEventEnum;
39-
/**
40-
* The type of the object (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.)
41-
*/
42-
'objectType': PublicAuditLogObjectTypeEnum;
43+
'meta'?: any;
4344

4445
static readonly discriminator: string | undefined = undefined;
4546

4647
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
48+
{
49+
"name": "event",
50+
"baseName": "event",
51+
"type": "PublicAuditLogEventEnum",
52+
"format": ""
53+
},
54+
{
55+
"name": "objectType",
56+
"baseName": "objectType",
57+
"type": "PublicAuditLogObjectTypeEnum",
58+
"format": ""
59+
},
4760
{
4861
"name": "objectId",
4962
"baseName": "objectId",
@@ -75,15 +88,9 @@ export class PublicAuditLog {
7588
"format": ""
7689
},
7790
{
78-
"name": "event",
79-
"baseName": "event",
80-
"type": "PublicAuditLogEventEnum",
81-
"format": ""
82-
},
83-
{
84-
"name": "objectType",
85-
"baseName": "objectType",
86-
"type": "PublicAuditLogObjectTypeEnum",
91+
"name": "meta",
92+
"baseName": "meta",
93+
"type": "any",
8794
"format": ""
8895
} ];
8996

@@ -96,6 +103,6 @@ export class PublicAuditLog {
96103
}
97104

98105

99-
export type PublicAuditLogEventEnum = "CREATED" | "UPDATED" | "PUBLISHED" | "DELETED" | "UNPUBLISHED" ;
100-
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" ;
106+
export type PublicAuditLogEventEnum = "CREATED" | "UPDATED" | "PUBLISHED" | "DELETED" | "UNPUBLISHED" | "RESTORE" ;
107+
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" ;
101108

codegen/cms/audit_logs/models/all.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export * from '../models/ErrorDetail'
33
export * from '../models/ModelError'
44
export * from '../models/NextPage'
55
export * from '../models/Paging'
6+
export * from '../models/PreviousPage'
67
export * from '../models/PublicAuditLog'

codegen/cms/audit_logs/types/ObjectParamAPI.ts

+19-19
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,53 @@ import { AuditLogsApiRequestFactory, AuditLogsApiResponseProcessor} from "../api
77

88
export interface AuditLogsApiGetPageRequest {
99
/**
10-
* Comma separated list of object ids to filter by.
10+
* Comma separated list of user ids to filter by.
1111
* @type Array&lt;string&gt;
1212
* @memberof AuditLogsApigetPage
1313
*/
14-
objectId?: Array<string>
14+
userId?: Array<string>
1515
/**
16-
* Comma separated list of user ids to filter by.
16+
* Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED).
1717
* @type Array&lt;string&gt;
1818
* @memberof AuditLogsApigetPage
1919
*/
20-
userId?: Array<string>
20+
eventType?: Array<string>
2121
/**
22-
* Timestamp after which audit logs will be returned
23-
* @type string
22+
* Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.)
23+
* @type Array&lt;string&gt;
2424
* @memberof AuditLogsApigetPage
2525
*/
26-
after?: string
26+
objectType?: Array<string>
2727
/**
28-
* Timestamp before which audit logs will be returned
29-
* @type string
28+
* Comma separated list of object ids to filter by.
29+
* @type Array&lt;string&gt;
3030
* @memberof AuditLogsApigetPage
3131
*/
32-
before?: string
32+
objectId?: Array<string>
3333
/**
34-
* The sort direction for the audit logs. (Can only sort by timestamp).
35-
* @type Array&lt;string&gt;
34+
* Timestamp after which audit logs will be returned
35+
* @type string
3636
* @memberof AuditLogsApigetPage
3737
*/
38-
sort?: Array<string>
38+
after?: string
3939
/**
40-
* Comma separated list of event types to filter by (CREATED, UPDATED, PUBLISHED, DELETED, UNPUBLISHED).
41-
* @type Array&lt;string&gt;
40+
* Timestamp before which audit logs will be returned
41+
* @type string
4242
* @memberof AuditLogsApigetPage
4343
*/
44-
eventType?: Array<string>
44+
before?: string
4545
/**
4646
* The number of logs to return.
4747
* @type number
4848
* @memberof AuditLogsApigetPage
4949
*/
5050
limit?: number
5151
/**
52-
* Comma separated list of object types to filter by (BLOG, LANDING_PAGE, DOMAIN, HUBDB_TABLE etc.)
52+
* The sort direction for the audit logs. (Can only sort by timestamp).
5353
* @type Array&lt;string&gt;
5454
* @memberof AuditLogsApigetPage
5555
*/
56-
objectType?: Array<string>
56+
sort?: Array<string>
5757
}
5858

5959
export class ObjectAuditLogsApi {
@@ -69,7 +69,7 @@ export class ObjectAuditLogsApi {
6969
* @param param the request object
7070
*/
7171
public getPage(param: AuditLogsApiGetPageRequest = {}, options?: Configuration): Promise<CollectionResponsePublicAuditLog> {
72-
return this.api.getPage(param.objectId, param.userId, param.after, param.before, param.sort, param.eventType, param.limit, param.objectType, options).toPromise();
72+
return this.api.getPage(param.userId, param.eventType, param.objectType, param.objectId, param.after, param.before, param.limit, param.sort, options).toPromise();
7373
}
7474

7575
}

0 commit comments

Comments
 (0)