@wix/auto_sdk_events_notifications 1.0.12 → 1.0.14

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 (134) hide show
  1. package/build/{internal/cjs/src/events-notifications-v2-notification-config-notifications.universal.d.ts → events-notifications-v2-notification-config-notifications.universal-DIjek3EA.d.mts} +277 -390
  2. package/build/{cjs/src/events-notifications-v2-notification-config-notifications.universal.d.ts → events-notifications-v2-notification-config-notifications.universal-DIjek3EA.d.ts} +277 -390
  3. package/build/index.d.mts +38 -0
  4. package/build/index.d.ts +38 -0
  5. package/build/index.js +857 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +778 -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-DIjek3EA.d.mts} +277 -390
  10. package/build/{es/src/events-notifications-v2-notification-config-notifications.universal.d.ts → internal/events-notifications-v2-notification-config-notifications.universal-DIjek3EA.d.ts} +277 -390
  11. package/build/internal/index.d.mts +38 -0
  12. package/build/internal/index.d.ts +38 -0
  13. package/build/internal/index.js +857 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +778 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +261 -0
  18. package/build/internal/meta.d.ts +261 -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 +261 -0
  24. package/build/meta.d.ts +261 -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 +14 -13
  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 -3588
  52. package/build/cjs/src/events-notifications-v2-notification-config-notifications.types.js +0 -570
  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 -730
  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/package.json +0 -3
  66. package/build/es/src/events-notifications-v2-notification-config-notifications.context.d.ts +0 -14
  67. package/build/es/src/events-notifications-v2-notification-config-notifications.context.js +0 -14
  68. package/build/es/src/events-notifications-v2-notification-config-notifications.context.js.map +0 -1
  69. package/build/es/src/events-notifications-v2-notification-config-notifications.http.d.ts +0 -7
  70. package/build/es/src/events-notifications-v2-notification-config-notifications.http.js +0 -162
  71. package/build/es/src/events-notifications-v2-notification-config-notifications.http.js.map +0 -1
  72. package/build/es/src/events-notifications-v2-notification-config-notifications.meta.d.ts +0 -19
  73. package/build/es/src/events-notifications-v2-notification-config-notifications.meta.js +0 -58
  74. package/build/es/src/events-notifications-v2-notification-config-notifications.meta.js.map +0 -1
  75. package/build/es/src/events-notifications-v2-notification-config-notifications.public.d.ts +0 -31
  76. package/build/es/src/events-notifications-v2-notification-config-notifications.public.js +0 -43
  77. package/build/es/src/events-notifications-v2-notification-config-notifications.public.js.map +0 -1
  78. package/build/es/src/events-notifications-v2-notification-config-notifications.types.d.ts +0 -3588
  79. package/build/es/src/events-notifications-v2-notification-config-notifications.types.js +0 -566
  80. package/build/es/src/events-notifications-v2-notification-config-notifications.types.js.map +0 -1
  81. package/build/es/src/events-notifications-v2-notification-config-notifications.universal.js +0 -700
  82. package/build/es/src/events-notifications-v2-notification-config-notifications.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.context.d.ts +0 -14
  93. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.context.js +0 -69
  94. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.context.js.map +0 -1
  95. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.http.d.ts +0 -7
  96. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.http.js +0 -168
  97. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.http.js.map +0 -1
  98. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.meta.d.ts +0 -19
  99. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.meta.js +0 -87
  100. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.meta.js.map +0 -1
  101. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.public.d.ts +0 -31
  102. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.public.js +0 -101
  103. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.public.js.map +0 -1
  104. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.types.d.ts +0 -3588
  105. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.types.js +0 -570
  106. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.types.js.map +0 -1
  107. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.universal.js +0 -730
  108. package/build/internal/cjs/src/events-notifications-v2-notification-config-notifications.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.context.d.ts +0 -14
  119. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.context.js +0 -14
  120. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.context.js.map +0 -1
  121. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.http.d.ts +0 -7
  122. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.http.js +0 -162
  123. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.http.js.map +0 -1
  124. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.meta.d.ts +0 -19
  125. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.meta.js +0 -58
  126. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.meta.js.map +0 -1
  127. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.public.d.ts +0 -31
  128. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.public.js +0 -43
  129. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.public.js.map +0 -1
  130. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.types.d.ts +0 -3588
  131. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.types.js +0 -566
  132. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.types.js.map +0 -1
  133. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.universal.js +0 -700
  134. package/build/internal/es/src/events-notifications-v2-notification-config-notifications.universal.js.map +0 -1
package/build/index.js ADDED
@@ -0,0 +1,857 @@
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
+ return DecorationType2;
569
+ })(DecorationType || {});
570
+ var FontType = /* @__PURE__ */ ((FontType2) => {
571
+ FontType2["PX"] = "PX";
572
+ FontType2["EM"] = "EM";
573
+ return FontType2;
574
+ })(FontType || {});
575
+ var AppType = /* @__PURE__ */ ((AppType2) => {
576
+ AppType2["PRODUCT"] = "PRODUCT";
577
+ AppType2["EVENT"] = "EVENT";
578
+ AppType2["BOOKING"] = "BOOKING";
579
+ return AppType2;
580
+ })(AppType || {});
581
+ var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
582
+ InitialExpandedItems2["FIRST"] = "FIRST";
583
+ InitialExpandedItems2["ALL"] = "ALL";
584
+ InitialExpandedItems2["NONE"] = "NONE";
585
+ return InitialExpandedItems2;
586
+ })(InitialExpandedItems || {});
587
+ var Direction = /* @__PURE__ */ ((Direction2) => {
588
+ Direction2["LTR"] = "LTR";
589
+ Direction2["RTL"] = "RTL";
590
+ return Direction2;
591
+ })(Direction || {});
592
+ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
593
+ VerticalAlignment2["TOP"] = "TOP";
594
+ VerticalAlignment2["MIDDLE"] = "MIDDLE";
595
+ VerticalAlignment2["BOTTOM"] = "BOTTOM";
596
+ return VerticalAlignment2;
597
+ })(VerticalAlignment || {});
598
+ var NullValue = /* @__PURE__ */ ((NullValue2) => {
599
+ NullValue2["NULL_VALUE"] = "NULL_VALUE";
600
+ return NullValue2;
601
+ })(NullValue || {});
602
+ var Type = /* @__PURE__ */ ((Type2) => {
603
+ Type2["UNKNOWN_BADGE_TYPE"] = "UNKNOWN_BADGE_TYPE";
604
+ Type2["URGENT"] = "URGENT";
605
+ Type2["INFO"] = "INFO";
606
+ Type2["GENERAL"] = "GENERAL";
607
+ return Type2;
608
+ })(Type || {});
609
+ var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
610
+ OrderStatus2["NA_ORDER_STATUS"] = "NA_ORDER_STATUS";
611
+ OrderStatus2["FREE"] = "FREE";
612
+ OrderStatus2["PENDING"] = "PENDING";
613
+ OrderStatus2["PAID"] = "PAID";
614
+ OrderStatus2["OFFLINE_PENDING"] = "OFFLINE_PENDING";
615
+ OrderStatus2["INITIATED"] = "INITIATED";
616
+ OrderStatus2["CANCELED"] = "CANCELED";
617
+ OrderStatus2["DECLINED"] = "DECLINED";
618
+ OrderStatus2["AUTHORIZED"] = "AUTHORIZED";
619
+ OrderStatus2["VOIDED"] = "VOIDED";
620
+ OrderStatus2["PARTIALLY_PAID"] = "PARTIALLY_PAID";
621
+ return OrderStatus2;
622
+ })(OrderStatus || {});
623
+ var FeeName = /* @__PURE__ */ ((FeeName2) => {
624
+ FeeName2["WIX_FEE"] = "WIX_FEE";
625
+ return FeeName2;
626
+ })(FeeName || {});
627
+ var FeeType = /* @__PURE__ */ ((FeeType2) => {
628
+ FeeType2["FEE_ADDED"] = "FEE_ADDED";
629
+ FeeType2["FEE_INCLUDED"] = "FEE_INCLUDED";
630
+ FeeType2["FEE_ADDED_AT_CHECKOUT"] = "FEE_ADDED_AT_CHECKOUT";
631
+ return FeeType2;
632
+ })(FeeType || {});
633
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
634
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
635
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
636
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
637
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
638
+ WebhookIdentityType2["APP"] = "APP";
639
+ return WebhookIdentityType2;
640
+ })(WebhookIdentityType || {});
641
+ async function triggerNotification2(options) {
642
+ const { httpClient, sideEffects } = arguments[1];
643
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
644
+ emailNotificationType: options?.emailNotificationType,
645
+ pushNotificationType: options?.pushNotificationType,
646
+ rsvpGuest: options?.rsvpGuest,
647
+ orderGuest: options?.orderGuest,
648
+ eventGuests: options?.eventGuests,
649
+ ticketGuest: options?.ticketGuest
650
+ });
651
+ const reqOpts = triggerNotification(
652
+ payload
653
+ );
654
+ sideEffects?.onSiteCall?.();
655
+ try {
656
+ const result = await httpClient.request(reqOpts);
657
+ sideEffects?.onSuccess?.(result);
658
+ } catch (err) {
659
+ const transformedError = (0, import_transform_error.transformError)(
660
+ err,
661
+ {
662
+ spreadPathsToArguments: {},
663
+ explicitPathsToArguments: {
664
+ emailNotificationType: "$[0].emailNotificationType",
665
+ pushNotificationType: "$[0].pushNotificationType",
666
+ rsvpGuest: "$[0].rsvpGuest",
667
+ orderGuest: "$[0].orderGuest",
668
+ eventGuests: "$[0].eventGuests",
669
+ ticketGuest: "$[0].ticketGuest"
670
+ },
671
+ singleArgumentUnchanged: false
672
+ },
673
+ ["options"]
674
+ );
675
+ sideEffects?.onError?.(err);
676
+ throw transformedError;
677
+ }
678
+ }
679
+ async function resolveNotificationConfig2(notificationConfigId) {
680
+ const { httpClient, sideEffects } = arguments[1];
681
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
682
+ notificationConfigId
683
+ });
684
+ const reqOpts = resolveNotificationConfig(
685
+ payload
686
+ );
687
+ sideEffects?.onSiteCall?.();
688
+ try {
689
+ const result = await httpClient.request(reqOpts);
690
+ sideEffects?.onSuccess?.(result);
691
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
692
+ } catch (err) {
693
+ const transformedError = (0, import_transform_error.transformError)(
694
+ err,
695
+ {
696
+ spreadPathsToArguments: {},
697
+ explicitPathsToArguments: { notificationConfigId: "$[0]" },
698
+ singleArgumentUnchanged: false
699
+ },
700
+ ["notificationConfigId"]
701
+ );
702
+ sideEffects?.onError?.(err);
703
+ throw transformedError;
704
+ }
705
+ }
706
+ async function upsertNotificationConfig2(_id, notificationConfig) {
707
+ const { httpClient, sideEffects } = arguments[2];
708
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
709
+ notificationConfig: { ...notificationConfig, id: _id }
710
+ });
711
+ const reqOpts = upsertNotificationConfig(
712
+ payload
713
+ );
714
+ sideEffects?.onSiteCall?.();
715
+ try {
716
+ const result = await httpClient.request(reqOpts);
717
+ sideEffects?.onSuccess?.(result);
718
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
719
+ } catch (err) {
720
+ const transformedError = (0, import_transform_error.transformError)(
721
+ err,
722
+ {
723
+ spreadPathsToArguments: { notificationConfig: "$[1]" },
724
+ explicitPathsToArguments: { "notificationConfig.id": "$[0]" },
725
+ singleArgumentUnchanged: false
726
+ },
727
+ ["_id", "notificationConfig"]
728
+ );
729
+ sideEffects?.onError?.(err);
730
+ throw transformedError;
731
+ }
732
+ }
733
+
734
+ // src/events-notifications-v2-notification-config-notifications.public.ts
735
+ function triggerNotification3(httpClient) {
736
+ return (options) => triggerNotification2(
737
+ options,
738
+ // @ts-ignore
739
+ { httpClient }
740
+ );
741
+ }
742
+ function resolveNotificationConfig3(httpClient) {
743
+ return (notificationConfigId) => resolveNotificationConfig2(
744
+ notificationConfigId,
745
+ // @ts-ignore
746
+ { httpClient }
747
+ );
748
+ }
749
+ function upsertNotificationConfig3(httpClient) {
750
+ return (_id, notificationConfig) => upsertNotificationConfig2(
751
+ _id,
752
+ notificationConfig,
753
+ // @ts-ignore
754
+ { httpClient }
755
+ );
756
+ }
757
+ var onNotificationConfigCreated = (0, import_sdk_types.EventDefinition)(
758
+ "wix.events.notifications.v2.notification_config_created",
759
+ true,
760
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
761
+ (0, import_transform_paths2.transformPaths)(event, [
762
+ {
763
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
764
+ paths: [
765
+ { path: "entity.createdDate" },
766
+ { path: "entity.updatedDate" },
767
+ { path: "metadata.eventTime" }
768
+ ]
769
+ }
770
+ ])
771
+ )
772
+ )();
773
+ var onNotificationConfigUpdated = (0, import_sdk_types.EventDefinition)(
774
+ "wix.events.notifications.v2.notification_config_updated",
775
+ true,
776
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
777
+ (0, import_transform_paths2.transformPaths)(event, [
778
+ {
779
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
780
+ paths: [
781
+ { path: "entity.createdDate" },
782
+ { path: "entity.updatedDate" },
783
+ { path: "metadata.eventTime" }
784
+ ]
785
+ }
786
+ ])
787
+ )
788
+ )();
789
+
790
+ // src/events-notifications-v2-notification-config-notifications.context.ts
791
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
792
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
793
+ var triggerNotification4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(triggerNotification3);
794
+ var resolveNotificationConfig4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(resolveNotificationConfig3);
795
+ var upsertNotificationConfig4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(upsertNotificationConfig3);
796
+ var onNotificationConfigCreated2 = (0, import_event_definition_modules.createEventModule)(onNotificationConfigCreated);
797
+ var onNotificationConfigUpdated2 = (0, import_event_definition_modules.createEventModule)(onNotificationConfigUpdated);
798
+ // Annotate the CommonJS export names for ESM import in node:
799
+ 0 && (module.exports = {
800
+ Alignment,
801
+ AppType,
802
+ BackgroundType,
803
+ ButtonDataType,
804
+ ConferenceType,
805
+ Crop,
806
+ DecorationType,
807
+ Direction,
808
+ EmailNotificationReminderTime,
809
+ EmailNotificationType,
810
+ EventStatus,
811
+ EventType,
812
+ FeeName,
813
+ FeeType,
814
+ FontType,
815
+ GIFType,
816
+ InitialExpandedItems,
817
+ InputControlType,
818
+ LayoutType,
819
+ LineStyle,
820
+ LocationType,
821
+ MapType,
822
+ NodeType,
823
+ NullValue,
824
+ OrderStatus,
825
+ Orientation,
826
+ PluginContainerDataAlignment,
827
+ PollLayoutDirection,
828
+ PollLayoutType,
829
+ Position,
830
+ PushNotificationType,
831
+ RegistrationStatus,
832
+ RsvpStatusOptions,
833
+ Source,
834
+ State,
835
+ Status,
836
+ SubdivisionType,
837
+ Target,
838
+ TaxType,
839
+ TextAlignment,
840
+ ThumbnailsAlignment,
841
+ Type,
842
+ ValueType,
843
+ VerticalAlignment,
844
+ ViewMode,
845
+ ViewRole,
846
+ VisitorType,
847
+ VoteRole,
848
+ WebhookIdentityType,
849
+ Width,
850
+ WidthType,
851
+ onNotificationConfigCreated,
852
+ onNotificationConfigUpdated,
853
+ resolveNotificationConfig,
854
+ triggerNotification,
855
+ upsertNotificationConfig
856
+ });
857
+ //# sourceMappingURL=index.js.map