@wix/bex-utils 2.93.0 → 2.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/@wix/ambassador-os-tags-v1-tag/README.md +34 -0
  2. package/@wix/ambassador-os-tags-v1-tag/builders/package.json +3 -3
  3. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/builders.impl.d.ts +44 -23
  4. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/builders.impl.js +385 -145
  5. package/@wix/ambassador-os-tags-v1-tag/cjs/build/builders.impl.js.map +1 -0
  6. package/@wix/ambassador-os-tags-v1-tag/cjs/build/crud/http.impl.d.ts +9 -0
  7. package/@wix/ambassador-os-tags-v1-tag/cjs/build/crud/http.impl.js +16 -0
  8. package/@wix/ambassador-os-tags-v1-tag/cjs/build/crud/http.impl.js.map +1 -0
  9. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/crud/rpc.impl.d.ts +7 -5
  10. package/@wix/ambassador-os-tags-v1-tag/cjs/build/crud/rpc.impl.js +50 -0
  11. package/@wix/ambassador-os-tags-v1-tag/cjs/build/crud/rpc.impl.js.map +1 -0
  12. package/@wix/ambassador-os-tags-v1-tag/cjs/build/http.impl.d.ts +42 -0
  13. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/http.impl.js +287 -13
  14. package/@wix/ambassador-os-tags-v1-tag/cjs/build/http.impl.js.map +1 -0
  15. package/@wix/ambassador-os-tags-v1-tag/cjs/build/meta.impl.d.ts +46 -0
  16. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/meta.impl.js +166 -20
  17. package/@wix/ambassador-os-tags-v1-tag/cjs/build/meta.impl.js.map +1 -0
  18. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/proto/client/proto-generated.d.ts +2520 -0
  19. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/proto/proto-generated.d.ts +1267 -0
  20. package/@wix/ambassador-os-tags-v1-tag/cjs/build/proto/proto-generated.js +1 -0
  21. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/proto/server/proto-generated.d.ts +2529 -22
  22. package/@wix/ambassador-os-tags-v1-tag/cjs/build/rpc.impl.d.ts +49 -0
  23. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/rpc.impl.js +133 -21
  24. package/@wix/ambassador-os-tags-v1-tag/cjs/build/rpc.impl.js.map +1 -0
  25. package/@wix/ambassador-os-tags-v1-tag/{build/es → cjs/build}/types.impl.d.ts +382 -170
  26. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/types.impl.js +14 -9
  27. package/@wix/ambassador-os-tags-v1-tag/cjs/build/types.impl.js.map +1 -0
  28. package/@wix/ambassador-os-tags-v1-tag/cjs/package.json +3 -0
  29. package/@wix/ambassador-os-tags-v1-tag/crud/http/package.json +3 -3
  30. package/@wix/ambassador-os-tags-v1-tag/crud/rpc/package.json +2 -2
  31. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/builders.impl.d.ts +44 -23
  32. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/builders.impl.js +327 -111
  33. package/@wix/ambassador-os-tags-v1-tag/es/build/builders.impl.js.map +1 -0
  34. package/@wix/ambassador-os-tags-v1-tag/es/build/crud/http.impl.d.ts +9 -0
  35. package/@wix/ambassador-os-tags-v1-tag/es/build/crud/http.impl.js +12 -0
  36. package/@wix/ambassador-os-tags-v1-tag/es/build/crud/http.impl.js.map +1 -0
  37. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/crud/rpc.impl.d.ts +7 -5
  38. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/crud/rpc.impl.js +12 -4
  39. package/@wix/ambassador-os-tags-v1-tag/es/build/crud/rpc.impl.js.map +1 -0
  40. package/@wix/ambassador-os-tags-v1-tag/es/build/http.impl.d.ts +42 -0
  41. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/http.impl.js +270 -2
  42. package/@wix/ambassador-os-tags-v1-tag/es/build/http.impl.js.map +1 -0
  43. package/@wix/ambassador-os-tags-v1-tag/es/build/meta.impl.d.ts +46 -0
  44. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/meta.impl.js +127 -1
  45. package/@wix/ambassador-os-tags-v1-tag/es/build/meta.impl.js.map +1 -0
  46. package/@wix/ambassador-os-tags-v1-tag/es/build/proto/client/proto-generated.d.ts +12332 -0
  47. package/@wix/ambassador-os-tags-v1-tag/es/build/proto/client/proto-generated.js +5 -0
  48. package/@wix/ambassador-os-tags-v1-tag/es/build/proto/proto-generated.d.ts +6182 -0
  49. package/@wix/ambassador-os-tags-v1-tag/es/build/proto/proto-generated.js +1 -0
  50. package/@wix/ambassador-os-tags-v1-tag/es/build/proto/server/proto-generated.d.ts +12307 -0
  51. package/@wix/ambassador-os-tags-v1-tag/es/build/proto/server/proto-generated.js +5 -0
  52. package/@wix/ambassador-os-tags-v1-tag/es/build/rpc.impl.d.ts +49 -0
  53. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/rpc.impl.js +93 -1
  54. package/@wix/ambassador-os-tags-v1-tag/es/build/rpc.impl.js.map +1 -0
  55. package/@wix/ambassador-os-tags-v1-tag/{build/cjs → es/build}/types.impl.d.ts +382 -170
  56. package/@wix/ambassador-os-tags-v1-tag/{build/es → es/build}/types.impl.js +12 -7
  57. package/@wix/ambassador-os-tags-v1-tag/es/build/types.impl.js.map +1 -0
  58. package/@wix/ambassador-os-tags-v1-tag/http/package.json +3 -3
  59. package/@wix/ambassador-os-tags-v1-tag/meta/package.json +3 -3
  60. package/@wix/ambassador-os-tags-v1-tag/package.json +68 -13
  61. package/@wix/ambassador-os-tags-v1-tag/rpc/package.json +2 -2
  62. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/com/wixpress/iptf/webhooks/debug.proto +34 -0
  63. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/com/wixpress/iptf/webhooks/kv.proto +42 -0
  64. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/com/wixpress/iptf/webhooks/message_envelope.proto +54 -0
  65. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/src/main/proto/com/wixpress/items_selection/spi/v1/items_selection_config.proto +3 -0
  66. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/webhooks_debug_service.proto +32 -0
  67. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/webhooks_sync_service.proto +33 -0
  68. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/api/annotations.proto +111 -3
  69. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/api/callback.proto +10 -0
  70. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/api/entity.proto +6 -0
  71. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/api/permissions.proto +6 -0
  72. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/api/subscription.proto +1 -1
  73. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/api/validations.proto +5 -0
  74. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/common/domainevents/attributeupdated.proto +20 -0
  75. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/common/domainevents/domainevents.proto +112 -0
  76. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/common/query.proto +69 -0
  77. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/tag.proto +12 -0
  78. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/tags_account_service.proto +43 -3
  79. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/tags_global_service.proto +171 -0
  80. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/tags_service.proto +49 -3
  81. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/upstream/wix/common/bulk.proto +69 -0
  82. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/upstream/wix/common/paging.proto +121 -0
  83. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/upstream/wix/common/query.proto +771 -0
  84. package/@wix/ambassador-os-tags-v1-tag/src/main/proto/wix/os/v1/upstream/wix/common/sorting.proto +27 -0
  85. package/@wix/ambassador-os-tags-v1-tag/types/package.json +3 -3
  86. package/package.json +3 -3
  87. package/@wix/ambassador-os-tags-v1-tag/build/cjs/builders.impl.js.map +0 -1
  88. package/@wix/ambassador-os-tags-v1-tag/build/cjs/crud/http.impl.d.ts +0 -1
  89. package/@wix/ambassador-os-tags-v1-tag/build/cjs/crud/http.impl.js +0 -5
  90. package/@wix/ambassador-os-tags-v1-tag/build/cjs/crud/http.impl.js.map +0 -1
  91. package/@wix/ambassador-os-tags-v1-tag/build/cjs/crud/rpc.impl.js +0 -41
  92. package/@wix/ambassador-os-tags-v1-tag/build/cjs/crud/rpc.impl.js.map +0 -1
  93. package/@wix/ambassador-os-tags-v1-tag/build/cjs/http.impl.d.ts +0 -26
  94. package/@wix/ambassador-os-tags-v1-tag/build/cjs/http.impl.js.map +0 -1
  95. package/@wix/ambassador-os-tags-v1-tag/build/cjs/meta.impl.d.ts +0 -33
  96. package/@wix/ambassador-os-tags-v1-tag/build/cjs/meta.impl.js.map +0 -1
  97. package/@wix/ambassador-os-tags-v1-tag/build/cjs/proto/proto-generated.js +0 -83454
  98. package/@wix/ambassador-os-tags-v1-tag/build/cjs/rpc.impl.d.ts +0 -34
  99. package/@wix/ambassador-os-tags-v1-tag/build/cjs/rpc.impl.js.map +0 -1
  100. package/@wix/ambassador-os-tags-v1-tag/build/cjs/types.impl.js.map +0 -1
  101. package/@wix/ambassador-os-tags-v1-tag/build/es/builders.impl.js.map +0 -1
  102. package/@wix/ambassador-os-tags-v1-tag/build/es/crud/http.impl.d.ts +0 -1
  103. package/@wix/ambassador-os-tags-v1-tag/build/es/crud/http.impl.js +0 -2
  104. package/@wix/ambassador-os-tags-v1-tag/build/es/crud/http.impl.js.map +0 -1
  105. package/@wix/ambassador-os-tags-v1-tag/build/es/crud/rpc.impl.js.map +0 -1
  106. package/@wix/ambassador-os-tags-v1-tag/build/es/http.impl.d.ts +0 -26
  107. package/@wix/ambassador-os-tags-v1-tag/build/es/http.impl.js.map +0 -1
  108. package/@wix/ambassador-os-tags-v1-tag/build/es/meta.impl.d.ts +0 -33
  109. package/@wix/ambassador-os-tags-v1-tag/build/es/meta.impl.js.map +0 -1
  110. package/@wix/ambassador-os-tags-v1-tag/build/es/rpc.impl.d.ts +0 -34
  111. package/@wix/ambassador-os-tags-v1-tag/build/es/rpc.impl.js.map +0 -1
  112. package/@wix/ambassador-os-tags-v1-tag/build/es/types.impl.js.map +0 -1
  113. /package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/proto/client/proto-generated.js +0 -0
  114. /package/@wix/ambassador-os-tags-v1-tag/{build/cjs → cjs/build}/proto/server/proto-generated.js +0 -0
@@ -0,0 +1,112 @@
1
+ //flynt-disable renamed-field-breaking-change, missing-string-validations
2
+ syntax = "proto3";
3
+ import "google/protobuf/timestamp.proto";
4
+ import "google/protobuf/struct.proto";
5
+ import "google/protobuf/wrappers.proto";
6
+ import "wix/api/annotations.proto";
7
+
8
+ package wix.common.domainevents;
9
+
10
+
11
+ option java_multiple_files = true;
12
+ option java_package = "com.wix.common.domainevents";
13
+
14
+ message EntityCreatedEvent {
15
+ string entity_as_json = 2 [(wix.api.pii) = true];
16
+
17
+ // Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
18
+ google.protobuf.BoolValue triggered_by_undelete = 3 [(.wix.api.field_exposure) = PRIVATE];
19
+
20
+ // Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
21
+ RestoreInfo restore_info = 4;
22
+
23
+ // Optional domain-specific metadata defined by the API owner, encoded as JSON.
24
+ google.protobuf.StringValue additional_metadata_as_json = 5 [(wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE];
25
+ }
26
+
27
+ message EntityUpdatedEvent {
28
+ // Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
29
+ // This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
30
+ // We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
31
+ string current_entity_as_json = 2 [(wix.api.pii) = true];
32
+
33
+ // This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
34
+ // wont populate it / have any reference to it in the API.
35
+ // The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
36
+ // the developer should send only the new (current) entity.
37
+ // An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
38
+ //Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
39
+ google.protobuf.StringValue previous_entity_as_json = 3 [(wix.api.pii) = true, deprecated = true, (.wix.api.field_exposure) = INTERNAL];
40
+
41
+ reserved 4;
42
+
43
+ // Map of fully qualified field paths to their previous values for fields that changed.
44
+ // For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
45
+ map<string, google.protobuf.Value> modified_fields = 5 [(wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE];
46
+
47
+ // Optional domain-specific metadata defined by the API owner, encoded as JSON.
48
+ google.protobuf.StringValue additional_metadata_as_json = 6 [(wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE];
49
+ }
50
+
51
+ message EntityDeletedEvent {
52
+ // Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
53
+ google.protobuf.BoolValue moved_to_trash = 1 [(.wix.api.field_exposure) = PRIVATE];
54
+
55
+ // Entity that was deleted.
56
+ google.protobuf.StringValue deleted_entity_as_json = 2 [(wix.api.pii) = true];
57
+
58
+ // Optional domain-specific metadata defined by the API owner, encoded as JSON.
59
+ google.protobuf.StringValue additional_metadata_as_json = 3 [(wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE];
60
+ }
61
+
62
+ message ActionEvent {
63
+ string body_as_json = 2 [(wix.api.pii) = true];
64
+ }
65
+
66
+ message DomainEvent {
67
+ option (.wix.api.decomposition_minimum_fields) = {
68
+ field: "id"
69
+ field: "entity_fqdn"
70
+ field: "slug"
71
+ field: "entity_id"
72
+ field: "event_time"
73
+ };
74
+ // Event ID. With this ID you can easily spot duplicated events and ignore them.
75
+ string id = 1;
76
+ // Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
77
+ // For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
78
+ string entity_fqdn = 2;
79
+ // Event action name, placed at the top level to make it easier for users to dispatch messages.
80
+ // For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
81
+ string slug = 3;
82
+ // ID of the entity associated with the event.
83
+ string entity_id = 4;
84
+ oneof body {
85
+ EntityCreatedEvent created_event = 5;
86
+ EntityUpdatedEvent updated_event = 6;
87
+ EntityDeletedEvent deleted_event = 7;
88
+ ActionEvent action_event = 8;
89
+ }
90
+ reserved 12;
91
+ // Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
92
+ google.protobuf.Timestamp event_time = 9;
93
+ // Whether the event was triggered as a result of a privacy regulation application
94
+ // (for example, GDPR).
95
+ google.protobuf.BoolValue triggered_by_anonymize_request = 10;
96
+
97
+ // If present, indicates the action that triggered the event.
98
+ google.protobuf.StringValue originated_from = 11;
99
+
100
+ // A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
101
+ // You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
102
+ google.protobuf.Int64Value entity_event_sequence = 13;
103
+ }
104
+
105
+ // Used for batch consumers
106
+ message DomainEvents {
107
+ repeated DomainEvent domain_events = 1;
108
+ }
109
+
110
+ message RestoreInfo {
111
+ google.protobuf.Timestamp deleted_date = 1;
112
+ }
@@ -178,6 +178,19 @@ message SearchRelatedDetails {
178
178
  repeated string fields = 3 [(.wix.api.maxLength) = 200, (.wix.api.maxSize) = 20];
179
179
  }
180
180
 
181
+ message SearchSuggest {
182
+ SearchSuggestDetails suggest = 1; // Suggest details.
183
+ repeated Sorting sort = 2 [(.wix.api.maxSize) = 10]; // Sorting of suggested documents.
184
+ google.protobuf.Struct filter = 3; // Filter in platformized query language (for example) {'field': {'$eq': 'value'}}.
185
+ google.protobuf.Int32Value limit = 4 [(.wix.api.max) = 100]; // Limit of suggested documents to return, defaults to 10.
186
+ }
187
+
188
+ message SearchSuggestDetails {
189
+ // Search query to suggest for.
190
+ string expression = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];
191
+ // Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.
192
+ repeated string fields = 2 [(.wix.api.maxLength) = 200, (.wix.api.maxSize) = 20];
193
+ }
181
194
 
182
195
  message SearchDetails {
183
196
  enum Mode {
@@ -354,6 +367,11 @@ message AggregationData {
354
367
  double value = 2; // Value of the scalar aggregation.
355
368
  }
356
369
 
370
+ message ScalarDateResult {
371
+ ScalarType type = 1; // Type of scalar date aggregation. Possible values: `MIN`, `MAX`.
372
+ string value = 2 [(.wix.api.maxLength) = 100]; // Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
373
+ }
374
+
357
375
  message GroupByValueResults {
358
376
  message NestedValueAggregationResult {
359
377
  string value = 1 [(.wix.api.maxLength) = 1000]; // Value of the field.
@@ -390,12 +408,17 @@ message AggregationData {
390
408
  double value = 1; // Value of the scalar aggregation.
391
409
  }
392
410
 
411
+ message ScalarDateResult {
412
+ string value = 1 [(.wix.api.maxLength) = 100]; // Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
413
+ }
414
+
393
415
  message NestedResultValue {
394
416
  oneof result {
395
417
  ValueResult value = 1; // Value aggregation result.
396
418
  RangeResult range = 2; // Range aggregation result.
397
419
  ScalarResult scalar = 3; // Scalar aggregation result.
398
420
  ValueResult date_histogram = 4; // Date histogram aggregation result.
421
+ ScalarDateResult scalar_date = 5; // Scalar date aggregation result.
399
422
  }
400
423
  }
401
424
 
@@ -424,6 +447,7 @@ message AggregationData {
424
447
  GroupByValueResults grouped_by_value = 7; // Group by value aggregation results.
425
448
  DateHistogramResults date_histogram = 8; // Date histogram aggregation results.
426
449
  NestedResults nested = 9; // Nested aggregation results.
450
+ ScalarDateResult scalar_date = 10; // Date aggregation results.
427
451
  }
428
452
  }
429
453
 
@@ -604,6 +628,51 @@ message ProductSearchResponse {
604
628
  products: [...]
605
629
  }
606
630
 
631
+ // example Scalar date type Request:
632
+ {
633
+ search: {
634
+ expression: "term"
635
+ },
636
+ aggregations: [
637
+ {
638
+ name: "my-scalar-aggregation-on-date",
639
+ type: "SCALAR",
640
+ fieldPath: "path.to.date.field",
641
+ scalar: {
642
+ type: "MAX"
643
+ }
644
+ }
645
+ ]
646
+ }
647
+
648
+ // example Scalar type Response:
649
+ {
650
+ aggregations: {
651
+ results: [
652
+ {
653
+ name: "my-scalar-aggregation-on-date",
654
+ type: "SCALAR",
655
+ field_path: "path.to.date.field",
656
+ scalar_date: {
657
+ type: "MAX",
658
+ value: "2019-02-25T00:00:00.000Z"
659
+ }
660
+ }
661
+ ]
662
+ },
663
+ metadata: {
664
+ items: 25,
665
+ offset: 25,
666
+ total: 420,
667
+ tooManyToCount: false,
668
+ cursors: {
669
+ next: "SOMEHASHFORNEXT",
670
+ prev: "SOMEHASHFORPREV"
671
+ }
672
+ },
673
+ products: [...]
674
+ }
675
+
607
676
  // example Group By Aggregation Request:
608
677
  {
609
678
  "filter" : {
@@ -22,6 +22,18 @@ message Tag {
22
22
  domain_events: {
23
23
  deleted_include_entity: true
24
24
  }
25
+ query_options: {
26
+ wql: {
27
+ pattern: {
28
+ operator: ALL_APPLICABLE_OPERATORS
29
+ field: "id"
30
+ field: "created_date"
31
+ field: "updated_date"
32
+ field: "name"
33
+ sort: BOTH
34
+ }
35
+ }
36
+ }
25
37
  };
26
38
 
27
39
  // Tag ID.
@@ -11,18 +11,18 @@ import "wix/api/entity.proto";
11
11
  import "wix/api/permissions.proto";
12
12
  import "wix/api/callback.proto";
13
13
  import "wix/http/field_mask.proto";
14
- import "wix/common/query.proto";
15
- import "wix/common/paging.proto";
16
14
  import "wix/os/v1/tag.proto";
17
15
  import "wix/os/v1/tag_exposure.proto";
18
16
  import "wix/api/errors.proto";
19
17
  import "wix/api/api_errors.proto";
18
+ import "wix/os/v1/upstream/wix/common/query.proto";
19
+ import "wix/os/v1/upstream/wix/common/paging.proto";
20
20
 
21
21
  /**
22
22
  Manages Tags
23
23
  */
24
24
  service TagsAccountService {
25
- option (wix.api.service_maturity) = BETA;
25
+ option (wix.api.service_maturity) = GA;
26
26
  option (wix.api.service_exposure) = PUBLIC;
27
27
  option (wix.api.service_entity).message = "wix.os.v1.Tag";
28
28
 
@@ -42,21 +42,25 @@ service TagsAccountService {
42
42
  event_type: CREATED
43
43
  };
44
44
 
45
+ // Couldn't find the FQDN.
45
46
  option (.wix.api.error) = {
46
47
  http_code: NOT_FOUND
47
48
  application_code: "FQDN_NOT_FOUND"
48
49
  };
49
50
 
51
+ // There is already a tag with this name.
50
52
  option (.wix.api.error) = {
51
53
  http_code: ALREADY_EXISTS
52
54
  application_code: "TAG_NAME_ALREADY_EXISTS"
53
55
  };
54
56
 
57
+ // Number of tags exceeds the server's limit.
55
58
  option (.wix.api.error) = {
56
59
  http_code: RESOURCE_EXHAUSTED
57
60
  application_code: "TAGS_REACHED_LIMIT"
58
61
  };
59
62
 
63
+ // Failed to generate a unique tag ID.
60
64
  option (.wix.api.error) = {
61
65
  http_code: INTERNAL
62
66
  application_code: "CREATE_ID_EXHAUSTED_RETRY_ATTEMPTS"
@@ -112,6 +116,22 @@ service TagsAccountService {
112
116
  option (wix.api.permission).name = "TAGS.ACCOUNT_TAG_READ";
113
117
  option (wix.api.required) = "ListTagsForAccountRequest.fqdn";
114
118
  }
119
+
120
+ /**
121
+ Retrieves a list of tags.
122
+ */
123
+ rpc QueryTagsForAccount (QueryTagsForAccountRequest) returns (QueryTagsForAccountResponse) {
124
+ option (google.api.http) = {
125
+ post: "/v1/account/tags/query"
126
+ additional_bindings : {
127
+ get: "/v1/account/tags/query";
128
+ }
129
+ };
130
+ option (wix.api.permission).name = "TAGS.ACCOUNT_TAG_READ";
131
+ option (wix.api.required) = "QueryTagsForAccountRequest.fqdn";
132
+ option (wix.api.required) = "QueryTagsForAccountRequest.query";
133
+ }
134
+
115
135
  }
116
136
 
117
137
 
@@ -165,3 +185,23 @@ message ListTagsForAccountResponse {
165
185
  // A list of tags.
166
186
  repeated Tag tags = 1;
167
187
  }
188
+
189
+ message QueryTagsForAccountRequest {
190
+ // The Fully Qualified Domain Name (FQDN) to which the tags are associated. Currently supports only eCommerce Orders: `wix.ecom.v1.order`.
191
+ string fqdn = 1 [(wix.api.maxLength) = 255];
192
+
193
+ // The tag exposure.
194
+ TagExposure exposure = 2 [(wix.api.field_exposure) = INTERNAL];
195
+
196
+ // WQL expression.
197
+ wix.os.v1.upstream.wix.common.CursorQuery query = 3;
198
+ }
199
+
200
+ message QueryTagsForAccountResponse {
201
+ // A list of tags.
202
+ repeated Tag tags = 1;
203
+
204
+ // Paging metadata
205
+ wix.os.v1.upstream.wix.common.CursorPagingMetadata paging_metadata = 2;
206
+ }
207
+
@@ -0,0 +1,171 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.os.v1;
4
+ option java_package = "com.wixpress.os.v1";
5
+
6
+ import "google/protobuf/field_mask.proto";
7
+ import "google/api/annotations.proto";
8
+ import "wix/api/annotations.proto";
9
+ import "wix/api/validations.proto";
10
+ import "wix/api/entity.proto";
11
+ import "wix/api/permissions.proto";
12
+ import "wix/api/callback.proto";
13
+ import "wix/http/field_mask.proto";
14
+ import "wix/common/query.proto";
15
+ import "wix/common/paging.proto";
16
+ import "wix/os/v1/tag.proto";
17
+ import "wix/os/v1/tag_exposure.proto";
18
+ import "wix/api/errors.proto";
19
+ import "wix/api/api_errors.proto";
20
+
21
+ /**
22
+ Manages Global Tags
23
+ */
24
+ service TagsGlobalService {
25
+ option (wix.api.service_maturity) = GA;
26
+ option (wix.api.service_exposure) = PUBLIC;
27
+ option (wix.api.service_entity).message = "wix.os.v1.Tag";
28
+
29
+ /**
30
+ Creates a global tag.
31
+ */
32
+ // flynt-disable crud-add-create-annotation
33
+ rpc CreateGlobalTag (CreateGlobalTagRequest) returns (CreateGlobalTagResponse) {
34
+ option (google.api.http).post = "/v1/global/tags";
35
+ option (wix.api.permission).name = "TAGS.GLOBAL_TAG_CREATE";
36
+ option (wix.api.required) = "CreateGlobalTagRequest.tag";
37
+ option (wix.api.required) = "CreateGlobalTagRequest.tag.fqdn";
38
+ option (wix.api.required) = "CreateGlobalTagRequest.tag.exposure";
39
+ option (wix.api.required) = "CreateGlobalTagRequest.tag.name";
40
+
41
+ option (wix.api.callback) = {
42
+ event_type: CREATED
43
+ };
44
+
45
+ // Couldn't find the FQDN.
46
+ option (.wix.api.error) = {
47
+ http_code: NOT_FOUND
48
+ application_code: "FQDN_NOT_FOUND"
49
+ };
50
+
51
+ // There is already a tag with this name.
52
+ option (.wix.api.error) = {
53
+ http_code: ALREADY_EXISTS
54
+ application_code: "TAG_NAME_ALREADY_EXISTS"
55
+ };
56
+
57
+ // Number of tags exceeds the server's limit.
58
+ option (.wix.api.error) = {
59
+ http_code: RESOURCE_EXHAUSTED
60
+ application_code: "TAGS_REACHED_LIMIT"
61
+ };
62
+
63
+ // Failed to generate a unique tag ID.
64
+ option (.wix.api.error) = {
65
+ http_code: INTERNAL
66
+ application_code: "CREATE_ID_EXHAUSTED_RETRY_ATTEMPTS"
67
+ };
68
+ }
69
+
70
+ /**
71
+ Retrieves a global tag.
72
+ */
73
+ // flynt-disable crud-add-get-annotation
74
+ rpc GetGlobalTag (GetGlobalTagRequest) returns (GetGlobalTagResponse) {
75
+ option (google.api.http).get = "/v1/global/tags/{tag_id}";
76
+ option (wix.api.permission).name = "TAGS.GLOBAL_TAG_READ";
77
+ option (wix.api.required) = "GetGlobalTagRequest.tag_id";
78
+ }
79
+
80
+ /**
81
+ Updates a global tag.
82
+ */
83
+ // flynt-disable crud-add-update-annotation
84
+ rpc UpdateGlobalTag (UpdateGlobalTagRequest) returns (UpdateGlobalTagResponse) {
85
+ option (google.api.http).patch = "/v1/global/tags/{tag.id}";
86
+ option (wix.api.permission).name = "TAGS.GLOBAL_TAG_UPDATE";
87
+ option (wix.api.required) = "UpdateGlobalTagRequest.tag";
88
+ option (wix.api.required) = "UpdateGlobalTagRequest.tag.id";
89
+ option (wix.api.required) = "UpdateGlobalTagRequest.tag.revision";
90
+ option (wix.api.required) = "UpdateGlobalTagRequest.tag.name";
91
+
92
+ option (wix.api.callback) = {
93
+ event_type: UPDATED
94
+ };
95
+ }
96
+
97
+ /**
98
+ Deletes a global tag.
99
+ */
100
+ // flynt-disable crud-add-delete-annotation
101
+ rpc DeleteGlobalTag (DeleteGlobalTagRequest) returns (DeleteGlobalTagResponse) {
102
+ option (google.api.http).delete = "/v1/global/tags/{tag_id}";
103
+ option (wix.api.permission).name = "TAGS.GLOBAL_TAG_DELETE";
104
+ option (wix.api.required) = "DeleteGlobalTagRequest.tag_id";
105
+
106
+ option (wix.api.callback) = {
107
+ event_type: DELETED
108
+ };
109
+ }
110
+
111
+ /**
112
+ Retrieves a list of global tags.
113
+ */
114
+ rpc ListGlobalTags (ListGlobalTagsRequest) returns (ListGlobalTagsResponse) {
115
+ option (google.api.http).get = "/v1/global/tags";
116
+ option (wix.api.permission).name = "TAGS.GLOBAL_TAG_READ";
117
+ option (wix.api.required) = "ListGlobalTagsRequest.fqdn";
118
+ }
119
+ }
120
+
121
+
122
+ message CreateGlobalTagRequest {
123
+ // The tag to be created.
124
+ Tag tag = 1;
125
+ }
126
+
127
+ message CreateGlobalTagResponse {
128
+ // The created tag.
129
+ Tag tag = 1;
130
+ }
131
+
132
+ message GetGlobalTagRequest {
133
+ // The ID of the tag to retrieve.
134
+ string tag_id = 1 [(wix.api.maxLength) = 5];
135
+ }
136
+
137
+ message GetGlobalTagResponse {
138
+ // The requested tag.
139
+ Tag tag = 1;
140
+ }
141
+
142
+ message UpdateGlobalTagRequest {
143
+ // The tag to be updated, which may be partial.
144
+ Tag tag = 1;
145
+ }
146
+
147
+ message UpdateGlobalTagResponse {
148
+ // The updated tag.
149
+ Tag tag = 1;
150
+ }
151
+
152
+ message DeleteGlobalTagRequest {
153
+ // ID of the tag to delete.
154
+ string tag_id = 1 [(wix.api.maxLength) = 5];
155
+ }
156
+
157
+ message DeleteGlobalTagResponse {
158
+ }
159
+
160
+ message ListGlobalTagsRequest {
161
+ // The Fully Qualified Domain Name (FQDN) to which the tags are associated.
162
+ string fqdn = 1 [(wix.api.maxLength) = 255];
163
+
164
+ // The tag exposure.
165
+ TagExposure exposure = 2 [(wix.api.field_exposure) = INTERNAL];
166
+ }
167
+
168
+ message ListGlobalTagsResponse {
169
+ // A list of tags.
170
+ repeated Tag tags = 1;
171
+ }
@@ -11,18 +11,18 @@ import "wix/api/entity.proto";
11
11
  import "wix/api/permissions.proto";
12
12
  import "wix/api/callback.proto";
13
13
  import "wix/http/field_mask.proto";
14
- import "wix/common/query.proto";
15
- import "wix/common/paging.proto";
16
14
  import "wix/os/v1/tag.proto";
17
15
  import "wix/os/v1/tag_exposure.proto";
18
16
  import "wix/api/errors.proto";
19
17
  import "wix/api/api_errors.proto";
18
+ import "wix/os/v1/upstream/wix/common/query.proto";
19
+ import "wix/os/v1/upstream/wix/common/paging.proto";
20
20
 
21
21
  /**
22
22
  Manages Tags
23
23
  */
24
24
  service TagsService {
25
- option (wix.api.service_maturity) = BETA;
25
+ option (wix.api.service_maturity) = GA;
26
26
  option (wix.api.service_exposure) = PUBLIC;
27
27
  option (wix.api.service_entity).message = "wix.os.v1.Tag";
28
28
 
@@ -48,26 +48,31 @@ service TagsService {
48
48
  event_type: CREATED
49
49
  };
50
50
 
51
+ // Couldn't find the FQDN.
51
52
  option (.wix.api.error) = {
52
53
  http_code: NOT_FOUND
53
54
  application_code: "FQDN_NOT_FOUND"
54
55
  };
55
56
 
57
+ // There is already a tag with this name.
56
58
  option (.wix.api.error) = {
57
59
  http_code: ALREADY_EXISTS
58
60
  application_code: "TAG_NAME_ALREADY_EXISTS"
59
61
  };
60
62
 
63
+ // Number of tags exceeds the server's limit.
61
64
  option (.wix.api.error) = {
62
65
  http_code: RESOURCE_EXHAUSTED
63
66
  application_code: "TAGS_REACHED_LIMIT"
64
67
  };
65
68
 
69
+ // Failed to generate a unique tag ID after multiple attempts.
66
70
  option (.wix.api.error) = {
67
71
  http_code: INTERNAL
68
72
  application_code: "CREATE_ID_EXHAUSTED_RETRY_ATTEMPTS"
69
73
  };
70
74
 
75
+ // The specified `exposure` value isn't supported for this FQDN.
71
76
  option (.wix.api.error) = {
72
77
  http_code: INVALID_ARGUMENT
73
78
  application_code: "EXPOSURE_NOT_SUPPORTED"
@@ -149,6 +154,28 @@ service TagsService {
149
154
  };
150
155
  }
151
156
 
157
+ /**
158
+ Retrieves a list of tags.
159
+ */
160
+ rpc QueryTags (QueryTagsRequest) returns (QueryTagsResponse) {
161
+ option (google.api.http) = {
162
+ post: "/v1/tags/query"
163
+ additional_bindings : {
164
+ get: "/v1/tags/query";
165
+ }
166
+ };
167
+ option (wix.api.permission).name = "TAGS.TAG_READ";
168
+ option (wix.api.required) = "QueryTagsRequest.fqdn";
169
+ option (wix.api.required) = "QueryTagsRequest.query";
170
+
171
+ option (.wix.api.crud) = {
172
+ method: QUERY
173
+ query_options: {
174
+ items_field: 'tags'
175
+ }
176
+ };
177
+ }
178
+
152
179
  /**
153
180
  Creates a tag with a custom createdDate for migration purposes.
154
181
  */
@@ -214,6 +241,25 @@ message ListTagsResponse {
214
241
  repeated Tag tags = 1;
215
242
  }
216
243
 
244
+ message QueryTagsRequest {
245
+ // The Fully Qualified Domain Name (FQDN) to which the tags are associated. Currently supports only eCommerce Orders: `wix.ecom.v1.order`.
246
+ string fqdn = 1 [(wix.api.maxLength) = 255];
247
+
248
+ // The tag exposure.
249
+ TagExposure exposure = 2 [(wix.api.field_exposure) = INTERNAL];
250
+
251
+ // WQL expression.
252
+ wix.os.v1.upstream.wix.common.CursorQuery query = 3;
253
+ }
254
+
255
+ message QueryTagsResponse {
256
+ // A list of tags.
257
+ repeated Tag tags = 1;
258
+
259
+ // Paging metadata
260
+ wix.os.v1.upstream.wix.common.CursorPagingMetadata paging_metadata = 2;
261
+ }
262
+
217
263
  message MigrateTagRequest {
218
264
  // The tag to be migrated with custom createdDate.
219
265
  Tag tag = 1;
@@ -0,0 +1,69 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.os.v1.upstream.wix.common;
4
+
5
+ option java_multiple_files = true;
6
+ option java_package = "com.wixpress.os.v1.upstream.wix.common";
7
+
8
+ import "google/protobuf/wrappers.proto";
9
+ import "wix/api/validations.proto";
10
+ import "wix/api/annotations.proto";
11
+ import "wix/api/errors.proto";
12
+
13
+ message BulkActionMetadata {
14
+ option (.wix.api.decomposite_of) = "wix.commons.v2.BulkActionMetadata";
15
+ option (.wix.api.decomposition_minimum_fields) = {
16
+ field: "total_successes"
17
+ field: "total_failures"
18
+ field: "undetailed_failures"
19
+ };
20
+ // Number of items that were successfully processed.
21
+ int32 total_successes = 1 [(.wix.api.min) = 0];
22
+ // Number of items that couldn't be processed.
23
+ int32 total_failures = 2 [(.wix.api.min) = 0];
24
+ // Number of failures without details because detailed failure threshold was exceeded.
25
+ int32 undetailed_failures = 3 [(.wix.api.min) = 0];
26
+ }
27
+
28
+ message ItemMetadata {
29
+ option (.wix.api.decomposite_of) = "wix.commons.v2.ItemMetadata";
30
+ option (.wix.api.decomposition_minimum_fields) = {
31
+ field: "id"
32
+ field: "original_index"
33
+ field: "success"
34
+ field: "error"
35
+ };
36
+ // Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.
37
+ google.protobuf.StringValue id = 1 [(.wix.api.format) = GUID];
38
+ // Index of the item within the request array. Allows for correlation between request and response items.
39
+ int32 original_index = 2 [(.wix.api.min) = 0];
40
+ // Whether the requested action for this item was successful. When `false`, the `error` field is returned.
41
+ bool success = 3;
42
+ // Details about the error in case of failure.
43
+ .wix.api.ApplicationError error = 4;
44
+ }
45
+
46
+ enum BulkActionType {
47
+ UNKNOWN_ACTION_TYPE = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
48
+ INSERT = 1;
49
+ UPDATE = 2;
50
+ DELETE = 3;
51
+ }
52
+
53
+ /*
54
+
55
+ Example for using it in your service:
56
+
57
+ message BulkOrderResult {
58
+ option (.wix.api.decomposite_of) = "wix.commons.v2.BulkOrderResult";
59
+ ItemMetadata item_metadata = 1;
60
+ Order item = 2;
61
+ }
62
+
63
+ message BulkArchiveOrdersResponse {
64
+ option (.wix.api.decomposite_of) = "wix.commons.v2.BulkArchiveOrdersResponse";
65
+ repeated BulkOrderResult results = 1;
66
+ BulkActionMetadata bulk_action_metadata = 2;
67
+ }
68
+
69
+ */