diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 347d8bf7..931fce1a 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.9"
+ ".": "0.1.0-alpha.10"
}
diff --git a/.stats.yml b/.stats.yml
index 9441a68d..65bc8df1 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 955
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot/hubspot-sdk-8aa2c4935982d3998769d656b2caae13c71151b5f00caaa875357ceb83f6e0a6.yml
-openapi_spec_hash: 47d20b6496315d47f4f64441d4682f47
-config_hash: 9c2a17b9755f3edac92a3ec4b93ac51c
+configured_endpoints: 959
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot/hubspot-sdk-3260c0cfb88ce2653c37c4c97e1dd39b965df4f2c14177677bc46d95b104525d.yml
+openapi_spec_hash: 93b8671a542b331e067319184c943fdd
+config_hash: 0bcc56e67986936da66e382674e17c79
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8c48583..ac878884 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## 0.1.0-alpha.10 (2026-05-26)
+
+Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/HubSpot/hubspot-sdk-typescript/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
+
+### Features
+
+* **api:** manual updates ([e45d0b4](https://github.com/HubSpot/hubspot-sdk-typescript/commit/e45d0b4366da37911312a9e24c97fa4579411553))
+* **api:** manual updates ([b69a1bc](https://github.com/HubSpot/hubspot-sdk-typescript/commit/b69a1bca2d05b92d248f4ced6b5844c3d0fde4ba))
+* **api:** manual updates ([3cdcc58](https://github.com/HubSpot/hubspot-sdk-typescript/commit/3cdcc58594135075c61b6e5732dd10c4848d8337))
+
+
+### Chores
+
+* configure new SDK language ([45a1eb1](https://github.com/HubSpot/hubspot-sdk-typescript/commit/45a1eb12ae407caf090294bc4bcb9645d82168a3))
+
## 0.1.0-alpha.9 (2026-05-19)
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/HubSpot/hubspot-sdk-typescript/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
diff --git a/api.md b/api.md
index cfff18d8..031b9100 100644
--- a/api.md
+++ b/api.md
@@ -3,21 +3,39 @@
Types:
- AbTestCreateRequestVNext
+- ActionOverrideRequest
- ActionResponse
+- AppLifecycleEventSubscriptionUpsertRequest
- AssociationDefinition
- AssociationDefinitionEgg
- AssociationSpec
+- AssociationSubscriptionUpsertRequest
- AutomationActionsOption
- BatchInputPropertyCreate
- BatchInputPropertyName
- BatchInputPublicObjectID
- BatchInputString
- BatchReadInputPropertyName
+- BatchResponseJournalFetchResponse
+- BatchResponseJournalFetchResponseWithErrors
- CollectionResponsePropertyGroupNoPaging
+- Condition
+- CrmObjectSnapshotBatchRequest
+- CrmObjectSnapshotBatchResponse
+- CrmObjectSnapshotRequest
+- CrmObjectSnapshotResponse
- ErrorData
- ErrorDetail
+- Filter
+- FilterCreateRequest
+- FilterCreateResponse
+- FilterResponse
- ForwardPaging
+- GdprPrivacyDeletionSubscriptionUpsertRequest
+- JournalFetchResponse
+- ListMembershipSubscriptionUpsertRequest
- NextPage
+- ObjectSubscriptionUpsertRequest
- ObjectTypeDefinition
- ObjectTypeDefinitionLabels
- ObjectTypeDefinitionPatch
@@ -34,7 +52,9 @@ Types:
- PropertyName
- PropertyValue
- PublicObjectID
+- SnapshotStatusResponse
- StandardError
+- SubscriptionUpsertRequest
- TaskLocator
- VersionUser
@@ -67,3 +87,5 @@ Types:
# [Settings](src/resources/settings/api.md)
# [Webhooks](src/resources/webhooks/api.md)
+
+# [WebhooksJournal](src/resources/webhooks-journal/api.md)
diff --git a/package.json b/package.json
index 9be9c670..04df2425 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@hubspot/sdk",
- "version": "0.1.0-alpha.9",
+ "version": "0.1.0-alpha.10",
"description": "The official TypeScript library for the HubSpot API",
"author": "HubSpot <>",
"types": "dist/index.d.ts",
diff --git a/src/client.ts b/src/client.ts
index 48cfe174..1f0f9a3f 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -33,6 +33,7 @@ import { Marketing } from './resources/marketing/marketing';
import { Meta } from './resources/meta/meta';
import { Scheduler } from './resources/scheduler/scheduler';
import { Settings } from './resources/settings/settings';
+import { WebhooksJournal } from './resources/webhooks-journal/webhooks-journal';
import { Webhooks } from './resources/webhooks/webhooks';
import { type Fetch } from './internal/builtin-types';
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
@@ -793,6 +794,7 @@ export class HubSpot extends BaseHubSpot {
scheduler: API.Scheduler = new API.Scheduler(this);
settings: API.Settings = new API.Settings(this);
webhooks: API.Webhooks = new API.Webhooks(this);
+ webhooksJournal: API.WebhooksJournal = new API.WebhooksJournal(this);
}
HubSpot.Account = Account;
@@ -810,6 +812,7 @@ HubSpot.Meta = Meta;
HubSpot.Scheduler = Scheduler;
HubSpot.Settings = Settings;
HubSpot.Webhooks = Webhooks;
+HubSpot.WebhooksJournal = WebhooksJournal;
export declare namespace HubSpot {
export type RequestOptions = Opts.RequestOptions;
@@ -847,22 +850,42 @@ export declare namespace HubSpot {
export { Webhooks as Webhooks };
+ export { WebhooksJournal as WebhooksJournal };
+
export type AbTestCreateRequestVNext = API.AbTestCreateRequestVNext;
+ export type ActionOverrideRequest = API.ActionOverrideRequest;
export type ActionResponse = API.ActionResponse;
+ export type AppLifecycleEventSubscriptionUpsertRequest = API.AppLifecycleEventSubscriptionUpsertRequest;
export type AssociationDefinition = API.AssociationDefinition;
export type AssociationDefinitionEgg = API.AssociationDefinitionEgg;
export type AssociationSpec = API.AssociationSpec;
+ export type AssociationSubscriptionUpsertRequest = API.AssociationSubscriptionUpsertRequest;
export type AutomationActionsOption = API.AutomationActionsOption;
export type BatchInputPropertyCreate = API.BatchInputPropertyCreate;
export type BatchInputPropertyName = API.BatchInputPropertyName;
export type BatchInputPublicObjectID = API.BatchInputPublicObjectID;
export type BatchInputString = API.BatchInputString;
export type BatchReadInputPropertyName = API.BatchReadInputPropertyName;
+ export type BatchResponseJournalFetchResponse = API.BatchResponseJournalFetchResponse;
+ export type BatchResponseJournalFetchResponseWithErrors = API.BatchResponseJournalFetchResponseWithErrors;
export type CollectionResponsePropertyGroupNoPaging = API.CollectionResponsePropertyGroupNoPaging;
+ export type Condition = API.Condition;
+ export type CrmObjectSnapshotBatchRequest = API.CrmObjectSnapshotBatchRequest;
+ export type CrmObjectSnapshotBatchResponse = API.CrmObjectSnapshotBatchResponse;
+ export type CrmObjectSnapshotRequest = API.CrmObjectSnapshotRequest;
+ export type CrmObjectSnapshotResponse = API.CrmObjectSnapshotResponse;
export type ErrorData = API.ErrorData;
export type ErrorDetail = API.ErrorDetail;
+ export type Filter = API.Filter;
+ export type FilterCreateRequest = API.FilterCreateRequest;
+ export type FilterCreateResponse = API.FilterCreateResponse;
+ export type FilterResponse = API.FilterResponse;
export type ForwardPaging = API.ForwardPaging;
+ export type GdprPrivacyDeletionSubscriptionUpsertRequest = API.GdprPrivacyDeletionSubscriptionUpsertRequest;
+ export type JournalFetchResponse = API.JournalFetchResponse;
+ export type ListMembershipSubscriptionUpsertRequest = API.ListMembershipSubscriptionUpsertRequest;
export type NextPage = API.NextPage;
+ export type ObjectSubscriptionUpsertRequest = API.ObjectSubscriptionUpsertRequest;
export type ObjectTypeDefinition = API.ObjectTypeDefinition;
export type ObjectTypeDefinitionLabels = API.ObjectTypeDefinitionLabels;
export type ObjectTypeDefinitionPatch = API.ObjectTypeDefinitionPatch;
@@ -879,7 +902,9 @@ export declare namespace HubSpot {
export type PropertyName = API.PropertyName;
export type PropertyValue = API.PropertyValue;
export type PublicObjectID = API.PublicObjectID;
+ export type SnapshotStatusResponse = API.SnapshotStatusResponse;
export type StandardError = API.StandardError;
+ export type SubscriptionUpsertRequest = API.SubscriptionUpsertRequest;
export type TaskLocator = API.TaskLocator;
export type VersionUser = API.VersionUser;
}
diff --git a/src/resources/auth/api.md b/src/resources/auth/api.md
index ee3ab28c..43aefc9f 100644
--- a/src/resources/auth/api.md
+++ b/src/resources/auth/api.md
@@ -4,13 +4,16 @@
Types:
+- AccessTokenResponse
+- ClientCredentialsTokenResponse
- PublicAccessTokenInfoResponse
- PublicRefreshTokenInfoResponse
- SignedAccessToken
- TokenInfoResponseBaseIf
+- TokenResponseIf
Methods:
-- client.auth.oauth.createToken({ ...params }) -> Response
+- client.auth.oauth.createToken({ ...params }) -> TokenResponseIf
- client.auth.oauth.introspectToken({ ...params }) -> TokenInfoResponseBaseIf
- client.auth.oauth.revokeToken({ ...params }) -> Response
diff --git a/src/resources/auth/auth.ts b/src/resources/auth/auth.ts
index b59efef1..899742f5 100644
--- a/src/resources/auth/auth.ts
+++ b/src/resources/auth/auth.ts
@@ -3,7 +3,9 @@
import { APIResource } from '../../core/resource';
import * as OAuthAPI from './oauth';
import {
+ AccessTokenResponse,
BaseOAuth,
+ ClientCredentialsTokenResponse,
OAuth,
OAuthCreateTokenParams,
OAuthIntrospectTokenParams,
@@ -12,6 +14,7 @@ import {
PublicRefreshTokenInfoResponse,
SignedAccessToken,
TokenInfoResponseBaseIf,
+ TokenResponseIf,
} from './oauth';
export class BaseAuth extends APIResource {
@@ -28,10 +31,13 @@ export declare namespace Auth {
export {
OAuth as OAuth,
BaseOAuth as BaseOAuth,
+ type AccessTokenResponse as AccessTokenResponse,
+ type ClientCredentialsTokenResponse as ClientCredentialsTokenResponse,
type PublicAccessTokenInfoResponse as PublicAccessTokenInfoResponse,
type PublicRefreshTokenInfoResponse as PublicRefreshTokenInfoResponse,
type SignedAccessToken as SignedAccessToken,
type TokenInfoResponseBaseIf as TokenInfoResponseBaseIf,
+ type TokenResponseIf as TokenResponseIf,
type OAuthCreateTokenParams as OAuthCreateTokenParams,
type OAuthIntrospectTokenParams as OAuthIntrospectTokenParams,
type OAuthRevokeTokenParams as OAuthRevokeTokenParams,
diff --git a/src/resources/auth/index.ts b/src/resources/auth/index.ts
index 69e56298..c63664d5 100644
--- a/src/resources/auth/index.ts
+++ b/src/resources/auth/index.ts
@@ -4,10 +4,13 @@ export { Auth, BaseAuth } from './auth';
export {
OAuth,
BaseOAuth,
+ type AccessTokenResponse,
+ type ClientCredentialsTokenResponse,
type PublicAccessTokenInfoResponse,
type PublicRefreshTokenInfoResponse,
type SignedAccessToken,
type TokenInfoResponseBaseIf,
+ type TokenResponseIf,
type OAuthCreateTokenParams,
type OAuthIntrospectTokenParams,
type OAuthRevokeTokenParams,
diff --git a/src/resources/auth/oauth.ts b/src/resources/auth/oauth.ts
index 13a0cad6..84b6ce21 100644
--- a/src/resources/auth/oauth.ts
+++ b/src/resources/auth/oauth.ts
@@ -14,15 +14,11 @@ export class BaseOAuth extends APIResource {
createToken(
body: OAuthCreateTokenParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.post('/oauth/2026-03/token', {
body,
...options,
- headers: buildHeaders([
- { 'Content-Type': 'application/x-www-form-urlencoded', Accept: '*/*' },
- options?.headers,
- ]),
- __binaryResponse: true,
+ headers: buildHeaders([{ 'Content-Type': 'application/x-www-form-urlencoded' }, options?.headers]),
});
}
@@ -60,6 +56,44 @@ export class BaseOAuth extends APIResource {
}
export class OAuth extends BaseOAuth {}
+export interface AccessTokenResponse {
+ access_token: string;
+
+ expires_in: number;
+
+ refresh_token: string;
+
+ token_type: string;
+
+ token_use: 'access_token';
+
+ hub_id?: number;
+
+ id_token?: string;
+
+ scopes?: Array;
+
+ user_id?: number;
+}
+
+export interface ClientCredentialsTokenResponse {
+ access_token: string;
+
+ expires_in: number;
+
+ token_type: string;
+
+ token_use: 'client_credentials';
+
+ hub_id?: number;
+
+ id_token?: string;
+
+ scopes?: Array;
+
+ user_id?: number;
+}
+
export interface PublicAccessTokenInfoResponse {
token: string;
@@ -148,6 +182,8 @@ export interface SignedAccessToken {
export type TokenInfoResponseBaseIf = PublicAccessTokenInfoResponse | PublicRefreshTokenInfoResponse;
+export type TokenResponseIf = AccessTokenResponse | ClientCredentialsTokenResponse;
+
export interface OAuthCreateTokenParams {
client_id?: string;
@@ -157,7 +193,7 @@ export interface OAuthCreateTokenParams {
code_verifier?: string;
- grant_type?: 'authorization_code' | 'refresh_token';
+ grant_type?: 'authorization_code' | 'client_credentials' | 'refresh_token';
redirect_uri?: string;
@@ -188,10 +224,13 @@ export interface OAuthRevokeTokenParams {
export declare namespace OAuth {
export {
+ type AccessTokenResponse as AccessTokenResponse,
+ type ClientCredentialsTokenResponse as ClientCredentialsTokenResponse,
type PublicAccessTokenInfoResponse as PublicAccessTokenInfoResponse,
type PublicRefreshTokenInfoResponse as PublicRefreshTokenInfoResponse,
type SignedAccessToken as SignedAccessToken,
type TokenInfoResponseBaseIf as TokenInfoResponseBaseIf,
+ type TokenResponseIf as TokenResponseIf,
type OAuthCreateTokenParams as OAuthCreateTokenParams,
type OAuthIntrospectTokenParams as OAuthIntrospectTokenParams,
type OAuthRevokeTokenParams as OAuthRevokeTokenParams,
diff --git a/src/resources/automation/actions/actions.ts b/src/resources/automation/actions/actions.ts
index c0489ec1..d4e942bb 100644
--- a/src/resources/automation/actions/actions.ts
+++ b/src/resources/automation/actions/actions.ts
@@ -86,7 +86,7 @@ export interface ArrayFieldSchema {
/**
* Specifies that the field is of type 'ARRAY'.
*/
- type: 'ARRAY' | 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'LONG' | 'OBJECT' | 'STRING';
+ type: 'ARRAY';
}
export interface BatchInputCallbackCompletionBatchRequest {
@@ -98,7 +98,7 @@ export interface BooleanFieldSchema {
* Specifies the field type as BOOLEAN, indicating that the field can hold a true
* or false value.
*/
- type: 'ARRAY' | 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'LONG' | 'OBJECT' | 'STRING';
+ type: 'BOOLEAN';
}
export interface CallbackCompletionBatchRequest {
@@ -302,7 +302,7 @@ export interface DoubleFieldSchema {
/**
* Indicates the field type as DOUBLE.
*/
- type: 'ARRAY' | 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'LONG' | 'OBJECT' | 'STRING';
+ type: 'DOUBLE';
/**
* The maximum allowable value for the double field.
@@ -581,7 +581,7 @@ export interface IntegerFieldSchema {
/**
* The type of the field, which is set to INTEGER.
*/
- type: 'ARRAY' | 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'LONG' | 'OBJECT' | 'STRING';
+ type: 'INTEGER';
/**
* The maximum value allowed for the integer field.
@@ -598,7 +598,7 @@ export interface LongFieldSchema {
/**
* The type of the field, which is LONG by default.
*/
- type: 'ARRAY' | 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'LONG' | 'OBJECT' | 'STRING';
+ type: 'LONG';
/**
* The maximum value allowed for the long field.
@@ -620,7 +620,7 @@ export interface ObjectFieldSchema {
/**
* Specifies the type of the field, which is 'OBJECT' by default.
*/
- type: 'ARRAY' | 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'LONG' | 'OBJECT' | 'STRING';
+ type: 'OBJECT';
}
export interface OutputFieldDefinition {
@@ -1001,7 +1001,7 @@ export interface StringFieldSchema {
/**
* Indicates that the type is a string, with the default value being STRING.
*/
- type: 'ARRAY' | 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'LONG' | 'OBJECT' | 'STRING';
+ type: 'STRING';
/**
* Specifies the format of the string, with accepted values: DATE, DATE_TIME,
diff --git a/src/resources/cms/api.md b/src/resources/cms/api.md
index f8f82e8f..455ba170 100644
--- a/src/resources/cms/api.md
+++ b/src/resources/cms/api.md
@@ -630,10 +630,8 @@ Methods:
Types:
-- ContentSearchResult
- IndexedData
- IndexedField
-- PublicSearchResults
Methods:
@@ -678,4 +676,8 @@ Methods:
- client.cms.urlRedirects.update(urlRedirectID, { ...params }) -> URLMapping
- client.cms.urlRedirects.list({ ...params }) -> URLMappingsPage
- client.cms.urlRedirects.delete(urlRedirectID) -> void
+- client.cms.urlRedirects.createURLMapping({ ...params }) -> Response
+- client.cms.urlRedirects.deleteURLMapping(id) -> void
- client.cms.urlRedirects.get(urlRedirectID) -> URLMapping
+- client.cms.urlRedirects.getURLMapping(id) -> Response
+- client.cms.urlRedirects.listURLMappings() -> Response
diff --git a/src/resources/cms/cms.ts b/src/resources/cms/cms.ts
index 4eb11233..d1f0f6ae 100644
--- a/src/resources/cms/cms.ts
+++ b/src/resources/cms/cms.ts
@@ -25,10 +25,8 @@ import {
import * as SiteSearchAPI from './site-search';
import {
BaseSiteSearch,
- ContentSearchResult,
IndexedData,
IndexedField,
- PublicSearchResults,
SiteSearch,
SiteSearchGetIndexedDataParams,
} from './site-search';
@@ -50,6 +48,7 @@ import {
URLMappingCreateRequestBody,
URLMappingsPage,
URLRedirectCreateParams,
+ URLRedirectCreateURLMappingParams,
URLRedirectListParams,
URLRedirectUpdateParams,
URLRedirects,
@@ -3511,10 +3510,8 @@ export declare namespace Cms {
export {
SiteSearch as SiteSearch,
BaseSiteSearch as BaseSiteSearch,
- type ContentSearchResult as ContentSearchResult,
type IndexedData as IndexedData,
type IndexedField as IndexedField,
- type PublicSearchResults as PublicSearchResults,
type SiteSearchGetIndexedDataParams as SiteSearchGetIndexedDataParams,
};
@@ -3543,5 +3540,6 @@ export declare namespace Cms {
type URLRedirectCreateParams as URLRedirectCreateParams,
type URLRedirectUpdateParams as URLRedirectUpdateParams,
type URLRedirectListParams as URLRedirectListParams,
+ type URLRedirectCreateURLMappingParams as URLRedirectCreateURLMappingParams,
};
}
diff --git a/src/resources/cms/index.ts b/src/resources/cms/index.ts
index b9751c25..23d590ac 100644
--- a/src/resources/cms/index.ts
+++ b/src/resources/cms/index.ts
@@ -248,10 +248,8 @@ export {
export {
SiteSearch,
BaseSiteSearch,
- type ContentSearchResult,
type IndexedData,
type IndexedField,
- type PublicSearchResults,
type SiteSearchGetIndexedDataParams,
} from './site-search';
export {
@@ -276,5 +274,6 @@ export {
type URLRedirectCreateParams,
type URLRedirectUpdateParams,
type URLRedirectListParams,
+ type URLRedirectCreateURLMappingParams,
type URLMappingsPage,
} from './url-redirects';
diff --git a/src/resources/cms/media-bridge/media-bridge.ts b/src/resources/cms/media-bridge/media-bridge.ts
index a7251333..9564f52a 100644
--- a/src/resources/cms/media-bridge/media-bridge.ts
+++ b/src/resources/cms/media-bridge/media-bridge.ts
@@ -1121,6 +1121,10 @@ export interface InboundDBObjectType {
visibility?: 'Customer-facing' | 'Customer-facing public API' | 'Customer-facing UI' | 'Internal only';
+ visibility_values?: Array<
+ 'Customer-facing' | 'Internal only' | 'Customer-facing UI' | 'Customer-facing public API'
+ >;
+
writeScopeName?: string;
}
diff --git a/src/resources/cms/site-search.ts b/src/resources/cms/site-search.ts
index 45730b6a..b6e4f772 100644
--- a/src/resources/cms/site-search.ts
+++ b/src/resources/cms/site-search.ts
@@ -26,950 +26,6 @@ export class BaseSiteSearch extends APIResource {
}
export class SiteSearch extends BaseSiteSearch {}
-export interface ContentSearchResult {
- /**
- * The ID of the content.
- */
- id: number;
-
- /**
- * The domain the document is hosted on.
- */
- domain: string;
-
- /**
- * The matching score of the document.
- */
- score: number;
-
- /**
- * The type of document. Can be `SITE_PAGE`, `LANDING_PAGE`, `BLOG_POST`,
- * `LISTING_PAGE`, or `KNOWLEDGE_ARTICLE`.
- */
- type:
- | 'BLOG_POST'
- | 'KNOWLEDGE_ARTICLE'
- | 'LANDING_PAGE'
- | 'LISTING_PAGE'
- | 'SITE_PAGE'
- | 'STRUCTURED_CONTENT';
-
- /**
- * The url of the document.
- */
- url: string;
-
- /**
- * Name of the author.
- */
- authorFullName?: string;
-
- /**
- * The error category
- */
- category?: string;
-
- /**
- * The ID of the document in HubSpot.
- */
- combinedId?: string;
-
- contentType?: string;
-
- /**
- * The result's description. The content will be determined by the value of
- * `length` in the request.
- */
- description?: string;
-
- /**
- * URL of the featured image.
- */
- featuredImageUrl?: string;
-
- inBeta?: boolean;
-
- isPrivate?: boolean;
-
- /**
- * The document's language.
- */
- language?:
- | 'aa'
- | 'ab'
- | 'ae'
- | 'af'
- | 'af-na'
- | 'af-za'
- | 'agq'
- | 'agq-cm'
- | 'ak'
- | 'ak-gh'
- | 'am'
- | 'am-et'
- | 'an'
- | 'ann'
- | 'ann-ng'
- | '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'
- | 'av'
- | 'ay'
- | 'az'
- | 'az-az'
- | 'ba'
- | 'bas'
- | 'bas-cm'
- | 'be'
- | 'be-by'
- | 'bem'
- | 'bem-zm'
- | 'bez'
- | 'bez-tz'
- | 'bg'
- | 'bg-bg'
- | 'bgc'
- | 'bgc-in'
- | 'bho'
- | 'bho-in'
- | 'bi'
- | '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'
- | 'ch'
- | 'chr'
- | 'chr-us'
- | 'ckb'
- | 'ckb-iq'
- | 'ckb-ir'
- | 'co'
- | 'cr'
- | 'cs'
- | 'cs-cz'
- | 'cu'
- | 'cu-ru'
- | 'cv'
- | 'cv-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'
- | 'dv'
- | '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-ee'
- | 'en-eg'
- | 'en-er'
- | 'en-es'
- | 'en-fi'
- | 'en-fj'
- | 'en-fk'
- | 'en-fm'
- | 'en-fr'
- | 'en-gb'
- | 'en-gd'
- | 'en-gg'
- | 'en-gh'
- | 'en-gi'
- | 'en-gm'
- | 'en-gu'
- | 'en-gy'
- | 'en-hk'
- | 'en-id'
- | '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-mv'
- | '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-pt'
- | '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-th'
- | 'en-tk'
- | 'en-tn'
- | 'en-to'
- | 'en-tt'
- | 'en-tv'
- | 'en-tz'
- | 'en-ug'
- | 'en-um'
- | 'en-us'
- | 'en-vc'
- | 'en-vg'
- | 'en-vi'
- | 'en-vn'
- | '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'
- | 'fj'
- | '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'
- | 'frr'
- | 'frr-de'
- | 'fur'
- | 'fur-it'
- | 'fy'
- | 'fy-nl'
- | 'ga'
- | 'ga-gb'
- | 'ga-ie'
- | 'gd'
- | 'gd-gb'
- | 'gl'
- | 'gl-es'
- | 'gn'
- | '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'
- | 'he-il'
- | 'hi'
- | 'hi-in'
- | 'hmn'
- | 'ho'
- | 'hr'
- | 'hr-ba'
- | 'hr-hr'
- | 'hsb'
- | 'hsb-de'
- | 'ht'
- | 'hu'
- | 'hu-hu'
- | 'hy'
- | 'hy-am'
- | 'hz'
- | 'ia'
- | 'ia-001'
- | 'id'
- | 'id-id'
- | 'ie'
- | 'ig'
- | 'ig-ng'
- | 'ii'
- | 'ii-cn'
- | 'ik'
- | 'io'
- | 'is'
- | 'is-is'
- | 'it'
- | 'it-ch'
- | 'it-it'
- | 'it-sm'
- | 'it-va'
- | 'iu'
- | 'ja'
- | 'ja-jp'
- | 'jgo'
- | 'jgo-cm'
- | 'jmc'
- | 'jmc-tz'
- | 'jv'
- | 'jv-id'
- | 'ka'
- | 'ka-ge'
- | 'kab'
- | 'kab-dz'
- | 'kam'
- | 'kam-ke'
- | 'kar'
- | 'kde'
- | 'kde-tz'
- | 'kea'
- | 'kea-cv'
- | 'kg'
- | 'kgp'
- | 'kgp-br'
- | 'kh'
- | 'khq'
- | 'khq-ml'
- | 'ki'
- | 'ki-ke'
- | 'kj'
- | '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'
- | 'kr'
- | 'ks'
- | 'ks-in'
- | 'ksb'
- | 'ksb-tz'
- | 'ksf'
- | 'ksf-cm'
- | 'ksh'
- | 'ksh-de'
- | 'ku'
- | 'ku-tr'
- | 'kv'
- | 'kw'
- | 'kw-gb'
- | 'ky'
- | 'ky-kg'
- | 'la'
- | 'lag'
- | 'lag-tz'
- | 'lb'
- | 'lb-lu'
- | 'lg'
- | 'lg-ug'
- | 'li'
- | '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'
- | 'mdf'
- | 'mdf-ru'
- | 'mer'
- | 'mer-ke'
- | 'mfe'
- | 'mfe-mu'
- | 'mg'
- | 'mg-mg'
- | 'mgh'
- | 'mgh-mz'
- | 'mgo'
- | 'mgo-cm'
- | 'mh'
- | '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'
- | 'na'
- | 'naq'
- | 'naq-na'
- | 'nb'
- | 'nb-no'
- | 'nb-sj'
- | 'nd'
- | 'nd-zw'
- | 'nds'
- | 'nds-de'
- | 'nds-nl'
- | 'ne'
- | 'ne-in'
- | 'ne-np'
- | 'ng'
- | 'nl'
- | 'nl-aw'
- | 'nl-be'
- | 'nl-bq'
- | 'nl-ch'
- | 'nl-cw'
- | 'nl-lu'
- | 'nl-nl'
- | 'nl-sr'
- | 'nl-sx'
- | 'nmg'
- | 'nmg-cm'
- | 'nn'
- | 'nn-no'
- | 'nnh'
- | 'nnh-cm'
- | 'no'
- | 'no-no'
- | 'nr'
- | 'nus'
- | 'nus-ss'
- | 'nv'
- | 'ny'
- | 'nyn'
- | 'nyn-ug'
- | 'oc'
- | 'oc-es'
- | 'oc-fr'
- | 'oj'
- | 'om'
- | 'om-et'
- | 'om-ke'
- | 'or'
- | 'or-in'
- | 'os'
- | 'os-ge'
- | 'os-ru'
- | 'pa'
- | 'pa-in'
- | 'pa-pk'
- | 'pcm'
- | 'pcm-ng'
- | 'pi'
- | 'pis'
- | 'pis-sb'
- | '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'
- | 'raj'
- | 'raj-in'
- | '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'
- | 'sc'
- | 'sc-it'
- | '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'
- | 'sm'
- | 'smn'
- | 'smn-fi'
- | 'sms'
- | 'sms-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'
- | 'ss'
- | 'st'
- | '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'
- | 'tn'
- | 'to'
- | 'to-to'
- | 'tok'
- | 'tok-001'
- | 'tr'
- | 'tr-cy'
- | 'tr-tr'
- | 'ts'
- | 'tt'
- | 'tt-ru'
- | 'tw'
- | 'twq'
- | 'twq-ne'
- | 'ty'
- | 'tzm'
- | 'tzm-ma'
- | 'ug'
- | 'ug-cn'
- | 'uk'
- | 'uk-ua'
- | 'ur'
- | 'ur-in'
- | 'ur-pk'
- | 'uz'
- | 'uz-af'
- | 'uz-uz'
- | 'vai'
- | 'vai-lr'
- | 've'
- | 'vi'
- | 'vi-vn'
- | 'vo'
- | 'vo-001'
- | 'vun'
- | 'vun-tz'
- | 'wa'
- | 'wae'
- | 'wae-ch'
- | 'wo'
- | 'wo-sn'
- | 'xh'
- | 'xh-za'
- | 'xog'
- | 'xog-ug'
- | 'yav'
- | 'yav-cm'
- | 'yi'
- | 'yi-001'
- | 'yo'
- | 'yo-bj'
- | 'yo-ng'
- | 'yrl'
- | 'yrl-br'
- | 'yrl-co'
- | 'yrl-ve'
- | 'yue'
- | 'yue-cn'
- | 'yue-hk'
- | 'za'
- | 'zgh'
- | 'zgh-ma'
- | 'zh'
- | 'zh-cn'
- | 'zh-hans'
- | 'zh-hant'
- | 'zh-hk'
- | 'zh-mo'
- | 'zh-sg'
- | 'zh-tw'
- | 'zu'
- | 'zu-za';
-
- /**
- * The date the content was published.
- */
- publishedDate?: number;
-
- /**
- * If a dynamic page, the row ID in the HubDB table.
- */
- rowId?: number;
-
- /**
- * For knowledge articles, the subcategory of the article.
- */
- subcategory?: string;
-
- /**
- * If a dynamic page, the ID of the HubDB table.
- */
- tableId?: number;
-
- /**
- * If a blog post, the tags associated with it.
- */
- tags?: Array;
-
- /**
- * The title of the returned document.
- */
- title?: string;
-}
-
export interface IndexedData {
/**
* The ID of the document in HubSpot.
@@ -1013,45 +69,14 @@ export interface IndexedField {
values: Array;
}
-export interface PublicSearchResults {
- /**
- * The number of results returned in a single response.
- */
- limit: number;
-
- /**
- * The starting point for the next set of results in pagination.
- */
- offset: number;
-
- /**
- * The current page number in the paginated results.
- */
- page: number;
-
- results: Array;
-
- /**
- * The total number of results found for the search term.
- */
- total: number;
-
- /**
- * The term used in the search query.
- */
- searchTerm?: string;
-}
-
export interface SiteSearchGetIndexedDataParams {
type?: string;
}
export declare namespace SiteSearch {
export {
- type ContentSearchResult as ContentSearchResult,
type IndexedData as IndexedData,
type IndexedField as IndexedField,
- type PublicSearchResults as PublicSearchResults,
type SiteSearchGetIndexedDataParams as SiteSearchGetIndexedDataParams,
};
}
diff --git a/src/resources/cms/url-redirects.ts b/src/resources/cms/url-redirects.ts
index 3fe02107..a5189b5d 100644
--- a/src/resources/cms/url-redirects.ts
+++ b/src/resources/cms/url-redirects.ts
@@ -58,12 +58,44 @@ export class BaseURLRedirects extends APIResource {
});
}
+ createURLMapping(body: URLRedirectCreateURLMappingParams, options?: RequestOptions): APIPromise {
+ return this._client.post('/cms/url-redirects/2026-03/url-mappings', {
+ body,
+ ...options,
+ headers: buildHeaders([{ 'Content-Type': '*/*', Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
+
+ deleteURLMapping(id: number, options?: RequestOptions): APIPromise {
+ return this._client.delete(path`/cms/url-redirects/2026-03/url-mappings/${id}`, {
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ });
+ }
+
/**
* Returns the details for a single existing URL redirect by ID.
*/
get(urlRedirectID: string, options?: RequestOptions): APIPromise {
return this._client.get(path`/cms/url-redirects/2026-03/${urlRedirectID}`, options);
}
+
+ getURLMapping(id: number, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/cms/url-redirects/2026-03/url-mappings/${id}`, {
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
+
+ listURLMappings(options?: RequestOptions): APIPromise {
+ return this._client.get('/cms/url-redirects/2026-03/url-mappings', {
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
}
export class URLRedirects extends BaseURLRedirects {}
@@ -370,6 +402,80 @@ export interface URLRedirectListParams extends PageParams {
updatedBefore?: string;
}
+export interface URLRedirectCreateURLMappingParams {
+ /**
+ * The unique ID of this URL redirect.
+ */
+ id: string;
+
+ /**
+ * The date and time when the URL mapping was initially created.
+ */
+ created: string;
+
+ /**
+ * The destination URL, where the target URL should be redirected if it matches the
+ * `routePrefix`.
+ */
+ destination: string;
+
+ /**
+ * Whether the `routePrefix` should match on the entire URL, including the domain.
+ */
+ isMatchFullUrl: boolean;
+
+ /**
+ * Whether the `routePrefix` should match on the entire URL path, including the
+ * query string.
+ */
+ isMatchQueryString: boolean;
+
+ /**
+ * Whether the URL redirect mapping should apply only if a live page on the URL
+ * isn't found. If False, the URL redirect mapping will take precedence over any
+ * existing page.
+ */
+ isOnlyAfterNotFound: boolean;
+
+ /**
+ * Whether the `routePrefix` should match based on pattern.
+ */
+ isPattern: boolean;
+
+ /**
+ * Whether the `routePrefix` should match both HTTP and HTTPS protocols.
+ */
+ isProtocolAgnostic: boolean;
+
+ /**
+ * Whether a trailing slash will be ignored.
+ */
+ isTrailingSlashOptional: boolean;
+
+ /**
+ * Used to prioritize URL redirection. If a given URL matches more than one
+ * redirect, the one with the **lower** precedence will be used.
+ */
+ precedence: number;
+
+ /**
+ * The type of redirect to create. Options include: 301 (permanent), 302
+ * (temporary), or 305 (proxy). Find more details
+ * [here](https://knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page).
+ */
+ redirectStyle: number;
+
+ /**
+ * The target incoming URL, path, or pattern to match for redirection.
+ */
+ routePrefix: string;
+
+ /**
+ * The date and time when the URL mapping was last modified.
+ */
+ updated: string;
+}
+
export declare namespace URLRedirects {
export {
type CollectionResponseWithTotalURLMappingForwardPaging as CollectionResponseWithTotalURLMappingForwardPaging,
@@ -379,5 +485,6 @@ export declare namespace URLRedirects {
type URLRedirectCreateParams as URLRedirectCreateParams,
type URLRedirectUpdateParams as URLRedirectUpdateParams,
type URLRedirectListParams as URLRedirectListParams,
+ type URLRedirectCreateURLMappingParams as URLRedirectCreateURLMappingParams,
};
}
diff --git a/src/resources/conversations/custom-channels/custom-channels.ts b/src/resources/conversations/custom-channels/custom-channels.ts
index 072a097f..8a1287b9 100644
--- a/src/resources/conversations/custom-channels/custom-channels.ts
+++ b/src/resources/conversations/custom-channels/custom-channels.ts
@@ -541,6 +541,7 @@ export interface PreResolvedContact {
| 'hs_social_twitter_clicks'
| 'hs_source_object_id'
| 'hs_source_portal_id'
+ | 'hs_sourced_contact_origin'
| 'hs_state_code'
| 'hs_sub_role'
| 'hs_testpurge'
diff --git a/src/resources/conversations/visitor-identification.ts b/src/resources/conversations/visitor-identification.ts
index 771dc895..7bcb74ff 100644
--- a/src/resources/conversations/visitor-identification.ts
+++ b/src/resources/conversations/visitor-identification.ts
@@ -32,6 +32,8 @@ export interface IdentificationTokenGenerationRequest {
*/
email: string;
+ hsCustomerAgentContext: { [key: string]: string };
+
/**
* The first name of the visitor that you wish to identify. This value will only be
* set in HubSpot for new contacts and existing contacts where first name is
@@ -61,6 +63,8 @@ export interface VisitorIdentificationGenerateTokenParams {
*/
email: string;
+ hsCustomerAgentContext: { [key: string]: string };
+
/**
* The first name of the visitor that you wish to identify. This value will only be
* set in HubSpot for new contacts and existing contacts where first name is
diff --git a/src/resources/crm/api.md b/src/resources/crm/api.md
index 40fd661d..f6100055 100644
--- a/src/resources/crm/api.md
+++ b/src/resources/crm/api.md
@@ -14,8 +14,8 @@ Types:
- BatchResponsePublicDefaultAssociation
- CollectionResponseMultiAssociatedObjectWithLabelForwardPaging
- CollectionResponseWithTotalSimplePublicObject
+- CrmFilter
- DateTime
-- Filter
- FilterGroup
- LabelsBetweenObjectPair
- MultiAssociatedObjectWithLabel
@@ -128,7 +128,7 @@ Types:
Methods:
-- client.crm.exports.createAsync() -> TaskLocator
+- client.crm.exports.createAsync({ ...params }) -> TaskLocator
- client.crm.exports.get(exportID) -> PublicExportResponse
- client.crm.exports.getStatus(taskID) -> ActionResponseWithSingleResultUri
@@ -362,7 +362,6 @@ Types:
- PublicBatchMigrationMapping
- PublicBoolPropertyOperation
- PublicCalendarDatePropertyOperation
-- PublicCampaignInfluencedFilter
- PublicCommunicationSubscriptionFilter
- PublicComparativeDatePropertyOperation
- PublicComparativePropertyUpdatedOperation
@@ -398,7 +397,6 @@ Types:
- PublicNotAllFilterBranch
- PublicNotAnyFilterBranch
- PublicNowReference
-- PublicNumAssociationsFilter
- PublicNumOccurrencesRefineBy
- PublicNumberPropertyOperation
- PublicObjectList
@@ -406,8 +404,6 @@ Types:
- PublicOrFilterBranch
- PublicPageViewAnalyticsFilter
- PublicPrivacyAnalyticsFilter
-- PublicPropertyAssociationFilterBranch
-- PublicPropertyAssociationInListFilter
- PublicPropertyFilter
- PublicPropertyReferencedTime
- PublicQuarterReference
diff --git a/src/resources/crm/crm.ts b/src/resources/crm/crm.ts
index 0cf9ea5d..41988815 100644
--- a/src/resources/crm/crm.ts
+++ b/src/resources/crm/crm.ts
@@ -120,7 +120,6 @@ import {
PublicBatchMigrationMapping,
PublicBoolPropertyOperation,
PublicCalendarDatePropertyOperation,
- PublicCampaignInfluencedFilter,
PublicCommunicationSubscriptionFilter,
PublicComparativeDatePropertyOperation,
PublicComparativePropertyUpdatedOperation,
@@ -156,7 +155,6 @@ import {
PublicNotAllFilterBranch,
PublicNotAnyFilterBranch,
PublicNowReference,
- PublicNumAssociationsFilter,
PublicNumOccurrencesRefineBy,
PublicNumberPropertyOperation,
PublicObjectList,
@@ -164,8 +162,6 @@ import {
PublicOrFilterBranch,
PublicPageViewAnalyticsFilter,
PublicPrivacyAnalyticsFilter,
- PublicPropertyAssociationFilterBranch,
- PublicPropertyAssociationInListFilter,
PublicPropertyFilter,
PublicPropertyReferencedTime,
PublicQuarterReference,
@@ -614,31 +610,12 @@ export interface CollectionResponseWithTotalSimplePublicObject {
paging?: Shared.Paging;
}
-export interface DateTime {
- /**
- * Indicates whether the DateTime value represents only a date without a time
- * component.
- */
- dateOnly: boolean;
-
- /**
- * The integer value representing the shift in minutes from UTC for the DateTime
- * value.
- */
- timeZoneShift: number;
-
- /**
- * The integer value representing a specific point in time.
- */
- value: number;
-}
-
/**
* Defines a single condition for searching CRM objects, specifying the property to
* filter on, the operator to use (such as equals, greater than, or contains), and
* the value(s) to compare against.
*/
-export interface Filter {
+export interface CrmFilter {
/**
* The comparison operator used in the filter, such as "EQ" or "GT".
*/
@@ -678,8 +655,27 @@ export interface Filter {
values?: Array;
}
+export interface DateTime {
+ /**
+ * Indicates whether the DateTime value represents only a date without a time
+ * component.
+ */
+ dateOnly: boolean;
+
+ /**
+ * The integer value representing the shift in minutes from UTC for the DateTime
+ * value.
+ */
+ timeZoneShift: number;
+
+ /**
+ * The integer value representing a specific point in time.
+ */
+ value: number;
+}
+
export interface FilterGroup {
- filters: Array;
+ filters: Array;
}
/**
@@ -985,8 +981,8 @@ export declare namespace Crm {
type BatchResponsePublicDefaultAssociation as BatchResponsePublicDefaultAssociation,
type CollectionResponseMultiAssociatedObjectWithLabelForwardPaging as CollectionResponseMultiAssociatedObjectWithLabelForwardPaging,
type CollectionResponseWithTotalSimplePublicObject as CollectionResponseWithTotalSimplePublicObject,
+ type CrmFilter as CrmFilter,
type DateTime as DateTime,
- type Filter as Filter,
type FilterGroup as FilterGroup,
type LabelsBetweenObjectPair as LabelsBetweenObjectPair,
type MultiAssociatedObjectWithLabel as MultiAssociatedObjectWithLabel,
@@ -1159,7 +1155,6 @@ export declare namespace Crm {
type PublicBatchMigrationMapping as PublicBatchMigrationMapping,
type PublicBoolPropertyOperation as PublicBoolPropertyOperation,
type PublicCalendarDatePropertyOperation as PublicCalendarDatePropertyOperation,
- type PublicCampaignInfluencedFilter as PublicCampaignInfluencedFilter,
type PublicCommunicationSubscriptionFilter as PublicCommunicationSubscriptionFilter,
type PublicComparativeDatePropertyOperation as PublicComparativeDatePropertyOperation,
type PublicComparativePropertyUpdatedOperation as PublicComparativePropertyUpdatedOperation,
@@ -1195,7 +1190,6 @@ export declare namespace Crm {
type PublicNotAllFilterBranch as PublicNotAllFilterBranch,
type PublicNotAnyFilterBranch as PublicNotAnyFilterBranch,
type PublicNowReference as PublicNowReference,
- type PublicNumAssociationsFilter as PublicNumAssociationsFilter,
type PublicNumOccurrencesRefineBy as PublicNumOccurrencesRefineBy,
type PublicNumberPropertyOperation as PublicNumberPropertyOperation,
type PublicObjectList as PublicObjectList,
@@ -1203,8 +1197,6 @@ export declare namespace Crm {
type PublicOrFilterBranch as PublicOrFilterBranch,
type PublicPageViewAnalyticsFilter as PublicPageViewAnalyticsFilter,
type PublicPrivacyAnalyticsFilter as PublicPrivacyAnalyticsFilter,
- type PublicPropertyAssociationFilterBranch as PublicPropertyAssociationFilterBranch,
- type PublicPropertyAssociationInListFilter as PublicPropertyAssociationInListFilter,
type PublicPropertyFilter as PublicPropertyFilter,
type PublicPropertyReferencedTime as PublicPropertyReferencedTime,
type PublicQuarterReference as PublicQuarterReference,
diff --git a/src/resources/crm/exports.ts b/src/resources/crm/exports.ts
index 23081c9a..3063e37b 100644
--- a/src/resources/crm/exports.ts
+++ b/src/resources/crm/exports.ts
@@ -78,7 +78,7 @@ export interface ActionResponseWithSingleResultUri {
export interface PublicCrmSearchRequest {
filterGroups: Array;
- filters: Array;
+ filters: Array;
/**
* Defines the order in which the CRM records should be returned.
@@ -100,30 +100,58 @@ export interface PublicExportListRequest {
exportType: 'LIST';
- format: 'XLS' | 'XLSX' | 'CSV';
+ format: 'CSV' | 'XLS' | 'XLSX';
includeLabeledAssociations: boolean;
includePrimaryDisplayPropertyForAssociatedObjects: boolean;
language:
- | 'EN'
+ | 'AF_ZA'
+ | 'AR_EG'
+ | 'BG'
+ | 'BN'
+ | 'CA_ES'
+ | 'CS'
+ | 'DA_DK'
| 'DE'
+ | 'EL_GR'
+ | 'EN'
+ | 'EN_GB'
| 'ES'
+ | 'ES_MX'
+ | 'ET_EE'
+ | 'FI'
| 'FR'
+ | 'FR_CA'
+ | 'HE_IL'
+ | 'HI_IN'
+ | 'HR'
+ | 'HU'
+ | 'ID'
+ | 'IT'
| 'JA'
+ | 'KO_KR'
+ | 'LT_LT'
+ | 'MS'
| 'NL'
- | 'PT_BR'
- | 'IT'
+ | 'NO'
| 'PL'
+ | 'PT_BR'
+ | 'PT_PT'
+ | 'RO'
+ | 'RU'
+ | 'SK_SK'
+ | 'SL'
| 'SV'
- | 'FI'
- | 'ZH_TW'
- | 'DA_DK'
- | 'NO'
- | 'KO_KR'
| 'TH'
- | 'ZH_CN';
+ | 'TL'
+ | 'TR'
+ | 'UK'
+ | 'VI_VN'
+ | 'ZH_CN'
+ | 'ZH_HK'
+ | 'ZH_TW';
listId: string;
@@ -201,30 +229,58 @@ export interface PublicExportViewRequest {
exportType: 'VIEW';
- format: 'XLS' | 'XLSX' | 'CSV';
+ format: 'CSV' | 'XLS' | 'XLSX';
includeLabeledAssociations: boolean;
includePrimaryDisplayPropertyForAssociatedObjects: boolean;
language:
- | 'EN'
+ | 'AF_ZA'
+ | 'AR_EG'
+ | 'BG'
+ | 'BN'
+ | 'CA_ES'
+ | 'CS'
+ | 'DA_DK'
| 'DE'
+ | 'EL_GR'
+ | 'EN'
+ | 'EN_GB'
| 'ES'
+ | 'ES_MX'
+ | 'ET_EE'
+ | 'FI'
| 'FR'
+ | 'FR_CA'
+ | 'HE_IL'
+ | 'HI_IN'
+ | 'HR'
+ | 'HU'
+ | 'ID'
+ | 'IT'
| 'JA'
+ | 'KO_KR'
+ | 'LT_LT'
+ | 'MS'
| 'NL'
- | 'PT_BR'
- | 'IT'
+ | 'NO'
| 'PL'
+ | 'PT_BR'
+ | 'PT_PT'
+ | 'RO'
+ | 'RU'
+ | 'SK_SK'
+ | 'SL'
| 'SV'
- | 'FI'
- | 'ZH_TW'
- | 'DA_DK'
- | 'NO'
- | 'KO_KR'
| 'TH'
- | 'ZH_CN';
+ | 'TL'
+ | 'TR'
+ | 'UK'
+ | 'VI_VN'
+ | 'ZH_CN'
+ | 'ZH_HK'
+ | 'ZH_TW';
objectProperties: Array;
@@ -240,9 +296,147 @@ export type ExportCreateAsyncParams =
| ExportCreateAsyncParams.PublicExportListRequest;
export declare namespace ExportCreateAsyncParams {
- export interface PublicExportViewRequest {}
+ export interface PublicExportViewRequest {
+ associatedObjectType: Array;
+
+ exportInternalValuesOptions: Array<'NAMES' | 'VALUES'>;
+
+ exportName: string;
+
+ exportType: 'VIEW';
+
+ format: 'CSV' | 'XLS' | 'XLSX';
+
+ includeLabeledAssociations: boolean;
+
+ includePrimaryDisplayPropertyForAssociatedObjects: boolean;
+
+ language:
+ | 'AF_ZA'
+ | 'AR_EG'
+ | 'BG'
+ | 'BN'
+ | 'CA_ES'
+ | 'CS'
+ | 'DA_DK'
+ | 'DE'
+ | 'EL_GR'
+ | 'EN'
+ | 'EN_GB'
+ | 'ES'
+ | 'ES_MX'
+ | 'ET_EE'
+ | 'FI'
+ | 'FR'
+ | 'FR_CA'
+ | 'HE_IL'
+ | 'HI_IN'
+ | 'HR'
+ | 'HU'
+ | 'ID'
+ | 'IT'
+ | 'JA'
+ | 'KO_KR'
+ | 'LT_LT'
+ | 'MS'
+ | 'NL'
+ | 'NO'
+ | 'PL'
+ | 'PT_BR'
+ | 'PT_PT'
+ | 'RO'
+ | 'RU'
+ | 'SK_SK'
+ | 'SL'
+ | 'SV'
+ | 'TH'
+ | 'TL'
+ | 'TR'
+ | 'UK'
+ | 'VI_VN'
+ | 'ZH_CN'
+ | 'ZH_HK'
+ | 'ZH_TW';
+
+ objectProperties: Array;
+
+ objectType: string;
+
+ overrideAssociatedObjectsPerDefinitionPerRowLimit: boolean;
+
+ publicCrmSearchRequest?: PublicCrmSearchRequest;
+ }
- export interface PublicExportListRequest {}
+ export interface PublicExportListRequest {
+ associatedObjectType: Array;
+
+ exportInternalValuesOptions: Array<'NAMES' | 'VALUES'>;
+
+ exportName: string;
+
+ exportType: 'LIST';
+
+ format: 'CSV' | 'XLS' | 'XLSX';
+
+ includeLabeledAssociations: boolean;
+
+ includePrimaryDisplayPropertyForAssociatedObjects: boolean;
+
+ language:
+ | 'AF_ZA'
+ | 'AR_EG'
+ | 'BG'
+ | 'BN'
+ | 'CA_ES'
+ | 'CS'
+ | 'DA_DK'
+ | 'DE'
+ | 'EL_GR'
+ | 'EN'
+ | 'EN_GB'
+ | 'ES'
+ | 'ES_MX'
+ | 'ET_EE'
+ | 'FI'
+ | 'FR'
+ | 'FR_CA'
+ | 'HE_IL'
+ | 'HI_IN'
+ | 'HR'
+ | 'HU'
+ | 'ID'
+ | 'IT'
+ | 'JA'
+ | 'KO_KR'
+ | 'LT_LT'
+ | 'MS'
+ | 'NL'
+ | 'NO'
+ | 'PL'
+ | 'PT_BR'
+ | 'PT_PT'
+ | 'RO'
+ | 'RU'
+ | 'SK_SK'
+ | 'SL'
+ | 'SV'
+ | 'TH'
+ | 'TL'
+ | 'TR'
+ | 'UK'
+ | 'VI_VN'
+ | 'ZH_CN'
+ | 'ZH_HK'
+ | 'ZH_TW';
+
+ listId: string;
+
+ objectProperties: Array;
+
+ objectType: string;
+
+ overrideAssociatedObjectsPerDefinitionPerRowLimit: boolean;
+ }
}
export declare namespace Exports {
diff --git a/src/resources/crm/index.ts b/src/resources/crm/index.ts
index c943c8f5..88ae1278 100644
--- a/src/resources/crm/index.ts
+++ b/src/resources/crm/index.ts
@@ -149,7 +149,6 @@ export {
type PublicBatchMigrationMapping,
type PublicBoolPropertyOperation,
type PublicCalendarDatePropertyOperation,
- type PublicCampaignInfluencedFilter,
type PublicCommunicationSubscriptionFilter,
type PublicComparativeDatePropertyOperation,
type PublicComparativePropertyUpdatedOperation,
@@ -185,7 +184,6 @@ export {
type PublicNotAllFilterBranch,
type PublicNotAnyFilterBranch,
type PublicNowReference,
- type PublicNumAssociationsFilter,
type PublicNumOccurrencesRefineBy,
type PublicNumberPropertyOperation,
type PublicObjectList,
@@ -193,8 +191,6 @@ export {
type PublicOrFilterBranch,
type PublicPageViewAnalyticsFilter,
type PublicPrivacyAnalyticsFilter,
- type PublicPropertyAssociationFilterBranch,
- type PublicPropertyAssociationInListFilter,
type PublicPropertyFilter,
type PublicPropertyReferencedTime,
type PublicQuarterReference,
diff --git a/src/resources/crm/lists.ts b/src/resources/crm/lists.ts
index a4415e7e..b703303d 100644
--- a/src/resources/crm/lists.ts
+++ b/src/resources/crm/lists.ts
@@ -375,7 +375,6 @@ export interface ListCreateRequest {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch;
/**
@@ -408,7 +407,6 @@ export interface ListFilterUpdateRequest {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch;
}
@@ -683,7 +681,6 @@ export interface PublicAndFilterBranch {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch
>;
@@ -708,7 +705,6 @@ export interface PublicAndFilterBranch {
| PublicIntegrationEventFilter
| PublicEmailSubscriptionFilter
| PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
| PublicSurveyMonkeyFilter
| PublicSurveyMonkeyValueFilter
| PublicWebinarFilter
@@ -717,9 +713,7 @@ export interface PublicAndFilterBranch {
| PublicAdsSearchFilter
| PublicAdsTimeFilter
| PublicInListFilter
- | PublicNumAssociationsFilter
| PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
| PublicConstantFilter
>;
}
@@ -743,7 +737,6 @@ export interface PublicAssociationFilterBranch {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch
>;
@@ -768,7 +761,6 @@ export interface PublicAssociationFilterBranch {
| PublicIntegrationEventFilter
| PublicEmailSubscriptionFilter
| PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
| PublicSurveyMonkeyFilter
| PublicSurveyMonkeyValueFilter
| PublicWebinarFilter
@@ -777,9 +769,7 @@ export interface PublicAssociationFilterBranch {
| PublicAdsSearchFilter
| PublicAdsTimeFilter
| PublicInListFilter
- | PublicNumAssociationsFilter
| PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
| PublicConstantFilter
>;
@@ -933,18 +923,6 @@ export interface PublicCalendarDatePropertyOperation {
useFiscalYear?: boolean;
}
-export interface PublicCampaignInfluencedFilter {
- /**
- * The ID of the campaign that influences the filter.
- */
- campaignId: string;
-
- /**
- * Indicates the type of filter (CAMPAIGN_INFLUENCED).
- */
- filterType: 'CAMPAIGN_INFLUENCED';
-}
-
export interface PublicCommunicationSubscriptionFilter {
acceptedOptStates: Array;
@@ -1885,7 +1863,6 @@ export interface PublicNotAllFilterBranch {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch
>;
@@ -1910,7 +1887,6 @@ export interface PublicNotAllFilterBranch {
| PublicIntegrationEventFilter
| PublicEmailSubscriptionFilter
| PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
| PublicSurveyMonkeyFilter
| PublicSurveyMonkeyValueFilter
| PublicWebinarFilter
@@ -1919,9 +1895,7 @@ export interface PublicNotAllFilterBranch {
| PublicAdsSearchFilter
| PublicAdsTimeFilter
| PublicInListFilter
- | PublicNumAssociationsFilter
| PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
| PublicConstantFilter
>;
}
@@ -1934,7 +1908,6 @@ export interface PublicNotAnyFilterBranch {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch
>;
@@ -1960,7 +1933,6 @@ export interface PublicNotAnyFilterBranch {
| PublicIntegrationEventFilter
| PublicEmailSubscriptionFilter
| PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
| PublicSurveyMonkeyFilter
| PublicSurveyMonkeyValueFilter
| PublicWebinarFilter
@@ -1969,9 +1941,7 @@ export interface PublicNotAnyFilterBranch {
| PublicAdsSearchFilter
| PublicAdsTimeFilter
| PublicInListFilter
- | PublicNumAssociationsFilter
| PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
| PublicConstantFilter
>;
}
@@ -2003,38 +1973,6 @@ export interface PublicNowReference {
second?: number;
}
-export interface PublicNumAssociationsFilter {
- /**
- * Defines the category of the association (HUBSPOT_DEFINED, USER_DEFINED,
- * INTEGRATOR_DEFINED, WORK).
- */
- associationCategory: string;
-
- /**
- * The ID representing the type of association being filtered.
- */
- associationTypeId: number;
-
- /**
- * Specifies the criteria for refining the association filter.
- */
- coalescingRefineBy:
- | PublicNumOccurrencesRefineBy
- | PublicSetOccurrencesRefineBy
- | PublicRelativeComparativeTimestampRefineBy
- | PublicRelativeRangedTimestampRefineBy
- | PublicAbsoluteComparativeTimestampRefineBy
- | PublicAbsoluteRangedTimestampRefineBy
- | PublicAllHistoryRefineBy
- | PublicTimePointOperation
- | PublicRangedTimeOperation;
-
- /**
- * Indicates the type of filter being applied (NUM_ASSOCIATIONS).
- */
- filterType: 'NUM_ASSOCIATIONS';
-}
-
export interface PublicNumOccurrencesRefineBy {
/**
* The type of refinement (NUM_OCCURRENCES).
@@ -2135,7 +2073,6 @@ export interface PublicObjectList {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch;
/**
@@ -2239,7 +2176,6 @@ export interface PublicOrFilterBranch {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch
>;
@@ -2264,7 +2200,6 @@ export interface PublicOrFilterBranch {
| PublicIntegrationEventFilter
| PublicEmailSubscriptionFilter
| PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
| PublicSurveyMonkeyFilter
| PublicSurveyMonkeyValueFilter
| PublicWebinarFilter
@@ -2273,9 +2208,7 @@ export interface PublicOrFilterBranch {
| PublicAdsSearchFilter
| PublicAdsTimeFilter
| PublicInListFilter
- | PublicNumAssociationsFilter
| PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
| PublicConstantFilter
>;
}
@@ -2350,113 +2283,6 @@ export interface PublicPrivacyAnalyticsFilter {
privacyName: string;
}
-export interface PublicPropertyAssociationFilterBranch {
- filterBranches: Array<
- | PublicOrFilterBranch
- | PublicAndFilterBranch
- | PublicNotAllFilterBranch
- | PublicNotAnyFilterBranch
- | PublicRestrictedFilterBranch
- | PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
- | PublicAssociationFilterBranch
- >;
-
- /**
- * The logical operator used to combine filters within the branch.
- */
- filterBranchOperator: string;
-
- /**
- * The type of the filter branch (PROPERTY_ASSOCIATION).
- */
- filterBranchType: 'PROPERTY_ASSOCIATION';
-
- filters: Array<
- | PublicPropertyFilter
- | PublicAssociationInListFilter
- | PublicPageViewAnalyticsFilter
- | PublicCtaAnalyticsFilter
- | PublicEventAnalyticsFilter
- | PublicFormSubmissionFilter
- | PublicFormSubmissionOnPageFilter
- | PublicIntegrationEventFilter
- | PublicEmailSubscriptionFilter
- | PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
- | PublicSurveyMonkeyFilter
- | PublicSurveyMonkeyValueFilter
- | PublicWebinarFilter
- | PublicEmailEventFilter
- | PublicPrivacyAnalyticsFilter
- | PublicAdsSearchFilter
- | PublicAdsTimeFilter
- | PublicInListFilter
- | PublicNumAssociationsFilter
- | PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
- | PublicConstantFilter
- >;
-
- /**
- * The ID representing the type of object associated with the filter branch.
- */
- objectTypeId: string;
-
- /**
- * Defines the operation to be applied within the filter branch (IN_LIST,
- * NOT_IN_LIST).
- */
- operator: string;
-
- /**
- * The property that is associated with the object ID in the filter branch.
- */
- propertyWithObjectId: string;
-}
-
-export interface PublicPropertyAssociationInListFilter {
- /**
- * Specifies the criteria for refining the filter by coalescing.
- */
- coalescingRefineBy:
- | PublicNumOccurrencesRefineBy
- | PublicSetOccurrencesRefineBy
- | PublicRelativeComparativeTimestampRefineBy
- | PublicRelativeRangedTimestampRefineBy
- | PublicAbsoluteComparativeTimestampRefineBy
- | PublicAbsoluteRangedTimestampRefineBy
- | PublicAllHistoryRefineBy
- | PublicTimePointOperation
- | PublicRangedTimeOperation;
-
- /**
- * Indicates the type of filter being applied (PROPERTY_ASSOCIATION).
- */
- filterType: 'PROPERTY_ASSOCIATION';
-
- /**
- * The ID of the list used in the property association filter.
- */
- listId: string;
-
- /**
- * Defines the operation to be applied by the filter (IN_LIST, NOT_IN_LIST).
- */
- operator: string;
-
- /**
- * The property associated with the object ID in the filter.
- */
- propertyWithObjectId: string;
-
- /**
- * The ID representing the type of object that the property association filter is
- * targeting.
- */
- toObjectTypeId?: string;
-}
-
export interface PublicPropertyFilter {
/**
* Indicates that the filter (PROPERTY).
@@ -2709,7 +2535,6 @@ export interface PublicRestrictedFilterBranch {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch
>;
@@ -2735,7 +2560,6 @@ export interface PublicRestrictedFilterBranch {
| PublicIntegrationEventFilter
| PublicEmailSubscriptionFilter
| PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
| PublicSurveyMonkeyFilter
| PublicSurveyMonkeyValueFilter
| PublicWebinarFilter
@@ -2744,9 +2568,7 @@ export interface PublicRestrictedFilterBranch {
| PublicAdsSearchFilter
| PublicAdsTimeFilter
| PublicInListFilter
- | PublicNumAssociationsFilter
| PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
| PublicConstantFilter
>;
}
@@ -3056,7 +2878,6 @@ export interface PublicUnifiedEventsFilterBranch {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch
>;
@@ -3081,7 +2902,6 @@ export interface PublicUnifiedEventsFilterBranch {
| PublicIntegrationEventFilter
| PublicEmailSubscriptionFilter
| PublicCommunicationSubscriptionFilter
- | PublicCampaignInfluencedFilter
| PublicSurveyMonkeyFilter
| PublicSurveyMonkeyValueFilter
| PublicWebinarFilter
@@ -3090,9 +2910,7 @@ export interface PublicUnifiedEventsFilterBranch {
| PublicAdsSearchFilter
| PublicAdsTimeFilter
| PublicInListFilter
- | PublicNumAssociationsFilter
| PublicUnifiedEventsFilter
- | PublicPropertyAssociationInListFilter
| PublicConstantFilter
>;
@@ -3291,7 +3109,6 @@ export interface ListCreateParams {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch;
/**
@@ -3474,7 +3291,6 @@ export interface ListUpdateListFiltersParams {
| PublicNotAnyFilterBranch
| PublicRestrictedFilterBranch
| PublicUnifiedEventsFilterBranch
- | PublicPropertyAssociationFilterBranch
| PublicAssociationFilterBranch;
/**
@@ -3572,7 +3388,6 @@ export declare namespace Lists {
type PublicBatchMigrationMapping as PublicBatchMigrationMapping,
type PublicBoolPropertyOperation as PublicBoolPropertyOperation,
type PublicCalendarDatePropertyOperation as PublicCalendarDatePropertyOperation,
- type PublicCampaignInfluencedFilter as PublicCampaignInfluencedFilter,
type PublicCommunicationSubscriptionFilter as PublicCommunicationSubscriptionFilter,
type PublicComparativeDatePropertyOperation as PublicComparativeDatePropertyOperation,
type PublicComparativePropertyUpdatedOperation as PublicComparativePropertyUpdatedOperation,
@@ -3608,7 +3423,6 @@ export declare namespace Lists {
type PublicNotAllFilterBranch as PublicNotAllFilterBranch,
type PublicNotAnyFilterBranch as PublicNotAnyFilterBranch,
type PublicNowReference as PublicNowReference,
- type PublicNumAssociationsFilter as PublicNumAssociationsFilter,
type PublicNumOccurrencesRefineBy as PublicNumOccurrencesRefineBy,
type PublicNumberPropertyOperation as PublicNumberPropertyOperation,
type PublicObjectList as PublicObjectList,
@@ -3616,8 +3430,6 @@ export declare namespace Lists {
type PublicOrFilterBranch as PublicOrFilterBranch,
type PublicPageViewAnalyticsFilter as PublicPageViewAnalyticsFilter,
type PublicPrivacyAnalyticsFilter as PublicPrivacyAnalyticsFilter,
- type PublicPropertyAssociationFilterBranch as PublicPropertyAssociationFilterBranch,
- type PublicPropertyAssociationInListFilter as PublicPropertyAssociationInListFilter,
type PublicPropertyFilter as PublicPropertyFilter,
type PublicPropertyReferencedTime as PublicPropertyReferencedTime,
type PublicQuarterReference as PublicQuarterReference,
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 68bd4cac..5333b8a5 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -19,3 +19,4 @@ export { Meta, BaseMeta } from './meta/meta';
export { Scheduler, BaseScheduler } from './scheduler/scheduler';
export { Settings, BaseSettings } from './settings/settings';
export { Webhooks, BaseWebhooks } from './webhooks';
+export { WebhooksJournal, BaseWebhooksJournal } from './webhooks-journal/webhooks-journal';
diff --git a/src/resources/scheduler/meetings/meetings.ts b/src/resources/scheduler/meetings/meetings.ts
index 84620c99..df54916c 100644
--- a/src/resources/scheduler/meetings/meetings.ts
+++ b/src/resources/scheduler/meetings/meetings.ts
@@ -288,6 +288,7 @@ export interface ExternalCalendarMeetingEventResponseProperties {
| 'BIDEN'
| 'BILLING'
| 'BOT'
+ | 'BREEZE_AGENT'
| 'CALCULATED'
| 'CENTRAL_EXCHANGE_RATES'
| 'CHATSPOT'
@@ -312,6 +313,7 @@ export interface ExternalCalendarMeetingEventResponseProperties {
| 'DEALS'
| 'DEFAULT'
| 'DELETE_OBJECTS'
+ | 'DI_WRITE_TO_CRM'
| 'EMAIL'
| 'EMAIL_INBOX_IMPORT'
| 'EMAIL_INTEGRATION'
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
index 80b66816..2355b2c8 100644
--- a/src/resources/shared.ts
+++ b/src/resources/shared.ts
@@ -12,6 +12,32 @@ export interface AbTestCreateRequestVNext {
variationName: string;
}
+export interface ActionOverrideRequest {
+ /**
+ * An array of strings, each representing an associated object type ID relevant to
+ * the action override.
+ */
+ associatedObjectTypeIds?: Array;
+
+ /**
+ * An array of integers representing list IDs that are associated with the action
+ * override. The integers are in int64 format.
+ */
+ listIds?: Array;
+
+ /**
+ * An array of integers, each representing an object ID for which the action
+ * override is applicable. The integers are in int64 format.
+ */
+ objectIds?: Array;
+
+ /**
+ * An array of strings representing the properties to be overridden in the action.
+ * Each string corresponds to a property name.
+ */
+ properties?: Array;
+}
+
export interface ActionResponse {
/**
* The timestamp indicating when the action was completed.
@@ -41,6 +67,14 @@ export interface ActionResponse {
requestedAt?: string;
}
+export interface AppLifecycleEventSubscriptionUpsertRequest {
+ eventTypeId: string;
+
+ properties: Array;
+
+ subscriptionType: 'APP_LIFECYCLE_EVENT';
+}
+
/**
* The definition of an association
*/
@@ -101,6 +135,34 @@ export interface AssociationSpec {
associationTypeId: number;
}
+export interface AssociationSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ associatedObjectTypeIds: Array;
+
+ objectIds: Array;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ subscriptionType: 'ASSOCIATION';
+}
+
/**
* A HubSpot property option
*/
@@ -171,10 +233,204 @@ export interface BatchReadInputPropertyName {
inputs: Array;
}
+export interface BatchResponseJournalFetchResponse {
+ /**
+ * The date and time when the batch operation was completed, in ISO 8601 format.
+ */
+ completedAt: string;
+
+ /**
+ * An array of results from the batch operation, each represented as a
+ * JournalFetchResponse object.
+ */
+ results: Array;
+
+ /**
+ * The date and time when the batch operation started, in ISO 8601 format.
+ */
+ startedAt: string;
+
+ /**
+ * The current status of the batch operation. Valid values include 'PENDING',
+ * 'PROCESSING', 'CANCELED', and 'COMPLETE'.
+ */
+ status: 'CANCELED' | 'COMPLETE' | 'PENDING' | 'PROCESSING';
+
+ /**
+ * A map of link names to associated URIs related to the batch operation.
+ */
+ links?: { [key: string]: string };
+
+ /**
+ * The date and time when the batch operation was requested, in ISO 8601 format.
+ */
+ requestedAt?: string;
+}
+
+export interface BatchResponseJournalFetchResponseWithErrors {
+ /**
+ * The date and time when the batch process was completed, in ISO 8601 format.
+ */
+ completedAt: string;
+
+ /**
+ * An array of journal fetch responses, each representing a result from the batch
+ * process.
+ */
+ results: Array;
+
+ /**
+ * The date and time when the batch process started, in ISO 8601 format.
+ */
+ startedAt: string;
+
+ /**
+ * The current status of the batch process. Valid values include 'PENDING',
+ * 'PROCESSING', 'CANCELED', and 'COMPLETE'.
+ */
+ status: 'CANCELED' | 'COMPLETE' | 'PENDING' | 'PROCESSING';
+
+ /**
+ * An array of standard errors that occurred during the batch process, providing
+ * details about each error.
+ */
+ errors?: Array;
+
+ /**
+ * A map of link names to associated URIs, providing additional context or actions
+ * related to the batch process.
+ */
+ links?: { [key: string]: string };
+
+ /**
+ * The number of errors that occurred during the batch process.
+ */
+ numErrors?: number;
+
+ /**
+ * The date and time when the batch request was made, in ISO 8601 format.
+ */
+ requestedAt?: string;
+}
+
export interface CollectionResponsePropertyGroupNoPaging {
results: Array;
}
+export interface Condition {
+ /**
+ * A string indicating the type of filter being applied. Valid value is
+ * 'CRM_OBJECT_PROPERTY'.
+ */
+ filterType: 'CRM_OBJECT_PROPERTY';
+
+ /**
+ * A string specifying the operation to be performed in the condition. Valid values
+ * include 'EQ', 'N_EQ', 'LT', 'GT', 'LTE', 'GTE', 'CONTAINS', 'STARTS_WITH',
+ * 'ENDS_WITH', 'IN', 'NOT_IN', 'IS_EMPTY', and 'IS_NOT_EMPTY'.
+ */
+ operator:
+ | 'CONTAINS'
+ | 'ENDS_WITH'
+ | 'EQ'
+ | 'GT'
+ | 'GTE'
+ | 'IN'
+ | 'IS_EMPTY'
+ | 'IS_NOT_EMPTY'
+ | 'LT'
+ | 'LTE'
+ | 'N_EQ'
+ | 'NOT_IN'
+ | 'STARTS_WITH';
+
+ /**
+ * A string representing the specific property of the CRM object that the condition
+ * applies to.
+ */
+ property: string;
+
+ /**
+ * A string representing the value to be compared against the specified property
+ * when using single-value operators.
+ */
+ value?: string;
+
+ /**
+ * An array of strings used to specify multiple values for comparison when using
+ * operators that support multiple values, such as 'IN' or 'NOT_IN'.
+ */
+ values?: Array;
+}
+
+export interface CrmObjectSnapshotBatchRequest {
+ /**
+ * An array of CrmObjectSnapshotRequest objects, each representing a request to
+ * create a snapshot for a specific CRM object. This property is required.
+ */
+ snapshotRequests: Array;
+}
+
+export interface CrmObjectSnapshotBatchResponse {
+ /**
+ * An array of CrmObjectSnapshotResponse objects, each representing the result of a
+ * snapshot operation for a specific CRM object. This property is required.
+ */
+ snapshotResponses: Array;
+}
+
+export interface CrmObjectSnapshotRequest {
+ /**
+ * An integer representing the unique identifier of the CRM object for which the
+ * snapshot is requested.
+ */
+ objectId: number;
+
+ /**
+ * A string representing the type identifier of the CRM object, specifying what
+ * kind of object it is within HubSpot.
+ */
+ objectTypeId: string;
+
+ /**
+ * An integer representing the unique identifier of the HubSpot account (portal)
+ * where the CRM object resides.
+ */
+ portalId: number;
+
+ /**
+ * An array of strings, each representing a property of the CRM object that should
+ * be included in the snapshot.
+ */
+ properties: Array;
+}
+
+export interface CrmObjectSnapshotResponse {
+ /**
+ * An integer representing the unique identifier of the CRM object for which the
+ * snapshot is taken.
+ */
+ objectId: number;
+
+ /**
+ * A string indicating the type of the CRM object, such as contact, company, or
+ * deal.
+ */
+ objectTypeId: string;
+
+ /**
+ * An integer representing the unique identifier of the HubSpot portal associated
+ * with the CRM object.
+ */
+ portalId: number;
+
+ /**
+ * A UUID string representing the status identifier of the snapshot request,
+ * indicating the current state of the snapshot process.
+ */
+ snapshotStatusId: string;
+}
+
export interface ErrorData {
/**
* The error category
@@ -243,6 +499,61 @@ export interface ErrorDetail {
subCategory?: string;
}
+/**
+ * Defines a single condition for searching CRM objects, specifying the property to
+ * filter on, the operator to use (such as equals, greater than, or contains), and
+ * the value(s) to compare against.
+ */
+export interface Filter {
+ /**
+ * An array of conditions that define the criteria for the filter. Each condition
+ * specifies a property, an operator, and optionally a value or values.
+ */
+ conditions: Array;
+}
+
+export interface FilterCreateRequest {
+ /**
+ * Defines a single condition for searching CRM objects, specifying the property to
+ * filter on, the operator to use (such as equals, greater than, or contains), and
+ * the value(s) to compare against.
+ */
+ filter: Filter;
+
+ /**
+ * The unique identifier of the subscription to which the filter will be applied.
+ * It is an integer formatted as int64.
+ */
+ subscriptionId: number;
+}
+
+export interface FilterCreateResponse {
+ /**
+ * The unique identifier for the created filter. It is an integer formatted as
+ * int64.
+ */
+ filterId: number;
+}
+
+export interface FilterResponse {
+ /**
+ * The unique identifier for the filter. It is an integer in int64 format.
+ */
+ id: number;
+
+ /**
+ * A Unix timestamp in milliseconds indicating when the filter was created.
+ */
+ createdAt: number;
+
+ /**
+ * Defines a single condition for searching CRM objects, specifying the property to
+ * filter on, the operator to use (such as equals, greater than, or contains), and
+ * the value(s) to compare against.
+ */
+ filter: Filter;
+}
+
export interface ForwardPaging {
/**
* Specifies the paging information needed to retrieve the next set of results in a
@@ -251,6 +562,74 @@ export interface ForwardPaging {
next?: NextPage;
}
+export interface GdprPrivacyDeletionSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ subscriptionType: 'GDPR_PRIVACY_DELETION';
+}
+
+export interface JournalFetchResponse {
+ /**
+ * The unique identifier for the current offset of the journal entry, formatted as
+ * a UUID.
+ */
+ currentOffset: string;
+
+ /**
+ * The date and time when the URL will expire, in ISO 8601 format.
+ */
+ expiresAt: string;
+
+ /**
+ * The URL where the journal entry can be accessed. It is a string.
+ */
+ url: string;
+}
+
+export interface ListMembershipSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ listIds: Array;
+
+ objectIds: Array;
+
+ portalId: number;
+
+ subscriptionType: 'LIST_MEMBERSHIP';
+}
+
/**
* Specifies the paging information needed to retrieve the next set of results in a
* paginated API response
@@ -267,6 +646,34 @@ export interface NextPage {
link?: string;
}
+export interface ObjectSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ objectIds: Array;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ properties: Array;
+
+ subscriptionType: 'OBJECT';
+}
+
export interface ObjectTypeDefinition {
id: string;
@@ -725,6 +1132,7 @@ export interface PropertyValue {
| 'BIDEN'
| 'BILLING'
| 'BOT'
+ | 'BREEZE_AGENT'
| 'CALCULATED'
| 'CENTRAL_EXCHANGE_RATES'
| 'CHATSPOT'
@@ -749,6 +1157,7 @@ export interface PropertyValue {
| 'DEALS'
| 'DEFAULT'
| 'DELETE_OBJECTS'
+ | 'DI_WRITE_TO_CRM'
| 'EMAIL'
| 'EMAIL_INBOX_IMPORT'
| 'EMAIL_INTEGRATION'
@@ -877,6 +1286,43 @@ export interface PublicObjectID {
id: string;
}
+export interface SnapshotStatusResponse {
+ /**
+ * The unique identifier for the snapshot operation, represented as a UUID.
+ */
+ id: string;
+
+ /**
+ * The timestamp indicating when the snapshot operation was initiated, represented
+ * as a Unix timestamp in milliseconds.
+ */
+ initiatedAt: number;
+
+ /**
+ * The current status of the snapshot. Valid values include 'PENDING',
+ * 'IN_PROGRESS', 'COMPLETED', 'FAILED', and 'EXPIRED'.
+ */
+ status: 'COMPLETED' | 'EXPIRED' | 'FAILED' | 'IN_PROGRESS' | 'PENDING';
+
+ /**
+ * The timestamp indicating when the snapshot operation was completed, represented
+ * as a Unix timestamp in milliseconds.
+ */
+ completedAt?: number;
+
+ /**
+ * A code representing the error that occurred, if any. Possible values are
+ * 'TIMEOUT', 'VALIDATION_ERROR', 'INTERNAL_ERROR', and 'PERMISSION_DENIED'.
+ */
+ errorCode?: 'INTERNAL_ERROR' | 'PERMISSION_DENIED' | 'TIMEOUT' | 'VALIDATION_ERROR';
+
+ /**
+ * A descriptive message providing additional information about the snapshot
+ * operation or error.
+ */
+ message?: string;
+}
+
/**
* Ye olde error
*/
@@ -922,6 +1368,13 @@ export interface StandardError {
subCategory?: unknown;
}
+export type SubscriptionUpsertRequest =
+ | ObjectSubscriptionUpsertRequest
+ | AssociationSubscriptionUpsertRequest
+ | AppLifecycleEventSubscriptionUpsertRequest
+ | ListMembershipSubscriptionUpsertRequest
+ | GdprPrivacyDeletionSubscriptionUpsertRequest;
+
export interface TaskLocator {
/**
* The unique identifier for the task.
diff --git a/src/resources/webhooks-journal.ts b/src/resources/webhooks-journal.ts
new file mode 100644
index 00000000..95c935ec
--- /dev/null
+++ b/src/resources/webhooks-journal.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './webhooks-journal/index';
diff --git a/src/resources/webhooks-journal/api.md b/src/resources/webhooks-journal/api.md
new file mode 100644
index 00000000..4099c970
--- /dev/null
+++ b/src/resources/webhooks-journal/api.md
@@ -0,0 +1,69 @@
+# WebhooksJournal
+
+Types:
+
+- JournalCollectionResponseSubscriptionResponseNoPaging
+- JournalSubscriptionResponse
+
+## Journal
+
+Methods:
+
+- client.webhooksJournal.journal.getEarliest({ ...params }) -> Response
+- client.webhooksJournal.journal.getNextFromOffset(offset, { ...params }) -> Response
+- client.webhooksJournal.journal.getStatus(statusID) -> SnapshotStatusResponse
+
+### Batch
+
+Methods:
+
+- client.webhooksJournal.journal.batch.get({ ...params }) -> BatchResponseJournalFetchResponse
+- client.webhooksJournal.journal.batch.getEarliest(count, { ...params }) -> BatchResponseJournalFetchResponse
+- client.webhooksJournal.journal.batch.getFromOffset(count, { ...params }) -> BatchResponseJournalFetchResponse
+- client.webhooksJournal.journal.batch.getLatest(count, { ...params }) -> BatchResponseJournalFetchResponse
+
+## JournalLocal
+
+Methods:
+
+- client.webhooksJournal.journalLocal.getEarliest({ ...params }) -> Response
+- client.webhooksJournal.journalLocal.getLatest({ ...params }) -> Response
+- client.webhooksJournal.journalLocal.getNextFromOffset(offset, { ...params }) -> Response
+- client.webhooksJournal.journalLocal.getStatus(statusID) -> SnapshotStatusResponse
+
+### Batch
+
+Methods:
+
+- client.webhooksJournal.journalLocal.batch.get({ ...params }) -> BatchResponseJournalFetchResponse
+- client.webhooksJournal.journalLocal.batch.getEarliest(count, { ...params }) -> BatchResponseJournalFetchResponse
+- client.webhooksJournal.journalLocal.batch.getFromOffset(count, { ...params }) -> BatchResponseJournalFetchResponse
+
+## Snapshots
+
+Methods:
+
+- client.webhooksJournal.snapshots.create({ ...params }) -> CrmObjectSnapshotBatchResponse
+
+## Subscriptions
+
+Methods:
+
+- client.webhooksJournal.subscriptions.create({ ...params }) -> JournalSubscriptionResponse
+- client.webhooksJournal.subscriptions.list() -> JournalCollectionResponseSubscriptionResponseNoPaging
+- client.webhooksJournal.subscriptions.delete(subscriptionID) -> void
+- client.webhooksJournal.subscriptions.deleteForPortal(portalID) -> void
+- client.webhooksJournal.subscriptions.get(subscriptionID) -> JournalSubscriptionResponse
+
+### Filters
+
+Types:
+
+- FilterListResponse
+
+Methods:
+
+- client.webhooksJournal.subscriptions.filters.create({ ...params }) -> FilterCreateResponse
+- client.webhooksJournal.subscriptions.filters.list(subscriptionID) -> FilterListResponse
+- client.webhooksJournal.subscriptions.filters.delete(filterID) -> void
+- client.webhooksJournal.subscriptions.filters.get(filterID) -> FilterResponse
diff --git a/src/resources/webhooks-journal/index.ts b/src/resources/webhooks-journal/index.ts
new file mode 100644
index 00000000..74fef6b3
--- /dev/null
+++ b/src/resources/webhooks-journal/index.ts
@@ -0,0 +1,18 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export {
+ Journal,
+ BaseJournal,
+ type JournalGetEarliestParams,
+ type JournalGetNextFromOffsetParams,
+} from './journal/index';
+export {
+ JournalLocal,
+ BaseJournalLocal,
+ type JournalLocalGetEarliestParams,
+ type JournalLocalGetLatestParams,
+ type JournalLocalGetNextFromOffsetParams,
+} from './journal-local/index';
+export { Snapshots, BaseSnapshots, type SnapshotCreateParams } from './snapshots';
+export { Subscriptions, BaseSubscriptions, type SubscriptionCreateParams } from './subscriptions/index';
+export { WebhooksJournal, BaseWebhooksJournal } from './webhooks-journal';
diff --git a/src/resources/webhooks-journal/journal-local.ts b/src/resources/webhooks-journal/journal-local.ts
new file mode 100644
index 00000000..35482e96
--- /dev/null
+++ b/src/resources/webhooks-journal/journal-local.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './journal-local/index';
diff --git a/src/resources/webhooks-journal/journal-local/batch.ts b/src/resources/webhooks-journal/journal-local/batch.ts
new file mode 100644
index 00000000..4a2e7c8a
--- /dev/null
+++ b/src/resources/webhooks-journal/journal-local/batch.ts
@@ -0,0 +1,111 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../core/resource';
+import * as Shared from '../../shared';
+import { APIPromise } from '../../../core/api-promise';
+import { RequestOptions } from '../../../internal/request-options';
+import { path } from '../../../internal/utils/path';
+
+export class BaseBatch extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal', 'journalLocal', 'batch'] = Object.freeze([
+ 'webhooksJournal',
+ 'journalLocal',
+ 'batch',
+ ] as const);
+
+ /**
+ * Execute a batch read operation on the webhooks journal. This endpoint allows you
+ * to retrieve a batch of webhook journal entries by providing the necessary input
+ * data. It is useful for processing multiple records in a single request,
+ * streamlining data retrieval tasks.
+ */
+ get(
+ params: BatchGetParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { installPortalId, ...body } = params;
+ return this._client.post('/webhooks-journal/journal-local/2026-03/batch/read', {
+ query: { installPortalId },
+ body,
+ ...options,
+ });
+ }
+
+ /**
+ * Retrieve the earliest batch of webhook journal entries. This endpoint is useful
+ * for accessing the oldest available data in the webhook journal, allowing users
+ * to process or analyze historical webhook events. The number of entries to fetch
+ * is specified by the 'count' path parameter.
+ */
+ getEarliest(
+ count: number,
+ query: BatchGetEarliestParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/webhooks-journal/journal-local/2026-03/batch/earliest/${count}`, {
+ query,
+ ...options,
+ });
+ }
+
+ /**
+ * Retrieve a batch of webhook journal entries starting from a specified offset.
+ * This endpoint is useful for paginating through large sets of webhook data. The
+ * number of entries returned is determined by the 'count' parameter.
+ */
+ getFromOffset(
+ count: number,
+ params: BatchGetFromOffsetParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { offset, ...query } = params;
+ return this._client.get(path`/webhooks-journal/journal-local/2026-03/batch/${offset}/next/${count}`, {
+ query,
+ ...options,
+ });
+ }
+}
+export class Batch extends BaseBatch {}
+
+export interface BatchGetParams {
+ /**
+ * Body param: Strings to input.
+ */
+ inputs: Array;
+
+ /**
+ * Query param: The ID of the portal where the webhooks are installed. This
+ * parameter is optional and is used to specify the target portal for the
+ * operation.
+ */
+ installPortalId?: number;
+}
+
+export interface BatchGetEarliestParams {
+ /**
+ * The ID of the portal installation to filter the webhook journal entries. This is
+ * an optional integer parameter.
+ */
+ installPortalId?: number;
+}
+
+export interface BatchGetFromOffsetParams {
+ /**
+ * Path param: The starting point for the batch retrieval, specified as a string.
+ */
+ offset: string;
+
+ /**
+ * Query param: The ID of the portal where the webhooks are installed. This is an
+ * optional parameter.
+ */
+ installPortalId?: number;
+}
+
+export declare namespace Batch {
+ export {
+ type BatchGetParams as BatchGetParams,
+ type BatchGetEarliestParams as BatchGetEarliestParams,
+ type BatchGetFromOffsetParams as BatchGetFromOffsetParams,
+ };
+}
diff --git a/src/resources/webhooks-journal/journal-local/index.ts b/src/resources/webhooks-journal/journal-local/index.ts
new file mode 100644
index 00000000..de5c4a45
--- /dev/null
+++ b/src/resources/webhooks-journal/journal-local/index.ts
@@ -0,0 +1,16 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export {
+ Batch,
+ BaseBatch,
+ type BatchGetParams,
+ type BatchGetEarliestParams,
+ type BatchGetFromOffsetParams,
+} from './batch';
+export {
+ JournalLocal,
+ BaseJournalLocal,
+ type JournalLocalGetEarliestParams,
+ type JournalLocalGetLatestParams,
+ type JournalLocalGetNextFromOffsetParams,
+} from './journal-local';
diff --git a/src/resources/webhooks-journal/journal-local/journal-local.ts b/src/resources/webhooks-journal/journal-local/journal-local.ts
new file mode 100644
index 00000000..e94f9062
--- /dev/null
+++ b/src/resources/webhooks-journal/journal-local/journal-local.ts
@@ -0,0 +1,125 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../core/resource';
+import * as Shared from '../../shared';
+import * as BatchAPI from './batch';
+import { BaseBatch, Batch, BatchGetEarliestParams, BatchGetFromOffsetParams, BatchGetParams } from './batch';
+import { APIPromise } from '../../../core/api-promise';
+import { buildHeaders } from '../../../internal/headers';
+import { RequestOptions } from '../../../internal/request-options';
+import { path } from '../../../internal/utils/path';
+
+export class BaseJournalLocal extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal', 'journalLocal'] = Object.freeze([
+ 'webhooksJournal',
+ 'journalLocal',
+ ] as const);
+
+ /**
+ * Retrieve the earliest webhook journal entries for the specified portal. This
+ * endpoint can be used to access the oldest records available in the webhook
+ * journal, which may be useful for auditing or historical analysis.
+ */
+ getEarliest(
+ query: JournalLocalGetEarliestParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/webhooks-journal/journal-local/2026-03/earliest', {
+ query,
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
+
+ /**
+ * Retrieve the latest entries from the webhooks journal for the specified portal.
+ * This endpoint is useful for accessing the most recent webhook events and their
+ * statuses, allowing you to monitor and debug webhook activity effectively.
+ */
+ getLatest(
+ query: JournalLocalGetLatestParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/webhooks-journal/journal/2026-03/latest', {
+ query,
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
+
+ /**
+ * Retrieve the next set of webhook journal entries starting from a specified
+ * offset. This endpoint is useful for paginating through large sets of webhook
+ * data, allowing you to continue from where a previous request left off.
+ */
+ getNextFromOffset(
+ offset: string,
+ query: JournalLocalGetNextFromOffsetParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/webhooks-journal/journal-local/2026-03/offset/${offset}/next`, {
+ query,
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
+
+ /**
+ * Retrieve the status of a specific webhook journal entry using its unique status
+ * ID. This endpoint is useful for monitoring the progress or outcome of webhook
+ * journal entries, allowing you to check if an entry is pending, in progress,
+ * completed, failed, or expired.
+ */
+ getStatus(statusID: string, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/webhooks-journal/journal-local/2026-03/status/${statusID}`, options);
+ }
+}
+export class JournalLocal extends BaseJournalLocal {
+ batch: BatchAPI.Batch = new BatchAPI.Batch(this._client);
+}
+
+export interface JournalLocalGetEarliestParams {
+ /**
+ * The ID of the portal for which to retrieve the earliest webhook journal entries.
+ * This parameter is optional and should be an integer.
+ */
+ installPortalId?: number;
+}
+
+export interface JournalLocalGetLatestParams {
+ /**
+ * The unique identifier of the portal installation for which to retrieve the
+ * latest journal entries. This parameter is optional and should be an integer.
+ */
+ installPortalId?: number;
+}
+
+export interface JournalLocalGetNextFromOffsetParams {
+ /**
+ * The ID of the portal installation to filter the webhook journal entries. This is
+ * an integer value.
+ */
+ installPortalId?: number;
+}
+
+JournalLocal.Batch = Batch;
+JournalLocal.BaseBatch = BaseBatch;
+
+export declare namespace JournalLocal {
+ export {
+ type JournalLocalGetEarliestParams as JournalLocalGetEarliestParams,
+ type JournalLocalGetLatestParams as JournalLocalGetLatestParams,
+ type JournalLocalGetNextFromOffsetParams as JournalLocalGetNextFromOffsetParams,
+ };
+
+ export {
+ Batch as Batch,
+ BaseBatch as BaseBatch,
+ type BatchGetParams as BatchGetParams,
+ type BatchGetEarliestParams as BatchGetEarliestParams,
+ type BatchGetFromOffsetParams as BatchGetFromOffsetParams,
+ };
+}
diff --git a/src/resources/webhooks-journal/journal.ts b/src/resources/webhooks-journal/journal.ts
new file mode 100644
index 00000000..87915e27
--- /dev/null
+++ b/src/resources/webhooks-journal/journal.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './journal/index';
diff --git a/src/resources/webhooks-journal/journal/batch.ts b/src/resources/webhooks-journal/journal/batch.ts
new file mode 100644
index 00000000..fb1504e1
--- /dev/null
+++ b/src/resources/webhooks-journal/journal/batch.ts
@@ -0,0 +1,137 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../core/resource';
+import * as Shared from '../../shared';
+import { APIPromise } from '../../../core/api-promise';
+import { RequestOptions } from '../../../internal/request-options';
+import { path } from '../../../internal/utils/path';
+
+export class BaseBatch extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal', 'journal', 'batch'] = Object.freeze([
+ 'webhooksJournal',
+ 'journal',
+ 'batch',
+ ] as const);
+
+ /**
+ * Execute a batch read operation on the webhooks journal for the specified date,
+ * 2026-03. This endpoint allows you to retrieve multiple entries from the webhooks
+ * journal in a single request, which can be useful for processing large amounts of
+ * data efficiently. Ensure that the request body is provided in the required
+ * format.
+ */
+ get(
+ params: BatchGetParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { installPortalId, ...body } = params;
+ return this._client.post('/webhooks-journal/journal/2026-03/batch/read', {
+ query: { installPortalId },
+ body,
+ ...options,
+ });
+ }
+
+ /**
+ * Retrieve the earliest batch of webhook journal entries for a specified count.
+ * This endpoint is useful for accessing historical webhook data in batches,
+ * allowing you to process or analyze older entries. The number of entries
+ * retrieved is determined by the count parameter.
+ */
+ getEarliest(
+ count: number,
+ query: BatchGetEarliestParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/webhooks-journal/journal/2026-03/batch/earliest/${count}`, {
+ query,
+ ...options,
+ });
+ }
+
+ /**
+ * Retrieve a batch of webhook journal entries starting from a specified offset.
+ * This endpoint allows you to fetch a defined number of entries, which can be
+ * useful for processing large datasets in manageable chunks.
+ */
+ getFromOffset(
+ count: number,
+ params: BatchGetFromOffsetParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { offset, ...query } = params;
+ return this._client.get(path`/webhooks-journal/journal/2026-03/batch/${offset}/next/${count}`, {
+ query,
+ ...options,
+ });
+ }
+
+ /**
+ * Retrieve the latest batch of webhook journal entries up to the specified count.
+ * This endpoint is useful for fetching recent webhook data for analysis or
+ * processing. The count parameter determines the maximum number of entries to
+ * return.
+ */
+ getLatest(
+ count: number,
+ query: BatchGetLatestParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/webhooks-journal/journal/2026-03/batch/latest/${count}`, {
+ query,
+ ...options,
+ });
+ }
+}
+export class Batch extends BaseBatch {}
+
+export interface BatchGetParams {
+ /**
+ * Body param: Strings to input.
+ */
+ inputs: Array;
+
+ /**
+ * Query param: An integer representing the ID of the portal installation for which
+ * the webhooks journal data should be retrieved.
+ */
+ installPortalId?: number;
+}
+
+export interface BatchGetEarliestParams {
+ /**
+ * The ID of the portal installation. This is an integer value that specifies which
+ * portal's data to access.
+ */
+ installPortalId?: number;
+}
+
+export interface BatchGetFromOffsetParams {
+ /**
+ * Path param: The starting point for fetching the journal entries. This is a
+ * string value.
+ */
+ offset: string;
+
+ /**
+ * Query param: The ID of the portal installation. This is an integer value.
+ */
+ installPortalId?: number;
+}
+
+export interface BatchGetLatestParams {
+ /**
+ * The ID of the portal installation. This is an integer value used to specify the
+ * portal context for the request.
+ */
+ installPortalId?: number;
+}
+
+export declare namespace Batch {
+ export {
+ type BatchGetParams as BatchGetParams,
+ type BatchGetEarliestParams as BatchGetEarliestParams,
+ type BatchGetFromOffsetParams as BatchGetFromOffsetParams,
+ type BatchGetLatestParams as BatchGetLatestParams,
+ };
+}
diff --git a/src/resources/webhooks-journal/journal/index.ts b/src/resources/webhooks-journal/journal/index.ts
new file mode 100644
index 00000000..96dbdd18
--- /dev/null
+++ b/src/resources/webhooks-journal/journal/index.ts
@@ -0,0 +1,16 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export {
+ Batch,
+ BaseBatch,
+ type BatchGetParams,
+ type BatchGetEarliestParams,
+ type BatchGetFromOffsetParams,
+ type BatchGetLatestParams,
+} from './batch';
+export {
+ Journal,
+ BaseJournal,
+ type JournalGetEarliestParams,
+ type JournalGetNextFromOffsetParams,
+} from './journal';
diff --git a/src/resources/webhooks-journal/journal/journal.ts b/src/resources/webhooks-journal/journal/journal.ts
new file mode 100644
index 00000000..7b1fed95
--- /dev/null
+++ b/src/resources/webhooks-journal/journal/journal.ts
@@ -0,0 +1,106 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../core/resource';
+import * as Shared from '../../shared';
+import * as BatchAPI from './batch';
+import {
+ BaseBatch,
+ Batch,
+ BatchGetEarliestParams,
+ BatchGetFromOffsetParams,
+ BatchGetLatestParams,
+ BatchGetParams,
+} from './batch';
+import { APIPromise } from '../../../core/api-promise';
+import { buildHeaders } from '../../../internal/headers';
+import { RequestOptions } from '../../../internal/request-options';
+import { path } from '../../../internal/utils/path';
+
+export class BaseJournal extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal', 'journal'] = Object.freeze([
+ 'webhooksJournal',
+ 'journal',
+ ] as const);
+
+ /**
+ * Retrieve the earliest entry from the webhooks journal for the specified portal.
+ * This endpoint is useful for accessing the first recorded webhook event in the
+ * journal, which can be helpful for auditing or debugging purposes.
+ */
+ getEarliest(
+ query: JournalGetEarliestParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/webhooks-journal/journal/2026-03/earliest', {
+ query,
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
+
+ /**
+ * Retrieve the next set of entries from the webhooks journal starting from a
+ * specified offset. This endpoint is useful for paginating through journal entries
+ * to process or analyze webhook events sequentially.
+ */
+ getNextFromOffset(
+ offset: string,
+ query: JournalGetNextFromOffsetParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/webhooks-journal/journal/2026-03/offset/${offset}/next`, {
+ query,
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ __binaryResponse: true,
+ });
+ }
+
+ /**
+ * Retrieve the status of a specific webhook journal entry using its unique status
+ * ID. This endpoint provides detailed information about the status, including
+ * whether it is pending, in progress, completed, failed, or expired. It is useful
+ * for monitoring and managing the state of webhook journal entries.
+ */
+ getStatus(statusID: string, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/webhooks-journal/journal/2026-03/status/${statusID}`, options);
+ }
+}
+export class Journal extends BaseJournal {
+ batch: BatchAPI.Batch = new BatchAPI.Batch(this._client);
+}
+
+export interface JournalGetEarliestParams {
+ /**
+ * The ID of the portal installation to filter the journal entries by. This is an
+ * integer value.
+ */
+ installPortalId?: number;
+}
+
+export interface JournalGetNextFromOffsetParams {
+ /**
+ * The ID of the portal where the webhooks are installed. This is an integer value.
+ */
+ installPortalId?: number;
+}
+
+Journal.Batch = Batch;
+Journal.BaseBatch = BaseBatch;
+
+export declare namespace Journal {
+ export {
+ type JournalGetEarliestParams as JournalGetEarliestParams,
+ type JournalGetNextFromOffsetParams as JournalGetNextFromOffsetParams,
+ };
+
+ export {
+ Batch as Batch,
+ BaseBatch as BaseBatch,
+ type BatchGetParams as BatchGetParams,
+ type BatchGetEarliestParams as BatchGetEarliestParams,
+ type BatchGetFromOffsetParams as BatchGetFromOffsetParams,
+ type BatchGetLatestParams as BatchGetLatestParams,
+ };
+}
diff --git a/src/resources/webhooks-journal/snapshots.ts b/src/resources/webhooks-journal/snapshots.ts
new file mode 100644
index 00000000..e666a42b
--- /dev/null
+++ b/src/resources/webhooks-journal/snapshots.ts
@@ -0,0 +1,39 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../core/resource';
+import * as Shared from '../shared';
+import { APIPromise } from '../../core/api-promise';
+import { RequestOptions } from '../../internal/request-options';
+
+export class BaseSnapshots extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal', 'snapshots'] = Object.freeze([
+ 'webhooksJournal',
+ 'snapshots',
+ ] as const);
+
+ /**
+ * Create a batch of CRM object snapshots in HubSpot. This endpoint is used to
+ * capture the current state of specified CRM objects for later reference or
+ * analysis. It requires a JSON payload containing the details of the CRM objects
+ * to snapshot. This operation is exempt from daily and ten-secondly rate limits.
+ */
+ create(
+ body: SnapshotCreateParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.post('/webhooks-journal/snapshots/2026-03/crm', { body, ...options });
+ }
+}
+export class Snapshots extends BaseSnapshots {}
+
+export interface SnapshotCreateParams {
+ /**
+ * An array of CrmObjectSnapshotRequest objects, each representing a request to
+ * create a snapshot for a specific CRM object. This property is required.
+ */
+ snapshotRequests: Array;
+}
+
+export declare namespace Snapshots {
+ export { type SnapshotCreateParams as SnapshotCreateParams };
+}
diff --git a/src/resources/webhooks-journal/subscriptions.ts b/src/resources/webhooks-journal/subscriptions.ts
new file mode 100644
index 00000000..2019b794
--- /dev/null
+++ b/src/resources/webhooks-journal/subscriptions.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './subscriptions/index';
diff --git a/src/resources/webhooks-journal/subscriptions/filters.ts b/src/resources/webhooks-journal/subscriptions/filters.ts
new file mode 100644
index 00000000..c29e75ce
--- /dev/null
+++ b/src/resources/webhooks-journal/subscriptions/filters.ts
@@ -0,0 +1,82 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../core/resource';
+import * as Shared from '../../shared';
+import { APIPromise } from '../../../core/api-promise';
+import { buildHeaders } from '../../../internal/headers';
+import { RequestOptions } from '../../../internal/request-options';
+import { path } from '../../../internal/utils/path';
+
+export class BaseFilters extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal', 'subscriptions', 'filters'] = Object.freeze([
+ 'webhooksJournal',
+ 'subscriptions',
+ 'filters',
+ ] as const);
+
+ /**
+ * Create a new filter for a specific webhook subscription in the HubSpot account.
+ * This endpoint allows you to define conditions that determine when a webhook
+ * should be triggered. The filter is associated with a subscription identified by
+ * its ID, and the request must include the filter details.
+ */
+ create(body: FilterCreateParams, options?: RequestOptions): APIPromise {
+ return this._client.post('/webhooks-journal/subscriptions/2026-03/filters', { body, ...options });
+ }
+
+ /**
+ * Retrieve the filters associated with a specific webhook subscription. This
+ * endpoint allows you to view the filters applied to a subscription, which can
+ * help in managing and understanding the conditions set for webhook events.
+ */
+ list(subscriptionID: number, options?: RequestOptions): APIPromise {
+ return this._client.get(
+ path`/webhooks-journal/subscriptions/2026-03/filters/subscription/${subscriptionID}`,
+ options,
+ );
+ }
+
+ /**
+ * Remove a specific filter from the webhooks journal subscriptions. This operation
+ * is useful for managing and cleaning up filters that are no longer needed. Once
+ * deleted, the filter cannot be recovered.
+ */
+ delete(filterID: number, options?: RequestOptions): APIPromise {
+ return this._client.delete(path`/webhooks-journal/subscriptions/2026-03/filters/${filterID}`, {
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ });
+ }
+
+ /**
+ * Retrieve a specific filter associated with a webhook journal subscription. This
+ * endpoint allows you to access the details of the filter identified by the
+ * filterId, which is useful for managing and understanding the conditions applied
+ * to webhook events.
+ */
+ get(filterID: number, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/webhooks-journal/subscriptions/2026-03/filters/${filterID}`, options);
+ }
+}
+export class Filters extends BaseFilters {}
+
+export type FilterListResponse = Array;
+
+export interface FilterCreateParams {
+ /**
+ * Defines a single condition for searching CRM objects, specifying the property to
+ * filter on, the operator to use (such as equals, greater than, or contains), and
+ * the value(s) to compare against.
+ */
+ filter: Shared.Filter;
+
+ /**
+ * The unique identifier of the subscription to which the filter will be applied.
+ * It is an integer formatted as int64.
+ */
+ subscriptionId: number;
+}
+
+export declare namespace Filters {
+ export { type FilterListResponse as FilterListResponse, type FilterCreateParams as FilterCreateParams };
+}
diff --git a/src/resources/webhooks-journal/subscriptions/index.ts b/src/resources/webhooks-journal/subscriptions/index.ts
new file mode 100644
index 00000000..dc53aa6f
--- /dev/null
+++ b/src/resources/webhooks-journal/subscriptions/index.ts
@@ -0,0 +1,4 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export { Filters, BaseFilters, type FilterListResponse, type FilterCreateParams } from './filters';
+export { Subscriptions, BaseSubscriptions, type SubscriptionCreateParams } from './subscriptions';
diff --git a/src/resources/webhooks-journal/subscriptions/subscriptions.ts b/src/resources/webhooks-journal/subscriptions/subscriptions.ts
new file mode 100644
index 00000000..e0ca8915
--- /dev/null
+++ b/src/resources/webhooks-journal/subscriptions/subscriptions.ts
@@ -0,0 +1,221 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../core/resource';
+import * as WebhooksJournalAPI from '../webhooks-journal';
+import * as FiltersAPI from './filters';
+import { BaseFilters, FilterCreateParams, FilterListResponse, Filters } from './filters';
+import { APIPromise } from '../../../core/api-promise';
+import { buildHeaders } from '../../../internal/headers';
+import { RequestOptions } from '../../../internal/request-options';
+import { path } from '../../../internal/utils/path';
+
+export class BaseSubscriptions extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal', 'subscriptions'] = Object.freeze([
+ 'webhooksJournal',
+ 'subscriptions',
+ ] as const);
+
+ /**
+ * Create a new subscription in the Webhooks Journal for the specified version.
+ * This endpoint allows you to define the subscription details by providing the
+ * necessary information in the request body. It supports various types of
+ * subscriptions, including object, association, event, app lifecycle event, list
+ * membership, and GDPR privacy deletion. Ensure that all required fields are
+ * included in the request to successfully create a subscription.
+ */
+ create(
+ body: SubscriptionCreateParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.post('/webhooks-journal/subscriptions/2026-03', { body, ...options });
+ }
+
+ /**
+ * Retrieve a list of webhook journal subscriptions for the specified version. This
+ * endpoint allows you to view all active subscriptions without pagination. It is
+ * useful for monitoring and managing webhook subscriptions in your HubSpot
+ * account.
+ */
+ list(
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/webhooks-journal/subscriptions/2026-03', options);
+ }
+
+ /**
+ * Delete a specific webhook journal subscription using its unique identifier. This
+ * operation is useful for managing and cleaning up subscriptions that are no
+ * longer needed in your HubSpot account.
+ */
+ delete(subscriptionID: number, options?: RequestOptions): APIPromise {
+ return this._client.delete(path`/webhooks-journal/subscriptions/2026-03/${subscriptionID}`, {
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ });
+ }
+
+ /**
+ * Delete a webhook journal subscription for a specific portal. This operation
+ * removes the subscription associated with the given portalId, ensuring that no
+ * further webhook events are sent for this portal. Use this endpoint to manage and
+ * clean up subscriptions that are no longer needed.
+ */
+ deleteForPortal(portalID: number, options?: RequestOptions): APIPromise {
+ return this._client.delete(path`/webhooks-journal/subscriptions/2026-03/portals/${portalID}`, {
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ });
+ }
+
+ /**
+ * Retrieve details of a specific webhook subscription using its unique identifier.
+ * This endpoint is useful for obtaining information about a particular
+ * subscription, such as its actions, object type, and associated properties.
+ */
+ get(
+ subscriptionID: number,
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/webhooks-journal/subscriptions/2026-03/${subscriptionID}`, options);
+ }
+}
+export class Subscriptions extends BaseSubscriptions {
+ filters: FiltersAPI.Filters = new FiltersAPI.Filters(this._client);
+}
+
+export type SubscriptionCreateParams =
+ | SubscriptionCreateParams.ObjectSubscriptionUpsertRequest
+ | SubscriptionCreateParams.AssociationSubscriptionUpsertRequest
+ | SubscriptionCreateParams.AppLifecycleEventSubscriptionUpsertRequest
+ | SubscriptionCreateParams.ListMembershipSubscriptionUpsertRequest
+ | SubscriptionCreateParams.GdprPrivacyDeletionSubscriptionUpsertRequest;
+
+export declare namespace SubscriptionCreateParams {
+ export interface ObjectSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ objectIds: Array;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ properties: Array;
+
+ subscriptionType: 'OBJECT';
+ }
+
+ export interface AssociationSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ associatedObjectTypeIds: Array;
+
+ objectIds: Array;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ subscriptionType: 'ASSOCIATION';
+ }
+
+ export interface AppLifecycleEventSubscriptionUpsertRequest {
+ eventTypeId: string;
+
+ properties: Array;
+
+ subscriptionType: 'APP_LIFECYCLE_EVENT';
+ }
+
+ export interface ListMembershipSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ listIds: Array;
+
+ objectIds: Array;
+
+ portalId: number;
+
+ subscriptionType: 'LIST_MEMBERSHIP';
+ }
+
+ export interface GdprPrivacyDeletionSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ subscriptionType: 'GDPR_PRIVACY_DELETION';
+ }
+}
+
+Subscriptions.Filters = Filters;
+Subscriptions.BaseFilters = BaseFilters;
+
+export declare namespace Subscriptions {
+ export { type SubscriptionCreateParams as SubscriptionCreateParams };
+
+ export {
+ Filters as Filters,
+ BaseFilters as BaseFilters,
+ type FilterListResponse as FilterListResponse,
+ type FilterCreateParams as FilterCreateParams,
+ };
+}
diff --git a/src/resources/webhooks-journal/webhooks-journal.ts b/src/resources/webhooks-journal/webhooks-journal.ts
new file mode 100644
index 00000000..262e85a5
--- /dev/null
+++ b/src/resources/webhooks-journal/webhooks-journal.ts
@@ -0,0 +1,195 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../core/resource';
+import * as Shared from '../shared';
+import * as SnapshotsAPI from './snapshots';
+import { BaseSnapshots, SnapshotCreateParams, Snapshots } from './snapshots';
+import * as JournalLocalAPI from './journal-local/journal-local';
+import {
+ BaseJournalLocal,
+ JournalLocal,
+ JournalLocalGetEarliestParams,
+ JournalLocalGetLatestParams,
+ JournalLocalGetNextFromOffsetParams,
+} from './journal-local/journal-local';
+import * as JournalAPI from './journal/journal';
+import {
+ BaseJournal,
+ Journal,
+ JournalGetEarliestParams,
+ JournalGetNextFromOffsetParams,
+} from './journal/journal';
+import * as SubscriptionsAPI from './subscriptions/subscriptions';
+import { BaseSubscriptions, SubscriptionCreateParams, Subscriptions } from './subscriptions/subscriptions';
+
+export class BaseWebhooksJournal extends APIResource {
+ static override readonly _key: readonly ['webhooksJournal'] = Object.freeze(['webhooksJournal'] as const);
+}
+export class WebhooksJournal extends BaseWebhooksJournal {
+ journal: JournalAPI.Journal = new JournalAPI.Journal(this._client);
+ journalLocal: JournalLocalAPI.JournalLocal = new JournalLocalAPI.JournalLocal(this._client);
+ snapshots: SnapshotsAPI.Snapshots = new SnapshotsAPI.Snapshots(this._client);
+ subscriptions: SubscriptionsAPI.Subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
+}
+
+export interface JournalCollectionResponseSubscriptionResponseNoPaging {
+ /**
+ * An array of subscription responses, where each item contains details about a
+ * specific subscription. Each item follows the SubscriptionResponse schema.
+ */
+ results: Array;
+}
+
+export interface JournalSubscriptionResponse {
+ /**
+ * The unique identifier for the subscription, represented as an integer.
+ */
+ id: number;
+
+ /**
+ * An array of actions associated with the subscription. Valid actions include
+ * 'CREATE', 'UPDATE', 'DELETE', 'MERGE', 'RESTORE', 'ASSOCIATION_ADDED',
+ * 'ASSOCIATION_REMOVED', 'SNAPSHOT', 'APP_INSTALL', 'APP_UNINSTALL',
+ * 'ADDED_TO_LIST', 'REMOVED_FROM_LIST', and 'GDPR_DELETE'.
+ */
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ /**
+ * The unique identifier for the app associated with the subscription, represented
+ * as an integer.
+ */
+ appId: number;
+
+ /**
+ * The date and time when the subscription was created, in ISO 8601 format.
+ */
+ createdAt: string;
+
+ /**
+ * The identifier for the type of object associated with the subscription,
+ * represented as a string.
+ */
+ objectTypeId: string;
+
+ /**
+ * The type of subscription, indicating the nature of events it pertains to. Valid
+ * values include 'OBJECT', 'ASSOCIATION', 'EVENT', 'APP_LIFECYCLE_EVENT',
+ * 'LIST_MEMBERSHIP', and 'GDPR_PRIVACY_DELETION'.
+ */
+ subscriptionType:
+ | 'APP_LIFECYCLE_EVENT'
+ | 'ASSOCIATION'
+ | 'EVENT'
+ | 'GDPR_PRIVACY_DELETION'
+ | 'LIST_MEMBERSHIP'
+ | 'OBJECT';
+
+ /**
+ * The date and time when the subscription was last updated, in ISO 8601 format.
+ */
+ updatedAt: string;
+
+ /**
+ * An object containing overrides for actions, where each key is an action and the
+ * value is an ActionOverrideRequest object.
+ */
+ actionOverrides?: { [key: string]: Shared.ActionOverrideRequest };
+
+ /**
+ * An array of strings representing the IDs of associated object types.
+ */
+ associatedObjectTypeIds?: Array;
+
+ /**
+ * The unique identifier of the user who created the subscription, represented as
+ * an integer.
+ */
+ createdBy?: number;
+
+ /**
+ * The date and time when the subscription was deleted, in ISO 8601 format, if
+ * applicable.
+ */
+ deletedAt?: string;
+
+ /**
+ * An array of integers representing the IDs of lists associated with the
+ * subscription.
+ */
+ listIds?: Array;
+
+ /**
+ * An array of integers representing the IDs of objects associated with the
+ * subscription.
+ */
+ objectIds?: Array;
+
+ /**
+ * The unique identifier for the portal associated with the subscription,
+ * represented as an integer.
+ */
+ portalId?: number;
+
+ /**
+ * An array of strings representing the properties associated with the
+ * subscription.
+ */
+ properties?: Array;
+}
+
+WebhooksJournal.Journal = Journal;
+WebhooksJournal.BaseJournal = BaseJournal;
+WebhooksJournal.JournalLocal = JournalLocal;
+WebhooksJournal.BaseJournalLocal = BaseJournalLocal;
+WebhooksJournal.Snapshots = Snapshots;
+WebhooksJournal.BaseSnapshots = BaseSnapshots;
+WebhooksJournal.Subscriptions = Subscriptions;
+WebhooksJournal.BaseSubscriptions = BaseSubscriptions;
+
+export declare namespace WebhooksJournal {
+ export {
+ type JournalCollectionResponseSubscriptionResponseNoPaging as JournalCollectionResponseSubscriptionResponseNoPaging,
+ type JournalSubscriptionResponse as JournalSubscriptionResponse,
+ };
+
+ export {
+ Journal as Journal,
+ BaseJournal as BaseJournal,
+ type JournalGetEarliestParams as JournalGetEarliestParams,
+ type JournalGetNextFromOffsetParams as JournalGetNextFromOffsetParams,
+ };
+
+ export {
+ JournalLocal as JournalLocal,
+ BaseJournalLocal as BaseJournalLocal,
+ type JournalLocalGetEarliestParams as JournalLocalGetEarliestParams,
+ type JournalLocalGetLatestParams as JournalLocalGetLatestParams,
+ type JournalLocalGetNextFromOffsetParams as JournalLocalGetNextFromOffsetParams,
+ };
+
+ export {
+ Snapshots as Snapshots,
+ BaseSnapshots as BaseSnapshots,
+ type SnapshotCreateParams as SnapshotCreateParams,
+ };
+
+ export {
+ Subscriptions as Subscriptions,
+ BaseSubscriptions as BaseSubscriptions,
+ type SubscriptionCreateParams as SubscriptionCreateParams,
+ };
+}
diff --git a/src/resources/webhooks/api.md b/src/resources/webhooks/api.md
index bebda19c..8f66171f 100644
--- a/src/resources/webhooks/api.md
+++ b/src/resources/webhooks/api.md
@@ -2,38 +2,18 @@
Types:
-- ActionOverrideRequest
-- AppLifecycleEventSubscriptionUpsertRequest
-- AssociationSubscriptionUpsertRequest
- BatchInputSubscriptionBatchUpdateRequest
-- BatchResponseJournalFetchResponse
-- BatchResponseJournalFetchResponseWithErrors
- BatchResponseSubscriptionResponse
- BatchResponseSubscriptionResponseWithErrors
- CollectionResponseSubscriptionResponseNoPaging
-- Condition
-- CrmObjectSnapshotBatchRequest
-- CrmObjectSnapshotBatchResponse
-- CrmObjectSnapshotRequest
-- CrmObjectSnapshotResponse
-- Filter
-- FilterCreateRequest
-- FilterCreateResponse
-- FilterResponse
-- GdprPrivacyDeletionSubscriptionUpsertRequest
-- JournalFetchResponse
-- ListMembershipSubscriptionUpsertRequest
-- ObjectSubscriptionUpsertRequest
- SettingsChangeRequest
- SettingsResponse
-- SnapshotStatusResponse
- SubscriptionBatchUpdateRequest
- SubscriptionCreateRequest
- SubscriptionListResponse
- SubscriptionPatchRequest
- SubscriptionResponse
- SubscriptionResponse1
-- SubscriptionUpsertRequest
- ThrottlingSettings
- WebhookListSubscriptionFiltersResponse
@@ -42,7 +22,7 @@ Methods:
- client.webhooks.createBatchEventSubscriptions(appID, { ...params }) -> BatchResponseSubscriptionResponse
- client.webhooks.createCrmSnapshots({ ...params }) -> CrmObjectSnapshotBatchResponse
- client.webhooks.createEventSubscription(appID, { ...params }) -> SubscriptionResponse
-- client.webhooks.createJournalSubscription() -> SubscriptionResponse1
+- client.webhooks.createJournalSubscription({ ...params }) -> JournalSubscriptionResponse
- client.webhooks.createSubscriptionFilter({ ...params }) -> FilterCreateResponse
- client.webhooks.deleteEventSubscription(subscriptionID, { ...params }) -> void
- client.webhooks.deleteJournalSubscription(subscriptionID) -> void
@@ -57,7 +37,7 @@ Methods:
- client.webhooks.getJournalBatchByRequest({ ...params }) -> BatchResponseJournalFetchResponse
- client.webhooks.getJournalBatchFromOffset(count, { ...params }) -> BatchResponseJournalFetchResponse
- client.webhooks.getJournalStatus(statusID) -> SnapshotStatusResponse
-- client.webhooks.getJournalSubscription(subscriptionID) -> SubscriptionResponse1
+- client.webhooks.getJournalSubscription(subscriptionID) -> JournalSubscriptionResponse
- client.webhooks.getLatestJournalBatch(count, { ...params }) -> BatchResponseJournalFetchResponse
- client.webhooks.getLatestJournalEntry({ ...params }) -> Response
- client.webhooks.getLatestLocalJournalBatch(count, { ...params }) -> BatchResponseJournalFetchResponse
@@ -70,7 +50,7 @@ Methods:
- client.webhooks.getSettings(appID) -> SettingsResponse
- client.webhooks.getSubscriptionFilter(filterID) -> FilterResponse
- client.webhooks.listEventSubscriptions(appID) -> SubscriptionListResponse
-- client.webhooks.listJournalSubscriptions() -> CollectionResponseSubscriptionResponseNoPaging
+- client.webhooks.listJournalSubscriptions() -> JournalCollectionResponseSubscriptionResponseNoPaging
- client.webhooks.listSubscriptionFilters(subscriptionID) -> WebhookListSubscriptionFiltersResponse
- client.webhooks.updateEventSubscription(subscriptionID, { ...params }) -> SubscriptionResponse
- client.webhooks.updateSettings(appID, { ...params }) -> SettingsResponse
diff --git a/src/resources/webhooks/webhooks.ts b/src/resources/webhooks/webhooks.ts
index 46c9b2b8..b5494cab 100644
--- a/src/resources/webhooks/webhooks.ts
+++ b/src/resources/webhooks/webhooks.ts
@@ -2,6 +2,7 @@
import { APIResource } from '../../core/resource';
import * as Shared from '../shared';
+import * as WebhooksJournalAPI from '../webhooks-journal/webhooks-journal';
import { APIPromise } from '../../core/api-promise';
import { buildHeaders } from '../../internal/headers';
import { RequestOptions } from '../../internal/request-options';
@@ -25,16 +26,15 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Create a batch of CRM object snapshots for the specified portal. This endpoint
- * allows you to capture the state of CRM objects at a specific point in time,
- * which can be useful for auditing or historical analysis. The request requires a
- * list of CRM object snapshot requests, each specifying the portal ID, object ID,
- * object type ID, and properties to include in the snapshot.
+ * Create a batch of CRM object snapshots in HubSpot. This endpoint is used to
+ * capture the current state of specified CRM objects for later reference or
+ * analysis. It requires a JSON payload containing the details of the CRM objects
+ * to snapshot. This operation is exempt from daily and ten-secondly rate limits.
*/
createCrmSnapshots(
body: WebhookCreateCrmSnapshotsParams,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.post('/webhooks-journal/snapshots/2026-03/crm', { body, ...options });
}
@@ -50,29 +50,30 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Create a new webhook subscription for the specified portal in the HubSpot
- * account. This endpoint allows you to define the subscription details, including
- * the types of events you want to subscribe to. The request body must include the
- * necessary subscription information as defined by the SubscriptionUpsertRequest
- * schema.
+ * Create a new subscription in the Webhooks Journal for the specified version.
+ * This endpoint allows you to define the subscription details by providing the
+ * necessary information in the request body. It supports various types of
+ * subscriptions, including object, association, event, app lifecycle event, list
+ * membership, and GDPR privacy deletion. Ensure that all required fields are
+ * included in the request to successfully create a subscription.
*/
createJournalSubscription(
body: WebhookCreateJournalSubscriptionParams,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.post('/webhooks-journal/subscriptions/2026-03', { body, ...options });
}
/**
- * Create a new filter for a webhook subscription in your HubSpot account. This
- * endpoint allows you to define specific conditions that a webhook event must meet
- * to trigger the subscription. It is useful for managing and customizing the
- * behavior of webhook subscriptions based on specific criteria.
+ * Create a new filter for a specific webhook subscription in the HubSpot account.
+ * This endpoint allows you to define conditions that determine when a webhook
+ * should be triggered. The filter is associated with a subscription identified by
+ * its ID, and the request must include the filter details.
*/
createSubscriptionFilter(
body: WebhookCreateSubscriptionFilterParams,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.post('/webhooks-journal/subscriptions/2026-03/filters', { body, ...options });
}
@@ -94,7 +95,7 @@ export class BaseWebhooks extends APIResource {
/**
* Delete a specific webhook journal subscription using its unique identifier. This
* operation is useful for managing and cleaning up subscriptions that are no
- * longer needed or relevant.
+ * longer needed in your HubSpot account.
*/
deleteJournalSubscription(subscriptionID: number, options?: RequestOptions): APIPromise {
return this._client.delete(path`/webhooks-journal/subscriptions/2026-03/${subscriptionID}`, {
@@ -105,8 +106,9 @@ export class BaseWebhooks extends APIResource {
/**
* Delete a webhook journal subscription for a specific portal. This operation
- * removes the subscription associated with the given portalId, and no content is
- * returned upon successful deletion.
+ * removes the subscription associated with the given portalId, ensuring that no
+ * further webhook events are sent for this portal. Use this endpoint to manage and
+ * clean up subscriptions that are no longer needed.
*/
deleteJournalSubscriptionForPortal(portalID: number, options?: RequestOptions): APIPromise {
return this._client.delete(path`/webhooks-journal/subscriptions/2026-03/portals/${portalID}`, {
@@ -127,10 +129,9 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Delete a specific filter associated with a webhook journal subscription. This
- * operation is useful for managing and cleaning up filters that are no longer
- * needed in your subscription setup. The endpoint requires the unique identifier
- * of the filter to be deleted.
+ * Remove a specific filter from the webhooks journal subscriptions. This operation
+ * is useful for managing and cleaning up filters that are no longer needed. Once
+ * deleted, the filter cannot be recovered.
*/
deleteSubscriptionFilter(filterID: number, options?: RequestOptions): APIPromise {
return this._client.delete(path`/webhooks-journal/subscriptions/2026-03/filters/${filterID}`, {
@@ -140,15 +141,16 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve the earliest batch of webhook journal entries up to the specified
- * count. This endpoint is useful for fetching historical webhook data in batches,
- * allowing you to process or analyze the earliest entries first.
+ * Retrieve the earliest batch of webhook journal entries for a specified count.
+ * This endpoint is useful for accessing historical webhook data in batches,
+ * allowing you to process or analyze older entries. The number of entries
+ * retrieved is determined by the count parameter.
*/
getEarliestJournalBatch(
count: number,
query: WebhookGetEarliestJournalBatchParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get(path`/webhooks-journal/journal/2026-03/batch/earliest/${count}`, {
query,
...options,
@@ -156,9 +158,9 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve the earliest entry from the webhooks journal for the specified version.
- * This endpoint is useful for accessing the oldest records available in the
- * journal, which can be helpful for auditing or historical data analysis.
+ * Retrieve the earliest entry from the webhooks journal for the specified portal.
+ * This endpoint is useful for accessing the first recorded webhook event in the
+ * journal, which can be helpful for auditing or debugging purposes.
*/
getEarliestJournalEntry(
query: WebhookGetEarliestJournalEntryParams | null | undefined = {},
@@ -173,15 +175,16 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve the earliest batch of webhook journal entries based on the specified
- * count. This endpoint is useful for fetching a specific number of the earliest
- * entries in the webhook journal for analysis or processing.
+ * Retrieve the earliest batch of webhook journal entries. This endpoint is useful
+ * for accessing the oldest available data in the webhook journal, allowing users
+ * to process or analyze historical webhook events. The number of entries to fetch
+ * is specified by the 'count' path parameter.
*/
getEarliestLocalJournalBatch(
count: number,
query: WebhookGetEarliestLocalJournalBatchParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get(path`/webhooks-journal/journal-local/2026-03/batch/earliest/${count}`, {
query,
...options,
@@ -189,9 +192,9 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve the earliest entry from the webhooks journal for the specified portal.
- * This endpoint is useful for accessing the oldest records in the journal, which
- * can be helpful for auditing or tracking purposes.
+ * Retrieve the earliest webhook journal entries for the specified portal. This
+ * endpoint can be used to access the oldest records available in the webhook
+ * journal, which may be useful for auditing or historical analysis.
*/
getEarliestLocalJournalEntry(
query: WebhookGetEarliestLocalJournalEntryParams | null | undefined = {},
@@ -218,15 +221,16 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Perform a batch read operation on the webhooks journal for the specified date.
- * This endpoint allows you to retrieve multiple entries from the webhooks journal
- * in a single request, which can be useful for processing large amounts of data
- * efficiently.
+ * Execute a batch read operation on the webhooks journal for the specified date,
+ * 2026-03. This endpoint allows you to retrieve multiple entries from the webhooks
+ * journal in a single request, which can be useful for processing large amounts of
+ * data efficiently. Ensure that the request body is provided in the required
+ * format.
*/
getJournalBatchByRequest(
params: WebhookGetJournalBatchByRequestParams,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
const { installPortalId, ...body } = params;
return this._client.post('/webhooks-journal/journal/2026-03/batch/read', {
query: { installPortalId },
@@ -237,14 +241,14 @@ export class BaseWebhooks extends APIResource {
/**
* Retrieve a batch of webhook journal entries starting from a specified offset.
- * This endpoint allows you to fetch a specified number of entries, making it
- * useful for paginating through large sets of webhook journal data.
+ * This endpoint allows you to fetch a defined number of entries, which can be
+ * useful for processing large datasets in manageable chunks.
*/
getJournalBatchFromOffset(
count: number,
params: WebhookGetJournalBatchFromOffsetParams,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
const { offset, ...query } = params;
return this._client.get(path`/webhooks-journal/journal/2026-03/batch/${offset}/next/${count}`, {
query,
@@ -253,36 +257,38 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve the status of a specific webhook journal entry using its status ID.
- * This endpoint is useful for checking the current state of a webhook process,
- * such as whether it is pending, in progress, completed, failed, or expired.
+ * Retrieve the status of a specific webhook journal entry using its unique status
+ * ID. This endpoint provides detailed information about the status, including
+ * whether it is pending, in progress, completed, failed, or expired. It is useful
+ * for monitoring and managing the state of webhook journal entries.
*/
- getJournalStatus(statusID: string, options?: RequestOptions): APIPromise {
+ getJournalStatus(statusID: string, options?: RequestOptions): APIPromise {
return this._client.get(path`/webhooks-journal/journal/2026-03/status/${statusID}`, options);
}
/**
* Retrieve details of a specific webhook subscription using its unique identifier.
* This endpoint is useful for obtaining information about a particular
- * subscription's configuration and status within the HubSpot account.
+ * subscription, such as its actions, object type, and associated properties.
*/
getJournalSubscription(
subscriptionID: number,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get(path`/webhooks-journal/subscriptions/2026-03/${subscriptionID}`, options);
}
/**
- * Retrieve the latest batch of webhook journal entries. This endpoint allows you
- * to specify the number of entries to fetch, providing a way to access recent
- * webhook activity within your HubSpot account.
+ * Retrieve the latest batch of webhook journal entries up to the specified count.
+ * This endpoint is useful for fetching recent webhook data for analysis or
+ * processing. The count parameter determines the maximum number of entries to
+ * return.
*/
getLatestJournalBatch(
count: number,
query: WebhookGetLatestJournalBatchParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get(path`/webhooks-journal/journal/2026-03/batch/latest/${count}`, {
query,
...options,
@@ -291,9 +297,8 @@ export class BaseWebhooks extends APIResource {
/**
* Retrieve the latest entries from the webhooks journal for the specified portal.
- * This endpoint is useful for accessing the most recent webhook events processed
- * by your HubSpot account. It allows you to filter the results by the portal ID to
- * ensure you are retrieving data relevant to a specific installation.
+ * This endpoint is useful for accessing the most recent webhook events and their
+ * statuses, allowing you to monitor and debug webhook activity effectively.
*/
getLatestJournalEntry(
query: WebhookGetLatestJournalEntryParams | null | undefined = {},
@@ -308,15 +313,15 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve the latest batch of webhook journal entries. This endpoint is useful
- * for accessing the most recent data entries processed by the webhook journal. It
- * requires specifying the number of entries to retrieve.
+ * Retrieve the latest batch of webhook journal entries. This endpoint allows you
+ * to specify the number of entries to fetch, providing a way to access the most
+ * recent webhook events processed by your HubSpot account.
*/
getLatestLocalJournalBatch(
count: number,
query: WebhookGetLatestLocalJournalBatchParams | null | undefined = {},
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get(path`/webhooks-journal/journal-local/2026-03/batch/latest/${count}`, {
query,
...options,
@@ -326,7 +331,8 @@ export class BaseWebhooks extends APIResource {
/**
* Retrieve the latest entries from the webhooks journal for the specified portal.
* This endpoint is useful for accessing the most recent webhook events that have
- * been logged, allowing you to process or analyze them as needed.
+ * been logged, allowing for real-time monitoring or debugging of webhook
+ * activities.
*/
getLatestLocalJournalEntry(
query: WebhookGetLatestLocalJournalEntryParams | null | undefined = {},
@@ -341,16 +347,15 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Perform a batch read operation on the webhooks journal. This endpoint allows you
- * to read multiple entries from the journal in a single request. It requires a
- * JSON request body specifying the inputs to be read. The response includes the
- * results of the batch read operation, and may return multiple statuses if there
- * are errors.
+ * Execute a batch read operation on the webhooks journal. This endpoint allows you
+ * to retrieve a batch of webhook journal entries by providing the necessary input
+ * data. It is useful for processing multiple records in a single request,
+ * streamlining data retrieval tasks.
*/
getLocalJournalBatchByRequest(
params: WebhookGetLocalJournalBatchByRequestParams,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
const { installPortalId, ...body } = params;
return this._client.post('/webhooks-journal/journal-local/2026-03/batch/read', {
query: { installPortalId },
@@ -361,14 +366,14 @@ export class BaseWebhooks extends APIResource {
/**
* Retrieve a batch of webhook journal entries starting from a specified offset.
- * This endpoint allows you to fetch a defined number of entries, facilitating the
- * processing of webhook data in manageable chunks.
+ * This endpoint is useful for paginating through large sets of webhook data. The
+ * number of entries returned is determined by the 'count' parameter.
*/
getLocalJournalBatchFromOffset(
count: number,
params: WebhookGetLocalJournalBatchFromOffsetParams,
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
const { offset, ...query } = params;
return this._client.get(path`/webhooks-journal/journal-local/2026-03/batch/${offset}/next/${count}`, {
query,
@@ -378,17 +383,21 @@ export class BaseWebhooks extends APIResource {
/**
* Retrieve the status of a specific webhook journal entry using its unique status
- * ID. This endpoint is useful for monitoring the progress or completion of webhook
- * processing tasks.
+ * ID. This endpoint is useful for monitoring the progress or outcome of webhook
+ * journal entries, allowing you to check if an entry is pending, in progress,
+ * completed, failed, or expired.
*/
- getLocalJournalStatus(statusID: string, options?: RequestOptions): APIPromise {
+ getLocalJournalStatus(
+ statusID: string,
+ options?: RequestOptions,
+ ): APIPromise {
return this._client.get(path`/webhooks-journal/journal-local/2026-03/status/${statusID}`, options);
}
/**
- * Retrieve the next batch of webhook journal entries starting from a specified
- * offset. This endpoint is useful for paginating through large sets of webhook
- * data, allowing you to continue fetching entries from where you last left off.
+ * Retrieve the next set of entries from the webhooks journal starting from a
+ * specified offset. This endpoint is useful for paginating through journal entries
+ * to process or analyze webhook events sequentially.
*/
getNextJournalEntries(
offset: string,
@@ -405,8 +414,8 @@ export class BaseWebhooks extends APIResource {
/**
* Retrieve the next set of webhook journal entries starting from a specified
- * offset. This endpoint is useful for paginating through webhook journal data in a
- * sequential manner, allowing you to fetch entries beyond a given point.
+ * offset. This endpoint is useful for paginating through large sets of webhook
+ * data, allowing you to continue from where a previous request left off.
*/
getNextLocalJournalEntries(
offset: string,
@@ -430,11 +439,12 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve details of a specific filter associated with a webhook subscription in
- * the HubSpot account. This endpoint is useful for accessing the configuration and
- * conditions of a filter by its unique identifier.
+ * Retrieve a specific filter associated with a webhook journal subscription. This
+ * endpoint allows you to access the details of the filter identified by the
+ * filterId, which is useful for managing and understanding the conditions applied
+ * to webhook events.
*/
- getSubscriptionFilter(filterID: number, options?: RequestOptions): APIPromise {
+ getSubscriptionFilter(filterID: number, options?: RequestOptions): APIPromise {
return this._client.get(path`/webhooks-journal/subscriptions/2026-03/filters/${filterID}`, options);
}
@@ -446,22 +456,21 @@ export class BaseWebhooks extends APIResource {
}
/**
- * Retrieve a list of webhook journal subscriptions for the specified API version.
- * This endpoint provides details about each subscription, including actions,
- * object types, and associated properties. It is useful for managing and reviewing
- * current webhook subscriptions.
+ * Retrieve a list of webhook journal subscriptions for the specified version. This
+ * endpoint allows you to view all active subscriptions without pagination. It is
+ * useful for monitoring and managing webhook subscriptions in your HubSpot
+ * account.
*/
listJournalSubscriptions(
options?: RequestOptions,
- ): APIPromise {
+ ): APIPromise {
return this._client.get('/webhooks-journal/subscriptions/2026-03', options);
}
/**
- * Retrieve the filters associated with a specific webhook subscription in the
- * HubSpot account. This endpoint is useful for obtaining detailed information
- * about the filters applied to a given subscription, identified by its
- * subscription ID.
+ * Retrieve the filters associated with a specific webhook subscription. This
+ * endpoint allows you to view the filters applied to a subscription, which can
+ * help in managing and understanding the conditions set for webhook events.
*/
listSubscriptionFilters(
subscriptionID: number,
@@ -501,80 +510,6 @@ export class BaseWebhooks extends APIResource {
}
export class Webhooks extends BaseWebhooks {}
-export interface ActionOverrideRequest {
- /**
- * An array of strings, each representing an associated object type ID relevant to
- * the action override.
- */
- associatedObjectTypeIds?: Array;
-
- /**
- * An array of integers representing list IDs that are associated with the action
- * override. The integers are in int64 format.
- */
- listIds?: Array;
-
- /**
- * An array of integers, each representing an object ID for which the action
- * override is applicable. The integers are in int64 format.
- */
- objectIds?: Array;
-
- /**
- * An array of strings representing the properties to be overridden in the action.
- * Each string corresponds to a property name.
- */
- properties?: Array;
-}
-
-export interface AppLifecycleEventSubscriptionUpsertRequest {
- eventTypeId: string;
-
- properties: Array;
-
- subscriptionType:
- | 'OBJECT'
- | 'ASSOCIATION'
- | 'EVENT'
- | 'APP_LIFECYCLE_EVENT'
- | 'LIST_MEMBERSHIP'
- | 'GDPR_PRIVACY_DELETION';
-}
-
-export interface AssociationSubscriptionUpsertRequest {
- actions: Array<
- | 'CREATE'
- | 'UPDATE'
- | 'DELETE'
- | 'MERGE'
- | 'RESTORE'
- | 'ASSOCIATION_ADDED'
- | 'ASSOCIATION_REMOVED'
- | 'SNAPSHOT'
- | 'APP_INSTALL'
- | 'APP_UNINSTALL'
- | 'ADDED_TO_LIST'
- | 'REMOVED_FROM_LIST'
- | 'GDPR_DELETE'
- >;
-
- associatedObjectTypeIds: Array;
-
- objectIds: Array;
-
- objectTypeId: string;
-
- portalId: number;
-
- subscriptionType:
- | 'OBJECT'
- | 'ASSOCIATION'
- | 'EVENT'
- | 'APP_LIFECYCLE_EVENT'
- | 'LIST_MEMBERSHIP'
- | 'GDPR_PRIVACY_DELETION';
-}
-
export interface BatchInputSubscriptionBatchUpdateRequest {
/**
* An array of SubscriptionBatchUpdateRequest objects, each representing a
@@ -583,86 +518,6 @@ export interface BatchInputSubscriptionBatchUpdateRequest {
inputs: Array;
}
-export interface BatchResponseJournalFetchResponse {
- /**
- * The date and time when the batch operation was completed, in ISO 8601 format.
- */
- completedAt: string;
-
- /**
- * An array of results from the batch operation, each represented as a
- * JournalFetchResponse object.
- */
- results: Array;
-
- /**
- * The date and time when the batch operation started, in ISO 8601 format.
- */
- startedAt: string;
-
- /**
- * The current status of the batch operation. Valid values include 'PENDING',
- * 'PROCESSING', 'CANCELED', and 'COMPLETE'.
- */
- status: 'CANCELED' | 'COMPLETE' | 'PENDING' | 'PROCESSING';
-
- /**
- * A map of link names to associated URIs related to the batch operation.
- */
- links?: { [key: string]: string };
-
- /**
- * The date and time when the batch operation was requested, in ISO 8601 format.
- */
- requestedAt?: string;
-}
-
-export interface BatchResponseJournalFetchResponseWithErrors {
- /**
- * The date and time when the batch process was completed, in ISO 8601 format.
- */
- completedAt: string;
-
- /**
- * An array of journal fetch responses, each representing a result from the batch
- * process.
- */
- results: Array;
-
- /**
- * The date and time when the batch process started, in ISO 8601 format.
- */
- startedAt: string;
-
- /**
- * The current status of the batch process. Valid values include 'PENDING',
- * 'PROCESSING', 'CANCELED', and 'COMPLETE'.
- */
- status: 'CANCELED' | 'COMPLETE' | 'PENDING' | 'PROCESSING';
-
- /**
- * An array of standard errors that occurred during the batch process, providing
- * details about each error.
- */
- errors?: Array;
-
- /**
- * A map of link names to associated URIs, providing additional context or actions
- * related to the batch process.
- */
- links?: { [key: string]: string };
-
- /**
- * The number of errors that occurred during the batch process.
- */
- numErrors?: number;
-
- /**
- * The date and time when the batch request was made, in ISO 8601 format.
- */
- requestedAt?: string;
-}
-
export interface BatchResponseSubscriptionResponse {
/**
* The date and time when the batch operation was completed, in ISO 8601 format.
@@ -752,289 +607,6 @@ export interface CollectionResponseSubscriptionResponseNoPaging {
results: Array;
}
-export interface Condition {
- /**
- * A string indicating the type of filter being applied. Valid value is
- * 'CRM_OBJECT_PROPERTY'.
- */
- filterType: 'CRM_OBJECT_PROPERTY';
-
- /**
- * A string specifying the operation to be performed in the condition. Valid values
- * include 'EQ', 'N_EQ', 'LT', 'GT', 'LTE', 'GTE', 'CONTAINS', 'STARTS_WITH',
- * 'ENDS_WITH', 'IN', 'NOT_IN', 'IS_EMPTY', and 'IS_NOT_EMPTY'.
- */
- operator:
- | 'CONTAINS'
- | 'ENDS_WITH'
- | 'EQ'
- | 'GT'
- | 'GTE'
- | 'IN'
- | 'IS_EMPTY'
- | 'IS_NOT_EMPTY'
- | 'LT'
- | 'LTE'
- | 'N_EQ'
- | 'NOT_IN'
- | 'STARTS_WITH';
-
- /**
- * A string representing the specific property of the CRM object that the condition
- * applies to.
- */
- property: string;
-
- /**
- * A string representing the value to be compared against the specified property
- * when using single-value operators.
- */
- value?: string;
-
- /**
- * An array of strings used to specify multiple values for comparison when using
- * operators that support multiple values, such as 'IN' or 'NOT_IN'.
- */
- values?: Array;
-}
-
-export interface CrmObjectSnapshotBatchRequest {
- /**
- * An array of CrmObjectSnapshotRequest objects, each representing a request to
- * create a snapshot for a specific CRM object. This property is required.
- */
- snapshotRequests: Array;
-}
-
-export interface CrmObjectSnapshotBatchResponse {
- /**
- * An array of CrmObjectSnapshotResponse objects, each representing the result of a
- * snapshot operation for a specific CRM object. This property is required.
- */
- snapshotResponses: Array;
-}
-
-export interface CrmObjectSnapshotRequest {
- /**
- * An integer representing the unique identifier of the CRM object for which the
- * snapshot is requested.
- */
- objectId: number;
-
- /**
- * A string representing the type identifier of the CRM object, specifying what
- * kind of object it is within HubSpot.
- */
- objectTypeId: string;
-
- /**
- * An integer representing the unique identifier of the HubSpot account (portal)
- * where the CRM object resides.
- */
- portalId: number;
-
- /**
- * An array of strings, each representing a property of the CRM object that should
- * be included in the snapshot.
- */
- properties: Array;
-}
-
-export interface CrmObjectSnapshotResponse {
- /**
- * An integer representing the unique identifier of the CRM object for which the
- * snapshot is taken.
- */
- objectId: number;
-
- /**
- * A string indicating the type of the CRM object, such as contact, company, or
- * deal.
- */
- objectTypeId: string;
-
- /**
- * An integer representing the unique identifier of the HubSpot portal associated
- * with the CRM object.
- */
- portalId: number;
-
- /**
- * A UUID string representing the status identifier of the snapshot request,
- * indicating the current state of the snapshot process.
- */
- snapshotStatusId: string;
-}
-
-/**
- * Defines a single condition for searching CRM objects, specifying the property to
- * filter on, the operator to use (such as equals, greater than, or contains), and
- * the value(s) to compare against.
- */
-export interface Filter {
- /**
- * An array of conditions that define the criteria for the filter. Each condition
- * specifies a property, an operator, and optionally a value or values.
- */
- conditions: Array;
-}
-
-export interface FilterCreateRequest {
- /**
- * Defines a single condition for searching CRM objects, specifying the property to
- * filter on, the operator to use (such as equals, greater than, or contains), and
- * the value(s) to compare against.
- */
- filter: Filter;
-
- /**
- * The unique identifier of the subscription to which the filter will be applied.
- * It is an integer formatted as int64.
- */
- subscriptionId: number;
-}
-
-export interface FilterCreateResponse {
- /**
- * The unique identifier for the created filter. It is an integer formatted as
- * int64.
- */
- filterId: number;
-}
-
-export interface FilterResponse {
- /**
- * The unique identifier for the filter. It is an integer in int64 format.
- */
- id: number;
-
- /**
- * A Unix timestamp in milliseconds indicating when the filter was created.
- */
- createdAt: number;
-
- /**
- * Defines a single condition for searching CRM objects, specifying the property to
- * filter on, the operator to use (such as equals, greater than, or contains), and
- * the value(s) to compare against.
- */
- filter: Filter;
-}
-
-export interface GdprPrivacyDeletionSubscriptionUpsertRequest {
- actions: Array<
- | 'CREATE'
- | 'UPDATE'
- | 'DELETE'
- | 'MERGE'
- | 'RESTORE'
- | 'ASSOCIATION_ADDED'
- | 'ASSOCIATION_REMOVED'
- | 'SNAPSHOT'
- | 'APP_INSTALL'
- | 'APP_UNINSTALL'
- | 'ADDED_TO_LIST'
- | 'REMOVED_FROM_LIST'
- | 'GDPR_DELETE'
- >;
-
- objectTypeId: string;
-
- portalId: number;
-
- subscriptionType:
- | 'OBJECT'
- | 'ASSOCIATION'
- | 'EVENT'
- | 'APP_LIFECYCLE_EVENT'
- | 'LIST_MEMBERSHIP'
- | 'GDPR_PRIVACY_DELETION';
-}
-
-export interface JournalFetchResponse {
- /**
- * The unique identifier for the current offset of the journal entry, formatted as
- * a UUID.
- */
- currentOffset: string;
-
- /**
- * The date and time when the URL will expire, in ISO 8601 format.
- */
- expiresAt: string;
-
- /**
- * The URL where the journal entry can be accessed. It is a string.
- */
- url: string;
-}
-
-export interface ListMembershipSubscriptionUpsertRequest {
- actions: Array<
- | 'CREATE'
- | 'UPDATE'
- | 'DELETE'
- | 'MERGE'
- | 'RESTORE'
- | 'ASSOCIATION_ADDED'
- | 'ASSOCIATION_REMOVED'
- | 'SNAPSHOT'
- | 'APP_INSTALL'
- | 'APP_UNINSTALL'
- | 'ADDED_TO_LIST'
- | 'REMOVED_FROM_LIST'
- | 'GDPR_DELETE'
- >;
-
- listIds: Array;
-
- objectIds: Array;
-
- portalId: number;
-
- subscriptionType:
- | 'OBJECT'
- | 'ASSOCIATION'
- | 'EVENT'
- | 'APP_LIFECYCLE_EVENT'
- | 'LIST_MEMBERSHIP'
- | 'GDPR_PRIVACY_DELETION';
-}
-
-export interface ObjectSubscriptionUpsertRequest {
- actions: Array<
- | 'CREATE'
- | 'UPDATE'
- | 'DELETE'
- | 'MERGE'
- | 'RESTORE'
- | 'ASSOCIATION_ADDED'
- | 'ASSOCIATION_REMOVED'
- | 'SNAPSHOT'
- | 'APP_INSTALL'
- | 'APP_UNINSTALL'
- | 'ADDED_TO_LIST'
- | 'REMOVED_FROM_LIST'
- | 'GDPR_DELETE'
- >;
-
- objectIds: Array;
-
- objectTypeId: string;
-
- portalId: number;
-
- properties: Array;
-
- subscriptionType:
- | 'OBJECT'
- | 'ASSOCIATION'
- | 'EVENT'
- | 'APP_LIFECYCLE_EVENT'
- | 'LIST_MEMBERSHIP'
- | 'GDPR_PRIVACY_DELETION';
-}
-
export interface SettingsChangeRequest {
/**
* The URL to which webhook events will be sent. It is a string.
@@ -1064,43 +636,6 @@ export interface SettingsResponse {
updatedAt?: string;
}
-export interface SnapshotStatusResponse {
- /**
- * The unique identifier for the snapshot operation, represented as a UUID.
- */
- id: string;
-
- /**
- * The timestamp indicating when the snapshot operation was initiated, represented
- * as a Unix timestamp in milliseconds.
- */
- initiatedAt: number;
-
- /**
- * The current status of the snapshot. Valid values include 'PENDING',
- * 'IN_PROGRESS', 'COMPLETED', 'FAILED', and 'EXPIRED'.
- */
- status: 'COMPLETED' | 'EXPIRED' | 'FAILED' | 'IN_PROGRESS' | 'PENDING';
-
- /**
- * The timestamp indicating when the snapshot operation was completed, represented
- * as a Unix timestamp in milliseconds.
- */
- completedAt?: number;
-
- /**
- * A code representing the error that occurred, if any. Possible values are
- * 'TIMEOUT', 'VALIDATION_ERROR', 'INTERNAL_ERROR', and 'PERMISSION_DENIED'.
- */
- errorCode?: 'INTERNAL_ERROR' | 'PERMISSION_DENIED' | 'TIMEOUT' | 'VALIDATION_ERROR';
-
- /**
- * A descriptive message providing additional information about the snapshot
- * operation or error.
- */
- message?: string;
-}
-
export interface SubscriptionBatchUpdateRequest {
/**
* The unique identifier for the subscription. It is an integer.
@@ -1368,7 +903,7 @@ export interface SubscriptionResponse1 {
* An object containing action overrides, where each key is an action and the value
* is an ActionOverrideRequest object.
*/
- actionOverrides?: { [key: string]: ActionOverrideRequest };
+ actionOverrides?: { [key: string]: Shared.ActionOverrideRequest };
/**
* A list of associated object type IDs. Each ID is a string.
@@ -1412,13 +947,6 @@ export interface SubscriptionResponse1 {
properties?: Array;
}
-export type SubscriptionUpsertRequest =
- | ObjectSubscriptionUpsertRequest
- | AssociationSubscriptionUpsertRequest
- | AppLifecycleEventSubscriptionUpsertRequest
- | ListMembershipSubscriptionUpsertRequest
- | GdprPrivacyDeletionSubscriptionUpsertRequest;
-
export interface ThrottlingSettings {
/**
* The maximum number of concurrent requests allowed. This is an integer value.
@@ -1426,7 +954,7 @@ export interface ThrottlingSettings {
maxConcurrentRequests: number;
}
-export type WebhookListSubscriptionFiltersResponse = Array;
+export type WebhookListSubscriptionFiltersResponse = Array;
export interface WebhookCreateBatchEventSubscriptionsParams {
/**
@@ -1441,7 +969,7 @@ export interface WebhookCreateCrmSnapshotsParams {
* An array of CrmObjectSnapshotRequest objects, each representing a request to
* create a snapshot for a specific CRM object. This property is required.
*/
- snapshotRequests: Array;
+ snapshotRequests: Array;
}
export interface WebhookCreateEventSubscriptionParams {
@@ -1531,15 +1059,119 @@ export type WebhookCreateJournalSubscriptionParams =
| WebhookCreateJournalSubscriptionParams.GdprPrivacyDeletionSubscriptionUpsertRequest;
export declare namespace WebhookCreateJournalSubscriptionParams {
- export interface ObjectSubscriptionUpsertRequest {}
+ export interface ObjectSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ objectIds: Array;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ properties: Array;
+
+ subscriptionType: 'OBJECT';
+ }
- export interface AssociationSubscriptionUpsertRequest {}
+ export interface AssociationSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
- export interface AppLifecycleEventSubscriptionUpsertRequest {}
+ associatedObjectTypeIds: Array;
- export interface ListMembershipSubscriptionUpsertRequest {}
+ objectIds: Array;
- export interface GdprPrivacyDeletionSubscriptionUpsertRequest {}
+ objectTypeId: string;
+
+ portalId: number;
+
+ subscriptionType: 'ASSOCIATION';
+ }
+
+ export interface AppLifecycleEventSubscriptionUpsertRequest {
+ eventTypeId: string;
+
+ properties: Array;
+
+ subscriptionType: 'APP_LIFECYCLE_EVENT';
+ }
+
+ export interface ListMembershipSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ listIds: Array;
+
+ objectIds: Array;
+
+ portalId: number;
+
+ subscriptionType: 'LIST_MEMBERSHIP';
+ }
+
+ export interface GdprPrivacyDeletionSubscriptionUpsertRequest {
+ actions: Array<
+ | 'CREATE'
+ | 'UPDATE'
+ | 'DELETE'
+ | 'MERGE'
+ | 'RESTORE'
+ | 'ASSOCIATION_ADDED'
+ | 'ASSOCIATION_REMOVED'
+ | 'SNAPSHOT'
+ | 'APP_INSTALL'
+ | 'APP_UNINSTALL'
+ | 'ADDED_TO_LIST'
+ | 'REMOVED_FROM_LIST'
+ | 'GDPR_DELETE'
+ >;
+
+ objectTypeId: string;
+
+ portalId: number;
+
+ subscriptionType: 'GDPR_PRIVACY_DELETION';
+ }
}
export interface WebhookCreateSubscriptionFilterParams {
@@ -1548,7 +1180,7 @@ export interface WebhookCreateSubscriptionFilterParams {
* filter on, the operator to use (such as equals, greater than, or contains), and
* the value(s) to compare against.
*/
- filter: Filter;
+ filter: Shared.Filter;
/**
* The unique identifier of the subscription to which the filter will be applied.
@@ -1566,31 +1198,32 @@ export interface WebhookDeleteEventSubscriptionParams {
export interface WebhookGetEarliestJournalBatchParams {
/**
- * The ID of the portal installation to filter the webhook journal entries by. This
- * is an integer value.
+ * The ID of the portal installation. This is an integer value that specifies which
+ * portal's data to access.
*/
installPortalId?: number;
}
export interface WebhookGetEarliestJournalEntryParams {
/**
- * The ID of the portal installation to filter the journal entries. It is an
- * integer.
+ * The ID of the portal installation to filter the journal entries by. This is an
+ * integer value.
*/
installPortalId?: number;
}
export interface WebhookGetEarliestLocalJournalBatchParams {
/**
- * The ID of the portal where the webhooks are installed. This is an integer value.
+ * The ID of the portal installation to filter the webhook journal entries. This is
+ * an optional integer parameter.
*/
installPortalId?: number;
}
export interface WebhookGetEarliestLocalJournalEntryParams {
/**
- * The ID of the portal installation to filter the journal entries by. This
- * parameter is optional and should be an integer.
+ * The ID of the portal for which to retrieve the earliest webhook journal entries.
+ * This parameter is optional and should be an integer.
*/
installPortalId?: number;
}
@@ -1609,54 +1242,53 @@ export interface WebhookGetJournalBatchByRequestParams {
inputs: Array;
/**
- * Query param: The ID of the portal where the webhooks are installed. This is an
- * integer value.
+ * Query param: An integer representing the ID of the portal installation for which
+ * the webhooks journal data should be retrieved.
*/
installPortalId?: number;
}
export interface WebhookGetJournalBatchFromOffsetParams {
/**
- * Path param: The starting point for fetching the next batch of journal entries.
- * This is a string value that indicates the offset position.
+ * Path param: The starting point for fetching the journal entries. This is a
+ * string value.
*/
offset: string;
/**
- * Query param: The ID of the portal installation. This is an integer value used to
- * specify the portal context for the request.
+ * Query param: The ID of the portal installation. This is an integer value.
*/
installPortalId?: number;
}
export interface WebhookGetLatestJournalBatchParams {
/**
- * The ID of the portal installation. This is an integer value used to identify the
- * specific portal.
+ * The ID of the portal installation. This is an integer value used to specify the
+ * portal context for the request.
*/
installPortalId?: number;
}
export interface WebhookGetLatestJournalEntryParams {
/**
- * The ID of the portal installation to filter the journal entries. It is an
- * integer value.
+ * The unique identifier of the portal installation for which to retrieve the
+ * latest journal entries. This parameter is optional and should be an integer.
*/
installPortalId?: number;
}
export interface WebhookGetLatestLocalJournalBatchParams {
/**
- * The ID of the portal installation. This parameter is optional and used to filter
- * the journal entries by a specific portal.
+ * The ID of the portal where the webhook journal is installed. This parameter is
+ * optional and used to specify the target portal.
*/
installPortalId?: number;
}
export interface WebhookGetLatestLocalJournalEntryParams {
/**
- * The ID of the portal for which to retrieve the latest journal entries. This
- * parameter is optional and should be an integer.
+ * The ID of the portal for which to retrieve the latest journal entries. This is
+ * an integer value.
*/
installPortalId?: number;
}
@@ -1669,36 +1301,36 @@ export interface WebhookGetLocalJournalBatchByRequestParams {
/**
* Query param: The ID of the portal where the webhooks are installed. This
- * parameter is optional and is used to specify the target portal.
+ * parameter is optional and is used to specify the target portal for the
+ * operation.
*/
installPortalId?: number;
}
export interface WebhookGetLocalJournalBatchFromOffsetParams {
/**
- * Path param: The starting point for fetching the batch of journal entries. This
- * is a string value that indicates the offset position.
+ * Path param: The starting point for the batch retrieval, specified as a string.
*/
offset: string;
/**
- * Query param: The ID of the portal installation. This is an integer value used to
- * specify the portal context for the request.
+ * Query param: The ID of the portal where the webhooks are installed. This is an
+ * optional parameter.
*/
installPortalId?: number;
}
export interface WebhookGetNextJournalEntriesParams {
/**
- * The ID of the portal installation to filter the webhook journal entries. This is
- * an optional parameter.
+ * The ID of the portal where the webhooks are installed. This is an integer value.
*/
installPortalId?: number;
}
export interface WebhookGetNextLocalJournalEntriesParams {
/**
- * The ID of the portal where the webhook is installed. This is an integer value.
+ * The ID of the portal installation to filter the webhook journal entries. This is
+ * an integer value.
*/
installPortalId?: number;
}
@@ -1727,38 +1359,18 @@ export interface WebhookUpdateSettingsParams {
export declare namespace Webhooks {
export {
- type ActionOverrideRequest as ActionOverrideRequest,
- type AppLifecycleEventSubscriptionUpsertRequest as AppLifecycleEventSubscriptionUpsertRequest,
- type AssociationSubscriptionUpsertRequest as AssociationSubscriptionUpsertRequest,
type BatchInputSubscriptionBatchUpdateRequest as BatchInputSubscriptionBatchUpdateRequest,
- type BatchResponseJournalFetchResponse as BatchResponseJournalFetchResponse,
- type BatchResponseJournalFetchResponseWithErrors as BatchResponseJournalFetchResponseWithErrors,
type BatchResponseSubscriptionResponse as BatchResponseSubscriptionResponse,
type BatchResponseSubscriptionResponseWithErrors as BatchResponseSubscriptionResponseWithErrors,
type CollectionResponseSubscriptionResponseNoPaging as CollectionResponseSubscriptionResponseNoPaging,
- type Condition as Condition,
- type CrmObjectSnapshotBatchRequest as CrmObjectSnapshotBatchRequest,
- type CrmObjectSnapshotBatchResponse as CrmObjectSnapshotBatchResponse,
- type CrmObjectSnapshotRequest as CrmObjectSnapshotRequest,
- type CrmObjectSnapshotResponse as CrmObjectSnapshotResponse,
- type Filter as Filter,
- type FilterCreateRequest as FilterCreateRequest,
- type FilterCreateResponse as FilterCreateResponse,
- type FilterResponse as FilterResponse,
- type GdprPrivacyDeletionSubscriptionUpsertRequest as GdprPrivacyDeletionSubscriptionUpsertRequest,
- type JournalFetchResponse as JournalFetchResponse,
- type ListMembershipSubscriptionUpsertRequest as ListMembershipSubscriptionUpsertRequest,
- type ObjectSubscriptionUpsertRequest as ObjectSubscriptionUpsertRequest,
type SettingsChangeRequest as SettingsChangeRequest,
type SettingsResponse as SettingsResponse,
- type SnapshotStatusResponse as SnapshotStatusResponse,
type SubscriptionBatchUpdateRequest as SubscriptionBatchUpdateRequest,
type SubscriptionCreateRequest as SubscriptionCreateRequest,
type SubscriptionListResponse as SubscriptionListResponse,
type SubscriptionPatchRequest as SubscriptionPatchRequest,
type SubscriptionResponse as SubscriptionResponse,
type SubscriptionResponse1 as SubscriptionResponse1,
- type SubscriptionUpsertRequest as SubscriptionUpsertRequest,
type ThrottlingSettings as ThrottlingSettings,
type WebhookListSubscriptionFiltersResponse as WebhookListSubscriptionFiltersResponse,
type WebhookCreateBatchEventSubscriptionsParams as WebhookCreateBatchEventSubscriptionsParams,
diff --git a/src/version.ts b/src/version.ts
index fdbf6896..5ed52cd1 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.1.0-alpha.9'; // x-release-please-version
+export const VERSION = '0.1.0-alpha.10'; // x-release-please-version
diff --git a/tests/api-resources/auth/oauth.test.ts b/tests/api-resources/auth/oauth.test.ts
index 60de07e3..8dce46e2 100644
--- a/tests/api-resources/auth/oauth.test.ts
+++ b/tests/api-resources/auth/oauth.test.ts
@@ -24,6 +24,18 @@ const parentPartialClient = createClient({
});
const runTests = (client: PartialHubSpot<{ auth: { oauth: BaseOAuth } }>) => {
+ // Mock server tests are disabled
+ test.skip('createToken', async () => {
+ const responsePromise = client.auth.oauth.createToken();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
// Mock server tests are disabled
test.skip('createToken: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
diff --git a/tests/api-resources/automation/actions/definitions.test.ts b/tests/api-resources/automation/actions/definitions.test.ts
index 166927b3..d220712e 100644
--- a/tests/api-resources/automation/actions/definitions.test.ts
+++ b/tests/api-resources/automation/actions/definitions.test.ts
@@ -134,7 +134,7 @@ const runTests = (client: PartialHubSpot<{ automation: { actions: { definitions:
},
],
schema: {
- type: 'ARRAY',
+ type: 'INTEGER',
maximum: 0,
minimum: 0,
},
@@ -239,7 +239,7 @@ const runTests = (client: PartialHubSpot<{ automation: { actions: { definitions:
},
],
schema: {
- type: 'ARRAY',
+ type: 'INTEGER',
maximum: 0,
minimum: 0,
},
diff --git a/tests/api-resources/cms/url-redirects.test.ts b/tests/api-resources/cms/url-redirects.test.ts
index f15687ed..456211ec 100644
--- a/tests/api-resources/cms/url-redirects.test.ts
+++ b/tests/api-resources/cms/url-redirects.test.ts
@@ -147,6 +147,37 @@ const runTests = (client: PartialHubSpot<{ cms: { urlRedirects: BaseURLRedirects
expect(dataAndResponse.response).toBe(rawResponse);
});
+ // Mock server tests are disabled
+ test.skip('createURLMapping: required and optional params', async () => {
+ const response = await client.cms.urlRedirects.createURLMapping({
+ id: 'id',
+ created: '2019-12-27T18:11:19.117Z',
+ destination: 'destination',
+ isMatchFullUrl: true,
+ isMatchQueryString: true,
+ isOnlyAfterNotFound: true,
+ isPattern: true,
+ isProtocolAgnostic: true,
+ isTrailingSlashOptional: true,
+ precedence: 0,
+ redirectStyle: 0,
+ routePrefix: 'routePrefix',
+ updated: '2019-12-27T18:11:19.117Z',
+ });
+ });
+
+ // Mock server tests are disabled
+ test.skip('deleteURLMapping', async () => {
+ const responsePromise = client.cms.urlRedirects.deleteURLMapping(0);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
// Mock server tests are disabled
test.skip('get', async () => {
const responsePromise = client.cms.urlRedirects.get('urlRedirectId');
diff --git a/tests/api-resources/conversations/visitor-identification.test.ts b/tests/api-resources/conversations/visitor-identification.test.ts
index 5f820603..924c75cd 100644
--- a/tests/api-resources/conversations/visitor-identification.test.ts
+++ b/tests/api-resources/conversations/visitor-identification.test.ts
@@ -28,7 +28,10 @@ const runTests = (
) => {
// Mock server tests are disabled
test.skip('generateToken: only required params', async () => {
- const responsePromise = client.conversations.visitorIdentification.generateToken({ email: 'email' });
+ const responsePromise = client.conversations.visitorIdentification.generateToken({
+ email: 'email',
+ hsCustomerAgentContext: { foo: 'string' },
+ });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -42,6 +45,7 @@ const runTests = (
test.skip('generateToken: required and optional params', async () => {
const response = await client.conversations.visitorIdentification.generateToken({
email: 'email',
+ hsCustomerAgentContext: { foo: 'string' },
firstName: 'firstName',
lastName: 'lastName',
});
diff --git a/tests/api-resources/crm/exports.test.ts b/tests/api-resources/crm/exports.test.ts
index 3af17aa7..13dfd5e2 100644
--- a/tests/api-resources/crm/exports.test.ts
+++ b/tests/api-resources/crm/exports.test.ts
@@ -25,8 +25,20 @@ const parentPartialClient = createClient({
const runTests = (client: PartialHubSpot<{ crm: { exports: BaseExports } }>) => {
// Mock server tests are disabled
- test.skip('createAsync', async () => {
- const responsePromise = client.crm.exports.createAsync({});
+ test.skip('createAsync: only required params', async () => {
+ const responsePromise = client.crm.exports.createAsync({
+ associatedObjectType: ['string'],
+ exportInternalValuesOptions: ['NAMES'],
+ exportName: 'exportName',
+ exportType: 'VIEW',
+ format: 'CSV',
+ includeLabeledAssociations: true,
+ includePrimaryDisplayPropertyForAssociatedObjects: true,
+ language: 'AF_ZA',
+ objectProperties: ['string'],
+ objectType: 'objectType',
+ overrideAssociatedObjectsPerDefinitionPerRowLimit: true,
+ });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -36,6 +48,49 @@ const runTests = (client: PartialHubSpot<{ crm: { exports: BaseExports } }>) =>
expect(dataAndResponse.response).toBe(rawResponse);
});
+ // Mock server tests are disabled
+ test.skip('createAsync: required and optional params', async () => {
+ const response = await client.crm.exports.createAsync({
+ associatedObjectType: ['string'],
+ exportInternalValuesOptions: ['NAMES'],
+ exportName: 'exportName',
+ exportType: 'VIEW',
+ format: 'CSV',
+ includeLabeledAssociations: true,
+ includePrimaryDisplayPropertyForAssociatedObjects: true,
+ language: 'AF_ZA',
+ objectProperties: ['string'],
+ objectType: 'objectType',
+ overrideAssociatedObjectsPerDefinitionPerRowLimit: true,
+ publicCrmSearchRequest: {
+ filterGroups: [
+ {
+ filters: [
+ {
+ operator: 'BETWEEN',
+ propertyName: 'propertyName',
+ highValue: 'highValue',
+ value: 'value',
+ values: ['string'],
+ },
+ ],
+ },
+ ],
+ filters: [
+ {
+ operator: 'BETWEEN',
+ propertyName: 'propertyName',
+ highValue: 'highValue',
+ value: 'value',
+ values: ['string'],
+ },
+ ],
+ sorts: ['string'],
+ query: 'query',
+ },
+ });
+ });
+
// Mock server tests are disabled
test.skip('get', async () => {
const responsePromise = client.crm.exports.get(0);
diff --git a/tests/api-resources/crm/lists.test.ts b/tests/api-resources/crm/lists.test.ts
index 2ecd84d4..4d778411 100644
--- a/tests/api-resources/crm/lists.test.ts
+++ b/tests/api-resources/crm/lists.test.ts
@@ -61,31 +61,13 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
eventTypeId: 'eventTypeId',
filterBranches: [
{
+ associationCategory: 'associationCategory',
+ associationTypeId: 0,
filterBranches: [
{
- associationCategory: 'associationCategory',
- associationTypeId: 0,
- filterBranches: [
- {
- filterBranches: [],
- filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'OR',
- filters: [
- {
- filterType: 'PROPERTY',
- operation: {
- includeObjectsWithNoValueSet: true,
- operationType: 'BOOL',
- operator: 'operator',
- value: true,
- },
- property: 'property',
- },
- ],
- },
- ],
+ filterBranches: [],
filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'ASSOCIATION',
+ filterBranchType: 'OR',
filters: [
{
filterType: 'PROPERTY',
@@ -98,12 +80,10 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
property: 'property',
},
],
- objectTypeId: 'objectTypeId',
- operator: 'operator',
},
],
filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'PROPERTY_ASSOCIATION',
+ filterBranchType: 'ASSOCIATION',
filters: [
{
filterType: 'PROPERTY',
@@ -118,7 +98,6 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
],
objectTypeId: 'objectTypeId',
operator: 'operator',
- propertyWithObjectId: 'propertyWithObjectId',
},
],
filterBranchOperator: 'filterBranchOperator',
@@ -745,31 +724,13 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
eventTypeId: 'eventTypeId',
filterBranches: [
{
+ associationCategory: 'associationCategory',
+ associationTypeId: 0,
filterBranches: [
{
- associationCategory: 'associationCategory',
- associationTypeId: 0,
- filterBranches: [
- {
- filterBranches: [],
- filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'OR',
- filters: [
- {
- filterType: 'PROPERTY',
- operation: {
- includeObjectsWithNoValueSet: true,
- operationType: 'BOOL',
- operator: 'operator',
- value: true,
- },
- property: 'property',
- },
- ],
- },
- ],
+ filterBranches: [],
filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'ASSOCIATION',
+ filterBranchType: 'OR',
filters: [
{
filterType: 'PROPERTY',
@@ -782,12 +743,10 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
property: 'property',
},
],
- objectTypeId: 'objectTypeId',
- operator: 'operator',
},
],
filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'PROPERTY_ASSOCIATION',
+ filterBranchType: 'ASSOCIATION',
filters: [
{
filterType: 'PROPERTY',
@@ -802,7 +761,6 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
],
objectTypeId: 'objectTypeId',
operator: 'operator',
- propertyWithObjectId: 'propertyWithObjectId',
},
],
filterBranchOperator: 'filterBranchOperator',
@@ -928,31 +886,13 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
eventTypeId: 'eventTypeId',
filterBranches: [
{
+ associationCategory: 'associationCategory',
+ associationTypeId: 0,
filterBranches: [
{
- associationCategory: 'associationCategory',
- associationTypeId: 0,
- filterBranches: [
- {
- filterBranches: [],
- filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'OR',
- filters: [
- {
- filterType: 'PROPERTY',
- operation: {
- includeObjectsWithNoValueSet: true,
- operationType: 'BOOL',
- operator: 'operator',
- value: true,
- },
- property: 'property',
- },
- ],
- },
- ],
+ filterBranches: [],
filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'ASSOCIATION',
+ filterBranchType: 'OR',
filters: [
{
filterType: 'PROPERTY',
@@ -965,12 +905,10 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
property: 'property',
},
],
- objectTypeId: 'objectTypeId',
- operator: 'operator',
},
],
filterBranchOperator: 'filterBranchOperator',
- filterBranchType: 'PROPERTY_ASSOCIATION',
+ filterBranchType: 'ASSOCIATION',
filters: [
{
filterType: 'PROPERTY',
@@ -985,7 +923,6 @@ const runTests = (client: PartialHubSpot<{ crm: { lists: BaseLists } }>) => {
],
objectTypeId: 'objectTypeId',
operator: 'operator',
- propertyWithObjectId: 'propertyWithObjectId',
},
],
filterBranchOperator: 'filterBranchOperator',
diff --git a/tests/api-resources/webhooks-journal/journal-local/batch.test.ts b/tests/api-resources/webhooks-journal/journal-local/batch.test.ts
new file mode 100644
index 00000000..42dcf17e
--- /dev/null
+++ b/tests/api-resources/webhooks-journal/journal-local/batch.test.ts
@@ -0,0 +1,93 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { BaseBatch } from '@hubspot/sdk/resources/webhooks-journal/journal-local/batch';
+import { JournalLocal } from '@hubspot/sdk/resources/webhooks-journal/journal-local/journal-local';
+
+import HubSpot from '@hubspot/sdk';
+import { createClient, type PartialHubSpot } from '@hubspot/sdk/tree-shakable';
+
+const client = new HubSpot({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+const partialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [BaseBatch],
+});
+
+const parentPartialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [JournalLocal],
+});
+
+const runTests = (client: PartialHubSpot<{ webhooksJournal: { journalLocal: { batch: BaseBatch } } }>) => {
+ // Mock server tests are disabled
+ test.skip('get: only required params', async () => {
+ const responsePromise = client.webhooksJournal.journalLocal.batch.get({ inputs: ['string'] });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('get: required and optional params', async () => {
+ const response = await client.webhooksJournal.journalLocal.batch.get({
+ inputs: ['string'],
+ installPortalId: 0,
+ });
+ });
+
+ // Mock server tests are disabled
+ test.skip('getEarliest', async () => {
+ const responsePromise = client.webhooksJournal.journalLocal.batch.getEarliest(1);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getEarliest: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journalLocal.batch.getEarliest(
+ 1,
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getFromOffset: only required params', async () => {
+ const responsePromise = client.webhooksJournal.journalLocal.batch.getFromOffset(1, { offset: 'offset' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getFromOffset: required and optional params', async () => {
+ const response = await client.webhooksJournal.journalLocal.batch.getFromOffset(1, {
+ offset: 'offset',
+ installPortalId: 0,
+ });
+ });
+};
+describe('resource batch', () => runTests(client));
+describe('resource batch (tree shakable, base)', () => runTests(partialClient));
+describe('resource batch (tree shakable, subresource)', () => runTests(parentPartialClient));
diff --git a/tests/api-resources/webhooks-journal/journal-local/journal-local.test.ts b/tests/api-resources/webhooks-journal/journal-local/journal-local.test.ts
new file mode 100644
index 00000000..2eff4f8a
--- /dev/null
+++ b/tests/api-resources/webhooks-journal/journal-local/journal-local.test.ts
@@ -0,0 +1,77 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { WebhooksJournal } from '@hubspot/sdk/resources/webhooks-journal/webhooks-journal';
+import { BaseJournalLocal } from '@hubspot/sdk/resources/webhooks-journal/journal-local/journal-local';
+
+import HubSpot from '@hubspot/sdk';
+import { createClient, type PartialHubSpot } from '@hubspot/sdk/tree-shakable';
+
+const client = new HubSpot({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+const partialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [BaseJournalLocal],
+});
+
+const parentPartialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [WebhooksJournal],
+});
+
+const runTests = (client: PartialHubSpot<{ webhooksJournal: { journalLocal: BaseJournalLocal } }>) => {
+ // Mock server tests are disabled
+ test.skip('getEarliest: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journalLocal.getEarliest(
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getLatest: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journalLocal.getLatest(
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getNextFromOffset: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journalLocal.getNextFromOffset(
+ 'offset',
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getStatus', async () => {
+ const responsePromise = client.webhooksJournal.journalLocal.getStatus(
+ '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ );
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+};
+describe('resource journalLocal', () => runTests(client));
+describe('resource journalLocal (tree shakable, base)', () => runTests(partialClient));
+describe('resource journalLocal (tree shakable, subresource)', () => runTests(parentPartialClient));
diff --git a/tests/api-resources/webhooks-journal/journal/batch.test.ts b/tests/api-resources/webhooks-journal/journal/batch.test.ts
new file mode 100644
index 00000000..da7d3d47
--- /dev/null
+++ b/tests/api-resources/webhooks-journal/journal/batch.test.ts
@@ -0,0 +1,117 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { BaseBatch } from '@hubspot/sdk/resources/webhooks-journal/journal/batch';
+import { Journal } from '@hubspot/sdk/resources/webhooks-journal/journal/journal';
+
+import HubSpot from '@hubspot/sdk';
+import { createClient, type PartialHubSpot } from '@hubspot/sdk/tree-shakable';
+
+const client = new HubSpot({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+const partialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [BaseBatch],
+});
+
+const parentPartialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [Journal],
+});
+
+const runTests = (client: PartialHubSpot<{ webhooksJournal: { journal: { batch: BaseBatch } } }>) => {
+ // Mock server tests are disabled
+ test.skip('get: only required params', async () => {
+ const responsePromise = client.webhooksJournal.journal.batch.get({ inputs: ['string'] });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('get: required and optional params', async () => {
+ const response = await client.webhooksJournal.journal.batch.get({
+ inputs: ['string'],
+ installPortalId: 0,
+ });
+ });
+
+ // Mock server tests are disabled
+ test.skip('getEarliest', async () => {
+ const responsePromise = client.webhooksJournal.journal.batch.getEarliest(1);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getEarliest: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journal.batch.getEarliest(
+ 1,
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getFromOffset: only required params', async () => {
+ const responsePromise = client.webhooksJournal.journal.batch.getFromOffset(1, { offset: 'offset' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getFromOffset: required and optional params', async () => {
+ const response = await client.webhooksJournal.journal.batch.getFromOffset(1, {
+ offset: 'offset',
+ installPortalId: 0,
+ });
+ });
+
+ // Mock server tests are disabled
+ test.skip('getLatest', async () => {
+ const responsePromise = client.webhooksJournal.journal.batch.getLatest(1);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getLatest: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journal.batch.getLatest(
+ 1,
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+};
+describe('resource batch', () => runTests(client));
+describe('resource batch (tree shakable, base)', () => runTests(partialClient));
+describe('resource batch (tree shakable, subresource)', () => runTests(parentPartialClient));
diff --git a/tests/api-resources/webhooks-journal/journal/journal.test.ts b/tests/api-resources/webhooks-journal/journal/journal.test.ts
new file mode 100644
index 00000000..c9acc664
--- /dev/null
+++ b/tests/api-resources/webhooks-journal/journal/journal.test.ts
@@ -0,0 +1,64 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { WebhooksJournal } from '@hubspot/sdk/resources/webhooks-journal/webhooks-journal';
+import { BaseJournal } from '@hubspot/sdk/resources/webhooks-journal/journal/journal';
+
+import HubSpot from '@hubspot/sdk';
+import { createClient, type PartialHubSpot } from '@hubspot/sdk/tree-shakable';
+
+const client = new HubSpot({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+const partialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [BaseJournal],
+});
+
+const parentPartialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [WebhooksJournal],
+});
+
+const runTests = (client: PartialHubSpot<{ webhooksJournal: { journal: BaseJournal } }>) => {
+ // Mock server tests are disabled
+ test.skip('getEarliest: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journal.getEarliest(
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getNextFromOffset: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.webhooksJournal.journal.getNextFromOffset(
+ 'offset',
+ { installPortalId: 0 },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(HubSpot.NotFoundError);
+ });
+
+ // Mock server tests are disabled
+ test.skip('getStatus', async () => {
+ const responsePromise = client.webhooksJournal.journal.getStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+};
+describe('resource journal', () => runTests(client));
+describe('resource journal (tree shakable, base)', () => runTests(partialClient));
+describe('resource journal (tree shakable, subresource)', () => runTests(parentPartialClient));
diff --git a/tests/api-resources/webhooks-journal/snapshots.test.ts b/tests/api-resources/webhooks-journal/snapshots.test.ts
new file mode 100644
index 00000000..423f9292
--- /dev/null
+++ b/tests/api-resources/webhooks-journal/snapshots.test.ts
@@ -0,0 +1,64 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { BaseSnapshots } from '@hubspot/sdk/resources/webhooks-journal/snapshots';
+import { WebhooksJournal } from '@hubspot/sdk/resources/webhooks-journal/webhooks-journal';
+
+import HubSpot from '@hubspot/sdk';
+import { createClient, type PartialHubSpot } from '@hubspot/sdk/tree-shakable';
+
+const client = new HubSpot({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+const partialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [BaseSnapshots],
+});
+
+const parentPartialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [WebhooksJournal],
+});
+
+const runTests = (client: PartialHubSpot<{ webhooksJournal: { snapshots: BaseSnapshots } }>) => {
+ // Mock server tests are disabled
+ test.skip('create: only required params', async () => {
+ const responsePromise = client.webhooksJournal.snapshots.create({
+ snapshotRequests: [
+ {
+ objectId: 0,
+ objectTypeId: 'objectTypeId',
+ portalId: 0,
+ properties: ['string'],
+ },
+ ],
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('create: required and optional params', async () => {
+ const response = await client.webhooksJournal.snapshots.create({
+ snapshotRequests: [
+ {
+ objectId: 0,
+ objectTypeId: 'objectTypeId',
+ portalId: 0,
+ properties: ['string'],
+ },
+ ],
+ });
+ });
+};
+describe('resource snapshots', () => runTests(client));
+describe('resource snapshots (tree shakable, base)', () => runTests(partialClient));
+describe('resource snapshots (tree shakable, subresource)', () => runTests(parentPartialClient));
diff --git a/tests/api-resources/webhooks-journal/subscriptions/filters.test.ts b/tests/api-resources/webhooks-journal/subscriptions/filters.test.ts
new file mode 100644
index 00000000..2ac982d7
--- /dev/null
+++ b/tests/api-resources/webhooks-journal/subscriptions/filters.test.ts
@@ -0,0 +1,108 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { BaseFilters } from '@hubspot/sdk/resources/webhooks-journal/subscriptions/filters';
+import { Subscriptions } from '@hubspot/sdk/resources/webhooks-journal/subscriptions/subscriptions';
+
+import HubSpot from '@hubspot/sdk';
+import { createClient, type PartialHubSpot } from '@hubspot/sdk/tree-shakable';
+
+const client = new HubSpot({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+const partialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [BaseFilters],
+});
+
+const parentPartialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [Subscriptions],
+});
+
+const runTests = (
+ client: PartialHubSpot<{ webhooksJournal: { subscriptions: { filters: BaseFilters } } }>,
+) => {
+ // Mock server tests are disabled
+ test.skip('create: only required params', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.filters.create({
+ filter: {
+ conditions: [
+ {
+ filterType: 'CRM_OBJECT_PROPERTY',
+ operator: 'CONTAINS',
+ property: 'property',
+ },
+ ],
+ },
+ subscriptionId: 0,
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('create: required and optional params', async () => {
+ const response = await client.webhooksJournal.subscriptions.filters.create({
+ filter: {
+ conditions: [
+ {
+ filterType: 'CRM_OBJECT_PROPERTY',
+ operator: 'CONTAINS',
+ property: 'property',
+ value: 'value',
+ values: ['string'],
+ },
+ ],
+ },
+ subscriptionId: 0,
+ });
+ });
+
+ // Mock server tests are disabled
+ test.skip('list', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.filters.list(0);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('delete', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.filters.delete(0);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('get', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.filters.get(0);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+};
+describe('resource filters', () => runTests(client));
+describe('resource filters (tree shakable, base)', () => runTests(partialClient));
+describe('resource filters (tree shakable, subresource)', () => runTests(parentPartialClient));
diff --git a/tests/api-resources/webhooks-journal/subscriptions/subscriptions.test.ts b/tests/api-resources/webhooks-journal/subscriptions/subscriptions.test.ts
new file mode 100644
index 00000000..85456ac1
--- /dev/null
+++ b/tests/api-resources/webhooks-journal/subscriptions/subscriptions.test.ts
@@ -0,0 +1,108 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { WebhooksJournal } from '@hubspot/sdk/resources/webhooks-journal/webhooks-journal';
+import { BaseSubscriptions } from '@hubspot/sdk/resources/webhooks-journal/subscriptions/subscriptions';
+
+import HubSpot from '@hubspot/sdk';
+import { createClient, type PartialHubSpot } from '@hubspot/sdk/tree-shakable';
+
+const client = new HubSpot({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+const partialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [BaseSubscriptions],
+});
+
+const parentPartialClient = createClient({
+ accessToken: 'My Access Token',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+ resources: [WebhooksJournal],
+});
+
+const runTests = (client: PartialHubSpot<{ webhooksJournal: { subscriptions: BaseSubscriptions } }>) => {
+ // Mock server tests are disabled
+ test.skip('create: only required params', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.create({
+ actions: ['CREATE'],
+ objectIds: [0],
+ objectTypeId: 'objectTypeId',
+ portalId: 0,
+ properties: ['string'],
+ subscriptionType: 'OBJECT',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('create: required and optional params', async () => {
+ const response = await client.webhooksJournal.subscriptions.create({
+ actions: ['CREATE'],
+ objectIds: [0],
+ objectTypeId: 'objectTypeId',
+ portalId: 0,
+ properties: ['string'],
+ subscriptionType: 'OBJECT',
+ });
+ });
+
+ // Mock server tests are disabled
+ test.skip('list', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.list();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('delete', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.delete(0);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('deleteForPortal', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.deleteForPortal(0);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Mock server tests are disabled
+ test.skip('get', async () => {
+ const responsePromise = client.webhooksJournal.subscriptions.get(0);
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+};
+describe('resource subscriptions', () => runTests(client));
+describe('resource subscriptions (tree shakable, base)', () => runTests(partialClient));
+describe('resource subscriptions (tree shakable, subresource)', () => runTests(parentPartialClient));
diff --git a/tests/api-resources/webhooks.test.ts b/tests/api-resources/webhooks.test.ts
index 27b41b6e..89de49da 100644
--- a/tests/api-resources/webhooks.test.ts
+++ b/tests/api-resources/webhooks.test.ts
@@ -100,8 +100,15 @@ const runTests = (client: PartialHubSpot<{ webhooks: BaseWebhooks }>) => {
});
// Mock server tests are disabled
- test.skip('createJournalSubscription', async () => {
- const responsePromise = client.webhooks.createJournalSubscription({});
+ test.skip('createJournalSubscription: only required params', async () => {
+ const responsePromise = client.webhooks.createJournalSubscription({
+ actions: ['CREATE'],
+ objectIds: [0],
+ objectTypeId: 'objectTypeId',
+ portalId: 0,
+ properties: ['string'],
+ subscriptionType: 'OBJECT',
+ });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -111,6 +118,18 @@ const runTests = (client: PartialHubSpot<{ webhooks: BaseWebhooks }>) => {
expect(dataAndResponse.response).toBe(rawResponse);
});
+ // Mock server tests are disabled
+ test.skip('createJournalSubscription: required and optional params', async () => {
+ const response = await client.webhooks.createJournalSubscription({
+ actions: ['CREATE'],
+ objectIds: [0],
+ objectTypeId: 'objectTypeId',
+ portalId: 0,
+ properties: ['string'],
+ subscriptionType: 'OBJECT',
+ });
+ });
+
// Mock server tests are disabled
test.skip('createSubscriptionFilter: only required params', async () => {
const responsePromise = client.webhooks.createSubscriptionFilter({
diff --git a/yarn.lock b/yarn.lock
index 00842e32..06fc1085 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1215,9 +1215,9 @@ baseline-browser-mapping@^2.9.0:
integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==
brace-expansion@^2.0.2:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae"
- integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.1.tgz#c68b1c4111c76aae3a6fba55d496cee10c39dad8"
+ integrity sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==
dependencies:
balanced-match "^1.0.0"