@wix/auto_sdk_badges_badges-v-2 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 (39) hide show
  1. package/build/cjs/index.d.ts +497 -0
  2. package/build/cjs/index.js +902 -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 +790 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +469 -0
  8. package/build/cjs/meta.js +669 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +497 -0
  11. package/build/es/index.mjs +864 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1 -0
  14. package/build/es/index.typings.mjs +752 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +469 -0
  17. package/build/es/meta.mjs +628 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +160 -0
  21. package/build/internal/cjs/index.js +902 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +673 -0
  24. package/build/internal/cjs/index.typings.js +790 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +470 -0
  27. package/build/internal/cjs/meta.js +669 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +160 -0
  30. package/build/internal/es/index.mjs +864 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +673 -0
  33. package/build/internal/es/index.typings.mjs +752 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +470 -0
  36. package/build/internal/es/meta.mjs +628 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,673 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ interface Badge {
4
+ /**
5
+ * Badge id
6
+ * @format GUID
7
+ */
8
+ _id?: string;
9
+ /** Badge title */
10
+ title?: string;
11
+ /** Badge description */
12
+ description?: string;
13
+ /**
14
+ * Badge background color in 6-digit color hex in upper case (e.g. #FFFFFF)
15
+ * @format COLOR_HEX
16
+ */
17
+ backgroundColor?: string;
18
+ /**
19
+ * Badge text color in 6-digit color hex in upper case (e.g. #FFFFFF)
20
+ * @format COLOR_HEX
21
+ */
22
+ textColor?: string;
23
+ /** Badge icon SVG as 'https://...' */
24
+ icon?: string;
25
+ /**
26
+ * Id of role/group in groups service that badge assignee belongs to
27
+ * @format GUID
28
+ */
29
+ roleId?: string;
30
+ /**
31
+ * Indicates whether badge has permissions.
32
+ *
33
+ * Badges can have special permissions to access specific members-only pages.
34
+ *
35
+ * When the value is set to **true**, badge permissions can be managed in
36
+ * [permissions table](https://www.wix.com/my-account/site-selector/?buttonText=Manage%20Permissions&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/member-permissions/roles/manage-permissions).
37
+ * Site members will receive relevant permissions once assigned such badge.
38
+ *
39
+ * When the value is set to **false**, badge has no associated permissions
40
+ * and is not visible in permissions table.
41
+ * Site member will not receive any permissions once assigned such badge.
42
+ */
43
+ hasPermissions?: boolean;
44
+ /** Badge url keyword operator */
45
+ slug?: string;
46
+ /** Date when badge was created */
47
+ createDate?: Date | null;
48
+ /** Date when badge was last updated */
49
+ updateDate?: Date | null;
50
+ }
51
+ interface CreateRequest {
52
+ /** Badge title */
53
+ title: string;
54
+ /** Badge description */
55
+ description?: string;
56
+ /**
57
+ * Badge background color in 6-digit upper-cased color hex (e.g. #FFFFFF)
58
+ * @format COLOR_HEX
59
+ */
60
+ backgroundColor: string;
61
+ /**
62
+ * Badge text color in 6-digit upper-cased color hex (e.g. #FFFFFF)
63
+ * @format COLOR_HEX
64
+ */
65
+ textColor: string;
66
+ /** Badge icon SVG as 'https://...' */
67
+ icon?: string;
68
+ /** Indicates whether badge has permissions */
69
+ hasPermissions?: boolean;
70
+ }
71
+ interface CreateResponse {
72
+ /** Created badge */
73
+ badge?: Badge;
74
+ }
75
+ interface UpdateRequest {
76
+ /**
77
+ * Badge id
78
+ * @format GUID
79
+ */
80
+ _id: string;
81
+ /** Badge title */
82
+ title?: string | null;
83
+ /** Badge description */
84
+ description?: string | null;
85
+ /**
86
+ * Badge background color in 6-digit upper-cased color hex (e.g. #FFFFFF)
87
+ * @format COLOR_HEX
88
+ */
89
+ backgroundColor?: string | null;
90
+ /**
91
+ * Badge text color in 6-digit upper-cased color hex (e.g. #FFFFFF)
92
+ * @format COLOR_HEX
93
+ */
94
+ textColor?: string | null;
95
+ /** Badge icon SVG as 'https://...' */
96
+ icon?: string | null;
97
+ /** Indicates whether badge has permissions */
98
+ hasPermissions?: boolean | null;
99
+ }
100
+ interface UpdateResponse {
101
+ /** Updated badge */
102
+ badge?: Badge;
103
+ }
104
+ interface ListRequest {
105
+ /**
106
+ * Limit the number of badges to return
107
+ * @min 1
108
+ * @max 1000
109
+ */
110
+ limit?: number | null;
111
+ /** Default offset is 0. */
112
+ offset?: number | null;
113
+ }
114
+ interface ListResponse {
115
+ /** List of badges in a site */
116
+ badges?: Badge[];
117
+ }
118
+ interface QueryRequest {
119
+ /** Filter criteria */
120
+ filter?: Record<string, any> | null;
121
+ /** Sorting criteria */
122
+ sort?: Sorting[];
123
+ /** Result paging data */
124
+ paging?: Paging;
125
+ }
126
+ interface Sorting {
127
+ /**
128
+ * Name of the field to sort by.
129
+ * @maxLength 512
130
+ */
131
+ fieldName?: string;
132
+ /** Sort order. */
133
+ order?: SortOrderWithLiterals;
134
+ }
135
+ declare enum SortOrder {
136
+ ASC = "ASC",
137
+ DESC = "DESC"
138
+ }
139
+ /** @enumType */
140
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
141
+ interface Paging {
142
+ /**
143
+ * Limit the number of badges to return
144
+ * @min 1
145
+ * @max 1000
146
+ */
147
+ limit?: number | null;
148
+ /** Default offset is 0. */
149
+ offset?: number | null;
150
+ }
151
+ interface QueryResponse {
152
+ /** List of sorted badges in a site that satisfy filter and paging */
153
+ badges?: Badge[];
154
+ /** Total count of badges in a site that satisfy given filter */
155
+ count?: string;
156
+ }
157
+ interface GetRequest {
158
+ /**
159
+ * Badge id
160
+ * @format GUID
161
+ */
162
+ _id: string;
163
+ }
164
+ interface GetResponse {
165
+ /** Badge */
166
+ badge?: Badge;
167
+ }
168
+ interface DeleteRequest {
169
+ /**
170
+ * Badge id
171
+ * @format GUID
172
+ */
173
+ _id: string;
174
+ }
175
+ interface DeleteResponse {
176
+ }
177
+ interface CountRequest {
178
+ /** Filter criteria used for counting */
179
+ filter?: Record<string, any> | null;
180
+ }
181
+ interface CountResponse {
182
+ /** Badges count */
183
+ count?: string;
184
+ }
185
+ interface AssignBadgeRequest {
186
+ /**
187
+ * Badge id
188
+ * @format GUID
189
+ */
190
+ _id: string;
191
+ /**
192
+ * Ids of members this badge should be assigned to
193
+ * @format GUID
194
+ */
195
+ memberIds: string[];
196
+ }
197
+ interface AssignBadgeResponse {
198
+ /**
199
+ * Ids of members given badge has been assigned to
200
+ * @format GUID
201
+ */
202
+ memberIds?: string[];
203
+ }
204
+ interface BadgeAssigned {
205
+ /**
206
+ * Member ids who have the given badge assigned
207
+ * @format GUID
208
+ */
209
+ memberId?: string;
210
+ }
211
+ interface UnassignBadgeRequest {
212
+ /**
213
+ * Badge id
214
+ * @format GUID
215
+ */
216
+ _id: string;
217
+ /**
218
+ * Ids of members given badge will be removed from
219
+ * @format GUID
220
+ */
221
+ memberIds: string[];
222
+ }
223
+ interface UnassignBadgeResponse {
224
+ }
225
+ interface BadgeUnassigned {
226
+ /**
227
+ * Member id who had the badge unassigned
228
+ * @format GUID
229
+ */
230
+ memberId?: string;
231
+ }
232
+ interface ListMembersRequest {
233
+ /**
234
+ * Badge id
235
+ * @format GUID
236
+ */
237
+ _id: string;
238
+ }
239
+ interface ListMembersResponse {
240
+ /**
241
+ * Member ids who have the given badge assigned
242
+ * @format GUID
243
+ */
244
+ memberIds?: string[];
245
+ }
246
+ interface ListMembersBadgeIdsRequest {
247
+ /**
248
+ * Ids of members whose badge ids should be listed
249
+ * @format GUID
250
+ */
251
+ memberIds: string[];
252
+ }
253
+ interface ListMembersBadgeIdsResponse {
254
+ /** List of members with Ids of badges assigned to them */
255
+ memberBadgeIds?: MemberBadgeIds[];
256
+ }
257
+ interface MemberBadgeIds {
258
+ /**
259
+ * Member id
260
+ * @format GUID
261
+ */
262
+ memberId?: string;
263
+ /**
264
+ * Badge ids assigned to a given member
265
+ * @format GUID
266
+ */
267
+ badgeIds?: string[];
268
+ }
269
+ interface GetBadgeCountersRequest {
270
+ }
271
+ interface GetBadgeCountersResponse {
272
+ /** Ids of badges with a member count with this assigned badge */
273
+ badgeMemberCounts?: BadgeMemberCount[];
274
+ }
275
+ interface BadgeMemberCount {
276
+ /**
277
+ * Badge id
278
+ * @format GUID
279
+ */
280
+ badgeId?: string;
281
+ /** Number of members with assigned badge */
282
+ memberCount?: number;
283
+ }
284
+ interface UpdateBadgesOrderRequest {
285
+ /**
286
+ * Ordered badges ids
287
+ * @format GUID
288
+ * @minSize 1
289
+ */
290
+ badgeIds?: string[];
291
+ }
292
+ interface UpdateBadgesOrderResponse {
293
+ /** Reordered badges */
294
+ badges?: Badge[];
295
+ }
296
+ interface DomainEvent extends DomainEventBodyOneOf {
297
+ createdEvent?: EntityCreatedEvent;
298
+ updatedEvent?: EntityUpdatedEvent;
299
+ deletedEvent?: EntityDeletedEvent;
300
+ actionEvent?: ActionEvent;
301
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
302
+ _id?: string;
303
+ /**
304
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
305
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
306
+ */
307
+ entityFqdn?: string;
308
+ /**
309
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
310
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
311
+ */
312
+ slug?: string;
313
+ /** ID of the entity associated with the event. */
314
+ entityId?: string;
315
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
316
+ eventTime?: Date | null;
317
+ /**
318
+ * Whether the event was triggered as a result of a privacy regulation application
319
+ * (for example, GDPR).
320
+ */
321
+ triggeredByAnonymizeRequest?: boolean | null;
322
+ /** If present, indicates the action that triggered the event. */
323
+ originatedFrom?: string | null;
324
+ /**
325
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
326
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
327
+ */
328
+ entityEventSequence?: string | null;
329
+ }
330
+ /** @oneof */
331
+ interface DomainEventBodyOneOf {
332
+ createdEvent?: EntityCreatedEvent;
333
+ updatedEvent?: EntityUpdatedEvent;
334
+ deletedEvent?: EntityDeletedEvent;
335
+ actionEvent?: ActionEvent;
336
+ }
337
+ interface EntityCreatedEvent {
338
+ entity?: string;
339
+ }
340
+ interface RestoreInfo {
341
+ deletedDate?: Date | null;
342
+ }
343
+ interface EntityUpdatedEvent {
344
+ /**
345
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
346
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
347
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
348
+ */
349
+ currentEntity?: string;
350
+ }
351
+ interface EntityDeletedEvent {
352
+ /** Entity that was deleted. */
353
+ deletedEntity?: string | null;
354
+ }
355
+ interface ActionEvent {
356
+ body?: string;
357
+ }
358
+ interface MessageEnvelope {
359
+ /**
360
+ * App instance ID.
361
+ * @format GUID
362
+ */
363
+ instanceId?: string | null;
364
+ /**
365
+ * Event type.
366
+ * @maxLength 150
367
+ */
368
+ eventType?: string;
369
+ /** The identification type and identity data. */
370
+ identity?: IdentificationData;
371
+ /** Stringify payload. */
372
+ data?: string;
373
+ }
374
+ interface IdentificationData extends IdentificationDataIdOneOf {
375
+ /**
376
+ * ID of a site visitor that has not logged in to the site.
377
+ * @format GUID
378
+ */
379
+ anonymousVisitorId?: string;
380
+ /**
381
+ * ID of a site visitor that has logged in to the site.
382
+ * @format GUID
383
+ */
384
+ memberId?: string;
385
+ /**
386
+ * ID of a Wix user (site owner, contributor, etc.).
387
+ * @format GUID
388
+ */
389
+ wixUserId?: string;
390
+ /**
391
+ * ID of an app.
392
+ * @format GUID
393
+ */
394
+ appId?: string;
395
+ /** @readonly */
396
+ identityType?: WebhookIdentityTypeWithLiterals;
397
+ }
398
+ /** @oneof */
399
+ interface IdentificationDataIdOneOf {
400
+ /**
401
+ * ID of a site visitor that has not logged in to the site.
402
+ * @format GUID
403
+ */
404
+ anonymousVisitorId?: string;
405
+ /**
406
+ * ID of a site visitor that has logged in to the site.
407
+ * @format GUID
408
+ */
409
+ memberId?: string;
410
+ /**
411
+ * ID of a Wix user (site owner, contributor, etc.).
412
+ * @format GUID
413
+ */
414
+ wixUserId?: string;
415
+ /**
416
+ * ID of an app.
417
+ * @format GUID
418
+ */
419
+ appId?: string;
420
+ }
421
+ declare enum WebhookIdentityType {
422
+ UNKNOWN = "UNKNOWN",
423
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
424
+ MEMBER = "MEMBER",
425
+ WIX_USER = "WIX_USER",
426
+ APP = "APP"
427
+ }
428
+ /** @enumType */
429
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
430
+ /**
431
+ * Create badge
432
+ * @param title - Badge title
433
+ * @internal
434
+ * @documentationMaturity preview
435
+ * @requiredField options.backgroundColor
436
+ * @requiredField options.textColor
437
+ * @requiredField title
438
+ * @permissionId badges.manage
439
+ * @fqn com.wixpress.badges.v2.BadgesService.Create
440
+ * @deprecated
441
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.CreateBadge
442
+ * @targetRemovalDate 2022-03-31
443
+ */
444
+ declare function create(title: string, options?: NonNullablePaths<CreateOptions, `backgroundColor` | `textColor`, 2>): Promise<NonNullablePaths<CreateResponse, `badge._id` | `badge.title` | `badge.description` | `badge.backgroundColor` | `badge.textColor` | `badge.icon` | `badge.roleId` | `badge.hasPermissions` | `badge.slug`, 3>>;
445
+ interface CreateOptions {
446
+ /** Badge description */
447
+ description?: string;
448
+ /**
449
+ * Badge background color in 6-digit upper-cased color hex (e.g. #FFFFFF)
450
+ * @format COLOR_HEX
451
+ */
452
+ backgroundColor: string;
453
+ /**
454
+ * Badge text color in 6-digit upper-cased color hex (e.g. #FFFFFF)
455
+ * @format COLOR_HEX
456
+ */
457
+ textColor: string;
458
+ /** Badge icon SVG as 'https://...' */
459
+ icon?: string;
460
+ /** Indicates whether badge has permissions */
461
+ hasPermissions?: boolean;
462
+ }
463
+ /**
464
+ * Update badge
465
+ * @param _id - Badge id
466
+ * @internal
467
+ * @documentationMaturity preview
468
+ * @requiredField _id
469
+ * @permissionId badges.manage
470
+ * @fqn com.wixpress.badges.v2.BadgesService.Update
471
+ * @deprecated
472
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.UpdateBadge
473
+ * @targetRemovalDate 2022-03-31
474
+ */
475
+ declare function update(_id: string, options?: UpdateOptions): Promise<NonNullablePaths<UpdateResponse, `badge._id` | `badge.title` | `badge.description` | `badge.backgroundColor` | `badge.textColor` | `badge.icon` | `badge.roleId` | `badge.hasPermissions` | `badge.slug`, 3>>;
476
+ interface UpdateOptions {
477
+ /** Badge title */
478
+ title?: string | null;
479
+ /** Badge description */
480
+ description?: string | null;
481
+ /**
482
+ * Badge background color in 6-digit upper-cased color hex (e.g. #FFFFFF)
483
+ * @format COLOR_HEX
484
+ */
485
+ backgroundColor?: string | null;
486
+ /**
487
+ * Badge text color in 6-digit upper-cased color hex (e.g. #FFFFFF)
488
+ * @format COLOR_HEX
489
+ */
490
+ textColor?: string | null;
491
+ /** Badge icon SVG as 'https://...' */
492
+ icon?: string | null;
493
+ /** Indicates whether badge has permissions */
494
+ hasPermissions?: boolean | null;
495
+ }
496
+ /**
497
+ * List all badges in a site
498
+ * @internal
499
+ * @documentationMaturity preview
500
+ * @permissionId BADGES.READ
501
+ * @applicableIdentity APP
502
+ * @fqn com.wixpress.badges.v2.BadgesService.List
503
+ * @deprecated
504
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.ListBadges
505
+ * @targetRemovalDate 2022-03-31
506
+ */
507
+ declare function list(options?: ListOptions): Promise<NonNullablePaths<ListResponse, `badges` | `badges.${number}._id` | `badges.${number}.title` | `badges.${number}.description` | `badges.${number}.backgroundColor` | `badges.${number}.textColor` | `badges.${number}.icon` | `badges.${number}.roleId` | `badges.${number}.hasPermissions` | `badges.${number}.slug`, 4>>;
508
+ interface ListOptions {
509
+ /**
510
+ * Limit the number of badges to return
511
+ * @min 1
512
+ * @max 1000
513
+ */
514
+ limit?: number | null;
515
+ /** Default offset is 0. */
516
+ offset?: number | null;
517
+ }
518
+ /**
519
+ * Query badges in a site
520
+ * @internal
521
+ * @documentationMaturity preview
522
+ * @permissionId BADGES.READ
523
+ * @applicableIdentity APP
524
+ * @fqn com.wixpress.badges.v2.BadgesService.Query
525
+ * @deprecated
526
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.QueryBadges
527
+ * @targetRemovalDate 2022-03-31
528
+ */
529
+ declare function query(options?: QueryOptions): Promise<NonNullablePaths<QueryResponse, `badges` | `badges.${number}._id` | `badges.${number}.title` | `badges.${number}.description` | `badges.${number}.backgroundColor` | `badges.${number}.textColor` | `badges.${number}.icon` | `badges.${number}.roleId` | `badges.${number}.hasPermissions` | `badges.${number}.slug` | `count`, 4>>;
530
+ interface QueryOptions {
531
+ /** Filter criteria */
532
+ filter?: Record<string, any> | null;
533
+ /** Sorting criteria */
534
+ sort?: Sorting[];
535
+ /** Result paging data */
536
+ paging?: Paging;
537
+ }
538
+ /**
539
+ * Get a badge
540
+ * @param _id - Badge id
541
+ * @internal
542
+ * @documentationMaturity preview
543
+ * @requiredField _id
544
+ * @permissionId BADGES.READ
545
+ * @applicableIdentity APP
546
+ * @fqn com.wixpress.badges.v2.BadgesService.Get
547
+ * @deprecated
548
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.GetBadge
549
+ * @targetRemovalDate 2022-03-31
550
+ */
551
+ declare function get(_id: string): Promise<NonNullablePaths<GetResponse, `badge._id` | `badge.title` | `badge.description` | `badge.backgroundColor` | `badge.textColor` | `badge.icon` | `badge.roleId` | `badge.hasPermissions` | `badge.slug`, 3>>;
552
+ /**
553
+ * Delete a badge
554
+ * @param _id - Badge id
555
+ * @internal
556
+ * @documentationMaturity preview
557
+ * @requiredField _id
558
+ * @permissionId badges.manage
559
+ * @fqn com.wixpress.badges.v2.BadgesService._delete
560
+ * @deprecated
561
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.DeleteBadge
562
+ * @targetRemovalDate 2022-03-31
563
+ */
564
+ declare function _delete(_id: string): Promise<void>;
565
+ /**
566
+ * Count badges in a site
567
+ * @internal
568
+ * @documentationMaturity preview
569
+ * @permissionId BADGES.READ
570
+ * @applicableIdentity APP
571
+ * @fqn com.wixpress.badges.v2.BadgesService.Count
572
+ * @deprecated
573
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.CountBadges
574
+ * @targetRemovalDate 2022-03-31
575
+ */
576
+ declare function count(options?: CountOptions): Promise<NonNullablePaths<CountResponse, `count`, 2>>;
577
+ interface CountOptions {
578
+ /** Filter criteria used for counting */
579
+ filter?: Record<string, any> | null;
580
+ }
581
+ /**
582
+ * Assign a badge to the given members
583
+ * @param _id - Badge id
584
+ * @param memberIds - Ids of members this badge should be assigned to
585
+ * @internal
586
+ * @documentationMaturity preview
587
+ * @requiredField _id
588
+ * @requiredField memberIds
589
+ * @permissionId BADGES.ASSIGN
590
+ * @applicableIdentity APP
591
+ * @fqn com.wixpress.badges.v2.BadgesService.AssignBadge
592
+ * @deprecated
593
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.AssignBadge
594
+ * @targetRemovalDate 2022-03-31
595
+ */
596
+ declare function assignBadge(_id: string, memberIds: string[]): Promise<NonNullablePaths<AssignBadgeResponse, `memberIds`, 2>>;
597
+ /**
598
+ * Remove badge from given members
599
+ * @param _id - Badge id
600
+ * @param memberIds - Ids of members given badge will be removed from
601
+ * @internal
602
+ * @documentationMaturity preview
603
+ * @requiredField _id
604
+ * @requiredField memberIds
605
+ * @permissionId BADGES.ASSIGN
606
+ * @applicableIdentity APP
607
+ * @fqn com.wixpress.badges.v2.BadgesService.UnassignBadge
608
+ * @deprecated
609
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.UnassignBadge
610
+ * @targetRemovalDate 2022-03-31
611
+ */
612
+ declare function unassignBadge(_id: string, memberIds: string[]): Promise<void>;
613
+ /**
614
+ * Return list of members that have the given badge
615
+ * @param _id - Badge id
616
+ * @internal
617
+ * @documentationMaturity preview
618
+ * @requiredField _id
619
+ * @permissionId BADGES.READ
620
+ * @applicableIdentity APP
621
+ * @fqn com.wixpress.badges.v2.BadgesService.ListMembers
622
+ * @deprecated
623
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.ListMembers
624
+ * @targetRemovalDate 2022-03-31
625
+ */
626
+ declare function listMembers(_id: string): Promise<NonNullablePaths<ListMembersResponse, `memberIds`, 2>>;
627
+ /**
628
+ * Return list of badge ids assigned to a given members
629
+ * @param memberIds - Ids of members whose badge ids should be listed
630
+ * @internal
631
+ * @documentationMaturity preview
632
+ * @requiredField memberIds
633
+ * @permissionId BADGES.READ
634
+ * @applicableIdentity APP
635
+ * @fqn com.wixpress.badges.v2.BadgesService.ListMembersBadgeIds
636
+ * @deprecated
637
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.ListMembersBadgeIds
638
+ * @targetRemovalDate 2022-03-31
639
+ */
640
+ declare function listMembersBadgeIds(memberIds: string[]): Promise<NonNullablePaths<ListMembersBadgeIdsResponse, `memberBadgeIds` | `memberBadgeIds.${number}.memberId`, 4>>;
641
+ /**
642
+ * Return badge ids with a count of members they are assigned to
643
+ * @internal
644
+ * @documentationMaturity preview
645
+ * @permissionId BADGES.READ
646
+ * @applicableIdentity APP
647
+ * @fqn com.wixpress.badges.v2.BadgesService.GetBadgeCounters
648
+ * @deprecated
649
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.GetMemberCountsPerBadge
650
+ * @targetRemovalDate 2022-03-31
651
+ */
652
+ declare function getBadgeCounters(): Promise<NonNullablePaths<GetBadgeCountersResponse, `badgeMemberCounts` | `badgeMemberCounts.${number}.badgeId` | `badgeMemberCounts.${number}.memberCount`, 4>>;
653
+ /**
654
+ * Update badges order
655
+ * @internal
656
+ * @documentationMaturity preview
657
+ * @permissionId badges.manage
658
+ * @fqn com.wixpress.badges.v2.BadgesService.UpdateBadgesOrder
659
+ * @deprecated
660
+ * @replacedBy com.wixpress.badges.v3.BadgesServiceV3.UpdateBadgesDisplayOrder
661
+ * @targetRemovalDate 2022-03-31
662
+ */
663
+ declare function updateBadgesOrder(options?: UpdateBadgesOrderOptions): Promise<NonNullablePaths<UpdateBadgesOrderResponse, `badges` | `badges.${number}._id` | `badges.${number}.title` | `badges.${number}.description` | `badges.${number}.backgroundColor` | `badges.${number}.textColor` | `badges.${number}.icon` | `badges.${number}.roleId` | `badges.${number}.hasPermissions` | `badges.${number}.slug`, 4>>;
664
+ interface UpdateBadgesOrderOptions {
665
+ /**
666
+ * Ordered badges ids
667
+ * @format GUID
668
+ * @minSize 1
669
+ */
670
+ badgeIds?: string[];
671
+ }
672
+
673
+ export { type ActionEvent, type AssignBadgeRequest, type AssignBadgeResponse, type Badge, type BadgeAssigned, type BadgeMemberCount, type BadgeUnassigned, type CountOptions, type CountRequest, type CountResponse, type CreateOptions, type CreateRequest, type CreateResponse, type DeleteRequest, type DeleteResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetBadgeCountersRequest, type GetBadgeCountersResponse, type GetRequest, type GetResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListMembersBadgeIdsRequest, type ListMembersBadgeIdsResponse, type ListMembersRequest, type ListMembersResponse, type ListOptions, type ListRequest, type ListResponse, type MemberBadgeIds, type MessageEnvelope, type Paging, type QueryOptions, type QueryRequest, type QueryResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type UnassignBadgeRequest, type UnassignBadgeResponse, type UpdateBadgesOrderOptions, type UpdateBadgesOrderRequest, type UpdateBadgesOrderResponse, type UpdateOptions, type UpdateRequest, type UpdateResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, _delete, assignBadge, count, create, get, getBadgeCounters, list, listMembers, listMembersBadgeIds, query, unassignBadge, update, updateBadgesOrder };