@wix/groups 1.0.58 → 1.0.60
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/src/social-groups-v2-group-member.public.d.ts +1 -1
- package/build/cjs/src/social-groups-v2-group-member.types.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-member.universal.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-member.universal.js +46 -22
- package/build/cjs/src/social-groups-v2-group-member.universal.js.map +1 -1
- package/build/cjs/src/social-groups-v2-group-request.http.js +30 -118
- package/build/cjs/src/social-groups-v2-group-request.http.js.map +1 -1
- package/build/cjs/src/social-groups-v2-group-request.public.d.ts +1 -1
- package/build/cjs/src/social-groups-v2-group-request.types.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-request.universal.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-request.universal.js +19 -9
- package/build/cjs/src/social-groups-v2-group-request.universal.js.map +1 -1
- package/build/cjs/src/social-groups-v2-group-role.public.d.ts +1 -1
- package/build/cjs/src/social-groups-v2-group-role.types.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-role.universal.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-role.universal.js +21 -12
- package/build/cjs/src/social-groups-v2-group-role.universal.js.map +1 -1
- package/build/cjs/src/social-groups-v2-group-rules.public.d.ts +1 -1
- package/build/cjs/src/social-groups-v2-group-rules.types.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-rules.universal.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group-rules.universal.js +11 -7
- package/build/cjs/src/social-groups-v2-group-rules.universal.js.map +1 -1
- package/build/cjs/src/social-groups-v2-group.public.d.ts +1 -1
- package/build/cjs/src/social-groups-v2-group.types.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group.universal.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-group.universal.js +37 -20
- package/build/cjs/src/social-groups-v2-group.universal.js.map +1 -1
- package/build/cjs/src/social-groups-v2-join-group-request.public.d.ts +1 -1
- package/build/cjs/src/social-groups-v2-join-group-request.types.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-join-group-request.universal.d.ts +67 -0
- package/build/cjs/src/social-groups-v2-join-group-request.universal.js +24 -13
- package/build/cjs/src/social-groups-v2-join-group-request.universal.js.map +1 -1
- package/build/cjs/src/social-groups-v2-membership-question.universal.js +23 -11
- package/build/cjs/src/social-groups-v2-membership-question.universal.js.map +1 -1
- package/build/es/src/social-groups-v2-group-member.public.d.ts +1 -1
- package/build/es/src/social-groups-v2-group-member.types.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-member.universal.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-member.universal.js +46 -22
- package/build/es/src/social-groups-v2-group-member.universal.js.map +1 -1
- package/build/es/src/social-groups-v2-group-request.http.js +30 -118
- package/build/es/src/social-groups-v2-group-request.http.js.map +1 -1
- package/build/es/src/social-groups-v2-group-request.public.d.ts +1 -1
- package/build/es/src/social-groups-v2-group-request.types.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-request.universal.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-request.universal.js +19 -9
- package/build/es/src/social-groups-v2-group-request.universal.js.map +1 -1
- package/build/es/src/social-groups-v2-group-role.public.d.ts +1 -1
- package/build/es/src/social-groups-v2-group-role.types.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-role.universal.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-role.universal.js +22 -13
- package/build/es/src/social-groups-v2-group-role.universal.js.map +1 -1
- package/build/es/src/social-groups-v2-group-rules.public.d.ts +1 -1
- package/build/es/src/social-groups-v2-group-rules.types.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-rules.universal.d.ts +67 -0
- package/build/es/src/social-groups-v2-group-rules.universal.js +12 -8
- package/build/es/src/social-groups-v2-group-rules.universal.js.map +1 -1
- package/build/es/src/social-groups-v2-group.public.d.ts +1 -1
- package/build/es/src/social-groups-v2-group.types.d.ts +67 -0
- package/build/es/src/social-groups-v2-group.universal.d.ts +67 -0
- package/build/es/src/social-groups-v2-group.universal.js +37 -20
- package/build/es/src/social-groups-v2-group.universal.js.map +1 -1
- package/build/es/src/social-groups-v2-join-group-request.public.d.ts +1 -1
- package/build/es/src/social-groups-v2-join-group-request.types.d.ts +67 -0
- package/build/es/src/social-groups-v2-join-group-request.universal.d.ts +67 -0
- package/build/es/src/social-groups-v2-join-group-request.universal.js +24 -13
- package/build/es/src/social-groups-v2-join-group-request.universal.js.map +1 -1
- package/build/es/src/social-groups-v2-membership-question.universal.js +24 -12
- package/build/es/src/social-groups-v2-membership-question.universal.js.map +1 -1
- package/package.json +3 -3
|
@@ -368,6 +368,73 @@ export interface QueryGroupRequestsResponse {
|
|
|
368
368
|
groupRequests?: GroupRequest[];
|
|
369
369
|
metadata?: PagingMetadata;
|
|
370
370
|
}
|
|
371
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
372
|
+
createdEvent?: EntityCreatedEvent;
|
|
373
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
374
|
+
deletedEvent?: EntityDeletedEvent;
|
|
375
|
+
actionEvent?: ActionEvent;
|
|
376
|
+
/**
|
|
377
|
+
* Unique event ID.
|
|
378
|
+
* Allows clients to ignore duplicate webhooks.
|
|
379
|
+
*/
|
|
380
|
+
id?: string;
|
|
381
|
+
/**
|
|
382
|
+
* Assumes actions are also always typed to an entity_type
|
|
383
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
384
|
+
*/
|
|
385
|
+
entityFqdn?: string;
|
|
386
|
+
/**
|
|
387
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
388
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
389
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
390
|
+
*/
|
|
391
|
+
slug?: string;
|
|
392
|
+
/** ID of the entity associated with the event. */
|
|
393
|
+
entityId?: string;
|
|
394
|
+
/** Event timestamp. */
|
|
395
|
+
eventTime?: Date;
|
|
396
|
+
/**
|
|
397
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
398
|
+
* (for example, GDPR).
|
|
399
|
+
*/
|
|
400
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
401
|
+
/** If present, indicates the action that triggered the event. */
|
|
402
|
+
originatedFrom?: string | null;
|
|
403
|
+
/**
|
|
404
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
405
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
406
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
407
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
408
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
409
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
410
|
+
*/
|
|
411
|
+
entityEventSequence?: string | null;
|
|
412
|
+
}
|
|
413
|
+
/** @oneof */
|
|
414
|
+
export interface DomainEventBodyOneOf {
|
|
415
|
+
createdEvent?: EntityCreatedEvent;
|
|
416
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
417
|
+
deletedEvent?: EntityDeletedEvent;
|
|
418
|
+
actionEvent?: ActionEvent;
|
|
419
|
+
}
|
|
420
|
+
export interface EntityCreatedEvent {
|
|
421
|
+
entityAsJson?: string;
|
|
422
|
+
}
|
|
423
|
+
export interface EntityUpdatedEvent {
|
|
424
|
+
/**
|
|
425
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
426
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
427
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
428
|
+
*/
|
|
429
|
+
currentEntityAsJson?: string;
|
|
430
|
+
}
|
|
431
|
+
export interface EntityDeletedEvent {
|
|
432
|
+
/** Entity that was deleted */
|
|
433
|
+
deletedEntityAsJson?: string | null;
|
|
434
|
+
}
|
|
435
|
+
export interface ActionEvent {
|
|
436
|
+
bodyAsJson?: string;
|
|
437
|
+
}
|
|
371
438
|
export interface ApproveGroupRequestsResponseNonNullableFields {
|
|
372
439
|
groupRequest: {
|
|
373
440
|
group?: {
|
|
@@ -412,6 +412,73 @@ export interface QueryGroupRequestsResponse {
|
|
|
412
412
|
groupRequests?: GroupRequest[];
|
|
413
413
|
metadata?: PagingMetadata;
|
|
414
414
|
}
|
|
415
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
416
|
+
createdEvent?: EntityCreatedEvent;
|
|
417
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
418
|
+
deletedEvent?: EntityDeletedEvent;
|
|
419
|
+
actionEvent?: ActionEvent;
|
|
420
|
+
/**
|
|
421
|
+
* Unique event ID.
|
|
422
|
+
* Allows clients to ignore duplicate webhooks.
|
|
423
|
+
*/
|
|
424
|
+
_id?: string;
|
|
425
|
+
/**
|
|
426
|
+
* Assumes actions are also always typed to an entity_type
|
|
427
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
428
|
+
*/
|
|
429
|
+
entityFqdn?: string;
|
|
430
|
+
/**
|
|
431
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
432
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
433
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
434
|
+
*/
|
|
435
|
+
slug?: string;
|
|
436
|
+
/** ID of the entity associated with the event. */
|
|
437
|
+
entityId?: string;
|
|
438
|
+
/** Event timestamp. */
|
|
439
|
+
eventTime?: Date;
|
|
440
|
+
/**
|
|
441
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
442
|
+
* (for example, GDPR).
|
|
443
|
+
*/
|
|
444
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
445
|
+
/** If present, indicates the action that triggered the event. */
|
|
446
|
+
originatedFrom?: string | null;
|
|
447
|
+
/**
|
|
448
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
449
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
450
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
451
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
452
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
453
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
454
|
+
*/
|
|
455
|
+
entityEventSequence?: string | null;
|
|
456
|
+
}
|
|
457
|
+
/** @oneof */
|
|
458
|
+
export interface DomainEventBodyOneOf {
|
|
459
|
+
createdEvent?: EntityCreatedEvent;
|
|
460
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
461
|
+
deletedEvent?: EntityDeletedEvent;
|
|
462
|
+
actionEvent?: ActionEvent;
|
|
463
|
+
}
|
|
464
|
+
export interface EntityCreatedEvent {
|
|
465
|
+
entityAsJson?: string;
|
|
466
|
+
}
|
|
467
|
+
export interface EntityUpdatedEvent {
|
|
468
|
+
/**
|
|
469
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
470
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
471
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
472
|
+
*/
|
|
473
|
+
currentEntityAsJson?: string;
|
|
474
|
+
}
|
|
475
|
+
export interface EntityDeletedEvent {
|
|
476
|
+
/** Entity that was deleted */
|
|
477
|
+
deletedEntityAsJson?: string | null;
|
|
478
|
+
}
|
|
479
|
+
export interface ActionEvent {
|
|
480
|
+
bodyAsJson?: string;
|
|
481
|
+
}
|
|
415
482
|
export interface ApproveGroupRequestsResponseNonNullableFields {
|
|
416
483
|
groupRequest: {
|
|
417
484
|
group?: {
|
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { serializer, transformError, resolveQueryFieldsTransformationPaths, } from '@wix/metro-runtime/velo';
|
|
11
|
+
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
11
12
|
import * as ambassadorWixSocialGroupsV2GroupRequest from './social-groups-v2-group-request.http';
|
|
12
13
|
// @ts-ignore
|
|
13
14
|
import { wrapWithQueryBuilder } from '@wix/motion-edm-autogen-query-wrapper';
|
|
@@ -151,9 +152,11 @@ export function approveGroupRequests(groupRequestIds) {
|
|
|
151
152
|
return fromJSON(result.data);
|
|
152
153
|
}
|
|
153
154
|
catch (err) {
|
|
154
|
-
const transformedError =
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
const transformedError = sdkTransformError(err, {
|
|
156
|
+
spreadPathsToArguments: {},
|
|
157
|
+
explicitPathsToArguments: { groupRequestIds: '$[0]' },
|
|
158
|
+
singleArgumentUnchanged: false,
|
|
159
|
+
}, ['groupRequestIds']);
|
|
157
160
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
158
161
|
throw transformedError;
|
|
159
162
|
}
|
|
@@ -205,9 +208,11 @@ export function rejectGroupRequests(rejections) {
|
|
|
205
208
|
return fromJSON(result.data);
|
|
206
209
|
}
|
|
207
210
|
catch (err) {
|
|
208
|
-
const transformedError =
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
const transformedError = sdkTransformError(err, {
|
|
212
|
+
spreadPathsToArguments: {},
|
|
213
|
+
explicitPathsToArguments: { rejections: '$[0]' },
|
|
214
|
+
singleArgumentUnchanged: false,
|
|
215
|
+
}, ['rejections']);
|
|
211
216
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
212
217
|
throw transformedError;
|
|
213
218
|
}
|
|
@@ -263,9 +268,14 @@ export function listGroupRequests(options) {
|
|
|
263
268
|
return fromJSON(result.data);
|
|
264
269
|
}
|
|
265
270
|
catch (err) {
|
|
266
|
-
const transformedError =
|
|
267
|
-
|
|
268
|
-
|
|
271
|
+
const transformedError = sdkTransformError(err, {
|
|
272
|
+
spreadPathsToArguments: {},
|
|
273
|
+
explicitPathsToArguments: {
|
|
274
|
+
limit: '$[0].limit',
|
|
275
|
+
offset: '$[0].offset',
|
|
276
|
+
},
|
|
277
|
+
singleArgumentUnchanged: false,
|
|
278
|
+
}, ['options']);
|
|
269
279
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
270
280
|
throw transformedError;
|
|
271
281
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"social-groups-v2-group-request.universal.js","sourceRoot":"","sources":["../../../src/social-groups-v2-group-request.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"social-groups-v2-group-request.universal.js","sourceRoot":"","sources":["../../../src/social-groups-v2-group-request.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAEvF,OAAO,KAAK,uCAAuC,MAAM,uCAAuC,CAAC;AACjG,aAAa;AACb,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,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AE,IAAI,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtD,gBAAgB,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC7B,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;YAEpE,MAAM,gBAAgB,CAAC;QACzB,CAAC;QACD,YAAY,EAAE,QAAQ;QACtB,mBAAmB,EAAE,qCAAqC,CAAC,aAAa,CAAC;KAC1E,CAAC,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -6,4 +6,4 @@ export declare const __metadata: {
|
|
|
6
6
|
export declare function assignRole(httpClient: HttpClient): (groupId: string, memberIds: string[], role: GroupRole, options?: AssignRoleOptions) => Promise<import("./social-groups-v2-group-role.universal").AssignRoleResponse & import("./social-groups-v2-group-role.universal").AssignRoleResponseNonNullableFields>;
|
|
7
7
|
export declare function unassignRole(httpClient: HttpClient): (groupId: string, memberIds: string[], role: GroupRole, options?: UnassignRoleOptions) => Promise<import("./social-groups-v2-group-role.universal").UnassignRoleResponse & import("./social-groups-v2-group-role.universal").UnassignRoleResponseNonNullableFields>;
|
|
8
8
|
export { Role } from './social-groups-v2-group-role.universal';
|
|
9
|
-
export { GroupRole, AssignRoleRequest, AssignRoleResponse, RoleAssignedToGroupMember, GroupMember, UnassignRoleRequest, UnassignRoleResponse, RoleUnassignedFromGroupMember, AssignRoleResponseNonNullableFields, UnassignRoleResponseNonNullableFields, AssignRoleOptions, UnassignRoleOptions, } from './social-groups-v2-group-role.universal';
|
|
9
|
+
export { GroupRole, AssignRoleRequest, AssignRoleResponse, RoleAssignedToGroupMember, GroupMember, UnassignRoleRequest, UnassignRoleResponse, RoleUnassignedFromGroupMember, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, AssignRoleResponseNonNullableFields, UnassignRoleResponseNonNullableFields, AssignRoleOptions, UnassignRoleOptions, } from './social-groups-v2-group-role.universal';
|
|
@@ -106,6 +106,73 @@ export interface RoleUnassignedFromGroupMember {
|
|
|
106
106
|
/** ID of site member who unassigned the role. It can be empty if the role was assigned by a third-party application. */
|
|
107
107
|
unassignedById?: string | null;
|
|
108
108
|
}
|
|
109
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
110
|
+
createdEvent?: EntityCreatedEvent;
|
|
111
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
112
|
+
deletedEvent?: EntityDeletedEvent;
|
|
113
|
+
actionEvent?: ActionEvent;
|
|
114
|
+
/**
|
|
115
|
+
* Unique event ID.
|
|
116
|
+
* Allows clients to ignore duplicate webhooks.
|
|
117
|
+
*/
|
|
118
|
+
id?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Assumes actions are also always typed to an entity_type
|
|
121
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
122
|
+
*/
|
|
123
|
+
entityFqdn?: string;
|
|
124
|
+
/**
|
|
125
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
126
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
127
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
128
|
+
*/
|
|
129
|
+
slug?: string;
|
|
130
|
+
/** ID of the entity associated with the event. */
|
|
131
|
+
entityId?: string;
|
|
132
|
+
/** Event timestamp. */
|
|
133
|
+
eventTime?: Date;
|
|
134
|
+
/**
|
|
135
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
136
|
+
* (for example, GDPR).
|
|
137
|
+
*/
|
|
138
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
139
|
+
/** If present, indicates the action that triggered the event. */
|
|
140
|
+
originatedFrom?: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
143
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
144
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
145
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
146
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
147
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
148
|
+
*/
|
|
149
|
+
entityEventSequence?: string | null;
|
|
150
|
+
}
|
|
151
|
+
/** @oneof */
|
|
152
|
+
export interface DomainEventBodyOneOf {
|
|
153
|
+
createdEvent?: EntityCreatedEvent;
|
|
154
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
155
|
+
deletedEvent?: EntityDeletedEvent;
|
|
156
|
+
actionEvent?: ActionEvent;
|
|
157
|
+
}
|
|
158
|
+
export interface EntityCreatedEvent {
|
|
159
|
+
entityAsJson?: string;
|
|
160
|
+
}
|
|
161
|
+
export interface EntityUpdatedEvent {
|
|
162
|
+
/**
|
|
163
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
164
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
165
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
166
|
+
*/
|
|
167
|
+
currentEntityAsJson?: string;
|
|
168
|
+
}
|
|
169
|
+
export interface EntityDeletedEvent {
|
|
170
|
+
/** Entity that was deleted */
|
|
171
|
+
deletedEntityAsJson?: string | null;
|
|
172
|
+
}
|
|
173
|
+
export interface ActionEvent {
|
|
174
|
+
bodyAsJson?: string;
|
|
175
|
+
}
|
|
109
176
|
export interface AssignRoleResponseNonNullableFields {
|
|
110
177
|
groupId: string;
|
|
111
178
|
siteMemberIds: string[];
|
|
@@ -119,6 +119,73 @@ export interface RoleUnassignedFromGroupMember {
|
|
|
119
119
|
/** ID of site member who unassigned the role. It can be empty if the role was assigned by a third-party application. */
|
|
120
120
|
unassignedById?: string | null;
|
|
121
121
|
}
|
|
122
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
123
|
+
createdEvent?: EntityCreatedEvent;
|
|
124
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
125
|
+
deletedEvent?: EntityDeletedEvent;
|
|
126
|
+
actionEvent?: ActionEvent;
|
|
127
|
+
/**
|
|
128
|
+
* Unique event ID.
|
|
129
|
+
* Allows clients to ignore duplicate webhooks.
|
|
130
|
+
*/
|
|
131
|
+
_id?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Assumes actions are also always typed to an entity_type
|
|
134
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
135
|
+
*/
|
|
136
|
+
entityFqdn?: string;
|
|
137
|
+
/**
|
|
138
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
139
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
140
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
141
|
+
*/
|
|
142
|
+
slug?: string;
|
|
143
|
+
/** ID of the entity associated with the event. */
|
|
144
|
+
entityId?: string;
|
|
145
|
+
/** Event timestamp. */
|
|
146
|
+
eventTime?: Date;
|
|
147
|
+
/**
|
|
148
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
149
|
+
* (for example, GDPR).
|
|
150
|
+
*/
|
|
151
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
152
|
+
/** If present, indicates the action that triggered the event. */
|
|
153
|
+
originatedFrom?: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
156
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
157
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
158
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
159
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
160
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
161
|
+
*/
|
|
162
|
+
entityEventSequence?: string | null;
|
|
163
|
+
}
|
|
164
|
+
/** @oneof */
|
|
165
|
+
export interface DomainEventBodyOneOf {
|
|
166
|
+
createdEvent?: EntityCreatedEvent;
|
|
167
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
168
|
+
deletedEvent?: EntityDeletedEvent;
|
|
169
|
+
actionEvent?: ActionEvent;
|
|
170
|
+
}
|
|
171
|
+
export interface EntityCreatedEvent {
|
|
172
|
+
entityAsJson?: string;
|
|
173
|
+
}
|
|
174
|
+
export interface EntityUpdatedEvent {
|
|
175
|
+
/**
|
|
176
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
177
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
178
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
179
|
+
*/
|
|
180
|
+
currentEntityAsJson?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface EntityDeletedEvent {
|
|
183
|
+
/** Entity that was deleted */
|
|
184
|
+
deletedEntityAsJson?: string | null;
|
|
185
|
+
}
|
|
186
|
+
export interface ActionEvent {
|
|
187
|
+
bodyAsJson?: string;
|
|
188
|
+
}
|
|
122
189
|
export interface AssignRoleResponseNonNullableFields {
|
|
123
190
|
groupId: string;
|
|
124
191
|
siteMemberIds: string[];
|
|
@@ -7,7 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { serializer
|
|
10
|
+
import { serializer } from '@wix/metro-runtime/velo';
|
|
11
|
+
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
11
12
|
import * as ambassadorWixSocialGroupsV2GroupRole from './social-groups-v2-group-role.http';
|
|
12
13
|
let __verbose = false;
|
|
13
14
|
function __log(...args) {
|
|
@@ -93,12 +94,16 @@ export function assignRole(groupId, memberIds, role, options) {
|
|
|
93
94
|
return fromJSON(result.data);
|
|
94
95
|
}
|
|
95
96
|
catch (err) {
|
|
96
|
-
const transformedError =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
const transformedError = sdkTransformError(err, {
|
|
98
|
+
spreadPathsToArguments: {},
|
|
99
|
+
explicitPathsToArguments: {
|
|
100
|
+
groupId: '$[0]',
|
|
101
|
+
memberIds: '$[1]',
|
|
102
|
+
role: '$[2]',
|
|
103
|
+
siteMemberIds: '$[3].siteMemberIds',
|
|
104
|
+
},
|
|
105
|
+
singleArgumentUnchanged: false,
|
|
106
|
+
}, ['groupId', 'memberIds', 'role', 'options']);
|
|
102
107
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
103
108
|
throw transformedError;
|
|
104
109
|
}
|
|
@@ -160,12 +165,16 @@ export function unassignRole(groupId, memberIds, role, options) {
|
|
|
160
165
|
return fromJSON(result.data);
|
|
161
166
|
}
|
|
162
167
|
catch (err) {
|
|
163
|
-
const transformedError =
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
const transformedError = sdkTransformError(err, {
|
|
169
|
+
spreadPathsToArguments: {},
|
|
170
|
+
explicitPathsToArguments: {
|
|
171
|
+
groupId: '$[0]',
|
|
172
|
+
memberIds: '$[1]',
|
|
173
|
+
role: '$[2]',
|
|
174
|
+
siteMemberIds: '$[3].siteMemberIds',
|
|
175
|
+
},
|
|
176
|
+
singleArgumentUnchanged: false,
|
|
177
|
+
}, ['groupId', 'memberIds', 'role', 'options']);
|
|
169
178
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
170
179
|
throw transformedError;
|
|
171
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"social-groups-v2-group-role.universal.js","sourceRoot":"","sources":["../../../src/social-groups-v2-group-role.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"social-groups-v2-group-role.universal.js","sourceRoot":"","sources":["../../../src/social-groups-v2-group-role.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAEvF,OAAO,KAAK,oCAAoC,MAAM,oCAAoC,CAAC;AAE3F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAe5B,MAAM,CAAN,IAAY,IAMX;AAND,WAAY,IAAI;IACd,qCAA6B,CAAA;IAC7B,4BAA4B;IAC5B,yBAAiB,CAAA;IACjB,2BAA2B;IAC3B,uBAAe,CAAA;AACjB,CAAC,EANW,IAAI,KAAJ,IAAI,QAMf;AAgMD,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;;;;;;;;;;;;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,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF"}
|
|
@@ -5,4 +5,4 @@ export declare const __metadata: {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function listRules(httpClient: HttpClient): (groupId: string) => Promise<import("./social-groups-v2-group-rules.universal").ListRulesResponse & import("./social-groups-v2-group-rules.universal").ListRulesResponseNonNullableFields>;
|
|
7
7
|
export declare function createOrReplaceAllRules(httpClient: HttpClient): (groupId: string, options?: CreateOrReplaceAllRulesOptions) => Promise<import("./social-groups-v2-group-rules.universal").CreateOrReplaceAllRulesResponse & import("./social-groups-v2-group-rules.universal").CreateOrReplaceAllRulesResponseNonNullableFields>;
|
|
8
|
-
export { GroupRules, GroupRule, ListRulesRequest, ListRulesResponse, CreateOrReplaceAllRulesRequest, CreateOrReplaceAllRulesResponse, Empty, ListTemplatesResponse, ListRulesResponseNonNullableFields, CreateOrReplaceAllRulesResponseNonNullableFields, CreateOrReplaceAllRulesOptions, } from './social-groups-v2-group-rules.universal';
|
|
8
|
+
export { GroupRules, GroupRule, ListRulesRequest, ListRulesResponse, CreateOrReplaceAllRulesRequest, CreateOrReplaceAllRulesResponse, Empty, ListTemplatesResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, ListRulesResponseNonNullableFields, CreateOrReplaceAllRulesResponseNonNullableFields, CreateOrReplaceAllRulesOptions, } from './social-groups-v2-group-rules.universal';
|
|
@@ -38,6 +38,73 @@ export interface ListTemplatesResponse {
|
|
|
38
38
|
/** Retrieved rule templates. */
|
|
39
39
|
rules?: GroupRule[];
|
|
40
40
|
}
|
|
41
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
42
|
+
createdEvent?: EntityCreatedEvent;
|
|
43
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
44
|
+
deletedEvent?: EntityDeletedEvent;
|
|
45
|
+
actionEvent?: ActionEvent;
|
|
46
|
+
/**
|
|
47
|
+
* Unique event ID.
|
|
48
|
+
* Allows clients to ignore duplicate webhooks.
|
|
49
|
+
*/
|
|
50
|
+
id?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Assumes actions are also always typed to an entity_type
|
|
53
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
54
|
+
*/
|
|
55
|
+
entityFqdn?: string;
|
|
56
|
+
/**
|
|
57
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
58
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
59
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
60
|
+
*/
|
|
61
|
+
slug?: string;
|
|
62
|
+
/** ID of the entity associated with the event. */
|
|
63
|
+
entityId?: string;
|
|
64
|
+
/** Event timestamp. */
|
|
65
|
+
eventTime?: Date;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
68
|
+
* (for example, GDPR).
|
|
69
|
+
*/
|
|
70
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
71
|
+
/** If present, indicates the action that triggered the event. */
|
|
72
|
+
originatedFrom?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
75
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
76
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
77
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
78
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
79
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
80
|
+
*/
|
|
81
|
+
entityEventSequence?: string | null;
|
|
82
|
+
}
|
|
83
|
+
/** @oneof */
|
|
84
|
+
export interface DomainEventBodyOneOf {
|
|
85
|
+
createdEvent?: EntityCreatedEvent;
|
|
86
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
87
|
+
deletedEvent?: EntityDeletedEvent;
|
|
88
|
+
actionEvent?: ActionEvent;
|
|
89
|
+
}
|
|
90
|
+
export interface EntityCreatedEvent {
|
|
91
|
+
entityAsJson?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface EntityUpdatedEvent {
|
|
94
|
+
/**
|
|
95
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
96
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
97
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
98
|
+
*/
|
|
99
|
+
currentEntityAsJson?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface EntityDeletedEvent {
|
|
102
|
+
/** Entity that was deleted */
|
|
103
|
+
deletedEntityAsJson?: string | null;
|
|
104
|
+
}
|
|
105
|
+
export interface ActionEvent {
|
|
106
|
+
bodyAsJson?: string;
|
|
107
|
+
}
|
|
41
108
|
export interface ListRulesResponseNonNullableFields {
|
|
42
109
|
rules: {
|
|
43
110
|
title: string;
|
|
@@ -44,6 +44,73 @@ export interface ListTemplatesResponse {
|
|
|
44
44
|
/** Retrieved rule templates. */
|
|
45
45
|
rules?: GroupRule[];
|
|
46
46
|
}
|
|
47
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
48
|
+
createdEvent?: EntityCreatedEvent;
|
|
49
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
50
|
+
deletedEvent?: EntityDeletedEvent;
|
|
51
|
+
actionEvent?: ActionEvent;
|
|
52
|
+
/**
|
|
53
|
+
* Unique event ID.
|
|
54
|
+
* Allows clients to ignore duplicate webhooks.
|
|
55
|
+
*/
|
|
56
|
+
_id?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Assumes actions are also always typed to an entity_type
|
|
59
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
60
|
+
*/
|
|
61
|
+
entityFqdn?: string;
|
|
62
|
+
/**
|
|
63
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
64
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
65
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
66
|
+
*/
|
|
67
|
+
slug?: string;
|
|
68
|
+
/** ID of the entity associated with the event. */
|
|
69
|
+
entityId?: string;
|
|
70
|
+
/** Event timestamp. */
|
|
71
|
+
eventTime?: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
74
|
+
* (for example, GDPR).
|
|
75
|
+
*/
|
|
76
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
77
|
+
/** If present, indicates the action that triggered the event. */
|
|
78
|
+
originatedFrom?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
81
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
82
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
83
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
84
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
85
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
86
|
+
*/
|
|
87
|
+
entityEventSequence?: string | null;
|
|
88
|
+
}
|
|
89
|
+
/** @oneof */
|
|
90
|
+
export interface DomainEventBodyOneOf {
|
|
91
|
+
createdEvent?: EntityCreatedEvent;
|
|
92
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
93
|
+
deletedEvent?: EntityDeletedEvent;
|
|
94
|
+
actionEvent?: ActionEvent;
|
|
95
|
+
}
|
|
96
|
+
export interface EntityCreatedEvent {
|
|
97
|
+
entityAsJson?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface EntityUpdatedEvent {
|
|
100
|
+
/**
|
|
101
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
102
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
103
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
104
|
+
*/
|
|
105
|
+
currentEntityAsJson?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface EntityDeletedEvent {
|
|
108
|
+
/** Entity that was deleted */
|
|
109
|
+
deletedEntityAsJson?: string | null;
|
|
110
|
+
}
|
|
111
|
+
export interface ActionEvent {
|
|
112
|
+
bodyAsJson?: string;
|
|
113
|
+
}
|
|
47
114
|
export interface ListRulesResponseNonNullableFields {
|
|
48
115
|
rules: {
|
|
49
116
|
title: string;
|