@wix/events 1.0.44 → 1.0.46
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/events-v2-policy.http.d.ts +47 -4
- package/build/cjs/src/events-v2-policy.http.js +47 -4
- package/build/cjs/src/events-v2-policy.http.js.map +1 -1
- package/build/cjs/src/events-v2-policy.public.d.ts +7 -7
- package/build/cjs/src/events-v2-policy.public.js +2 -2
- package/build/cjs/src/events-v2-policy.public.js.map +1 -1
- package/build/cjs/src/events-v2-policy.types.d.ts +17 -21
- package/build/cjs/src/events-v2-policy.types.js.map +1 -1
- package/build/cjs/src/events-v2-policy.universal.d.ts +106 -49
- package/build/cjs/src/events-v2-policy.universal.js +71 -24
- package/build/cjs/src/events-v2-policy.universal.js.map +1 -1
- package/build/es/src/events-v2-policy.http.d.ts +47 -4
- package/build/es/src/events-v2-policy.http.js +47 -4
- package/build/es/src/events-v2-policy.http.js.map +1 -1
- package/build/es/src/events-v2-policy.public.d.ts +7 -7
- package/build/es/src/events-v2-policy.public.js +2 -2
- package/build/es/src/events-v2-policy.public.js.map +1 -1
- package/build/es/src/events-v2-policy.types.d.ts +17 -21
- package/build/es/src/events-v2-policy.types.js.map +1 -1
- package/build/es/src/events-v2-policy.universal.d.ts +106 -49
- package/build/es/src/events-v2-policy.universal.js +71 -24
- package/build/es/src/events-v2-policy.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,34 +1,77 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
2
|
import { CreatePolicyRequest, CreatePolicyResponse, DeletePolicyRequest, DeletePolicyResponse, QueryPoliciesRequest, QueryPoliciesResponse, ReorderEventPoliciesRequest, ReorderEventPoliciesResponse, UpdatePolicyRequest, UpdatePolicyResponse, GetPolicyRequest, GetPolicyResponse } from './events-v2-policy.types';
|
|
3
3
|
/**
|
|
4
|
-
* Creates a policy
|
|
4
|
+
* Creates a policy.
|
|
5
|
+
*
|
|
5
6
|
*
|
|
6
7
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
8
|
+
*
|
|
9
|
+
* The `createPolicy()` function returns a Promise that resolves to the newly-created policy.
|
|
10
|
+
*
|
|
11
|
+
* You can create up to 3 policies per event. If you try to create more than 3, you'll get the "Maximum number of policies for the event has been reached" error.
|
|
7
12
|
*/
|
|
8
13
|
export declare function createPolicy(payload: CreatePolicyRequest): RequestOptionsFactory<CreatePolicyResponse>;
|
|
9
14
|
/**
|
|
10
15
|
* Updates a policy.
|
|
11
16
|
*
|
|
17
|
+
*
|
|
12
18
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
19
|
+
*
|
|
20
|
+
* The `updatePolicy()` function returns a Promise that resolves to the newly-updated policy.
|
|
21
|
+
*
|
|
22
|
+
* Each time the policy is updated, `revision` increments by 1. The existing `revision` must be included when updating the policy. This ensures you're working with the latest policy and prevents unintended overwrites.
|
|
13
23
|
*/
|
|
14
24
|
export declare function updatePolicy(payload: UpdatePolicyRequest): RequestOptionsFactory<UpdatePolicyResponse>;
|
|
15
25
|
/**
|
|
16
|
-
*
|
|
26
|
+
* Permanently deletes a policy.
|
|
27
|
+
*
|
|
17
28
|
*
|
|
18
29
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
30
|
+
*
|
|
31
|
+
* The `deletePolicy()` function returns a Promise that resolves when the specified policy is deleted.
|
|
32
|
+
*
|
|
33
|
+
* Deleted policies are not returned by the `getPolicy()` or `queryPolicies()` functions.
|
|
19
34
|
*/
|
|
20
35
|
export declare function deletePolicy(payload: DeletePolicyRequest): RequestOptionsFactory<DeletePolicyResponse>;
|
|
21
36
|
/**
|
|
22
37
|
* Retrieves a list of policies, given the provided paging and filter.
|
|
23
38
|
*
|
|
39
|
+
*
|
|
24
40
|
* > Note: The fieldsets in this function are restricted and only run if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
41
|
+
*
|
|
42
|
+
* The `queryPolicies()` function builds a query to retrieve a list of policies and returns a [PoliciesQueryBuilder](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder) object.
|
|
43
|
+
*
|
|
44
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
45
|
+
*
|
|
46
|
+
* You can refine the query by chaining `PoliciesQueryBuilder` functions onto the query. `PoliciesQueryBuilder` functions enable you to sort, filter and control the results that `queryPolicies.find()` returns.
|
|
47
|
+
*
|
|
48
|
+
* The query runs with the following `PoliciesQueryBuilder` defaults that you can override:
|
|
49
|
+
*
|
|
50
|
+
* [`limit`](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder/limit): `50`
|
|
51
|
+
* [`descending`](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder/descending): `_createdDate`
|
|
52
|
+
*
|
|
53
|
+
* The functions that are chained to `queryPolicies()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the id property in descending order, the results are sorted by the created date and then, if there are multiple results with the same date, the items are sorted by the id.
|
|
54
|
+
*
|
|
55
|
+
* The following `PoliciesQueryBuilder` functions are supported for `queryPolicies()`.
|
|
56
|
+
*
|
|
57
|
+
* The table below shows which `PoliciesQueryBuilder` functions are supported for `queryPoliciesGuests()`. You can only use one filter function for each property. If a property is used in more than one filter, only the first filter will work.
|
|
25
58
|
*/
|
|
26
59
|
export declare function queryPolicies(payload: QueryPoliciesRequest): RequestOptionsFactory<QueryPoliciesResponse>;
|
|
27
60
|
/**
|
|
28
|
-
*
|
|
61
|
+
* Changes policy order in an event dashboard and agreement checkbox on the checkout form.
|
|
62
|
+
*
|
|
29
63
|
*
|
|
30
64
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
65
|
+
*
|
|
66
|
+
* The reorderEventPolicies() function returns a Promise that resolves to the newly-reordered policy.
|
|
31
67
|
*/
|
|
32
68
|
export declare function reorderEventPolicies(payload: ReorderEventPoliciesRequest): RequestOptionsFactory<ReorderEventPoliciesResponse>;
|
|
33
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves a policy by ID.
|
|
71
|
+
*
|
|
72
|
+
*
|
|
73
|
+
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
74
|
+
*
|
|
75
|
+
* The `getPolicy()` function returns a Promise that resolves to a policy whose ID matches the given ID.
|
|
76
|
+
*/
|
|
34
77
|
export declare function getPolicy(payload: GetPolicyRequest): RequestOptionsFactory<GetPolicyResponse>;
|
|
@@ -57,9 +57,14 @@ function resolveWixEventsV2PolicyManagementUrl(opts) {
|
|
|
57
57
|
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Creates a policy
|
|
60
|
+
* Creates a policy.
|
|
61
|
+
*
|
|
61
62
|
*
|
|
62
63
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
64
|
+
*
|
|
65
|
+
* The `createPolicy()` function returns a Promise that resolves to the newly-created policy.
|
|
66
|
+
*
|
|
67
|
+
* You can create up to 3 policies per event. If you try to create more than 3, you'll get the "Maximum number of policies for the event has been reached" error.
|
|
63
68
|
*/
|
|
64
69
|
function createPolicy(payload) {
|
|
65
70
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_createPolicyRequest, { _policy });
|
|
@@ -85,7 +90,12 @@ exports.createPolicy = createPolicy;
|
|
|
85
90
|
/**
|
|
86
91
|
* Updates a policy.
|
|
87
92
|
*
|
|
93
|
+
*
|
|
88
94
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
95
|
+
*
|
|
96
|
+
* The `updatePolicy()` function returns a Promise that resolves to the newly-updated policy.
|
|
97
|
+
*
|
|
98
|
+
* Each time the policy is updated, `revision` increments by 1. The existing `revision` must be included when updating the policy. This ensures you're working with the latest policy and prevents unintended overwrites.
|
|
89
99
|
*/
|
|
90
100
|
function updatePolicy(payload) {
|
|
91
101
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updatePolicyRequest, { _policy });
|
|
@@ -109,9 +119,14 @@ function updatePolicy(payload) {
|
|
|
109
119
|
}
|
|
110
120
|
exports.updatePolicy = updatePolicy;
|
|
111
121
|
/**
|
|
112
|
-
*
|
|
122
|
+
* Permanently deletes a policy.
|
|
123
|
+
*
|
|
113
124
|
*
|
|
114
125
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
126
|
+
*
|
|
127
|
+
* The `deletePolicy()` function returns a Promise that resolves when the specified policy is deleted.
|
|
128
|
+
*
|
|
129
|
+
* Deleted policies are not returned by the `getPolicy()` or `queryPolicies()` functions.
|
|
115
130
|
*/
|
|
116
131
|
function deletePolicy(payload) {
|
|
117
132
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deletePolicyRequest, {});
|
|
@@ -137,7 +152,25 @@ exports.deletePolicy = deletePolicy;
|
|
|
137
152
|
/**
|
|
138
153
|
* Retrieves a list of policies, given the provided paging and filter.
|
|
139
154
|
*
|
|
155
|
+
*
|
|
140
156
|
* > Note: The fieldsets in this function are restricted and only run if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
157
|
+
*
|
|
158
|
+
* The `queryPolicies()` function builds a query to retrieve a list of policies and returns a [PoliciesQueryBuilder](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder) object.
|
|
159
|
+
*
|
|
160
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
161
|
+
*
|
|
162
|
+
* You can refine the query by chaining `PoliciesQueryBuilder` functions onto the query. `PoliciesQueryBuilder` functions enable you to sort, filter and control the results that `queryPolicies.find()` returns.
|
|
163
|
+
*
|
|
164
|
+
* The query runs with the following `PoliciesQueryBuilder` defaults that you can override:
|
|
165
|
+
*
|
|
166
|
+
* [`limit`](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder/limit): `50`
|
|
167
|
+
* [`descending`](https://www.wix.com/velo/reference/wix-events-v2/policies/policiesquerybuilder/descending): `_createdDate`
|
|
168
|
+
*
|
|
169
|
+
* The functions that are chained to `queryPolicies()` are applied in the order they are called. For example, if you sort on the `_createdDate` property in ascending order and then on the id property in descending order, the results are sorted by the created date and then, if there are multiple results with the same date, the items are sorted by the id.
|
|
170
|
+
*
|
|
171
|
+
* The following `PoliciesQueryBuilder` functions are supported for `queryPolicies()`.
|
|
172
|
+
*
|
|
173
|
+
* The table below shows which `PoliciesQueryBuilder` functions are supported for `queryPoliciesGuests()`. You can only use one filter function for each property. If a property is used in more than one filter, only the first filter will work.
|
|
141
174
|
*/
|
|
142
175
|
function queryPolicies(payload) {
|
|
143
176
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryPoliciesRequest, {});
|
|
@@ -161,9 +194,12 @@ function queryPolicies(payload) {
|
|
|
161
194
|
}
|
|
162
195
|
exports.queryPolicies = queryPolicies;
|
|
163
196
|
/**
|
|
164
|
-
*
|
|
197
|
+
* Changes policy order in an event dashboard and agreement checkbox on the checkout form.
|
|
198
|
+
*
|
|
165
199
|
*
|
|
166
200
|
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
201
|
+
*
|
|
202
|
+
* The reorderEventPolicies() function returns a Promise that resolves to the newly-reordered policy.
|
|
167
203
|
*/
|
|
168
204
|
function reorderEventPolicies(payload) {
|
|
169
205
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_reorderEventPoliciesRequest, {});
|
|
@@ -188,7 +224,14 @@ function reorderEventPolicies(payload) {
|
|
|
188
224
|
return __reorderEventPolicies;
|
|
189
225
|
}
|
|
190
226
|
exports.reorderEventPolicies = reorderEventPolicies;
|
|
191
|
-
/**
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves a policy by ID.
|
|
229
|
+
*
|
|
230
|
+
*
|
|
231
|
+
* > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
|
|
232
|
+
*
|
|
233
|
+
* The `getPolicy()` function returns a Promise that resolves to a policy whose ID matches the given ID.
|
|
234
|
+
*/
|
|
192
235
|
function getPolicy(payload) {
|
|
193
236
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getPolicyRequest, {});
|
|
194
237
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getPolicyResponse, { _policy });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-v2-policy.http.js","sourceRoot":"","sources":["../../../src/events-v2-policy.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAkBhD,MAAM,oBAAoB,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACnD,MAAM,qBAAqB,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACpD,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACjD,MAAM,OAAO,GAAG;IACd,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AAC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C;IAEzC,OAAO,sBAAsB,CAAC;AAChC,CAAC;AA9BD,oDA8BC;AAED;;;;;;;GAOG;AACH,SAAgB,SAAS,CACvB,OAAyB;IAEzB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EACrD,iBAAiB,EACjB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,kBAAkB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAE1E,SAAS,WAAW,CAAC,EAAE,IAAI,EAAO;QAChC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,KAAY;YACpB,GAAG,EAAE,qCAAqC,CAAC;gBACzC,SAAS,EAAE,yBAAyB;gBACpC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,MAAM,EAAE,IAAA,iCAAiB,EAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;IAE9B,OAAO,WAAW,CAAC;AACrB,CAAC;AA5BD,8BA4BC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { Policy, UpdatePolicy,
|
|
3
|
-
export declare function createPolicy(httpClient: HttpClient): (policy: Policy) => Promise<
|
|
4
|
-
export declare function updatePolicy(httpClient: HttpClient): (_id: string | null, policy: UpdatePolicy) => Promise<
|
|
5
|
-
export declare function deletePolicy(httpClient: HttpClient): (policyId: string
|
|
2
|
+
import { Policy, UpdatePolicy, ReorderEventPoliciesOptions } from './events-v2-policy.universal';
|
|
3
|
+
export declare function createPolicy(httpClient: HttpClient): (policy: Policy) => Promise<Policy>;
|
|
4
|
+
export declare function updatePolicy(httpClient: HttpClient): (_id: string | null, policy: UpdatePolicy) => Promise<Policy>;
|
|
5
|
+
export declare function deletePolicy(httpClient: HttpClient): (policyId: string) => Promise<void>;
|
|
6
6
|
export declare function queryPolicies(httpClient: HttpClient): () => import("./events-v2-policy.universal").PoliciesQueryBuilder;
|
|
7
|
-
export declare function reorderEventPolicies(httpClient: HttpClient): (options?: ReorderEventPoliciesOptions | undefined) => Promise<import("./events-v2-policy.universal").ReorderEventPoliciesResponse>;
|
|
8
|
-
export declare function getPolicy(httpClient: HttpClient): (policyId: string) => Promise<
|
|
7
|
+
export declare function reorderEventPolicies(httpClient: HttpClient): (eventId: string, options?: ReorderEventPoliciesOptions | undefined) => Promise<import("./events-v2-policy.universal").ReorderEventPoliciesResponse>;
|
|
8
|
+
export declare function getPolicy(httpClient: HttpClient): (policyId: string) => Promise<Policy>;
|
|
9
9
|
export { SortOrder, LocationType, SubdivisionType, Status, EventStatus, } from './events-v2-policy.universal';
|
|
10
|
-
export { Policy, CreatePolicyRequest, CreatePolicyResponse, UpdatePolicyRequest, UpdatePolicyResponse, UpdatePolicySortIndexRequest, UpdatePolicySortIndexResponse, DeletePolicyRequest, DeletePolicyResponse, QueryPoliciesRequest, CommonQueryV2, CommonQueryV2PagingMethodOneOf, CommonSorting, CommonPaging, CommonCursorPaging, QueryPoliciesResponse, CommonPagingMetadataV2, CommonCursors, ReorderEventPoliciesRequest, ReorderEventPoliciesRequestReferencePolicyOneOf, ReorderEventPoliciesResponse, GetPolicyRequest, GetPolicyResponse, EventCopied, Location, MapCoordinates, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, ScheduleConfig, Recurrences, Occurrence, Empty, UpdatePolicy,
|
|
10
|
+
export { Policy, CreatePolicyRequest, CreatePolicyResponse, UpdatePolicyRequest, UpdatePolicyResponse, UpdatePolicySortIndexRequest, UpdatePolicySortIndexResponse, DeletePolicyRequest, DeletePolicyResponse, QueryPoliciesRequest, CommonQueryV2, CommonQueryV2PagingMethodOneOf, CommonSorting, CommonPaging, CommonCursorPaging, QueryPoliciesResponse, CommonPagingMetadataV2, CommonCursors, ReorderEventPoliciesRequest, ReorderEventPoliciesRequestReferencePolicyOneOf, ReorderEventPoliciesResponse, GetPolicyRequest, GetPolicyResponse, EventCopied, Location, MapCoordinates, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, ScheduleConfig, Recurrences, Occurrence, Empty, UpdatePolicy, PoliciesQueryResult, PoliciesQueryBuilder, ReorderEventPoliciesOptions, } from './events-v2-policy.universal';
|
|
@@ -15,7 +15,7 @@ function updatePolicy(httpClient) {
|
|
|
15
15
|
}
|
|
16
16
|
exports.updatePolicy = updatePolicy;
|
|
17
17
|
function deletePolicy(httpClient) {
|
|
18
|
-
return (policyId
|
|
18
|
+
return (policyId) => (0, events_v2_policy_universal_1.deletePolicy)(policyId,
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
{ httpClient });
|
|
21
21
|
}
|
|
@@ -27,7 +27,7 @@ function queryPolicies(httpClient) {
|
|
|
27
27
|
}
|
|
28
28
|
exports.queryPolicies = queryPolicies;
|
|
29
29
|
function reorderEventPolicies(httpClient) {
|
|
30
|
-
return (options) => (0, events_v2_policy_universal_1.reorderEventPolicies)(options,
|
|
30
|
+
return (eventId, options) => (0, events_v2_policy_universal_1.reorderEventPolicies)(eventId, options,
|
|
31
31
|
// @ts-ignore
|
|
32
32
|
{ httpClient });
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-v2-policy.public.js","sourceRoot":"","sources":["../../../src/events-v2-policy.public.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"events-v2-policy.public.js","sourceRoot":"","sources":["../../../src/events-v2-policy.public.ts"],"names":[],"mappings":";;;AACA,6EAUsC;AAEtC,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,MAAc,EAAE,EAAE,CACxB,IAAA,yCAAqB,EACnB,MAAM;IACN,aAAa;I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
|
|
@@ -15,15 +15,13 @@ export interface Policy {
|
|
|
15
15
|
*/
|
|
16
16
|
createdDate?: Date;
|
|
17
17
|
/**
|
|
18
|
-
* Date and time of
|
|
18
|
+
* Date and time of the policy's latest update in `yyyy-mm-ddThh:mm:sssZ` format.
|
|
19
19
|
* @readonly
|
|
20
20
|
*/
|
|
21
21
|
updatedDate?: Date;
|
|
22
|
-
/** Policy name. */
|
|
23
22
|
name?: string;
|
|
24
|
-
/** Policy body. */
|
|
25
23
|
body?: string;
|
|
26
|
-
/** Event ID. */
|
|
24
|
+
/** Event ID to which the policy belongs. */
|
|
27
25
|
eventId?: string;
|
|
28
26
|
}
|
|
29
27
|
export interface CreatePolicyRequest {
|
|
@@ -39,7 +37,7 @@ export interface UpdatePolicyRequest {
|
|
|
39
37
|
policy: Policy;
|
|
40
38
|
}
|
|
41
39
|
export interface UpdatePolicyResponse {
|
|
42
|
-
/** The updated policy */
|
|
40
|
+
/** The updated policy. */
|
|
43
41
|
policy?: Policy;
|
|
44
42
|
}
|
|
45
43
|
export interface UpdatePolicySortIndexRequest {
|
|
@@ -55,10 +53,8 @@ export interface UpdatePolicySortIndexResponse {
|
|
|
55
53
|
policy?: Policy;
|
|
56
54
|
}
|
|
57
55
|
export interface DeletePolicyRequest {
|
|
58
|
-
/** ID of the policy to delete */
|
|
56
|
+
/** ID of the policy to delete. */
|
|
59
57
|
policyId: string;
|
|
60
|
-
/** Revision of the policy to delete */
|
|
61
|
-
revision?: string;
|
|
62
58
|
}
|
|
63
59
|
export interface DeletePolicyResponse {
|
|
64
60
|
}
|
|
@@ -67,9 +63,9 @@ export interface QueryPoliciesRequest {
|
|
|
67
63
|
query: CommonQueryV2;
|
|
68
64
|
}
|
|
69
65
|
export interface CommonQueryV2 extends CommonQueryV2PagingMethodOneOf {
|
|
70
|
-
/** Filter object in the following format: <br/> `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`. <br/> <br/> **Example:** <br/> `"filter" : { "id": "2224a9d1-79e6-4549-a5c5-bf7ce5aac1a5", "revision": {"$ne":"1"} }` <br/> <br/> See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/
|
|
66
|
+
/** Filter object in the following format: <br/> `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }`. <br/> <br/> **Example:** <br/> `"filter" : { "id": "2224a9d1-79e6-4549-a5c5-bf7ce5aac1a5", "revision": {"$ne":"1"} }` <br/> <br/> See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/policy-v2/filter-and-sort) for more information. */
|
|
71
67
|
filter?: Record<string, any> | null;
|
|
72
|
-
/** Sort object in the following format: <br/> `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]` <br/> <br/> **Example:** <br/> `[{"fieldName":"createdDate","direction":"DESC"}]` <br/> <br/> See [supported fields](https://dev.wix.com/api/rest/wix-events/
|
|
68
|
+
/** Sort object in the following format: <br/> `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]` <br/> <br/> **Example:** <br/> `[{"fieldName":"createdDate","direction":"DESC"}]` <br/> <br/> See [supported fields](https://dev.wix.com/api/rest/wix-events/policy-v2/filter-and-sort) for more information. */
|
|
73
69
|
sort?: CommonSorting[];
|
|
74
70
|
/** Pagination options. */
|
|
75
71
|
paging?: CommonPaging;
|
|
@@ -135,20 +131,20 @@ export interface CommonCursors {
|
|
|
135
131
|
prev?: string | null;
|
|
136
132
|
}
|
|
137
133
|
export interface ReorderEventPoliciesRequest extends ReorderEventPoliciesRequestReferencePolicyOneOf {
|
|
138
|
-
/** Event ID */
|
|
139
|
-
eventId
|
|
140
|
-
/** Policy ID */
|
|
141
|
-
policyId
|
|
142
|
-
/** Move
|
|
134
|
+
/** Event ID. */
|
|
135
|
+
eventId: string;
|
|
136
|
+
/** Policy ID. */
|
|
137
|
+
policyId: string;
|
|
138
|
+
/** Move the given `policyId` before the referenced policy. */
|
|
143
139
|
beforePolicyId?: string;
|
|
144
|
-
/** Move
|
|
140
|
+
/** Move the given `policyId` after the referenced policy. */
|
|
145
141
|
afterPolicyId?: string;
|
|
146
142
|
}
|
|
147
143
|
/** @oneof */
|
|
148
144
|
export interface ReorderEventPoliciesRequestReferencePolicyOneOf {
|
|
149
|
-
/** Move
|
|
145
|
+
/** Move the given `policyId` before the referenced policy. */
|
|
150
146
|
beforePolicyId?: string;
|
|
151
|
-
/** Move
|
|
147
|
+
/** Move the given `policyId` after the referenced policy. */
|
|
152
148
|
afterPolicyId?: string;
|
|
153
149
|
}
|
|
154
150
|
export interface ReorderEventPoliciesResponse {
|
|
@@ -156,11 +152,11 @@ export interface ReorderEventPoliciesResponse {
|
|
|
156
152
|
policies?: Policy[];
|
|
157
153
|
}
|
|
158
154
|
export interface GetPolicyRequest {
|
|
159
|
-
/** Policy ID */
|
|
155
|
+
/** Policy ID. */
|
|
160
156
|
policyId: string;
|
|
161
157
|
}
|
|
162
158
|
export interface GetPolicyResponse {
|
|
163
|
-
/**
|
|
159
|
+
/** The requested policy. */
|
|
164
160
|
policy?: Policy;
|
|
165
161
|
}
|
|
166
162
|
export interface EventCopied {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-v2-policy.types.js","sourceRoot":"","sources":["../../../src/events-v2-policy.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"events-v2-policy.types.js","sourceRoot":"","sources":["../../../src/events-v2-policy.types.ts"],"names":[],"mappings":";;;AAmGA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAgJD,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,iCAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;AAyDD,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,YAAY;IACZ,8EAA2D,CAAA;IAC3D,aAAa;IACb,8EAA2D,CAAA;IAC3D,gBAAgB;IAChB,8EAA2D,CAAA;IAC3D,2BAA2B;IAC3B,8EAA2D,CAAA;IAC3D,mBAAmB;IACnB,8EAA2D,CAAA;IAC3D,8IAA8I;IAC9I,sCAAmB,CAAA;AACrB,CAAC,EAdW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAc1B;AAmDD,IAAY,MAWX;AAXD,WAAY,MAAM;IAChB,8BAA8B;IAC9B,+BAAqB,CAAA;IACrB,0BAA0B;IAC1B,iCAAuB,CAAA;IACvB,iEAAiE;IACjE,2CAAiC,CAAA;IACjC,qEAAqE;IACrE,uDAA6C,CAAA;IAC7C,wEAAwE;IACxE,6DAAmD,CAAA;AACrD,CAAC,EAXW,MAAM,GAAN,cAAM,KAAN,cAAM,QAWjB;AAED,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,6CAA6C;IAC7C,sCAAuB,CAAA;IACvB,wBAAwB;IACxB,kCAAmB,CAAA;IACnB,sBAAsB;IACtB,8BAAe,CAAA;IACf,yBAAyB;IACzB,oCAAqB,CAAA;IACrB,oDAAoD;IACpD,8BAAe,CAAA;AACjB,CAAC,EAXW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAWtB"}
|