@wix/auto_sdk_automations_automations-v-2 1.0.30 → 1.0.32
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.js +9 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +138 -136
- package/build/cjs/index.typings.js +9 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.mjs +9 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +138 -136
- package/build/es/index.typings.mjs +9 -8
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.js +9 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +138 -136
- package/build/internal/cjs/index.typings.js +9 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.mjs +9 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +138 -136
- package/build/internal/es/index.typings.mjs +9 -8
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -711,6 +711,140 @@ interface DraftPublished {
|
|
|
711
711
|
/** Updated, published automation. */
|
|
712
712
|
updatedAutomation?: Automation;
|
|
713
713
|
}
|
|
714
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
715
|
+
createdEvent?: EntityCreatedEvent;
|
|
716
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
717
|
+
deletedEvent?: EntityDeletedEvent;
|
|
718
|
+
actionEvent?: ActionEvent;
|
|
719
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
720
|
+
_id?: string;
|
|
721
|
+
/**
|
|
722
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
723
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
724
|
+
*/
|
|
725
|
+
entityFqdn?: string;
|
|
726
|
+
/**
|
|
727
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
728
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
729
|
+
*/
|
|
730
|
+
slug?: string;
|
|
731
|
+
/** ID of the entity associated with the event. */
|
|
732
|
+
entityId?: string;
|
|
733
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
734
|
+
eventTime?: Date | null;
|
|
735
|
+
/**
|
|
736
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
737
|
+
* (for example, GDPR).
|
|
738
|
+
*/
|
|
739
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
740
|
+
/** If present, indicates the action that triggered the event. */
|
|
741
|
+
originatedFrom?: string | null;
|
|
742
|
+
/**
|
|
743
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
744
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
745
|
+
*/
|
|
746
|
+
entityEventSequence?: string | null;
|
|
747
|
+
}
|
|
748
|
+
/** @oneof */
|
|
749
|
+
interface DomainEventBodyOneOf {
|
|
750
|
+
createdEvent?: EntityCreatedEvent;
|
|
751
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
752
|
+
deletedEvent?: EntityDeletedEvent;
|
|
753
|
+
actionEvent?: ActionEvent;
|
|
754
|
+
}
|
|
755
|
+
interface EntityCreatedEvent {
|
|
756
|
+
entity?: string;
|
|
757
|
+
}
|
|
758
|
+
interface RestoreInfo {
|
|
759
|
+
deletedDate?: Date | null;
|
|
760
|
+
}
|
|
761
|
+
interface EntityUpdatedEvent {
|
|
762
|
+
/**
|
|
763
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
764
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
765
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
766
|
+
*/
|
|
767
|
+
currentEntity?: string;
|
|
768
|
+
}
|
|
769
|
+
interface EntityDeletedEvent {
|
|
770
|
+
/** Entity that was deleted. */
|
|
771
|
+
deletedEntity?: string | null;
|
|
772
|
+
}
|
|
773
|
+
interface ActionEvent {
|
|
774
|
+
body?: string;
|
|
775
|
+
}
|
|
776
|
+
interface MessageEnvelope {
|
|
777
|
+
/**
|
|
778
|
+
* App instance ID.
|
|
779
|
+
* @format GUID
|
|
780
|
+
*/
|
|
781
|
+
instanceId?: string | null;
|
|
782
|
+
/**
|
|
783
|
+
* Event type.
|
|
784
|
+
* @maxLength 150
|
|
785
|
+
*/
|
|
786
|
+
eventType?: string;
|
|
787
|
+
/** The identification type and identity data. */
|
|
788
|
+
identity?: IdentificationData;
|
|
789
|
+
/** Stringify payload. */
|
|
790
|
+
data?: string;
|
|
791
|
+
}
|
|
792
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
793
|
+
/**
|
|
794
|
+
* ID of a site visitor that has not logged in to the site.
|
|
795
|
+
* @format GUID
|
|
796
|
+
*/
|
|
797
|
+
anonymousVisitorId?: string;
|
|
798
|
+
/**
|
|
799
|
+
* ID of a site visitor that has logged in to the site.
|
|
800
|
+
* @format GUID
|
|
801
|
+
*/
|
|
802
|
+
memberId?: string;
|
|
803
|
+
/**
|
|
804
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
805
|
+
* @format GUID
|
|
806
|
+
*/
|
|
807
|
+
wixUserId?: string;
|
|
808
|
+
/**
|
|
809
|
+
* ID of an app.
|
|
810
|
+
* @format GUID
|
|
811
|
+
*/
|
|
812
|
+
appId?: string;
|
|
813
|
+
/** @readonly */
|
|
814
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
815
|
+
}
|
|
816
|
+
/** @oneof */
|
|
817
|
+
interface IdentificationDataIdOneOf {
|
|
818
|
+
/**
|
|
819
|
+
* ID of a site visitor that has not logged in to the site.
|
|
820
|
+
* @format GUID
|
|
821
|
+
*/
|
|
822
|
+
anonymousVisitorId?: string;
|
|
823
|
+
/**
|
|
824
|
+
* ID of a site visitor that has logged in to the site.
|
|
825
|
+
* @format GUID
|
|
826
|
+
*/
|
|
827
|
+
memberId?: string;
|
|
828
|
+
/**
|
|
829
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
830
|
+
* @format GUID
|
|
831
|
+
*/
|
|
832
|
+
wixUserId?: string;
|
|
833
|
+
/**
|
|
834
|
+
* ID of an app.
|
|
835
|
+
* @format GUID
|
|
836
|
+
*/
|
|
837
|
+
appId?: string;
|
|
838
|
+
}
|
|
839
|
+
declare enum WebhookIdentityType {
|
|
840
|
+
UNKNOWN = "UNKNOWN",
|
|
841
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
842
|
+
MEMBER = "MEMBER",
|
|
843
|
+
WIX_USER = "WIX_USER",
|
|
844
|
+
APP = "APP"
|
|
845
|
+
}
|
|
846
|
+
/** @enumType */
|
|
847
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
714
848
|
interface CreateAutomationRequest {
|
|
715
849
|
/** Automation to create. */
|
|
716
850
|
automation: Automation;
|
|
@@ -1096,68 +1230,6 @@ interface ActionUsageSummary {
|
|
|
1096
1230
|
/** Number of automations that include this action. */
|
|
1097
1231
|
automationsCount?: number;
|
|
1098
1232
|
}
|
|
1099
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1100
|
-
createdEvent?: EntityCreatedEvent;
|
|
1101
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1102
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1103
|
-
actionEvent?: ActionEvent;
|
|
1104
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1105
|
-
_id?: string;
|
|
1106
|
-
/**
|
|
1107
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
1108
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
1109
|
-
*/
|
|
1110
|
-
entityFqdn?: string;
|
|
1111
|
-
/**
|
|
1112
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
1113
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1114
|
-
*/
|
|
1115
|
-
slug?: string;
|
|
1116
|
-
/** ID of the entity associated with the event. */
|
|
1117
|
-
entityId?: string;
|
|
1118
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
1119
|
-
eventTime?: Date | null;
|
|
1120
|
-
/**
|
|
1121
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
1122
|
-
* (for example, GDPR).
|
|
1123
|
-
*/
|
|
1124
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
1125
|
-
/** If present, indicates the action that triggered the event. */
|
|
1126
|
-
originatedFrom?: string | null;
|
|
1127
|
-
/**
|
|
1128
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1129
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1130
|
-
*/
|
|
1131
|
-
entityEventSequence?: string | null;
|
|
1132
|
-
}
|
|
1133
|
-
/** @oneof */
|
|
1134
|
-
interface DomainEventBodyOneOf {
|
|
1135
|
-
createdEvent?: EntityCreatedEvent;
|
|
1136
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1137
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1138
|
-
actionEvent?: ActionEvent;
|
|
1139
|
-
}
|
|
1140
|
-
interface EntityCreatedEvent {
|
|
1141
|
-
entity?: string;
|
|
1142
|
-
}
|
|
1143
|
-
interface RestoreInfo {
|
|
1144
|
-
deletedDate?: Date | null;
|
|
1145
|
-
}
|
|
1146
|
-
interface EntityUpdatedEvent {
|
|
1147
|
-
/**
|
|
1148
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1149
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1150
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1151
|
-
*/
|
|
1152
|
-
currentEntity?: string;
|
|
1153
|
-
}
|
|
1154
|
-
interface EntityDeletedEvent {
|
|
1155
|
-
/** Entity that was deleted. */
|
|
1156
|
-
deletedEntity?: string | null;
|
|
1157
|
-
}
|
|
1158
|
-
interface ActionEvent {
|
|
1159
|
-
body?: string;
|
|
1160
|
-
}
|
|
1161
1233
|
interface Empty {
|
|
1162
1234
|
}
|
|
1163
1235
|
interface CopyAutomationRequest {
|
|
@@ -1441,10 +1513,12 @@ declare enum Namespace {
|
|
|
1441
1513
|
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
1442
1514
|
MIMIR = "MIMIR",
|
|
1443
1515
|
/** Wix Twins platform. */
|
|
1444
|
-
TWINS = "TWINS"
|
|
1516
|
+
TWINS = "TWINS",
|
|
1517
|
+
/** Wix Nano. */
|
|
1518
|
+
NANO = "NANO"
|
|
1445
1519
|
}
|
|
1446
1520
|
/** @enumType */
|
|
1447
|
-
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR' | 'TWINS';
|
|
1521
|
+
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR' | 'TWINS' | 'NANO';
|
|
1448
1522
|
/** Site transferred to another user. */
|
|
1449
1523
|
interface SiteTransferred {
|
|
1450
1524
|
/**
|
|
@@ -2128,78 +2202,6 @@ interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
|
2128
2202
|
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2129
2203
|
automation?: Automation;
|
|
2130
2204
|
}
|
|
2131
|
-
interface MessageEnvelope {
|
|
2132
|
-
/**
|
|
2133
|
-
* App instance ID.
|
|
2134
|
-
* @format GUID
|
|
2135
|
-
*/
|
|
2136
|
-
instanceId?: string | null;
|
|
2137
|
-
/**
|
|
2138
|
-
* Event type.
|
|
2139
|
-
* @maxLength 150
|
|
2140
|
-
*/
|
|
2141
|
-
eventType?: string;
|
|
2142
|
-
/** The identification type and identity data. */
|
|
2143
|
-
identity?: IdentificationData;
|
|
2144
|
-
/** Stringify payload. */
|
|
2145
|
-
data?: string;
|
|
2146
|
-
}
|
|
2147
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
2148
|
-
/**
|
|
2149
|
-
* ID of a site visitor that has not logged in to the site.
|
|
2150
|
-
* @format GUID
|
|
2151
|
-
*/
|
|
2152
|
-
anonymousVisitorId?: string;
|
|
2153
|
-
/**
|
|
2154
|
-
* ID of a site visitor that has logged in to the site.
|
|
2155
|
-
* @format GUID
|
|
2156
|
-
*/
|
|
2157
|
-
memberId?: string;
|
|
2158
|
-
/**
|
|
2159
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
2160
|
-
* @format GUID
|
|
2161
|
-
*/
|
|
2162
|
-
wixUserId?: string;
|
|
2163
|
-
/**
|
|
2164
|
-
* ID of an app.
|
|
2165
|
-
* @format GUID
|
|
2166
|
-
*/
|
|
2167
|
-
appId?: string;
|
|
2168
|
-
/** @readonly */
|
|
2169
|
-
identityType?: WebhookIdentityTypeWithLiterals;
|
|
2170
|
-
}
|
|
2171
|
-
/** @oneof */
|
|
2172
|
-
interface IdentificationDataIdOneOf {
|
|
2173
|
-
/**
|
|
2174
|
-
* ID of a site visitor that has not logged in to the site.
|
|
2175
|
-
* @format GUID
|
|
2176
|
-
*/
|
|
2177
|
-
anonymousVisitorId?: string;
|
|
2178
|
-
/**
|
|
2179
|
-
* ID of a site visitor that has logged in to the site.
|
|
2180
|
-
* @format GUID
|
|
2181
|
-
*/
|
|
2182
|
-
memberId?: string;
|
|
2183
|
-
/**
|
|
2184
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
2185
|
-
* @format GUID
|
|
2186
|
-
*/
|
|
2187
|
-
wixUserId?: string;
|
|
2188
|
-
/**
|
|
2189
|
-
* ID of an app.
|
|
2190
|
-
* @format GUID
|
|
2191
|
-
*/
|
|
2192
|
-
appId?: string;
|
|
2193
|
-
}
|
|
2194
|
-
declare enum WebhookIdentityType {
|
|
2195
|
-
UNKNOWN = "UNKNOWN",
|
|
2196
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
2197
|
-
MEMBER = "MEMBER",
|
|
2198
|
-
WIX_USER = "WIX_USER",
|
|
2199
|
-
APP = "APP"
|
|
2200
|
-
}
|
|
2201
|
-
/** @enumType */
|
|
2202
|
-
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
2203
2205
|
interface GetAutomationRevisionRequest {
|
|
2204
2206
|
/**
|
|
2205
2207
|
* Automation ID.
|
|
@@ -763,6 +763,14 @@ var Origin = /* @__PURE__ */ ((Origin2) => {
|
|
|
763
763
|
Origin2["PREINSTALLED"] = "PREINSTALLED";
|
|
764
764
|
return Origin2;
|
|
765
765
|
})(Origin || {});
|
|
766
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
767
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
768
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
769
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
770
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
771
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
772
|
+
return WebhookIdentityType2;
|
|
773
|
+
})(WebhookIdentityType || {});
|
|
766
774
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
767
775
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
768
776
|
RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
|
|
@@ -822,6 +830,7 @@ var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
|
822
830
|
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
823
831
|
Namespace2["MIMIR"] = "MIMIR";
|
|
824
832
|
Namespace2["TWINS"] = "TWINS";
|
|
833
|
+
Namespace2["NANO"] = "NANO";
|
|
825
834
|
return Namespace2;
|
|
826
835
|
})(Namespace || {});
|
|
827
836
|
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
@@ -887,14 +896,6 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
887
896
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
888
897
|
return AutomationErrorType2;
|
|
889
898
|
})(AutomationErrorType || {});
|
|
890
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
891
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
892
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
893
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
894
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
895
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
896
|
-
return WebhookIdentityType2;
|
|
897
|
-
})(WebhookIdentityType || {});
|
|
898
899
|
async function createAutomation2(automation) {
|
|
899
900
|
const { httpClient, sideEffects } = arguments[1];
|
|
900
901
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|