@wix/bex-utils 2.30.0 → 2.31.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-media-site-media-v1-file-descriptor/build/cjs/builders.impl.d.ts +89 -0
  2. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/builders.impl.js +2249 -0
  3. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/builders.impl.js.map +1 -0
  4. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/http.impl.d.ts +1 -0
  5. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/http.impl.js +5 -0
  6. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/http.impl.js.map +1 -0
  7. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/rpc.impl.d.ts +6 -0
  8. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/rpc.impl.js +24 -0
  9. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/crud/rpc.impl.js.map +1 -0
  10. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/http.impl.d.ts +180 -0
  11. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/http.impl.js +971 -0
  12. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/http.impl.js.map +1 -0
  13. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/meta.impl.d.ts +30 -0
  14. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/meta.impl.js +385 -0
  15. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/meta.impl.js.map +1 -0
  16. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/client/proto-generated.d.ts +10010 -0
  17. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/client/proto-generated.js +2 -0
  18. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/proto-generated.d.ts +5002 -0
  19. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/proto-generated.js +78224 -0
  20. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/server/proto-generated.d.ts +9973 -0
  21. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/proto/server/proto-generated.js +2 -0
  22. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/rpc.impl.d.ts +189 -0
  23. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/rpc.impl.js +431 -0
  24. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/rpc.impl.js.map +1 -0
  25. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/types.impl.d.ts +1387 -0
  26. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/types.impl.js +117 -0
  27. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/cjs/types.impl.js.map +1 -0
  28. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/builders.impl.d.ts +89 -0
  29. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/builders.impl.js +2145 -0
  30. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/builders.impl.js.map +1 -0
  31. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/http.impl.d.ts +1 -0
  32. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/http.impl.js +2 -0
  33. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/http.impl.js.map +1 -0
  34. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/rpc.impl.d.ts +6 -0
  35. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/rpc.impl.js +19 -0
  36. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/crud/rpc.impl.js.map +1 -0
  37. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/http.impl.d.ts +180 -0
  38. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/http.impl.js +949 -0
  39. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/http.impl.js.map +1 -0
  40. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/meta.impl.d.ts +30 -0
  41. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/meta.impl.js +344 -0
  42. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/meta.impl.js.map +1 -0
  43. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/rpc.impl.d.ts +189 -0
  44. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/rpc.impl.js +390 -0
  45. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/rpc.impl.js.map +1 -0
  46. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/types.impl.d.ts +1387 -0
  47. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/types.impl.js +114 -0
  48. package/@wix/ambassador-media-site-media-v1-file-descriptor/build/es/types.impl.js.map +1 -0
  49. package/@wix/ambassador-media-site-media-v1-file-descriptor/builders/package.json +7 -0
  50. package/@wix/ambassador-media-site-media-v1-file-descriptor/crud/http/package.json +7 -0
  51. package/@wix/ambassador-media-site-media-v1-file-descriptor/crud/rpc/package.json +6 -0
  52. package/@wix/ambassador-media-site-media-v1-file-descriptor/http/package.json +7 -0
  53. package/@wix/ambassador-media-site-media-v1-file-descriptor/meta/package.json +7 -0
  54. package/@wix/ambassador-media-site-media-v1-file-descriptor/package.json +53 -0
  55. package/@wix/ambassador-media-site-media-v1-file-descriptor/rpc/package.json +6 -0
  56. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/media_manager_entity.proto +17 -0
  57. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/media_manager_service.proto +121 -0
  58. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/search_result.proto +17 -0
  59. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_manager/v1/search_service.proto +76 -0
  60. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/media_quota_api.proto +159 -0
  61. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/upstream/wix/common/identification.proto +41 -0
  62. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/upstream/wix/common/media.proto +242 -0
  63. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/upstream/wix/common/paging.proto +121 -0
  64. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/audio_v2.proto +31 -0
  65. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/content_disposition.proto +11 -0
  66. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/download_url.proto +12 -0
  67. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/error_code.proto +49 -0
  68. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/errors.proto +41 -0
  69. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/file_descriptor.proto +140 -0
  70. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/files_service.proto +1030 -0
  71. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/folder.proto +48 -0
  72. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/folders_service.proto +367 -0
  73. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/identity_info.proto +13 -0
  74. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/image_media.proto +84 -0
  75. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/media_type.proto +15 -0
  76. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/namespace.proto +21 -0
  77. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/operation_status.proto +27 -0
  78. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/other_media.proto +22 -0
  79. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/root_folders.proto +12 -0
  80. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/storage_info.proto +24 -0
  81. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/storage_service.proto +179 -0
  82. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/com/wix/media/site_media/v1/upload_protocol.proto +9 -0
  83. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/action_payload.proto +33 -0
  84. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/annotations.proto +393 -0
  85. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/api_errors.proto +117 -0
  86. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/callback.proto +156 -0
  87. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/context.proto +19 -0
  88. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/entity.proto +122 -0
  89. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/errors.proto +119 -0
  90. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/idempotency.proto +25 -0
  91. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/permissions.proto +40 -0
  92. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/sla.proto +24 -0
  93. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/subscription.proto +32 -0
  94. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/api/validations.proto +137 -0
  95. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/address.proto +148 -0
  96. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/bulk.proto +53 -0
  97. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/identification.proto +40 -0
  98. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/image.proto +8 -0
  99. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/media.proto +236 -0
  100. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/money.proto +32 -0
  101. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/pageurl.proto +32 -0
  102. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/paging.proto +121 -0
  103. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/query.proto +795 -0
  104. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/sorting.proto +36 -0
  105. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/spi.proto +85 -0
  106. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/tags.proto +55 -0
  107. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/common/wixlink.proto +201 -0
  108. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/graphql/definitions.proto +13 -0
  109. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/http/field_mask.proto +46 -0
  110. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/sdk/definitions.proto +191 -0
  111. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/spi/definitions.proto +186 -0
  112. package/@wix/ambassador-media-site-media-v1-file-descriptor/src/main/proto/wix/spi/http_error_status.proto +24 -0
  113. package/@wix/ambassador-media-site-media-v1-file-descriptor/types/package.json +7 -0
  114. package/package.json +3 -2
@@ -0,0 +1,36 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common;
4
+
5
+ import "wix/api/annotations.proto";
6
+ import "wix/api/validations.proto";
7
+ import "google/protobuf/struct.proto";
8
+
9
+ option java_multiple_files = true;
10
+ option java_package = "com.wix.common";
11
+
12
+ message Sorting {
13
+ option (.wix.api.decomposition_minimum_fields) = {
14
+ field: "field_name"
15
+ field: "order"
16
+ };
17
+ // Name of the field to sort by.
18
+ string field_name = 1 [(.wix.api.maxLength) = 512];
19
+ // Sort order.
20
+ SortOrder order = 2;
21
+ // When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
22
+ // a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
23
+ //
24
+ // If multiple filters are provided, they are combined with AND operator.
25
+ //
26
+ // Example:
27
+ // Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
28
+ // and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
29
+ // { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
30
+ repeated google.protobuf.Struct select_items_by = 3 [(.wix.api.maxSize) = 10, (.wix.api.field_exposure) = PRIVATE];
31
+ }
32
+
33
+ enum SortOrder {
34
+ ASC = 0;
35
+ DESC = 1;
36
+ }
@@ -0,0 +1,85 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common.spi;
4
+
5
+ import "google/protobuf/wrappers.proto";
6
+ import "wix/api/annotations.proto";
7
+ import "wix/api/validations.proto";
8
+
9
+ option java_multiple_files = true;
10
+ option java_package = "com.wix.common";
11
+
12
+ message SpiBaseUri {
13
+ option (.wix.api.decomposition_minimum_fields) = {
14
+ field: "base_uri"
15
+ field: "alternative_uris"
16
+ };
17
+ message AlternativeUri {
18
+ /*
19
+ Name of the method to create a custom URI for.
20
+
21
+ For `methodName`, use the name of the method in PascalCase.
22
+ For example, for Get Shipping Rates use `GetShippingRates`.
23
+ */
24
+ string method_name = 1 [(.wix.api.minLength) = 3, (.wix.api.maxLength) = 128];
25
+ /*
26
+ Custom URI that Wix uses to call your server for this method. The path-suffix documented in the method will not be appended to this URI.
27
+ Must be a secured endpoint beginning with `https://`. For example, `https://www.my-shipping-provider.com/my-shipping-rates`.
28
+ */
29
+ string absolute_uri = 2 [(.wix.api.minLength) = 6, (.wix.api.maxLength) = 2048];
30
+ }
31
+ /*
32
+ Base URI where the methods are called. Wix appends the path to the `baseUri`.
33
+ For example, to call the Get Shipping Rates method at `https://my-shipping-provider.com/v1/getRates`, the base URI you provide here is `https://my-shipping-provider.com/`.
34
+ */
35
+ string base_uri = 1 [(.wix.api.minLength) = 6, (.wix.api.maxLength) = 2048];
36
+ // Alternate, custom URIs to replace the default URIs for specific service plugin methods.
37
+ repeated AlternativeUri alternative_uris = 2;
38
+ }
39
+
40
+ /**
41
+ this message is not directly used by any service,
42
+ it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
43
+ e.g. SPIs, event-handlers, etc..
44
+ NOTE: this context object MUST be provided as the last argument in each Velo method signature.
45
+
46
+ Example:
47
+ ```typescript
48
+ export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
49
+ ...
50
+ }
51
+ ```
52
+ */
53
+ message Context {
54
+ message IdentificationData {
55
+ option (.wix.api.decomposite_of) = "wix.common.IdentificationData";
56
+ enum IdentityType {
57
+ UNKNOWN = 0;
58
+ ANONYMOUS_VISITOR = 1;
59
+ MEMBER = 2;
60
+ WIX_USER = 3;
61
+ APP = 4;
62
+ }
63
+ reserved 1;
64
+ IdentityType identity_type = 6 [(.wix.api.readOnly) = true];
65
+ oneof id {
66
+ // ID of a site visitor that has not logged in to the site.
67
+ string anonymous_visitor_id = 2 [(.wix.api.format) = GUID];
68
+ // ID of a site visitor that has logged in to the site.
69
+ string member_id = 3 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.members.v1.member"];
70
+ // ID of a Wix user (site owner, contributor, etc.).
71
+ string wix_user_id = 4 [(.wix.api.format) = GUID];
72
+ // ID of an app.
73
+ string app_id = 5 [(.wix.api.format) = GUID];
74
+ }
75
+ }
76
+ google.protobuf.StringValue request_id = 1; // A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs.
77
+ google.protobuf.StringValue currency = 2 [(.wix.api.format) = CURRENCY]; // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.
78
+ IdentificationData identity = 3; // An object that describes the identity that triggered this request.
79
+ repeated string languages = 4; // A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`.
80
+ google.protobuf.StringValue instance_id = 5 [(.wix.api.format) = GUID]; // The service provider app's instance ID.
81
+ google.protobuf.StringValue app_extension_id = 6 [(.wix.api.maxLength) = 256, (wix.api.field_maturity) = ALPHA]; // Extension ID in Dev Center.
82
+ google.protobuf.StringValue app_extension_type = 7 [(.wix.api.maxLength) = 256, (wix.api.field_maturity) = ALPHA]; // Extension type in Dev Center.
83
+ google.protobuf.StringValue function_name = 8 [(.wix.api.maxLength) = 256, (wix.api.field_maturity) = ALPHA]; // Invoked function.
84
+
85
+ }
@@ -0,0 +1,55 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common.tags;
4
+
5
+ import "google/protobuf/wrappers.proto";
6
+ import "wix/api/annotations.proto";
7
+ import "wix/api/validations.proto";
8
+
9
+ option java_multiple_files = true;
10
+ option java_package = "com.wix.common";
11
+ /*
12
+ Common object for tags.
13
+ Should be use as in this example:
14
+ message Foo {
15
+ string id = 1;
16
+ // ...
17
+ Tags tags = 5
18
+ }
19
+
20
+ example of taggable entity
21
+ {
22
+ id: "123"
23
+ tags: {
24
+ tags: {
25
+ tag_ids:["11","22"]
26
+ },
27
+ private_tags: {
28
+ tag_ids: ["33", "44"]
29
+ }
30
+ }
31
+ }
32
+ */
33
+ message Tags {
34
+ option (.wix.api.decomposition_minimum_fields) = {
35
+ field: "tags"
36
+ };
37
+
38
+ message TagList {
39
+ repeated string tag_ids = 1 [(.wix.api.maxSize) = 100, (.wix.api.maxLength) = 5]; // List of tag IDs
40
+ }
41
+ TagList private_tags = 1; // Tags that require an additional permission in order to access them, normally not given to site members or visitors.
42
+ TagList tags = 2; // Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.
43
+ }
44
+
45
+ message PublicTags {
46
+ option (.wix.api.decomposite_of) = "wix.common.tags.Tags";
47
+ option (.wix.api.decomposition_minimum_fields) = {
48
+ field: "tags"
49
+ };
50
+
51
+ message TagList {
52
+ repeated string tag_ids = 1 [(.wix.api.maxSize) = 100, (.wix.api.maxLength) = 5]; // List of tag IDs
53
+ }
54
+ TagList tags = 2; // Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.
55
+ }
@@ -0,0 +1,201 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common;
4
+
5
+ option java_multiple_files = true;
6
+ option java_outer_classname = "WixLinkProto";
7
+ option java_package = "com.wix.common";
8
+
9
+ import "wix/api/annotations.proto";
10
+ import "wix/api/validations.proto";
11
+ import "google/protobuf/wrappers.proto";
12
+
13
+ //The link object generated by panels in the editor and used by applications in Wix
14
+ message WixLink {
15
+ option (.wix.api.decomposition_minimum_fields) = {
16
+ field: "external"
17
+ };
18
+ option (.wix.api.decomposition_minimum_fields) = {
19
+ field: "page"
20
+ };
21
+ option (.wix.api.decomposition_minimum_fields) = {
22
+ field: "anchor"
23
+ };
24
+ option (.wix.api.decomposition_minimum_fields) = {
25
+ field: "dynamic_page"
26
+ };
27
+ option (.wix.api.decomposition_minimum_fields) = {
28
+ field: "document"
29
+ };
30
+ option (.wix.api.decomposition_minimum_fields) = {
31
+ field: "email"
32
+ };
33
+ option (.wix.api.decomposition_minimum_fields) = {
34
+ field: "phone"
35
+ };
36
+ option (.wix.api.decomposition_minimum_fields) = {
37
+ field: "address"
38
+ };
39
+ option (.wix.api.decomposition_minimum_fields) = {
40
+ field: "whats_app"
41
+ };
42
+ option (.wix.api.decomposition_minimum_fields) = {
43
+ field: "tpa_page_link"
44
+ };
45
+ oneof Link {
46
+ ExternalLink external = 1; // External link type
47
+ PageLink page = 2; // Page link type
48
+ AnchorLink anchor = 3; // Anchor link type
49
+ DynamicPageLink dynamic_page = 4; // Dynamic page link type
50
+ DocumentLink document = 5; // Document link type
51
+ EmailLink email = 6; // Email link type
52
+ PhoneLink phone = 7; // Phone link type
53
+ AddressLink address = 8; // Address link type
54
+ WhatsAppLink whats_app = 9; // WhatsApp link type
55
+ TpaPageLink tpa_page = 10; // TPA link type
56
+ }
57
+ }
58
+
59
+ message ExternalLink {
60
+ option (.wix.api.decomposition_minimum_fields) = {
61
+ field: "url"
62
+ };
63
+ //The url of the page
64
+ string url = 1 [(.wix.api.format) = WEB_URL];
65
+ //Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page.
66
+ google.protobuf.StringValue target = 2;
67
+ }
68
+
69
+ message PageLink {
70
+ option (.wix.api.decomposition_minimum_fields) = {
71
+ field: "page_id"
72
+ };
73
+ //The page id we want from the site
74
+ string page_id = 1;
75
+ //Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page.
76
+ google.protobuf.StringValue target = 2;
77
+ //rel of link
78
+ repeated LinkRel rel = 3 [(wix.api.maxSize) = 20];
79
+ }
80
+
81
+ message AnchorLink {
82
+ option (.wix.api.decomposition_minimum_fields) = {
83
+ field: "anchor_name"
84
+ field: "anchor_data_id"
85
+ field: "page_id"
86
+ };
87
+ //The name of the anchor
88
+ string anchor_name = 1;
89
+ //The data id (from the JSON page) of the anchor that should be used
90
+ string anchor_data_id = 2;
91
+ //The page id we want from the site
92
+ string page_id = 3;
93
+ //rel of link
94
+ repeated LinkRel rel = 4 [(wix.api.maxSize) = 20];
95
+ }
96
+
97
+ message DynamicPageLink {
98
+ option (.wix.api.decomposition_minimum_fields) = {
99
+ field: "router_id"
100
+ field: "inner_route"
101
+ field: "anchor_data_id"
102
+ };
103
+ //The router that handles this link
104
+ string router_id = 1;
105
+ //The path data we'd like
106
+ string inner_route = 2;
107
+ //The data id (from the JSON page) of the anchor that should be used
108
+ google.protobuf.StringValue anchor_data_id = 3;
109
+ //rel of link
110
+ repeated LinkRel rel = 4 [(wix.api.maxSize) = 20];
111
+ }
112
+
113
+ message DocumentLink {
114
+ option (.wix.api.decomposition_minimum_fields) = {
115
+ field: "doc_id"
116
+ field: "name"
117
+ };
118
+ //The id of the document
119
+ string doc_id = 1;
120
+ //The name of the document for download purposes
121
+ google.protobuf.StringValue name = 2;
122
+ //If this document can be indexed by scrapers, default is false
123
+ bool indexable = 3;
124
+ }
125
+
126
+ message EmailLink {
127
+ option (.wix.api.decomposition_minimum_fields) = {
128
+ field: "recipient"
129
+ field: "subject"
130
+ field: "body"
131
+ };
132
+ //The email we will be sending a message to
133
+ string recipient = 1 [(.wix.api.format) = EMAIL];
134
+ //The subject of the email
135
+ google.protobuf.StringValue subject = 2;
136
+ //The body of the email
137
+ google.protobuf.StringValue body = 3;
138
+ }
139
+
140
+ message PhoneLink {
141
+ option (.wix.api.decomposition_minimum_fields) = {
142
+ field: "phone_number"
143
+ };
144
+ //The phone number we want to link to
145
+ string phone_number = 1 [(.wix.api.pii) = true, (.wix.api.format) = PHONE, (.wix.api.maxLength) = 100];
146
+ }
147
+
148
+ message AddressLink {
149
+ option (.wix.api.decomposition_minimum_fields) = {
150
+ field: "address"
151
+ };
152
+ //An address that we can link to
153
+ string address = 1 [(.wix.api.pii) = true];
154
+ }
155
+
156
+ message WhatsAppLink {
157
+ option (.wix.api.decomposition_minimum_fields) = {
158
+ field: "phone_number"
159
+ };
160
+ //The whatsApp phone number we want to connect with
161
+ string phone_number = 1 [(.wix.api.pii) = true, (.wix.api.format) = PHONE];
162
+ }
163
+
164
+ //Link to a TPA page
165
+ message TpaPageLink {
166
+ option (.wix.api.decomposition_minimum_fields) = {
167
+ field: "item_type_identifier"
168
+ field: "item_id"
169
+ field: "page_id"
170
+ field: "app_definition_id"
171
+ field: "path"
172
+ };
173
+ //Type of item (e.g. 'wix.stores.sub_pages.product')
174
+ string item_type_identifier = 1;
175
+ //Id of linked item
176
+ string item_id = 2;
177
+ //Id of linked page
178
+ string page_id = 3;
179
+ //Id of app being linked to (AppDefId)
180
+ string app_definition_id = 4;
181
+ //The relativepath of linked page
182
+ string path = 5;
183
+ //rel of link
184
+ repeated LinkRel rel = 6 [(wix.api.maxSize) = 20];
185
+ }
186
+
187
+ //The 'rel' attribute of the link. The rel attribute defines the relationship between a linked resource and the current document.
188
+ //Further reading (also about different possible rel types): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
189
+ //Following are the accepted 'rel' types by Wix applications.
190
+ enum LinkRel {
191
+ // default (not implemented)
192
+ unknown_link_rel = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
193
+ //Indicates that the current document's original author or publisher does not endorse the referenced document.
194
+ nofollow = 1;
195
+ //Instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it.
196
+ noopener = 2;
197
+ //No Referer header will be included. Additionally, has the same effect as noopener.
198
+ noreferrer = 3;
199
+ //Indicates a link that resulted from advertisements or paid placements.
200
+ sponsored = 4;
201
+ }
@@ -0,0 +1,13 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.graphql;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ option java_multiple_files = true;
8
+ option java_outer_classname = "GraphqlProto";
9
+ option java_package = "com.wix.graphql";
10
+
11
+ extend google.protobuf.FileOptions {
12
+ optional string namespace = 66000;
13
+ }
@@ -0,0 +1,46 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.http;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ option java_multiple_files = true;
8
+ option java_outer_classname = "FieldmaskProto";
9
+ option java_package = "com.wix.http";
10
+
11
+ /*
12
+ When (most commonly) update endpoint accepts FieldMask object, from REST client perspective it is redundant and can be
13
+ inferred from the actual JSON payload that was sent. This field annotation will tell the framework to use the JSON body
14
+ and automatically construct the fieldmask. E.g.
15
+ ```
16
+ import "wix/http/field_mask.proto";
17
+
18
+ rpc UpdateProduct (UpdateProductRequest) returns (UpdateProductResponse) {
19
+ option (google.api.http) = {
20
+ PATCH: "/v1/products/{product.id}
21
+ };
22
+ option (wix.http.infer_fieldmask) = {
23
+ from: "product"
24
+ fieldmask: "mask"
25
+ };
26
+ }
27
+
28
+ message UpdateProductRequest {
29
+ Product product = 1;
30
+ google.protobuf.FieldMask mask = 2;
31
+ }
32
+ ```
33
+ */
34
+ extend google.protobuf.FieldOptions {
35
+ optional string infer_fieldmask_from = 50901 [deprecated=true];
36
+ }
37
+
38
+ extend google.protobuf.MethodOptions {
39
+ optional InferFieldmask infer_fieldmask = 50902;
40
+ }
41
+
42
+ message InferFieldmask {
43
+ required string from = 1; // ref to field on which we want to infer
44
+ required string fieldmask = 2; // ref to actual fieldmask member
45
+ optional bool snake_case_comma_separated_mask = 3; // recase comma-separated field mask to snake_case (legacy behavior)
46
+ }
@@ -0,0 +1,191 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.sdk;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ option java_multiple_files = true;
8
+ option java_outer_classname = "DefinitionsProto";
9
+ option java_package = "com.wix.sdk";
10
+
11
+
12
+ /**
13
+ logic of signature generation:
14
+ ==============================
15
+
16
+ 1) `id` (path-param) should be the first argument.
17
+ 2) if there are more identifiers (path-params), a parent object called `identifiers` containing those will be the first argument.
18
+ 3) first payload member will be the second argument unless overridden via proto option. in case of override, args will be taken from override option value in-order.
19
+ 4) rest of arguments (if exist) will follow under the `options` parent.
20
+
21
+ internal logic for `identifiers` field:
22
+ take all path-params, merge with all `unique` fields, distinct.
23
+ if you have total args > 1 -> put all in `identifiers` parent.
24
+ otherwise - use single (usually id) arg as is and make it the first param.
25
+
26
+ `sdk.signature.params` cannot control neither `options` (last param) nor `id`/`identifiers` (first param) as those are needed by convention in Velo.
27
+
28
+
29
+ Examples:
30
+ =========
31
+
32
+ // Example-1: Default behavior, single identifier:
33
+ message GetProductRequest {
34
+ option (.wix.api.unique) = {field: "id"}; //not needed, automatically assumed
35
+ string id = 1;
36
+ string product_family = 2;
37
+ bool include_pii = 3;
38
+ }
39
+ rpc GetProduct (GetProductRequest) returns (GetProductResponse) {
40
+ option (google.api.http) = {
41
+ get = "/v1/products/{id}"
42
+ };
43
+ // ...
44
+ }
45
+ // Resulted signature: getProduct(id: string, productFamily: string, options: {includePii: boolean}) Product {...}
46
+ {
47
+ sdkSignatures: [
48
+ {
49
+ args: [
50
+ {
51
+ field: {
52
+ path: "id" <-- field name in proto request message
53
+ }
54
+ },
55
+ {
56
+ field: {
57
+ path: "productFamily" <-- field name in proto request message
58
+ }
59
+ },
60
+ parent: {
61
+ name: "options"
62
+ fields: [
63
+ {
64
+ path: "includePii" <-- field name in proto request message
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ ]
71
+ }
72
+
73
+ // Example-2: Default behavior, multiple identifiers:
74
+ message GetProductRequest {
75
+ option (.wix.api.unique) = {
76
+ field: "catalogId"
77
+ field: "productId"
78
+ };
79
+ string catalogId = 1;
80
+ string productId = 2;
81
+ string product_family = 3;
82
+ bool include_pii = 4;
83
+ }
84
+ rpc GetProduct (GetProductRequest) returns (GetProductResponse) {
85
+ option (google.api.http) = {
86
+ get = "/v1/catalog/{catalogId}/products/{productId}"
87
+ };
88
+ // ...
89
+ }
90
+ // Resulted signature: getProduct(identifiers: {catalogId: string, productId: string}, productFamily: string, options: {includePii: boolean}) Product {...}
91
+ // schema response:
92
+ {
93
+ sdkSignatures: [
94
+ {
95
+ args: [
96
+ {
97
+ parent: {
98
+ name: "identifiers"
99
+ fields: [
100
+ {
101
+ path: "catalogId" <-- field name in proto request message
102
+ },
103
+ {
104
+ path: "productId" <-- field name in proto request message
105
+ },
106
+ ]
107
+ }
108
+ },
109
+ {
110
+ field: {
111
+ path: "productFamily" <-- field name in proto request message
112
+ }
113
+ },
114
+ parent: {
115
+ name: "options"
116
+ fields: [
117
+ {
118
+ path: "includePii" <-- field name in proto request message
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ }
124
+ ]
125
+ }
126
+
127
+ // Example-3: Using override option, multiple identifiers:
128
+ message GetProductRequest {
129
+ option (.wix.api.unique) = {
130
+ field: "catalogId"
131
+ field: "productId"
132
+ };
133
+ string catalogId = 1;
134
+ string productId = 2;
135
+ string product_family = 3;
136
+ bool include_pii = 4;
137
+ }
138
+ rpc GetProduct (GetProductRequest) returns (GetProductResponse) {
139
+ option (google.api.http) = {
140
+ get = "/v1/catalog/{catalogId}/products/{productId}"
141
+ };
142
+ option (.wix.sdk.signature) = {
143
+ params = "include_pii" // the rest will be auto wired to options arg
144
+ };
145
+ // ...
146
+ }
147
+ // Resulted signature: getProduct(identifiers: {catalogId: string, productId: string}, includePii: boolean, options: {productFamily: string}) Product {...}
148
+ // schema response:
149
+ {
150
+ sdkSignatures: [
151
+ {
152
+ args: [
153
+ {
154
+ parent: {
155
+ name: "identifiers"
156
+ fields: [
157
+ {
158
+ path: "catalogId" <-- field name in proto request message
159
+ },
160
+ {
161
+ path: "productId" <-- field name in proto request message
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ {
167
+ field: {
168
+ path: "includePii" <-- field name in proto request message
169
+ }
170
+ },
171
+ parent: {
172
+ name: "options"
173
+ fields: [
174
+ {
175
+ path: "productFamily" <-- field name in proto request message
176
+ }
177
+ ]
178
+ }
179
+ ]
180
+ }
181
+ ]
182
+ }
183
+ **/
184
+
185
+ extend google.protobuf.MethodOptions {
186
+ repeated Signature signature = 60100;
187
+ }
188
+
189
+ message Signature {
190
+ repeated string params = 1;
191
+ }