@wix/auto_sdk_loyalty_social-media 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +12 -0
  11. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +17 -0
  12. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +1 -0
  13. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +17 -0
  14. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +121 -0
  15. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +1 -0
  16. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +14 -0
  17. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +66 -0
  18. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +1 -0
  19. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +31 -0
  20. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +34 -0
  21. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +1 -0
  22. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +173 -0
  23. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +27 -0
  24. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +1 -0
  25. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts +270 -0
  26. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +136 -0
  27. package/build/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +12 -0
  39. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +12 -0
  40. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +1 -0
  41. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +17 -0
  42. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +116 -0
  43. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +1 -0
  44. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +14 -0
  45. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +38 -0
  46. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +1 -0
  47. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +31 -0
  48. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +27 -0
  49. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +1 -0
  50. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +173 -0
  51. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +24 -0
  52. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +1 -0
  53. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts +270 -0
  54. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +108 -0
  55. package/build/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +12 -0
  66. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +17 -0
  67. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +1 -0
  68. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +17 -0
  69. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +121 -0
  70. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +1 -0
  71. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +14 -0
  72. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +66 -0
  73. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +1 -0
  74. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +31 -0
  75. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +34 -0
  76. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +1 -0
  77. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +173 -0
  78. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +27 -0
  79. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +1 -0
  80. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts +270 -0
  81. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +136 -0
  82. package/build/internal/cjs/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.d.ts +12 -0
  93. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js +12 -0
  94. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.context.js.map +1 -0
  95. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.d.ts +17 -0
  96. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js +116 -0
  97. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.http.js.map +1 -0
  98. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.d.ts +14 -0
  99. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js +38 -0
  100. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.meta.js.map +1 -0
  101. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.d.ts +31 -0
  102. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js +27 -0
  103. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.public.js.map +1 -0
  104. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.d.ts +173 -0
  105. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js +24 -0
  106. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.types.js.map +1 -0
  107. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.d.ts +270 -0
  108. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js +108 -0
  109. package/build/internal/es/src/loyalty-socialmedia-v1-followed-channel-social-media.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,270 @@
1
+ export interface FollowedChannel {
2
+ /**
3
+ * Followed social media channel ID.
4
+ * @readonly
5
+ */
6
+ _id?: string;
7
+ /**
8
+ * ID of the account that has followed a social media channel.
9
+ * @readonly
10
+ */
11
+ accountId?: string;
12
+ /** Followed social media channel type. */
13
+ channel?: Type;
14
+ /**
15
+ * Date when an entity for following a social media channel was created.
16
+ * @readonly
17
+ */
18
+ _createdDate?: Date | null;
19
+ }
20
+ export declare enum Type {
21
+ /** Unknown social media channel type. */
22
+ UNKNOWN_CHANNEL = "UNKNOWN_CHANNEL",
23
+ /** Facebook social media channel. */
24
+ FACEBOOK = "FACEBOOK",
25
+ /** Instagram social media channel. */
26
+ INSTAGRAM = "INSTAGRAM",
27
+ /** LinkedIn social media channel. */
28
+ LINKEDIN = "LINKEDIN",
29
+ /** X social media channel. */
30
+ X = "X",
31
+ /** TikTok social media channel. */
32
+ TIKTOK = "TIKTOK"
33
+ }
34
+ export interface CreateFollowedChannelRequest {
35
+ /** Followed social media channel details. */
36
+ followedChannel: FollowedChannel;
37
+ }
38
+ export interface CreateFollowedChannelResponse {
39
+ /** Followed social media channel details. */
40
+ followedChannel?: FollowedChannel;
41
+ }
42
+ export interface ListFollowedChannelsRequest {
43
+ }
44
+ export interface ListFollowedChannelsResponse {
45
+ /** List of followed social media channels. */
46
+ followedChannels?: FollowedChannel[];
47
+ }
48
+ export interface DomainEvent extends DomainEventBodyOneOf {
49
+ createdEvent?: EntityCreatedEvent;
50
+ updatedEvent?: EntityUpdatedEvent;
51
+ deletedEvent?: EntityDeletedEvent;
52
+ actionEvent?: ActionEvent;
53
+ /**
54
+ * Unique event ID.
55
+ * Allows clients to ignore duplicate webhooks.
56
+ */
57
+ _id?: string;
58
+ /**
59
+ * Assumes actions are also always typed to an entity_type
60
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
61
+ */
62
+ entityFqdn?: string;
63
+ /**
64
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
65
+ * This is although the created/updated/deleted notion is duplication of the oneof types
66
+ * Example: created/updated/deleted/started/completed/email_opened
67
+ */
68
+ slug?: string;
69
+ /** ID of the entity associated with the event. */
70
+ entityId?: string;
71
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
72
+ eventTime?: Date | null;
73
+ /**
74
+ * Whether the event was triggered as a result of a privacy regulation application
75
+ * (for example, GDPR).
76
+ */
77
+ triggeredByAnonymizeRequest?: boolean | null;
78
+ /** If present, indicates the action that triggered the event. */
79
+ originatedFrom?: string | null;
80
+ /**
81
+ * A sequence number defining the order of updates to the underlying entity.
82
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
83
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
84
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
85
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
86
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
87
+ */
88
+ entityEventSequence?: string | null;
89
+ }
90
+ /** @oneof */
91
+ export interface DomainEventBodyOneOf {
92
+ createdEvent?: EntityCreatedEvent;
93
+ updatedEvent?: EntityUpdatedEvent;
94
+ deletedEvent?: EntityDeletedEvent;
95
+ actionEvent?: ActionEvent;
96
+ }
97
+ export interface EntityCreatedEvent {
98
+ entity?: string;
99
+ }
100
+ export interface RestoreInfo {
101
+ deletedDate?: Date | null;
102
+ }
103
+ export interface EntityUpdatedEvent {
104
+ /**
105
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
106
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
107
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
108
+ */
109
+ currentEntity?: string;
110
+ }
111
+ export interface EntityDeletedEvent {
112
+ /** Entity that was deleted */
113
+ deletedEntity?: string | null;
114
+ }
115
+ export interface ActionEvent {
116
+ body?: string;
117
+ }
118
+ export interface Empty {
119
+ }
120
+ export interface MessageEnvelope {
121
+ /** App instance ID. */
122
+ instanceId?: string | null;
123
+ /** Event type. */
124
+ eventType?: string;
125
+ /** The identification type and identity data. */
126
+ identity?: IdentificationData;
127
+ /** Stringify payload. */
128
+ data?: string;
129
+ }
130
+ export interface IdentificationData extends IdentificationDataIdOneOf {
131
+ /** ID of a site visitor that has not logged in to the site. */
132
+ anonymousVisitorId?: string;
133
+ /** ID of a site visitor that has logged in to the site. */
134
+ memberId?: string;
135
+ /** ID of a Wix user (site owner, contributor, etc.). */
136
+ wixUserId?: string;
137
+ /** ID of an app. */
138
+ appId?: string;
139
+ /** @readonly */
140
+ identityType?: WebhookIdentityType;
141
+ }
142
+ /** @oneof */
143
+ export interface IdentificationDataIdOneOf {
144
+ /** ID of a site visitor that has not logged in to the site. */
145
+ anonymousVisitorId?: string;
146
+ /** ID of a site visitor that has logged in to the site. */
147
+ memberId?: string;
148
+ /** ID of a Wix user (site owner, contributor, etc.). */
149
+ wixUserId?: string;
150
+ /** ID of an app. */
151
+ appId?: string;
152
+ }
153
+ export declare enum WebhookIdentityType {
154
+ UNKNOWN = "UNKNOWN",
155
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
156
+ MEMBER = "MEMBER",
157
+ WIX_USER = "WIX_USER",
158
+ APP = "APP"
159
+ }
160
+ export interface FollowedChannelNonNullableFields {
161
+ _id: string;
162
+ accountId: string;
163
+ channel: Type;
164
+ }
165
+ export interface CreateFollowedChannelResponseNonNullableFields {
166
+ followedChannel?: FollowedChannelNonNullableFields;
167
+ }
168
+ export interface ListFollowedChannelsResponseNonNullableFields {
169
+ followedChannels: FollowedChannelNonNullableFields[];
170
+ }
171
+ export interface BaseEventMetadata {
172
+ /** App instance ID. */
173
+ instanceId?: string | null;
174
+ /** Event type. */
175
+ eventType?: string;
176
+ /** The identification type and identity data. */
177
+ identity?: IdentificationData;
178
+ }
179
+ export interface EventMetadata extends BaseEventMetadata {
180
+ /**
181
+ * Unique event ID.
182
+ * Allows clients to ignore duplicate webhooks.
183
+ */
184
+ _id?: string;
185
+ /**
186
+ * Assumes actions are also always typed to an entity_type
187
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
188
+ */
189
+ entityFqdn?: string;
190
+ /**
191
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
192
+ * This is although the created/updated/deleted notion is duplication of the oneof types
193
+ * Example: created/updated/deleted/started/completed/email_opened
194
+ */
195
+ slug?: string;
196
+ /** ID of the entity associated with the event. */
197
+ entityId?: string;
198
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
199
+ eventTime?: Date | null;
200
+ /**
201
+ * Whether the event was triggered as a result of a privacy regulation application
202
+ * (for example, GDPR).
203
+ */
204
+ triggeredByAnonymizeRequest?: boolean | null;
205
+ /** If present, indicates the action that triggered the event. */
206
+ originatedFrom?: string | null;
207
+ /**
208
+ * A sequence number defining the order of updates to the underlying entity.
209
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
210
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
211
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
212
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
213
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
214
+ */
215
+ entityEventSequence?: string | null;
216
+ }
217
+ export interface FollowedChannelCreatedEnvelope {
218
+ entity: FollowedChannel;
219
+ metadata: EventMetadata;
220
+ }
221
+ /**
222
+ * Triggered when an account follows a new channel.
223
+ * @permissionScope Manage Loyalty
224
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
225
+ * @permissionScope Read Loyalty
226
+ * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
227
+ * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ
228
+ * @webhook
229
+ * @eventType wix.loyalty.socialmedia.v1.followed_channel_created
230
+ * @documentationMaturity preview
231
+ */
232
+ export declare function onFollowedChannelCreated(handler: (event: FollowedChannelCreatedEnvelope) => void | Promise<void>): void;
233
+ /**
234
+ * Creates an entity for the specified account ID when the account follows a social media channel.
235
+ *
236
+ * Members can only follow enabled channels. A site owner has to enable channels in the dashboard.
237
+ *
238
+ * >**Note:**
239
+ * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
240
+ * @param followedChannel - Followed social media channel details.
241
+ * @public
242
+ * @documentationMaturity preview
243
+ * @requiredField followedChannel
244
+ * @requiredField followedChannel.channel
245
+ * @permissionId LOYALTY.FOLLOWED_CHANNEL_CREATE
246
+ * @permissionScope Manage Loyalty
247
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
248
+ * @applicableIdentity APP
249
+ * @applicableIdentity MEMBER
250
+ * @returns Followed social media channel details.
251
+ * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.CreateFollowedChannel
252
+ */
253
+ export declare function createFollowedChannel(followedChannel: FollowedChannel): Promise<FollowedChannel & FollowedChannelNonNullableFields>;
254
+ /**
255
+ * Retrieves a list of social media channels followed by the account. The list is ordered by creation date.
256
+ *
257
+ * >**Note:**
258
+ * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
259
+ * @public
260
+ * @documentationMaturity preview
261
+ * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ
262
+ * @permissionScope Manage Loyalty
263
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
264
+ * @permissionScope Read Loyalty
265
+ * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
266
+ * @applicableIdentity APP
267
+ * @applicableIdentity MEMBER
268
+ * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.ListFollowedChannels
269
+ */
270
+ export declare function listFollowedChannels(): Promise<ListFollowedChannelsResponse & ListFollowedChannelsResponseNonNullableFields>;
@@ -0,0 +1,108 @@
1
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
+ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
+ import * as ambassadorWixLoyaltySocialmediaV1FollowedChannel from './loyalty-socialmedia-v1-followed-channel-social-media.http.js';
4
+ export var Type;
5
+ (function (Type) {
6
+ /** Unknown social media channel type. */
7
+ Type["UNKNOWN_CHANNEL"] = "UNKNOWN_CHANNEL";
8
+ /** Facebook social media channel. */
9
+ Type["FACEBOOK"] = "FACEBOOK";
10
+ /** Instagram social media channel. */
11
+ Type["INSTAGRAM"] = "INSTAGRAM";
12
+ /** LinkedIn social media channel. */
13
+ Type["LINKEDIN"] = "LINKEDIN";
14
+ /** X social media channel. */
15
+ Type["X"] = "X";
16
+ /** TikTok social media channel. */
17
+ Type["TIKTOK"] = "TIKTOK";
18
+ })(Type || (Type = {}));
19
+ export var WebhookIdentityType;
20
+ (function (WebhookIdentityType) {
21
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
22
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
23
+ WebhookIdentityType["MEMBER"] = "MEMBER";
24
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
25
+ WebhookIdentityType["APP"] = "APP";
26
+ })(WebhookIdentityType || (WebhookIdentityType = {}));
27
+ /**
28
+ * Creates an entity for the specified account ID when the account follows a social media channel.
29
+ *
30
+ * Members can only follow enabled channels. A site owner has to enable channels in the dashboard.
31
+ *
32
+ * >**Note:**
33
+ * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
34
+ * @param followedChannel - Followed social media channel details.
35
+ * @public
36
+ * @documentationMaturity preview
37
+ * @requiredField followedChannel
38
+ * @requiredField followedChannel.channel
39
+ * @permissionId LOYALTY.FOLLOWED_CHANNEL_CREATE
40
+ * @permissionScope Manage Loyalty
41
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
42
+ * @applicableIdentity APP
43
+ * @applicableIdentity MEMBER
44
+ * @returns Followed social media channel details.
45
+ * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.CreateFollowedChannel
46
+ */
47
+ export async function createFollowedChannel(followedChannel) {
48
+ // @ts-ignore
49
+ const { httpClient, sideEffects } = arguments[1];
50
+ const payload = renameKeysFromSDKRequestToRESTRequest({
51
+ followedChannel: followedChannel,
52
+ });
53
+ const reqOpts = ambassadorWixLoyaltySocialmediaV1FollowedChannel.createFollowedChannel(payload);
54
+ sideEffects?.onSiteCall?.();
55
+ try {
56
+ const result = await httpClient.request(reqOpts);
57
+ sideEffects?.onSuccess?.(result);
58
+ return renameKeysFromRESTResponseToSDKResponse(result.data)
59
+ ?.followedChannel;
60
+ }
61
+ catch (err) {
62
+ const transformedError = sdkTransformError(err, {
63
+ spreadPathsToArguments: {},
64
+ explicitPathsToArguments: { followedChannel: '$[0]' },
65
+ singleArgumentUnchanged: false,
66
+ }, ['followedChannel']);
67
+ sideEffects?.onError?.(err);
68
+ throw transformedError;
69
+ }
70
+ }
71
+ /**
72
+ * Retrieves a list of social media channels followed by the account. The list is ordered by creation date.
73
+ *
74
+ * >**Note:**
75
+ * >This method requires [visitor or member authentication](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities).
76
+ * @public
77
+ * @documentationMaturity preview
78
+ * @permissionId LOYALTY.FOLLOWED_CHANNEL_READ
79
+ * @permissionScope Manage Loyalty
80
+ * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
81
+ * @permissionScope Read Loyalty
82
+ * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
83
+ * @applicableIdentity APP
84
+ * @applicableIdentity MEMBER
85
+ * @fqn wix.loyalty.socialmedia.v1.LoyaltySocialMedia.ListFollowedChannels
86
+ */
87
+ export async function listFollowedChannels() {
88
+ // @ts-ignore
89
+ const { httpClient, sideEffects } = arguments[0];
90
+ const payload = renameKeysFromSDKRequestToRESTRequest({});
91
+ const reqOpts = ambassadorWixLoyaltySocialmediaV1FollowedChannel.listFollowedChannels(payload);
92
+ sideEffects?.onSiteCall?.();
93
+ try {
94
+ const result = await httpClient.request(reqOpts);
95
+ sideEffects?.onSuccess?.(result);
96
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
97
+ }
98
+ catch (err) {
99
+ const transformedError = sdkTransformError(err, {
100
+ spreadPathsToArguments: {},
101
+ explicitPathsToArguments: {},
102
+ singleArgumentUnchanged: false,
103
+ }, []);
104
+ sideEffects?.onError?.(err);
105
+ throw transformedError;
106
+ }
107
+ }
108
+ //# sourceMappingURL=loyalty-socialmedia-v1-followed-channel-social-media.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loyalty-socialmedia-v1-followed-channel-social-media.universal.js","sourceRoot":"","sources":["../../../../src/loyalty-socialmedia-v1-followed-channel-social-media.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,gDAAgD,MAAM,gE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": "https://registry.npmjs.org/",
6
+ "access": "public"
7
+ },
8
+ "keywords": [],
9
+ "sideEffects": false,
10
+ "main": "./build/cjs/index.js",
11
+ "types": "./build/es/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./build/es/index.js",
15
+ "require": "./build/cjs/index.js",
16
+ "types": "./build/es/index.d.ts"
17
+ },
18
+ "./package.json": "./package.json",
19
+ "./meta": {
20
+ "import": "./build/es/meta.js",
21
+ "require": "./build/cjs/meta.js",
22
+ "types": "./build/es/meta.d.ts"
23
+ }
24
+ },
25
+ "files": [
26
+ "build",
27
+ "meta",
28
+ "service-plugins"
29
+ ],
30
+ "dependencies": {
31
+ "@wix/sdk-runtime": "^0.3.35",
32
+ "@wix/sdk-types": "^1.12.4"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "^5.3.2"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
39
+ "test": ":"
40
+ },
41
+ "wix": {
42
+ "artifact": {
43
+ "artifactId": "auto-sdk-loyalty-social-media",
44
+ "groupId": "com.wixpress.public-sdk-dependencies"
45
+ },
46
+ "sdkDependency": {
47
+ "fqdnNamespace": "socialMedia",
48
+ "fqdn": "wix.loyalty.socialmedia.v1.followed_channel"
49
+ }
50
+ },
51
+ "falconPackageHash": "471aa1bfdf4df1f33bbeed8481f376b14bf33505b64175caf2d5adc8"
52
+ }