@wix/auto_sdk_automations_activations 1.0.0

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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/automations-v2-activation-activations.context.d.ts +14 -0
  11. package/build/cjs/src/automations-v2-activation-activations.context.js +35 -0
  12. package/build/cjs/src/automations-v2-activation-activations.context.js.map +1 -0
  13. package/build/cjs/src/automations-v2-activation-activations.http.d.ts +31 -0
  14. package/build/cjs/src/automations-v2-activation-activations.http.js +143 -0
  15. package/build/cjs/src/automations-v2-activation-activations.http.js.map +1 -0
  16. package/build/cjs/src/automations-v2-activation-activations.meta.d.ts +16 -0
  17. package/build/cjs/src/automations-v2-activation-activations.meta.js +104 -0
  18. package/build/cjs/src/automations-v2-activation-activations.meta.js.map +1 -0
  19. package/build/cjs/src/automations-v2-activation-activations.public.d.ts +74 -0
  20. package/build/cjs/src/automations-v2-activation-activations.public.js +66 -0
  21. package/build/cjs/src/automations-v2-activation-activations.public.js.map +1 -0
  22. package/build/cjs/src/automations-v2-activation-activations.types.d.ts +1592 -0
  23. package/build/cjs/src/automations-v2-activation-activations.types.js +195 -0
  24. package/build/cjs/src/automations-v2-activation-activations.types.js.map +1 -0
  25. package/build/cjs/src/automations-v2-activation-activations.universal.d.ts +1775 -0
  26. package/build/cjs/src/automations-v2-activation-activations.universal.js +423 -0
  27. package/build/cjs/src/automations-v2-activation-activations.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/automations-v2-activation-activations.context.d.ts +14 -0
  39. package/build/es/src/automations-v2-activation-activations.context.js +14 -0
  40. package/build/es/src/automations-v2-activation-activations.context.js.map +1 -0
  41. package/build/es/src/automations-v2-activation-activations.http.d.ts +31 -0
  42. package/build/es/src/automations-v2-activation-activations.http.js +136 -0
  43. package/build/es/src/automations-v2-activation-activations.http.js.map +1 -0
  44. package/build/es/src/automations-v2-activation-activations.meta.d.ts +16 -0
  45. package/build/es/src/automations-v2-activation-activations.meta.js +74 -0
  46. package/build/es/src/automations-v2-activation-activations.meta.js.map +1 -0
  47. package/build/es/src/automations-v2-activation-activations.public.d.ts +74 -0
  48. package/build/es/src/automations-v2-activation-activations.public.js +41 -0
  49. package/build/es/src/automations-v2-activation-activations.public.js.map +1 -0
  50. package/build/es/src/automations-v2-activation-activations.types.d.ts +1592 -0
  51. package/build/es/src/automations-v2-activation-activations.types.js +192 -0
  52. package/build/es/src/automations-v2-activation-activations.types.js.map +1 -0
  53. package/build/es/src/automations-v2-activation-activations.universal.d.ts +1775 -0
  54. package/build/es/src/automations-v2-activation-activations.universal.js +393 -0
  55. package/build/es/src/automations-v2-activation-activations.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/automations-v2-activation-activations.context.d.ts +14 -0
  66. package/build/internal/cjs/src/automations-v2-activation-activations.context.js +35 -0
  67. package/build/internal/cjs/src/automations-v2-activation-activations.context.js.map +1 -0
  68. package/build/internal/cjs/src/automations-v2-activation-activations.http.d.ts +31 -0
  69. package/build/internal/cjs/src/automations-v2-activation-activations.http.js +143 -0
  70. package/build/internal/cjs/src/automations-v2-activation-activations.http.js.map +1 -0
  71. package/build/internal/cjs/src/automations-v2-activation-activations.meta.d.ts +16 -0
  72. package/build/internal/cjs/src/automations-v2-activation-activations.meta.js +104 -0
  73. package/build/internal/cjs/src/automations-v2-activation-activations.meta.js.map +1 -0
  74. package/build/internal/cjs/src/automations-v2-activation-activations.public.d.ts +74 -0
  75. package/build/internal/cjs/src/automations-v2-activation-activations.public.js +66 -0
  76. package/build/internal/cjs/src/automations-v2-activation-activations.public.js.map +1 -0
  77. package/build/internal/cjs/src/automations-v2-activation-activations.types.d.ts +1592 -0
  78. package/build/internal/cjs/src/automations-v2-activation-activations.types.js +195 -0
  79. package/build/internal/cjs/src/automations-v2-activation-activations.types.js.map +1 -0
  80. package/build/internal/cjs/src/automations-v2-activation-activations.universal.d.ts +1775 -0
  81. package/build/internal/cjs/src/automations-v2-activation-activations.universal.js +423 -0
  82. package/build/internal/cjs/src/automations-v2-activation-activations.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/automations-v2-activation-activations.context.d.ts +14 -0
  93. package/build/internal/es/src/automations-v2-activation-activations.context.js +14 -0
  94. package/build/internal/es/src/automations-v2-activation-activations.context.js.map +1 -0
  95. package/build/internal/es/src/automations-v2-activation-activations.http.d.ts +31 -0
  96. package/build/internal/es/src/automations-v2-activation-activations.http.js +136 -0
  97. package/build/internal/es/src/automations-v2-activation-activations.http.js.map +1 -0
  98. package/build/internal/es/src/automations-v2-activation-activations.meta.d.ts +16 -0
  99. package/build/internal/es/src/automations-v2-activation-activations.meta.js +74 -0
  100. package/build/internal/es/src/automations-v2-activation-activations.meta.js.map +1 -0
  101. package/build/internal/es/src/automations-v2-activation-activations.public.d.ts +74 -0
  102. package/build/internal/es/src/automations-v2-activation-activations.public.js +41 -0
  103. package/build/internal/es/src/automations-v2-activation-activations.public.js.map +1 -0
  104. package/build/internal/es/src/automations-v2-activation-activations.types.d.ts +1592 -0
  105. package/build/internal/es/src/automations-v2-activation-activations.types.js +192 -0
  106. package/build/internal/es/src/automations-v2-activation-activations.types.js.map +1 -0
  107. package/build/internal/es/src/automations-v2-activation-activations.universal.d.ts +1775 -0
  108. package/build/internal/es/src/automations-v2-activation-activations.universal.js +393 -0
  109. package/build/internal/es/src/automations-v2-activation-activations.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,136 @@
1
+ import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
2
+ function resolveWixAutomationsEsbResolverV1EsbConfigResolverUrl(opts) {
3
+ const domainToMappings = {
4
+ 'manage._base_domain_': [
5
+ {
6
+ srcPath: '/_api/esb-config-resolver',
7
+ destPath: '',
8
+ },
9
+ ],
10
+ 'www.wixapis.com': [
11
+ {
12
+ srcPath: '/automations/v1/events/report',
13
+ destPath: '/v1/events/report',
14
+ },
15
+ {
16
+ srcPath: '/automations/v1/events/bulk-report',
17
+ destPath: '/v1/events/bulk-report',
18
+ },
19
+ {
20
+ srcPath: '/automations/v1/events/cancel',
21
+ destPath: '/v1/events/cancel',
22
+ },
23
+ {
24
+ srcPath: '/automations/v1/events/bulk-cancel',
25
+ destPath: '/v1/events/bulk-cancel',
26
+ },
27
+ ],
28
+ 'platform.rise.ai': [
29
+ {
30
+ srcPath: '/workflows/v1/events/report',
31
+ destPath: '/v1/events/report',
32
+ },
33
+ ],
34
+ };
35
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
36
+ }
37
+ const PACKAGE_NAME = '@wix/auto_sdk_automations_activations';
38
+ /**
39
+ * Reports an event and activates site automations with the specified trigger key.
40
+ *
41
+ *
42
+ * Only the app that created a trigger can report events for it.
43
+ * This means other apps can't report events for your triggers,
44
+ * and you can't report events for another app's triggers.
45
+ *
46
+ * If your app supports canceling events,
47
+ * `externalEntityId` must be provided.
48
+ * `externalEntityId` is required when calling [cancelEvent()](#cancel-event).
49
+ */
50
+ export function reportEvent(payload) {
51
+ function __reportEvent({ host }) {
52
+ const metadata = {
53
+ entityFqdn: 'wix.automations.v2.activation',
54
+ method: 'POST',
55
+ methodFqn: 'wix.automations.esb.resolver.v1.EsbConfigResolver.ReportEvent',
56
+ packageName: PACKAGE_NAME,
57
+ url: resolveWixAutomationsEsbResolverV1EsbConfigResolverUrl({
58
+ protoPath: '/v1/events/report',
59
+ data: payload,
60
+ host,
61
+ }),
62
+ data: payload,
63
+ };
64
+ return metadata;
65
+ }
66
+ return __reportEvent;
67
+ }
68
+ /** Bulk reports events and activates site automations with the specified trigger key. */
69
+ export function bulkReportEvent(payload) {
70
+ function __bulkReportEvent({ host }) {
71
+ const metadata = {
72
+ entityFqdn: 'wix.automations.v2.activation',
73
+ method: 'POST',
74
+ methodFqn: 'wix.automations.esb.resolver.v1.EsbConfigResolver.BulkReportEvent',
75
+ packageName: PACKAGE_NAME,
76
+ url: resolveWixAutomationsEsbResolverV1EsbConfigResolverUrl({
77
+ protoPath: '/v1/events/bulk-report',
78
+ data: payload,
79
+ host,
80
+ }),
81
+ data: payload,
82
+ };
83
+ return metadata;
84
+ }
85
+ return __bulkReportEvent;
86
+ }
87
+ /** Bulk cancels any remaining actions for a trigger and external entities. */
88
+ export function bulkCancelEvent(payload) {
89
+ function __bulkCancelEvent({ host }) {
90
+ const metadata = {
91
+ entityFqdn: 'wix.automations.v2.activation',
92
+ method: 'POST',
93
+ methodFqn: 'wix.automations.esb.resolver.v1.EsbConfigResolver.BulkCancelEvent',
94
+ packageName: PACKAGE_NAME,
95
+ url: resolveWixAutomationsEsbResolverV1EsbConfigResolverUrl({
96
+ protoPath: '/v1/events/bulk-cancel',
97
+ data: payload,
98
+ host,
99
+ }),
100
+ data: payload,
101
+ };
102
+ return metadata;
103
+ }
104
+ return __bulkCancelEvent;
105
+ }
106
+ /**
107
+ * Cancels any remaining actions for a trigger and external entity.
108
+ *
109
+ *
110
+ * Events are not cancelable by default.
111
+ * To make an event cancelable,
112
+ * you must first pass an `externalEntityId`
113
+ * and the applicable `triggerKey` to [reportEvent()](#report-event).
114
+ * When you call cancelEvent() with the same `externalEntityId` and `triggerKey`,
115
+ * the event is canceled,
116
+ * as are all other events that share the `externalEntityId` and `triggerKey`.
117
+ */
118
+ export function cancelEvent(payload) {
119
+ function __cancelEvent({ host }) {
120
+ const metadata = {
121
+ entityFqdn: 'wix.automations.v2.activation',
122
+ method: 'POST',
123
+ methodFqn: 'wix.automations.esb.resolver.v1.EsbConfigResolver.CancelEvent',
124
+ packageName: PACKAGE_NAME,
125
+ url: resolveWixAutomationsEsbResolverV1EsbConfigResolverUrl({
126
+ protoPath: '/v1/events/cancel',
127
+ data: payload,
128
+ host,
129
+ }),
130
+ data: payload,
131
+ };
132
+ return metadata;
133
+ }
134
+ return __cancelEvent;
135
+ }
136
+ //# sourceMappingURL=automations-v2-activation-activations.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations-v2-activation-activations.http.js","sourceRoot":"","sources":["../../../src/automations-v2-activation-activations.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,sDAAsD,CAC7D,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,EAAE;aACb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AE,sDAAsD,CAAC;gBAC1D,SAAS,EAAE,wBAAwB;gBACnC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,+BAA+B;YAC3C,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,mEAAmE;YACrE,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,sDAAsD,CAAC;gBAC1D,SAAS,EAAE,wBAAwB;gBACnC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,SAAS,aAAa,CAAC,EAAE,IAAI,EAAO;QAClC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,+BAA+B;YAC3C,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,+DAA+D;YACjE,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,sDAAsD,CAAC;gBAC1D,SAAS,EAAE,mBAAmB;gBAC9B,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as ambassadorWixAutomationsV2ActivationTypes from './automations-v2-activation-activations.types.js';
2
+ import * as ambassadorWixAutomationsV2ActivationUniversalTypes from './automations-v2-activation-activations.universal.js';
3
+ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4
+ getUrl: (context: any) => string;
5
+ httpMethod: K;
6
+ path: string;
7
+ pathParams: M;
8
+ __requestType: T;
9
+ __originalRequestType: S;
10
+ __responseType: Q;
11
+ __originalResponseType: R;
12
+ };
13
+ export declare function reportEvent(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixAutomationsV2ActivationUniversalTypes.ReportEventRequest, ambassadorWixAutomationsV2ActivationTypes.ReportEventRequest, ambassadorWixAutomationsV2ActivationUniversalTypes.ReportEventResponse & ambassadorWixAutomationsV2ActivationUniversalTypes.ReportEventResponseNonNullableFields, ambassadorWixAutomationsV2ActivationTypes.ReportEventResponse & ambassadorWixAutomationsV2ActivationTypes.ReportEventResponseNonNullableFields>;
14
+ export declare function bulkReportEvent(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixAutomationsV2ActivationUniversalTypes.BulkReportEventRequest, ambassadorWixAutomationsV2ActivationTypes.BulkReportEventRequest, ambassadorWixAutomationsV2ActivationUniversalTypes.BulkReportEventResponse & ambassadorWixAutomationsV2ActivationUniversalTypes.BulkReportEventResponseNonNullableFields, ambassadorWixAutomationsV2ActivationTypes.BulkReportEventResponse & ambassadorWixAutomationsV2ActivationTypes.BulkReportEventResponseNonNullableFields>;
15
+ export declare function bulkCancelEvent(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixAutomationsV2ActivationUniversalTypes.BulkCancelEventRequest, ambassadorWixAutomationsV2ActivationTypes.BulkCancelEventRequest, ambassadorWixAutomationsV2ActivationUniversalTypes.BulkCancelEventResponse & ambassadorWixAutomationsV2ActivationUniversalTypes.BulkCancelEventResponseNonNullableFields, ambassadorWixAutomationsV2ActivationTypes.BulkCancelEventResponse & ambassadorWixAutomationsV2ActivationTypes.BulkCancelEventResponseNonNullableFields>;
16
+ export declare function cancelEvent(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixAutomationsV2ActivationUniversalTypes.CancelEventRequest, ambassadorWixAutomationsV2ActivationTypes.CancelEventRequest, ambassadorWixAutomationsV2ActivationUniversalTypes.CancelEventResponse, ambassadorWixAutomationsV2ActivationTypes.CancelEventResponse>;
@@ -0,0 +1,74 @@
1
+ import * as ambassadorWixAutomationsV2Activation from './automations-v2-activation-activations.http.js';
2
+ export function reportEvent() {
3
+ const payload = {};
4
+ const getRequestOptions = ambassadorWixAutomationsV2Activation.reportEvent(payload);
5
+ const getUrl = (context) => {
6
+ const { url } = getRequestOptions(context);
7
+ return url;
8
+ };
9
+ return {
10
+ getUrl,
11
+ httpMethod: 'POST',
12
+ path: '/v1/events/report',
13
+ pathParams: {},
14
+ __requestType: null,
15
+ __originalRequestType: null,
16
+ __responseType: null,
17
+ __originalResponseType: null,
18
+ };
19
+ }
20
+ export function bulkReportEvent() {
21
+ const payload = {};
22
+ const getRequestOptions = ambassadorWixAutomationsV2Activation.bulkReportEvent(payload);
23
+ const getUrl = (context) => {
24
+ const { url } = getRequestOptions(context);
25
+ return url;
26
+ };
27
+ return {
28
+ getUrl,
29
+ httpMethod: 'POST',
30
+ path: '/v1/events/bulk-report',
31
+ pathParams: {},
32
+ __requestType: null,
33
+ __originalRequestType: null,
34
+ __responseType: null,
35
+ __originalResponseType: null,
36
+ };
37
+ }
38
+ export function bulkCancelEvent() {
39
+ const payload = {};
40
+ const getRequestOptions = ambassadorWixAutomationsV2Activation.bulkCancelEvent(payload);
41
+ const getUrl = (context) => {
42
+ const { url } = getRequestOptions(context);
43
+ return url;
44
+ };
45
+ return {
46
+ getUrl,
47
+ httpMethod: 'POST',
48
+ path: '/v1/events/bulk-cancel',
49
+ pathParams: {},
50
+ __requestType: null,
51
+ __originalRequestType: null,
52
+ __responseType: null,
53
+ __originalResponseType: null,
54
+ };
55
+ }
56
+ export function cancelEvent() {
57
+ const payload = {};
58
+ const getRequestOptions = ambassadorWixAutomationsV2Activation.cancelEvent(payload);
59
+ const getUrl = (context) => {
60
+ const { url } = getRequestOptions(context);
61
+ return url;
62
+ };
63
+ return {
64
+ getUrl,
65
+ httpMethod: 'POST',
66
+ path: '/v1/events/cancel',
67
+ pathParams: {},
68
+ __requestType: null,
69
+ __originalRequestType: null,
70
+ __responseType: null,
71
+ __originalResponseType: null,
72
+ };
73
+ }
74
+ //# sourceMappingURL=automations-v2-activation-activations.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations-v2-activation-activations.meta.js","sourceRoot":"","sources":["../../../src/automations-v2-activation-activations.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,oCAAoC,MAAM,iDAAiD,CAAC;AAsBxG,MAAM,UAAU,WAAW;IAUzB,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,oCAAoC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAE5D,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe;IAU7B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,oCAAoC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEhE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,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ition, HttpClient } from '@wix/sdk-types';
2
+ import { ActivationStatusChangedEnvelope, BulkCancelEventResponse, BulkCancelEventResponseNonNullableFields, BulkReportEventResponse, BulkReportEventResponseNonNullableFields, EventInfo, ReportEventOptions, ReportEventResponse, ReportEventResponseNonNullableFields } from './automations-v2-activation-activations.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function reportEvent(httpClient: HttpClient): ReportEventSignature;
7
+ interface ReportEventSignature {
8
+ /**
9
+ * Reports an event and activates site automations with the specified trigger key.
10
+ *
11
+ *
12
+ * Only the app that created a trigger can report events for it.
13
+ * This means other apps can't report events for your triggers,
14
+ * and you can't report events for another app's triggers.
15
+ *
16
+ * If your app supports canceling events,
17
+ * `externalEntityId` must be provided.
18
+ * `externalEntityId` is required when calling [cancelEvent()](#cancel-event).
19
+ * @param - Trigger key as defined in your app's trigger configuration
20
+ * in the app dashboard.
21
+ * For example, `form_submitted` or `invoice_due`.
22
+ */
23
+ (triggerKey: string, options?: ReportEventOptions | undefined): Promise<ReportEventResponse & ReportEventResponseNonNullableFields>;
24
+ }
25
+ export declare function bulkReportEvent(httpClient: HttpClient): BulkReportEventSignature;
26
+ interface BulkReportEventSignature {
27
+ /**
28
+ * Bulk reports events and activates site automations with the specified trigger key.
29
+ * @param - Trigger key as defined in your app's trigger configuration
30
+ * in the app dashboard.
31
+ * For example, `form_submitted` or `invoice_due`.
32
+ * @param - Repeated list of event details for bulk reporting.
33
+ */
34
+ (triggerKey: string, eventsInfo: EventInfo[]): Promise<BulkReportEventResponse & BulkReportEventResponseNonNullableFields>;
35
+ }
36
+ export declare function bulkCancelEvent(httpClient: HttpClient): BulkCancelEventSignature;
37
+ interface BulkCancelEventSignature {
38
+ /**
39
+ * Bulk cancels any remaining actions for a trigger and external entities.
40
+ * @param - Trigger key whose events you want to cancel.
41
+ * For example, `form_submitted` or `invoice_due`.
42
+ * @param - Repeated list of external_entity_id, representing the related resources' IDs.
43
+ */
44
+ (triggerKey: string, externalEntityIds: string[]): Promise<BulkCancelEventResponse & BulkCancelEventResponseNonNullableFields>;
45
+ }
46
+ export declare function cancelEvent(httpClient: HttpClient): CancelEventSignature;
47
+ interface CancelEventSignature {
48
+ /**
49
+ * Cancels any remaining actions for a trigger and external entity.
50
+ *
51
+ *
52
+ * Events are not cancelable by default.
53
+ * To make an event cancelable,
54
+ * you must first pass an `externalEntityId`
55
+ * and the applicable `triggerKey` to [reportEvent()](#report-event).
56
+ * When you call cancelEvent() with the same `externalEntityId` and `triggerKey`,
57
+ * the event is canceled,
58
+ * as are all other events that share the `externalEntityId` and `triggerKey`.
59
+ * @param - Trigger key whose event you want to cancel.
60
+ * For example, `form_submitted` or `invoice_due`.
61
+ * @param - ID of the related resource in GUID format.
62
+ * For example, `fc81a355-3429-50fc-a4c7-def486e828f3`.
63
+ *
64
+ * Typically, this ID is defined in your system,
65
+ * but you can also use any Wix resource GUID,
66
+ * such as contact ID, member ID, or invoice ID.
67
+ * See
68
+ * [Choose the right `externalEntityId`](https://dev.wix.com/docs/rest/business-management/automations/triggered-events/reporting-and-canceling-events#choose-the-right-externalentityid)
69
+ * for more information.
70
+ */
71
+ (triggerKey: string, externalEntityId: string): Promise<void>;
72
+ }
73
+ export declare const onActivationStatusChanged: EventDefinition<ActivationStatusChangedEnvelope, "wix.automations.v2.activation_activation_status_changed">;
74
+ export { Action, ActionActionOneOf, ActionCompletedRequest, ActionData, ActionEvent, ActionSettings, ActionStatus, ActionsData, Activation, ActivationActionStatusChanged, ActivationActionStatusChangedInfoOneOf, ActivationActionStatusChangedStatus, ActivationActionStatusChangedStatusInfoOneOf, ActivationContinuedAfterSchedule, ActivationRequest, ActivationResumeAfterDelay, ActivationScheduleCompleted, ActivationScheduleRequested, ActivationSource, ActivationSourceOfOneOf, ActivationStatus, ActivationStatusChanged, ActivationStatusChangedEnvelope, ActivationStatusChangedFailedStatusInfo, ActivationStatusChangedStartedStatusInfo, ActivationStatusChangedStatus, ActivationStatusChangedStatusInfoOneOf, AppDefinedAction, AppDefinedActionInfo, ApplicationError, ApplicationOrigin, AsyncAction, AuditInfo, AuditInfoIdOneOf, Automation, AutomationConfiguration, AutomationConfigurationAction, AutomationConfigurationActionInfoOneOf, AutomationConfigurationStatus, AutomationIdentifier, AutomationInfo, AutomationInfoOriginInfoOneOf, AutomationInfoTriggerInfo, AutomationOriginInfoOneOf, AutomationSettings, BaseEventMetadata, BatchActivationRequest, BlockType, BulkActionMetadata, BulkCancelEventRequest, BulkCancelEventResponse, BulkCancelEventResponseNonNullableFields, BulkCancelEventResult, BulkReportEventRequest, BulkReportEventResponse, BulkReportEventResponseNonNullableFields, BulkReportEventResult, CancelEventRequest, CancelEventResponse, CancelPendingScheduleRequest, CancelPendingScheduleRequestByOneOf, CancelPendingScheduleResponse, CancellationReason, CancelledStatusInfo, Case, ConditionAction, ConditionActionInfo, ConditionBlock, ConditionExpressionGroup, ConditionFilter, Delay, DelayAction, DelayActionInfo, DelayHelper, DelayOfOneOf, Domain, DomainEvent, DomainEventBodyOneOf, DraftInfo, Empty, EndedStatusInfo, EndedStatusInfoAppDefinedActionInfo, EndedStatusInfoTypeInfoOneOf, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ErrorReason, EventInfo, EventMetadata, ExecuteFromActionRequest, ExecuteFromActionResponse, ExpressionEvaluationResult, ExtendedFields, FailedStatusInfo, Filter, FutureDateActivationOffset, Idempotency, IdentificationData, IdentificationDataIdOneOf, IdentifierType, Identity, IfFilter, InitiatedStatusInfo, ItemMetadata, MessageEnvelope, Operator, Origin, Output, OutputAction, PreinstalledIdentifier, PreinstalledOrigin, RateLimit, RateLimitAction, RateLimitActionInfo, RateLimiting, RefreshPayloadRequest, RefreshPayloadResponse, ReportDomainEventRequest, ReportDomainEventResponse, ReportEventOptions, ReportEventRequest, ReportEventResponse, ReportEventResponseNonNullableFields, RestoreInfo, RunAutomationRequest, RunAutomationResponse, Runtime, Schedule, ScheduleActivationRequested, ScheduleRequest, ScheduleResponse, ScheduleStatus, ScheduledAction, ScheduledStatusInfo, Scheduler, Service, ServiceMapping, SetVariables, SetVariablesAction, SetVariablesActionInfo, SimpleDelay, SkipReason, SkippedStatusInfo, SpiAction, StartedStatusInfo, StartedStatusInfoAppDefinedActionInfo, StartedStatusInfoDelayActionInfo, StartedStatusInfoTypeInfoOneOf, Status, SwitchFilter, SystemHelper, SystemHelperHelperOneOf, Target, TimeUnit, Trigger, TriggerInfo, Type, Units, UpdatePendingSchedulesPayloadRequest, UpdatePendingSchedulesPayloadResponse, V1RunAutomationRequest, V1RunAutomationRequestIdentifierOneOf, V1RunAutomationResponse, WebhookIdentityType, } from './automations-v2-activation-activations.universal.js';
@@ -0,0 +1,41 @@
1
+ import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';
2
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
3
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
4
+ import { EventDefinition } from '@wix/sdk-types';
5
+ import { bulkCancelEvent as universalBulkCancelEvent, bulkReportEvent as universalBulkReportEvent, cancelEvent as universalCancelEvent, reportEvent as universalReportEvent, } from './automations-v2-activation-activations.universal.js';
6
+ export const __metadata = { PACKAGE_NAME: '@wix/automations' };
7
+ export function reportEvent(httpClient) {
8
+ return (triggerKey, options) => universalReportEvent(triggerKey, options,
9
+ // @ts-ignore
10
+ { httpClient });
11
+ }
12
+ export function bulkReportEvent(httpClient) {
13
+ return (triggerKey, eventsInfo) => universalBulkReportEvent(triggerKey, eventsInfo,
14
+ // @ts-ignore
15
+ { httpClient });
16
+ }
17
+ export function bulkCancelEvent(httpClient) {
18
+ return (triggerKey, externalEntityIds) => universalBulkCancelEvent(triggerKey, externalEntityIds,
19
+ // @ts-ignore
20
+ { httpClient });
21
+ }
22
+ export function cancelEvent(httpClient) {
23
+ return (triggerKey, externalEntityId) => universalCancelEvent(triggerKey, externalEntityId,
24
+ // @ts-ignore
25
+ { httpClient });
26
+ }
27
+ export const onActivationStatusChanged = EventDefinition('wix.automations.v2.activation_activation_status_changed', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
28
+ {
29
+ transformFn: transformRESTTimestampToSDKTimestamp,
30
+ paths: [
31
+ { path: 'data.statusChangedDate' },
32
+ { path: 'data.scheduledInfo.date' },
33
+ { path: 'data.activation.automation.createdDate' },
34
+ { path: 'data.activation.automation.updatedDate' },
35
+ { path: 'data.activation.automation.draftUpdatedDate' },
36
+ { path: 'metadata.eventTime' },
37
+ ],
38
+ },
39
+ ])))();
40
+ export { ActivationActionStatusChangedStatus, ActivationStatusChangedStatus, AutomationConfigurationStatus, BlockType, CancellationReason, Domain, ErrorReason, IdentifierType, Operator, Origin, ScheduleStatus, SkipReason, Status, Target, TimeUnit, Type, Units, WebhookIdentityType, } from './automations-v2-activation-activations.universal.js';
41
+ //# sourceMappingURL=automations-v2-activation-activations.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations-v2-activation-activations.public.js","sourceRoot":"","sources":["../../../src/automations-v2-activation-activations.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAUL,eAAe,IAAI,wBAAwB,EAC3C,eAAe,IAAI,wBAAwB,EAC3C,WAAW,IAAI,oBAAoB,EACnC,WAAW,IAAI,oBAAoB,GACpC,MAAM,sDAAsD,CAAC;AAE9D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAE/D,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,UAAkB,EAAE,OAA4B,EAAE,EAAE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