@wix/groups 1.0.57 → 1.0.59

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 (67) hide show
  1. package/build/cjs/src/social-groups-v2-group-member.public.d.ts +1 -1
  2. package/build/cjs/src/social-groups-v2-group-member.types.d.ts +67 -0
  3. package/build/cjs/src/social-groups-v2-group-member.universal.d.ts +67 -0
  4. package/build/cjs/src/social-groups-v2-group-member.universal.js +46 -22
  5. package/build/cjs/src/social-groups-v2-group-member.universal.js.map +1 -1
  6. package/build/cjs/src/social-groups-v2-group-request.public.d.ts +1 -1
  7. package/build/cjs/src/social-groups-v2-group-request.types.d.ts +67 -0
  8. package/build/cjs/src/social-groups-v2-group-request.universal.d.ts +67 -0
  9. package/build/cjs/src/social-groups-v2-group-request.universal.js +19 -9
  10. package/build/cjs/src/social-groups-v2-group-request.universal.js.map +1 -1
  11. package/build/cjs/src/social-groups-v2-group-role.public.d.ts +1 -1
  12. package/build/cjs/src/social-groups-v2-group-role.types.d.ts +67 -0
  13. package/build/cjs/src/social-groups-v2-group-role.universal.d.ts +67 -0
  14. package/build/cjs/src/social-groups-v2-group-role.universal.js +21 -12
  15. package/build/cjs/src/social-groups-v2-group-role.universal.js.map +1 -1
  16. package/build/cjs/src/social-groups-v2-group-rules.public.d.ts +1 -1
  17. package/build/cjs/src/social-groups-v2-group-rules.types.d.ts +67 -0
  18. package/build/cjs/src/social-groups-v2-group-rules.universal.d.ts +67 -0
  19. package/build/cjs/src/social-groups-v2-group-rules.universal.js +11 -7
  20. package/build/cjs/src/social-groups-v2-group-rules.universal.js.map +1 -1
  21. package/build/cjs/src/social-groups-v2-group.public.d.ts +1 -1
  22. package/build/cjs/src/social-groups-v2-group.types.d.ts +67 -0
  23. package/build/cjs/src/social-groups-v2-group.universal.d.ts +67 -0
  24. package/build/cjs/src/social-groups-v2-group.universal.js +37 -20
  25. package/build/cjs/src/social-groups-v2-group.universal.js.map +1 -1
  26. package/build/cjs/src/social-groups-v2-join-group-request.public.d.ts +1 -1
  27. package/build/cjs/src/social-groups-v2-join-group-request.types.d.ts +73 -0
  28. package/build/cjs/src/social-groups-v2-join-group-request.types.js.map +1 -1
  29. package/build/cjs/src/social-groups-v2-join-group-request.universal.d.ts +73 -0
  30. package/build/cjs/src/social-groups-v2-join-group-request.universal.js +24 -13
  31. package/build/cjs/src/social-groups-v2-join-group-request.universal.js.map +1 -1
  32. package/build/cjs/src/social-groups-v2-membership-question.universal.js +23 -11
  33. package/build/cjs/src/social-groups-v2-membership-question.universal.js.map +1 -1
  34. package/build/es/src/social-groups-v2-group-member.public.d.ts +1 -1
  35. package/build/es/src/social-groups-v2-group-member.types.d.ts +67 -0
  36. package/build/es/src/social-groups-v2-group-member.universal.d.ts +67 -0
  37. package/build/es/src/social-groups-v2-group-member.universal.js +46 -22
  38. package/build/es/src/social-groups-v2-group-member.universal.js.map +1 -1
  39. package/build/es/src/social-groups-v2-group-request.public.d.ts +1 -1
  40. package/build/es/src/social-groups-v2-group-request.types.d.ts +67 -0
  41. package/build/es/src/social-groups-v2-group-request.universal.d.ts +67 -0
  42. package/build/es/src/social-groups-v2-group-request.universal.js +19 -9
  43. package/build/es/src/social-groups-v2-group-request.universal.js.map +1 -1
  44. package/build/es/src/social-groups-v2-group-role.public.d.ts +1 -1
  45. package/build/es/src/social-groups-v2-group-role.types.d.ts +67 -0
  46. package/build/es/src/social-groups-v2-group-role.universal.d.ts +67 -0
  47. package/build/es/src/social-groups-v2-group-role.universal.js +22 -13
  48. package/build/es/src/social-groups-v2-group-role.universal.js.map +1 -1
  49. package/build/es/src/social-groups-v2-group-rules.public.d.ts +1 -1
  50. package/build/es/src/social-groups-v2-group-rules.types.d.ts +67 -0
  51. package/build/es/src/social-groups-v2-group-rules.universal.d.ts +67 -0
  52. package/build/es/src/social-groups-v2-group-rules.universal.js +12 -8
  53. package/build/es/src/social-groups-v2-group-rules.universal.js.map +1 -1
  54. package/build/es/src/social-groups-v2-group.public.d.ts +1 -1
  55. package/build/es/src/social-groups-v2-group.types.d.ts +67 -0
  56. package/build/es/src/social-groups-v2-group.universal.d.ts +67 -0
  57. package/build/es/src/social-groups-v2-group.universal.js +37 -20
  58. package/build/es/src/social-groups-v2-group.universal.js.map +1 -1
  59. package/build/es/src/social-groups-v2-join-group-request.public.d.ts +1 -1
  60. package/build/es/src/social-groups-v2-join-group-request.types.d.ts +73 -0
  61. package/build/es/src/social-groups-v2-join-group-request.types.js.map +1 -1
  62. package/build/es/src/social-groups-v2-join-group-request.universal.d.ts +73 -0
  63. package/build/es/src/social-groups-v2-join-group-request.universal.js +24 -13
  64. package/build/es/src/social-groups-v2-join-group-request.universal.js.map +1 -1
  65. package/build/es/src/social-groups-v2-membership-question.universal.js +24 -12
  66. package/build/es/src/social-groups-v2-membership-question.universal.js.map +1 -1
  67. package/package.json +3 -3
@@ -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[];
@@ -34,6 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.unassignRole = exports.assignRole = exports.Role = exports.__debug = void 0;
36
36
  const velo_1 = require("@wix/metro-runtime/velo");
37
+ const transform_error_1 = require("@wix/sdk-runtime/transform-error");
37
38
  const ambassadorWixSocialGroupsV2GroupRole = __importStar(require("./social-groups-v2-group-role.http"));
38
39
  let __verbose = false;
39
40
  function __log(...args) {
@@ -119,12 +120,16 @@ function assignRole(groupId, memberIds, role, options) {
119
120
  return fromJSON(result.data);
120
121
  }
121
122
  catch (err) {
122
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
123
- 'groupId',
124
- 'memberIds',
125
- 'role',
126
- 'options',
127
- ]);
123
+ const transformedError = (0, transform_error_1.transformError)(err, {
124
+ spreadPathsToArguments: {},
125
+ explicitPathsToArguments: {
126
+ groupId: '$[0]',
127
+ memberIds: '$[1]',
128
+ role: '$[2]',
129
+ siteMemberIds: '$[3].siteMemberIds',
130
+ },
131
+ singleArgumentUnchanged: false,
132
+ }, ['groupId', 'memberIds', 'role', 'options']);
128
133
  (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
129
134
  throw transformedError;
130
135
  }
@@ -187,12 +192,16 @@ function unassignRole(groupId, memberIds, role, options) {
187
192
  return fromJSON(result.data);
188
193
  }
189
194
  catch (err) {
190
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
191
- 'groupId',
192
- 'memberIds',
193
- 'role',
194
- 'options',
195
- ]);
195
+ const transformedError = (0, transform_error_1.transformError)(err, {
196
+ spreadPathsToArguments: {},
197
+ explicitPathsToArguments: {
198
+ groupId: '$[0]',
199
+ memberIds: '$[1]',
200
+ role: '$[2]',
201
+ siteMemberIds: '$[3].siteMemberIds',
202
+ },
203
+ singleArgumentUnchanged: false,
204
+ }, ['groupId', 'memberIds', 'role', 'options']);
196
205
  (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
197
206
  throw transformedError;
198
207
  }
@@ -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,kDAAqE;AAErE,yGAA2F;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;AAEY,QAAA,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,IAAY,IAMX;AAND,WAAY,IAAI;IACd,qCAA6B,CAAA;IAC7B,4BAA4B;IAC5B,yBAAiB,CAAA;IACjB,2BAA2B;IAC3B,uBAAe,CAAA;AACjB,CAAC,EANW,IAAI,oBAAJ,IAAI,QAMf;AAuHD,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,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B;YACD,oBAAoB,EAAE,sBAAsB;SAC7C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QAEzE,MAAM,OAAO,GAAG,oCAAoC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE3E,KAAK,CAAC,wCAAwC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAEpE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,2DAAI,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,4DAAG,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;QACtC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;gBACE,sBAAsB,EAAE,EAAE;gBAC1B,wBAAwB,EAAE;oBACxB,OAAO,EAAE,MAAM;oBACf,SAAS,EAAE,MAAM;oBACjB,IAAI,EAAE,MAAM;oBACZ,aAAa,EAAE,oBAAoB;iBACpC;gBACD,uBAAuB,EAAE,KAAK;aAC/B,EACD,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,CAC5C,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AAvED,oCAuEC"}
@@ -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;
@@ -34,6 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.createOrReplaceAllRules = exports.listRules = exports.__debug = void 0;
36
36
  const velo_1 = require("@wix/metro-runtime/velo");
37
+ const transform_error_1 = require("@wix/sdk-runtime/transform-error");
37
38
  const ambassadorWixSocialGroupsV2GroupRules = __importStar(require("./social-groups-v2-group-rules.http"));
38
39
  let __verbose = false;
39
40
  function __log(...args) {
@@ -99,9 +100,11 @@ function listRules(groupId) {
99
100
  return fromJSON(result.data);
100
101
  }
101
102
  catch (err) {
102
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
103
- 'groupId',
104
- ]);
103
+ const transformedError = (0, transform_error_1.transformError)(err, {
104
+ spreadPathsToArguments: {},
105
+ explicitPathsToArguments: { groupId: '$[0]' },
106
+ singleArgumentUnchanged: false,
107
+ }, ['groupId']);
105
108
  (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
106
109
  throw transformedError;
107
110
  }
@@ -154,10 +157,11 @@ function createOrReplaceAllRules(groupId, options) {
154
157
  return fromJSON(result.data);
155
158
  }
156
159
  catch (err) {
157
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
158
- 'groupId',
159
- 'options',
160
- ]);
160
+ const transformedError = (0, transform_error_1.transformError)(err, {
161
+ spreadPathsToArguments: {},
162
+ explicitPathsToArguments: { groupId: '$[0]', rules: '$[1].rules' },
163
+ singleArgumentUnchanged: false,
164
+ }, ['groupId', 'options']);
161
165
  (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
162
166
  throw transformedError;
163
167
  }
@@ -1 +1 @@
1
- {"version":3,"file":"social-groups-v2-group-rules.universal.js","sourceRoot":"","sources":["../../../src/social-groups-v2-group-rules.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,2GAA6F;AAE7F,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;AAEY,QAAA,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;AA0D5B,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAC3C,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAC5C,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;;;;;;GASG;AACH,SAAsB,SAAS,CAC7B,OAAe;;;QAEf,MAAM,qBAAqB,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAClD,MAAM,sBAAsB,GAAG,GAAG,CAAC;QAEnC,aAAa;QACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC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;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;QACtC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;gBACT,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AA5DD,0DA4DC"}
1
+ {"version":3,"file":"social-groups-v2-group-rules.universal.js","sourceRoot":"","sources":["../../../src/social-groups-v2-group-rules.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqD;AACrD,sEAAuF;AAEvF,2GAA6F;AAE7F,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;AAEY,QAAA,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;AAmI5B,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAC3C,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAC5C,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;;;;;;GASG;AACH,SAAsB,SAAS,CAC7B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;QAEzE,KAAK,CACH,mDAAmD,SAAS,CAAC,OAAO,CAAC,EAAE,CACxE,CAAC;QAEF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,2DAAI,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,4DAAG,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;QACtC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;gBACE,sBAAsB,EAAE,EAAE;gBAC1B,wBAAwB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE;gBAClE,uBAAuB,EAAE,KAAK;aAC/B,EACD,CAAC,SAAS,EAAE,SAAS,CAAC,CACvB,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AAjED,0DAiEC"}
@@ -77,4 +77,4 @@ export declare function getGroupBySlug(httpClient: HttpClient): (slug: string) =
77
77
  export declare function listGroups(httpClient: HttpClient): (options?: ListGroupsOptions) => Promise<import("./social-groups-v2-group.universal").ListGroupsResponse & import("./social-groups-v2-group.universal").ListGroupsResponseNonNullableFields>;
78
78
  export declare function queryGroups(httpClient: HttpClient): () => import("./social-groups-v2-group.universal").GroupsQueryBuilder;
79
79
  export { Type, AllowPolicy, StepKey, PrivacyStatus, IdentityType, SortOrder, MembershipStatus, } from './social-groups-v2-group.universal';
80
- export { Group, Events, Logo, GroupDetailsPosition, Image, Position, OnboardingStepSettings, AccessRestriction, AccessRestrictionDataOneOf, GroupDetails, CoverImage, GroupSettings, Identity, CreateGroupRequest, CreateGroupResponse, UpdateGroupRequest, UpdateGroupResponse, GroupCoverChanged, GroupDescriptionChanged, DeleteGroupRequest, DeleteGroupResponse, GetGroupRequest, GetGroupResponse, GetGroupBySlugRequest, GetGroupBySlugResponse, ListGroupsRequest, ListGroupsResponse, PagingMetadata, ListGroupsByUserIdRequest, ListGroupsByUserIdResponse, GroupWithMsId, QueryGroupsRequest, Query, Sorting, Paging, QueryGroupsResponse, QueryJoinedGroupsRequest, QueryJoinedGroupsResponse, QueryGroupsByMembershipRequest, GroupPermissions, QueryGroupsByMembershipResponse, CreateGroupResponseNonNullableFields, UpdateGroupResponseNonNullableFields, DeleteGroupResponseNonNullableFields, GetGroupResponseNonNullableFields, GetGroupBySlugResponseNonNullableFields, ListGroupsResponseNonNullableFields, QueryGroupsResponseNonNullableFields, CreateGroupOptions, UpdateGroup, ListGroupsOptions, GroupsQueryResult, GroupsQueryBuilder, } from './social-groups-v2-group.universal';
80
+ export { Group, Events, Logo, GroupDetailsPosition, Image, Position, OnboardingStepSettings, AccessRestriction, AccessRestrictionDataOneOf, GroupDetails, CoverImage, GroupSettings, Identity, CreateGroupRequest, CreateGroupResponse, UpdateGroupRequest, UpdateGroupResponse, GroupCoverChanged, GroupDescriptionChanged, DeleteGroupRequest, DeleteGroupResponse, GetGroupRequest, GetGroupResponse, GetGroupBySlugRequest, GetGroupBySlugResponse, ListGroupsRequest, ListGroupsResponse, PagingMetadata, ListGroupsByUserIdRequest, ListGroupsByUserIdResponse, GroupWithMsId, QueryGroupsRequest, Query, Sorting, Paging, QueryGroupsResponse, QueryJoinedGroupsRequest, QueryJoinedGroupsResponse, QueryGroupsByMembershipRequest, GroupPermissions, QueryGroupsByMembershipResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, CreateGroupResponseNonNullableFields, UpdateGroupResponseNonNullableFields, DeleteGroupResponseNonNullableFields, GetGroupResponseNonNullableFields, GetGroupBySlugResponseNonNullableFields, ListGroupsResponseNonNullableFields, QueryGroupsResponseNonNullableFields, CreateGroupOptions, UpdateGroup, ListGroupsOptions, GroupsQueryResult, GroupsQueryBuilder, } from './social-groups-v2-group.universal';
@@ -353,6 +353,73 @@ export interface QueryGroupsByMembershipResponse {
353
353
  groups?: Group[];
354
354
  metadata?: PagingMetadata;
355
355
  }
356
+ export interface DomainEvent extends DomainEventBodyOneOf {
357
+ createdEvent?: EntityCreatedEvent;
358
+ updatedEvent?: EntityUpdatedEvent;
359
+ deletedEvent?: EntityDeletedEvent;
360
+ actionEvent?: ActionEvent;
361
+ /**
362
+ * Unique event ID.
363
+ * Allows clients to ignore duplicate webhooks.
364
+ */
365
+ id?: string;
366
+ /**
367
+ * Assumes actions are also always typed to an entity_type
368
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
369
+ */
370
+ entityFqdn?: string;
371
+ /**
372
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
373
+ * This is although the created/updated/deleted notion is duplication of the oneof types
374
+ * Example: created/updated/deleted/started/completed/email_opened
375
+ */
376
+ slug?: string;
377
+ /** ID of the entity associated with the event. */
378
+ entityId?: string;
379
+ /** Event timestamp. */
380
+ eventTime?: Date;
381
+ /**
382
+ * Whether the event was triggered as a result of a privacy regulation application
383
+ * (for example, GDPR).
384
+ */
385
+ triggeredByAnonymizeRequest?: boolean | null;
386
+ /** If present, indicates the action that triggered the event. */
387
+ originatedFrom?: string | null;
388
+ /**
389
+ * A sequence number defining the order of updates to the underlying entity.
390
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
391
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
392
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
393
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
394
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
395
+ */
396
+ entityEventSequence?: string | null;
397
+ }
398
+ /** @oneof */
399
+ export interface DomainEventBodyOneOf {
400
+ createdEvent?: EntityCreatedEvent;
401
+ updatedEvent?: EntityUpdatedEvent;
402
+ deletedEvent?: EntityDeletedEvent;
403
+ actionEvent?: ActionEvent;
404
+ }
405
+ export interface EntityCreatedEvent {
406
+ entityAsJson?: string;
407
+ }
408
+ export interface EntityUpdatedEvent {
409
+ /**
410
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
411
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
412
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
413
+ */
414
+ currentEntityAsJson?: string;
415
+ }
416
+ export interface EntityDeletedEvent {
417
+ /** Entity that was deleted */
418
+ deletedEntityAsJson?: string | null;
419
+ }
420
+ export interface ActionEvent {
421
+ bodyAsJson?: string;
422
+ }
356
423
  export interface CreateGroupResponseNonNullableFields {
357
424
  group?: {
358
425
  privacyLevel: PrivacyStatus;
@@ -353,6 +353,73 @@ export interface QueryGroupsByMembershipResponse {
353
353
  groups?: Group[];
354
354
  metadata?: PagingMetadata;
355
355
  }
356
+ export interface DomainEvent extends DomainEventBodyOneOf {
357
+ createdEvent?: EntityCreatedEvent;
358
+ updatedEvent?: EntityUpdatedEvent;
359
+ deletedEvent?: EntityDeletedEvent;
360
+ actionEvent?: ActionEvent;
361
+ /**
362
+ * Unique event ID.
363
+ * Allows clients to ignore duplicate webhooks.
364
+ */
365
+ _id?: string;
366
+ /**
367
+ * Assumes actions are also always typed to an entity_type
368
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
369
+ */
370
+ entityFqdn?: string;
371
+ /**
372
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
373
+ * This is although the created/updated/deleted notion is duplication of the oneof types
374
+ * Example: created/updated/deleted/started/completed/email_opened
375
+ */
376
+ slug?: string;
377
+ /** ID of the entity associated with the event. */
378
+ entityId?: string;
379
+ /** Event timestamp. */
380
+ eventTime?: Date;
381
+ /**
382
+ * Whether the event was triggered as a result of a privacy regulation application
383
+ * (for example, GDPR).
384
+ */
385
+ triggeredByAnonymizeRequest?: boolean | null;
386
+ /** If present, indicates the action that triggered the event. */
387
+ originatedFrom?: string | null;
388
+ /**
389
+ * A sequence number defining the order of updates to the underlying entity.
390
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
391
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
392
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
393
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
394
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
395
+ */
396
+ entityEventSequence?: string | null;
397
+ }
398
+ /** @oneof */
399
+ export interface DomainEventBodyOneOf {
400
+ createdEvent?: EntityCreatedEvent;
401
+ updatedEvent?: EntityUpdatedEvent;
402
+ deletedEvent?: EntityDeletedEvent;
403
+ actionEvent?: ActionEvent;
404
+ }
405
+ export interface EntityCreatedEvent {
406
+ entityAsJson?: string;
407
+ }
408
+ export interface EntityUpdatedEvent {
409
+ /**
410
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
411
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
412
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
413
+ */
414
+ currentEntityAsJson?: string;
415
+ }
416
+ export interface EntityDeletedEvent {
417
+ /** Entity that was deleted */
418
+ deletedEntityAsJson?: string | null;
419
+ }
420
+ export interface ActionEvent {
421
+ bodyAsJson?: string;
422
+ }
356
423
  export interface CreateGroupResponseNonNullableFields {
357
424
  group?: {
358
425
  privacyLevel: PrivacyStatus;