@wix/auto_sdk_automations_action-catalog 1.0.32 → 1.0.34
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/build/cjs/index.d.ts +11 -3
- package/build/cjs/index.js +87 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +59 -1
- package/build/cjs/index.typings.js +78 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +31 -2
- package/build/cjs/meta.js +58 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +11 -3
- package/build/es/index.mjs +86 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +59 -1
- package/build/es/index.typings.mjs +77 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +31 -2
- package/build/es/meta.mjs +57 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -3
- package/build/internal/cjs/index.js +87 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +59 -1
- package/build/internal/cjs/index.typings.js +78 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +31 -2
- package/build/internal/cjs/meta.js +58 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -3
- package/build/internal/es/index.mjs +86 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +59 -1
- package/build/internal/es/index.typings.mjs +77 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +31 -2
- package/build/internal/es/meta.mjs +57 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -334,6 +334,29 @@ interface GetRuntimeActionResponse {
|
|
|
334
334
|
/** Action Configuration */
|
|
335
335
|
action?: Action;
|
|
336
336
|
}
|
|
337
|
+
interface GetLatestActionRequest {
|
|
338
|
+
/**
|
|
339
|
+
* ID of the app that defines the action.
|
|
340
|
+
* @format GUID
|
|
341
|
+
*/
|
|
342
|
+
appId: string;
|
|
343
|
+
/**
|
|
344
|
+
* Action key.
|
|
345
|
+
* @minLength 5
|
|
346
|
+
* @maxLength 50
|
|
347
|
+
*/
|
|
348
|
+
actionKey: string;
|
|
349
|
+
/**
|
|
350
|
+
* Whether to apply translations to the action.
|
|
351
|
+
*
|
|
352
|
+
* Default: `false`
|
|
353
|
+
*/
|
|
354
|
+
translate?: boolean | null;
|
|
355
|
+
}
|
|
356
|
+
interface GetLatestActionResponse {
|
|
357
|
+
/** The requested action. */
|
|
358
|
+
action?: Action;
|
|
359
|
+
}
|
|
337
360
|
interface GetActionDynamicInputSchemaRequest {
|
|
338
361
|
/**
|
|
339
362
|
* The App ID of the action's owner.
|
|
@@ -824,6 +847,8 @@ interface MessageEnvelope {
|
|
|
824
847
|
identity?: IdentificationData;
|
|
825
848
|
/** Stringify payload. */
|
|
826
849
|
data?: string;
|
|
850
|
+
/** Details related to the account */
|
|
851
|
+
accountInfo?: AccountInfo;
|
|
827
852
|
}
|
|
828
853
|
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
829
854
|
/**
|
|
@@ -1060,6 +1085,39 @@ interface GetRuntimeActionIdentifiers {
|
|
|
1060
1085
|
/** Action key */
|
|
1061
1086
|
actionKey: string;
|
|
1062
1087
|
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Retrieves the latest version of an action by its app ID and action key.
|
|
1090
|
+
* @public
|
|
1091
|
+
* @documentationMaturity preview
|
|
1092
|
+
* @requiredField identifiers
|
|
1093
|
+
* @requiredField identifiers.actionKey
|
|
1094
|
+
* @requiredField identifiers.appId
|
|
1095
|
+
* @permissionId AUTOMATIONS.ACTION_READ
|
|
1096
|
+
* @applicableIdentity APP
|
|
1097
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetLatestAction
|
|
1098
|
+
*/
|
|
1099
|
+
declare function getLatestAction(identifiers: NonNullablePaths<GetLatestActionIdentifiers, `actionKey` | `appId`, 2>, options?: GetLatestActionOptions): Promise<NonNullablePaths<GetLatestActionResponse, `action.appId` | `action.actionKey` | `action.implementedMethods.validateConfiguration` | `action.implementedMethods.duplicateInputMapping` | `action.implementedMethods.generateApplicationAutomationInputMapping` | `action.implementedMethods.getQuotaInfo` | `action.implementedMethods.onBeforeSave` | `action.implementedMethods.onReset` | `action.implementedMethods.generateActionInputMappingFromTemplate` | `action.implementedMethods.onRemove` | `action.implementedMethods.getDynamicInputSchema` | `action.implementedMethods.mergeInputMappings` | `action.implementedMethods.getDynamicOutputSchema` | `action.implementedMethods.generateInputMappingFromIntent` | `action.executionType` | `action.interfaceConfiguration.type`, 4>>;
|
|
1100
|
+
interface GetLatestActionIdentifiers {
|
|
1101
|
+
/**
|
|
1102
|
+
* ID of the app that defines the action.
|
|
1103
|
+
* @format GUID
|
|
1104
|
+
*/
|
|
1105
|
+
appId: string;
|
|
1106
|
+
/**
|
|
1107
|
+
* Action key.
|
|
1108
|
+
* @minLength 5
|
|
1109
|
+
* @maxLength 50
|
|
1110
|
+
*/
|
|
1111
|
+
actionKey: string;
|
|
1112
|
+
}
|
|
1113
|
+
interface GetLatestActionOptions {
|
|
1114
|
+
/**
|
|
1115
|
+
* Whether to apply translations to the action.
|
|
1116
|
+
*
|
|
1117
|
+
* Default: `false`
|
|
1118
|
+
*/
|
|
1119
|
+
translate?: boolean | null;
|
|
1120
|
+
}
|
|
1063
1121
|
/**
|
|
1064
1122
|
* Returns action dynamic schema and ui schema for the given action key and input mapping (action config)
|
|
1065
1123
|
* @param appId - The App ID of the action's owner.
|
|
@@ -1173,4 +1231,4 @@ interface GetActionDynamicOutputSchemaOptions {
|
|
|
1173
1231
|
*/
|
|
1174
1232
|
declare function bulkGetActionDynamicOutputSchemas(actionsInputMappings: ActionInputMappings[]): Promise<NonNullablePaths<BulkGetActionDynamicOutputSchemasResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
1175
1233
|
|
|
1176
|
-
export { type AccountInfo, type Action, type ActionEvent, type ActionInputMappings, type ActionSpecInfo, type AdditionalInformationRequiredInfo, type ApplicationError, type BulkActionMetadata, type BulkActionOutputSchemaResult, type BulkGetActionDynamicOutputSchemasRequest, type BulkGetActionDynamicOutputSchemasResponse, type CommonCursorPaging, type CommonCursors, type CommonPaging, type CommonPagingMetadataV2, type CommonQueryV2, type CommonQueryV2PagingMethodOneOf, CommonSortOrder, type CommonSortOrderWithLiterals, type CommonSorting, type CopyInputMappingOptions, type CopyInputMappingRequest, type CopyInputMappingResponse, type CreateActionOptions, type CreateActionRequest, type CreateActionResponse, type CursorPaging, type Cursors, type DeleteActionOptions, type DeleteActionRequest, type DeleteActionResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ExecutionType, type ExecutionTypeWithLiterals, ExperimentActionType, type ExperimentActionTypeWithLiterals, type FocalPoint, type GenerateInputMappingFromIntentRequest, type GenerateInputMappingFromIntentResponse, type GenerateInputMappingFromIntentResponseStatusInfoOneOf, type GenericOptions, type GetActionDynamicInputSchemaOptions, type GetActionDynamicInputSchemaRequest, type GetActionDynamicInputSchemaResponse, type GetActionDynamicOutputSchemaOptions, type GetActionDynamicOutputSchemaRequest, type GetActionDynamicOutputSchemaResponse, type GetRuntimeActionIdentifiers, type GetRuntimeActionRequest, type GetRuntimeActionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImplementedMethods, type InputMappingGeneratedInfo, type IntegrationOptions, IntegrationType, type IntegrationTypeWithLiterals, type InterfaceConfiguration, type InterfaceConfigurationOptionsOneOf, type ItemMetadata, type MessageEnvelope, type Metadata, type MigrateComponentToActionRequest, type MigrateComponentToActionResponse, type Paging, type PagingMetadataV2, type QueryActionsRequest, type QueryActionsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ResolveActionsOptions, type ResolveActionsRequest, type ResolveActionsResponse, type RestoreInfo, type RetryExperimentCreation, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, type SourceOptionsOneOf, SourceType, type SourceTypeWithLiterals, Status, type StatusWithLiterals, Type, type TypeWithLiterals, type UpdateActionOptions, type UpdateActionRequest, type UpdateActionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WidgetComponentOptions, type WixApiOptions, bulkGetActionDynamicOutputSchemas, copyInputMapping, createAction, deleteAction, getActionDynamicInputSchema, getActionDynamicOutputSchema, getRuntimeAction, resolveActions, updateAction };
|
|
1234
|
+
export { type AccountInfo, type Action, type ActionEvent, type ActionInputMappings, type ActionSpecInfo, type AdditionalInformationRequiredInfo, type ApplicationError, type BulkActionMetadata, type BulkActionOutputSchemaResult, type BulkGetActionDynamicOutputSchemasRequest, type BulkGetActionDynamicOutputSchemasResponse, type CommonCursorPaging, type CommonCursors, type CommonPaging, type CommonPagingMetadataV2, type CommonQueryV2, type CommonQueryV2PagingMethodOneOf, CommonSortOrder, type CommonSortOrderWithLiterals, type CommonSorting, type CopyInputMappingOptions, type CopyInputMappingRequest, type CopyInputMappingResponse, type CreateActionOptions, type CreateActionRequest, type CreateActionResponse, type CursorPaging, type Cursors, type DeleteActionOptions, type DeleteActionRequest, type DeleteActionResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ExecutionType, type ExecutionTypeWithLiterals, ExperimentActionType, type ExperimentActionTypeWithLiterals, type FocalPoint, type GenerateInputMappingFromIntentRequest, type GenerateInputMappingFromIntentResponse, type GenerateInputMappingFromIntentResponseStatusInfoOneOf, type GenericOptions, type GetActionDynamicInputSchemaOptions, type GetActionDynamicInputSchemaRequest, type GetActionDynamicInputSchemaResponse, type GetActionDynamicOutputSchemaOptions, type GetActionDynamicOutputSchemaRequest, type GetActionDynamicOutputSchemaResponse, type GetLatestActionIdentifiers, type GetLatestActionOptions, type GetLatestActionRequest, type GetLatestActionResponse, type GetRuntimeActionIdentifiers, type GetRuntimeActionRequest, type GetRuntimeActionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImplementedMethods, type InputMappingGeneratedInfo, type IntegrationOptions, IntegrationType, type IntegrationTypeWithLiterals, type InterfaceConfiguration, type InterfaceConfigurationOptionsOneOf, type ItemMetadata, type MessageEnvelope, type Metadata, type MigrateComponentToActionRequest, type MigrateComponentToActionResponse, type Paging, type PagingMetadataV2, type QueryActionsRequest, type QueryActionsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ResolveActionsOptions, type ResolveActionsRequest, type ResolveActionsResponse, type RestoreInfo, type RetryExperimentCreation, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, type SourceOptionsOneOf, SourceType, type SourceTypeWithLiterals, Status, type StatusWithLiterals, Type, type TypeWithLiterals, type UpdateActionOptions, type UpdateActionRequest, type UpdateActionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WidgetComponentOptions, type WixApiOptions, bulkGetActionDynamicOutputSchemas, copyInputMapping, createAction, deleteAction, getActionDynamicInputSchema, getActionDynamicOutputSchema, getLatestAction, getRuntimeAction, resolveActions, updateAction };
|
|
@@ -246,6 +246,44 @@ function getRuntimeAction(payload) {
|
|
|
246
246
|
}
|
|
247
247
|
return __getRuntimeAction;
|
|
248
248
|
}
|
|
249
|
+
function getLatestAction(payload) {
|
|
250
|
+
function __getLatestAction({ host }) {
|
|
251
|
+
const metadata = {
|
|
252
|
+
entityFqdn: "wix.automations.actioncatalog.v1.action",
|
|
253
|
+
method: "GET",
|
|
254
|
+
methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.GetLatestAction",
|
|
255
|
+
packageName: PACKAGE_NAME,
|
|
256
|
+
migrationOptions: {
|
|
257
|
+
optInTransformResponse: true
|
|
258
|
+
},
|
|
259
|
+
url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
|
|
260
|
+
protoPath: "/v1/actions/latest/apps/{appId}/keys/{actionKey}",
|
|
261
|
+
data: payload,
|
|
262
|
+
host
|
|
263
|
+
}),
|
|
264
|
+
params: toURLSearchParams(payload),
|
|
265
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
266
|
+
{
|
|
267
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
268
|
+
paths: [
|
|
269
|
+
{ path: "action.createdDate" },
|
|
270
|
+
{ path: "action.updatedDate" },
|
|
271
|
+
{ path: "action.icon.urlExpirationDate" }
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
276
|
+
paths: [
|
|
277
|
+
{ path: "action.icon.focalPoint.x" },
|
|
278
|
+
{ path: "action.icon.focalPoint.y" }
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
])
|
|
282
|
+
};
|
|
283
|
+
return metadata;
|
|
284
|
+
}
|
|
285
|
+
return __getLatestAction;
|
|
286
|
+
}
|
|
249
287
|
function getActionDynamicInputSchema(payload) {
|
|
250
288
|
function __getActionDynamicInputSchema({ host }) {
|
|
251
289
|
const metadata = {
|
|
@@ -581,6 +619,44 @@ async function getRuntimeAction2(identifiers) {
|
|
|
581
619
|
throw transformedError;
|
|
582
620
|
}
|
|
583
621
|
}
|
|
622
|
+
async function getLatestAction2(identifiers, options) {
|
|
623
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
624
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
625
|
+
appId: identifiers?.appId,
|
|
626
|
+
actionKey: identifiers?.actionKey,
|
|
627
|
+
translate: options?.translate
|
|
628
|
+
});
|
|
629
|
+
const reqOpts = getLatestAction(payload);
|
|
630
|
+
sideEffects?.onSiteCall?.();
|
|
631
|
+
try {
|
|
632
|
+
const result = await httpClient.request(reqOpts);
|
|
633
|
+
sideEffects?.onSuccess?.(result);
|
|
634
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
635
|
+
transformPaths2(result.data, [
|
|
636
|
+
{
|
|
637
|
+
transformFn: transformRESTImageToSDKImage,
|
|
638
|
+
paths: [{ path: "action.icon" }]
|
|
639
|
+
}
|
|
640
|
+
])
|
|
641
|
+
);
|
|
642
|
+
} catch (err) {
|
|
643
|
+
const transformedError = sdkTransformError(
|
|
644
|
+
err,
|
|
645
|
+
{
|
|
646
|
+
spreadPathsToArguments: {},
|
|
647
|
+
explicitPathsToArguments: {
|
|
648
|
+
appId: "$[0].appId",
|
|
649
|
+
actionKey: "$[0].actionKey",
|
|
650
|
+
translate: "$[1].translate"
|
|
651
|
+
},
|
|
652
|
+
singleArgumentUnchanged: false
|
|
653
|
+
},
|
|
654
|
+
["identifiers", "options"]
|
|
655
|
+
);
|
|
656
|
+
sideEffects?.onError?.(err);
|
|
657
|
+
throw transformedError;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
584
660
|
async function getActionDynamicInputSchema2(appId, options) {
|
|
585
661
|
const { httpClient, sideEffects } = arguments[2];
|
|
586
662
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -753,6 +829,7 @@ export {
|
|
|
753
829
|
deleteAction2 as deleteAction,
|
|
754
830
|
getActionDynamicInputSchema2 as getActionDynamicInputSchema,
|
|
755
831
|
getActionDynamicOutputSchema2 as getActionDynamicOutputSchema,
|
|
832
|
+
getLatestAction2 as getLatestAction,
|
|
756
833
|
getRuntimeAction2 as getRuntimeAction,
|
|
757
834
|
resolveActions2 as resolveActions,
|
|
758
835
|
updateAction2 as updateAction
|