From 31d5aed9655296b0482db3a2cd733e9c6053ef08 Mon Sep 17 00:00:00 2001 From: Thomas Cranny Date: Thu, 21 Nov 2024 13:18:23 +1000 Subject: [PATCH] Update bundle.meta typings --- packages/core/types/zapier.custom.d.ts | 62 +++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/packages/core/types/zapier.custom.d.ts b/packages/core/types/zapier.custom.d.ts index 1d9fd9e06..32dcd605a 100644 --- a/packages/core/types/zapier.custom.d.ts +++ b/packages/core/types/zapier.custom.d.ts @@ -37,13 +37,71 @@ export interface Bundle { inputDataRaw: { [x: string]: string }; meta: { isBulkRead: boolean; + + /** + * If true, this poll is being used to populate a dynamic dropdown. + * You only need to return the fields you specified (such as id and + * name), though returning everything is fine too. + */ isFillingDynamicDropdown: boolean; + + /** + * If true, this run was initiated manually via the Zap Editor. + */ isLoadingSample: boolean; + + /** + * If true, the results of this poll will be used to initialize the + * deduplication list rather than trigger a zap. You should grab as + * many items as possible. + */ isPopulatingDedupe: boolean; + + /** + * (legacy property) If true, the poll was triggered by a user + * testing their account (via clicking “test” or during setup). We + * use this data to populate the auth label, but it’s mostly used to + * verify we made a successful authenticated request + * + * @deprecated + */ isTestingAuth: boolean; + + /** + * The number of items you should fetch. -1 indicates there’s no + * limit. Build this into your calls insofar as you are able. + */ limit: number; + + /** + * Used in paging to uniquely identify which page of results should + * be returned. + */ page: number; - zap?: { id: string }; + + /** + * When a create is called as part of a search-or-create step, + * this will be the key of the search. + */ + withSearch: string | undefined; + + /** + * The timezone the user has configured for their account or + * specific automation. Received as TZ identifier, such as + * “America/New_York”. + */ + timezone: string | null; + + /** @deprecated */ + zap?: { + /** @deprecated */ + id: string; + /** @deprecated */ + user: { + /** @deprecated use meta.timezone instead. */ + timezone: string; + }; + }; }; rawRequest?: Partial<{ method: HttpMethod; @@ -134,7 +192,7 @@ export interface RawHttpResponse extends BaseHttpResponse { type DehydrateFunc = ( func: (z: ZObject, bundle: Bundle) => any, inputData?: T, - cacheExpiration?: number, + cacheExpiration?: number ) => string; export interface ZObject {