@wix/auto_sdk_calendar_events 1.0.29 → 1.0.30

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.
@@ -74,120 +74,7 @@ function resolveWixCalendarEventsV3EventsServiceUrl(opts) {
74
74
  };
75
75
  return resolveUrl(Object.assign(opts, { domainToMappings }));
76
76
  }
77
- function resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl(opts) {
78
- const domainToMappings = {
79
- "api._api_base_domain_": [
80
- {
81
- srcPath: "/participant-events-3",
82
- destPath: ""
83
- }
84
- ],
85
- "manage._base_domain_": [
86
- {
87
- srcPath: "/_api/calendar/v3/events/memberId",
88
- destPath: "/v3/events/memberId"
89
- },
90
- {
91
- srcPath: "/_api/calendar/v3/events/contactId",
92
- destPath: "/v3/events/contactId"
93
- }
94
- ],
95
- "www.wixapis.com": [
96
- {
97
- srcPath: "/calendar/v3/events/contactId",
98
- destPath: "/v3/events/contactId"
99
- },
100
- {
101
- srcPath: "/calendar/v3/events/memberId",
102
- destPath: "/v3/events/memberId"
103
- }
104
- ],
105
- _: [
106
- {
107
- srcPath: "/_api/calendar/v3/events/memberId",
108
- destPath: "/v3/events/memberId"
109
- }
110
- ],
111
- "*.dev.wix-code.com": [
112
- {
113
- srcPath: "/_api/calendar/v3/events/memberId",
114
- destPath: "/v3/events/memberId"
115
- },
116
- {
117
- srcPath: "/_api/calendar/v3/events/contactId",
118
- destPath: "/v3/events/contactId"
119
- }
120
- ]
121
- };
122
- return resolveUrl(Object.assign(opts, { domainToMappings }));
123
- }
124
77
  var PACKAGE_NAME = "@wix/auto_sdk_calendar_events";
125
- function listEventsByContactId(payload) {
126
- function __listEventsByContactId({ host }) {
127
- const metadata = {
128
- entityFqdn: "wix.calendar.v3.event",
129
- method: "GET",
130
- methodFqn: "wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByContactId",
131
- packageName: PACKAGE_NAME,
132
- url: resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl({
133
- protoPath: "/v3/events/contactId/{contactId}",
134
- data: payload,
135
- host
136
- }),
137
- params: toURLSearchParams(payload),
138
- transformResponse: (payload2) => transformPaths(payload2, [
139
- {
140
- transformFn: transformRESTTimestampToSDKTimestamp,
141
- paths: [
142
- { path: "events.createdDate" },
143
- { path: "events.updatedDate" },
144
- { path: "events.start.utcDate" },
145
- { path: "events.end.utcDate" },
146
- { path: "events.adjustedStart.utcDate" },
147
- { path: "events.adjustedEnd.utcDate" },
148
- { path: "events.recurrenceRule.until.utcDate" },
149
- { path: "events.recurrenceRule.adjustedUntil.utcDate" }
150
- ]
151
- }
152
- ])
153
- };
154
- return metadata;
155
- }
156
- return __listEventsByContactId;
157
- }
158
- function listEventsByMemberId(payload) {
159
- function __listEventsByMemberId({ host }) {
160
- const metadata = {
161
- entityFqdn: "wix.calendar.v3.event",
162
- method: "GET",
163
- methodFqn: "wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByMemberId",
164
- packageName: PACKAGE_NAME,
165
- url: resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl({
166
- protoPath: "/v3/events/memberId/{memberId}",
167
- data: payload,
168
- host
169
- }),
170
- params: toURLSearchParams(payload),
171
- transformResponse: (payload2) => transformPaths(payload2, [
172
- {
173
- transformFn: transformRESTTimestampToSDKTimestamp,
174
- paths: [
175
- { path: "events.createdDate" },
176
- { path: "events.updatedDate" },
177
- { path: "events.start.utcDate" },
178
- { path: "events.end.utcDate" },
179
- { path: "events.adjustedStart.utcDate" },
180
- { path: "events.adjustedEnd.utcDate" },
181
- { path: "events.recurrenceRule.until.utcDate" },
182
- { path: "events.recurrenceRule.adjustedUntil.utcDate" }
183
- ]
184
- }
185
- ])
186
- };
187
- return metadata;
188
- }
189
- return __listEventsByMemberId;
190
- }
191
78
  function getEvent(payload) {
192
79
  function __getEvent({ host }) {
193
80
  const metadata = {
@@ -739,6 +626,17 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
739
626
  WebhookIdentityType2["APP"] = "APP";
740
627
  return WebhookIdentityType2;
741
628
  })(WebhookIdentityType || {});
629
+ var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
630
+ RequestedFields2["UNKNOWN_REQUESTED_FIELDS"] = "UNKNOWN_REQUESTED_FIELDS";
631
+ RequestedFields2["PI_FIELDS"] = "PI_FIELDS";
632
+ RequestedFields2["OWN_PI_FIELDS"] = "OWN_PI_FIELDS";
633
+ return RequestedFields2;
634
+ })(RequestedFields || {});
635
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
636
+ SortOrder2["ASC"] = "ASC";
637
+ SortOrder2["DESC"] = "DESC";
638
+ return SortOrder2;
639
+ })(SortOrder || {});
742
640
  var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
743
641
  PlacementType2["BEFORE"] = "BEFORE";
744
642
  PlacementType2["AFTER"] = "AFTER";
@@ -761,93 +659,6 @@ var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
761
659
  ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
762
660
  return ResolutionMethod2;
763
661
  })(ResolutionMethod || {});
764
- var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
765
- RequestedFields2["UNKNOWN_REQUESTED_FIELDS"] = "UNKNOWN_REQUESTED_FIELDS";
766
- RequestedFields2["PI_FIELDS"] = "PI_FIELDS";
767
- RequestedFields2["OWN_PI_FIELDS"] = "OWN_PI_FIELDS";
768
- return RequestedFields2;
769
- })(RequestedFields || {});
770
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
771
- SortOrder2["ASC"] = "ASC";
772
- SortOrder2["DESC"] = "DESC";
773
- return SortOrder2;
774
- })(SortOrder || {});
775
- async function listEventsByContactId2(contactId, options) {
776
- const { httpClient, sideEffects } = arguments[2];
777
- const payload = renameKeysFromSDKRequestToRESTRequest({
778
- contactId,
779
- fromLocalDate: options?.fromLocalDate,
780
- toLocalDate: options?.toLocalDate,
781
- timeZone: options?.timeZone,
782
- appId: options?.appId,
783
- cursorPaging: options?.cursorPaging
784
- });
785
- const reqOpts = listEventsByContactId(payload);
786
- sideEffects?.onSiteCall?.();
787
- try {
788
- const result = await httpClient.request(reqOpts);
789
- sideEffects?.onSuccess?.(result);
790
- return renameKeysFromRESTResponseToSDKResponse(result.data);
791
- } catch (err) {
792
- const transformedError = sdkTransformError(
793
- err,
794
- {
795
- spreadPathsToArguments: {},
796
- explicitPathsToArguments: {
797
- contactId: "$[0]",
798
- fromLocalDate: "$[1].fromLocalDate",
799
- toLocalDate: "$[1].toLocalDate",
800
- timeZone: "$[1].timeZone",
801
- appId: "$[1].appId",
802
- cursorPaging: "$[1].cursorPaging"
803
- },
804
- singleArgumentUnchanged: false
805
- },
806
- ["contactId", "options"]
807
- );
808
- sideEffects?.onError?.(err);
809
- throw transformedError;
810
- }
811
- }
812
- async function listEventsByMemberId2(memberId, options) {
813
- const { httpClient, sideEffects } = arguments[2];
814
- const payload = renameKeysFromSDKRequestToRESTRequest({
815
- memberId,
816
- fromLocalDate: options?.fromLocalDate,
817
- toLocalDate: options?.toLocalDate,
818
- timeZone: options?.timeZone,
819
- appId: options?.appId,
820
- cursorPaging: options?.cursorPaging,
821
- eventIds: options?.eventIds
822
- });
823
- const reqOpts = listEventsByMemberId(payload);
824
- sideEffects?.onSiteCall?.();
825
- try {
826
- const result = await httpClient.request(reqOpts);
827
- sideEffects?.onSuccess?.(result);
828
- return renameKeysFromRESTResponseToSDKResponse(result.data);
829
- } catch (err) {
830
- const transformedError = sdkTransformError(
831
- err,
832
- {
833
- spreadPathsToArguments: {},
834
- explicitPathsToArguments: {
835
- memberId: "$[0]",
836
- fromLocalDate: "$[1].fromLocalDate",
837
- toLocalDate: "$[1].toLocalDate",
838
- timeZone: "$[1].timeZone",
839
- appId: "$[1].appId",
840
- cursorPaging: "$[1].cursorPaging",
841
- eventIds: "$[1].eventIds"
842
- },
843
- singleArgumentUnchanged: false
844
- },
845
- ["memberId", "options"]
846
- );
847
- sideEffects?.onError?.(err);
848
- throw transformedError;
849
- }
850
- }
851
662
  async function getEvent2(eventId, options) {
852
663
  const { httpClient, sideEffects } = arguments[2];
853
664
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1214,22 +1025,6 @@ async function bulkCancelEvent2(eventIds, options) {
1214
1025
  }
1215
1026
 
1216
1027
  // src/calendar-v3-event-events.public.ts
1217
- function listEventsByContactId3(httpClient) {
1218
- return (contactId, options) => listEventsByContactId2(
1219
- contactId,
1220
- options,
1221
- // @ts-ignore
1222
- { httpClient }
1223
- );
1224
- }
1225
- function listEventsByMemberId3(httpClient) {
1226
- return (memberId, options) => listEventsByMemberId2(
1227
- memberId,
1228
- options,
1229
- // @ts-ignore
1230
- { httpClient }
1231
- );
1232
- }
1233
1028
  function getEvent3(httpClient) {
1234
1029
  return (eventId, options) => getEvent2(
1235
1030
  eventId,
@@ -1438,8 +1233,6 @@ var onEventUpdated = EventDefinition(
1438
1233
  // src/calendar-v3-event-events.context.ts
1439
1234
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1440
1235
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1441
- var listEventsByContactId4 = /* @__PURE__ */ createRESTModule(listEventsByContactId3);
1442
- var listEventsByMemberId4 = /* @__PURE__ */ createRESTModule(listEventsByMemberId3);
1443
1236
  var getEvent4 = /* @__PURE__ */ createRESTModule(getEvent3);
1444
1237
  var listEvents4 = /* @__PURE__ */ createRESTModule(listEvents3);
1445
1238
  var queryEvents4 = /* @__PURE__ */ createRESTModule(queryEvents3);
@@ -1480,8 +1273,6 @@ export {
1480
1273
  createEvent4 as createEvent,
1481
1274
  getEvent4 as getEvent,
1482
1275
  listEvents4 as listEvents,
1483
- listEventsByContactId4 as listEventsByContactId,
1484
- listEventsByMemberId4 as listEventsByMemberId,
1485
1276
  onEventCancelled2 as onEventCancelled,
1486
1277
  onEventCreated2 as onEventCreated,
1487
1278
  onEventRecurringSplit2 as onEventRecurringSplit,