Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ts): Update bundle.meta typings [IQQ-2105] #922

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
tkcranny marked this conversation as resolved.
Show resolved Hide resolved

/**
* 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
Loading