@wix/auto_sdk_automations_action-catalog 1.0.31 → 1.0.33
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 +61 -5
- package/build/cjs/index.typings.js +78 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +33 -6
- 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 +61 -5
- package/build/es/index.typings.mjs +77 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +33 -6
- 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 +61 -5
- 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 +33 -6
- 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 +61 -5
- 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 +33 -6
- 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.
|
|
@@ -881,19 +904,19 @@ declare enum WebhookIdentityType {
|
|
|
881
904
|
}
|
|
882
905
|
/** @enumType */
|
|
883
906
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
884
|
-
interface
|
|
907
|
+
interface AccountInfo {
|
|
885
908
|
/**
|
|
886
|
-
* ID of the account.
|
|
909
|
+
* ID of the Wix account associated with the event.
|
|
887
910
|
* @format GUID
|
|
888
911
|
*/
|
|
889
912
|
accountId?: string | null;
|
|
890
913
|
/**
|
|
891
|
-
* ID of the parent account.
|
|
914
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
892
915
|
* @format GUID
|
|
893
916
|
*/
|
|
894
917
|
parentAccountId?: string | null;
|
|
895
918
|
/**
|
|
896
|
-
* ID of the site
|
|
919
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
897
920
|
* @format GUID
|
|
898
921
|
*/
|
|
899
922
|
siteId?: string | null;
|
|
@@ -1060,6 +1083,39 @@ interface GetRuntimeActionIdentifiers {
|
|
|
1060
1083
|
/** Action key */
|
|
1061
1084
|
actionKey: string;
|
|
1062
1085
|
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Retrieves the latest version of an action by its app ID and action key.
|
|
1088
|
+
* @public
|
|
1089
|
+
* @documentationMaturity preview
|
|
1090
|
+
* @requiredField identifiers
|
|
1091
|
+
* @requiredField identifiers.actionKey
|
|
1092
|
+
* @requiredField identifiers.appId
|
|
1093
|
+
* @permissionId AUTOMATIONS.ACTION_READ
|
|
1094
|
+
* @applicableIdentity APP
|
|
1095
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetLatestAction
|
|
1096
|
+
*/
|
|
1097
|
+
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>>;
|
|
1098
|
+
interface GetLatestActionIdentifiers {
|
|
1099
|
+
/**
|
|
1100
|
+
* ID of the app that defines the action.
|
|
1101
|
+
* @format GUID
|
|
1102
|
+
*/
|
|
1103
|
+
appId: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* Action key.
|
|
1106
|
+
* @minLength 5
|
|
1107
|
+
* @maxLength 50
|
|
1108
|
+
*/
|
|
1109
|
+
actionKey: string;
|
|
1110
|
+
}
|
|
1111
|
+
interface GetLatestActionOptions {
|
|
1112
|
+
/**
|
|
1113
|
+
* Whether to apply translations to the action.
|
|
1114
|
+
*
|
|
1115
|
+
* Default: `false`
|
|
1116
|
+
*/
|
|
1117
|
+
translate?: boolean | null;
|
|
1118
|
+
}
|
|
1063
1119
|
/**
|
|
1064
1120
|
* Returns action dynamic schema and ui schema for the given action key and input mapping (action config)
|
|
1065
1121
|
* @param appId - The App ID of the action's owner.
|
|
@@ -1173,4 +1229,4 @@ interface GetActionDynamicOutputSchemaOptions {
|
|
|
1173
1229
|
*/
|
|
1174
1230
|
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
1231
|
|
|
1176
|
-
export { type
|
|
1232
|
+
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
|