@wix/auto_sdk_members_badges 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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/badges-v3-badge-badges.context.d.ts +41 -0
- package/build/cjs/src/badges-v3-badge-badges.context.js +46 -0
- package/build/cjs/src/badges-v3-badge-badges.context.js.map +1 -0
- package/build/cjs/src/badges-v3-badge-badges.http.d.ts +111 -0
- package/build/cjs/src/badges-v3-badge-badges.http.js +392 -0
- package/build/cjs/src/badges-v3-badge-badges.http.js.map +1 -0
- package/build/cjs/src/badges-v3-badge-badges.meta.d.ts +35 -0
- package/build/cjs/src/badges-v3-badge-badges.meta.js +237 -0
- package/build/cjs/src/badges-v3-badge-badges.meta.js.map +1 -0
- package/build/cjs/src/badges-v3-badge-badges.public.d.ts +168 -0
- package/build/cjs/src/badges-v3-badge-badges.public.js +121 -0
- package/build/cjs/src/badges-v3-badge-badges.public.js.map +1 -0
- package/build/cjs/src/badges-v3-badge-badges.types.d.ts +441 -0
- package/build/cjs/src/badges-v3-badge-badges.types.js +17 -0
- package/build/cjs/src/badges-v3-badge-badges.types.js.map +1 -0
- package/build/cjs/src/badges-v3-badge-badges.universal.d.ts +835 -0
- package/build/cjs/src/badges-v3-badge-badges.universal.js +507 -0
- package/build/cjs/src/badges-v3-badge-badges.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/badges-v3-badge-badges.context.d.ts +41 -0
- package/build/es/src/badges-v3-badge-badges.context.js +41 -0
- package/build/es/src/badges-v3-badge-badges.context.js.map +1 -0
- package/build/es/src/badges-v3-badge-badges.http.d.ts +111 -0
- package/build/es/src/badges-v3-badge-badges.http.js +378 -0
- package/build/es/src/badges-v3-badge-badges.http.js.map +1 -0
- package/build/es/src/badges-v3-badge-badges.meta.d.ts +35 -0
- package/build/es/src/badges-v3-badge-badges.meta.js +200 -0
- package/build/es/src/badges-v3-badge-badges.meta.js.map +1 -0
- package/build/es/src/badges-v3-badge-badges.public.d.ts +168 -0
- package/build/es/src/badges-v3-badge-badges.public.js +105 -0
- package/build/es/src/badges-v3-badge-badges.public.js.map +1 -0
- package/build/es/src/badges-v3-badge-badges.types.d.ts +441 -0
- package/build/es/src/badges-v3-badge-badges.types.js +14 -0
- package/build/es/src/badges-v3-badge-badges.types.js.map +1 -0
- package/build/es/src/badges-v3-badge-badges.universal.d.ts +835 -0
- package/build/es/src/badges-v3-badge-badges.universal.js +470 -0
- package/build/es/src/badges-v3-badge-badges.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.context.d.ts +41 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.context.js +46 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.context.js.map +1 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.http.d.ts +111 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.http.js +392 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.http.js.map +1 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.meta.d.ts +35 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.meta.js +237 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.meta.js.map +1 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.public.d.ts +168 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.public.js +121 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.public.js.map +1 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.types.d.ts +441 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.types.js +17 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.types.js.map +1 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.universal.d.ts +835 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.universal.js +507 -0
- package/build/internal/cjs/src/badges-v3-badge-badges.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/badges-v3-badge-badges.context.d.ts +41 -0
- package/build/internal/es/src/badges-v3-badge-badges.context.js +41 -0
- package/build/internal/es/src/badges-v3-badge-badges.context.js.map +1 -0
- package/build/internal/es/src/badges-v3-badge-badges.http.d.ts +111 -0
- package/build/internal/es/src/badges-v3-badge-badges.http.js +378 -0
- package/build/internal/es/src/badges-v3-badge-badges.http.js.map +1 -0
- package/build/internal/es/src/badges-v3-badge-badges.meta.d.ts +35 -0
- package/build/internal/es/src/badges-v3-badge-badges.meta.js +200 -0
- package/build/internal/es/src/badges-v3-badge-badges.meta.js.map +1 -0
- package/build/internal/es/src/badges-v3-badge-badges.public.d.ts +168 -0
- package/build/internal/es/src/badges-v3-badge-badges.public.js +105 -0
- package/build/internal/es/src/badges-v3-badge-badges.public.js.map +1 -0
- package/build/internal/es/src/badges-v3-badge-badges.types.d.ts +441 -0
- package/build/internal/es/src/badges-v3-badge-badges.types.js +14 -0
- package/build/internal/es/src/badges-v3-badge-badges.types.js.map +1 -0
- package/build/internal/es/src/badges-v3-badge-badges.universal.d.ts +835 -0
- package/build/internal/es/src/badges-v3-badge-badges.universal.js +470 -0
- package/build/internal/es/src/badges-v3-badge-badges.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,835 @@
|
|
|
1
|
+
export interface Badge {
|
|
2
|
+
/**
|
|
3
|
+
* Badge ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
_id?: string;
|
|
7
|
+
/** Text displayed on the badge in the Wix UI. */
|
|
8
|
+
title?: string | null;
|
|
9
|
+
/** Badge description. */
|
|
10
|
+
description?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Badge background color in hexadecimal RGB format. Uppercase letters only.
|
|
13
|
+
*
|
|
14
|
+
* Default: `#796EFF ` (purple).
|
|
15
|
+
*/
|
|
16
|
+
backgroundColor?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Badge text color in hexadecimal RGB format. Uppercase letters only.
|
|
19
|
+
*
|
|
20
|
+
* Default: `"#FFFFFF"` (white).
|
|
21
|
+
*/
|
|
22
|
+
textColor?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Badge icon as an SVG image. One of:
|
|
25
|
+
*
|
|
26
|
+
* - An external web URL in the following format: `http(s)://<image url>`.
|
|
27
|
+
* - The [source URL](https://www.wix.com/velo/reference/wix-media-backend/mediamanager-obj/getfileurl) for a Wix Media Manager file. Wix Media Manager file names in a `wix:image://...` format are not supported.
|
|
28
|
+
*/
|
|
29
|
+
icon?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the badge has special permissions
|
|
32
|
+
* to access specific members-only pages.
|
|
33
|
+
* When `true`, members with the badge receive special permissions,
|
|
34
|
+
* and site contributors can
|
|
35
|
+
* [manage badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge)
|
|
36
|
+
* in the Dashboard.
|
|
37
|
+
* When `false`, members with the badge receive no special permissions.
|
|
38
|
+
*/
|
|
39
|
+
permissionsEnabled?: boolean | null;
|
|
40
|
+
/**
|
|
41
|
+
* Slugified name. Used to represent the badge in a URL.
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
slug?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Date the badge was created.
|
|
47
|
+
* @readonly
|
|
48
|
+
*/
|
|
49
|
+
_createdDate?: Date | null;
|
|
50
|
+
/**
|
|
51
|
+
* Date the badge was updated.
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
_updatedDate?: Date | null;
|
|
55
|
+
}
|
|
56
|
+
export interface CreateBadgeRequest {
|
|
57
|
+
/** Badge to create. */
|
|
58
|
+
badge: Badge;
|
|
59
|
+
}
|
|
60
|
+
export interface CreateBadgeResponse {
|
|
61
|
+
/** Created badge. */
|
|
62
|
+
badge?: Badge;
|
|
63
|
+
}
|
|
64
|
+
export interface UpdateBadgeRequest {
|
|
65
|
+
/** Badge to update. */
|
|
66
|
+
badge: Badge;
|
|
67
|
+
}
|
|
68
|
+
export interface UpdateBadgeResponse {
|
|
69
|
+
/** Updated badge. */
|
|
70
|
+
badge?: Badge;
|
|
71
|
+
}
|
|
72
|
+
export interface ListBadgesRequest {
|
|
73
|
+
/** Pagination options. */
|
|
74
|
+
paging?: Paging;
|
|
75
|
+
}
|
|
76
|
+
export interface Paging {
|
|
77
|
+
/** Number of items to load. */
|
|
78
|
+
limit?: number | null;
|
|
79
|
+
/** Number of items to skip in the current sort order. */
|
|
80
|
+
offset?: number | null;
|
|
81
|
+
}
|
|
82
|
+
export interface ListBadgesResponse {
|
|
83
|
+
/** List of badges. */
|
|
84
|
+
badges?: Badge[];
|
|
85
|
+
/** Metadata for the paginated results. */
|
|
86
|
+
metadata?: PagingMetadata;
|
|
87
|
+
}
|
|
88
|
+
export interface PagingMetadata {
|
|
89
|
+
/** Number of items returned in the response. */
|
|
90
|
+
count?: number | null;
|
|
91
|
+
/** Offset that was requested. */
|
|
92
|
+
offset?: number | null;
|
|
93
|
+
/** Total number of items that match the query. */
|
|
94
|
+
total?: number | null;
|
|
95
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
96
|
+
tooManyToCount?: boolean | null;
|
|
97
|
+
}
|
|
98
|
+
export interface QueryBadgesRequest {
|
|
99
|
+
/**
|
|
100
|
+
* Filter options.
|
|
101
|
+
* Currently supported fields for filtering:
|
|
102
|
+
* - id
|
|
103
|
+
* - title
|
|
104
|
+
* - slug
|
|
105
|
+
* For more details on how to use filter, see [API Query Language: The Filter Section](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section).
|
|
106
|
+
*/
|
|
107
|
+
filter?: Record<string, any> | null;
|
|
108
|
+
/**
|
|
109
|
+
* Sorting options.
|
|
110
|
+
* For more details on how to use sorting,
|
|
111
|
+
* see [API Query Language: The Sort Section](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-sort-section)
|
|
112
|
+
*/
|
|
113
|
+
sort?: Sorting[];
|
|
114
|
+
/** Pagination options. */
|
|
115
|
+
paging?: Paging;
|
|
116
|
+
}
|
|
117
|
+
export interface Sorting {
|
|
118
|
+
/** Name of the field to sort by. */
|
|
119
|
+
fieldName?: string;
|
|
120
|
+
/** Sort order. */
|
|
121
|
+
order?: SortOrder;
|
|
122
|
+
}
|
|
123
|
+
export declare enum SortOrder {
|
|
124
|
+
ASC = "ASC",
|
|
125
|
+
DESC = "DESC"
|
|
126
|
+
}
|
|
127
|
+
export interface QueryBadgesResponse {
|
|
128
|
+
/** List of badges. */
|
|
129
|
+
badges?: Badge[];
|
|
130
|
+
/** Metadata for the paginated results. */
|
|
131
|
+
metadata?: PagingMetadata;
|
|
132
|
+
}
|
|
133
|
+
export interface GetBadgeRequest {
|
|
134
|
+
/** Badge ID. */
|
|
135
|
+
_id: string;
|
|
136
|
+
}
|
|
137
|
+
export interface GetBadgeResponse {
|
|
138
|
+
/** Badge. */
|
|
139
|
+
badge?: Badge;
|
|
140
|
+
}
|
|
141
|
+
export interface DeleteBadgeRequest {
|
|
142
|
+
/** Badge ID. */
|
|
143
|
+
_id: string;
|
|
144
|
+
}
|
|
145
|
+
export interface DeleteBadgeResponse {
|
|
146
|
+
}
|
|
147
|
+
export interface CountBadgesRequest {
|
|
148
|
+
/**
|
|
149
|
+
* Filter options.
|
|
150
|
+
* Currently supported fields for filtering:
|
|
151
|
+
* - id
|
|
152
|
+
* - title
|
|
153
|
+
* - slug
|
|
154
|
+
* For more details on how to use filter, see [API Query Language: The Filter Section](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section).
|
|
155
|
+
*/
|
|
156
|
+
filter?: Record<string, any> | null;
|
|
157
|
+
}
|
|
158
|
+
export interface CountBadgesResponse {
|
|
159
|
+
/** Badge count. */
|
|
160
|
+
count?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface AssignBadgeRequest {
|
|
163
|
+
/** Badge ID. */
|
|
164
|
+
_id: string;
|
|
165
|
+
/** List of member IDs to assign to the badge. */
|
|
166
|
+
memberIds: string[];
|
|
167
|
+
}
|
|
168
|
+
export interface AssignBadgeResponse {
|
|
169
|
+
/** List of member IDs assigned to the badge. */
|
|
170
|
+
memberIds?: string[];
|
|
171
|
+
}
|
|
172
|
+
export interface BadgeAssigned {
|
|
173
|
+
/** ID of the member who received the badge. */
|
|
174
|
+
memberId?: string;
|
|
175
|
+
}
|
|
176
|
+
export interface AssignBadgesRequest {
|
|
177
|
+
/** List of badge IDs to assign to the member. */
|
|
178
|
+
ids?: string[];
|
|
179
|
+
/** Member ID. */
|
|
180
|
+
memberId?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface AssignBadgesResponse {
|
|
183
|
+
/** List of badge IDs newly assigned to the member. */
|
|
184
|
+
ids?: string[];
|
|
185
|
+
}
|
|
186
|
+
export interface UnassignBadgeRequest {
|
|
187
|
+
/** Badge ID. */
|
|
188
|
+
_id: string;
|
|
189
|
+
/** List of members to remove. */
|
|
190
|
+
memberIds: string[];
|
|
191
|
+
}
|
|
192
|
+
export interface UnassignBadgeResponse {
|
|
193
|
+
}
|
|
194
|
+
export interface BadgeUnassigned {
|
|
195
|
+
/** ID of the member who lost the badge. */
|
|
196
|
+
memberId?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface ListMembersRequest {
|
|
199
|
+
/** Badge ID. */
|
|
200
|
+
_id: string;
|
|
201
|
+
/** Pagination options. */
|
|
202
|
+
paging?: Paging;
|
|
203
|
+
}
|
|
204
|
+
export interface ListMembersResponse {
|
|
205
|
+
/** Member IDs assigned to the badge. */
|
|
206
|
+
memberIds?: string[];
|
|
207
|
+
/** Metadata for the paginated results. */
|
|
208
|
+
metadata?: PagingMetadata;
|
|
209
|
+
}
|
|
210
|
+
export interface ListMembersBadgeIdsRequest {
|
|
211
|
+
/** List of members. */
|
|
212
|
+
memberIds: string[];
|
|
213
|
+
}
|
|
214
|
+
export interface ListMembersBadgeIdsResponse {
|
|
215
|
+
/** List of members and the badges they're assigned to. */
|
|
216
|
+
memberBadgeIds?: MemberBadgeIds[];
|
|
217
|
+
}
|
|
218
|
+
export interface MemberBadgeIds {
|
|
219
|
+
/** Member ID. */
|
|
220
|
+
memberId?: string;
|
|
221
|
+
/** List of badges the member is assigned to. */
|
|
222
|
+
badgeIds?: string[];
|
|
223
|
+
}
|
|
224
|
+
export interface GetMemberCountsPerBadgeRequest {
|
|
225
|
+
}
|
|
226
|
+
export interface GetMemberCountsPerBadgeResponse {
|
|
227
|
+
/** List of badges and counts of members who have each badge. */
|
|
228
|
+
badgeMemberCounts?: BadgeMemberCount[];
|
|
229
|
+
}
|
|
230
|
+
export interface BadgeMemberCount {
|
|
231
|
+
/** Badge ID. */
|
|
232
|
+
badgeId?: string;
|
|
233
|
+
/** Badge member count. */
|
|
234
|
+
memberCount?: number;
|
|
235
|
+
}
|
|
236
|
+
export interface UpdateBadgesDisplayOrderRequest {
|
|
237
|
+
/** Ordered badge IDs. */
|
|
238
|
+
badgeIds: string[];
|
|
239
|
+
}
|
|
240
|
+
export interface UpdateBadgesDisplayOrderResponse {
|
|
241
|
+
/** Reordered badges list. */
|
|
242
|
+
badges?: Badge[];
|
|
243
|
+
}
|
|
244
|
+
export interface ListMembersWithBadgesRequest {
|
|
245
|
+
/** Cursor paging options */
|
|
246
|
+
paging?: CursorPaging;
|
|
247
|
+
}
|
|
248
|
+
export interface CursorPaging {
|
|
249
|
+
/** Maximum number of items to return in the results. */
|
|
250
|
+
limit?: number | null;
|
|
251
|
+
/**
|
|
252
|
+
* Pointer to the next or previous page in the list of results.
|
|
253
|
+
*
|
|
254
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
255
|
+
* Not relevant for the first request.
|
|
256
|
+
*/
|
|
257
|
+
cursor?: string | null;
|
|
258
|
+
}
|
|
259
|
+
export interface ListMembersWithBadgesResponse {
|
|
260
|
+
/** List of members */
|
|
261
|
+
memberIds?: string[];
|
|
262
|
+
/** Metadata for the paginated results */
|
|
263
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
264
|
+
}
|
|
265
|
+
export interface CursorPagingMetadata {
|
|
266
|
+
/** Number of items returned in the response. */
|
|
267
|
+
count?: number | null;
|
|
268
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
269
|
+
cursors?: Cursors;
|
|
270
|
+
/**
|
|
271
|
+
* Whether there are more pages to retrieve following the current page.
|
|
272
|
+
*
|
|
273
|
+
* + `true`: Another page of results can be retrieved.
|
|
274
|
+
* + `false`: This is the last page.
|
|
275
|
+
*/
|
|
276
|
+
hasNext?: boolean | null;
|
|
277
|
+
}
|
|
278
|
+
export interface Cursors {
|
|
279
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
280
|
+
next?: string | null;
|
|
281
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
282
|
+
prev?: string | null;
|
|
283
|
+
}
|
|
284
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
285
|
+
createdEvent?: EntityCreatedEvent;
|
|
286
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
287
|
+
deletedEvent?: EntityDeletedEvent;
|
|
288
|
+
actionEvent?: ActionEvent;
|
|
289
|
+
/**
|
|
290
|
+
* Unique event ID.
|
|
291
|
+
* Allows clients to ignore duplicate webhooks.
|
|
292
|
+
*/
|
|
293
|
+
_id?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Assumes actions are also always typed to an entity_type
|
|
296
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
297
|
+
*/
|
|
298
|
+
entityFqdn?: string;
|
|
299
|
+
/**
|
|
300
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
301
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
302
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
303
|
+
*/
|
|
304
|
+
slug?: string;
|
|
305
|
+
/** ID of the entity associated with the event. */
|
|
306
|
+
entityId?: string;
|
|
307
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
308
|
+
eventTime?: Date | null;
|
|
309
|
+
/**
|
|
310
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
311
|
+
* (for example, GDPR).
|
|
312
|
+
*/
|
|
313
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
314
|
+
/** If present, indicates the action that triggered the event. */
|
|
315
|
+
originatedFrom?: string | null;
|
|
316
|
+
/**
|
|
317
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
318
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
319
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
320
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
321
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
322
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
323
|
+
*/
|
|
324
|
+
entityEventSequence?: string | null;
|
|
325
|
+
}
|
|
326
|
+
/** @oneof */
|
|
327
|
+
export interface DomainEventBodyOneOf {
|
|
328
|
+
createdEvent?: EntityCreatedEvent;
|
|
329
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
330
|
+
deletedEvent?: EntityDeletedEvent;
|
|
331
|
+
actionEvent?: ActionEvent;
|
|
332
|
+
}
|
|
333
|
+
export interface EntityCreatedEvent {
|
|
334
|
+
entity?: string;
|
|
335
|
+
}
|
|
336
|
+
export interface RestoreInfo {
|
|
337
|
+
deletedDate?: Date | null;
|
|
338
|
+
}
|
|
339
|
+
export interface EntityUpdatedEvent {
|
|
340
|
+
/**
|
|
341
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
342
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
343
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
344
|
+
*/
|
|
345
|
+
currentEntity?: string;
|
|
346
|
+
}
|
|
347
|
+
export interface EntityDeletedEvent {
|
|
348
|
+
/** Entity that was deleted */
|
|
349
|
+
deletedEntity?: string | null;
|
|
350
|
+
}
|
|
351
|
+
export interface ActionEvent {
|
|
352
|
+
body?: string;
|
|
353
|
+
}
|
|
354
|
+
export interface MessageEnvelope {
|
|
355
|
+
/** App instance ID. */
|
|
356
|
+
instanceId?: string | null;
|
|
357
|
+
/** Event type. */
|
|
358
|
+
eventType?: string;
|
|
359
|
+
/** The identification type and identity data. */
|
|
360
|
+
identity?: IdentificationData;
|
|
361
|
+
/** Stringify payload. */
|
|
362
|
+
data?: string;
|
|
363
|
+
}
|
|
364
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
365
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
366
|
+
anonymousVisitorId?: string;
|
|
367
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
368
|
+
memberId?: string;
|
|
369
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
370
|
+
wixUserId?: string;
|
|
371
|
+
/** ID of an app. */
|
|
372
|
+
appId?: string;
|
|
373
|
+
/** @readonly */
|
|
374
|
+
identityType?: WebhookIdentityType;
|
|
375
|
+
}
|
|
376
|
+
/** @oneof */
|
|
377
|
+
export interface IdentificationDataIdOneOf {
|
|
378
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
379
|
+
anonymousVisitorId?: string;
|
|
380
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
381
|
+
memberId?: string;
|
|
382
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
383
|
+
wixUserId?: string;
|
|
384
|
+
/** ID of an app. */
|
|
385
|
+
appId?: string;
|
|
386
|
+
}
|
|
387
|
+
export declare enum WebhookIdentityType {
|
|
388
|
+
UNKNOWN = "UNKNOWN",
|
|
389
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
390
|
+
MEMBER = "MEMBER",
|
|
391
|
+
WIX_USER = "WIX_USER",
|
|
392
|
+
APP = "APP"
|
|
393
|
+
}
|
|
394
|
+
export interface BadgeNonNullableFields {
|
|
395
|
+
_id: string;
|
|
396
|
+
}
|
|
397
|
+
export interface CreateBadgeResponseNonNullableFields {
|
|
398
|
+
badge?: BadgeNonNullableFields;
|
|
399
|
+
}
|
|
400
|
+
export interface UpdateBadgeResponseNonNullableFields {
|
|
401
|
+
badge?: BadgeNonNullableFields;
|
|
402
|
+
}
|
|
403
|
+
export interface ListBadgesResponseNonNullableFields {
|
|
404
|
+
badges: BadgeNonNullableFields[];
|
|
405
|
+
}
|
|
406
|
+
export interface GetBadgeResponseNonNullableFields {
|
|
407
|
+
badge?: BadgeNonNullableFields;
|
|
408
|
+
}
|
|
409
|
+
export interface AssignBadgeResponseNonNullableFields {
|
|
410
|
+
memberIds: string[];
|
|
411
|
+
}
|
|
412
|
+
export interface ListMembersResponseNonNullableFields {
|
|
413
|
+
memberIds: string[];
|
|
414
|
+
}
|
|
415
|
+
interface MemberBadgeIdsNonNullableFields {
|
|
416
|
+
memberId: string;
|
|
417
|
+
badgeIds: string[];
|
|
418
|
+
}
|
|
419
|
+
export interface ListMembersBadgeIdsResponseNonNullableFields {
|
|
420
|
+
memberBadgeIds: MemberBadgeIdsNonNullableFields[];
|
|
421
|
+
}
|
|
422
|
+
interface BadgeMemberCountNonNullableFields {
|
|
423
|
+
badgeId: string;
|
|
424
|
+
memberCount: number;
|
|
425
|
+
}
|
|
426
|
+
export interface GetMemberCountsPerBadgeResponseNonNullableFields {
|
|
427
|
+
badgeMemberCounts: BadgeMemberCountNonNullableFields[];
|
|
428
|
+
}
|
|
429
|
+
export interface UpdateBadgesDisplayOrderResponseNonNullableFields {
|
|
430
|
+
badges: BadgeNonNullableFields[];
|
|
431
|
+
}
|
|
432
|
+
export interface BaseEventMetadata {
|
|
433
|
+
/** App instance ID. */
|
|
434
|
+
instanceId?: string | null;
|
|
435
|
+
/** Event type. */
|
|
436
|
+
eventType?: string;
|
|
437
|
+
/** The identification type and identity data. */
|
|
438
|
+
identity?: IdentificationData;
|
|
439
|
+
}
|
|
440
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
441
|
+
/**
|
|
442
|
+
* Unique event ID.
|
|
443
|
+
* Allows clients to ignore duplicate webhooks.
|
|
444
|
+
*/
|
|
445
|
+
_id?: string;
|
|
446
|
+
/**
|
|
447
|
+
* Assumes actions are also always typed to an entity_type
|
|
448
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
449
|
+
*/
|
|
450
|
+
entityFqdn?: string;
|
|
451
|
+
/**
|
|
452
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
453
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
454
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
455
|
+
*/
|
|
456
|
+
slug?: string;
|
|
457
|
+
/** ID of the entity associated with the event. */
|
|
458
|
+
entityId?: string;
|
|
459
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
460
|
+
eventTime?: Date | null;
|
|
461
|
+
/**
|
|
462
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
463
|
+
* (for example, GDPR).
|
|
464
|
+
*/
|
|
465
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
466
|
+
/** If present, indicates the action that triggered the event. */
|
|
467
|
+
originatedFrom?: string | null;
|
|
468
|
+
/**
|
|
469
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
470
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
471
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
472
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
473
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
474
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
475
|
+
*/
|
|
476
|
+
entityEventSequence?: string | null;
|
|
477
|
+
}
|
|
478
|
+
export interface BadgeAssignedEnvelope {
|
|
479
|
+
data: BadgeAssigned;
|
|
480
|
+
metadata: EventMetadata;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Triggered when a member receives a badge.
|
|
484
|
+
* @permissionScope Manage Badges
|
|
485
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
486
|
+
* @permissionScope Read Badges
|
|
487
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
488
|
+
* @permissionId BADGES.BADGE_READ
|
|
489
|
+
* @webhook
|
|
490
|
+
* @eventType wix.badges.v3.badge_badge_assigned
|
|
491
|
+
*/
|
|
492
|
+
export declare function onBadgeAssigned(handler: (event: BadgeAssignedEnvelope) => void | Promise<void>): void;
|
|
493
|
+
export interface BadgeUnassignedEnvelope {
|
|
494
|
+
data: BadgeUnassigned;
|
|
495
|
+
metadata: EventMetadata;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Triggered when a member's badge is removed.
|
|
499
|
+
* @permissionScope Manage Badges
|
|
500
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
501
|
+
* @permissionScope Read Badges
|
|
502
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
503
|
+
* @permissionId BADGES.BADGE_READ
|
|
504
|
+
* @webhook
|
|
505
|
+
* @eventType wix.badges.v3.badge_badge_unassigned
|
|
506
|
+
*/
|
|
507
|
+
export declare function onBadgeUnassigned(handler: (event: BadgeUnassignedEnvelope) => void | Promise<void>): void;
|
|
508
|
+
export interface BadgeCreatedEnvelope {
|
|
509
|
+
entity: Badge;
|
|
510
|
+
metadata: EventMetadata;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Triggered when a badge is created.
|
|
514
|
+
* @permissionScope Manage Badges
|
|
515
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
516
|
+
* @permissionScope Read Badges
|
|
517
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
518
|
+
* @permissionId BADGES.BADGE_READ
|
|
519
|
+
* @webhook
|
|
520
|
+
* @eventType wix.badges.v3.badge_created
|
|
521
|
+
*/
|
|
522
|
+
export declare function onBadgeCreated(handler: (event: BadgeCreatedEnvelope) => void | Promise<void>): void;
|
|
523
|
+
export interface BadgeDeletedEnvelope {
|
|
524
|
+
metadata: EventMetadata;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Triggered when a badge is deleted.
|
|
528
|
+
* @permissionScope Manage Badges
|
|
529
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
530
|
+
* @permissionScope Read Badges
|
|
531
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
532
|
+
* @permissionId BADGES.BADGE_READ
|
|
533
|
+
* @webhook
|
|
534
|
+
* @eventType wix.badges.v3.badge_deleted
|
|
535
|
+
*/
|
|
536
|
+
export declare function onBadgeDeleted(handler: (event: BadgeDeletedEnvelope) => void | Promise<void>): void;
|
|
537
|
+
export interface BadgeUpdatedEnvelope {
|
|
538
|
+
entity: Badge;
|
|
539
|
+
metadata: EventMetadata;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Triggered when a badge is updated.
|
|
543
|
+
* @permissionScope Manage Badges
|
|
544
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
545
|
+
* @permissionScope Read Badges
|
|
546
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
547
|
+
* @permissionId BADGES.BADGE_READ
|
|
548
|
+
* @webhook
|
|
549
|
+
* @eventType wix.badges.v3.badge_updated
|
|
550
|
+
*/
|
|
551
|
+
export declare function onBadgeUpdated(handler: (event: BadgeUpdatedEnvelope) => void | Promise<void>): void;
|
|
552
|
+
/**
|
|
553
|
+
* Creates a badge.
|
|
554
|
+
*
|
|
555
|
+
*
|
|
556
|
+
* The `createBadge()` function returns a Promise that resolves to the newly created badge.
|
|
557
|
+
*
|
|
558
|
+
* New badges do not have any badge permissions by default. You can set [badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge) from the Badges page in the Dashboard.
|
|
559
|
+
*
|
|
560
|
+
* If `backgroundColor` or `textColor` are not specified, they default to `"#796EFF"` (purple) and `"#FFFFFF"` (white) respectively.
|
|
561
|
+
* @param badge - Badge to create.
|
|
562
|
+
* @public
|
|
563
|
+
* @requiredField badge
|
|
564
|
+
* @requiredField badge.backgroundColor
|
|
565
|
+
* @requiredField badge.textColor
|
|
566
|
+
* @requiredField badge.title
|
|
567
|
+
* @permissionId BADGES.BADGE_CREATE
|
|
568
|
+
* @permissionScope Manage Badges
|
|
569
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
570
|
+
* @applicableIdentity APP
|
|
571
|
+
* @returns Created badge.
|
|
572
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.CreateBadge
|
|
573
|
+
*/
|
|
574
|
+
export declare function createBadge(badge: Badge): Promise<Badge & BadgeNonNullableFields>;
|
|
575
|
+
/**
|
|
576
|
+
* Updates a badge.
|
|
577
|
+
*
|
|
578
|
+
* The `updateBadge()` function returns a Promise that resolves to the updated badge.
|
|
579
|
+
*
|
|
580
|
+
* Only the properties passed in the `BadgeInfo` object will be updated. All other properties will remain the same.
|
|
581
|
+
*
|
|
582
|
+
* Because the badge `slug` is based on the badge `title`, if you change `title`, `slug` is updated accordingly.
|
|
583
|
+
*
|
|
584
|
+
* `badgeId` must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.
|
|
585
|
+
* @param _id - Badge ID.
|
|
586
|
+
* @public
|
|
587
|
+
* @requiredField _id
|
|
588
|
+
* @requiredField badge
|
|
589
|
+
* @permissionId BADGES.BADGE_UPDATE
|
|
590
|
+
* @permissionScope Manage Badges
|
|
591
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
592
|
+
* @applicableIdentity APP
|
|
593
|
+
* @returns Updated badge.
|
|
594
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.UpdateBadge
|
|
595
|
+
*/
|
|
596
|
+
export declare function updateBadge(_id: string, badge: UpdateBadge): Promise<Badge & BadgeNonNullableFields>;
|
|
597
|
+
export interface UpdateBadge {
|
|
598
|
+
/**
|
|
599
|
+
* Badge ID.
|
|
600
|
+
* @readonly
|
|
601
|
+
*/
|
|
602
|
+
_id?: string;
|
|
603
|
+
/** Text displayed on the badge in the Wix UI. */
|
|
604
|
+
title?: string | null;
|
|
605
|
+
/** Badge description. */
|
|
606
|
+
description?: string | null;
|
|
607
|
+
/**
|
|
608
|
+
* Badge background color in hexadecimal RGB format. Uppercase letters only.
|
|
609
|
+
*
|
|
610
|
+
* Default: `#796EFF ` (purple).
|
|
611
|
+
*/
|
|
612
|
+
backgroundColor?: string | null;
|
|
613
|
+
/**
|
|
614
|
+
* Badge text color in hexadecimal RGB format. Uppercase letters only.
|
|
615
|
+
*
|
|
616
|
+
* Default: `"#FFFFFF"` (white).
|
|
617
|
+
*/
|
|
618
|
+
textColor?: string | null;
|
|
619
|
+
/**
|
|
620
|
+
* Badge icon as an SVG image. One of:
|
|
621
|
+
*
|
|
622
|
+
* - An external web URL in the following format: `http(s)://<image url>`.
|
|
623
|
+
* - The [source URL](https://www.wix.com/velo/reference/wix-media-backend/mediamanager-obj/getfileurl) for a Wix Media Manager file. Wix Media Manager file names in a `wix:image://...` format are not supported.
|
|
624
|
+
*/
|
|
625
|
+
icon?: string | null;
|
|
626
|
+
/**
|
|
627
|
+
* Whether the badge has special permissions
|
|
628
|
+
* to access specific members-only pages.
|
|
629
|
+
* When `true`, members with the badge receive special permissions,
|
|
630
|
+
* and site contributors can
|
|
631
|
+
* [manage badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge)
|
|
632
|
+
* in the Dashboard.
|
|
633
|
+
* When `false`, members with the badge receive no special permissions.
|
|
634
|
+
*/
|
|
635
|
+
permissionsEnabled?: boolean | null;
|
|
636
|
+
/**
|
|
637
|
+
* Slugified name. Used to represent the badge in a URL.
|
|
638
|
+
* @readonly
|
|
639
|
+
*/
|
|
640
|
+
slug?: string | null;
|
|
641
|
+
/**
|
|
642
|
+
* Date the badge was created.
|
|
643
|
+
* @readonly
|
|
644
|
+
*/
|
|
645
|
+
_createdDate?: Date | null;
|
|
646
|
+
/**
|
|
647
|
+
* Date the badge was updated.
|
|
648
|
+
* @readonly
|
|
649
|
+
*/
|
|
650
|
+
_updatedDate?: Date | null;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Lists the badges.
|
|
654
|
+
*
|
|
655
|
+
*
|
|
656
|
+
* The `listBadges` function returns a Promise that resolves when the badges are retrieved. Retrieves up to 1000 badges, given the requested paging. Default paging.limit is 100, paging.offset - 0.
|
|
657
|
+
*
|
|
658
|
+
* This function is not a universal function and runs only on the backend.
|
|
659
|
+
* @public
|
|
660
|
+
* @permissionId BADGES.BADGE_READ
|
|
661
|
+
* @permissionScope Manage Badges
|
|
662
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
663
|
+
* @permissionScope Read Badges
|
|
664
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
665
|
+
* @applicableIdentity APP
|
|
666
|
+
* @applicableIdentity VISITOR
|
|
667
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.ListBadges
|
|
668
|
+
*/
|
|
669
|
+
export declare function listBadges(options?: ListBadgesOptions): Promise<ListBadgesResponse & ListBadgesResponseNonNullableFields>;
|
|
670
|
+
export interface ListBadgesOptions {
|
|
671
|
+
/** Pagination options. */
|
|
672
|
+
paging?: Paging;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Retrieves information about a badge.
|
|
676
|
+
*
|
|
677
|
+
*
|
|
678
|
+
* The `getBadge` function returns a Promise that resolves when the badge information is retrieved.
|
|
679
|
+
*
|
|
680
|
+
* The `_id` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.
|
|
681
|
+
*
|
|
682
|
+
* This function is not a universal function and runs only on the backend.
|
|
683
|
+
* @param _id - Badge ID.
|
|
684
|
+
* @public
|
|
685
|
+
* @requiredField _id
|
|
686
|
+
* @permissionId BADGES.BADGE_READ
|
|
687
|
+
* @permissionScope Manage Badges
|
|
688
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
689
|
+
* @permissionScope Read Badges
|
|
690
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
691
|
+
* @applicableIdentity APP
|
|
692
|
+
* @applicableIdentity VISITOR
|
|
693
|
+
* @returns Badge.
|
|
694
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.GetBadge
|
|
695
|
+
*/
|
|
696
|
+
export declare function getBadge(_id: string): Promise<Badge & BadgeNonNullableFields>;
|
|
697
|
+
/**
|
|
698
|
+
* Deletes a badge.
|
|
699
|
+
*
|
|
700
|
+
*
|
|
701
|
+
* The `deleteBadge()` function returns a Promise that resolves when the specified badge is deleted.
|
|
702
|
+
*
|
|
703
|
+
* The `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.
|
|
704
|
+
* @param _id - Badge ID.
|
|
705
|
+
* @public
|
|
706
|
+
* @requiredField _id
|
|
707
|
+
* @permissionId BADGES.BADGE_DELETE
|
|
708
|
+
* @permissionScope Manage Badges
|
|
709
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
710
|
+
* @applicableIdentity APP
|
|
711
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.DeleteBadge
|
|
712
|
+
*/
|
|
713
|
+
export declare function deleteBadge(_id: string): Promise<void>;
|
|
714
|
+
/**
|
|
715
|
+
* Assigns a badge to site members.
|
|
716
|
+
*
|
|
717
|
+
*
|
|
718
|
+
* The `assignBadge()` function returns a Promise that resolves when the specified badge is assigned to the specified members.
|
|
719
|
+
*
|
|
720
|
+
* The `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.
|
|
721
|
+
* @param _id - Badge ID.
|
|
722
|
+
* @param memberIds - List of member IDs to assign to the badge.
|
|
723
|
+
* @public
|
|
724
|
+
* @requiredField _id
|
|
725
|
+
* @requiredField memberIds
|
|
726
|
+
* @permissionId BADGES.BADGE_ASSIGN
|
|
727
|
+
* @permissionScope Manage Badges
|
|
728
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
729
|
+
* @applicableIdentity APP
|
|
730
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.AssignBadge
|
|
731
|
+
*/
|
|
732
|
+
export declare function assignBadge(_id: string, memberIds: string[]): Promise<AssignBadgeResponse & AssignBadgeResponseNonNullableFields>;
|
|
733
|
+
/**
|
|
734
|
+
* Removes site members from an assigned badge.
|
|
735
|
+
*
|
|
736
|
+
*
|
|
737
|
+
* The `unassignBadge()` function returns a Promise that resolves when the specified members are removed as holders of the specified badge.
|
|
738
|
+
*
|
|
739
|
+
* The `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.
|
|
740
|
+
* @param _id - Badge ID.
|
|
741
|
+
* @param memberIds - List of members to remove.
|
|
742
|
+
* @public
|
|
743
|
+
* @requiredField _id
|
|
744
|
+
* @requiredField memberIds
|
|
745
|
+
* @permissionId BADGES.BADGE_ASSIGN
|
|
746
|
+
* @permissionScope Manage Badges
|
|
747
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
748
|
+
* @applicableIdentity APP
|
|
749
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.UnassignBadge
|
|
750
|
+
*/
|
|
751
|
+
export declare function unassignBadge(_id: string, memberIds: string[]): Promise<void>;
|
|
752
|
+
/**
|
|
753
|
+
* Lists the IDs of all members assigned to a badge.
|
|
754
|
+
*
|
|
755
|
+
*
|
|
756
|
+
* The `listMembersByBadge()` function returns a Promise that resolves to a list of member IDs assigned to the specified badge.
|
|
757
|
+
*
|
|
758
|
+
* Retrieves up to 1000 site members who have a specified badge. Default `paging.limit` is 100, `paging.offset` - 0.
|
|
759
|
+
*
|
|
760
|
+
* The `_id` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.
|
|
761
|
+
*
|
|
762
|
+
* This function is not a universal function and runs only on the backend.
|
|
763
|
+
* @param _id - Badge ID.
|
|
764
|
+
* @public
|
|
765
|
+
* @requiredField _id
|
|
766
|
+
* @permissionId BADGES.BADGE_READ_MEMBERS
|
|
767
|
+
* @permissionScope Manage Badges
|
|
768
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
769
|
+
* @permissionScope Read Badges
|
|
770
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
771
|
+
* @applicableIdentity APP
|
|
772
|
+
* @applicableIdentity VISITOR
|
|
773
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.ListMembers
|
|
774
|
+
*/
|
|
775
|
+
export declare function listMembersByBadge(_id: string, options?: ListMembersByBadgeOptions): Promise<ListMembersResponse & ListMembersResponseNonNullableFields>;
|
|
776
|
+
export interface ListMembersByBadgeOptions {
|
|
777
|
+
/** Pagination options. */
|
|
778
|
+
paging?: Paging;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Lists the badges assigned to each of the specified site members.
|
|
782
|
+
*
|
|
783
|
+
*
|
|
784
|
+
* The `listBadgesPerMember()` function returns a Promise that resolves to a list of badge IDs associated with each of the specified members.
|
|
785
|
+
*
|
|
786
|
+
* This function is not a universal function and runs only on the backend.
|
|
787
|
+
* @param memberIds - List of members.
|
|
788
|
+
* @public
|
|
789
|
+
* @requiredField memberIds
|
|
790
|
+
* @permissionId BADGES.BADGE_READ_MEMBERS
|
|
791
|
+
* @permissionScope Manage Badges
|
|
792
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
793
|
+
* @permissionScope Read Badges
|
|
794
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
795
|
+
* @applicableIdentity APP
|
|
796
|
+
* @applicableIdentity VISITOR
|
|
797
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.ListMembersBadgeIds
|
|
798
|
+
*/
|
|
799
|
+
export declare function listBadgesPerMember(memberIds: string[]): Promise<ListMembersBadgeIdsResponse & ListMembersBadgeIdsResponseNonNullableFields>;
|
|
800
|
+
/**
|
|
801
|
+
* Retrieves member count per badge.
|
|
802
|
+
*
|
|
803
|
+
*
|
|
804
|
+
* The `getMemberCountsPerBadge` function returns a Promise that resolves when the member counts of each badge are retrieved.
|
|
805
|
+
*
|
|
806
|
+
* This function is not a universal function and runs only on the backend.
|
|
807
|
+
* @public
|
|
808
|
+
* @permissionId BADGES.BADGE_READ_MEMBERS
|
|
809
|
+
* @permissionScope Manage Badges
|
|
810
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
811
|
+
* @permissionScope Read Badges
|
|
812
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.READ-BADGES
|
|
813
|
+
* @applicableIdentity APP
|
|
814
|
+
* @applicableIdentity VISITOR
|
|
815
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.GetMemberCountsPerBadge
|
|
816
|
+
*/
|
|
817
|
+
export declare function getMemberCountsPerBadge(): Promise<GetMemberCountsPerBadgeResponse & GetMemberCountsPerBadgeResponseNonNullableFields>;
|
|
818
|
+
/**
|
|
819
|
+
* Updates badges' display order.
|
|
820
|
+
*
|
|
821
|
+
*
|
|
822
|
+
* The `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.
|
|
823
|
+
*
|
|
824
|
+
* This function is not a universal function and runs only on the backend
|
|
825
|
+
* @param badgeIds - Ordered badge IDs.
|
|
826
|
+
* @public
|
|
827
|
+
* @requiredField badgeIds
|
|
828
|
+
* @permissionId BADGES.BADGE_UPDATE_DISPLAY_ORDER
|
|
829
|
+
* @permissionScope Manage Badges
|
|
830
|
+
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-BADGES
|
|
831
|
+
* @applicableIdentity APP
|
|
832
|
+
* @fqn com.wixpress.badges.v3.BadgesServiceV3.UpdateBadgesDisplayOrder
|
|
833
|
+
*/
|
|
834
|
+
export declare function updateBadgesDisplayOrder(badgeIds: string[]): Promise<UpdateBadgesDisplayOrderResponse & UpdateBadgesDisplayOrderResponseNonNullableFields>;
|
|
835
|
+
export {};
|