@wix/auto_sdk_automations_automations-v-2 1.0.29 → 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 +142 -142
- package/build/cjs/index.typings.js +8 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -7
- package/build/es/index.mjs +8 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +142 -142
- package/build/es/index.typings.mjs +8 -8
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +7 -7
- 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 +142 -142
- package/build/internal/cjs/index.typings.js +8 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +7 -7
- 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 +142 -142
- package/build/internal/es/index.typings.mjs +8 -8
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +7 -7
- package/package.json +2 -2
|
@@ -347,7 +347,7 @@ interface AppDefinedAction {
|
|
|
347
347
|
skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
|
|
348
348
|
/**
|
|
349
349
|
* IDs of actions that run in parallel after the action completes.
|
|
350
|
-
* @maxSize
|
|
350
|
+
* @maxSize 1
|
|
351
351
|
* @format GUID
|
|
352
352
|
*/
|
|
353
353
|
postActionIds?: string[];
|
|
@@ -363,13 +363,13 @@ interface ConditionAction {
|
|
|
363
363
|
orExpressionGroups?: ConditionExpressionGroup[];
|
|
364
364
|
/**
|
|
365
365
|
* IDs of actions to run when the condition evaluates to `true`.
|
|
366
|
-
* @maxSize
|
|
366
|
+
* @maxSize 1
|
|
367
367
|
* @format GUID
|
|
368
368
|
*/
|
|
369
369
|
truePostActionIds?: string[];
|
|
370
370
|
/**
|
|
371
371
|
* IDs of actions to run when the condition evaluates to `false`.
|
|
372
|
-
* @maxSize
|
|
372
|
+
* @maxSize 1
|
|
373
373
|
* @format GUID
|
|
374
374
|
*/
|
|
375
375
|
falsePostActionIds?: string[];
|
|
@@ -379,13 +379,13 @@ interface CodeConditionAction {
|
|
|
379
379
|
snippet?: CodeSnippet;
|
|
380
380
|
/**
|
|
381
381
|
* IDs of actions to run when the condition evaluates to `true`.
|
|
382
|
-
* @maxSize
|
|
382
|
+
* @maxSize 1
|
|
383
383
|
* @format GUID
|
|
384
384
|
*/
|
|
385
385
|
truePostActionIds?: string[];
|
|
386
386
|
/**
|
|
387
387
|
* IDs of actions to run when the condition evaluates to `false`.
|
|
388
|
-
* @maxSize
|
|
388
|
+
* @maxSize 1
|
|
389
389
|
* @format GUID
|
|
390
390
|
*/
|
|
391
391
|
falsePostActionIds?: string[];
|
|
@@ -422,7 +422,7 @@ interface DelayAction {
|
|
|
422
422
|
dueDateExpression?: string | null;
|
|
423
423
|
/**
|
|
424
424
|
* IDs of actions to run in parallel after the time delay.
|
|
425
|
-
* @maxSize
|
|
425
|
+
* @maxSize 1
|
|
426
426
|
* @format GUID
|
|
427
427
|
*/
|
|
428
428
|
postActionIds?: string[];
|
|
@@ -450,7 +450,7 @@ interface RateLimitAction {
|
|
|
450
450
|
uniqueIdentifierExpression?: string | null;
|
|
451
451
|
/**
|
|
452
452
|
* IDs of actions to run in parallel after the action completes.
|
|
453
|
-
* @maxSize
|
|
453
|
+
* @maxSize 1
|
|
454
454
|
* @format GUID
|
|
455
455
|
*/
|
|
456
456
|
postActionIds?: string[];
|
|
@@ -466,7 +466,7 @@ interface SetVariablesAction {
|
|
|
466
466
|
outputSchema?: Record<string, any> | null;
|
|
467
467
|
/**
|
|
468
468
|
* IDs of actions to run in parallel after variable initialization.
|
|
469
|
-
* @maxSize
|
|
469
|
+
* @maxSize 1
|
|
470
470
|
* @format GUID
|
|
471
471
|
*/
|
|
472
472
|
postActionIds?: string[];
|
|
@@ -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.
|
|
@@ -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";
|
|
@@ -887,14 +895,6 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
887
895
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
888
896
|
return AutomationErrorType2;
|
|
889
897
|
})(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
898
|
async function createAutomation2(automation) {
|
|
899
899
|
const { httpClient, sideEffects } = arguments[1];
|
|
900
900
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|