@wix/auto_sdk_loyalty_social-media 1.0.2 → 1.0.4

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/index.d.mts +38 -0
  2. package/build/index.d.ts +38 -0
  3. package/build/index.js +259 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +231 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +38 -0
  8. package/build/internal/index.d.ts +38 -0
  9. package/build/internal/index.js +259 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +231 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/internal/{cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts → loyalty-socialmedia-v1-followed-channel-social-media.universal-CLHk4ued.d.mts} +23 -83
  14. package/build/internal/{es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts → loyalty-socialmedia-v1-followed-channel-social-media.universal-CLHk4ued.d.ts} +23 -83
  15. package/build/internal/meta.d.mts +69 -0
  16. package/build/internal/meta.d.ts +69 -0
  17. package/build/internal/meta.js +177 -0
  18. package/build/internal/meta.js.map +1 -0
  19. package/build/internal/meta.mjs +149 -0
  20. package/build/internal/meta.mjs.map +1 -0
  21. package/build/{cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts → loyalty-socialmedia-v1-followed-channel-social-media.universal-CLHk4ued.d.mts} +23 -83
  22. package/build/{es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts → loyalty-socialmedia-v1-followed-channel-social-media.universal-CLHk4ued.d.ts} +23 -83
  23. package/build/meta.d.mts +69 -0
  24. package/build/meta.d.ts +69 -0
  25. package/build/meta.js +177 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +149 -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/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +0 -12
  40. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +0 -17
  41. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +0 -1
  42. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +0 -17
  43. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +0 -121
  44. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +0 -1
  45. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +0 -14
  46. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +0 -66
  47. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +0 -1
  48. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +0 -31
  49. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +0 -34
  50. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +0 -1
  51. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +0 -208
  52. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +0 -27
  53. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +0 -1
  54. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +0 -136
  55. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.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/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +0 -12
  67. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +0 -12
  68. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +0 -1
  69. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +0 -17
  70. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +0 -116
  71. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +0 -1
  72. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +0 -14
  73. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +0 -38
  74. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +0 -1
  75. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +0 -31
  76. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +0 -27
  77. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +0 -1
  78. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +0 -208
  79. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +0 -24
  80. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +0 -1
  81. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +0 -108
  82. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.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/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +0 -12
  93. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +0 -17
  94. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +0 -1
  95. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +0 -17
  96. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +0 -121
  97. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +0 -1
  98. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +0 -14
  99. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +0 -66
  100. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +0 -1
  101. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +0 -31
  102. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +0 -34
  103. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +0 -1
  104. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +0 -208
  105. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +0 -27
  106. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +0 -1
  107. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +0 -136
  108. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.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/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +0 -12
  119. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +0 -12
  120. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +0 -1
  121. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +0 -17
  122. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +0 -116
  123. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +0 -1
  124. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +0 -14
  125. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +0 -38
  126. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +0 -1
  127. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +0 -31
  128. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +0 -27
  129. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +0 -1
  130. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +0 -208
  131. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +0 -24
  132. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +0 -1
  133. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +0 -108
  134. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js.map +0 -1
@@ -0,0 +1,231 @@
1
+ // src/loyalty-socialmedia-v1-followed-channel-social-media.public.ts
2
+ import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
3
+ import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
4
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
5
+ import { EventDefinition } from "@wix/sdk-types";
6
+
7
+ // src/loyalty-socialmedia-v1-followed-channel-social-media.universal.ts
8
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
9
+ import {
10
+ renameKeysFromSDKRequestToRESTRequest,
11
+ renameKeysFromRESTResponseToSDKResponse
12
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
13
+
14
+ // src/loyalty-socialmedia-v1-followed-channel-social-media.http.ts
15
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
16
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
17
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
18
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
19
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
20
+ function resolveWixLoyaltySocialmediaV1LoyaltySocialMediaUrl(opts) {
21
+ const domainToMappings = {
22
+ _: [
23
+ {
24
+ srcPath: "/_api/loyalty-social-media",
25
+ destPath: ""
26
+ }
27
+ ],
28
+ "editor._base_domain_": [
29
+ {
30
+ srcPath: "/_api/loyalty-social-media",
31
+ destPath: ""
32
+ }
33
+ ],
34
+ "blocks._base_domain_": [
35
+ {
36
+ srcPath: "/_api/loyalty-social-media",
37
+ destPath: ""
38
+ }
39
+ ],
40
+ "create.editorx": [
41
+ {
42
+ srcPath: "/_api/loyalty-social-media",
43
+ destPath: ""
44
+ }
45
+ ],
46
+ "www.wixapis.com": [
47
+ {
48
+ srcPath: "/loyalty-social-media",
49
+ destPath: ""
50
+ }
51
+ ],
52
+ "*.dev.wix-code.com": [
53
+ {
54
+ srcPath: "/_api/loyalty-social-media",
55
+ destPath: ""
56
+ }
57
+ ]
58
+ };
59
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
60
+ }
61
+ var PACKAGE_NAME = "@wix/auto_sdk_loyalty_social-media";
62
+ function createFollowedChannel(payload) {
63
+ function __createFollowedChannel({ host }) {
64
+ const serializedData = transformPaths(payload, [
65
+ {
66
+ transformFn: transformSDKTimestampToRESTTimestamp,
67
+ paths: [{ path: "followedChannel.createdDate" }]
68
+ }
69
+ ]);
70
+ const metadata = {
71
+ entityFqdn: "wix.loyalty.socialmedia.v1.followed_channel",
72
+ method: "POST",
73
+ methodFqn: "wix.loyalty.socialmedia.v1.LoyaltySocialMedia.CreateFollowedChannel",
74
+ packageName: PACKAGE_NAME,
75
+ url: resolveWixLoyaltySocialmediaV1LoyaltySocialMediaUrl({
76
+ protoPath: "/v1/followed-channels",
77
+ data: serializedData,
78
+ host
79
+ }),
80
+ data: serializedData,
81
+ transformResponse: (payload2) => transformPaths(payload2, [
82
+ {
83
+ transformFn: transformRESTTimestampToSDKTimestamp,
84
+ paths: [{ path: "followedChannel.createdDate" }]
85
+ }
86
+ ])
87
+ };
88
+ return metadata;
89
+ }
90
+ return __createFollowedChannel;
91
+ }
92
+ function listFollowedChannels(payload) {
93
+ function __listFollowedChannels({ host }) {
94
+ const metadata = {
95
+ entityFqdn: "wix.loyalty.socialmedia.v1.followed_channel",
96
+ method: "GET",
97
+ methodFqn: "wix.loyalty.socialmedia.v1.LoyaltySocialMedia.ListFollowedChannels",
98
+ packageName: PACKAGE_NAME,
99
+ url: resolveWixLoyaltySocialmediaV1LoyaltySocialMediaUrl({
100
+ protoPath: "/v1/followed-channels",
101
+ data: payload,
102
+ host
103
+ }),
104
+ params: toURLSearchParams(payload),
105
+ transformResponse: (payload2) => transformPaths(payload2, [
106
+ {
107
+ transformFn: transformRESTTimestampToSDKTimestamp,
108
+ paths: [{ path: "followedChannels.createdDate" }]
109
+ }
110
+ ])
111
+ };
112
+ return metadata;
113
+ }
114
+ return __listFollowedChannels;
115
+ }
116
+
117
+ // src/loyalty-socialmedia-v1-followed-channel-social-media.universal.ts
118
+ var Type = /* @__PURE__ */ ((Type2) => {
119
+ Type2["UNKNOWN_CHANNEL"] = "UNKNOWN_CHANNEL";
120
+ Type2["FACEBOOK"] = "FACEBOOK";
121
+ Type2["INSTAGRAM"] = "INSTAGRAM";
122
+ Type2["LINKEDIN"] = "LINKEDIN";
123
+ Type2["X"] = "X";
124
+ Type2["TIKTOK"] = "TIKTOK";
125
+ return Type2;
126
+ })(Type || {});
127
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
128
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
129
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
130
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
131
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
132
+ WebhookIdentityType2["APP"] = "APP";
133
+ return WebhookIdentityType2;
134
+ })(WebhookIdentityType || {});
135
+ async function createFollowedChannel2(followedChannel) {
136
+ const { httpClient, sideEffects } = arguments[1];
137
+ const payload = renameKeysFromSDKRequestToRESTRequest({
138
+ followedChannel
139
+ });
140
+ const reqOpts = createFollowedChannel(
141
+ payload
142
+ );
143
+ sideEffects?.onSiteCall?.();
144
+ try {
145
+ const result = await httpClient.request(reqOpts);
146
+ sideEffects?.onSuccess?.(result);
147
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.followedChannel;
148
+ } catch (err) {
149
+ const transformedError = sdkTransformError(
150
+ err,
151
+ {
152
+ spreadPathsToArguments: {},
153
+ explicitPathsToArguments: { followedChannel: "$[0]" },
154
+ singleArgumentUnchanged: false
155
+ },
156
+ ["followedChannel"]
157
+ );
158
+ sideEffects?.onError?.(err);
159
+ throw transformedError;
160
+ }
161
+ }
162
+ async function listFollowedChannels2() {
163
+ const { httpClient, sideEffects } = arguments[0];
164
+ const payload = renameKeysFromSDKRequestToRESTRequest({});
165
+ const reqOpts = listFollowedChannels(
166
+ payload
167
+ );
168
+ sideEffects?.onSiteCall?.();
169
+ try {
170
+ const result = await httpClient.request(reqOpts);
171
+ sideEffects?.onSuccess?.(result);
172
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
173
+ } catch (err) {
174
+ const transformedError = sdkTransformError(
175
+ err,
176
+ {
177
+ spreadPathsToArguments: {},
178
+ explicitPathsToArguments: {},
179
+ singleArgumentUnchanged: false
180
+ },
181
+ []
182
+ );
183
+ sideEffects?.onError?.(err);
184
+ throw transformedError;
185
+ }
186
+ }
187
+
188
+ // src/loyalty-socialmedia-v1-followed-channel-social-media.public.ts
189
+ function createFollowedChannel3(httpClient) {
190
+ return (followedChannel) => createFollowedChannel2(
191
+ followedChannel,
192
+ // @ts-ignore
193
+ { httpClient }
194
+ );
195
+ }
196
+ function listFollowedChannels3(httpClient) {
197
+ return () => listFollowedChannels2(
198
+ // @ts-ignore
199
+ { httpClient }
200
+ );
201
+ }
202
+ var onFollowedChannelCreated = EventDefinition(
203
+ "wix.loyalty.socialmedia.v1.followed_channel_created",
204
+ true,
205
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
206
+ transformPaths2(event, [
207
+ {
208
+ transformFn: transformRESTTimestampToSDKTimestamp2,
209
+ paths: [
210
+ { path: "entity.createdDate" },
211
+ { path: "metadata.eventTime" }
212
+ ]
213
+ }
214
+ ])
215
+ )
216
+ )();
217
+
218
+ // src/loyalty-socialmedia-v1-followed-channel-social-media.context.ts
219
+ import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
220
+ import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
221
+ var createFollowedChannel4 = /* @__PURE__ */ createRESTModule(createFollowedChannel3);
222
+ var listFollowedChannels4 = /* @__PURE__ */ createRESTModule(listFollowedChannels3);
223
+ var onFollowedChannelCreated2 = createEventModule(onFollowedChannelCreated);
224
+ export {
225
+ Type,
226
+ WebhookIdentityType,
227
+ createFollowedChannel4 as createFollowedChannel,
228
+ listFollowedChannels4 as listFollowedChannels,
229
+ onFollowedChannelCreated2 as onFollowedChannelCreated
230
+ };
231
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/loyalty-socialmedia-v1-followed-channel-social-media.public.ts","../../src/loyalty-socialmedia-v1-followed-channel-social-media.universal.ts","../../src/loyalty-socialmedia-v1-followed-channel-social-media.http.ts","../../src/loyalty-socialmedia-v1-followed-channel-social-media.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n FollowedChannel,\n FollowedChannelCreatedEnvelope,\n ListFollowedChannelsResponse,\n createFollowedChannel as universalCreateFollowedChannel,\n listFollowedChannels as universalListFollowedChannels,\n} from './loyalty-socialmedia-v1-followed-channel-social-media.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/loyalty' };\n\nexport function createFollowedChannel(\n httpClient: HttpClient\n): CreateFollowedChannelSignature {\n return (followedChannel: NonNullablePaths<FollowedChannel, `channel`>) =>\n universalCreateFollowedChannel(\n followedChannel,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateFollowedChannelSignature {\n /**\n * Creates an entity for the specified account ID when the account follows a social media channel.\n *\n * Members can only follow enabled channels. A site owner has to enable channels in the dashboard.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n * @param - Followed social media channel details.\n * @returns Followed social media channel details.\n */\n (followedChannel: FollowedChannel): Promise<FollowedChannel>;\n}\n\nexport function listFollowedChannels(\n httpClient: HttpClient\n): ListFollowedChannelsSignature {\n return () =>\n universalListFollowedChannels(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListFollowedChannelsSignature {\n /**\n * Retrieves a list of social media channels followed by the account. The list is ordered by creation date.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\n (): Promise<ListFollowedChannelsResponse>;\n}\n\nexport const onFollowedChannelCreated = EventDefinition(\n 'wix.loyalty.socialmedia.v1.followed_channel_created',\n true,\n (event: FollowedChannelCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<FollowedChannelCreatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CreateFollowedChannelRequest,\n CreateFollowedChannelResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FollowedChannel,\n FollowedChannelCreatedEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListFollowedChannelsRequest,\n ListFollowedChannelsResponse,\n MessageEnvelope,\n RestoreInfo,\n Type,\n WebhookIdentityType,\n} from './loyalty-socialmedia-v1-followed-channel-social-media.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltySocialmediaV1FollowedChannel from './loyalty-socialmedia-v1-followed-channel-social-media.http.js';\n\nexport interface FollowedChannel {\n /**\n * Followed social media channel ID.\n * @readonly\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the account that has followed a social media channel.\n * @readonly\n * @format GUID\n */\n accountId?: string;\n /** Followed social media channel type. */\n channel?: Type;\n /**\n * Date when an entity for following a social media channel was created.\n * @readonly\n */\n _createdDate?: Date | null;\n}\n\nexport enum Type {\n /** Unknown social media channel type. */\n UNKNOWN_CHANNEL = 'UNKNOWN_CHANNEL',\n /** Facebook social media channel. */\n FACEBOOK = 'FACEBOOK',\n /** Instagram social media channel. */\n INSTAGRAM = 'INSTAGRAM',\n /** LinkedIn social media channel. */\n LINKEDIN = 'LINKEDIN',\n /** X social media channel. */\n X = 'X',\n /** TikTok social media channel. */\n TIKTOK = 'TIKTOK',\n}\n\nexport interface CreateFollowedChannelRequest {\n /** Followed social media channel details. */\n followedChannel: FollowedChannel;\n}\n\nexport interface CreateFollowedChannelResponse {\n /** Followed social media channel details. */\n followedChannel?: FollowedChannel;\n}\n\nexport interface ListFollowedChannelsRequest {}\n\nexport interface ListFollowedChannelsResponse {\n /**\n * List of followed social media channels.\n * @maxSize 5\n */\n followedChannels?: FollowedChannel[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * Example: created/updated/deleted/started/completed/email_opened\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * Example: created/updated/deleted/started/completed/email_opened\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface FollowedChannelCreatedEnvelope {\n entity: FollowedChannel;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an account follows a new channel.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ\n * @webhook\n * @eventType wix.loyalty.socialmedia.v1.followed_channel_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onFollowedChannelCreated(\n handler: (event: FollowedChannelCreatedEnvelope) => void | Promise<void>\n): void;\n\ntype FollowedChannelNonNullablePaths = `_id` | `accountId` | `channel`;\n\n/**\n * Creates an entity for the specified account ID when the account follows a social media channel.\n *\n * Members can only follow enabled channels. A site owner has to enable channels in the dashboard.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n * @param followedChannel - Followed social media channel details.\n * @public\n * @documentationMaturity preview\n * @requiredField followedChannel\n * @requiredField followedChannel.channel\n * @permissionId LOYALTY.FOLLOWED_CHANNEL_CREATE\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @returns Followed social media channel details.\n * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.CreateFollowedChannel\n */\nexport async function createFollowedChannel(\n followedChannel: NonNullablePaths<FollowedChannel, `channel`>\n): Promise<NonNullablePaths<FollowedChannel, FollowedChannelNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n followedChannel: followedChannel,\n });\n\n const reqOpts =\n ambassadorWixLoyaltySocialmediaV1FollowedChannel.createFollowedChannel(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.followedChannel!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { followedChannel: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['followedChannel']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of social media channels followed by the account. The list is ordered by creation date.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n * @public\n * @documentationMaturity preview\n * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.ListFollowedChannels\n */\nexport async function listFollowedChannels(): Promise<\n NonNullablePaths<\n ListFollowedChannelsResponse,\n {\n [P in FollowedChannelNonNullablePaths]: `followedChannels.${number}.${P}`;\n }[FollowedChannelNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltySocialmediaV1FollowedChannel.listFollowedChannels(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixLoyaltySocialmediaV1LoyaltySocialMediaUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/loyalty-social-media',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-social-media',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-social-media',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-social-media',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/loyalty-social-media',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-social-media',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_social-media';\n\n/**\n * Creates an entity for the specified account ID when the account follows a social media channel.\n *\n * Members can only follow enabled channels. A site owner has to enable channels in the dashboard.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function createFollowedChannel(\n payload: object\n): RequestOptionsFactory<any> {\n function __createFollowedChannel({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'followedChannel.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.socialmedia.v1.followed_channel',\n method: 'POST' as any,\n methodFqn:\n 'wix.loyalty.socialmedia.v1.LoyaltySocialMedia.CreateFollowedChannel',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltySocialmediaV1LoyaltySocialMediaUrl({\n protoPath: '/v1/followed-channels',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'followedChannel.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createFollowedChannel;\n}\n\n/**\n * Retrieves a list of social media channels followed by the account. The list is ordered by creation date.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).\n */\nexport function listFollowedChannels(\n payload: object\n): RequestOptionsFactory<any> {\n function __listFollowedChannels({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.socialmedia.v1.followed_channel',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.socialmedia.v1.LoyaltySocialMedia.ListFollowedChannels',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltySocialmediaV1LoyaltySocialMediaUrl({\n protoPath: '/v1/followed-channels',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'followedChannels.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listFollowedChannels;\n}\n","import {\n createFollowedChannel as publicCreateFollowedChannel,\n listFollowedChannels as publicListFollowedChannels,\n} from './loyalty-socialmedia-v1-followed-channel-social-media.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { onFollowedChannelCreated as publicOnFollowedChannelCreated } from './loyalty-socialmedia-v1-followed-channel-social-media.public.js';\n\nexport const createFollowedChannel: MaybeContext<\n BuildRESTFunction<typeof publicCreateFollowedChannel> &\n typeof publicCreateFollowedChannel\n> = /*#__PURE__*/ createRESTModule(publicCreateFollowedChannel);\nexport const listFollowedChannels: MaybeContext<\n BuildRESTFunction<typeof publicListFollowedChannels> &\n typeof publicListFollowedChannels\n> = /*#__PURE__*/ createRESTModule(publicListFollowedChannels);\n/**\n * Triggered when an account follows a new channel.\n */\nexport const onFollowedChannelCreated: ReturnType<\n typeof createEventModule<typeof publicOnFollowedChannelCreated>\n> = createEventModule(publicOnFollowedChannelCreated);\n\nexport {\n Type,\n WebhookIdentityType,\n} from './loyalty-socialmedia-v1-followed-channel-social-media.universal.js';\nexport {\n FollowedChannel,\n CreateFollowedChannelRequest,\n CreateFollowedChannelResponse,\n ListFollowedChannelsRequest,\n ListFollowedChannelsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n FollowedChannelCreatedEnvelope,\n} from './loyalty-socialmedia-v1-followed-channel-social-media.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAA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AAAA,MACpB;AAAA,QACE,aAAaC;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAkC;;;AGtElC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAI3B,IAAMC,yBAGK,iCAAiBA,sBAA2B;AACvD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AAItD,IAAMC,4BAET,kBAAkB,wBAA8B;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","Type","WebhookIdentityType","createFollowedChannel","listFollowedChannels","createFollowedChannel","listFollowedChannels","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","createFollowedChannel","listFollowedChannels","onFollowedChannelCreated"]}
@@ -1,4 +1,4 @@
1
- export interface FollowedChannel {
1
+ interface FollowedChannel {
2
2
  /**
3
3
  * Followed social media channel ID.
4
4
  * @readonly
@@ -19,7 +19,7 @@ export interface FollowedChannel {
19
19
  */
20
20
  _createdDate?: Date | null;
21
21
  }
22
- export declare enum Type {
22
+ declare enum Type {
23
23
  /** Unknown social media channel type. */
24
24
  UNKNOWN_CHANNEL = "UNKNOWN_CHANNEL",
25
25
  /** Facebook social media channel. */
@@ -33,24 +33,24 @@ export declare enum Type {
33
33
  /** TikTok social media channel. */
34
34
  TIKTOK = "TIKTOK"
35
35
  }
36
- export interface CreateFollowedChannelRequest {
36
+ interface CreateFollowedChannelRequest {
37
37
  /** Followed social media channel details. */
38
38
  followedChannel: FollowedChannel;
39
39
  }
40
- export interface CreateFollowedChannelResponse {
40
+ interface CreateFollowedChannelResponse {
41
41
  /** Followed social media channel details. */
42
42
  followedChannel?: FollowedChannel;
43
43
  }
44
- export interface ListFollowedChannelsRequest {
44
+ interface ListFollowedChannelsRequest {
45
45
  }
46
- export interface ListFollowedChannelsResponse {
46
+ interface ListFollowedChannelsResponse {
47
47
  /**
48
48
  * List of followed social media channels.
49
49
  * @maxSize 5
50
50
  */
51
51
  followedChannels?: FollowedChannel[];
52
52
  }
53
- export interface DomainEvent extends DomainEventBodyOneOf {
53
+ interface DomainEvent extends DomainEventBodyOneOf {
54
54
  createdEvent?: EntityCreatedEvent;
55
55
  updatedEvent?: EntityUpdatedEvent;
56
56
  deletedEvent?: EntityDeletedEvent;
@@ -93,19 +93,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
93
93
  entityEventSequence?: string | null;
94
94
  }
95
95
  /** @oneof */
96
- export interface DomainEventBodyOneOf {
96
+ interface DomainEventBodyOneOf {
97
97
  createdEvent?: EntityCreatedEvent;
98
98
  updatedEvent?: EntityUpdatedEvent;
99
99
  deletedEvent?: EntityDeletedEvent;
100
100
  actionEvent?: ActionEvent;
101
101
  }
102
- export interface EntityCreatedEvent {
102
+ interface EntityCreatedEvent {
103
103
  entity?: string;
104
104
  }
105
- export interface RestoreInfo {
105
+ interface RestoreInfo {
106
106
  deletedDate?: Date | null;
107
107
  }
108
- export interface EntityUpdatedEvent {
108
+ interface EntityUpdatedEvent {
109
109
  /**
110
110
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
111
111
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -113,16 +113,16 @@ export interface EntityUpdatedEvent {
113
113
  */
114
114
  currentEntity?: string;
115
115
  }
116
- export interface EntityDeletedEvent {
116
+ interface EntityDeletedEvent {
117
117
  /** Entity that was deleted */
118
118
  deletedEntity?: string | null;
119
119
  }
120
- export interface ActionEvent {
120
+ interface ActionEvent {
121
121
  body?: string;
122
122
  }
123
- export interface Empty {
123
+ interface Empty {
124
124
  }
125
- export interface MessageEnvelope {
125
+ interface MessageEnvelope {
126
126
  /**
127
127
  * App instance ID.
128
128
  * @format GUID
@@ -138,7 +138,7 @@ export interface MessageEnvelope {
138
138
  /** Stringify payload. */
139
139
  data?: string;
140
140
  }
141
- export interface IdentificationData extends IdentificationDataIdOneOf {
141
+ interface IdentificationData extends IdentificationDataIdOneOf {
142
142
  /**
143
143
  * ID of a site visitor that has not logged in to the site.
144
144
  * @format GUID
@@ -163,7 +163,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
163
163
  identityType?: WebhookIdentityType;
164
164
  }
165
165
  /** @oneof */
166
- export interface IdentificationDataIdOneOf {
166
+ interface IdentificationDataIdOneOf {
167
167
  /**
168
168
  * ID of a site visitor that has not logged in to the site.
169
169
  * @format GUID
@@ -185,25 +185,14 @@ export interface IdentificationDataIdOneOf {
185
185
  */
186
186
  appId?: string;
187
187
  }
188
- export declare enum WebhookIdentityType {
188
+ declare enum WebhookIdentityType {
189
189
  UNKNOWN = "UNKNOWN",
190
190
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
191
191
  MEMBER = "MEMBER",
192
192
  WIX_USER = "WIX_USER",
193
193
  APP = "APP"
194
194
  }
195
- export interface FollowedChannelNonNullableFields {
196
- _id: string;
197
- accountId: string;
198
- channel: Type;
199
- }
200
- export interface CreateFollowedChannelResponseNonNullableFields {
201
- followedChannel?: FollowedChannelNonNullableFields;
202
- }
203
- export interface ListFollowedChannelsResponseNonNullableFields {
204
- followedChannels: FollowedChannelNonNullableFields[];
205
- }
206
- export interface BaseEventMetadata {
195
+ interface BaseEventMetadata {
207
196
  /**
208
197
  * App instance ID.
209
198
  * @format GUID
@@ -217,7 +206,7 @@ export interface BaseEventMetadata {
217
206
  /** The identification type and identity data. */
218
207
  identity?: IdentificationData;
219
208
  }
220
- export interface EventMetadata extends BaseEventMetadata {
209
+ interface EventMetadata extends BaseEventMetadata {
221
210
  /**
222
211
  * Unique event ID.
223
212
  * Allows clients to ignore duplicate webhooks.
@@ -255,58 +244,9 @@ export interface EventMetadata extends BaseEventMetadata {
255
244
  */
256
245
  entityEventSequence?: string | null;
257
246
  }
258
- export interface FollowedChannelCreatedEnvelope {
247
+ interface FollowedChannelCreatedEnvelope {
259
248
  entity: FollowedChannel;
260
249
  metadata: EventMetadata;
261
250
  }
262
- /**
263
- * Triggered when an account follows a new channel.
264
- * @permissionScope Read Loyalty
265
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
266
- * @permissionScope Manage Loyalty
267
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
268
- * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ
269
- * @webhook
270
- * @eventType wix.loyalty.socialmedia.v1.followed_channel_created
271
- * @slug created
272
- * @documentationMaturity preview
273
- */
274
- export declare function onFollowedChannelCreated(handler: (event: FollowedChannelCreatedEnvelope) => void | Promise<void>): void;
275
- /**
276
- * Creates an entity for the specified account ID when the account follows a social media channel.
277
- *
278
- * Members can only follow enabled channels. A site owner has to enable channels in the dashboard.
279
- *
280
- * >**Note:**
281
- * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
282
- * @param followedChannel - Followed social media channel details.
283
- * @public
284
- * @documentationMaturity preview
285
- * @requiredField followedChannel
286
- * @requiredField followedChannel.channel
287
- * @permissionId LOYALTY.FOLLOWED_CHANNEL_CREATE
288
- * @permissionScope Manage Loyalty
289
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
290
- * @applicableIdentity APP
291
- * @applicableIdentity MEMBER
292
- * @returns Followed social media channel details.
293
- * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.CreateFollowedChannel
294
- */
295
- export declare function createFollowedChannel(followedChannel: FollowedChannel): Promise<FollowedChannel & FollowedChannelNonNullableFields>;
296
- /**
297
- * Retrieves a list of social media channels followed by the account. The list is ordered by creation date.
298
- *
299
- * >**Note:**
300
- * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
301
- * @public
302
- * @documentationMaturity preview
303
- * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ
304
- * @permissionScope Read Loyalty
305
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
306
- * @permissionScope Manage Loyalty
307
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
308
- * @applicableIdentity APP
309
- * @applicableIdentity MEMBER
310
- * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.ListFollowedChannels
311
- */
312
- export declare function listFollowedChannels(): Promise<ListFollowedChannelsResponse & ListFollowedChannelsResponseNonNullableFields>;
251
+
252
+ export { type ActionEvent as A, type BaseEventMetadata as B, type CreateFollowedChannelRequest as C, type DomainEvent as D, type EntityCreatedEvent as E, type FollowedChannel as F, type IdentificationData as I, type ListFollowedChannelsResponse as L, type MessageEnvelope as M, type RestoreInfo as R, Type as T, WebhookIdentityType as W, type CreateFollowedChannelResponse as a, type ListFollowedChannelsRequest as b, type DomainEventBodyOneOf as c, type EntityUpdatedEvent as d, type EntityDeletedEvent as e, type Empty as f, type IdentificationDataIdOneOf as g, type EventMetadata as h, type FollowedChannelCreatedEnvelope as i };