@wix/auto_sdk_automations_automations-v-2 1.0.30 → 1.0.31
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 +8 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +134 -134
- package/build/cjs/index.typings.js +8 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.mjs +8 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +134 -134
- package/build/es/index.typings.mjs +8 -8
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.js +8 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +134 -134
- package/build/internal/cjs/index.typings.js +8 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.mjs +8 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +134 -134
- package/build/internal/es/index.typings.mjs +8 -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 {
|
|
@@ -2128,78 +2200,6 @@ interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
|
2128
2200
|
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2129
2201
|
automation?: Automation;
|
|
2130
2202
|
}
|
|
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
2203
|
interface GetAutomationRevisionRequest {
|
|
2204
2204
|
/**
|
|
2205
2205
|
* Automation ID.
|
|
@@ -701,6 +701,14 @@ var Origin = /* @__PURE__ */ ((Origin2) => {
|
|
|
701
701
|
Origin2["PREINSTALLED"] = "PREINSTALLED";
|
|
702
702
|
return Origin2;
|
|
703
703
|
})(Origin || {});
|
|
704
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
705
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
706
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
707
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
708
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
709
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
710
|
+
return WebhookIdentityType2;
|
|
711
|
+
})(WebhookIdentityType || {});
|
|
704
712
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
705
713
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
706
714
|
RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
|
|
@@ -825,14 +833,6 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
825
833
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
826
834
|
return AutomationErrorType2;
|
|
827
835
|
})(AutomationErrorType || {});
|
|
828
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
829
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
830
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
831
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
832
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
833
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
834
|
-
return WebhookIdentityType2;
|
|
835
|
-
})(WebhookIdentityType || {});
|
|
836
836
|
async function createAutomation2(automation) {
|
|
837
837
|
const { httpClient, sideEffects } = arguments[1];
|
|
838
838
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|