@wix/events 1.0.149 → 1.0.151

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 (147) hide show
  1. package/build/cjs/index.d.ts +6 -2
  2. package/build/cjs/index.js +7 -3
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +6 -2
  5. package/build/cjs/index.typings.js +7 -3
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +6 -2
  8. package/build/cjs/meta.js +7 -3
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +97 -0
  11. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +550 -0
  12. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -0
  13. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.d.ts +19 -0
  14. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js +85 -0
  15. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js.map +1 -0
  16. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.d.ts +9 -0
  17. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js +28 -0
  18. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js.map +1 -0
  19. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.d.ts +410 -0
  20. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js +27 -0
  21. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js.map +1 -0
  22. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +454 -0
  23. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +254 -0
  24. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -0
  25. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.d.ts +97 -0
  26. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js +550 -0
  27. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -0
  28. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.meta.d.ts +25 -0
  29. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.meta.js +199 -0
  30. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.meta.js.map +1 -0
  31. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.d.ts +26 -0
  32. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.js +64 -0
  33. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.public.js.map +1 -0
  34. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.d.ts +410 -0
  35. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.js +27 -0
  36. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.js.map +1 -0
  37. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +669 -0
  38. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js +677 -0
  39. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -0
  40. package/build/cjs/src/events-v1-category.http.d.ts +35 -0
  41. package/build/cjs/src/events-v1-category.http.js +570 -0
  42. package/build/cjs/src/events-v1-category.http.js.map +1 -0
  43. package/build/cjs/src/events-v1-category.meta.d.ts +37 -0
  44. package/build/cjs/src/events-v1-category.meta.js +275 -0
  45. package/build/cjs/src/events-v1-category.meta.js.map +1 -0
  46. package/build/cjs/src/events-v1-category.public.d.ts +28 -0
  47. package/build/cjs/src/events-v1-category.public.js +88 -0
  48. package/build/cjs/src/events-v1-category.public.js.map +1 -0
  49. package/build/cjs/src/events-v1-category.types.d.ts +364 -0
  50. package/build/cjs/src/events-v1-category.types.js +27 -0
  51. package/build/cjs/src/events-v1-category.types.js.map +1 -0
  52. package/build/cjs/src/events-v1-category.universal.d.ts +586 -0
  53. package/build/cjs/src/events-v1-category.universal.js +830 -0
  54. package/build/cjs/src/events-v1-category.universal.js.map +1 -0
  55. package/build/cjs/src/events-v1-order-checkout.http.js +7 -4
  56. package/build/cjs/src/events-v1-order-checkout.http.js.map +1 -1
  57. package/build/cjs/src/events-v1-order-orders.http.js +7 -4
  58. package/build/cjs/src/events-v1-order-orders.http.js.map +1 -1
  59. package/build/cjs/src/events-v1-rsvp.http.d.ts +20 -0
  60. package/build/cjs/src/events-v1-rsvp.http.js +433 -0
  61. package/build/cjs/src/events-v1-rsvp.http.js.map +1 -0
  62. package/build/cjs/src/events-v1-rsvp.meta.d.ts +25 -0
  63. package/build/cjs/src/events-v1-rsvp.meta.js +199 -0
  64. package/build/cjs/src/events-v1-rsvp.meta.js.map +1 -0
  65. package/build/cjs/src/events-v1-rsvp.public.d.ts +39 -0
  66. package/build/cjs/src/events-v1-rsvp.public.js +65 -0
  67. package/build/cjs/src/events-v1-rsvp.public.js.map +1 -0
  68. package/build/cjs/src/events-v1-rsvp.types.d.ts +804 -0
  69. package/build/cjs/src/events-v1-rsvp.types.js +44 -0
  70. package/build/cjs/src/events-v1-rsvp.types.js.map +1 -0
  71. package/build/cjs/src/events-v1-rsvp.universal.d.ts +905 -0
  72. package/build/cjs/src/events-v1-rsvp.universal.js +725 -0
  73. package/build/cjs/src/events-v1-rsvp.universal.js.map +1 -0
  74. package/build/es/index.d.ts +6 -2
  75. package/build/es/index.js +6 -2
  76. package/build/es/index.js.map +1 -1
  77. package/build/es/index.typings.d.ts +6 -2
  78. package/build/es/index.typings.js +6 -2
  79. package/build/es/index.typings.js.map +1 -1
  80. package/build/es/meta.d.ts +6 -2
  81. package/build/es/meta.js +6 -2
  82. package/build/es/meta.js.map +1 -1
  83. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +97 -0
  84. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +535 -0
  85. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -0
  86. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.d.ts +19 -0
  87. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js +56 -0
  88. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.meta.js.map +1 -0
  89. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.d.ts +9 -0
  90. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js +19 -0
  91. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.public.js.map +1 -0
  92. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.d.ts +410 -0
  93. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js +24 -0
  94. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js.map +1 -0
  95. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +454 -0
  96. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +225 -0
  97. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -0
  98. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.d.ts +97 -0
  99. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js +535 -0
  100. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -0
  101. package/build/es/src/events-schedule-v1-schedule-item-schedule.meta.d.ts +25 -0
  102. package/build/es/src/events-schedule-v1-schedule-item-schedule.meta.js +164 -0
  103. package/build/es/src/events-schedule-v1-schedule-item-schedule.meta.js.map +1 -0
  104. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.d.ts +26 -0
  105. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.js +49 -0
  106. package/build/es/src/events-schedule-v1-schedule-item-schedule.public.js.map +1 -0
  107. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.d.ts +410 -0
  108. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.js +24 -0
  109. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.js.map +1 -0
  110. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +669 -0
  111. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js +642 -0
  112. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -0
  113. package/build/es/src/events-v1-category.http.d.ts +35 -0
  114. package/build/es/src/events-v1-category.http.js +554 -0
  115. package/build/es/src/events-v1-category.http.js.map +1 -0
  116. package/build/es/src/events-v1-category.meta.d.ts +37 -0
  117. package/build/es/src/events-v1-category.meta.js +236 -0
  118. package/build/es/src/events-v1-category.meta.js.map +1 -0
  119. package/build/es/src/events-v1-category.public.d.ts +28 -0
  120. package/build/es/src/events-v1-category.public.js +69 -0
  121. package/build/es/src/events-v1-category.public.js.map +1 -0
  122. package/build/es/src/events-v1-category.types.d.ts +364 -0
  123. package/build/es/src/events-v1-category.types.js +24 -0
  124. package/build/es/src/events-v1-category.types.js.map +1 -0
  125. package/build/es/src/events-v1-category.universal.d.ts +586 -0
  126. package/build/es/src/events-v1-category.universal.js +791 -0
  127. package/build/es/src/events-v1-category.universal.js.map +1 -0
  128. package/build/es/src/events-v1-order-checkout.http.js +7 -4
  129. package/build/es/src/events-v1-order-checkout.http.js.map +1 -1
  130. package/build/es/src/events-v1-order-orders.http.js +7 -4
  131. package/build/es/src/events-v1-order-orders.http.js.map +1 -1
  132. package/build/es/src/events-v1-rsvp.http.d.ts +20 -0
  133. package/build/es/src/events-v1-rsvp.http.js +421 -0
  134. package/build/es/src/events-v1-rsvp.http.js.map +1 -0
  135. package/build/es/src/events-v1-rsvp.meta.d.ts +25 -0
  136. package/build/es/src/events-v1-rsvp.meta.js +164 -0
  137. package/build/es/src/events-v1-rsvp.meta.js.map +1 -0
  138. package/build/es/src/events-v1-rsvp.public.d.ts +39 -0
  139. package/build/es/src/events-v1-rsvp.public.js +49 -0
  140. package/build/es/src/events-v1-rsvp.public.js.map +1 -0
  141. package/build/es/src/events-v1-rsvp.types.d.ts +804 -0
  142. package/build/es/src/events-v1-rsvp.types.js +41 -0
  143. package/build/es/src/events-v1-rsvp.types.js.map +1 -0
  144. package/build/es/src/events-v1-rsvp.universal.d.ts +905 -0
  145. package/build/es/src/events-v1-rsvp.universal.js +690 -0
  146. package/build/es/src/events-v1-rsvp.universal.js.map +1 -0
  147. package/package.json +2 -2
@@ -0,0 +1,690 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { serializer } from '@wix/metro-runtime/velo';
11
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
12
+ import * as ambassadorWixEventsV1Rsvp from './events-v1-rsvp.http';
13
+ let __verbose = false;
14
+ function __log(...args) {
15
+ __verbose && console.log(...args);
16
+ }
17
+ function __inspect(obj) {
18
+ return obj;
19
+ }
20
+ export const __debug = {
21
+ verboseLogging: {
22
+ on: () => (__verbose = true),
23
+ off: () => (__verbose = false),
24
+ },
25
+ };
26
+ const _toVeloEntity = '$';
27
+ const _fromVeloEntity = '$';
28
+ export var SubdivisionType;
29
+ (function (SubdivisionType) {
30
+ SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
31
+ /** State */
32
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
33
+ /** County */
34
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
35
+ /** City/town */
36
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
37
+ /** Neighborhood/quarter */
38
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
39
+ /** Street/block */
40
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
41
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
42
+ SubdivisionType["COUNTRY"] = "COUNTRY";
43
+ })(SubdivisionType || (SubdivisionType = {}));
44
+ export var RsvpStatus;
45
+ (function (RsvpStatus) {
46
+ RsvpStatus["YES"] = "YES";
47
+ RsvpStatus["NO"] = "NO";
48
+ RsvpStatus["WAITING"] = "WAITING";
49
+ })(RsvpStatus || (RsvpStatus = {}));
50
+ export var RsvpFieldset;
51
+ (function (RsvpFieldset) {
52
+ /** Include RSVP details: created, modified, first_name, last_name, etc. */
53
+ RsvpFieldset["DETAILS"] = "DETAILS";
54
+ /** Include rsvp_form. */
55
+ RsvpFieldset["FORM"] = "FORM";
56
+ /** Include RSVP email. */
57
+ RsvpFieldset["CONTACT_DETAILS"] = "CONTACT_DETAILS";
58
+ })(RsvpFieldset || (RsvpFieldset = {}));
59
+ export var RsvpTag;
60
+ (function (RsvpTag) {
61
+ /** Return only rsvps with all guests checked-in */
62
+ RsvpTag["FULLY_CHECKED_IN"] = "FULLY_CHECKED_IN";
63
+ /** Return only rsvps with not all guests checked-in */
64
+ RsvpTag["NOT_FULLY_CHECKED_IN"] = "NOT_FULLY_CHECKED_IN";
65
+ /** Return only member rsvp */
66
+ RsvpTag["MEMBER"] = "MEMBER";
67
+ })(RsvpTag || (RsvpTag = {}));
68
+ const _bulkUpdateRsvpRequest = {};
69
+ const _bulkUpdateRsvpResponse = { rsvps: '_rsvp' };
70
+ const _checkInRsvpRequest = {};
71
+ const _checkInRsvpResponse = { rsvp: '_rsvp' };
72
+ const _createRsvpRequest = { form: '_formResponse' };
73
+ const _createRsvpResponse = { rsvp: '_rsvp' };
74
+ const _deleteRsvpCheckInRequest = {};
75
+ const _deleteRsvpCheckInResponse = { rsvp: '_rsvp' };
76
+ const _deleteRsvpRequest = {};
77
+ const _deleteRsvpResponse = {};
78
+ const _formattedAddress = { address: 'wix.common.Address' };
79
+ const _formResponse = { inputValues: '_inputValue' };
80
+ const _getRsvpRequest = {};
81
+ const _getRsvpResponse = { rsvp: '_rsvp' };
82
+ const _inputValue = { address: '_formattedAddress' };
83
+ const _listRsvpRequest = {};
84
+ const _listRsvpResponse = { rsvps: '_rsvp' };
85
+ const _queryRsvpRequest = {};
86
+ const _queryRsvpResponse = { rsvps: '_rsvp' };
87
+ const _rsvp = { rsvpForm: '_formResponse' };
88
+ const _updateRsvpRequest = { rsvpForm: '_formResponse' };
89
+ const _updateRsvpResponse = { rsvp: '_rsvp' };
90
+ /**
91
+ * Retrieves a list of up to 100 RSVPs, given the provided [paging](https://dev.wix.com/api/rest/getting-started/pagination), [filtering & sorting](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-rsvps).
92
+ * @public
93
+ * @documentationMaturity preview
94
+ * @permissionScope Read Events - all read permissions
95
+ * @permissionScope Manage Events - all permissions
96
+ * @permissionScope Manage Guest List
97
+ * @permissionScope Read Event Tickets and Guest List
98
+ * @applicableIdentity APP
99
+ */
100
+ export function listRsvp(options) {
101
+ var _a, _b, _c;
102
+ return __awaiter(this, arguments, void 0, function* () {
103
+ const requestTransformation = {
104
+ offset: '$[0].offset',
105
+ limit: '$[0].limit',
106
+ fieldset: '$[0].fieldset',
107
+ eventId: '$[0].eventId',
108
+ rsvpId: '$[0].rsvpId',
109
+ status: '$[0].status',
110
+ memberId: '$[0].memberId',
111
+ facet: '$[0].facet',
112
+ searchPhrase: '$[0].searchPhrase',
113
+ eventCreatorId: '$[0].eventCreatorId',
114
+ sort: '$[0].sort',
115
+ contactId: '$[0].contactId',
116
+ tag: '$[0].tag',
117
+ };
118
+ const responseTransformation = '$';
119
+ // @ts-ignore
120
+ const { httpClient, sideEffects } = arguments[1];
121
+ const { toAmbassadorRequest } = serializer({
122
+ rootSchema: _listRsvpRequest,
123
+ depSchemas: {},
124
+ fqdnTransformation: {
125
+ paths: [],
126
+ transformation: _fromVeloEntity,
127
+ },
128
+ customTransformation: requestTransformation,
129
+ });
130
+ const { fromJSON } = serializer({
131
+ rootSchema: _listRsvpResponse,
132
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
133
+ fqdnTransformation: {
134
+ paths: [...['Array#rsvps']],
135
+ transformation: _toVeloEntity,
136
+ },
137
+ customTransformation: responseTransformation,
138
+ });
139
+ const payload = toAmbassadorRequest([options]);
140
+ const reqOpts = ambassadorWixEventsV1Rsvp.listRsvp(payload);
141
+ __log(`"ListRsvp" sending request with: ${__inspect(reqOpts)}`);
142
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
143
+ try {
144
+ const result = yield httpClient.request(reqOpts);
145
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
146
+ return fromJSON(result.data);
147
+ }
148
+ catch (err) {
149
+ const transformedError = sdkTransformError(err, {
150
+ spreadPathsToArguments: {},
151
+ explicitPathsToArguments: {
152
+ offset: '$[0].offset',
153
+ limit: '$[0].limit',
154
+ fieldset: '$[0].fieldset',
155
+ eventId: '$[0].eventId',
156
+ rsvpId: '$[0].rsvpId',
157
+ status: '$[0].status',
158
+ memberId: '$[0].memberId',
159
+ facet: '$[0].facet',
160
+ searchPhrase: '$[0].searchPhrase',
161
+ eventCreatorId: '$[0].eventCreatorId',
162
+ sort: '$[0].sort',
163
+ contactId: '$[0].contactId',
164
+ tag: '$[0].tag',
165
+ },
166
+ singleArgumentUnchanged: false,
167
+ }, ['options']);
168
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
169
+ throw transformedError;
170
+ }
171
+ });
172
+ }
173
+ /**
174
+ * Retrieves a list of up to 100 RSVPs, supporting [structurized queries](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_list-query-rsvps).
175
+ * @public
176
+ * @documentationMaturity preview
177
+ * @permissionScope Read Events - all read permissions
178
+ * @permissionScope Manage Events - all permissions
179
+ * @permissionScope Manage Guest List
180
+ * @permissionScope Read Event Tickets and Guest List
181
+ * @applicableIdentity APP
182
+ */
183
+ export function queryRsvp(options) {
184
+ var _a, _b, _c;
185
+ return __awaiter(this, arguments, void 0, function* () {
186
+ const requestTransformation = {
187
+ offset: '$[0].offset',
188
+ limit: '$[0].limit',
189
+ fieldset: '$[0].fieldset',
190
+ filter: '$[0].filter',
191
+ memberId: '$[0].memberId',
192
+ facet: '$[0].facet',
193
+ searchPhrase: '$[0].searchPhrase',
194
+ eventCreatorId: '$[0].eventCreatorId',
195
+ sort: '$[0].sort',
196
+ contactId: '$[0].contactId',
197
+ tag: '$[0].tag',
198
+ };
199
+ const responseTransformation = '$';
200
+ // @ts-ignore
201
+ const { httpClient, sideEffects } = arguments[1];
202
+ const { toAmbassadorRequest } = serializer({
203
+ rootSchema: _queryRsvpRequest,
204
+ depSchemas: {},
205
+ fqdnTransformation: {
206
+ paths: [],
207
+ transformation: _fromVeloEntity,
208
+ },
209
+ customTransformation: requestTransformation,
210
+ });
211
+ const { fromJSON } = serializer({
212
+ rootSchema: _queryRsvpResponse,
213
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
214
+ fqdnTransformation: {
215
+ paths: [...['Array#rsvps']],
216
+ transformation: _toVeloEntity,
217
+ },
218
+ customTransformation: responseTransformation,
219
+ });
220
+ const payload = toAmbassadorRequest([options]);
221
+ const reqOpts = ambassadorWixEventsV1Rsvp.queryRsvp(payload);
222
+ __log(`"QueryRsvp" sending request with: ${__inspect(reqOpts)}`);
223
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
224
+ try {
225
+ const result = yield httpClient.request(reqOpts);
226
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
227
+ return fromJSON(result.data);
228
+ }
229
+ catch (err) {
230
+ const transformedError = sdkTransformError(err, {
231
+ spreadPathsToArguments: {},
232
+ explicitPathsToArguments: {
233
+ offset: '$[0].offset',
234
+ limit: '$[0].limit',
235
+ fieldset: '$[0].fieldset',
236
+ filter: '$[0].filter',
237
+ memberId: '$[0].memberId',
238
+ facet: '$[0].facet',
239
+ searchPhrase: '$[0].searchPhrase',
240
+ eventCreatorId: '$[0].eventCreatorId',
241
+ sort: '$[0].sort',
242
+ contactId: '$[0].contactId',
243
+ tag: '$[0].tag',
244
+ },
245
+ singleArgumentUnchanged: false,
246
+ }, ['options']);
247
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
248
+ throw transformedError;
249
+ }
250
+ });
251
+ }
252
+ /**
253
+ * Retrieves an RSVP.
254
+ * @param rsvpId - RSVP ID.
255
+ * @public
256
+ * @documentationMaturity preview
257
+ * @requiredField rsvpId
258
+ * @permissionScope Read Events - all read permissions
259
+ * @permissionScope Manage Events - all permissions
260
+ * @permissionScope Manage Guest List
261
+ * @permissionScope Read Event Tickets and Guest List
262
+ * @applicableIdentity APP
263
+ * @returns RSVP.
264
+ */
265
+ export function getRsvp(rsvpId, options) {
266
+ var _a, _b, _c;
267
+ return __awaiter(this, arguments, void 0, function* () {
268
+ const requestTransformation = {
269
+ rsvpId: '$[0]',
270
+ eventId: '$[1].eventId',
271
+ fieldset: '$[1].fieldset',
272
+ };
273
+ const responseTransformation = '$.rsvp';
274
+ // @ts-ignore
275
+ const { httpClient, sideEffects } = arguments[2];
276
+ const { toAmbassadorRequest } = serializer({
277
+ rootSchema: _getRsvpRequest,
278
+ depSchemas: {},
279
+ fqdnTransformation: {
280
+ paths: [],
281
+ transformation: _fromVeloEntity,
282
+ },
283
+ customTransformation: requestTransformation,
284
+ });
285
+ const { fromJSON } = serializer({
286
+ rootSchema: _getRsvpResponse,
287
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
288
+ fqdnTransformation: {
289
+ paths: [...['rsvp']],
290
+ transformation: _toVeloEntity,
291
+ },
292
+ customTransformation: responseTransformation,
293
+ });
294
+ const payload = toAmbassadorRequest([rsvpId, options]);
295
+ const reqOpts = ambassadorWixEventsV1Rsvp.getRsvp(payload);
296
+ __log(`"GetRsvp" sending request with: ${__inspect(reqOpts)}`);
297
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
298
+ try {
299
+ const result = yield httpClient.request(reqOpts);
300
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
301
+ return fromJSON(result.data);
302
+ }
303
+ catch (err) {
304
+ const transformedError = sdkTransformError(err, {
305
+ spreadPathsToArguments: {},
306
+ explicitPathsToArguments: {
307
+ rsvpId: '$[0]',
308
+ eventId: '$[1].eventId',
309
+ fieldset: '$[1].fieldset',
310
+ },
311
+ singleArgumentUnchanged: false,
312
+ }, ['rsvpId', 'options']);
313
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
314
+ throw transformedError;
315
+ }
316
+ });
317
+ }
318
+ /**
319
+ * Creates an RSVP, associated with a contact of the site.
320
+ * @public
321
+ * @documentationMaturity preview
322
+ * @applicableIdentity MEMBER
323
+ * @applicableIdentity VISITOR
324
+ */
325
+ export function createRsvp(options) {
326
+ var _a, _b, _c;
327
+ return __awaiter(this, arguments, void 0, function* () {
328
+ const requestTransformation = {
329
+ eventId: '$[0].eventId',
330
+ form: '$[0].form',
331
+ status: '$[0].status',
332
+ memberId: '$[0].memberId',
333
+ options: '$[0].options',
334
+ };
335
+ const responseTransformation = '$';
336
+ // @ts-ignore
337
+ const { httpClient, sideEffects } = arguments[1];
338
+ const { toAmbassadorRequest } = serializer({
339
+ rootSchema: _createRsvpRequest,
340
+ depSchemas: { _formResponse, _formattedAddress, _inputValue },
341
+ fqdnTransformation: {
342
+ paths: [],
343
+ transformation: _fromVeloEntity,
344
+ },
345
+ customTransformation: requestTransformation,
346
+ });
347
+ const { fromJSON } = serializer({
348
+ rootSchema: _createRsvpResponse,
349
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
350
+ fqdnTransformation: {
351
+ paths: [...['rsvp']],
352
+ transformation: _toVeloEntity,
353
+ },
354
+ customTransformation: responseTransformation,
355
+ });
356
+ const payload = toAmbassadorRequest([options]);
357
+ const reqOpts = ambassadorWixEventsV1Rsvp.createRsvp(payload);
358
+ __log(`"CreateRsvp" sending request with: ${__inspect(reqOpts)}`);
359
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
360
+ try {
361
+ const result = yield httpClient.request(reqOpts);
362
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
363
+ return fromJSON(result.data);
364
+ }
365
+ catch (err) {
366
+ const transformedError = sdkTransformError(err, {
367
+ spreadPathsToArguments: {},
368
+ explicitPathsToArguments: {
369
+ eventId: '$[0].eventId',
370
+ form: '$[0].form',
371
+ status: '$[0].status',
372
+ memberId: '$[0].memberId',
373
+ options: '$[0].options',
374
+ },
375
+ singleArgumentUnchanged: false,
376
+ }, ['options']);
377
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
378
+ throw transformedError;
379
+ }
380
+ });
381
+ }
382
+ /**
383
+ * Updates an RSVP. See [partial updates](https://dev.wix.com/api/wix-events/partial-updates).
384
+ * @param rsvpId - RSVP ID.
385
+ * @param eventId - Event ID.
386
+ * @public
387
+ * @documentationMaturity preview
388
+ * @requiredField eventId
389
+ * @requiredField rsvpId
390
+ * @permissionScope Manage Events - all permissions
391
+ * @permissionScope Manage Guest List
392
+ * @applicableIdentity APP
393
+ */
394
+ export function updateRsvp(rsvpId, eventId, options) {
395
+ var _a, _b, _c;
396
+ return __awaiter(this, arguments, void 0, function* () {
397
+ const requestTransformation = {
398
+ rsvpId: '$[0]',
399
+ eventId: '$[1]',
400
+ rsvpForm: '$[2].rsvpForm',
401
+ status: '$[2].status',
402
+ options: '$[2].options',
403
+ };
404
+ const responseTransformation = '$';
405
+ // @ts-ignore
406
+ const { httpClient, sideEffects } = arguments[3];
407
+ const { toAmbassadorRequest } = serializer({
408
+ rootSchema: _updateRsvpRequest,
409
+ depSchemas: { _formResponse, _formattedAddress, _inputValue },
410
+ fqdnTransformation: {
411
+ paths: [],
412
+ transformation: _fromVeloEntity,
413
+ },
414
+ customTransformation: requestTransformation,
415
+ });
416
+ const { fromJSON } = serializer({
417
+ rootSchema: _updateRsvpResponse,
418
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
419
+ fqdnTransformation: {
420
+ paths: [...['rsvp']],
421
+ transformation: _toVeloEntity,
422
+ },
423
+ customTransformation: responseTransformation,
424
+ });
425
+ const payload = toAmbassadorRequest([rsvpId, eventId, options]);
426
+ const reqOpts = ambassadorWixEventsV1Rsvp.updateRsvp(payload);
427
+ __log(`"UpdateRsvp" sending request with: ${__inspect(reqOpts)}`);
428
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
429
+ try {
430
+ const result = yield httpClient.request(reqOpts);
431
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
432
+ return fromJSON(result.data);
433
+ }
434
+ catch (err) {
435
+ const transformedError = sdkTransformError(err, {
436
+ spreadPathsToArguments: {},
437
+ explicitPathsToArguments: {
438
+ rsvpId: '$[0]',
439
+ eventId: '$[1]',
440
+ rsvpForm: '$[2].rsvpForm',
441
+ status: '$[2].status',
442
+ options: '$[2].options',
443
+ },
444
+ singleArgumentUnchanged: false,
445
+ }, ['rsvpId', 'eventId', 'options']);
446
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
447
+ throw transformedError;
448
+ }
449
+ });
450
+ }
451
+ /**
452
+ * Updates multiple RSVPs - status only.
453
+ * @param eventId - Event ID.
454
+ * @public
455
+ * @documentationMaturity preview
456
+ * @requiredField eventId
457
+ * @permissionScope Manage Events - all permissions
458
+ * @permissionScope Manage Guest List
459
+ * @applicableIdentity APP
460
+ */
461
+ export function bulkUpdateRsvp(eventId, options) {
462
+ var _a, _b, _c;
463
+ return __awaiter(this, arguments, void 0, function* () {
464
+ const requestTransformation = {
465
+ eventId: '$[0]',
466
+ rsvpId: '$[1].rsvpId',
467
+ status: '$[1].status',
468
+ };
469
+ const responseTransformation = '$';
470
+ // @ts-ignore
471
+ const { httpClient, sideEffects } = arguments[2];
472
+ const { toAmbassadorRequest } = serializer({
473
+ rootSchema: _bulkUpdateRsvpRequest,
474
+ depSchemas: {},
475
+ fqdnTransformation: {
476
+ paths: [],
477
+ transformation: _fromVeloEntity,
478
+ },
479
+ customTransformation: requestTransformation,
480
+ });
481
+ const { fromJSON } = serializer({
482
+ rootSchema: _bulkUpdateRsvpResponse,
483
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
484
+ fqdnTransformation: {
485
+ paths: [...['Array#rsvps']],
486
+ transformation: _toVeloEntity,
487
+ },
488
+ customTransformation: responseTransformation,
489
+ });
490
+ const payload = toAmbassadorRequest([eventId, options]);
491
+ const reqOpts = ambassadorWixEventsV1Rsvp.bulkUpdateRsvp(payload);
492
+ __log(`"BulkUpdateRsvp" sending request with: ${__inspect(reqOpts)}`);
493
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
494
+ try {
495
+ const result = yield httpClient.request(reqOpts);
496
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
497
+ return fromJSON(result.data);
498
+ }
499
+ catch (err) {
500
+ const transformedError = sdkTransformError(err, {
501
+ spreadPathsToArguments: {},
502
+ explicitPathsToArguments: {
503
+ eventId: '$[0]',
504
+ rsvpId: '$[1].rsvpId',
505
+ status: '$[1].status',
506
+ },
507
+ singleArgumentUnchanged: false,
508
+ }, ['eventId', 'options']);
509
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
510
+ throw transformedError;
511
+ }
512
+ });
513
+ }
514
+ /**
515
+ * Deletes an RSVP.
516
+ * @param eventId - Event ID.
517
+ * @public
518
+ * @documentationMaturity preview
519
+ * @requiredField eventId
520
+ * @permissionScope Manage Events - all permissions
521
+ * @permissionScope Manage Guest List
522
+ * @applicableIdentity APP
523
+ */
524
+ export function deleteRsvp(eventId, options) {
525
+ var _a, _b, _c;
526
+ return __awaiter(this, arguments, void 0, function* () {
527
+ const requestTransformation = { eventId: '$[0]', rsvps: '$[1].rsvps' };
528
+ const responseTransformation = '$';
529
+ // @ts-ignore
530
+ const { httpClient, sideEffects } = arguments[2];
531
+ const { toAmbassadorRequest } = serializer({
532
+ rootSchema: _deleteRsvpRequest,
533
+ depSchemas: {},
534
+ fqdnTransformation: {
535
+ paths: [],
536
+ transformation: _fromVeloEntity,
537
+ },
538
+ customTransformation: requestTransformation,
539
+ });
540
+ const { fromJSON } = serializer({
541
+ rootSchema: _deleteRsvpResponse,
542
+ depSchemas: {},
543
+ fqdnTransformation: {
544
+ paths: [],
545
+ transformation: _toVeloEntity,
546
+ },
547
+ customTransformation: responseTransformation,
548
+ });
549
+ const payload = toAmbassadorRequest([eventId, options]);
550
+ const reqOpts = ambassadorWixEventsV1Rsvp.deleteRsvp(payload);
551
+ __log(`"DeleteRsvp" sending request with: ${__inspect(reqOpts)}`);
552
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
553
+ try {
554
+ const result = yield httpClient.request(reqOpts);
555
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
556
+ }
557
+ catch (err) {
558
+ const transformedError = sdkTransformError(err, {
559
+ spreadPathsToArguments: {},
560
+ explicitPathsToArguments: { eventId: '$[0]', rsvps: '$[1].rsvps' },
561
+ singleArgumentUnchanged: false,
562
+ }, ['eventId', 'options']);
563
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
564
+ throw transformedError;
565
+ }
566
+ });
567
+ }
568
+ /**
569
+ * Checks-in an RSVP.
570
+ * @param eventId - Event ID.
571
+ * @public
572
+ * @documentationMaturity preview
573
+ * @requiredField eventId
574
+ * @requiredField options.rsvpId
575
+ */
576
+ export function checkInRsvp(eventId, options) {
577
+ var _a, _b, _c;
578
+ return __awaiter(this, arguments, void 0, function* () {
579
+ const requestTransformation = {
580
+ eventId: '$[0]',
581
+ rsvpId: '$[1].rsvpId',
582
+ guestId: '$[1].guestId',
583
+ };
584
+ const responseTransformation = '$';
585
+ // @ts-ignore
586
+ const { httpClient, sideEffects } = arguments[2];
587
+ const { toAmbassadorRequest } = serializer({
588
+ rootSchema: _checkInRsvpRequest,
589
+ depSchemas: {},
590
+ fqdnTransformation: {
591
+ paths: [],
592
+ transformation: _fromVeloEntity,
593
+ },
594
+ customTransformation: requestTransformation,
595
+ });
596
+ const { fromJSON } = serializer({
597
+ rootSchema: _checkInRsvpResponse,
598
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
599
+ fqdnTransformation: {
600
+ paths: [...['rsvp']],
601
+ transformation: _toVeloEntity,
602
+ },
603
+ customTransformation: responseTransformation,
604
+ });
605
+ const payload = toAmbassadorRequest([eventId, options]);
606
+ const reqOpts = ambassadorWixEventsV1Rsvp.checkInRsvp(payload);
607
+ __log(`"CheckInRsvp" sending request with: ${__inspect(reqOpts)}`);
608
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
609
+ try {
610
+ const result = yield httpClient.request(reqOpts);
611
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
612
+ return fromJSON(result.data);
613
+ }
614
+ catch (err) {
615
+ const transformedError = sdkTransformError(err, {
616
+ spreadPathsToArguments: {},
617
+ explicitPathsToArguments: {
618
+ eventId: '$[0]',
619
+ rsvpId: '$[1].rsvpId',
620
+ guestId: '$[1].guestId',
621
+ },
622
+ singleArgumentUnchanged: false,
623
+ }, ['eventId', 'options']);
624
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
625
+ throw transformedError;
626
+ }
627
+ });
628
+ }
629
+ /**
630
+ * Deletes an RSVP check-in.
631
+ * @param eventId - Event ID.
632
+ * @public
633
+ * @documentationMaturity preview
634
+ * @requiredField eventId
635
+ * @requiredField options.rsvpId
636
+ */
637
+ export function deleteRsvpCheckIn(eventId, options) {
638
+ var _a, _b, _c;
639
+ return __awaiter(this, arguments, void 0, function* () {
640
+ const requestTransformation = {
641
+ eventId: '$[0]',
642
+ rsvpId: '$[1].rsvpId',
643
+ guestId: '$[1].guestId',
644
+ };
645
+ const responseTransformation = '$';
646
+ // @ts-ignore
647
+ const { httpClient, sideEffects } = arguments[2];
648
+ const { toAmbassadorRequest } = serializer({
649
+ rootSchema: _deleteRsvpCheckInRequest,
650
+ depSchemas: {},
651
+ fqdnTransformation: {
652
+ paths: [],
653
+ transformation: _fromVeloEntity,
654
+ },
655
+ customTransformation: requestTransformation,
656
+ });
657
+ const { fromJSON } = serializer({
658
+ rootSchema: _deleteRsvpCheckInResponse,
659
+ depSchemas: { _formResponse, _formattedAddress, _inputValue, _rsvp },
660
+ fqdnTransformation: {
661
+ paths: [...['rsvp']],
662
+ transformation: _toVeloEntity,
663
+ },
664
+ customTransformation: responseTransformation,
665
+ });
666
+ const payload = toAmbassadorRequest([eventId, options]);
667
+ const reqOpts = ambassadorWixEventsV1Rsvp.deleteRsvpCheckIn(payload);
668
+ __log(`"DeleteRsvpCheckIn" sending request with: ${__inspect(reqOpts)}`);
669
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
670
+ try {
671
+ const result = yield httpClient.request(reqOpts);
672
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
673
+ return fromJSON(result.data);
674
+ }
675
+ catch (err) {
676
+ const transformedError = sdkTransformError(err, {
677
+ spreadPathsToArguments: {},
678
+ explicitPathsToArguments: {
679
+ eventId: '$[0]',
680
+ rsvpId: '$[1].rsvpId',
681
+ guestId: '$[1].guestId',
682
+ },
683
+ singleArgumentUnchanged: false,
684
+ }, ['eventId', 'options']);
685
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
686
+ throw transformedError;
687
+ }
688
+ });
689
+ }
690
+ //# sourceMappingURL=events-v1-rsvp.universal.js.map