@wix/bex-utils 2.115.0 → 2.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@wix/ambassador-hub-v1-job/README.md +34 -0
- package/@wix/ambassador-hub-v1-job/builders/package.json +7 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/builders.impl.d.ts +130 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/builders.impl.js +1705 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/builders.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/crud/http.impl.d.ts +9 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/crud/http.impl.js +16 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/crud/http.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/crud/rpc.impl.d.ts +5 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/crud/rpc.impl.js +24 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/crud/rpc.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/http.impl.d.ts +54 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/http.impl.js +689 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/http.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/meta.impl.d.ts +24 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/meta.impl.js +170 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/meta.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/proto/client/proto-generated.d.ts +15832 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/proto/client/proto-generated.js +2 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/proto/proto-generated.d.ts +7912 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/proto/proto-generated.js +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/proto/server/proto-generated.d.ts +15777 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/proto/server/proto-generated.js +2 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/rpc.impl.d.ts +67 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/rpc.impl.js +202 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/rpc.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/types.impl.d.ts +2156 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/types.impl.js +127 -0
- package/@wix/ambassador-hub-v1-job/cjs/build/types.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/cjs/package.json +3 -0
- package/@wix/ambassador-hub-v1-job/crud/http/package.json +7 -0
- package/@wix/ambassador-hub-v1-job/crud/rpc/package.json +6 -0
- package/@wix/ambassador-hub-v1-job/es/build/builders.impl.d.ts +130 -0
- package/@wix/ambassador-hub-v1-job/es/build/builders.impl.js +1558 -0
- package/@wix/ambassador-hub-v1-job/es/build/builders.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/es/build/crud/http.impl.d.ts +9 -0
- package/@wix/ambassador-hub-v1-job/es/build/crud/http.impl.js +12 -0
- package/@wix/ambassador-hub-v1-job/es/build/crud/http.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/es/build/crud/rpc.impl.d.ts +5 -0
- package/@wix/ambassador-hub-v1-job/es/build/crud/rpc.impl.js +19 -0
- package/@wix/ambassador-hub-v1-job/es/build/crud/rpc.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/es/build/http.impl.d.ts +54 -0
- package/@wix/ambassador-hub-v1-job/es/build/http.impl.js +680 -0
- package/@wix/ambassador-hub-v1-job/es/build/http.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/es/build/meta.impl.d.ts +24 -0
- package/@wix/ambassador-hub-v1-job/es/build/meta.impl.js +128 -0
- package/@wix/ambassador-hub-v1-job/es/build/meta.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/es/build/proto/client/proto-generated.d.ts +15832 -0
- package/@wix/ambassador-hub-v1-job/es/build/proto/client/proto-generated.js +5 -0
- package/@wix/ambassador-hub-v1-job/es/build/proto/proto-generated.d.ts +7912 -0
- package/@wix/ambassador-hub-v1-job/es/build/proto/proto-generated.js +1 -0
- package/@wix/ambassador-hub-v1-job/es/build/proto/server/proto-generated.d.ts +15777 -0
- package/@wix/ambassador-hub-v1-job/es/build/proto/server/proto-generated.js +5 -0
- package/@wix/ambassador-hub-v1-job/es/build/rpc.impl.d.ts +67 -0
- package/@wix/ambassador-hub-v1-job/es/build/rpc.impl.js +158 -0
- package/@wix/ambassador-hub-v1-job/es/build/rpc.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/es/build/types.impl.d.ts +2156 -0
- package/@wix/ambassador-hub-v1-job/es/build/types.impl.js +124 -0
- package/@wix/ambassador-hub-v1-job/es/build/types.impl.js.map +1 -0
- package/@wix/ambassador-hub-v1-job/http/package.json +7 -0
- package/@wix/ambassador-hub-v1-job/meta/package.json +7 -0
- package/@wix/ambassador-hub-v1-job/package.json +108 -0
- package/@wix/ambassador-hub-v1-job/rpc/package.json +6 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/common.proto +63 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/data-item-service.proto +915 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/aggregate-pipeline.proto +528 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/aggregate.proto +146 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/async-job-status.proto +34 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/async-patch-by-filter.proto +66 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/async-remove-by-filter.proto +59 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-data-item-reference-result.proto +22 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-data-item-result.proto +24 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-insert-references.proto +54 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-insert.proto +75 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-publish-data-item-drafts.proto +46 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-remove-references.proto +48 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-remove.proto +70 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-save.proto +80 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-unpublish-data-items.proto +53 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/bulk-update.proto +85 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/condition.proto +15 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/count.proto +82 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/create-data-item-draft.proto +24 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/data-item-reference.proto +23 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/data-item.proto +84 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/distinct.proto +92 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/get.proto +101 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/insert-reference.proto +47 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/insert.proto +70 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/is-referenced.proto +55 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/options.proto +37 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/patch-data-item.proto +184 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/publish-data-item-draft.proto +24 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/query-referenced.proto +145 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/query.proto +157 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/reference-metadata.proto +15 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/remove-reference.proto +42 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/remove.proto +65 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/replace-references.proto +48 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/save.proto +87 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/search.proto +78 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/truncate.proto +33 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/unpublish-data-item.proto +31 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/message/update.proto +80 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/upstream/wix/common/bulk.proto +60 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/upstream/wix/common/paging.proto +113 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/upstream/wix/common/query.proto +121 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/cloud/data/api/data/upstream/wix/common/sorting.proto +26 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/iptf/webhooks/debug.proto +34 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/iptf/webhooks/kv.proto +42 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/com/wixpress/iptf/webhooks/message_envelope.proto +54 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/raw-http-messages.proto +39 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/webhooks_debug_service.proto +32 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/webhooks_sync_service.proto +33 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/action_payload.proto +33 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/annotations.proto +560 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/api_errors.proto +142 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/callback.proto +173 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/context.proto +19 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/entity.proto +133 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/errors.proto +127 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/idempotency.proto +25 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/permissions.proto +47 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/sla.proto +24 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/subscription.proto +44 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/api/validations.proto +147 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/address.proto +148 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/bulk.proto +53 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/data/dataextensions/extended-fields.proto +20 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/data/dataextensions/update-extended-fields-messages.proto +15 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/data/errors.proto +435 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/domainevents/attributeupdated.proto +20 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/domainevents/domainevents.proto +112 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/identification.proto +40 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/image.proto +8 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/media.proto +280 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/money.proto +32 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/pageurl.proto +32 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/paging.proto +121 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/query.proto +889 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/sorting.proto +36 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/spi.proto +80 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/tags.proto +55 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/common/wixlink.proto +203 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/graphql/definitions.proto +13 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/http/field_mask.proto +46 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/common.proto +108 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/data_movement_service.proto +287 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/destinations.proto +154 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/job.proto +164 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/job_spec.proto +41 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/oauth_service.proto +218 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/schema.proto +48 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/shared.proto +98 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/sources.proto +234 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/hub/v1/transformations.proto +23 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/sdk/definitions.proto +191 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/spi/definitions.proto +188 -0
- package/@wix/ambassador-hub-v1-job/src/main/proto/wix/spi/http_error_status.proto +24 -0
- package/@wix/ambassador-hub-v1-job/types/package.json +7 -0
- package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +8 -0
- package/@wix/bex-bundled-mini-essentials/package.json +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,915 @@
|
|
|
1
|
+
//flynt-disable missing-autovelo-def
|
|
2
|
+
//flynt-disable permissions-naming
|
|
3
|
+
//flynt-disable missing-audience
|
|
4
|
+
//flynt-disable missing-crud-annotation
|
|
5
|
+
syntax = "proto3";
|
|
6
|
+
|
|
7
|
+
package com.wixpress.cloud.data.api.data;
|
|
8
|
+
|
|
9
|
+
import "google/api/annotations.proto";
|
|
10
|
+
import "wix/api/annotations.proto";
|
|
11
|
+
import "wix/api/validations.proto";
|
|
12
|
+
import "wix/api/permissions.proto";
|
|
13
|
+
import "wix/api/entity.proto";
|
|
14
|
+
import "wix/api/callback.proto";
|
|
15
|
+
import "com/wixpress/cloud/data/api/data/message/aggregate.proto";
|
|
16
|
+
import "com/wixpress/cloud/data/api/data/message/aggregate-pipeline.proto";
|
|
17
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-insert.proto";
|
|
18
|
+
import "com/wixpress/cloud/data/api/data/message/patch-data-item.proto";
|
|
19
|
+
import "com/wixpress/cloud/data/api/data/message/async-patch-by-filter.proto";
|
|
20
|
+
import "com/wixpress/cloud/data/api/data/message/async-remove-by-filter.proto";
|
|
21
|
+
import "com/wixpress/cloud/data/api/data/message/async-job-status.proto";
|
|
22
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-remove.proto";
|
|
23
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-save.proto";
|
|
24
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-update.proto";
|
|
25
|
+
import "com/wixpress/cloud/data/api/data/message/count.proto";
|
|
26
|
+
import "com/wixpress/cloud/data/api/data/message/distinct.proto";
|
|
27
|
+
import "com/wixpress/cloud/data/api/data/message/get.proto";
|
|
28
|
+
import "com/wixpress/cloud/data/api/data/message/insert.proto";
|
|
29
|
+
import "com/wixpress/cloud/data/api/data/message/query.proto";
|
|
30
|
+
import "com/wixpress/cloud/data/api/data/message/query-referenced.proto";
|
|
31
|
+
import "com/wixpress/cloud/data/api/data/message/is-referenced.proto";
|
|
32
|
+
import "com/wixpress/cloud/data/api/data/message/remove.proto";
|
|
33
|
+
import "com/wixpress/cloud/data/api/data/message/save.proto";
|
|
34
|
+
import "com/wixpress/cloud/data/api/data/message/truncate.proto";
|
|
35
|
+
import "com/wixpress/cloud/data/api/data/message/update.proto";
|
|
36
|
+
import "com/wixpress/cloud/data/api/data/message/insert-reference.proto";
|
|
37
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-insert-references.proto";
|
|
38
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-remove-references.proto";
|
|
39
|
+
import "com/wixpress/cloud/data/api/data/message/remove-reference.proto";
|
|
40
|
+
import "com/wixpress/cloud/data/api/data/message/replace-references.proto";
|
|
41
|
+
import "com/wixpress/cloud/data/api/data/message/search.proto";
|
|
42
|
+
import "com/wixpress/cloud/data/api/data/message/create-data-item-draft.proto";
|
|
43
|
+
import "com/wixpress/cloud/data/api/data/message/publish-data-item-draft.proto";
|
|
44
|
+
import "com/wixpress/cloud/data/api/data/message/unpublish-data-item.proto";
|
|
45
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-unpublish-data-items.proto";
|
|
46
|
+
import "com/wixpress/cloud/data/api/data/message/bulk-publish-data-item-drafts.proto";
|
|
47
|
+
|
|
48
|
+
// Access and manipulate data items in collections.
|
|
49
|
+
service DataItemService {
|
|
50
|
+
option (wix.api.service_entity).message = "com.wixpress.cloud.data.api.data.DataItem";
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
// Adds an item to a collection.
|
|
54
|
+
//
|
|
55
|
+
// Call this method when you want a create-only operation. If the supplied `dataItem.id` already exists in the collection, the request fails. For different behavior, you can call:
|
|
56
|
+
//
|
|
57
|
+
// - [Bulk Insert Data Items](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/bulk-insert-data-items) to add multiple items in one call.
|
|
58
|
+
// - [Save Data Item](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/save-data-item) for upsert behavior, meaning to create missing items and update existing items with the same stable ID.
|
|
59
|
+
//
|
|
60
|
+
// An item can only be inserted into an existing collection.
|
|
61
|
+
// You can create a new collection using the [Data Collections API](https://dev.wix.com/api/rest/wix-data/wix-data/data-collections).
|
|
62
|
+
//
|
|
63
|
+
// When an item is inserted into a collection, the item's ID is automatically assigned a random value.
|
|
64
|
+
// You can optionally provide a custom ID in `dataItem.id` when inserting the item.
|
|
65
|
+
// If you specify an ID that already exists in the collection, the insertion will fail.
|
|
66
|
+
//
|
|
67
|
+
// If `dataItem.data` is empty, a new item is created with no data fields.
|
|
68
|
+
rpc InsertDataItem (InsertDataItemRequest) returns (InsertDataItemResponse) {
|
|
69
|
+
option (wix.api.exposure) = PUBLIC;
|
|
70
|
+
option (wix.api.maturity) = GA;
|
|
71
|
+
option (google.api.http) = {
|
|
72
|
+
post: "/v2/items"
|
|
73
|
+
};
|
|
74
|
+
option (wix.api.permission).name = "WIX_DATA.INSERT";
|
|
75
|
+
option (wix.api.required) = "InsertDataItemRequest.data_collection_id";
|
|
76
|
+
option (wix.api.required) = "InsertDataItemRequest.data_item";
|
|
77
|
+
|
|
78
|
+
option (wix.api.emits) = {
|
|
79
|
+
event_type: CREATED
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Patches an item in a collection.
|
|
84
|
+
//
|
|
85
|
+
// Call this method when you need a partial update and want fields that aren't mentioned in the request to stay unchanged. Patch requests are also the right place to use `fieldModifications` actions such as `SET_FIELD` for a direct replacement and `INCREMENT_FIELD` for arithmetic changes. For different behavior, you can call:
|
|
86
|
+
//
|
|
87
|
+
// - [Update Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/update-data-item) to replace the full payload rather than patch part of it.
|
|
88
|
+
// - [Save Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/save-data-item) for upsert behavior, meaning to create if the item doesn't exist and update if it does.
|
|
89
|
+
//
|
|
90
|
+
// This method modifies the specified item's existing data. Unlike [`Update Data Item`](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/update-data-item), only the fields specified in the request are modified. Data that isn't explicitly modified remains unchanged.
|
|
91
|
+
//
|
|
92
|
+
// To patch an item, specify its ID, the ID of the collection that contains it, and the modifications you want to apply. If an item is found in the specified collection with the specified ID, that item is patched. If the collection doesn't contain an item with that ID, the request fails.
|
|
93
|
+
//
|
|
94
|
+
// > **Notes**:
|
|
95
|
+
// > - When an item is patched, its `data._updatedDate` property is updated to the current date and time.
|
|
96
|
+
// > - You can only patch items in [collections created by Wix users](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection). Items in [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code) cannot be patched.
|
|
97
|
+
rpc PatchDataItem (PatchDataItemRequest) returns (PatchDataItemResponse) {
|
|
98
|
+
option (wix.api.exposure) = PUBLIC;
|
|
99
|
+
option (wix.api.maturity) = GA;
|
|
100
|
+
option (google.api.http) = {
|
|
101
|
+
patch: "/v2/items/{patch.data_item_id}",
|
|
102
|
+
additional_bindings: {
|
|
103
|
+
post: "/v2/items/patch"
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
option (wix.api.permission).name = "WIX_DATA.PATCH";
|
|
107
|
+
option (wix.api.required) = "PatchDataItemRequest.data_collection_id";
|
|
108
|
+
option (wix.api.required) = "PatchDataItemRequest.patch";
|
|
109
|
+
option (wix.api.required) = "PatchDataItemRequest.patch.data_item_id";
|
|
110
|
+
option (wix.api.required) = "PatchDataItemRequest.patch.field_modifications";
|
|
111
|
+
option (wix.api.required) = "PatchDataItemRequest.patch.field_modifications.field_path";
|
|
112
|
+
option (wix.api.required) = "PatchDataItemRequest.patch.field_modifications.action";
|
|
113
|
+
option (wix.api.required) = "PatchDataItemRequest.patch.field_modifications.action_options.increment_field_options.value";
|
|
114
|
+
|
|
115
|
+
option (wix.api.emits) = {
|
|
116
|
+
event_type: UPDATED
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Patches one or more items in a collection.
|
|
121
|
+
//
|
|
122
|
+
// Call this method when you need to apply partial changes to many items and want each item to keep fields that aren't mentioned in the request. This is also the right bulk surface for `fieldModifications` actions such as `SET_FIELD` and `INCREMENT_FIELD`: increments and decrements apply atomically on the server, so concurrent writers don't have to read the current value first or coordinate to avoid lost updates. For different behavior, you can call:
|
|
123
|
+
//
|
|
124
|
+
// - [Bulk Update Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-update-data-items) to replace each item's full payload rather than patch part of it.
|
|
125
|
+
// - [Save Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/save-data-item) per item for upsert behavior, meaning to create the item if its ID doesn't exist yet and update it if it does.
|
|
126
|
+
//
|
|
127
|
+
// This method modifies the existing data of one or more items. Unlike [`Bulk Update Data Item`](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-update-data-items), only the fields specified in the request are modified. Data that isn't explicitly modified remains unchanged.
|
|
128
|
+
//
|
|
129
|
+
// To patch items, specify the ID of the collection that contains them. For each item, specify its ID and the modifications you want to apply. If the item is found in the specified collection with the specified ID, that item is patched. If no such item is found, the response's `results` array contains a corresponding item whose `itemMetadata.error` property contains details about the error.
|
|
130
|
+
//
|
|
131
|
+
// Learn more about [Wix Data error codes](https://dev.wix.com/docs/rest/business-solutions/cms/wix-data-error-codes).
|
|
132
|
+
//
|
|
133
|
+
// > **Notes**:
|
|
134
|
+
// > - When an item is patched, its `data._updatedDate` property is updated to the current date and time.
|
|
135
|
+
// > - You can only patch items in [collections created by Wix users](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection). Items in [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code) cannot be patched.
|
|
136
|
+
// > - Calling this method triggers the [`Data Item Updated`](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-item-updated) event for each patched item.
|
|
137
|
+
rpc BulkPatchDataItems (BulkPatchDataItemsRequest) returns (BulkPatchDataItemsResponse) {
|
|
138
|
+
option (wix.api.exposure) = PUBLIC;
|
|
139
|
+
option (wix.api.maturity) = GA;
|
|
140
|
+
option (google.api.http) = {
|
|
141
|
+
post: "/v2/bulk/items/patch"
|
|
142
|
+
};
|
|
143
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_PATCH";
|
|
144
|
+
option (wix.api.required) = "BulkPatchDataItemsRequest.data_collection_id";
|
|
145
|
+
option (wix.api.required) = "BulkPatchDataItemsRequest.patches";
|
|
146
|
+
option (wix.api.required) = "BulkPatchDataItemsRequest.patches.data_item_id";
|
|
147
|
+
option (wix.api.required) = "BulkPatchDataItemsRequest.patches.field_modifications";
|
|
148
|
+
option (wix.api.required) = "BulkPatchDataItemsRequest.patches.field_modifications.field_path";
|
|
149
|
+
option (wix.api.required) = "BulkPatchDataItemsRequest.patches.field_modifications.action";
|
|
150
|
+
option (wix.api.required) = "BulkPatchDataItemsRequest.patches.field_modifications.action_options.increment_field_options.value";
|
|
151
|
+
|
|
152
|
+
option (wix.api.emits) = {
|
|
153
|
+
event_type: UPDATED
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Patches all data items matching a filter. Runs asynchronously.
|
|
158
|
+
//
|
|
159
|
+
//
|
|
160
|
+
// This method selects all items that match the specified filter and applies the given field modifications to each one.
|
|
161
|
+
// Unlike [Bulk Patch Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-patch-data-items), you don't need to specify individual item IDs. Instead, items are selected by filter.
|
|
162
|
+
//
|
|
163
|
+
// The operation runs asynchronously and returns a job ID for tracking status.
|
|
164
|
+
// Call [Get Async Job Status](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/get-async-job-status) with the returned job ID to poll for status.
|
|
165
|
+
//
|
|
166
|
+
// An empty `filter` patches all items in the collection.
|
|
167
|
+
//
|
|
168
|
+
// > **Notes:**
|
|
169
|
+
// > - The number of affected items is not bounded.
|
|
170
|
+
// > - If any item fails to be patched, the async job stops and its status becomes `FAILED`. Some items may already have been patched before the failure.
|
|
171
|
+
// > - Each patched item's `data._updatedDate` property is updated to the current date and time.
|
|
172
|
+
// > - Calling this method triggers the [Data Item Updated](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-item-updated) event for each patched item.
|
|
173
|
+
rpc AsyncPatchDataItemsByFilter (AsyncPatchDataItemsByFilterRequest)
|
|
174
|
+
returns (AsyncPatchDataItemsByFilterResponse) {
|
|
175
|
+
option (wix.api.exposure) = INTERNAL;
|
|
176
|
+
option (wix.api.maturity) = BETA;
|
|
177
|
+
option (google.api.http) = {
|
|
178
|
+
post: "/v2/bulk/items/async-patch-by-filter"
|
|
179
|
+
};
|
|
180
|
+
option (wix.api.permission).name = "WIX_DATA.ASYNC_PATCH_BY_FILTER";
|
|
181
|
+
option (wix.api.required) = "AsyncPatchDataItemsByFilterRequest.data_collection_id";
|
|
182
|
+
option (wix.api.required) = "AsyncPatchDataItemsByFilterRequest.field_modifications";
|
|
183
|
+
option (wix.api.required) = "AsyncPatchDataItemsByFilterRequest.field_modifications.field_path";
|
|
184
|
+
option (wix.api.required) = "AsyncPatchDataItemsByFilterRequest.field_modifications.action";
|
|
185
|
+
option (wix.api.required) = "AsyncPatchDataItemsByFilterRequest.field_modifications.action_options.increment_field_options.value";
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Removes all data items matching a filter. Runs asynchronously.
|
|
189
|
+
//
|
|
190
|
+
//
|
|
191
|
+
// This method selects all items that match the specified filter and removes each one.
|
|
192
|
+
// Unlike [Bulk Remove Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-remove-data-items), you don't need to specify individual item IDs. Instead, items are selected by filter.
|
|
193
|
+
//
|
|
194
|
+
// The operation runs asynchronously and returns a job ID for tracking status.
|
|
195
|
+
// Call [Get Async Job Status](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/get-async-job-status) with the returned job ID to poll for status.
|
|
196
|
+
//
|
|
197
|
+
// An empty `filter` removes all items in the collection.
|
|
198
|
+
//
|
|
199
|
+
// > **Notes:**
|
|
200
|
+
// > - The number of affected items is not bounded.
|
|
201
|
+
// > - If any item fails to be removed, the async job stops and its status becomes `FAILED`. Some items may already have been removed before the failure.
|
|
202
|
+
// > - Calling this method triggers the [Data Item Deleted](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-item-deleted) event for each removed item.
|
|
203
|
+
rpc AsyncRemoveDataItemsByFilter (AsyncRemoveDataItemsByFilterRequest)
|
|
204
|
+
returns (AsyncRemoveDataItemsByFilterResponse) {
|
|
205
|
+
option (wix.api.exposure) = INTERNAL;
|
|
206
|
+
option (wix.api.maturity) = BETA;
|
|
207
|
+
option (google.api.http) = {
|
|
208
|
+
post: "/v2/bulk/items/async-remove-by-filter"
|
|
209
|
+
};
|
|
210
|
+
option (wix.api.permission).name = "WIX_DATA.ASYNC_REMOVE_BY_FILTER";
|
|
211
|
+
option (wix.api.required) = "AsyncRemoveDataItemsByFilterRequest.data_collection_id";
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Retrieves the status of an async job.
|
|
215
|
+
//
|
|
216
|
+
// Returns the current status and successful item count for a job started by an async operation
|
|
217
|
+
// such as [Async Patch Data Items By Filter](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/async-patch-data-items-by-filter)
|
|
218
|
+
// or [Async Remove Data Items By Filter](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/async-remove-data-items-by-filter).
|
|
219
|
+
rpc GetAsyncJobStatus (GetAsyncJobStatusRequest)
|
|
220
|
+
returns (GetAsyncJobStatusResponse) {
|
|
221
|
+
option (wix.api.exposure) = INTERNAL;
|
|
222
|
+
option (wix.api.maturity) = BETA;
|
|
223
|
+
option (google.api.http) = {
|
|
224
|
+
get: "/v2/async-jobs/{job_id}/status"
|
|
225
|
+
};
|
|
226
|
+
option (wix.api.permission).name = "WIX_DATA.GET_ASYNC_JOB_STATUS";
|
|
227
|
+
option (wix.api.required) = "GetAsyncJobStatusRequest.job_id";
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Updates an item in a collection.
|
|
231
|
+
//
|
|
232
|
+
// Call this method when you want to replace an existing item's payload and expect the item to already exist. For different behavior, you can call:
|
|
233
|
+
//
|
|
234
|
+
// - [Patch Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/patch-data-item) to make partial field changes that keep the rest of the payload unchanged.
|
|
235
|
+
// - [Save Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/save-data-item) for upsert behavior, meaning to create the item if it doesn't exist and update it if it does.
|
|
236
|
+
//
|
|
237
|
+
// This method replaces the data item's existing data with the payload provided in `dataItem.data` in the request.
|
|
238
|
+
//
|
|
239
|
+
// To update an item, you need to specify an item ID and a collection ID.
|
|
240
|
+
// If an item is found in the specified collection with the specified ID, that item is updated.
|
|
241
|
+
// If the collection doesn't contain an item with that ID, the request fails.
|
|
242
|
+
//
|
|
243
|
+
// When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
244
|
+
//
|
|
245
|
+
// > **Note:**
|
|
246
|
+
// > After an item is updated, it only contains the fields included in the `dataItem.data` payload in the request. If the existing item has fields with values and those fields aren't included in the updated item, their values are lost.
|
|
247
|
+
rpc UpdateDataItem (UpdateDataItemRequest) returns (UpdateDataItemResponse) {
|
|
248
|
+
option (wix.api.exposure) = PUBLIC;
|
|
249
|
+
option (wix.api.maturity) = GA;
|
|
250
|
+
option (google.api.http) = {
|
|
251
|
+
put: "/v2/items/{data_item.id}",
|
|
252
|
+
additional_bindings: {
|
|
253
|
+
post: "/v2/items/update"
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
option (wix.api.permission).name = "WIX_DATA.UPDATE";
|
|
257
|
+
option (wix.api.required) = "UpdateDataItemRequest.data_collection_id";
|
|
258
|
+
option (wix.api.required) = "UpdateDataItemRequest.data_item";
|
|
259
|
+
option (wix.api.required) = "UpdateDataItemRequest.data_item.id";
|
|
260
|
+
|
|
261
|
+
option (wix.api.emits) = {
|
|
262
|
+
event_type: UPDATED
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Inserts or updates an item in a collection.
|
|
267
|
+
//
|
|
268
|
+
// Call this method when your workflow needs upsert behavior: create a new item when the ID doesn't exist yet, and update the existing item when the same ID is reused (for example, a rerunnable import or sync). For different behavior, you can call:
|
|
269
|
+
//
|
|
270
|
+
// - [Patch Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/patch-data-item) to change only specific fields and keep the rest of the existing data unchanged.
|
|
271
|
+
// - [Update Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/update-data-item) when you want the request to fail if the item doesn't already exist.
|
|
272
|
+
//
|
|
273
|
+
// This method inserts or updates the specified item, depending on whether it already exists in the collection:
|
|
274
|
+
//
|
|
275
|
+
// + If you don't provide an ID, a new item is created.
|
|
276
|
+
//
|
|
277
|
+
// + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
|
|
278
|
+
//
|
|
279
|
+
// + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
280
|
+
//
|
|
281
|
+
// > **Note:** When you provide an item with an ID that already exists in the collection, the data you provide in `dataItem.data` replaces the existing item with that ID.
|
|
282
|
+
// > This means that the item's previous fields and values are lost.
|
|
283
|
+
rpc SaveDataItem (SaveDataItemRequest) returns (SaveDataItemResponse) {
|
|
284
|
+
option (wix.api.exposure) = PUBLIC;
|
|
285
|
+
option (wix.api.maturity) = GA;
|
|
286
|
+
option (google.api.http) = {
|
|
287
|
+
post: "/v2/items/save"
|
|
288
|
+
};
|
|
289
|
+
option (wix.api.permission).name = "WIX_DATA.SAVE";
|
|
290
|
+
option (wix.api.required) = "SaveDataItemRequest.data_collection_id";
|
|
291
|
+
option (wix.api.required) = "SaveDataItemRequest.data_item";
|
|
292
|
+
|
|
293
|
+
option (wix.api.emits) = {
|
|
294
|
+
event_type: UPDATED
|
|
295
|
+
};
|
|
296
|
+
option (wix.api.emits) = {
|
|
297
|
+
event_type: CREATED
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.
|
|
302
|
+
//
|
|
303
|
+
// Choose between offset and cursor paging:
|
|
304
|
+
//
|
|
305
|
+
// - Use `query.paging` (offset) when each request needs its own `filter` or `sort`, or when you need `returnTotalCount`.
|
|
306
|
+
// - Use `query.cursorPaging` to continue an existing result set by reusing the cursor returned in `pagingMetadata.cursors`. Define `filter` and `sort` on the first request only — follow-up cursor requests should pass only the returned cursor, because `filter` and `sort` are ignored on subsequent cursor requests.
|
|
307
|
+
//
|
|
308
|
+
// For date and datetime fields, write filter values as `{"$date":"2026-05-05T00:00:00.000Z"}` (plain ISO 8601 strings are also accepted).
|
|
309
|
+
//
|
|
310
|
+
// To inline related items in each result, set `includeReferences`. If a reference or multi-reference field can contain more items than you want to inline, page the base query first and then call [Query Referenced Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/query-referenced-data-items) for the specific item and field you want to expand.
|
|
311
|
+
//
|
|
312
|
+
// Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
313
|
+
rpc QueryDataItems (QueryDataItemsRequest) returns (QueryDataItemsResponse) {
|
|
314
|
+
option (wix.api.exposure) = PUBLIC;
|
|
315
|
+
option (wix.api.maturity) = GA;
|
|
316
|
+
option (wix.api.cacheable) = {manual: true};
|
|
317
|
+
option (google.api.http) = {
|
|
318
|
+
post: "/v2/items/query",
|
|
319
|
+
additional_bindings: {
|
|
320
|
+
get: "/v2/items/query"
|
|
321
|
+
},
|
|
322
|
+
};
|
|
323
|
+
option (wix.api.permission).name = "WIX_DATA.QUERY";
|
|
324
|
+
option (wix.api.required) = "QueryDataItemsRequest.data_collection_id";
|
|
325
|
+
option (wix.api.crud) = {
|
|
326
|
+
method: QUERY
|
|
327
|
+
query_options: {
|
|
328
|
+
items_field: 'data_items'
|
|
329
|
+
paging: {
|
|
330
|
+
type: OFFSET
|
|
331
|
+
paging_metadata_field: 'paging_metadata'
|
|
332
|
+
}
|
|
333
|
+
wql: {
|
|
334
|
+
operator_field_support: {
|
|
335
|
+
operator: EQ
|
|
336
|
+
operator: GT
|
|
337
|
+
operator: GTE
|
|
338
|
+
operator: IN
|
|
339
|
+
operator: LT
|
|
340
|
+
operator: LTE
|
|
341
|
+
operator: NE
|
|
342
|
+
operator: BEGINS
|
|
343
|
+
operator: EXISTS
|
|
344
|
+
operator: HAS_ALL
|
|
345
|
+
operator: HAS_SOME
|
|
346
|
+
operator: EMPTY
|
|
347
|
+
glob: "**" // Meaning all fields including sub-fields
|
|
348
|
+
sort: BOTH // NONE|ASC|DESC|BOTH. NONE is the default.
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// Retrieves an item from a collection.
|
|
356
|
+
//
|
|
357
|
+
// Set `consistentRead` to `true` when you need to read an item back immediately after a write and want to reduce the chance of stale data.
|
|
358
|
+
rpc GetDataItem (GetDataItemRequest) returns (GetDataItemResponse) {
|
|
359
|
+
option (wix.api.exposure) = PUBLIC;
|
|
360
|
+
option (wix.api.maturity) = GA;
|
|
361
|
+
option (wix.api.cacheable) = {manual: true};
|
|
362
|
+
option (google.api.http) = {
|
|
363
|
+
get: "/v2/items/{data_item_id}",
|
|
364
|
+
additional_bindings: {
|
|
365
|
+
post: "/v2/items/get"
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
option (wix.api.permission).name = "WIX_DATA.GET";
|
|
369
|
+
option (wix.api.required) = "GetDataItemRequest.data_collection_id";
|
|
370
|
+
option (wix.api.required) = "GetDataItemRequest.data_item_id";
|
|
371
|
+
option (wix.api.crud) = {
|
|
372
|
+
method: GET_ITEM
|
|
373
|
+
get_options: {
|
|
374
|
+
item_field: "data_item"
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// Removes an item from a collection.
|
|
380
|
+
//
|
|
381
|
+
//
|
|
382
|
+
// If any items in other collections reference the removed item in reference or multi-reference fields, those fields are cleared.
|
|
383
|
+
//
|
|
384
|
+
// > **Note:**
|
|
385
|
+
// > Once an item has been removed from a collection, it can't be restored.
|
|
386
|
+
rpc RemoveDataItem (RemoveDataItemRequest) returns (RemoveDataItemResponse) {
|
|
387
|
+
option (wix.api.exposure) = PUBLIC;
|
|
388
|
+
option (wix.api.maturity) = GA;
|
|
389
|
+
option (google.api.http) = {
|
|
390
|
+
delete: "/v2/items/{data_item_id}",
|
|
391
|
+
additional_bindings: {
|
|
392
|
+
post: "/v2/items/remove"
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
option (wix.api.permission).name = "WIX_DATA.REMOVE";
|
|
396
|
+
option (wix.api.required) = "RemoveDataItemRequest.data_collection_id";
|
|
397
|
+
option (wix.api.required) = "RemoveDataItemRequest.data_item_id";
|
|
398
|
+
|
|
399
|
+
option (wix.api.emits) = {
|
|
400
|
+
event_type: DELETED
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// Removes all items from a collection.
|
|
405
|
+
//
|
|
406
|
+
//
|
|
407
|
+
// If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
408
|
+
//
|
|
409
|
+
// > **Note:**
|
|
410
|
+
// > Once items have been removed from a collection, they can't be restored.
|
|
411
|
+
rpc TruncateDataItems (TruncateDataItemsRequest) returns (TruncateDataItemsResponse) {
|
|
412
|
+
option (wix.api.exposure) = PUBLIC;
|
|
413
|
+
option (wix.api.maturity) = GA;
|
|
414
|
+
option (google.api.http) = {
|
|
415
|
+
post: "/v2/items/truncate"
|
|
416
|
+
};
|
|
417
|
+
option (wix.api.permission).name = "WIX_DATA.TRUNCATE";
|
|
418
|
+
option (wix.api.required) = "TruncateDataItemsRequest.data_collection_id";
|
|
419
|
+
|
|
420
|
+
option (wix.api.emits) = {
|
|
421
|
+
event_type: DELETED
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// Runs an aggregation on a data collection and returns the resulting list of items.
|
|
426
|
+
//
|
|
427
|
+
//
|
|
428
|
+
// An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.
|
|
429
|
+
// You can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.
|
|
430
|
+
rpc AggregateDataItems (AggregateDataItemsRequest) returns (AggregateDataItemsResponse) {
|
|
431
|
+
option (wix.api.exposure) = PUBLIC;
|
|
432
|
+
option (wix.api.maturity) = GA;
|
|
433
|
+
option (wix.api.cacheable) = {manual: true};
|
|
434
|
+
option (google.api.http) = {
|
|
435
|
+
post: "/v2/items/aggregate",
|
|
436
|
+
additional_bindings: {
|
|
437
|
+
get: "/v2/items/aggregate"
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
option (wix.api.permission).name = "WIX_DATA.AGGREGATE";
|
|
441
|
+
option (wix.api.required) = "AggregateDataItemsRequest.data_collection_id";
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// Runs an aggregation pipeline on a data collection and returns the results.
|
|
445
|
+
//
|
|
446
|
+
// Aggregations enable you to perform advanced data calculations, transformations, and groupings. While [Aggregate Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/aggregate-data-items) allows you to perform basic aggregations, Aggregate Pipeline Data Items allows you to perform advanced aggregations sequentially in stages, with each stage transforming the results of the previous stage.
|
|
447
|
+
rpc AggregatePipelineDataItems (AggregatePipelineDataItemsRequest) returns (AggregatePipelineDataItemsResponse) {
|
|
448
|
+
option (wix.api.exposure) = PUBLIC;
|
|
449
|
+
option (wix.api.maturity) = GA;
|
|
450
|
+
option (wix.api.cacheable) = {manual: true};
|
|
451
|
+
option (google.api.http) = {
|
|
452
|
+
post: "/v2/items/aggregate-pipeline",
|
|
453
|
+
additional_bindings: {
|
|
454
|
+
get: "/v2/items/aggregate-pipeline"
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
option (wix.api.permission).name = "WIX_DATA.AGGREGATE";
|
|
458
|
+
option (wix.api.required) = "AggregatePipelineDataItemsRequest.data_collection_id";
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Counts the number of items in a data collection that match the provided filtering preferences.
|
|
462
|
+
rpc CountDataItems (CountDataItemsRequest) returns (CountDataItemsResponse) {
|
|
463
|
+
option (wix.api.exposure) = PUBLIC;
|
|
464
|
+
option (wix.api.maturity) = GA;
|
|
465
|
+
option (wix.api.cacheable) = {manual: true};
|
|
466
|
+
option (google.api.http) = {
|
|
467
|
+
post: "/v2/items/count",
|
|
468
|
+
additional_bindings: {
|
|
469
|
+
get: "/v2/items/count"
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
option (wix.api.permission).name = "WIX_DATA.COUNT";
|
|
473
|
+
option (wix.api.required) = "CountDataItemsRequest.data_collection_id";
|
|
474
|
+
option (.wix.api.crud) = {
|
|
475
|
+
method: COUNT
|
|
476
|
+
count_options: {
|
|
477
|
+
inherit_wql_from: "QueryDataItems",
|
|
478
|
+
count_field: "total_count"
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
484
|
+
//
|
|
485
|
+
//
|
|
486
|
+
// As with the [Query Data Items](https://dev.wix.com/api/rest/wix-data/wix-data/data-items/query-data-items) method, this method retrieves items based on the filtering, sorting, and paging preferences you provide.
|
|
487
|
+
// However, the Query Distinct Values method doesn't return all of the full items that match the query.
|
|
488
|
+
// Rather, it returns all unique values of the field you specify in `fieldName` for items that match the query.
|
|
489
|
+
// If more than one item has the same value for that field, that value appears only once.
|
|
490
|
+
//
|
|
491
|
+
// Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
492
|
+
rpc QueryDistinctValues (QueryDistinctValuesRequest) returns (QueryDistinctValuesResponse) {
|
|
493
|
+
option (wix.api.exposure) = PUBLIC;
|
|
494
|
+
option (wix.api.maturity) = GA;
|
|
495
|
+
option (wix.api.cacheable) = {manual: true};
|
|
496
|
+
option (google.api.http) = {
|
|
497
|
+
post: "/v2/items/query-distinct-values",
|
|
498
|
+
additional_bindings: {
|
|
499
|
+
get: "/v2/items/query-distinct-values"
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
option (wix.api.permission).name = "WIX_DATA.QUERY_DISTINCT_VALUES";
|
|
503
|
+
option (wix.api.required) = "QueryDistinctValuesRequest.data_collection_id";
|
|
504
|
+
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// Adds multiple items to a collection.
|
|
508
|
+
//
|
|
509
|
+
//
|
|
510
|
+
// To add a single item, call Insert Data Item instead.
|
|
511
|
+
//
|
|
512
|
+
// When each item is inserted into a collection, its ID is automatically assigned a random value.
|
|
513
|
+
// You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
|
|
514
|
+
rpc BulkInsertDataItems (BulkInsertDataItemsRequest) returns (BulkInsertDataItemsResponse) {
|
|
515
|
+
option (wix.api.exposure) = PUBLIC;
|
|
516
|
+
option (wix.api.maturity) = GA;
|
|
517
|
+
option (google.api.http) = {
|
|
518
|
+
post: "/v2/bulk/items/insert"
|
|
519
|
+
};
|
|
520
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_INSERT";
|
|
521
|
+
option (wix.api.required) = "BulkInsertDataItemsRequest.data_collection_id";
|
|
522
|
+
option (wix.api.required) = "BulkInsertDataItemsRequest.data_items";
|
|
523
|
+
|
|
524
|
+
option (wix.api.emits) = {
|
|
525
|
+
event_type: CREATED
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Updates multiple items in a collection.
|
|
530
|
+
//
|
|
531
|
+
// Call this method when you need to replace the full payload of multiple existing items in one call. For different behavior, you can call:
|
|
532
|
+
//
|
|
533
|
+
// - [Bulk Patch Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-patch-data-items) to apply partial changes that keep unmentioned fields unchanged.
|
|
534
|
+
// - [Bulk Patch Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/bulk-patch-data-items) with `action: INCREMENT_FIELD` for atomic numeric increments or decrements, such as stock-count deltas. Don't try to express deltas with Bulk Update — replacing the full payload forces a client-side read-then-write that isn't atomic and produces incorrect results under concurrent writers.
|
|
535
|
+
// - [Save Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/save-data-item) per item for upsert behavior, when some IDs may not exist yet.
|
|
536
|
+
//
|
|
537
|
+
// This method replaces each specified data item's existing data with the payload provided in the request.
|
|
538
|
+
//
|
|
539
|
+
// Each item in the request must include an ID. If an item is found in the specified collection with
|
|
540
|
+
// the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
|
|
541
|
+
//
|
|
542
|
+
// When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
543
|
+
//
|
|
544
|
+
// > **Note:**
|
|
545
|
+
// > After each item is updated, it only contains the fields included in the request. If the existing item has fields with values and those fields
|
|
546
|
+
// > aren't included in the updated item, their values are lost.
|
|
547
|
+
rpc BulkUpdateDataItems (BulkUpdateDataItemsRequest) returns (BulkUpdateDataItemsResponse) {
|
|
548
|
+
option (wix.api.exposure) = PUBLIC;
|
|
549
|
+
option (wix.api.maturity) = GA;
|
|
550
|
+
option (google.api.http) = {
|
|
551
|
+
post: "/v2/bulk/items/update"
|
|
552
|
+
};
|
|
553
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_UPDATE";
|
|
554
|
+
option (wix.api.required) = "BulkUpdateDataItemsRequest.data_collection_id";
|
|
555
|
+
option (wix.api.required) = "BulkUpdateDataItemsRequest.data_items";
|
|
556
|
+
|
|
557
|
+
option (wix.api.emits) = {
|
|
558
|
+
event_type: UPDATED
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
// Inserts or updates multiple items in a collection.
|
|
563
|
+
//
|
|
564
|
+
//
|
|
565
|
+
// The Bulk Save Data Items method inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
|
|
566
|
+
//
|
|
567
|
+
// + If you don't provide an ID, a new item is created.
|
|
568
|
+
//
|
|
569
|
+
// + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
|
|
570
|
+
//
|
|
571
|
+
// + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
572
|
+
//
|
|
573
|
+
// > **Note:** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
|
|
574
|
+
// > This means that all of the item's previous fields and values are lost.
|
|
575
|
+
rpc BulkSaveDataItems (BulkSaveDataItemsRequest) returns (BulkSaveDataItemsResponse) {
|
|
576
|
+
option (wix.api.exposure) = PUBLIC;
|
|
577
|
+
option (wix.api.maturity) = GA;
|
|
578
|
+
option (google.api.http) = {
|
|
579
|
+
post: "/v2/bulk/items/save"
|
|
580
|
+
};
|
|
581
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_SAVE";
|
|
582
|
+
option (wix.api.required) = "BulkSaveDataItemsRequest.data_collection_id";
|
|
583
|
+
option (wix.api.required) = "BulkSaveDataItemsRequest.data_items";
|
|
584
|
+
|
|
585
|
+
option (wix.api.emits) = {
|
|
586
|
+
event_type: UPDATED
|
|
587
|
+
};
|
|
588
|
+
option (wix.api.emits) = {
|
|
589
|
+
event_type: CREATED
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// Removes multiple items from a collection.
|
|
594
|
+
//
|
|
595
|
+
// For retention or cleanup flows, first call [Query Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/query-data-items) to collect the IDs you want to remove, then pass those IDs to this method in batches.
|
|
596
|
+
//
|
|
597
|
+
// If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
598
|
+
//
|
|
599
|
+
// > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
600
|
+
rpc BulkRemoveDataItems (BulkRemoveDataItemsRequest) returns (BulkRemoveDataItemsResponse) {
|
|
601
|
+
option (wix.api.exposure) = PUBLIC;
|
|
602
|
+
option (wix.api.maturity) = GA;
|
|
603
|
+
option (google.api.http) = {
|
|
604
|
+
post: "/v2/bulk/items/remove"
|
|
605
|
+
};
|
|
606
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_REMOVE";
|
|
607
|
+
option (wix.api.required) = "BulkRemoveDataItemsRequest.data_collection_id";
|
|
608
|
+
option (wix.api.required) = "BulkRemoveDataItemsRequest.data_item_ids";
|
|
609
|
+
|
|
610
|
+
option (wix.api.emits) = {
|
|
611
|
+
event_type: DELETED
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// Retrieves the full items referenced in the specified field of an item.
|
|
616
|
+
//
|
|
617
|
+
// Call this method when a reference or multi-reference field can contain more related items than you want to inline with `includeReferences` on [Query Data Items](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/query-data-items), or when you want to expand one specific item's references after paging a base query.
|
|
618
|
+
//
|
|
619
|
+
// Reference and multi-reference fields refer to items in different collections. This method retrieves the full details of the referenced items themselves.
|
|
620
|
+
//
|
|
621
|
+
// For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
|
|
622
|
+
// Querying the **Movies** collection using this method returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
|
|
623
|
+
// This gives you information from the **People** collection about each of the actors in the specified movie.
|
|
624
|
+
rpc QueryReferencedDataItems (QueryReferencedDataItemsRequest) returns (QueryReferencedDataItemsResponse) {
|
|
625
|
+
option (wix.api.exposure) = PUBLIC;
|
|
626
|
+
option (wix.api.maturity) = GA;
|
|
627
|
+
option (wix.api.cacheable) = {manual: true};
|
|
628
|
+
option (google.api.http) = {
|
|
629
|
+
post: "/v2/items/query-referenced",
|
|
630
|
+
additional_bindings: {
|
|
631
|
+
get: "/v2/items/query-referenced"
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
option (wix.api.permission).name = "WIX_DATA.QUERY_REFERENCED";
|
|
635
|
+
option (wix.api.required) = "QueryReferencedDataItemsRequest.data_collection_id";
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
// Checks whether a field in a referring item contains a reference to a specified item.
|
|
639
|
+
rpc IsReferencedDataItem (IsReferencedDataItemRequest) returns (IsReferencedDataItemResponse) {
|
|
640
|
+
option (wix.api.exposure) = PUBLIC;
|
|
641
|
+
option (wix.api.maturity) = GA;
|
|
642
|
+
option (wix.api.cacheable) = {manual: true};
|
|
643
|
+
option (google.api.http) = {
|
|
644
|
+
post: "/v2/items/is-referenced",
|
|
645
|
+
additional_bindings: {
|
|
646
|
+
get: "/v2/items/is-referenced"
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
option (wix.api.permission).name = "WIX_DATA.IS_REFERENCED";
|
|
650
|
+
option (wix.api.required) = "IsReferencedDataItemRequest.data_collection_id";
|
|
651
|
+
option (wix.api.required) = "IsReferencedDataItemRequest.referring_item_field_name";
|
|
652
|
+
option (wix.api.required) = "IsReferencedDataItemRequest.referring_item_id";
|
|
653
|
+
option (wix.api.required) = "IsReferencedDataItemRequest.referenced_item_id";
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// Inserts a reference in the specified field in an item in a collection.
|
|
657
|
+
//
|
|
658
|
+
//
|
|
659
|
+
// A reference in the `dataItemReference` field specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
660
|
+
rpc InsertDataItemReference (InsertDataItemReferenceRequest) returns (InsertDataItemReferenceResponse) {
|
|
661
|
+
option (wix.api.exposure) = PUBLIC;
|
|
662
|
+
option (wix.api.maturity) = GA;
|
|
663
|
+
option (google.api.http) = {
|
|
664
|
+
post: "/v2/items/insert-reference"
|
|
665
|
+
};
|
|
666
|
+
option (wix.api.permission).name = "WIX_DATA.INSERT_REFERENCE";
|
|
667
|
+
option (wix.api.required) = "InsertDataItemReferenceRequest.data_collection_id";
|
|
668
|
+
option (wix.api.required) = "InsertDataItemReferenceRequest.data_item_reference.referring_item_field_name";
|
|
669
|
+
option (wix.api.required) = "InsertDataItemReferenceRequest.data_item_reference.referring_item_id";
|
|
670
|
+
option (wix.api.required) = "InsertDataItemReferenceRequest.data_item_reference.referenced_item_id";
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// Removes the specified reference from the specified field.
|
|
674
|
+
rpc RemoveDataItemReference (RemoveDataItemReferenceRequest) returns (RemoveDataItemReferenceResponse) {
|
|
675
|
+
option (wix.api.exposure) = PUBLIC;
|
|
676
|
+
option (wix.api.maturity) = GA;
|
|
677
|
+
option (google.api.http) = {
|
|
678
|
+
post: "/v2/items/remove-reference"
|
|
679
|
+
};
|
|
680
|
+
option (wix.api.permission).name = "WIX_DATA.REMOVE_REFERENCE";
|
|
681
|
+
option (wix.api.required) = "RemoveDataItemReferenceRequest.data_collection_id";
|
|
682
|
+
option (wix.api.required) = "RemoveDataItemReferenceRequest.data_item_reference";
|
|
683
|
+
option (wix.api.required) = "RemoveDataItemReferenceRequest.data_item_reference.referring_item_field_name";
|
|
684
|
+
option (wix.api.required) = "RemoveDataItemReferenceRequest.data_item_reference.referring_item_id";
|
|
685
|
+
option (wix.api.required) = "RemoveDataItemReferenceRequest.data_item_reference.referenced_item_id";
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
// Inserts one or more references in the specified fields of items in a collection.
|
|
690
|
+
//
|
|
691
|
+
//
|
|
692
|
+
// This method adds one or more references to a collection.
|
|
693
|
+
// Each new reference in the `dataItemReferences` field specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
694
|
+
rpc BulkInsertDataItemReferences (BulkInsertDataItemReferencesRequest) returns (BulkInsertDataItemReferencesResponse) {
|
|
695
|
+
option (wix.api.exposure) = PUBLIC;
|
|
696
|
+
option (wix.api.maturity) = GA;
|
|
697
|
+
option (google.api.http) = {
|
|
698
|
+
post: "/v2/bulk/items/insert-references"
|
|
699
|
+
};
|
|
700
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_INSERT_REFERENCES";
|
|
701
|
+
option (wix.api.required) = "BulkInsertDataItemReferencesRequest.data_collection_id";
|
|
702
|
+
option (wix.api.required) = "BulkInsertDataItemReferencesRequest.data_item_references";
|
|
703
|
+
option (wix.api.required) = "BulkInsertDataItemReferencesRequest.data_item_references.referring_item_field_name";
|
|
704
|
+
option (wix.api.required) = "BulkInsertDataItemReferencesRequest.data_item_references.referring_item_id";
|
|
705
|
+
option (wix.api.required) = "BulkInsertDataItemReferencesRequest.data_item_references.referenced_item_id";
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// Removes one or more references.
|
|
709
|
+
rpc BulkRemoveDataItemReferences (BulkRemoveDataItemReferencesRequest) returns (BulkRemoveDataItemReferencesResponse) {
|
|
710
|
+
option (wix.api.exposure) = PUBLIC;
|
|
711
|
+
option (wix.api.maturity) = GA;
|
|
712
|
+
option (google.api.http) = {
|
|
713
|
+
post: "/v2/bulk/items/remove-references"
|
|
714
|
+
};
|
|
715
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_REMOVE_REFERENCES";
|
|
716
|
+
option (wix.api.required) = "BulkRemoveDataItemReferencesRequest.data_collection_id";
|
|
717
|
+
option (wix.api.required) = "BulkRemoveDataItemReferencesRequest.data_item_references";
|
|
718
|
+
option (wix.api.required) = "BulkRemoveDataItemReferencesRequest.data_item_references.referring_item_field_name";
|
|
719
|
+
option (wix.api.required) = "BulkRemoveDataItemReferencesRequest.data_item_references.referring_item_id";
|
|
720
|
+
option (wix.api.required) = "BulkRemoveDataItemReferencesRequest.data_item_references.referenced_item_id";
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// Replaces references in a specified field of a specified data item.
|
|
724
|
+
//
|
|
725
|
+
//
|
|
726
|
+
// This method replaces the existing reference or references contained in the field specified in `referringItemFieldName` within the data item specified in `referringItemId`.
|
|
727
|
+
// The method removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`.
|
|
728
|
+
//
|
|
729
|
+
// > **Note:** If you pass an empty array in `newReferencedItemIds`, all existing references are removed.
|
|
730
|
+
rpc ReplaceDataItemReferences (ReplaceDataItemReferencesRequest) returns (ReplaceDataItemReferencesResponse) {
|
|
731
|
+
option (wix.api.exposure) = PUBLIC;
|
|
732
|
+
option (wix.api.maturity) = GA;
|
|
733
|
+
option (google.api.http) = {
|
|
734
|
+
post: "/v2/items/replace-references"
|
|
735
|
+
};
|
|
736
|
+
option (wix.api.permission).name = "WIX_DATA.REPLACE_REFERENCES";
|
|
737
|
+
option (wix.api.required) = "ReplaceDataItemReferencesRequest.data_collection_id";
|
|
738
|
+
option (wix.api.required) = "ReplaceDataItemReferencesRequest.referring_item_field_name";
|
|
739
|
+
option (wix.api.required) = "ReplaceDataItemReferencesRequest.referring_item_id";
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
// Searches for items in a collection on the basis of the filtering, sorting, searching, and paging preferences you provide.
|
|
744
|
+
//
|
|
745
|
+
// Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
746
|
+
//
|
|
747
|
+
// > **Notes:**
|
|
748
|
+
// > - You can only search collections [created in the CMS](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection) or with the [Data Collections API](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/introduction). Searching isn't currently supported for [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections), [external collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site) or [Wix Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-blocks).
|
|
749
|
+
// > - Filtering is only supported for fields explicitly defined in the [data collection structure](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/introduction#data-collections-and-their-structure). Fields not defined in the collection structure cannot be used for filtering.
|
|
750
|
+
// > - Searching for data items is always [eventually consistent](https://dev.wix.com/docs/rest/business-solutions/cms/eventual-consistency).
|
|
751
|
+
//
|
|
752
|
+
// ### Supported filter operators by field type
|
|
753
|
+
//
|
|
754
|
+
// Each [field type](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-type) supports a specific set of [filter operators](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#operators). Using a filter operator that's not supported for a given field type causes the search to fail.
|
|
755
|
+
//
|
|
756
|
+
// | Field Type | Supported Filter Operators |
|
|
757
|
+
// |------------|----------------------------|
|
|
758
|
+
// | Text, Image, Document, URL, Video, Audio, Time, Reference, [Page Link](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#page-link-fields), [Rich Text](https://dev.wix.com/docs/rest/articles/get-started/rich-text), [Rich Content](https://dev.wix.com/docs/ricos/getting-started/introduction), Address | `$in`, `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$isEmpty`, `$startsWith` |
|
|
759
|
+
// | Number, Date, Date and Time | `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$exists` |
|
|
760
|
+
// | Boolean | `$eq`, `$ne`, `$exists` |
|
|
761
|
+
// | Array of strings | `$hasSome`, `$hasAll`, `$exists` |
|
|
762
|
+
// | Array, Document Array, Object, Any, Media Gallery | `$exists` |
|
|
763
|
+
//
|
|
764
|
+
// Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).
|
|
765
|
+
//
|
|
766
|
+
rpc SearchDataItems (SearchDataItemsRequest) returns (SearchDataItemsResponse) {
|
|
767
|
+
option (wix.api.exposure) = PUBLIC;
|
|
768
|
+
option (wix.api.maturity) = GA;
|
|
769
|
+
option (google.api.http) = {
|
|
770
|
+
post: "/v2/items/search"
|
|
771
|
+
};
|
|
772
|
+
option (wix.api.permission).name = "WIX_DATA.SEARCH";
|
|
773
|
+
option (wix.api.required) = "SearchDataItemsRequest.data_collection_id";
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// Creates a draft copy of a published data item.
|
|
777
|
+
//
|
|
778
|
+
// The published item remains live and unchanged.
|
|
779
|
+
//
|
|
780
|
+
// If a draft with same _id already exists the request will fail.
|
|
781
|
+
//
|
|
782
|
+
// After creating the draft, edit it via [Update Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/update-data-item) or [Patch Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/patch-data-item) in the drafts collection. To put the edits live, call [Publish Data Item Draft](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/publish-data-item-draft).
|
|
783
|
+
//
|
|
784
|
+
// > **Notes:**
|
|
785
|
+
// > - The response carries the newly-created draft, not the published item.
|
|
786
|
+
// > - Returns `NOT_FOUND` if no published item exists with the supplied `dataItemId`.
|
|
787
|
+
rpc CreateDataItemDraft(CreateDataItemDraftRequest) returns (CreateDataItemDraftResponse) {
|
|
788
|
+
option (wix.api.exposure) = INTERNAL;
|
|
789
|
+
option (wix.api.maturity) = ALPHA;
|
|
790
|
+
option (google.api.http) = {
|
|
791
|
+
post: "/v2/items/create-draft"
|
|
792
|
+
};
|
|
793
|
+
option (wix.api.permission).name = "WIX_DATA.CREATE_DATA_ITEM_DRAFT";
|
|
794
|
+
option (wix.api.required) = "CreateDataItemDraftRequest.data_collection_id";
|
|
795
|
+
option (wix.api.required) = "CreateDataItemDraftRequest.data_item_id";
|
|
796
|
+
|
|
797
|
+
option (wix.api.emits) = {
|
|
798
|
+
event_type: CREATED
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// Publishes a pending draft of a data item.
|
|
803
|
+
//
|
|
804
|
+
//
|
|
805
|
+
// This method replaces the published item's data with the draft's content. On success, the draft is deleted.
|
|
806
|
+
//
|
|
807
|
+
// To create a draft for a published item, call [Save Data Item Draft](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/save-data-item-draft).
|
|
808
|
+
// To retract a published item back to draft state, call [Unpublish Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/unpublish-data-item).
|
|
809
|
+
//
|
|
810
|
+
// > **Note:** Returns `NOT_FOUND` if no pending draft exists for the supplied `dataItemId`.
|
|
811
|
+
rpc PublishDataItemDraft(PublishDataItemDraftRequest) returns (PublishDataItemDraftResponse) {
|
|
812
|
+
option (wix.api.exposure) = INTERNAL;
|
|
813
|
+
option (wix.api.maturity) = ALPHA;
|
|
814
|
+
option (google.api.http) = {
|
|
815
|
+
post: "/v2/items/publish-draft"
|
|
816
|
+
};
|
|
817
|
+
option (wix.api.permission).name = "WIX_DATA.PUBLISH_DRAFT";
|
|
818
|
+
option (wix.api.required) = "PublishDataItemDraftRequest.data_collection_id";
|
|
819
|
+
option (wix.api.required) = "PublishDataItemDraftRequest.data_item_id";
|
|
820
|
+
|
|
821
|
+
option (wix.api.emits) = {
|
|
822
|
+
event_type: UPDATED
|
|
823
|
+
};
|
|
824
|
+
option (wix.api.emits) = {
|
|
825
|
+
event_type: DELETED
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
// Publishes multiple pending drafts at once.
|
|
830
|
+
//
|
|
831
|
+
//
|
|
832
|
+
// This method publishes each draft independently and supports partial success: if some drafts cannot be published, the remaining ones are still processed. For each item, the response includes an entry in `results` with success/error details. Use `results.itemMetadata.originalIndex` to correlate response entries with the request's `dataItemIds`.
|
|
833
|
+
//
|
|
834
|
+
// Set `returnEntity` to `true` to include the published items in the response.
|
|
835
|
+
//
|
|
836
|
+
// > **Notes:**
|
|
837
|
+
// > - Each successfully published draft is deleted; the published item now contains the draft's content.
|
|
838
|
+
// > - Per-item `NOT_FOUND` is reported in the result when no pending draft exists for a given `dataItemId`.
|
|
839
|
+
// > - The order of `results` matches the order of `dataItemIds` in the request.
|
|
840
|
+
rpc BulkPublishDataItemDrafts(BulkPublishDataItemDraftsRequest) returns (BulkPublishDataItemDraftsResponse) {
|
|
841
|
+
option (wix.api.exposure) = INTERNAL;
|
|
842
|
+
option (wix.api.maturity) = ALPHA;
|
|
843
|
+
option (google.api.http) = {
|
|
844
|
+
post: "/v2/bulk/items/publish-drafts"
|
|
845
|
+
};
|
|
846
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_PUBLISH_DRAFTS";
|
|
847
|
+
option (wix.api.required) = "BulkPublishDataItemDraftsRequest.data_collection_id";
|
|
848
|
+
option (wix.api.required) = "BulkPublishDataItemDraftsRequest.data_item_ids";
|
|
849
|
+
|
|
850
|
+
option (wix.api.emits) = {
|
|
851
|
+
event_type: UPDATED
|
|
852
|
+
};
|
|
853
|
+
option (wix.api.emits) = {
|
|
854
|
+
event_type: DELETED
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
// Retracts a published data item back to draft state.
|
|
859
|
+
//
|
|
860
|
+
//
|
|
861
|
+
// This method removes the published copy of the item and creates a draft seeded with the previously-published data. Use it to take a published item offline so it can be edited.
|
|
862
|
+
//
|
|
863
|
+
// After unpublishing, edit the resulting draft via [Update Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/update-data-item) or [Patch Data Item](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/patch-data-item) in drafts collection. To put the item back live, call [Publish Data Item Draft](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/publish-data-item-draft).
|
|
864
|
+
//
|
|
865
|
+
// > **Notes:**
|
|
866
|
+
// > - If a pending draft already exists for the supplied `dataItemId`, it is silently overwritten with the previously-published data.
|
|
867
|
+
// > - The response carries the newly-created (or overwritten) draft, not the previously-published item.
|
|
868
|
+
// > - Returns `NOT_FOUND` if no published item exists with the supplied `dataItemId`.
|
|
869
|
+
rpc UnpublishDataItem(UnpublishDataItemRequest) returns (UnpublishDataItemResponse) {
|
|
870
|
+
option (wix.api.exposure) = INTERNAL;
|
|
871
|
+
option (wix.api.maturity) = ALPHA;
|
|
872
|
+
option (google.api.http) = {
|
|
873
|
+
post: "/v2/items/unpublish"
|
|
874
|
+
};
|
|
875
|
+
option (wix.api.permission).name = "WIX_DATA.UNPUBLISH";
|
|
876
|
+
option (wix.api.required) = "UnpublishDataItemRequest.data_collection_id";
|
|
877
|
+
option (wix.api.required) = "UnpublishDataItemRequest.data_item_id";
|
|
878
|
+
|
|
879
|
+
option (wix.api.emits) = {
|
|
880
|
+
event_type: UPDATED
|
|
881
|
+
};
|
|
882
|
+
option (wix.api.emits) = {
|
|
883
|
+
event_type: DELETED
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// Retracts multiple published data items back to draft state.
|
|
888
|
+
//
|
|
889
|
+
//
|
|
890
|
+
// This method unpublishes each item independently and supports partial success: if some items cannot be unpublished, the remaining ones are still processed. For each item, the response includes an entry in `results` with success/error details. Use `results.itemMetadata.originalIndex` to correlate response entries with the request's `dataItemIds`.
|
|
891
|
+
//
|
|
892
|
+
// Set `returnEntity` to `true` to include the resulting drafts in the response.
|
|
893
|
+
//
|
|
894
|
+
// > **Notes:**
|
|
895
|
+
// > - For each successfully unpublished item, the published copy is removed and a draft (seeded with the previously-published data) is created or, if a draft already exists, overwritten.
|
|
896
|
+
// > - Per-item `NOT_FOUND` is reported in the result when no published item exists for a given `dataItemId`.
|
|
897
|
+
// > - The order of `results` matches the order of `dataItemIds` in the request.
|
|
898
|
+
rpc BulkUnpublishDataItems(BulkUnpublishDataItemsRequest) returns (BulkUnpublishDataItemsResponse) {
|
|
899
|
+
option (wix.api.exposure) = INTERNAL;
|
|
900
|
+
option (wix.api.maturity) = ALPHA;
|
|
901
|
+
option (google.api.http) = {
|
|
902
|
+
post: "/v2/bulk/items/unpublish"
|
|
903
|
+
};
|
|
904
|
+
option (wix.api.permission).name = "WIX_DATA.BULK_UNPUBLISH";
|
|
905
|
+
option (wix.api.required) = "BulkUnpublishDataItemsRequest.data_collection_id";
|
|
906
|
+
option (wix.api.required) = "BulkUnpublishDataItemsRequest.data_item_ids";
|
|
907
|
+
|
|
908
|
+
option (wix.api.emits) = {
|
|
909
|
+
event_type: UPDATED
|
|
910
|
+
};
|
|
911
|
+
option (wix.api.emits) = {
|
|
912
|
+
event_type: DELETED
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
}
|