@zapier/zapier-sdk 0.33.4 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +36 -36
- package/dist/index.cjs +113 -46
- package/dist/index.d.mts +32 -17
- package/dist/index.mjs +113 -46
- package/dist/plugins/apps/schemas.d.ts +11 -11
- package/dist/plugins/apps/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/schemas.js +3 -1
- package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFields/schemas.js +3 -1
- package/dist/plugins/registry/index.d.ts.map +1 -1
- package/dist/plugins/registry/index.js +1 -0
- package/dist/plugins/runAction/schemas.d.ts.map +1 -1
- package/dist/plugins/runAction/schemas.js +3 -1
- package/dist/types/errors.d.ts +14 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +13 -0
- package/dist/types/functions.d.ts +4 -5
- package/dist/types/functions.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +2 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/utils/pagination-utils.d.ts +8 -2
- package/dist/utils/pagination-utils.d.ts.map +1 -1
- package/dist/utils/pagination-utils.js +101 -44
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1045,12 +1045,11 @@ interface FunctionOptions {
|
|
|
1045
1045
|
/** Custom fetch implementation */
|
|
1046
1046
|
fetch?: typeof globalThis.fetch;
|
|
1047
1047
|
}
|
|
1048
|
-
|
|
1049
|
-
data:
|
|
1050
|
-
}> & AsyncIterable<{
|
|
1051
|
-
data: TItem[];
|
|
1048
|
+
interface SdkPage<T = unknown> {
|
|
1049
|
+
data: T[];
|
|
1052
1050
|
nextCursor?: string;
|
|
1053
|
-
}
|
|
1051
|
+
}
|
|
1052
|
+
type PaginatedSdkFunction<TOptions, TItem> = (options: TOptions) => Promise<SdkPage<TItem>> & AsyncIterable<SdkPage<TItem>> & {
|
|
1054
1053
|
items(): AsyncIterable<TItem>;
|
|
1055
1054
|
};
|
|
1056
1055
|
|
|
@@ -1080,6 +1079,7 @@ interface ErrorOptions {
|
|
|
1080
1079
|
*/
|
|
1081
1080
|
declare abstract class ZapierError extends Error {
|
|
1082
1081
|
abstract readonly name: string;
|
|
1082
|
+
abstract readonly code: string;
|
|
1083
1083
|
statusCode?: number;
|
|
1084
1084
|
errors?: ApiError[];
|
|
1085
1085
|
cause?: unknown;
|
|
@@ -1091,6 +1091,7 @@ declare abstract class ZapierError extends Error {
|
|
|
1091
1091
|
*/
|
|
1092
1092
|
declare class ZapierApiError extends ZapierError {
|
|
1093
1093
|
readonly name = "ZapierApiError";
|
|
1094
|
+
readonly code: "ZAPIER_API_ERROR";
|
|
1094
1095
|
constructor(message: string, options?: ErrorOptions);
|
|
1095
1096
|
}
|
|
1096
1097
|
/**
|
|
@@ -1098,6 +1099,7 @@ declare class ZapierApiError extends ZapierError {
|
|
|
1098
1099
|
*/
|
|
1099
1100
|
declare class ZapierAppNotFoundError extends ZapierError {
|
|
1100
1101
|
readonly name = "ZapierAppNotFoundError";
|
|
1102
|
+
readonly code: "ZAPIER_APP_NOT_FOUND_ERROR";
|
|
1101
1103
|
appKey?: string;
|
|
1102
1104
|
constructor(message: string, options?: ErrorOptions & {
|
|
1103
1105
|
appKey?: string;
|
|
@@ -1108,6 +1110,7 @@ declare class ZapierAppNotFoundError extends ZapierError {
|
|
|
1108
1110
|
*/
|
|
1109
1111
|
declare class ZapierValidationError extends ZapierError {
|
|
1110
1112
|
readonly name = "ZapierValidationError";
|
|
1113
|
+
readonly code: "ZAPIER_VALIDATION_ERROR";
|
|
1111
1114
|
details?: unknown;
|
|
1112
1115
|
constructor(message: string, options?: ErrorOptions & {
|
|
1113
1116
|
details?: unknown;
|
|
@@ -1118,6 +1121,7 @@ declare class ZapierValidationError extends ZapierError {
|
|
|
1118
1121
|
*/
|
|
1119
1122
|
declare class ZapierUnknownError extends ZapierError {
|
|
1120
1123
|
readonly name = "ZapierUnknownError";
|
|
1124
|
+
readonly code: "ZAPIER_UNKNOWN_ERROR";
|
|
1121
1125
|
constructor(message: string, options?: ErrorOptions);
|
|
1122
1126
|
}
|
|
1123
1127
|
/**
|
|
@@ -1125,6 +1129,7 @@ declare class ZapierUnknownError extends ZapierError {
|
|
|
1125
1129
|
*/
|
|
1126
1130
|
declare class ZapierAuthenticationError extends ZapierError {
|
|
1127
1131
|
readonly name = "ZapierAuthenticationError";
|
|
1132
|
+
readonly code: "ZAPIER_AUTHENTICATION_ERROR";
|
|
1128
1133
|
constructor(message: string, options?: ErrorOptions);
|
|
1129
1134
|
}
|
|
1130
1135
|
/**
|
|
@@ -1132,6 +1137,7 @@ declare class ZapierAuthenticationError extends ZapierError {
|
|
|
1132
1137
|
*/
|
|
1133
1138
|
declare class ZapierResourceNotFoundError extends ZapierError {
|
|
1134
1139
|
readonly name = "ZapierResourceNotFoundError";
|
|
1140
|
+
readonly code: "ZAPIER_RESOURCE_NOT_FOUND_ERROR";
|
|
1135
1141
|
resourceType?: string;
|
|
1136
1142
|
resourceId?: string;
|
|
1137
1143
|
constructor(message: string, options?: ErrorOptions & {
|
|
@@ -1144,6 +1150,7 @@ declare class ZapierResourceNotFoundError extends ZapierError {
|
|
|
1144
1150
|
*/
|
|
1145
1151
|
declare class ZapierConfigurationError extends ZapierError {
|
|
1146
1152
|
readonly name = "ZapierConfigurationError";
|
|
1153
|
+
readonly code: "ZAPIER_CONFIGURATION_ERROR";
|
|
1147
1154
|
configType?: string;
|
|
1148
1155
|
constructor(message: string, options?: ErrorOptions & {
|
|
1149
1156
|
configType?: string;
|
|
@@ -1154,6 +1161,7 @@ declare class ZapierConfigurationError extends ZapierError {
|
|
|
1154
1161
|
*/
|
|
1155
1162
|
declare class ZapierBundleError extends ZapierError {
|
|
1156
1163
|
readonly name = "ZapierBundleError";
|
|
1164
|
+
readonly code: "ZAPIER_BUNDLE_ERROR";
|
|
1157
1165
|
buildErrors?: string[];
|
|
1158
1166
|
constructor(message: string, options?: ErrorOptions & {
|
|
1159
1167
|
buildErrors?: string[];
|
|
@@ -1164,6 +1172,7 @@ declare class ZapierBundleError extends ZapierError {
|
|
|
1164
1172
|
*/
|
|
1165
1173
|
declare class ZapierTimeoutError extends ZapierError {
|
|
1166
1174
|
readonly name = "ZapierTimeoutError";
|
|
1175
|
+
readonly code: "ZAPIER_TIMEOUT_ERROR";
|
|
1167
1176
|
attempts?: number;
|
|
1168
1177
|
maxAttempts?: number;
|
|
1169
1178
|
constructor(message: string, options?: ErrorOptions & {
|
|
@@ -1177,6 +1186,7 @@ declare class ZapierTimeoutError extends ZapierError {
|
|
|
1177
1186
|
*/
|
|
1178
1187
|
declare class ZapierActionError extends ZapierError {
|
|
1179
1188
|
readonly name = "ZapierActionError";
|
|
1189
|
+
readonly code: "ZAPIER_ACTION_ERROR";
|
|
1180
1190
|
appKey?: string;
|
|
1181
1191
|
actionKey?: string;
|
|
1182
1192
|
constructor(message: string, options?: ErrorOptions & {
|
|
@@ -1190,6 +1200,7 @@ declare class ZapierActionError extends ZapierError {
|
|
|
1190
1200
|
*/
|
|
1191
1201
|
declare class ZapierNotFoundError extends ZapierError {
|
|
1192
1202
|
readonly name = "ZapierNotFoundError";
|
|
1203
|
+
readonly code: "ZAPIER_NOT_FOUND_ERROR";
|
|
1193
1204
|
constructor(message: string, options?: ErrorOptions);
|
|
1194
1205
|
}
|
|
1195
1206
|
/**
|
|
@@ -1210,6 +1221,7 @@ interface RateLimitInfo {
|
|
|
1210
1221
|
*/
|
|
1211
1222
|
declare class ZapierRateLimitError extends ZapierError {
|
|
1212
1223
|
readonly name = "ZapierRateLimitError";
|
|
1224
|
+
readonly code: "ZAPIER_RATE_LIMIT_ERROR";
|
|
1213
1225
|
rateLimit: RateLimitInfo;
|
|
1214
1226
|
retries: number;
|
|
1215
1227
|
constructor(message: string, options?: ErrorOptions & {
|
|
@@ -1223,6 +1235,7 @@ declare class ZapierRateLimitError extends ZapierError {
|
|
|
1223
1235
|
*/
|
|
1224
1236
|
declare class ZapierRelayError extends ZapierError {
|
|
1225
1237
|
readonly name = "ZapierRelayError";
|
|
1238
|
+
readonly code: "ZAPIER_RELAY_ERROR";
|
|
1226
1239
|
constructor(message: string, options?: ErrorOptions);
|
|
1227
1240
|
}
|
|
1228
1241
|
/**
|
|
@@ -1432,18 +1445,18 @@ interface BaseActionTypeProxy {
|
|
|
1432
1445
|
items(): AsyncIterable<any>;
|
|
1433
1446
|
};
|
|
1434
1447
|
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
type ActionTypeProxy = BaseActionTypeProxy & Partial<FetchActionType>;
|
|
1444
|
-
interface AppProxy {
|
|
1448
|
+
type ActionTypeProxy = BaseActionTypeProxy;
|
|
1449
|
+
type AppFetchFn = (url: string | URL, init?: RequestInit & {
|
|
1450
|
+
connectionId?: ConnectionIdProperty;
|
|
1451
|
+
/** @deprecated Use connectionId instead */
|
|
1452
|
+
authenticationId?: AuthenticationIdProperty;
|
|
1453
|
+
callbackUrl?: string;
|
|
1454
|
+
}) => Promise<Response>;
|
|
1455
|
+
type AppProxy = {
|
|
1445
1456
|
[type: string]: ActionTypeProxy;
|
|
1446
|
-
}
|
|
1457
|
+
} & {
|
|
1458
|
+
fetch: AppFetchFn;
|
|
1459
|
+
};
|
|
1447
1460
|
interface AppFactory {
|
|
1448
1461
|
(options: AppFactoryInput): AppProxy;
|
|
1449
1462
|
}
|
|
@@ -2143,6 +2156,8 @@ interface FunctionRegistryEntry {
|
|
|
2143
2156
|
deprecatedParameters?: string[];
|
|
2144
2157
|
/** Short flag aliases for CLI options (e.g., { request: "X", header: "H" }) */
|
|
2145
2158
|
aliases?: Record<string, string>;
|
|
2159
|
+
/** Defaults to true. Set to false to suppress --json (e.g. login/logout/init). */
|
|
2160
|
+
supportsJsonOutput: boolean;
|
|
2146
2161
|
}
|
|
2147
2162
|
interface FunctionDeprecation {
|
|
2148
2163
|
/** User-facing deprecation message for why/how to migrate */
|
|
@@ -2969,4 +2984,4 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
|
|
|
2969
2984
|
}>;
|
|
2970
2985
|
declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
|
|
2971
2986
|
|
|
2972
|
-
export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTimeoutMsProperty, ActionTimeoutMsPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type ApplicationLifecycleEventData, type AppsPluginProvides, type AuthEvent, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type BaseEvent, BaseSdkOptionsSchema, type BatchOptions, type Choice, type ClientCredentialsObject, ClientCredentialsObjectSchema, type Connection, type ConnectionIdProperty, ConnectionIdPropertySchema, type ConnectionItem, type ConnectionsResponse, type CreateClientCredentialsPluginProvides, type Credentials, type CredentialsFunction, CredentialsFunctionSchema, type CredentialsObject, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_CONFIG_PATH, type DebugProperty, DebugPropertySchema, type DeleteClientCredentialsPluginProvides, type DynamicResolver, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type FetchPluginProvides, type Field, type FieldsResolver, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindFirstConnectionPluginProvides, type FindUniqueAuthenticationPluginProvides, type FindUniqueConnectionPluginProvides, type FormatMetadata, type FormattedItem, type FunctionDeprecation, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetConnectionPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type InfoFieldItem, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListClientCredentialsPluginProvides, type ListConnectionsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, PkceCredentialsObjectSchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, type RateLimitInfo, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, ResolvedCredentialsSchema, type Resolver, type RootFieldItem, type RunActionPluginProvides, type Sdk, type SdkEvent, type StaticResolver, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UserProfile, type UserProfileItem, ZAPIER_BASE_URL, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, createBaseEvent, createClientCredentialsPlugin, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTokenFromCliLogin, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listInputFieldsPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, toSnakeCase, toTitleCase };
|
|
2987
|
+
export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTimeoutMsProperty, ActionTimeoutMsPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type ApplicationLifecycleEventData, type AppsPluginProvides, type AuthEvent, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type BaseEvent, BaseSdkOptionsSchema, type BatchOptions, type Choice, type ClientCredentialsObject, ClientCredentialsObjectSchema, type Connection, type ConnectionIdProperty, ConnectionIdPropertySchema, type ConnectionItem, type ConnectionsResponse, type CreateClientCredentialsPluginProvides, type Credentials, type CredentialsFunction, CredentialsFunctionSchema, type CredentialsObject, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_CONFIG_PATH, type DebugProperty, DebugPropertySchema, type DeleteClientCredentialsPluginProvides, type DynamicResolver, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type FetchPluginProvides, type Field, type FieldsResolver, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindFirstConnectionPluginProvides, type FindUniqueAuthenticationPluginProvides, type FindUniqueConnectionPluginProvides, type FormatMetadata, type FormattedItem, type FunctionDeprecation, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetConnectionPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type InfoFieldItem, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListClientCredentialsPluginProvides, type ListConnectionsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, PkceCredentialsObjectSchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, type RateLimitInfo, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, ResolvedCredentialsSchema, type Resolver, type RootFieldItem, type RunActionPluginProvides, type Sdk, type SdkEvent, type SdkPage, type StaticResolver, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UserProfile, type UserProfileItem, ZAPIER_BASE_URL, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, createBaseEvent, createClientCredentialsPlugin, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTokenFromCliLogin, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listInputFieldsPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, toSnakeCase, toTitleCase };
|
package/dist/index.mjs
CHANGED
|
@@ -100,12 +100,14 @@ var ZapierApiError = class extends ZapierError {
|
|
|
100
100
|
constructor(message, options = {}) {
|
|
101
101
|
super(message, options);
|
|
102
102
|
this.name = "ZapierApiError";
|
|
103
|
+
this.code = "ZAPIER_API_ERROR";
|
|
103
104
|
}
|
|
104
105
|
};
|
|
105
106
|
var ZapierAppNotFoundError = class extends ZapierError {
|
|
106
107
|
constructor(message, options = {}) {
|
|
107
108
|
super(message, options);
|
|
108
109
|
this.name = "ZapierAppNotFoundError";
|
|
110
|
+
this.code = "ZAPIER_APP_NOT_FOUND_ERROR";
|
|
109
111
|
this.appKey = options.appKey;
|
|
110
112
|
}
|
|
111
113
|
};
|
|
@@ -113,6 +115,7 @@ var ZapierValidationError = class extends ZapierError {
|
|
|
113
115
|
constructor(message, options = {}) {
|
|
114
116
|
super(message, options);
|
|
115
117
|
this.name = "ZapierValidationError";
|
|
118
|
+
this.code = "ZAPIER_VALIDATION_ERROR";
|
|
116
119
|
this.details = options.details;
|
|
117
120
|
}
|
|
118
121
|
};
|
|
@@ -120,18 +123,21 @@ var ZapierUnknownError = class extends ZapierError {
|
|
|
120
123
|
constructor(message, options = {}) {
|
|
121
124
|
super(message, options);
|
|
122
125
|
this.name = "ZapierUnknownError";
|
|
126
|
+
this.code = "ZAPIER_UNKNOWN_ERROR";
|
|
123
127
|
}
|
|
124
128
|
};
|
|
125
129
|
var ZapierAuthenticationError = class extends ZapierError {
|
|
126
130
|
constructor(message, options = {}) {
|
|
127
131
|
super(message, options);
|
|
128
132
|
this.name = "ZapierAuthenticationError";
|
|
133
|
+
this.code = "ZAPIER_AUTHENTICATION_ERROR";
|
|
129
134
|
}
|
|
130
135
|
};
|
|
131
136
|
var ZapierResourceNotFoundError = class extends ZapierError {
|
|
132
137
|
constructor(message, options = {}) {
|
|
133
138
|
super(message, options);
|
|
134
139
|
this.name = "ZapierResourceNotFoundError";
|
|
140
|
+
this.code = "ZAPIER_RESOURCE_NOT_FOUND_ERROR";
|
|
135
141
|
this.resourceType = options.resourceType;
|
|
136
142
|
this.resourceId = options.resourceId;
|
|
137
143
|
}
|
|
@@ -140,6 +146,7 @@ var ZapierConfigurationError = class extends ZapierError {
|
|
|
140
146
|
constructor(message, options = {}) {
|
|
141
147
|
super(message, options);
|
|
142
148
|
this.name = "ZapierConfigurationError";
|
|
149
|
+
this.code = "ZAPIER_CONFIGURATION_ERROR";
|
|
143
150
|
this.configType = options.configType;
|
|
144
151
|
}
|
|
145
152
|
};
|
|
@@ -147,6 +154,7 @@ var ZapierBundleError = class extends ZapierError {
|
|
|
147
154
|
constructor(message, options = {}) {
|
|
148
155
|
super(message, options);
|
|
149
156
|
this.name = "ZapierBundleError";
|
|
157
|
+
this.code = "ZAPIER_BUNDLE_ERROR";
|
|
150
158
|
this.buildErrors = options.buildErrors;
|
|
151
159
|
}
|
|
152
160
|
};
|
|
@@ -154,6 +162,7 @@ var ZapierTimeoutError = class extends ZapierError {
|
|
|
154
162
|
constructor(message, options = {}) {
|
|
155
163
|
super(message, options);
|
|
156
164
|
this.name = "ZapierTimeoutError";
|
|
165
|
+
this.code = "ZAPIER_TIMEOUT_ERROR";
|
|
157
166
|
this.attempts = options.attempts;
|
|
158
167
|
this.maxAttempts = options.maxAttempts;
|
|
159
168
|
}
|
|
@@ -162,6 +171,7 @@ var ZapierActionError = class extends ZapierError {
|
|
|
162
171
|
constructor(message, options = {}) {
|
|
163
172
|
super(message, options);
|
|
164
173
|
this.name = "ZapierActionError";
|
|
174
|
+
this.code = "ZAPIER_ACTION_ERROR";
|
|
165
175
|
this.appKey = options.appKey;
|
|
166
176
|
this.actionKey = options.actionKey;
|
|
167
177
|
}
|
|
@@ -174,12 +184,14 @@ var ZapierNotFoundError = class extends ZapierError {
|
|
|
174
184
|
constructor(message, options = {}) {
|
|
175
185
|
super(message, options);
|
|
176
186
|
this.name = "ZapierNotFoundError";
|
|
187
|
+
this.code = "ZAPIER_NOT_FOUND_ERROR";
|
|
177
188
|
}
|
|
178
189
|
};
|
|
179
190
|
var ZapierRateLimitError = class extends ZapierError {
|
|
180
191
|
constructor(message, options = {}) {
|
|
181
192
|
super(message, options);
|
|
182
193
|
this.name = "ZapierRateLimitError";
|
|
194
|
+
this.code = "ZAPIER_RATE_LIMIT_ERROR";
|
|
183
195
|
this.rateLimit = options.rateLimit ?? {};
|
|
184
196
|
this.retries = options.retries ?? 0;
|
|
185
197
|
}
|
|
@@ -188,6 +200,7 @@ var ZapierRelayError = class extends ZapierError {
|
|
|
188
200
|
constructor(message, options = {}) {
|
|
189
201
|
super(message, options);
|
|
190
202
|
this.name = "ZapierRelayError";
|
|
203
|
+
this.code = "ZAPIER_RELAY_ERROR";
|
|
191
204
|
}
|
|
192
205
|
};
|
|
193
206
|
function formatErrorMessage(error) {
|
|
@@ -610,32 +623,63 @@ var fetchPlugin = ({ context }) => {
|
|
|
610
623
|
};
|
|
611
624
|
|
|
612
625
|
// src/utils/pagination-utils.ts
|
|
613
|
-
var
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
626
|
+
var CURSOR_VERSION = 1;
|
|
627
|
+
var CURSOR_SOURCE = {
|
|
628
|
+
API: "api",
|
|
629
|
+
SDK: "sdk"
|
|
630
|
+
};
|
|
631
|
+
function encodeBase64(str) {
|
|
632
|
+
return btoa(
|
|
633
|
+
Array.from(
|
|
634
|
+
new TextEncoder().encode(str),
|
|
635
|
+
(b) => String.fromCharCode(b)
|
|
636
|
+
).join("")
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
function decodeBase64(str) {
|
|
640
|
+
return new TextDecoder().decode(
|
|
641
|
+
Uint8Array.from(atob(str), (c) => c.charCodeAt(0))
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
function encodeApiCursor(cursor) {
|
|
645
|
+
const envelope = {
|
|
646
|
+
v: CURSOR_VERSION,
|
|
647
|
+
source: CURSOR_SOURCE.API,
|
|
648
|
+
cursor
|
|
649
|
+
};
|
|
650
|
+
return encodeBase64(JSON.stringify(envelope));
|
|
651
|
+
}
|
|
652
|
+
function encodeSdkCursor(offset, cursor) {
|
|
653
|
+
const envelope = {
|
|
654
|
+
v: CURSOR_VERSION,
|
|
655
|
+
source: CURSOR_SOURCE.SDK,
|
|
656
|
+
cursor,
|
|
657
|
+
offset
|
|
658
|
+
};
|
|
659
|
+
return encodeBase64(JSON.stringify(envelope));
|
|
660
|
+
}
|
|
661
|
+
function decodeIncomingCursor(incoming) {
|
|
662
|
+
if (!incoming) {
|
|
663
|
+
return { offset: 0, cursor: void 0 };
|
|
617
664
|
}
|
|
618
665
|
try {
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
|
|
666
|
+
const decoded = decodeBase64(incoming);
|
|
667
|
+
const envelope = JSON.parse(decoded);
|
|
668
|
+
if (envelope.v !== CURSOR_VERSION) {
|
|
669
|
+
return { offset: 0, cursor: incoming };
|
|
622
670
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
return [0, cursor];
|
|
671
|
+
if (envelope.source === CURSOR_SOURCE.SDK) {
|
|
672
|
+
return { offset: envelope.offset ?? 0, cursor: envelope.cursor };
|
|
626
673
|
}
|
|
627
|
-
if (
|
|
628
|
-
return
|
|
674
|
+
if (envelope.source === CURSOR_SOURCE.API) {
|
|
675
|
+
return { offset: 0, cursor: envelope.cursor };
|
|
629
676
|
}
|
|
630
|
-
return
|
|
677
|
+
return { offset: 0, cursor: incoming };
|
|
631
678
|
} catch {
|
|
632
|
-
return
|
|
679
|
+
return { offset: 0, cursor: incoming };
|
|
633
680
|
}
|
|
634
681
|
}
|
|
635
|
-
function
|
|
636
|
-
return JSON.stringify([offsetCursorMarker, offset, currentCursor]);
|
|
637
|
-
}
|
|
638
|
-
async function* paginateMaxItems(pageFunction, pageOptions) {
|
|
682
|
+
async function* paginateMaxItemsWithUnencodedCursor(pageFunction, pageOptions) {
|
|
639
683
|
let cursor = pageOptions?.cursor;
|
|
640
684
|
let totalItemsYielded = 0;
|
|
641
685
|
const maxItems = pageOptions?.maxItems;
|
|
@@ -650,12 +694,11 @@ async function* paginateMaxItems(pageFunction, pageOptions) {
|
|
|
650
694
|
if (maxItems !== void 0) {
|
|
651
695
|
const remainingItems = maxItems - totalItemsYielded;
|
|
652
696
|
if (page.data.length >= remainingItems) {
|
|
653
|
-
|
|
697
|
+
yield {
|
|
654
698
|
...page,
|
|
655
699
|
data: page.data.slice(0, remainingItems),
|
|
656
700
|
nextCursor: void 0
|
|
657
701
|
};
|
|
658
|
-
yield yieldedPage;
|
|
659
702
|
break;
|
|
660
703
|
}
|
|
661
704
|
}
|
|
@@ -666,16 +709,38 @@ async function* paginateMaxItems(pageFunction, pageOptions) {
|
|
|
666
709
|
}
|
|
667
710
|
async function* paginateBuffered(pageFunction, pageOptions) {
|
|
668
711
|
const pageSize = pageOptions?.pageSize;
|
|
669
|
-
const
|
|
712
|
+
const { offset: cursorOffset, cursor: initialCursor } = decodeIncomingCursor(
|
|
713
|
+
pageOptions?.cursor
|
|
714
|
+
);
|
|
715
|
+
const requestedMaxItems = pageOptions?.maxItems;
|
|
670
716
|
const options = {
|
|
671
717
|
...pageOptions || {},
|
|
672
|
-
cursor:
|
|
718
|
+
cursor: initialCursor,
|
|
719
|
+
// SDK cursors can carry an offset into a raw backend page. Since maxItems
|
|
720
|
+
// is expected to be relative to the resumed position, we add that offset
|
|
721
|
+
// so raw pagination still yields enough items after offset slicing.
|
|
722
|
+
maxItems: requestedMaxItems !== void 0 && cursorOffset > 0 ? requestedMaxItems + cursorOffset : requestedMaxItems
|
|
673
723
|
};
|
|
674
|
-
|
|
724
|
+
if (!pageSize) {
|
|
725
|
+
for await (const page of paginateMaxItemsWithUnencodedCursor(
|
|
726
|
+
pageFunction,
|
|
727
|
+
options
|
|
728
|
+
)) {
|
|
729
|
+
yield {
|
|
730
|
+
...page,
|
|
731
|
+
nextCursor: page.nextCursor ? encodeApiCursor(page.nextCursor) : void 0
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
675
736
|
let bufferedPages = [];
|
|
676
737
|
let isFirstPage = true;
|
|
677
|
-
let
|
|
678
|
-
for await (let page of
|
|
738
|
+
let rawCursor;
|
|
739
|
+
for await (let page of paginateMaxItemsWithUnencodedCursor(
|
|
740
|
+
pageFunction,
|
|
741
|
+
options
|
|
742
|
+
)) {
|
|
743
|
+
const nextRawCursor = page.nextCursor;
|
|
679
744
|
if (isFirstPage) {
|
|
680
745
|
isFirstPage = false;
|
|
681
746
|
if (cursorOffset) {
|
|
@@ -685,18 +750,13 @@ async function* paginateBuffered(pageFunction, pageOptions) {
|
|
|
685
750
|
};
|
|
686
751
|
}
|
|
687
752
|
}
|
|
688
|
-
if (!pageSize) {
|
|
689
|
-
yield page;
|
|
690
|
-
cursor = page.nextCursor;
|
|
691
|
-
continue;
|
|
692
|
-
}
|
|
693
753
|
const bufferedLength = bufferedPages.reduce(
|
|
694
|
-
(acc,
|
|
754
|
+
(acc, p) => acc + p.data.length,
|
|
695
755
|
0
|
|
696
756
|
);
|
|
697
757
|
if (bufferedLength + page.data.length < pageSize) {
|
|
698
758
|
bufferedPages.push(page);
|
|
699
|
-
|
|
759
|
+
rawCursor = nextRawCursor;
|
|
700
760
|
continue;
|
|
701
761
|
}
|
|
702
762
|
const bufferedItems = bufferedPages.map((p) => p.data).flat();
|
|
@@ -707,28 +767,28 @@ async function* paginateBuffered(pageFunction, pageOptions) {
|
|
|
707
767
|
yield {
|
|
708
768
|
...page,
|
|
709
769
|
data: pageItems,
|
|
710
|
-
nextCursor:
|
|
770
|
+
nextCursor: nextRawCursor ? encodeApiCursor(nextRawCursor) : void 0
|
|
711
771
|
};
|
|
712
772
|
bufferedPages = [];
|
|
713
|
-
|
|
773
|
+
rawCursor = nextRawCursor;
|
|
714
774
|
continue;
|
|
715
775
|
}
|
|
716
776
|
yield {
|
|
717
777
|
...page,
|
|
718
778
|
data: pageItems,
|
|
719
|
-
nextCursor:
|
|
779
|
+
nextCursor: encodeSdkCursor(
|
|
720
780
|
page.data.length - remainingItems.length,
|
|
721
|
-
|
|
781
|
+
rawCursor
|
|
722
782
|
)
|
|
723
783
|
};
|
|
724
784
|
while (remainingItems.length > pageSize) {
|
|
725
|
-
const
|
|
785
|
+
const chunkItems = remainingItems.splice(0, pageSize);
|
|
726
786
|
yield {
|
|
727
787
|
...page,
|
|
728
|
-
data:
|
|
729
|
-
nextCursor:
|
|
788
|
+
data: chunkItems,
|
|
789
|
+
nextCursor: encodeSdkCursor(
|
|
730
790
|
page.data.length - remainingItems.length,
|
|
731
|
-
|
|
791
|
+
rawCursor
|
|
732
792
|
)
|
|
733
793
|
};
|
|
734
794
|
}
|
|
@@ -738,7 +798,7 @@ async function* paginateBuffered(pageFunction, pageOptions) {
|
|
|
738
798
|
data: remainingItems
|
|
739
799
|
}
|
|
740
800
|
];
|
|
741
|
-
|
|
801
|
+
rawCursor = nextRawCursor;
|
|
742
802
|
}
|
|
743
803
|
if (bufferedPages.length > 0) {
|
|
744
804
|
const lastBufferedPage = bufferedPages.slice(-1)[0];
|
|
@@ -1875,7 +1935,9 @@ var ListInputFieldsSchema = z.object({
|
|
|
1875
1935
|
appKey: AppKeyPropertySchema,
|
|
1876
1936
|
actionType: ActionTypePropertySchema,
|
|
1877
1937
|
actionKey: ActionKeyPropertySchema,
|
|
1878
|
-
connectionId: ConnectionIdPropertySchema.nullable().optional()
|
|
1938
|
+
connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
|
|
1939
|
+
"Connection ID to use when listing input fields. Required if the action needs a connection to determine available fields."
|
|
1940
|
+
),
|
|
1879
1941
|
/** @deprecated Use connectionId instead */
|
|
1880
1942
|
authenticationId: AuthenticationIdPropertySchema.nullable().optional(),
|
|
1881
1943
|
inputs: InputsPropertySchema.optional().describe(
|
|
@@ -2873,7 +2935,9 @@ var RunActionSchema = z.object({
|
|
|
2873
2935
|
appKey: AppKeyPropertySchema,
|
|
2874
2936
|
actionType: ActionTypePropertySchema,
|
|
2875
2937
|
actionKey: ActionKeyPropertySchema,
|
|
2876
|
-
connectionId: ConnectionIdPropertySchema.nullable().optional()
|
|
2938
|
+
connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
|
|
2939
|
+
"Connection ID to use when running the action. Required if the action needs a connection to authenticate and interact with the service."
|
|
2940
|
+
),
|
|
2877
2941
|
/** @deprecated Use connectionId instead */
|
|
2878
2942
|
authenticationId: ConnectionIdPropertySchema.nullable().optional(),
|
|
2879
2943
|
inputs: InputsPropertySchema.optional().describe(
|
|
@@ -4958,7 +5022,8 @@ var registryPlugin = ({ sdk, context }) => {
|
|
|
4958
5022
|
confirm: meta.confirm ?? (meta.type === "delete" ? "delete" : void 0),
|
|
4959
5023
|
deprecation: meta.deprecation,
|
|
4960
5024
|
deprecatedParameters: meta.deprecatedParameters,
|
|
4961
|
-
aliases: meta.aliases
|
|
5025
|
+
aliases: meta.aliases,
|
|
5026
|
+
supportsJsonOutput: meta.supportsJsonOutput ?? true
|
|
4962
5027
|
};
|
|
4963
5028
|
}).sort((a, b) => a.name.localeCompare(b.name));
|
|
4964
5029
|
const knownCategories = Object.keys(categoryDefinitions);
|
|
@@ -5192,7 +5257,9 @@ var ListInputFieldChoicesSchema = z.object({
|
|
|
5192
5257
|
// Input field specification
|
|
5193
5258
|
inputFieldKey: z.string().min(1).describe("Input field key to get choices for."),
|
|
5194
5259
|
// Common parameters
|
|
5195
|
-
connectionId: ConnectionIdPropertySchema.nullable().optional()
|
|
5260
|
+
connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
|
|
5261
|
+
"Connection ID to use when listing available field choices. Required if the action needs a connection to populate dynamic dropdown options."
|
|
5262
|
+
),
|
|
5196
5263
|
/** @deprecated Use connectionId instead */
|
|
5197
5264
|
authenticationId: AuthenticationIdPropertySchema.nullable().optional(),
|
|
5198
5265
|
inputs: InputsPropertySchema.optional().describe(
|
|
@@ -5491,7 +5558,7 @@ function getCpuTime() {
|
|
|
5491
5558
|
}
|
|
5492
5559
|
|
|
5493
5560
|
// src/plugins/eventEmission/builders.ts
|
|
5494
|
-
var SDK_VERSION = "0.
|
|
5561
|
+
var SDK_VERSION = "0.34.1";
|
|
5495
5562
|
function createBaseEvent(context = {}) {
|
|
5496
5563
|
return {
|
|
5497
5564
|
event_id: generateEventId(),
|
|
@@ -23,18 +23,18 @@ interface BaseActionTypeProxy {
|
|
|
23
23
|
items(): AsyncIterable<any>;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type ActionTypeProxy = BaseActionTypeProxy & Partial<FetchActionType>;
|
|
35
|
-
interface AppProxy {
|
|
26
|
+
type ActionTypeProxy = BaseActionTypeProxy;
|
|
27
|
+
type AppFetchFn = (url: string | URL, init?: RequestInit & {
|
|
28
|
+
connectionId?: ConnectionIdProperty;
|
|
29
|
+
/** @deprecated Use connectionId instead */
|
|
30
|
+
authenticationId?: AuthenticationIdProperty;
|
|
31
|
+
callbackUrl?: string;
|
|
32
|
+
}) => Promise<Response>;
|
|
33
|
+
type AppProxy = {
|
|
36
34
|
[type: string]: ActionTypeProxy;
|
|
37
|
-
}
|
|
35
|
+
} & {
|
|
36
|
+
fetch: AppFetchFn;
|
|
37
|
+
};
|
|
38
38
|
interface AppFactory {
|
|
39
39
|
(options: AppFactoryInput): AppProxy;
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,0BAA0B;;;;;iBAUpC,CAAC;AAGJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;iBAMW,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,UAAU,mBAAmB;IAC3B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC,EAAE,sBAAsB,KAAK,OAAO,CAAC;QAC9D,IAAI,EAAE,GAAG,EAAE,CAAC;QACZ,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACpD,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;KAC7B,CAAC;CACL;AAGD,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,0BAA0B;;;;;iBAUpC,CAAC;AAGJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;iBAMW,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,UAAU,mBAAmB;IAC3B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC,EAAE,sBAAsB,KAAK,OAAO,CAAC;QAC9D,IAAI,EAAE,GAAG,EAAE,CAAC;QACZ,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACpD,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;KAC7B,CAAC;CACL;AAGD,KAAK,eAAe,GAAG,mBAAmB,CAAC;AAG3C,KAAK,UAAU,GAAG,CAChB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,CAAC,EAAE,WAAW,GAAG;IACnB,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,KACE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB,KAAK,QAAQ,GAAG;IACd,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC;CACjC,GAAG;IACF,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,UAAU,UAAU;IAClB,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC;CACtC;AAGD,KAAK,mBAAmB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFieldChoices/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAM5B,eAAO,MAAM,0BAA0B;;;;;iBA0BrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFieldChoices/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAM5B,eAAO,MAAM,0BAA0B;;;;;iBA0BrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;iBA4CmC,CAAC;AAG5E,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,2BAA2B,CACnC,CAAC;AAGF,MAAM,MAAM,0BAA0B,GAClC,wBAAwB,GACxB,cAAc,GACd,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB,EAAE,oBAAoB,CACzC,4BAA4B,EAC5B,oBAAoB,CACrB,CAAC;CACH"}
|
|
@@ -41,7 +41,9 @@ export const ListInputFieldChoicesSchema = z
|
|
|
41
41
|
.min(1)
|
|
42
42
|
.describe("Input field key to get choices for."),
|
|
43
43
|
// Common parameters
|
|
44
|
-
connectionId: ConnectionIdPropertySchema.nullable()
|
|
44
|
+
connectionId: ConnectionIdPropertySchema.nullable()
|
|
45
|
+
.optional()
|
|
46
|
+
.describe("Connection ID to use when listing available field choices. Required if the action needs a connection to populate dynamic dropdown options."),
|
|
45
47
|
/** @deprecated Use connectionId instead */
|
|
46
48
|
authenticationId: AuthenticationIdPropertySchema.nullable().optional(),
|
|
47
49
|
inputs: InputsPropertySchema.optional().describe("Current input values that may affect available choices"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBA2BgC,CAAC;AAGnE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAG3E,MAAM,MAAM,oBAAoB,GAC5B,wBAAwB,GACxB,cAAc,GACd,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,oBAAoB,CACnC,sBAAsB,EACtB,aAAa,EAAE,CAChB,CAAC;CACH"}
|
|
@@ -6,7 +6,9 @@ export const ListInputFieldsSchema = z
|
|
|
6
6
|
appKey: AppKeyPropertySchema,
|
|
7
7
|
actionType: ActionTypePropertySchema,
|
|
8
8
|
actionKey: ActionKeyPropertySchema,
|
|
9
|
-
connectionId: ConnectionIdPropertySchema.nullable()
|
|
9
|
+
connectionId: ConnectionIdPropertySchema.nullable()
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("Connection ID to use when listing input fields. Required if the action needs a connection to determine available fields."),
|
|
10
12
|
/** @deprecated Use connectionId instead */
|
|
11
13
|
authenticationId: AuthenticationIdPropertySchema.nullable().optional(),
|
|
12
14
|
inputs: InputsPropertySchema.optional().describe("Current input values that may affect available fields"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,6BAA6B;CAAG;AAEjD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK;QAC/C,SAAS,EAAE,qBAAqB,EAAE,CAAC;QACnC,UAAU,EAAE;YACV,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,SAAS,EAAE,MAAM,EAAE,CAAC;SACrB,EAAE,CAAC;KACL,CAAC;CACH;AAGD,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,EAAE,EAAE,wBAAwB;AAC5B,EAAE,EAAE,sBAAsB;AAC1B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,6BAA6B;CAAG;AAEjD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK;QAC/C,SAAS,EAAE,qBAAqB,EAAE,CAAC;QACnC,UAAU,EAAE;YACV,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,SAAS,EAAE,MAAM,EAAE,CAAC;SACrB,EAAE,CAAC;KACL,CAAC;CACH;AAGD,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,EAAE,EAAE,wBAAwB;AAC5B,EAAE,EAAE,sBAAsB;AAC1B,sBAAsB,CAsJvB,CAAC"}
|
|
@@ -62,6 +62,7 @@ export const registryPlugin = ({ sdk, context }) => {
|
|
|
62
62
|
deprecation: meta.deprecation,
|
|
63
63
|
deprecatedParameters: meta.deprecatedParameters,
|
|
64
64
|
aliases: meta.aliases,
|
|
65
|
+
supportsJsonOutput: meta.supportsJsonOutput ?? true,
|
|
65
66
|
};
|
|
66
67
|
})
|
|
67
68
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;iBA4B0B,CAAC;AAGvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAG/D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,cAAc,GACtB,iBAAiB,GACjB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,oBAAoB,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;CAC5D"}
|
|
@@ -6,7 +6,9 @@ export const RunActionSchema = z
|
|
|
6
6
|
appKey: AppKeyPropertySchema,
|
|
7
7
|
actionType: ActionTypePropertySchema,
|
|
8
8
|
actionKey: ActionKeyPropertySchema,
|
|
9
|
-
connectionId: ConnectionIdPropertySchema.nullable()
|
|
9
|
+
connectionId: ConnectionIdPropertySchema.nullable()
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("Connection ID to use when running the action. Required if the action needs a connection to authenticate and interact with the service."),
|
|
10
12
|
/** @deprecated Use connectionId instead */
|
|
11
13
|
authenticationId: ConnectionIdPropertySchema.nullable().optional(),
|
|
12
14
|
inputs: InputsPropertySchema.optional().describe("Input parameters for the action"),
|