@wix/auto_sdk_events_notifications 1.0.21 → 1.0.22

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 (133) hide show
  1. package/build/{internal/cjs/src/events-notifications-v2-notification-config-notifications.universal.d.ts → events-notifications-v2-notification-config-notifications.universal-D-36kOt1.d.mts} +326 -430
  2. package/build/{cjs/src/events-notifications-v2-notification-config-notifications.universal.d.ts → events-notifications-v2-notification-config-notifications.universal-D-36kOt1.d.ts} +326 -430
  3. package/build/index.d.mts +39 -0
  4. package/build/index.d.ts +39 -0
  5. package/build/index.js +858 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +779 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/events-notifications-v2-notification-config-notifications.universal.d.ts → events-notifications-v2-notification-config-notifications.universal-D-36kOt1.d.mts} +326 -430
  10. package/build/{es/src/events-notifications-v2-notification-config-notifications.universal.d.ts → internal/events-notifications-v2-notification-config-notifications.universal-D-36kOt1.d.ts} +326 -430
  11. package/build/internal/index.d.mts +39 -0
  12. package/build/internal/index.d.ts +39 -0
  13. package/build/internal/index.js +858 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +779 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +267 -0
  18. package/build/internal/meta.d.ts +267 -0
  19. package/build/internal/meta.js +258 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +229 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +267 -0
  24. package/build/meta.d.ts +267 -0
  25. package/build/meta.js +258 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +229 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/events-notifications-v2-notification-config-notifications.context.d.ts +0 -14
  40. package/build/cjs/src/events-notifications-v2-notification-config-notifications.context.js +0 -69
  41. package/build/cjs/src/events-notifications-v2-notification-config-notifications.context.js.map +0 -1
  42. package/build/cjs/src/events-notifications-v2-notification-config-notifications.http.d.ts +0 -7
  43. package/build/cjs/src/events-notifications-v2-notification-config-notifications.http.js +0 -168
  44. package/build/cjs/src/events-notifications-v2-notification-config-notifications.http.js.map +0 -1
  45. package/build/cjs/src/events-notifications-v2-notification-config-notifications.meta.d.ts +0 -19
  46. package/build/cjs/src/events-notifications-v2-notification-config-notifications.meta.js +0 -87
  47. package/build/cjs/src/events-notifications-v2-notification-config-notifications.meta.js.map +0 -1
  48. package/build/cjs/src/events-notifications-v2-notification-config-notifications.public.d.ts +0 -31
  49. package/build/cjs/src/events-notifications-v2-notification-config-notifications.public.js +0 -101
  50. package/build/cjs/src/events-notifications-v2-notification-config-notifications.public.js.map +0 -1
  51. package/build/cjs/src/events-notifications-v2-notification-config-notifications.types.d.ts +0 -3737
  52. package/build/cjs/src/events-notifications-v2-notification-config-notifications.types.js +0 -571
  53. package/build/cjs/src/events-notifications-v2-notification-config-notifications.types.js.map +0 -1
  54. package/build/cjs/src/events-notifications-v2-notification-config-notifications.universal.js +0 -732
  55. package/build/cjs/src/events-notifications-v2-notification-config-notifications.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/src/events-notifications-v2-notification-config-notifications.context.d.ts +0 -14
  66. package/build/es/src/events-notifications-v2-notification-config-notifications.context.js +0 -14
  67. package/build/es/src/events-notifications-v2-notification-config-notifications.context.js.map +0 -1
  68. package/build/es/src/events-notifications-v2-notification-config-notifications.http.d.ts +0 -7
  69. package/build/es/src/events-notifications-v2-notification-config-notifications.http.js +0 -162
  70. package/build/es/src/events-notifications-v2-notification-config-notifications.http.js.map +0 -1
  71. package/build/es/src/events-notifications-v2-notification-config-notifications.meta.d.ts +0 -19
  72. package/build/es/src/events-notifications-v2-notification-config-notifications.meta.js +0 -58
  73. package/build/es/src/events-notifications-v2-notification-config-notifications.meta.js.map +0 -1
  74. package/build/es/src/events-notifications-v2-notification-config-notifications.public.d.ts +0 -31
  75. package/build/es/src/events-notifications-v2-notification-config-notifications.public.js +0 -43
  76. package/build/es/src/events-notifications-v2-notification-config-notifications.public.js.map +0 -1
  77. package/build/es/src/events-notifications-v2-notification-config-notifications.types.d.ts +0 -3737
  78. package/build/es/src/events-notifications-v2-notification-config-notifications.types.js +0 -567
  79. package/build/es/src/events-notifications-v2-notification-config-notifications.types.js.map +0 -1
  80. package/build/es/src/events-notifications-v2-notification-config-notifications.universal.js +0 -702
  81. package/build/es/src/events-notifications-v2-notification-config-notifications.universal.js.map +0 -1
  82. package/build/internal/cjs/index.d.ts +0 -1
  83. package/build/internal/cjs/index.js +0 -18
  84. package/build/internal/cjs/index.js.map +0 -1
  85. package/build/internal/cjs/index.typings.d.ts +0 -1
  86. package/build/internal/cjs/index.typings.js +0 -18
  87. package/build/internal/cjs/index.typings.js.map +0 -1
  88. package/build/internal/cjs/meta.d.ts +0 -1
  89. package/build/internal/cjs/meta.js +0 -18
  90. package/build/internal/cjs/meta.js.map +0 -1
  91. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.context.d.ts +0 -14
  92. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.context.js +0 -69
  93. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.context.js.map +0 -1
  94. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.http.d.ts +0 -7
  95. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.http.js +0 -168
  96. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.http.js.map +0 -1
  97. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.meta.d.ts +0 -19
  98. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.meta.js +0 -87
  99. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.meta.js.map +0 -1
  100. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.public.d.ts +0 -31
  101. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.public.js +0 -101
  102. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.public.js.map +0 -1
  103. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.types.d.ts +0 -3737
  104. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.types.js +0 -571
  105. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.types.js.map +0 -1
  106. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.universal.js +0 -732
  107. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.universal.js.map +0 -1
  108. package/build/internal/es/index.d.ts +0 -1
  109. package/build/internal/es/index.js +0 -2
  110. package/build/internal/es/index.js.map +0 -1
  111. package/build/internal/es/index.typings.d.ts +0 -1
  112. package/build/internal/es/index.typings.js +0 -2
  113. package/build/internal/es/index.typings.js.map +0 -1
  114. package/build/internal/es/meta.d.ts +0 -1
  115. package/build/internal/es/meta.js +0 -2
  116. package/build/internal/es/meta.js.map +0 -1
  117. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.context.d.ts +0 -14
  118. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.context.js +0 -14
  119. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.context.js.map +0 -1
  120. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.http.d.ts +0 -7
  121. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.http.js +0 -162
  122. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.http.js.map +0 -1
  123. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.meta.d.ts +0 -19
  124. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.meta.js +0 -58
  125. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.meta.js.map +0 -1
  126. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.public.d.ts +0 -31
  127. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.public.js +0 -43
  128. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.public.js.map +0 -1
  129. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.types.d.ts +0 -3737
  130. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.types.js +0 -567
  131. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.types.js.map +0 -1
  132. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.universal.js +0 -702
  133. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.universal.js.map +0 -1
package/build/index.js ADDED
@@ -0,0 +1,858 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ Alignment: () => Alignment,
24
+ AppType: () => AppType,
25
+ BackgroundType: () => BackgroundType,
26
+ ButtonDataType: () => ButtonDataType,
27
+ ConferenceType: () => ConferenceType,
28
+ Crop: () => Crop,
29
+ DecorationType: () => DecorationType,
30
+ Direction: () => Direction,
31
+ EmailNotificationReminderTime: () => EmailNotificationReminderTime,
32
+ EmailNotificationType: () => EmailNotificationType,
33
+ EventStatus: () => EventStatus,
34
+ EventType: () => EventType,
35
+ FeeName: () => FeeName,
36
+ FeeType: () => FeeType,
37
+ FontType: () => FontType,
38
+ GIFType: () => GIFType,
39
+ InitialExpandedItems: () => InitialExpandedItems,
40
+ InputControlType: () => InputControlType,
41
+ LayoutType: () => LayoutType,
42
+ LineStyle: () => LineStyle,
43
+ LocationType: () => LocationType,
44
+ MapType: () => MapType,
45
+ NodeType: () => NodeType,
46
+ NullValue: () => NullValue,
47
+ OrderStatus: () => OrderStatus,
48
+ Orientation: () => Orientation,
49
+ PluginContainerDataAlignment: () => PluginContainerDataAlignment,
50
+ PollLayoutDirection: () => PollLayoutDirection,
51
+ PollLayoutType: () => PollLayoutType,
52
+ Position: () => Position,
53
+ PushNotificationType: () => PushNotificationType,
54
+ RegistrationStatus: () => RegistrationStatus,
55
+ RsvpStatusOptions: () => RsvpStatusOptions,
56
+ Source: () => Source,
57
+ State: () => State,
58
+ Status: () => Status,
59
+ SubdivisionType: () => SubdivisionType,
60
+ Target: () => Target,
61
+ TaxType: () => TaxType,
62
+ TextAlignment: () => TextAlignment,
63
+ ThumbnailsAlignment: () => ThumbnailsAlignment,
64
+ Type: () => Type,
65
+ ValueType: () => ValueType,
66
+ VerticalAlignment: () => VerticalAlignment,
67
+ ViewMode: () => ViewMode,
68
+ ViewRole: () => ViewRole,
69
+ VisitorType: () => VisitorType,
70
+ VoteRole: () => VoteRole,
71
+ WebhookIdentityType: () => WebhookIdentityType,
72
+ Width: () => Width,
73
+ WidthType: () => WidthType,
74
+ onNotificationConfigCreated: () => onNotificationConfigCreated2,
75
+ onNotificationConfigUpdated: () => onNotificationConfigUpdated2,
76
+ resolveNotificationConfig: () => resolveNotificationConfig4,
77
+ triggerNotification: () => triggerNotification4,
78
+ upsertNotificationConfig: () => upsertNotificationConfig4
79
+ });
80
+ module.exports = __toCommonJS(index_exports);
81
+
82
+ // src/events-notifications-v2-notification-config-notifications.public.ts
83
+ var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
84
+ var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
85
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
86
+ var import_sdk_types = require("@wix/sdk-types");
87
+
88
+ // src/events-notifications-v2-notification-config-notifications.universal.ts
89
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
90
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
91
+
92
+ // src/events-notifications-v2-notification-config-notifications.http.ts
93
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
94
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
95
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
96
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
97
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
98
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
99
+ function resolveWixEventsNotificationsV2NotificationConfigManagementUrl(opts) {
100
+ const domainToMappings = {
101
+ "api._api_base_domain_": [
102
+ {
103
+ srcPath: "/events-notifications",
104
+ destPath: ""
105
+ }
106
+ ],
107
+ _: [
108
+ {
109
+ srcPath: "/_api/events-notifications",
110
+ destPath: ""
111
+ }
112
+ ],
113
+ "manage._base_domain_": [
114
+ {
115
+ srcPath: "/_api/events-notifications",
116
+ destPath: ""
117
+ }
118
+ ],
119
+ "www.wixapis.com": [
120
+ {
121
+ srcPath: "/events-notifications",
122
+ destPath: ""
123
+ },
124
+ {
125
+ srcPath: "/events/v2/notifications",
126
+ destPath: "/v2/notifications"
127
+ }
128
+ ]
129
+ };
130
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
131
+ }
132
+ function resolveWixEventsNotificationsV2NotificationServiceUrl(opts) {
133
+ const domainToMappings = {
134
+ "api._api_base_domain_": [
135
+ {
136
+ srcPath: "/events-notifications",
137
+ destPath: ""
138
+ }
139
+ ],
140
+ _: [
141
+ {
142
+ srcPath: "/_api/events-notifications",
143
+ destPath: ""
144
+ }
145
+ ],
146
+ "manage._base_domain_": [
147
+ {
148
+ srcPath: "/_api/events-notifications",
149
+ destPath: ""
150
+ }
151
+ ],
152
+ "www.wixapis.com": [
153
+ {
154
+ srcPath: "/events-notifications",
155
+ destPath: ""
156
+ },
157
+ {
158
+ srcPath: "/events/v2/notifications",
159
+ destPath: "/v2/notifications"
160
+ }
161
+ ]
162
+ };
163
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
164
+ }
165
+ var PACKAGE_NAME = "@wix/auto_sdk_events_notifications";
166
+ function triggerNotification(payload) {
167
+ function __triggerNotification({ host }) {
168
+ const metadata = {
169
+ entityFqdn: "wix.events.notifications.v2.notification_config",
170
+ method: "POST",
171
+ methodFqn: "wix.events.notifications.v2.NotificationService.TriggerNotification",
172
+ packageName: PACKAGE_NAME,
173
+ url: resolveWixEventsNotificationsV2NotificationServiceUrl({
174
+ protoPath: "/v2/notifications/trigger",
175
+ data: payload,
176
+ host
177
+ }),
178
+ data: payload
179
+ };
180
+ return metadata;
181
+ }
182
+ return __triggerNotification;
183
+ }
184
+ function resolveNotificationConfig(payload) {
185
+ function __resolveNotificationConfig({ host }) {
186
+ const metadata = {
187
+ entityFqdn: "wix.events.notifications.v2.notification_config",
188
+ method: "GET",
189
+ methodFqn: "wix.events.notifications.v2.NotificationConfigManagement.ResolveNotificationConfig",
190
+ packageName: PACKAGE_NAME,
191
+ url: resolveWixEventsNotificationsV2NotificationConfigManagementUrl({
192
+ protoPath: "/v2/notification-configs/resolve/{notificationConfigId}",
193
+ data: payload,
194
+ host
195
+ }),
196
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
197
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
198
+ {
199
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
200
+ paths: [
201
+ { path: "notificationConfig.createdDate" },
202
+ { path: "notificationConfig.updatedDate" }
203
+ ]
204
+ }
205
+ ])
206
+ };
207
+ return metadata;
208
+ }
209
+ return __resolveNotificationConfig;
210
+ }
211
+ function upsertNotificationConfig(payload) {
212
+ function __upsertNotificationConfig({ host }) {
213
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
214
+ {
215
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
216
+ paths: [{ path: "fieldMask" }]
217
+ },
218
+ {
219
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
220
+ paths: [
221
+ { path: "notificationConfig.createdDate" },
222
+ { path: "notificationConfig.updatedDate" }
223
+ ]
224
+ }
225
+ ]);
226
+ const metadata = {
227
+ entityFqdn: "wix.events.notifications.v2.notification_config",
228
+ method: "POST",
229
+ methodFqn: "wix.events.notifications.v2.NotificationConfigManagement.UpsertNotificationConfig",
230
+ packageName: PACKAGE_NAME,
231
+ url: resolveWixEventsNotificationsV2NotificationConfigManagementUrl({
232
+ protoPath: "/v2/notification-configs/{notificationConfig.id}",
233
+ data: serializedData,
234
+ host
235
+ }),
236
+ data: serializedData,
237
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
238
+ {
239
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
240
+ paths: [
241
+ { path: "notificationConfig.createdDate" },
242
+ { path: "notificationConfig.updatedDate" }
243
+ ]
244
+ }
245
+ ])
246
+ };
247
+ return metadata;
248
+ }
249
+ return __upsertNotificationConfig;
250
+ }
251
+
252
+ // src/events-notifications-v2-notification-config-notifications.universal.ts
253
+ var EmailNotificationType = /* @__PURE__ */ ((EmailNotificationType2) => {
254
+ EmailNotificationType2["UNKNOWN_NOTIFICATION_TYPE"] = "UNKNOWN_NOTIFICATION_TYPE";
255
+ EmailNotificationType2["EMAIL_RSVP_CONFIRMATION"] = "EMAIL_RSVP_CONFIRMATION";
256
+ EmailNotificationType2["EMAIL_NEW_SPOTS_AVAILABLE"] = "EMAIL_NEW_SPOTS_AVAILABLE";
257
+ EmailNotificationType2["EMAIL_EVENT_CANCELATION"] = "EMAIL_EVENT_CANCELATION";
258
+ EmailNotificationType2["EMAIL_UPCOMING_EVENT_REMINDER"] = "EMAIL_UPCOMING_EVENT_REMINDER";
259
+ EmailNotificationType2["EMAIL_ORDER_CONFIRMATION"] = "EMAIL_ORDER_CONFIRMATION";
260
+ EmailNotificationType2["EMAIL_TICKET_CONFIRMATION"] = "EMAIL_TICKET_CONFIRMATION";
261
+ EmailNotificationType2["EMAIL_INVOICE"] = "EMAIL_INVOICE";
262
+ return EmailNotificationType2;
263
+ })(EmailNotificationType || {});
264
+ var EmailNotificationReminderTime = /* @__PURE__ */ ((EmailNotificationReminderTime2) => {
265
+ EmailNotificationReminderTime2["UNKNOWN_REMINDER_TIME"] = "UNKNOWN_REMINDER_TIME";
266
+ EmailNotificationReminderTime2["INSTANT"] = "INSTANT";
267
+ EmailNotificationReminderTime2["BEFORE_1_DAY"] = "BEFORE_1_DAY";
268
+ EmailNotificationReminderTime2["BEFORE_3_DAYS"] = "BEFORE_3_DAYS";
269
+ EmailNotificationReminderTime2["BEFORE_1_WEEK"] = "BEFORE_1_WEEK";
270
+ EmailNotificationReminderTime2["BEFORE_1_HOUR"] = "BEFORE_1_HOUR";
271
+ EmailNotificationReminderTime2["BEFORE_30_MINUTES"] = "BEFORE_30_MINUTES";
272
+ return EmailNotificationReminderTime2;
273
+ })(EmailNotificationReminderTime || {});
274
+ var PushNotificationType = /* @__PURE__ */ ((PushNotificationType2) => {
275
+ PushNotificationType2["UNKNOWN_PUSH_TYPE"] = "UNKNOWN_PUSH_TYPE";
276
+ PushNotificationType2["PUSH_EVENT_UPDATED"] = "PUSH_EVENT_UPDATED";
277
+ PushNotificationType2["PUSH_EVENT_CANCELATION"] = "PUSH_EVENT_CANCELATION";
278
+ PushNotificationType2["PUSH_UPCOMING_EVENT_REMINDER"] = "PUSH_UPCOMING_EVENT_REMINDER";
279
+ PushNotificationType2["PUSH_EVENT_CREATED"] = "PUSH_EVENT_CREATED";
280
+ return PushNotificationType2;
281
+ })(PushNotificationType || {});
282
+ var LocationType = /* @__PURE__ */ ((LocationType2) => {
283
+ LocationType2["VENUE"] = "VENUE";
284
+ LocationType2["ONLINE"] = "ONLINE";
285
+ return LocationType2;
286
+ })(LocationType || {});
287
+ var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
288
+ SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
289
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
290
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
291
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
292
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
293
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
294
+ SubdivisionType2["COUNTRY"] = "COUNTRY";
295
+ return SubdivisionType2;
296
+ })(SubdivisionType || {});
297
+ var Status = /* @__PURE__ */ ((Status2) => {
298
+ Status2["ONE_TIME"] = "ONE_TIME";
299
+ Status2["RECURRING"] = "RECURRING";
300
+ Status2["RECURRING_NEXT"] = "RECURRING_NEXT";
301
+ Status2["RECURRING_LAST_ENDED"] = "RECURRING_LAST_ENDED";
302
+ Status2["RECURRING_LAST_CANCELED"] = "RECURRING_LAST_CANCELED";
303
+ return Status2;
304
+ })(Status || {});
305
+ var EventStatus = /* @__PURE__ */ ((EventStatus2) => {
306
+ EventStatus2["SCHEDULED"] = "SCHEDULED";
307
+ EventStatus2["STARTED"] = "STARTED";
308
+ EventStatus2["ENDED"] = "ENDED";
309
+ EventStatus2["CANCELED"] = "CANCELED";
310
+ return EventStatus2;
311
+ })(EventStatus || {});
312
+ var EventType = /* @__PURE__ */ ((EventType2) => {
313
+ EventType2["NA_EVENT_TYPE"] = "NA_EVENT_TYPE";
314
+ EventType2["RSVP"] = "RSVP";
315
+ EventType2["TICKETS"] = "TICKETS";
316
+ EventType2["EXTERNAL"] = "EXTERNAL";
317
+ EventType2["NO_REGISTRATION"] = "NO_REGISTRATION";
318
+ return EventType2;
319
+ })(EventType || {});
320
+ var RegistrationStatus = /* @__PURE__ */ ((RegistrationStatus2) => {
321
+ RegistrationStatus2["NA_REGISTRATION_STATUS"] = "NA_REGISTRATION_STATUS";
322
+ RegistrationStatus2["CLOSED"] = "CLOSED";
323
+ RegistrationStatus2["CLOSED_MANUALLY"] = "CLOSED_MANUALLY";
324
+ RegistrationStatus2["OPEN_RSVP"] = "OPEN_RSVP";
325
+ RegistrationStatus2["OPEN_RSVP_WAITLIST"] = "OPEN_RSVP_WAITLIST";
326
+ RegistrationStatus2["OPEN_TICKETS"] = "OPEN_TICKETS";
327
+ RegistrationStatus2["OPEN_EXTERNAL"] = "OPEN_EXTERNAL";
328
+ RegistrationStatus2["SCHEDULED_RSVP"] = "SCHEDULED_RSVP";
329
+ return RegistrationStatus2;
330
+ })(RegistrationStatus || {});
331
+ var RsvpStatusOptions = /* @__PURE__ */ ((RsvpStatusOptions2) => {
332
+ RsvpStatusOptions2["YES_ONLY"] = "YES_ONLY";
333
+ RsvpStatusOptions2["YES_AND_NO"] = "YES_AND_NO";
334
+ return RsvpStatusOptions2;
335
+ })(RsvpStatusOptions || {});
336
+ var TaxType = /* @__PURE__ */ ((TaxType2) => {
337
+ TaxType2["INCLUDED"] = "INCLUDED";
338
+ TaxType2["ADDED"] = "ADDED";
339
+ TaxType2["ADDED_AT_CHECKOUT"] = "ADDED_AT_CHECKOUT";
340
+ return TaxType2;
341
+ })(TaxType || {});
342
+ var VisitorType = /* @__PURE__ */ ((VisitorType2) => {
343
+ VisitorType2["VISITOR"] = "VISITOR";
344
+ VisitorType2["MEMBER"] = "MEMBER";
345
+ VisitorType2["VISITOR_OR_MEMBER"] = "VISITOR_OR_MEMBER";
346
+ return VisitorType2;
347
+ })(VisitorType || {});
348
+ var InputControlType = /* @__PURE__ */ ((InputControlType2) => {
349
+ InputControlType2["INPUT"] = "INPUT";
350
+ InputControlType2["TEXTAREA"] = "TEXTAREA";
351
+ InputControlType2["DROPDOWN"] = "DROPDOWN";
352
+ InputControlType2["RADIO"] = "RADIO";
353
+ InputControlType2["CHECKBOX"] = "CHECKBOX";
354
+ InputControlType2["NAME"] = "NAME";
355
+ InputControlType2["GUEST_CONTROL"] = "GUEST_CONTROL";
356
+ InputControlType2["ADDRESS_SHORT"] = "ADDRESS_SHORT";
357
+ InputControlType2["ADDRESS_FULL"] = "ADDRESS_FULL";
358
+ InputControlType2["DATE"] = "DATE";
359
+ return InputControlType2;
360
+ })(InputControlType || {});
361
+ var ValueType = /* @__PURE__ */ ((ValueType2) => {
362
+ ValueType2["TEXT"] = "TEXT";
363
+ ValueType2["NUMBER"] = "NUMBER";
364
+ ValueType2["TEXT_ARRAY"] = "TEXT_ARRAY";
365
+ ValueType2["DATE_TIME"] = "DATE_TIME";
366
+ ValueType2["ADDRESS"] = "ADDRESS";
367
+ return ValueType2;
368
+ })(ValueType || {});
369
+ var ConferenceType = /* @__PURE__ */ ((ConferenceType2) => {
370
+ ConferenceType2["MEETING"] = "MEETING";
371
+ ConferenceType2["WEBINAR"] = "WEBINAR";
372
+ return ConferenceType2;
373
+ })(ConferenceType || {});
374
+ var State = /* @__PURE__ */ ((State2) => {
375
+ State2["MANUAL"] = "MANUAL";
376
+ State2["AUTO"] = "AUTO";
377
+ State2["RECURRING_EVENT"] = "RECURRING_EVENT";
378
+ State2["HIDDEN"] = "HIDDEN";
379
+ return State2;
380
+ })(State || {});
381
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
382
+ NodeType2["PARAGRAPH"] = "PARAGRAPH";
383
+ NodeType2["TEXT"] = "TEXT";
384
+ NodeType2["HEADING"] = "HEADING";
385
+ NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
386
+ NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
387
+ NodeType2["LIST_ITEM"] = "LIST_ITEM";
388
+ NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
389
+ NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
390
+ NodeType2["VIDEO"] = "VIDEO";
391
+ NodeType2["DIVIDER"] = "DIVIDER";
392
+ NodeType2["FILE"] = "FILE";
393
+ NodeType2["GALLERY"] = "GALLERY";
394
+ NodeType2["GIF"] = "GIF";
395
+ NodeType2["HTML"] = "HTML";
396
+ NodeType2["IMAGE"] = "IMAGE";
397
+ NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
398
+ NodeType2["MAP"] = "MAP";
399
+ NodeType2["POLL"] = "POLL";
400
+ NodeType2["APP_EMBED"] = "APP_EMBED";
401
+ NodeType2["BUTTON"] = "BUTTON";
402
+ NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
403
+ NodeType2["TABLE"] = "TABLE";
404
+ NodeType2["EMBED"] = "EMBED";
405
+ NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
406
+ NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
407
+ NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
408
+ NodeType2["TABLE_CELL"] = "TABLE_CELL";
409
+ NodeType2["TABLE_ROW"] = "TABLE_ROW";
410
+ NodeType2["EXTERNAL"] = "EXTERNAL";
411
+ NodeType2["AUDIO"] = "AUDIO";
412
+ NodeType2["CAPTION"] = "CAPTION";
413
+ NodeType2["LAYOUT"] = "LAYOUT";
414
+ NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
415
+ return NodeType2;
416
+ })(NodeType || {});
417
+ var WidthType = /* @__PURE__ */ ((WidthType2) => {
418
+ WidthType2["CONTENT"] = "CONTENT";
419
+ WidthType2["SMALL"] = "SMALL";
420
+ WidthType2["ORIGINAL"] = "ORIGINAL";
421
+ WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
422
+ return WidthType2;
423
+ })(WidthType || {});
424
+ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
425
+ PluginContainerDataAlignment2["CENTER"] = "CENTER";
426
+ PluginContainerDataAlignment2["LEFT"] = "LEFT";
427
+ PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
428
+ return PluginContainerDataAlignment2;
429
+ })(PluginContainerDataAlignment || {});
430
+ var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
431
+ ButtonDataType2["LINK"] = "LINK";
432
+ ButtonDataType2["ACTION"] = "ACTION";
433
+ return ButtonDataType2;
434
+ })(ButtonDataType || {});
435
+ var Target = /* @__PURE__ */ ((Target2) => {
436
+ Target2["SELF"] = "SELF";
437
+ Target2["BLANK"] = "BLANK";
438
+ Target2["PARENT"] = "PARENT";
439
+ Target2["TOP"] = "TOP";
440
+ return Target2;
441
+ })(Target || {});
442
+ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
443
+ TextAlignment2["AUTO"] = "AUTO";
444
+ TextAlignment2["LEFT"] = "LEFT";
445
+ TextAlignment2["RIGHT"] = "RIGHT";
446
+ TextAlignment2["CENTER"] = "CENTER";
447
+ TextAlignment2["JUSTIFY"] = "JUSTIFY";
448
+ return TextAlignment2;
449
+ })(TextAlignment || {});
450
+ var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
451
+ LineStyle2["SINGLE"] = "SINGLE";
452
+ LineStyle2["DOUBLE"] = "DOUBLE";
453
+ LineStyle2["DASHED"] = "DASHED";
454
+ LineStyle2["DOTTED"] = "DOTTED";
455
+ return LineStyle2;
456
+ })(LineStyle || {});
457
+ var Width = /* @__PURE__ */ ((Width2) => {
458
+ Width2["LARGE"] = "LARGE";
459
+ Width2["MEDIUM"] = "MEDIUM";
460
+ Width2["SMALL"] = "SMALL";
461
+ return Width2;
462
+ })(Width || {});
463
+ var Alignment = /* @__PURE__ */ ((Alignment2) => {
464
+ Alignment2["CENTER"] = "CENTER";
465
+ Alignment2["LEFT"] = "LEFT";
466
+ Alignment2["RIGHT"] = "RIGHT";
467
+ return Alignment2;
468
+ })(Alignment || {});
469
+ var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
470
+ ViewMode2["NONE"] = "NONE";
471
+ ViewMode2["FULL"] = "FULL";
472
+ ViewMode2["MINI"] = "MINI";
473
+ return ViewMode2;
474
+ })(ViewMode || {});
475
+ var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
476
+ LayoutType2["COLLAGE"] = "COLLAGE";
477
+ LayoutType2["MASONRY"] = "MASONRY";
478
+ LayoutType2["GRID"] = "GRID";
479
+ LayoutType2["THUMBNAIL"] = "THUMBNAIL";
480
+ LayoutType2["SLIDER"] = "SLIDER";
481
+ LayoutType2["SLIDESHOW"] = "SLIDESHOW";
482
+ LayoutType2["PANORAMA"] = "PANORAMA";
483
+ LayoutType2["COLUMN"] = "COLUMN";
484
+ LayoutType2["MAGIC"] = "MAGIC";
485
+ LayoutType2["FULLSIZE"] = "FULLSIZE";
486
+ return LayoutType2;
487
+ })(LayoutType || {});
488
+ var Orientation = /* @__PURE__ */ ((Orientation2) => {
489
+ Orientation2["ROWS"] = "ROWS";
490
+ Orientation2["COLUMNS"] = "COLUMNS";
491
+ return Orientation2;
492
+ })(Orientation || {});
493
+ var Crop = /* @__PURE__ */ ((Crop2) => {
494
+ Crop2["FILL"] = "FILL";
495
+ Crop2["FIT"] = "FIT";
496
+ return Crop2;
497
+ })(Crop || {});
498
+ var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
499
+ ThumbnailsAlignment2["TOP"] = "TOP";
500
+ ThumbnailsAlignment2["RIGHT"] = "RIGHT";
501
+ ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
502
+ ThumbnailsAlignment2["LEFT"] = "LEFT";
503
+ ThumbnailsAlignment2["NONE"] = "NONE";
504
+ return ThumbnailsAlignment2;
505
+ })(ThumbnailsAlignment || {});
506
+ var GIFType = /* @__PURE__ */ ((GIFType2) => {
507
+ GIFType2["NORMAL"] = "NORMAL";
508
+ GIFType2["STICKER"] = "STICKER";
509
+ return GIFType2;
510
+ })(GIFType || {});
511
+ var Source = /* @__PURE__ */ ((Source2) => {
512
+ Source2["HTML"] = "HTML";
513
+ Source2["ADSENSE"] = "ADSENSE";
514
+ return Source2;
515
+ })(Source || {});
516
+ var Position = /* @__PURE__ */ ((Position2) => {
517
+ Position2["START"] = "START";
518
+ Position2["END"] = "END";
519
+ Position2["TOP"] = "TOP";
520
+ Position2["HIDDEN"] = "HIDDEN";
521
+ return Position2;
522
+ })(Position || {});
523
+ var MapType = /* @__PURE__ */ ((MapType2) => {
524
+ MapType2["ROADMAP"] = "ROADMAP";
525
+ MapType2["SATELITE"] = "SATELITE";
526
+ MapType2["HYBRID"] = "HYBRID";
527
+ MapType2["TERRAIN"] = "TERRAIN";
528
+ return MapType2;
529
+ })(MapType || {});
530
+ var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
531
+ ViewRole2["CREATOR"] = "CREATOR";
532
+ ViewRole2["VOTERS"] = "VOTERS";
533
+ ViewRole2["EVERYONE"] = "EVERYONE";
534
+ return ViewRole2;
535
+ })(ViewRole || {});
536
+ var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
537
+ VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
538
+ VoteRole2["ALL"] = "ALL";
539
+ return VoteRole2;
540
+ })(VoteRole || {});
541
+ var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
542
+ PollLayoutType2["LIST"] = "LIST";
543
+ PollLayoutType2["GRID"] = "GRID";
544
+ return PollLayoutType2;
545
+ })(PollLayoutType || {});
546
+ var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
547
+ PollLayoutDirection2["LTR"] = "LTR";
548
+ PollLayoutDirection2["RTL"] = "RTL";
549
+ return PollLayoutDirection2;
550
+ })(PollLayoutDirection || {});
551
+ var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
552
+ BackgroundType2["COLOR"] = "COLOR";
553
+ BackgroundType2["IMAGE"] = "IMAGE";
554
+ BackgroundType2["GRADIENT"] = "GRADIENT";
555
+ return BackgroundType2;
556
+ })(BackgroundType || {});
557
+ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
558
+ DecorationType2["BOLD"] = "BOLD";
559
+ DecorationType2["ITALIC"] = "ITALIC";
560
+ DecorationType2["UNDERLINE"] = "UNDERLINE";
561
+ DecorationType2["SPOILER"] = "SPOILER";
562
+ DecorationType2["ANCHOR"] = "ANCHOR";
563
+ DecorationType2["MENTION"] = "MENTION";
564
+ DecorationType2["LINK"] = "LINK";
565
+ DecorationType2["COLOR"] = "COLOR";
566
+ DecorationType2["FONT_SIZE"] = "FONT_SIZE";
567
+ DecorationType2["EXTERNAL"] = "EXTERNAL";
568
+ DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
569
+ return DecorationType2;
570
+ })(DecorationType || {});
571
+ var FontType = /* @__PURE__ */ ((FontType2) => {
572
+ FontType2["PX"] = "PX";
573
+ FontType2["EM"] = "EM";
574
+ return FontType2;
575
+ })(FontType || {});
576
+ var AppType = /* @__PURE__ */ ((AppType2) => {
577
+ AppType2["PRODUCT"] = "PRODUCT";
578
+ AppType2["EVENT"] = "EVENT";
579
+ AppType2["BOOKING"] = "BOOKING";
580
+ return AppType2;
581
+ })(AppType || {});
582
+ var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
583
+ InitialExpandedItems2["FIRST"] = "FIRST";
584
+ InitialExpandedItems2["ALL"] = "ALL";
585
+ InitialExpandedItems2["NONE"] = "NONE";
586
+ return InitialExpandedItems2;
587
+ })(InitialExpandedItems || {});
588
+ var Direction = /* @__PURE__ */ ((Direction2) => {
589
+ Direction2["LTR"] = "LTR";
590
+ Direction2["RTL"] = "RTL";
591
+ return Direction2;
592
+ })(Direction || {});
593
+ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
594
+ VerticalAlignment2["TOP"] = "TOP";
595
+ VerticalAlignment2["MIDDLE"] = "MIDDLE";
596
+ VerticalAlignment2["BOTTOM"] = "BOTTOM";
597
+ return VerticalAlignment2;
598
+ })(VerticalAlignment || {});
599
+ var NullValue = /* @__PURE__ */ ((NullValue2) => {
600
+ NullValue2["NULL_VALUE"] = "NULL_VALUE";
601
+ return NullValue2;
602
+ })(NullValue || {});
603
+ var Type = /* @__PURE__ */ ((Type2) => {
604
+ Type2["UNKNOWN_BADGE_TYPE"] = "UNKNOWN_BADGE_TYPE";
605
+ Type2["FIRST_PRIORITY"] = "FIRST_PRIORITY";
606
+ Type2["SECOND_PRIORITY"] = "SECOND_PRIORITY";
607
+ Type2["THIRD_PRIORITY"] = "THIRD_PRIORITY";
608
+ return Type2;
609
+ })(Type || {});
610
+ var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
611
+ OrderStatus2["NA_ORDER_STATUS"] = "NA_ORDER_STATUS";
612
+ OrderStatus2["FREE"] = "FREE";
613
+ OrderStatus2["PENDING"] = "PENDING";
614
+ OrderStatus2["PAID"] = "PAID";
615
+ OrderStatus2["OFFLINE_PENDING"] = "OFFLINE_PENDING";
616
+ OrderStatus2["INITIATED"] = "INITIATED";
617
+ OrderStatus2["CANCELED"] = "CANCELED";
618
+ OrderStatus2["DECLINED"] = "DECLINED";
619
+ OrderStatus2["AUTHORIZED"] = "AUTHORIZED";
620
+ OrderStatus2["VOIDED"] = "VOIDED";
621
+ OrderStatus2["PARTIALLY_PAID"] = "PARTIALLY_PAID";
622
+ return OrderStatus2;
623
+ })(OrderStatus || {});
624
+ var FeeName = /* @__PURE__ */ ((FeeName2) => {
625
+ FeeName2["WIX_FEE"] = "WIX_FEE";
626
+ return FeeName2;
627
+ })(FeeName || {});
628
+ var FeeType = /* @__PURE__ */ ((FeeType2) => {
629
+ FeeType2["FEE_ADDED"] = "FEE_ADDED";
630
+ FeeType2["FEE_INCLUDED"] = "FEE_INCLUDED";
631
+ FeeType2["FEE_ADDED_AT_CHECKOUT"] = "FEE_ADDED_AT_CHECKOUT";
632
+ return FeeType2;
633
+ })(FeeType || {});
634
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
635
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
636
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
637
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
638
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
639
+ WebhookIdentityType2["APP"] = "APP";
640
+ return WebhookIdentityType2;
641
+ })(WebhookIdentityType || {});
642
+ async function triggerNotification2(options) {
643
+ const { httpClient, sideEffects } = arguments[1];
644
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
645
+ emailNotificationType: options?.emailNotificationType,
646
+ pushNotificationType: options?.pushNotificationType,
647
+ rsvpGuest: options?.rsvpGuest,
648
+ orderGuest: options?.orderGuest,
649
+ eventGuests: options?.eventGuests,
650
+ ticketGuest: options?.ticketGuest
651
+ });
652
+ const reqOpts = triggerNotification(
653
+ payload
654
+ );
655
+ sideEffects?.onSiteCall?.();
656
+ try {
657
+ const result = await httpClient.request(reqOpts);
658
+ sideEffects?.onSuccess?.(result);
659
+ } catch (err) {
660
+ const transformedError = (0, import_transform_error.transformError)(
661
+ err,
662
+ {
663
+ spreadPathsToArguments: {},
664
+ explicitPathsToArguments: {
665
+ emailNotificationType: "$[0].emailNotificationType",
666
+ pushNotificationType: "$[0].pushNotificationType",
667
+ rsvpGuest: "$[0].rsvpGuest",
668
+ orderGuest: "$[0].orderGuest",
669
+ eventGuests: "$[0].eventGuests",
670
+ ticketGuest: "$[0].ticketGuest"
671
+ },
672
+ singleArgumentUnchanged: false
673
+ },
674
+ ["options"]
675
+ );
676
+ sideEffects?.onError?.(err);
677
+ throw transformedError;
678
+ }
679
+ }
680
+ async function resolveNotificationConfig2(notificationConfigId) {
681
+ const { httpClient, sideEffects } = arguments[1];
682
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
683
+ notificationConfigId
684
+ });
685
+ const reqOpts = resolveNotificationConfig(
686
+ payload
687
+ );
688
+ sideEffects?.onSiteCall?.();
689
+ try {
690
+ const result = await httpClient.request(reqOpts);
691
+ sideEffects?.onSuccess?.(result);
692
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
693
+ } catch (err) {
694
+ const transformedError = (0, import_transform_error.transformError)(
695
+ err,
696
+ {
697
+ spreadPathsToArguments: {},
698
+ explicitPathsToArguments: { notificationConfigId: "$[0]" },
699
+ singleArgumentUnchanged: false
700
+ },
701
+ ["notificationConfigId"]
702
+ );
703
+ sideEffects?.onError?.(err);
704
+ throw transformedError;
705
+ }
706
+ }
707
+ async function upsertNotificationConfig2(_id, notificationConfig) {
708
+ const { httpClient, sideEffects } = arguments[2];
709
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
710
+ notificationConfig: { ...notificationConfig, id: _id }
711
+ });
712
+ const reqOpts = upsertNotificationConfig(
713
+ payload
714
+ );
715
+ sideEffects?.onSiteCall?.();
716
+ try {
717
+ const result = await httpClient.request(reqOpts);
718
+ sideEffects?.onSuccess?.(result);
719
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
720
+ } catch (err) {
721
+ const transformedError = (0, import_transform_error.transformError)(
722
+ err,
723
+ {
724
+ spreadPathsToArguments: { notificationConfig: "$[1]" },
725
+ explicitPathsToArguments: { "notificationConfig.id": "$[0]" },
726
+ singleArgumentUnchanged: false
727
+ },
728
+ ["_id", "notificationConfig"]
729
+ );
730
+ sideEffects?.onError?.(err);
731
+ throw transformedError;
732
+ }
733
+ }
734
+
735
+ // src/events-notifications-v2-notification-config-notifications.public.ts
736
+ function triggerNotification3(httpClient) {
737
+ return (options) => triggerNotification2(
738
+ options,
739
+ // @ts-ignore
740
+ { httpClient }
741
+ );
742
+ }
743
+ function resolveNotificationConfig3(httpClient) {
744
+ return (notificationConfigId) => resolveNotificationConfig2(
745
+ notificationConfigId,
746
+ // @ts-ignore
747
+ { httpClient }
748
+ );
749
+ }
750
+ function upsertNotificationConfig3(httpClient) {
751
+ return (_id, notificationConfig) => upsertNotificationConfig2(
752
+ _id,
753
+ notificationConfig,
754
+ // @ts-ignore
755
+ { httpClient }
756
+ );
757
+ }
758
+ var onNotificationConfigCreated = (0, import_sdk_types.EventDefinition)(
759
+ "wix.events.notifications.v2.notification_config_created",
760
+ true,
761
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
762
+ (0, import_transform_paths2.transformPaths)(event, [
763
+ {
764
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
765
+ paths: [
766
+ { path: "entity.createdDate" },
767
+ { path: "entity.updatedDate" },
768
+ { path: "metadata.eventTime" }
769
+ ]
770
+ }
771
+ ])
772
+ )
773
+ )();
774
+ var onNotificationConfigUpdated = (0, import_sdk_types.EventDefinition)(
775
+ "wix.events.notifications.v2.notification_config_updated",
776
+ true,
777
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
778
+ (0, import_transform_paths2.transformPaths)(event, [
779
+ {
780
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
781
+ paths: [
782
+ { path: "entity.createdDate" },
783
+ { path: "entity.updatedDate" },
784
+ { path: "metadata.eventTime" }
785
+ ]
786
+ }
787
+ ])
788
+ )
789
+ )();
790
+
791
+ // src/events-notifications-v2-notification-config-notifications.context.ts
792
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
793
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
794
+ var triggerNotification4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(triggerNotification3);
795
+ var resolveNotificationConfig4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(resolveNotificationConfig3);
796
+ var upsertNotificationConfig4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(upsertNotificationConfig3);
797
+ var onNotificationConfigCreated2 = (0, import_event_definition_modules.createEventModule)(onNotificationConfigCreated);
798
+ var onNotificationConfigUpdated2 = (0, import_event_definition_modules.createEventModule)(onNotificationConfigUpdated);
799
+ // Annotate the CommonJS export names for ESM import in node:
800
+ 0 && (module.exports = {
801
+ Alignment,
802
+ AppType,
803
+ BackgroundType,
804
+ ButtonDataType,
805
+ ConferenceType,
806
+ Crop,
807
+ DecorationType,
808
+ Direction,
809
+ EmailNotificationReminderTime,
810
+ EmailNotificationType,
811
+ EventStatus,
812
+ EventType,
813
+ FeeName,
814
+ FeeType,
815
+ FontType,
816
+ GIFType,
817
+ InitialExpandedItems,
818
+ InputControlType,
819
+ LayoutType,
820
+ LineStyle,
821
+ LocationType,
822
+ MapType,
823
+ NodeType,
824
+ NullValue,
825
+ OrderStatus,
826
+ Orientation,
827
+ PluginContainerDataAlignment,
828
+ PollLayoutDirection,
829
+ PollLayoutType,
830
+ Position,
831
+ PushNotificationType,
832
+ RegistrationStatus,
833
+ RsvpStatusOptions,
834
+ Source,
835
+ State,
836
+ Status,
837
+ SubdivisionType,
838
+ Target,
839
+ TaxType,
840
+ TextAlignment,
841
+ ThumbnailsAlignment,
842
+ Type,
843
+ ValueType,
844
+ VerticalAlignment,
845
+ ViewMode,
846
+ ViewRole,
847
+ VisitorType,
848
+ VoteRole,
849
+ WebhookIdentityType,
850
+ Width,
851
+ WidthType,
852
+ onNotificationConfigCreated,
853
+ onNotificationConfigUpdated,
854
+ resolveNotificationConfig,
855
+ triggerNotification,
856
+ upsertNotificationConfig
857
+ });
858
+ //# sourceMappingURL=index.js.map