Skip to content

Commit

Permalink
Update bundle.meta typings
Browse files Browse the repository at this point in the history
  • Loading branch information
tkcranny committed Nov 21, 2024
1 parent cbdce7f commit 31d5aed
Showing 1 changed file with 60 additions and 2 deletions.
62 changes: 60 additions & 2 deletions packages/core/types/zapier.custom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,71 @@ export interface Bundle<InputData = { [x: string]: any }> {
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;
Expand Down Expand Up @@ -134,7 +192,7 @@ export interface RawHttpResponse<T = any> extends BaseHttpResponse {
type DehydrateFunc = <T>(
func: (z: ZObject, bundle: Bundle<T>) => any,
inputData?: T,
cacheExpiration?: number,
cacheExpiration?: number
) => string;

export interface ZObject {
Expand Down

0 comments on commit 31d5aed

Please sign in to comment.