@wix/bex-utils 2.109.0 → 2.111.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 (125) hide show
  1. package/@wix/ambassador-authorization-server/builders.d.ts +2542 -0
  2. package/@wix/ambassador-authorization-server/builders.js +10330 -0
  3. package/@wix/ambassador-authorization-server/builders.js.map +1 -0
  4. package/@wix/ambassador-authorization-server/export-erb.js +101 -0
  5. package/@wix/ambassador-authorization-server/http.d.ts +109 -0
  6. package/@wix/ambassador-authorization-server/http.js +394 -0
  7. package/@wix/ambassador-authorization-server/http.js.map +1 -0
  8. package/@wix/ambassador-authorization-server/index.js +1 -0
  9. package/@wix/ambassador-authorization-server/package.json +30 -0
  10. package/@wix/ambassador-authorization-server/rpc.d.ts +252 -0
  11. package/@wix/ambassador-authorization-server/rpc.js +820 -0
  12. package/@wix/ambassador-authorization-server/rpc.js.map +1 -0
  13. package/@wix/ambassador-authorization-server/src/builders.ts +10663 -0
  14. package/@wix/ambassador-authorization-server/src/http.ts +666 -0
  15. package/@wix/ambassador-authorization-server/src/rpc.ts +1111 -0
  16. package/@wix/ambassador-authorization-server/src/types.ts +1616 -0
  17. package/@wix/ambassador-authorization-server/types.d.ts +1294 -0
  18. package/@wix/ambassador-authorization-server/types.js +62 -0
  19. package/@wix/ambassador-authorization-server/types.js.map +1 -0
  20. package/@wix/ambassador-data-v1-external-database-connection/README.md +34 -0
  21. package/@wix/ambassador-data-v1-external-database-connection/builders/package.json +7 -0
  22. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/builders.impl.d.ts +32 -0
  23. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/builders.impl.js +363 -0
  24. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/builders.impl.js.map +1 -0
  25. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/crud/http.impl.d.ts +1 -0
  26. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/crud/http.impl.js +5 -0
  27. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/crud/http.impl.js.map +1 -0
  28. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/crud/rpc.impl.d.ts +11 -0
  29. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/crud/rpc.impl.js +41 -0
  30. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/crud/rpc.impl.js.map +1 -0
  31. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/http.impl.d.ts +24 -0
  32. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/http.impl.js +530 -0
  33. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/http.impl.js.map +1 -0
  34. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/meta.impl.d.ts +22 -0
  35. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/meta.impl.js +136 -0
  36. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/meta.impl.js.map +1 -0
  37. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/proto/client/proto-generated.d.ts +7218 -0
  38. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/proto/client/proto-generated.js +2 -0
  39. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/proto/proto-generated.d.ts +3606 -0
  40. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/proto/proto-generated.js +1 -0
  41. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/proto/server/proto-generated.d.ts +7207 -0
  42. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/proto/server/proto-generated.js +2 -0
  43. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/rpc.impl.d.ts +33 -0
  44. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/rpc.impl.js +121 -0
  45. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/rpc.impl.js.map +1 -0
  46. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/types.impl.d.ts +424 -0
  47. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/types.impl.js +97 -0
  48. package/@wix/ambassador-data-v1-external-database-connection/cjs/build/types.impl.js.map +1 -0
  49. package/@wix/ambassador-data-v1-external-database-connection/cjs/package.json +3 -0
  50. package/@wix/ambassador-data-v1-external-database-connection/crud/http/package.json +7 -0
  51. package/@wix/ambassador-data-v1-external-database-connection/crud/rpc/package.json +6 -0
  52. package/@wix/ambassador-data-v1-external-database-connection/es/build/builders.impl.d.ts +32 -0
  53. package/@wix/ambassador-data-v1-external-database-connection/es/build/builders.impl.js +314 -0
  54. package/@wix/ambassador-data-v1-external-database-connection/es/build/builders.impl.js.map +1 -0
  55. package/@wix/ambassador-data-v1-external-database-connection/es/build/crud/http.impl.d.ts +1 -0
  56. package/@wix/ambassador-data-v1-external-database-connection/es/build/crud/http.impl.js +2 -0
  57. package/@wix/ambassador-data-v1-external-database-connection/es/build/crud/http.impl.js.map +1 -0
  58. package/@wix/ambassador-data-v1-external-database-connection/es/build/crud/rpc.impl.d.ts +11 -0
  59. package/@wix/ambassador-data-v1-external-database-connection/es/build/crud/rpc.impl.js +34 -0
  60. package/@wix/ambassador-data-v1-external-database-connection/es/build/crud/rpc.impl.js.map +1 -0
  61. package/@wix/ambassador-data-v1-external-database-connection/es/build/http.impl.d.ts +24 -0
  62. package/@wix/ambassador-data-v1-external-database-connection/es/build/http.impl.js +523 -0
  63. package/@wix/ambassador-data-v1-external-database-connection/es/build/http.impl.js.map +1 -0
  64. package/@wix/ambassador-data-v1-external-database-connection/es/build/meta.impl.d.ts +22 -0
  65. package/@wix/ambassador-data-v1-external-database-connection/es/build/meta.impl.js +96 -0
  66. package/@wix/ambassador-data-v1-external-database-connection/es/build/meta.impl.js.map +1 -0
  67. package/@wix/ambassador-data-v1-external-database-connection/es/build/proto/client/proto-generated.d.ts +7218 -0
  68. package/@wix/ambassador-data-v1-external-database-connection/es/build/proto/client/proto-generated.js +5 -0
  69. package/@wix/ambassador-data-v1-external-database-connection/es/build/proto/proto-generated.d.ts +3606 -0
  70. package/@wix/ambassador-data-v1-external-database-connection/es/build/proto/proto-generated.js +1 -0
  71. package/@wix/ambassador-data-v1-external-database-connection/es/build/proto/server/proto-generated.d.ts +7207 -0
  72. package/@wix/ambassador-data-v1-external-database-connection/es/build/proto/server/proto-generated.js +5 -0
  73. package/@wix/ambassador-data-v1-external-database-connection/es/build/rpc.impl.d.ts +33 -0
  74. package/@wix/ambassador-data-v1-external-database-connection/es/build/rpc.impl.js +81 -0
  75. package/@wix/ambassador-data-v1-external-database-connection/es/build/rpc.impl.js.map +1 -0
  76. package/@wix/ambassador-data-v1-external-database-connection/es/build/types.impl.d.ts +424 -0
  77. package/@wix/ambassador-data-v1-external-database-connection/es/build/types.impl.js +94 -0
  78. package/@wix/ambassador-data-v1-external-database-connection/es/build/types.impl.js.map +1 -0
  79. package/@wix/ambassador-data-v1-external-database-connection/http/package.json +7 -0
  80. package/@wix/ambassador-data-v1-external-database-connection/meta/package.json +7 -0
  81. package/@wix/ambassador-data-v1-external-database-connection/package.json +108 -0
  82. package/@wix/ambassador-data-v1-external-database-connection/rpc/package.json +6 -0
  83. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/com/wixpress/cloud/data/api/common.proto +63 -0
  84. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/com/wixpress/cloud/data/api/externaldatabase/external-database-connection-service.proto +305 -0
  85. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/com/wixpress/cloud/data/api/externaldatabase/upstream/externaldatabase/wix/common/paging.proto +112 -0
  86. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/com/wixpress/iptf/webhooks/debug.proto +34 -0
  87. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/com/wixpress/iptf/webhooks/kv.proto +42 -0
  88. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/com/wixpress/iptf/webhooks/message_envelope.proto +54 -0
  89. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/webhooks_debug_service.proto +32 -0
  90. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/webhooks_sync_service.proto +33 -0
  91. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/action_payload.proto +33 -0
  92. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/annotations.proto +559 -0
  93. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/api_errors.proto +142 -0
  94. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/callback.proto +173 -0
  95. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/context.proto +19 -0
  96. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/entity.proto +133 -0
  97. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/errors.proto +127 -0
  98. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/idempotency.proto +25 -0
  99. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/permissions.proto +46 -0
  100. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/sla.proto +24 -0
  101. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/subscription.proto +32 -0
  102. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/api/validations.proto +147 -0
  103. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/address.proto +148 -0
  104. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/bulk.proto +53 -0
  105. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/domainevents/attributeupdated.proto +20 -0
  106. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/domainevents/domainevents.proto +112 -0
  107. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/identification.proto +40 -0
  108. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/image.proto +8 -0
  109. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/media.proto +280 -0
  110. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/money.proto +32 -0
  111. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/pageurl.proto +32 -0
  112. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/paging.proto +121 -0
  113. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/sorting.proto +36 -0
  114. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/spi.proto +85 -0
  115. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/tags.proto +55 -0
  116. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/common/wixlink.proto +203 -0
  117. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/graphql/definitions.proto +13 -0
  118. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/http/field_mask.proto +46 -0
  119. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/sdk/definitions.proto +191 -0
  120. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/spi/definitions.proto +188 -0
  121. package/@wix/ambassador-data-v1-external-database-connection/src/main/proto/wix/spi/http_error_status.proto +24 -0
  122. package/@wix/ambassador-data-v1-external-database-connection/types/package.json +7 -0
  123. package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +8 -0
  124. package/@wix/bex-bundled-mini-essentials/package.json +1 -1
  125. package/package.json +8 -5
@@ -0,0 +1,32 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.api;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+ import "wix/api/callback.proto";
7
+
8
+ option java_multiple_files = true;
9
+ option java_outer_classname = "SubscriptionProto";
10
+ option java_package = "com.wix.api";
11
+
12
+ /*
13
+ Marks a method as a topic consumer.
14
+ service BlooperService {
15
+ rpc Update (BlooperUpdateNotification) returns (google.protobuf.Empty) {
16
+ option (wix.api.subscription) = {
17
+ topic: "Blooper.Update"
18
+ };
19
+ };
20
+ }
21
+ */
22
+ extend google.protobuf.MethodOptions {
23
+ optional Subscription subscription = 50400;
24
+ }
25
+
26
+ message Subscription {
27
+ optional string topic = 1;
28
+ optional Segment.SegmentName segment = 4; // currently defaults to "legacy", will be `required` when legacy cluster is removed
29
+ optional bool batch = 2 [deprecated = true];
30
+ optional string entity = 3;
31
+ optional bool dynamic = 5 [deprecated = true];
32
+ }
@@ -0,0 +1,147 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.api;
4
+
5
+ import "wix/api/api_errors.proto";
6
+ import "google/protobuf/descriptor.proto";
7
+
8
+ option java_multiple_files = true;
9
+ option java_outer_classname = "ValidationsProto";
10
+ option java_package = "com.wix.api";
11
+
12
+ /**
13
+ * Annotation for field validation rules
14
+ * example usage:
15
+ * import "wix/api/validations.proto";
16
+ *
17
+ * message User {
18
+ * string id = 1 [(wix.api.readOnly)=true, (wix.api.format)=GUID];
19
+ * double age = 2 [(wix.api.max)=120, (wix.api.min)=0];
20
+ * string email = 3 [(wix.api.format)=EMAIL];
21
+ * string username = 4 [(wix.api.minLength)=3];
22
+ * string phone = 5 [(wix.api.format)=PHONE];
23
+ * }
24
+ *
25
+ * message Invoice {
26
+ * string id = 1 [(wix.api.readOnly)=true, (wix.api.format)=GUID];
27
+ * string amount_paid = 2 [(wix.api.decimalValue) = { gte: "0.01" lt: "10" maxScale: 2 }];
28
+ * }
29
+ **/
30
+ extend google.protobuf.FieldOptions {
31
+ // max possible value
32
+ optional double max = 50201;
33
+ // min possible value
34
+ optional double min = 50202;
35
+ // max length for strings
36
+ optional int32 maxLength = 50203;
37
+ // min length for strings
38
+ optional int32 minLength = 50204;
39
+ // exact length for strings
40
+ optional int32 exactLength = 50206;
41
+ // max size for repeated field, map
42
+ optional int32 maxSize = 50209;
43
+ // min size for repeated field, map
44
+ optional int32 minSize = 50210;
45
+ // exact size for repeated field, map
46
+ optional int32 exactSize = 50213;
47
+ // common known formats like email, URI, etc.
48
+ optional Format format = 50205;
49
+ // indicates this field cannot be set by the client. E.g. Id field assigned by the server
50
+ optional bool readOnly = 50208;
51
+ // indicates this field can be set by the client, but can never be changed or updated
52
+ optional bool immutable = 50212;
53
+ // indicates this field is input-only, it will NOT be returned in output response
54
+ optional bool writeOnly = 50154;
55
+ // decimal value format
56
+ optional DecimalValueOptions decimalValue = 50211;
57
+ // declare custom field validation for all methods
58
+ optional CustomValidationError custom_validation = 50214;
59
+ }
60
+
61
+ /**
62
+ * Decimal value validation rules.
63
+ * Based on java.math.BigDecimal, implies (wix.api.format) = DECIMAL_VALUE
64
+ */
65
+ message DecimalValueOptions {
66
+ optional string lte = 1; // less than or equal
67
+ optional string gte = 2; // greater than or equal
68
+ optional string lt = 3; // less than
69
+ optional string gt = 4; // greater than
70
+ optional int32 maxScale = 5; // max number of fractional digits
71
+ }
72
+
73
+ /**
74
+ * Annotation for method validation rules
75
+ * example usage:
76
+ * import "wix/api/validations.proto";
77
+ * service Bloop {
78
+ * rpc Create (CreateBloopRequest) returns (CreateBloopResponse) {
79
+ * option (wix.api.required) = "CreateBloopRequest.Bloop.name";
80
+ * }
81
+ * }
82
+ **/
83
+ extend google.protobuf.MethodOptions {
84
+ // Specify which fields are required in this method.
85
+ // Annotating a nested field as `required` does not imply that the whole path to that field is required, eg.
86
+ // `option (wix.api.required) = "person.pet.name";` means that if a `person` has a `pet`, then the `pet` must have
87
+ // a `name` set; it does not mean that `person` or `person.pet` themselves are required - these fields should be
88
+ // annotated individually if needed.
89
+ // This option can be repeated multiple times to specify multiple fields.
90
+ // example use:
91
+ // option (wix.api.required) = "userId";
92
+ // option (wix.api.required) = "userName";
93
+ repeated string required = 50200;
94
+ // Specify list of `immutable` fields which can be writable in this method.
95
+ // Most common in Create methods
96
+ // Only `immutable` AND NOT `readOnly` fields are allowed to be referenced via this annotation
97
+ // example use:
98
+ // option (wix.api.writable) = "id"; // user-generated id is enabled
99
+ repeated string writable = 50213;
100
+
101
+ }
102
+
103
+ extend google.protobuf.OneofOptions {
104
+ // name of the enum field that must be aligned with this oneof (AIP 7015)
105
+ // ADR 038: Linking oneOf with Enum: https://github.com/wix-private/server-infra/blob/master/framework/docs/adr/adr-038-aligned-with-enum.md
106
+ optional AlignedWithEnum aligned_with_enum = 50800;
107
+ }
108
+
109
+ message AlignedWithEnum {
110
+ required string field = 1;
111
+ // defaults to _options if not specified
112
+ optional string suffix = 2;
113
+ // By default, when the enum field is updated to a value that has no corresponding
114
+ // message option within the `oneof`, the framework automatically clears the `oneof`.
115
+ // This cleanup is achieved by programmatically adding the `oneof` field's path to the
116
+ // update mask. Set `skip_empty_options_handling` to `true` to disable this behavior.
117
+ optional bool skip_empty_options_handling = 3;
118
+ }
119
+
120
+ enum Format {
121
+ EMAIL = 0;
122
+ HOSTNAME = 1;
123
+ IPV4 = 2;
124
+ IPV6 = 3;
125
+ URI = 4;
126
+ WEB_URL = 5; // HTTP or HTTPS
127
+ PHONE = 7;
128
+ CREDIT_CARD = 8;
129
+ GUID = 9;
130
+ COUNTRY = 10; // 2 letters ISO-3166-1
131
+ LANGUAGE = 11; // 2 letters ISO-639-1
132
+ /*
133
+ Use this on string or stringValue types to validate the format of that field is same as a decimal value.
134
+ This will ensure keeping the precision of decimal value, such as when passing monetary values.
135
+ */
136
+ DECIMAL_VALUE = 12;
137
+ CURRENCY = 13; // 3 letters - all available currencies
138
+ LANGUAGE_TAG = 14; // IETF BCP 47 language tag (e.g. en-US)
139
+ COLOR_HEX = 15; // hex color format as defined by the MDN https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
140
+ LOCAL_DATE = 16; // ISO-8601 extended local date format (YYYY-MM-DD)
141
+ LOCAL_TIME = 17; // ISO-8601 extended local time format (hh:mm[:ss][.sss])
142
+ LOCAL_DATE_TIME = 18; // ISO-8601 extended local date-time format (YYYY-MM-DDThh:mm[:ss][.sss])
143
+ URL_SLUG = 19;
144
+ SYSTEM_SLUG = 20;
145
+ SECURE_WEB_URL = 21; // HTTPS only
146
+ SUBDIVISION = 22; // ISO-3166-2
147
+ }
@@ -0,0 +1,148 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common;
4
+
5
+ option java_multiple_files = true;
6
+ option java_package = "com.wix.common";
7
+
8
+ import "google/protobuf/wrappers.proto";
9
+ import "wix/api/annotations.proto";
10
+ import "wix/api/validations.proto";
11
+
12
+ // A common address format to use if you plan to store addresses in your service
13
+
14
+ // Physical address
15
+ message Address {
16
+ option (.wix.api.decomposition_minimum_fields) = {
17
+ field: "country"
18
+ field: "subdivision"
19
+ field: "city"
20
+ field: "postal_code"
21
+ field: "street_address"
22
+ field: "formatted_address"
23
+ };
24
+ option (.wix.api.decomposition_minimum_fields) = {
25
+ field: "country"
26
+ field: "subdivision"
27
+ field: "city"
28
+ field: "postal_code"
29
+ field: "address_line"
30
+ field: "address_line_2"
31
+ field: "formatted_address"
32
+ };
33
+ google.protobuf.StringValue country = 1 [(.wix.api.format) = COUNTRY]; // Country code.
34
+ google.protobuf.StringValue subdivision = 2; // Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY
35
+ google.protobuf.StringValue subdivision_iso_3166_2 = 14 [(.wix.api.maxLength) = 20, (.wix.api.field_exposure) = PRIVATE]; // Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2), e.g. US-NY
36
+ google.protobuf.StringValue city = 3 [(.wix.api.pii) = true]; // City name.
37
+ google.protobuf.StringValue postal_code = 4 [(.wix.api.pii) = true]; // Zip/postal code.
38
+ oneof street {
39
+ StreetAddress street_address = 5; // Street name and number.
40
+ google.protobuf.StringValue address_line = 6 [(.wix.api.pii) = true]; // Main address line, usually street and number as free text.
41
+ }
42
+ google.protobuf.StringValue address_line_2 = 7 [(.wix.api.pii) = true]; // Free text providing more detailed address info. Usually contains Apt, Suite, and Floor.
43
+
44
+ google.protobuf.StringValue formatted_address = 8 [(.wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE]; // A string containing the full address of this location.
45
+ google.protobuf.StringValue hint = 9 [(.wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE]; // Free text to help find the address.
46
+ AddressLocation geocode = 10 [(.wix.api.field_exposure) = PRIVATE]; // Coordinates of the physical address.
47
+ google.protobuf.StringValue country_fullname = 11 [(.wix.api.pii) = false, (.wix.api.field_exposure) = PRIVATE]; // Country full name.
48
+ google.protobuf.StringValue subdivision_fullname = 13 [(.wix.api.pii) = false, (.wix.api.field_exposure) = PRIVATE]; // Subdivision full name.
49
+ repeated Subdivision subdivisions = 12 [(.wix.api.field_exposure) = PRIVATE, (.wix.api.maxSize) = 6]; // Multi-level subdivisions from top to bottom.
50
+ }
51
+
52
+ message Subdivision {
53
+ enum SubdivisionType {
54
+ UNKNOWN_SUBDIVISION_TYPE = 0;
55
+ ADMINISTRATIVE_AREA_LEVEL_1 = 1; // State
56
+ ADMINISTRATIVE_AREA_LEVEL_2 = 2; // County
57
+ ADMINISTRATIVE_AREA_LEVEL_3 = 3; // City/town
58
+ ADMINISTRATIVE_AREA_LEVEL_4 = 4; // Neighborhood/quarter
59
+ ADMINISTRATIVE_AREA_LEVEL_5 = 5; // Street/block
60
+ COUNTRY = 6; // ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder.
61
+ }
62
+
63
+ // Subdivision Concordance values
64
+ message StandardDetails {
65
+ google.protobuf.StringValue iso_3166_2 = 1 [(.wix.api.maxLength) = 20]; // subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30
66
+ }
67
+
68
+ option (.wix.api.decomposition_minimum_fields) = {
69
+ field: "code"
70
+ };
71
+ string code = 1; // Short subdivision code.
72
+ string name = 2; // Subdivision full name.
73
+ SubdivisionType type = 3 [(.wix.api.field_exposure) = PRIVATE]; // Subdivision level
74
+ google.protobuf.StringValue type_info = 4 [(.wix.api.field_exposure) = PRIVATE]; // Free text description of subdivision type.
75
+ StandardDetails standard_details = 5 [(.wix.api.field_exposure) = PRIVATE]; // Standard organizations details (e.g. ISO).
76
+ }
77
+
78
+ message StreetAddress {
79
+ option (.wix.api.decomposition_minimum_fields) = {
80
+ field: "number"
81
+ field: "name"
82
+ };
83
+ string number = 1 [(.wix.api.pii) = true]; // Street number.
84
+ string name = 2 [(.wix.api.pii) = true]; // Street name.
85
+ string apt = 3 [(.wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE]; // Apartment number.
86
+ google.protobuf.StringValue formatted_address_line = 4 [(.wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE]; // Optional address line 1
87
+ }
88
+
89
+ //Contact details for the address
90
+ message AddressContactDetails {
91
+ option (.wix.api.decomposition_minimum_fields) = {
92
+ field: "full_name"
93
+ };
94
+ google.protobuf.StringValue full_name = 1 [(.wix.api.pii) = true]; // Contact's full name.
95
+ google.protobuf.StringValue phone = 2 [(.wix.api.pii) = true, (.wix.api.format) = PHONE]; // Contact's phone number.
96
+ google.protobuf.StringValue company = 3; // Contact's company name.
97
+ google.protobuf.StringValue email = 4 [(.wix.api.pii) = true, (.wix.api.format) = EMAIL]; // Email associated with the address.
98
+ }
99
+
100
+ //Full contact details for an address
101
+ message FullAddressContactDetails {
102
+ option (.wix.api.decomposition_minimum_fields) = {
103
+ field: "first_name"
104
+ field: "last_name"
105
+ };
106
+ option (.wix.api.decomposition_minimum_fields) = {
107
+ field: "full_name"
108
+ };
109
+ google.protobuf.StringValue first_name = 1 [(.wix.api.pii) = true]; // Contact's first name.
110
+ google.protobuf.StringValue last_name = 2 [(.wix.api.pii) = true]; // Contact's last name.
111
+ google.protobuf.StringValue full_name = 8 [(.wix.api.pii) = true, (.wix.api.field_exposure) = PRIVATE]; // Contact's full name.
112
+ google.protobuf.StringValue phone = 3 [(.wix.api.pii) = true, (.wix.api.format) = PHONE]; // Contact's phone number.
113
+ google.protobuf.StringValue company = 4; // Contact's company name.
114
+ google.protobuf.StringValue email = 5 [(.wix.api.pii) = true, (.wix.api.format) = EMAIL]; // Email associated with the address.
115
+ VatId vat_id = 7; // Tax info. Currently usable only in Brazil.
116
+ }
117
+
118
+ message VatId {
119
+ option (.wix.api.decomposition_minimum_fields) = {
120
+ field: "id"
121
+ field: "type"
122
+ };
123
+ string id = 1 [(.wix.api.pii) = true]; // Customer's tax ID.
124
+ /*
125
+ Tax type.
126
+
127
+ Supported values:
128
+ + `CPF`: for individual tax payers
129
+ + `CNPJ`: for corporations
130
+ */
131
+ VatType type = 2;
132
+ }
133
+
134
+ // tax info types
135
+ enum VatType {
136
+ UNSPECIFIED = 0;
137
+ CPF = 1; // CPF - for individual tax payers.
138
+ CNPJ = 2; // CNPJ - for corporations
139
+ }
140
+
141
+ message AddressLocation {
142
+ option (.wix.api.decomposition_minimum_fields) = {
143
+ field: "latitude"
144
+ field: "longitude"
145
+ };
146
+ google.protobuf.DoubleValue latitude = 1 [(.wix.api.pii) = true]; // Address latitude.
147
+ google.protobuf.DoubleValue longitude = 2 [(.wix.api.pii) = true]; // Address longitude.
148
+ }
@@ -0,0 +1,53 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common;
4
+
5
+ option java_multiple_files = true;
6
+ option java_package = "com.wix.common";
7
+
8
+ import "google/protobuf/wrappers.proto";
9
+ import "wix/api/annotations.proto";
10
+ import "wix/api/errors.proto";
11
+
12
+ message BulkActionMetadata {
13
+ // Number of items that were successfully processed.
14
+ int32 total_successes = 1;
15
+ // Number of items that couldn't be processed.
16
+ int32 total_failures = 2;
17
+ // Number of failures without details because detailed failure threshold was exceeded.
18
+ int32 undetailed_failures = 3;
19
+ }
20
+
21
+ message ItemMetadata {
22
+ // Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
23
+ google.protobuf.StringValue id = 1;
24
+ // Index of the item within the request array. Allows for correlation between request and response items.
25
+ int32 original_index = 2;
26
+ // Whether the requested action was successful for this item. When `false`, the `error` field is populated.
27
+ bool success = 3;
28
+ // Details about the error in case of failure.
29
+ .wix.api.ApplicationError error = 4;
30
+ }
31
+
32
+ enum BulkActionType {
33
+ UNKNOWN_ACTION_TYPE = 0;
34
+ INSERT = 1;
35
+ UPDATE = 2;
36
+ DELETE = 3;
37
+ }
38
+
39
+ /*
40
+
41
+ Example for using it in your service:
42
+
43
+ message BulkOrderResult {
44
+ ItemMetadata item_metadata = 1;
45
+ Order item = 2;
46
+ }
47
+
48
+ message BulkArchiveOrdersResponse {
49
+ repeated BulkOrderResult results = 1;
50
+ BulkActionMetadata bulk_action_metadata = 2;
51
+ }
52
+
53
+ */
@@ -0,0 +1,20 @@
1
+ syntax = "proto3";
2
+ import "google/protobuf/struct.proto";
3
+
4
+ package wix.common.domainevents;
5
+
6
+ import "wix/api/annotations.proto";
7
+
8
+ option java_multiple_files = true;
9
+ option java_package = "com.wix.common.domainevents";
10
+
11
+ message AttributeUpdated {
12
+ option (.wix.api.decomposition_minimum_fields) = {
13
+ field: "previous_value"
14
+ field: "value"
15
+ };
16
+ // previous_value should ONLY be set if you have the previous value in hand. Do NOT add additional DB calls for it unless your domain mandates it.
17
+ // leave next line empty so that comment will be kept internal and not confuse external parties
18
+ google.protobuf.Value previous_value = 4;
19
+ google.protobuf.Value value = 5;
20
+ }
@@ -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
+ }
@@ -0,0 +1,40 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common;
4
+
5
+ option java_multiple_files = true;
6
+ option java_package = "com.wix.common";
7
+
8
+ import "google/protobuf/wrappers.proto";
9
+ import "wix/api/validations.proto";
10
+ import "wix/api/annotations.proto";
11
+
12
+ message IdentificationData {
13
+ option (.wix.api.decomposition_minimum_fields) = {
14
+ field: "identity_type"
15
+ field: "anonymous_visitor_id"
16
+ field: "member_id"
17
+ field: "wix_user_id"
18
+ field: "app_id"
19
+ };
20
+ enum IdentityType {
21
+ UNKNOWN = 0;
22
+ ANONYMOUS_VISITOR = 1;
23
+ MEMBER = 2;
24
+ WIX_USER = 3;
25
+ APP = 4;
26
+ }
27
+ // ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system.
28
+ google.protobuf.StringValue contact_id = 1 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.contacts.v4.contact"];
29
+ IdentityType identity_type = 6 [(.wix.api.readOnly) = true, (.wix.api.field_exposure) = PRIVATE];
30
+ oneof id {
31
+ // ID of a site visitor that has not logged in to the site.
32
+ string anonymous_visitor_id = 2 [(.wix.api.format) = GUID];
33
+ // ID of a site visitor that has logged in to the site.
34
+ string member_id = 3 [(.wix.api.format) = GUID, (.wix.api.referenced_entity) = "wix.members.v1.member"];
35
+ // ID of a Wix user (site owner, contributor, etc.).
36
+ string wix_user_id = 4 [(.wix.api.format) = GUID];
37
+ // ID of an app.
38
+ string app_id = 5 [(.wix.api.format) = GUID];
39
+ }
40
+ }
@@ -0,0 +1,8 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.common;
4
+
5
+ option java_multiple_files = true;
6
+ option java_package = "com.wix.common";
7
+
8
+ //Moved to media.proto - please update your references