@paakd/api 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.js +21 -0
- package/package.json +59 -0
- package/src/address.spec.ts +662 -0
- package/src/address.ts +300 -0
- package/src/auth.spec.ts +771 -0
- package/src/auth.ts +168 -0
- package/src/compressor/brotli.ts +26 -0
- package/src/index.ts +5 -0
- package/src/interceptors.spec.ts +1343 -0
- package/src/interceptors.ts +224 -0
- package/src/policies.spec.ts +595 -0
- package/src/policies.ts +431 -0
- package/src/products.spec.ts +710 -0
- package/src/products.ts +112 -0
- package/src/profile.spec.ts +626 -0
- package/src/profile.ts +169 -0
- package/src/proto/auth/v1/entities/auth.proto +140 -0
- package/src/proto/auth/v1/entities/policy.proto +57 -0
- package/src/proto/auth/v1/service.proto +26 -0
- package/src/proto/customers/v1/entities/address.proto +101 -0
- package/src/proto/customers/v1/entities/profile.proto +118 -0
- package/src/proto/customers/v1/service.proto +36 -0
- package/src/proto/files/v1/entities/file.proto +62 -0
- package/src/proto/files/v1/service.proto +19 -0
- package/src/proto/products/v1/entities/category.proto +98 -0
- package/src/proto/products/v1/entities/collection.proto +72 -0
- package/src/proto/products/v1/entities/product/create.proto +41 -0
- package/src/proto/products/v1/entities/product/option.proto +17 -0
- package/src/proto/products/v1/entities/product/shared.proto +255 -0
- package/src/proto/products/v1/entities/product/update.proto +66 -0
- package/src/proto/products/v1/entities/tag.proto +73 -0
- package/src/proto/products/v1/entities/taxonomy.proto +146 -0
- package/src/proto/products/v1/entities/type.proto +98 -0
- package/src/proto/products/v1/entities/variant.proto +127 -0
- package/src/proto/products/v1/service.proto +78 -0
- package/src/proto/promotions/v1/entities/campaign.proto +145 -0
- package/src/proto/promotions/v1/service.proto +17 -0
- package/src/proto/stocknodes/v1/entities/stocknode.proto +167 -0
- package/src/proto/stocknodes/v1/service.proto +21 -0
- package/src/registration.ts +170 -0
- package/src/test-utils.ts +176 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package apps.enterprise.interfaces.rpc.files.v1;
|
|
4
|
+
|
|
5
|
+
option go_package = "paakd.com/packages/api/gen/files/v1;filesv1";
|
|
6
|
+
|
|
7
|
+
import "src/proto/files/v1/entities/file.proto";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
service FileService {
|
|
11
|
+
rpc UpdateFile(UpdateFileRequest) returns (UpdateFileResponse) {};
|
|
12
|
+
rpc DeleteFile(DeleteFileRequest) returns (DeleteFileResponse){};
|
|
13
|
+
rpc ListFiles(ListFilesRequest) returns (ListFilesResponse){
|
|
14
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
|
15
|
+
};
|
|
16
|
+
rpc GetFile(GetFileRequest) returns (GetFileResponse){
|
|
17
|
+
option idempotency_level = NO_SIDE_EFFECTS;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import "buf/validate/validate.proto";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
message CreateProductCategoryRequest {
|
|
8
|
+
string name = 1 [
|
|
9
|
+
(buf.validate.field).string.min_len = 1,
|
|
10
|
+
(buf.validate.field).string.max_len = 100
|
|
11
|
+
];
|
|
12
|
+
optional string description = 2 [
|
|
13
|
+
(buf.validate.field).string.max_len = 500
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
optional string parent_category_id = 3 [
|
|
17
|
+
(buf.validate.field).string.min_len = 1,
|
|
18
|
+
(buf.validate.field).string.max_len = 100
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
string category_taxonomy_id = 4 [
|
|
22
|
+
(buf.validate.field).string.min_len = 1,
|
|
23
|
+
(buf.validate.field).string.max_len = 100
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
repeated string tags = 5;
|
|
27
|
+
|
|
28
|
+
optional bool is_internal = 6;
|
|
29
|
+
optional bool is_active = 7;
|
|
30
|
+
optional int32 rank = 8;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message CreateProductCategoryResponse {
|
|
34
|
+
string id = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message UpdateProductCategoryRequest {
|
|
38
|
+
string id = 1 [
|
|
39
|
+
(buf.validate.field).string.min_len = 1,
|
|
40
|
+
(buf.validate.field).string.max_len = 100
|
|
41
|
+
];
|
|
42
|
+
string name = 2 [
|
|
43
|
+
(buf.validate.field).string.min_len = 1,
|
|
44
|
+
(buf.validate.field).string.max_len = 100
|
|
45
|
+
];
|
|
46
|
+
optional string description = 3 [
|
|
47
|
+
(buf.validate.field).string.max_len = 500
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
repeated string tags = 4;
|
|
51
|
+
optional bool is_internal = 5;
|
|
52
|
+
optional bool is_active = 6;
|
|
53
|
+
optional int32 rank = 7;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message UpdateProductCategoryResponse {}
|
|
57
|
+
|
|
58
|
+
message DeleteProductCategoryByIDRequest {
|
|
59
|
+
string id = 1 [
|
|
60
|
+
(buf.validate.field).string.min_len = 1,
|
|
61
|
+
(buf.validate.field).string.max_len = 100
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
message DeleteProductCategoryByIDResponse {}
|
|
65
|
+
|
|
66
|
+
message GetProductCategoryByIDRequest {
|
|
67
|
+
string id = 1 [
|
|
68
|
+
(buf.validate.field).string.min_len = 1,
|
|
69
|
+
(buf.validate.field).string.max_len = 100
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message GetProductCategoryByIDResponse {
|
|
74
|
+
string id = 1; // ID of the category
|
|
75
|
+
string name = 2; // Name of the category
|
|
76
|
+
string description = 3; // Description of the category
|
|
77
|
+
repeated string tags = 4; // Tags associated with the category
|
|
78
|
+
string category_taxonomy_id = 5; // Name of the category taxonomy
|
|
79
|
+
string parent_category_id = 6;
|
|
80
|
+
bool is_internal = 7;
|
|
81
|
+
bool is_active = 8;
|
|
82
|
+
int32 rank = 9;
|
|
83
|
+
string taxonomy_fullname = 10;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message UpdateProductCategoryTaxonomyRequest {
|
|
87
|
+
string id = 1 [
|
|
88
|
+
(buf.validate.field).string.min_len = 1,
|
|
89
|
+
(buf.validate.field).string.max_len = 100
|
|
90
|
+
];
|
|
91
|
+
string taxonomy_id = 2 [
|
|
92
|
+
(buf.validate.field).string.min_len = 1,
|
|
93
|
+
(buf.validate.field).string.max_len = 100
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
message UpdateProductCategoryTaxonomyResponse {
|
|
98
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import "buf/validate/validate.proto";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
message CreateCollectionRequest {
|
|
8
|
+
string title = 1 [
|
|
9
|
+
(buf.validate.field).string.min_len = 1,
|
|
10
|
+
(buf.validate.field).string.max_len = 100
|
|
11
|
+
];
|
|
12
|
+
optional string description = 2 [
|
|
13
|
+
(buf.validate.field).string.max_len = 500
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
string slug = 3 [
|
|
17
|
+
(buf.validate.field).string.min_len = 3,
|
|
18
|
+
(buf.validate.field).string.max_len = 50,
|
|
19
|
+
(buf.validate.field).string.pattern = "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message CreateCollectionResponse {
|
|
24
|
+
string id = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message GetCollectionByIDRequest {
|
|
28
|
+
string id = 1 [
|
|
29
|
+
(buf.validate.field).string.min_len = 1,
|
|
30
|
+
(buf.validate.field).string.max_len = 100
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message GetCollectionByIDResponse {
|
|
35
|
+
string id = 1; // ID of the collection
|
|
36
|
+
string title = 2; // Name of the collection
|
|
37
|
+
string description = 3; // Description of the collection
|
|
38
|
+
string slug = 4; // URL slug of the collection
|
|
39
|
+
repeated string tags = 5; // Tags associated with the collection
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message UpdateCollectionRequest {
|
|
43
|
+
string id = 1 [
|
|
44
|
+
(buf.validate.field).string.min_len = 1,
|
|
45
|
+
(buf.validate.field).string.max_len = 100
|
|
46
|
+
];
|
|
47
|
+
string title = 2 [
|
|
48
|
+
(buf.validate.field).string.min_len = 1,
|
|
49
|
+
(buf.validate.field).string.max_len = 100
|
|
50
|
+
];
|
|
51
|
+
optional string description = 3 [
|
|
52
|
+
(buf.validate.field).string.max_len = 500
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
string slug = 4 [
|
|
56
|
+
(buf.validate.field).string.min_len = 3,
|
|
57
|
+
(buf.validate.field).string.max_len = 50,
|
|
58
|
+
(buf.validate.field).string.pattern = "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
repeated string tags = 5;
|
|
62
|
+
}
|
|
63
|
+
message UpdateCollectionResponse {}
|
|
64
|
+
|
|
65
|
+
message DeleteCollectionByIDRequest {
|
|
66
|
+
string id = 1 [
|
|
67
|
+
(buf.validate.field).string.min_len = 1,
|
|
68
|
+
(buf.validate.field).string.max_len = 100
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message DeleteCollectionByIDResponse {}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "buf/validate/validate.proto";
|
|
4
|
+
import "src/proto/products/v1/entities/product/shared.proto";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
message CreateProductRequest {
|
|
8
|
+
string title = 1;
|
|
9
|
+
optional string subtitle = 2;
|
|
10
|
+
optional string description = 3;
|
|
11
|
+
optional string slug = 4;
|
|
12
|
+
optional bool is_published = 5;
|
|
13
|
+
optional bool is_giftcard = 6;
|
|
14
|
+
optional string thumbnail = 7;
|
|
15
|
+
optional ProductStatus status = 8;
|
|
16
|
+
optional string product_type_id = 9;
|
|
17
|
+
repeated string collection_id = 10;
|
|
18
|
+
repeated string category_ids = 11;
|
|
19
|
+
repeated string image_ids = 12;
|
|
20
|
+
repeated string tag_ids = 13;
|
|
21
|
+
repeated Variant variants = 14;
|
|
22
|
+
repeated ProductOption options = 15;
|
|
23
|
+
map<string, string> metadata = 16;
|
|
24
|
+
optional float weight = 17;
|
|
25
|
+
optional float length = 18;
|
|
26
|
+
optional float width = 19;
|
|
27
|
+
optional float height = 20;
|
|
28
|
+
optional string hs_code = 21;
|
|
29
|
+
optional string origin_country = 22;
|
|
30
|
+
optional string manufacturer_id = 23;
|
|
31
|
+
optional bool returnable = 24;
|
|
32
|
+
repeated string sales_channel_ids = 25;
|
|
33
|
+
repeated string attribute_ids = 26;
|
|
34
|
+
string external_id = 27;
|
|
35
|
+
string shipping_profile_id = 28;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
message CreateProductResponse {
|
|
40
|
+
ProductResponse product = 1;
|
|
41
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import "buf/validate/validate.proto";
|
|
5
|
+
|
|
6
|
+
import "src/proto/products/v1/entities/product/shared.proto";
|
|
7
|
+
|
|
8
|
+
message CreateOptionRequest {
|
|
9
|
+
string product_id = 1;
|
|
10
|
+
string title = 2;
|
|
11
|
+
repeated string values = 3;
|
|
12
|
+
map<string, string> metadata = 4;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message CreateOptionResponse {
|
|
16
|
+
ProductResponse product = 1;
|
|
17
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "buf/validate/validate.proto";
|
|
4
|
+
|
|
5
|
+
enum ProductStatus {
|
|
6
|
+
DRAFT = 0;
|
|
7
|
+
PROPOSED = 1;
|
|
8
|
+
PUBLISHED = 2;
|
|
9
|
+
REJECTED = 3;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message ProductOption {
|
|
13
|
+
string title = 1;
|
|
14
|
+
repeated string values = 2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message Variant {
|
|
18
|
+
message OptionValue {
|
|
19
|
+
string option_id = 1;
|
|
20
|
+
string value = 2;
|
|
21
|
+
}
|
|
22
|
+
message Price {
|
|
23
|
+
enum RuleType {
|
|
24
|
+
RULE_TYPE_UNSPECIFIED = 0;
|
|
25
|
+
RULE_TYPE_REGION = 1;
|
|
26
|
+
RULE_TYPE_CUSTOMER_GROUP = 2;
|
|
27
|
+
}
|
|
28
|
+
message Rule {
|
|
29
|
+
string entity_id = 1;
|
|
30
|
+
RuleType entity_type = 2;
|
|
31
|
+
}
|
|
32
|
+
string currency_code = 1;
|
|
33
|
+
float amount = 3;
|
|
34
|
+
int32 max_quantity = 4;
|
|
35
|
+
int32 min_quantity = 5;
|
|
36
|
+
|
|
37
|
+
repeated Rule rules = 10;
|
|
38
|
+
}
|
|
39
|
+
message InventoryItem {
|
|
40
|
+
string inventory_item_id = 1;
|
|
41
|
+
}
|
|
42
|
+
optional string id = 1;
|
|
43
|
+
string title = 2;
|
|
44
|
+
optional string sku = 3;
|
|
45
|
+
optional string ean = 4;
|
|
46
|
+
optional string upc = 5;
|
|
47
|
+
optional string barcode = 6;
|
|
48
|
+
optional bool track_inventory = 7;
|
|
49
|
+
optional bool is_manage_inventory = 8;
|
|
50
|
+
optional float weight = 9;
|
|
51
|
+
optional float length = 10;
|
|
52
|
+
optional float width = 11;
|
|
53
|
+
optional float height = 12;
|
|
54
|
+
optional string hs_code = 13;
|
|
55
|
+
optional string origin_country = 14;
|
|
56
|
+
optional string material = 15;
|
|
57
|
+
repeated OptionValue option_values = 16;
|
|
58
|
+
repeated Price prices = 17;
|
|
59
|
+
repeated InventoryItem inventory_items = 18;
|
|
60
|
+
map<string, string> metadata = 19;
|
|
61
|
+
optional string mid_code = 20;
|
|
62
|
+
optional bool allow_backorder = 21;
|
|
63
|
+
optional int32 rank = 22;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message ProductResponse {
|
|
67
|
+
message Tag {
|
|
68
|
+
string id = 1;
|
|
69
|
+
string value = 2;
|
|
70
|
+
}
|
|
71
|
+
message SalesChannel {
|
|
72
|
+
string id = 1;
|
|
73
|
+
string name = 2;
|
|
74
|
+
string description = 3;
|
|
75
|
+
string is_disabled = 4;
|
|
76
|
+
map<string, string> metadata = 5;
|
|
77
|
+
}
|
|
78
|
+
message Type {
|
|
79
|
+
string id = 1;
|
|
80
|
+
string name = 2;
|
|
81
|
+
map<string, string> metadata = 3;
|
|
82
|
+
}
|
|
83
|
+
message Category {
|
|
84
|
+
string id = 1;
|
|
85
|
+
string name = 2;
|
|
86
|
+
string description = 3;
|
|
87
|
+
string slug = 4;
|
|
88
|
+
bool is_active = 5;
|
|
89
|
+
bool is_internal = 6;
|
|
90
|
+
int32 rank = 7;
|
|
91
|
+
optional string parent_id = 8;
|
|
92
|
+
repeated Category children = 9;
|
|
93
|
+
map<string, string> metadata = 10;
|
|
94
|
+
}
|
|
95
|
+
message Collection {
|
|
96
|
+
string id = 1;
|
|
97
|
+
string title = 2;
|
|
98
|
+
string slug = 3;
|
|
99
|
+
map<string, string> metadata = 4;
|
|
100
|
+
}
|
|
101
|
+
message Image {
|
|
102
|
+
string id = 1;
|
|
103
|
+
string url = 2;
|
|
104
|
+
int32 rank = 3;
|
|
105
|
+
map<string, string> metadata = 4;
|
|
106
|
+
}
|
|
107
|
+
message Value {
|
|
108
|
+
string option_id = 1;
|
|
109
|
+
string value = 2;
|
|
110
|
+
optional Option option = 4;
|
|
111
|
+
}
|
|
112
|
+
message OptionData {
|
|
113
|
+
string id = 1;
|
|
114
|
+
string title = 2;
|
|
115
|
+
repeated Value option_values = 3;
|
|
116
|
+
string product_id = 4;
|
|
117
|
+
}
|
|
118
|
+
message Option {
|
|
119
|
+
string id = 1;
|
|
120
|
+
string value = 2;
|
|
121
|
+
string product_id = 3;
|
|
122
|
+
OptionData option = 4;
|
|
123
|
+
repeated Value values = 5;
|
|
124
|
+
}
|
|
125
|
+
message ProductVariant {
|
|
126
|
+
message Price {
|
|
127
|
+
message Rule {
|
|
128
|
+
enum Type {
|
|
129
|
+
TYPE_UNSPECIFIED = 0;
|
|
130
|
+
TYPE_REGION = 1;
|
|
131
|
+
TYPE_CUSTOMER_GROUP = 2;
|
|
132
|
+
}
|
|
133
|
+
string entity_id = 1;
|
|
134
|
+
Type entity_type = 2;
|
|
135
|
+
}
|
|
136
|
+
string currency_code = 1;
|
|
137
|
+
float amount = 3;
|
|
138
|
+
float raw_amount = 4;
|
|
139
|
+
string title = 5;
|
|
140
|
+
string id = 6;
|
|
141
|
+
int32 max_quantity = 7;
|
|
142
|
+
int32 min_quantity = 8;
|
|
143
|
+
string price_set_id = 9;
|
|
144
|
+
repeated Rule rules = 10;
|
|
145
|
+
}
|
|
146
|
+
message Option {
|
|
147
|
+
string id = 1;
|
|
148
|
+
string value = 2;
|
|
149
|
+
string option_id = 3;
|
|
150
|
+
OptionData option = 4;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
message InventoryItem {
|
|
154
|
+
message InventoryItemData {
|
|
155
|
+
string id = 1;
|
|
156
|
+
bool requires_shipping = 2;
|
|
157
|
+
string sku = 3;
|
|
158
|
+
string origin_country = 4;
|
|
159
|
+
string hs_code = 5;
|
|
160
|
+
string mid_code = 6;
|
|
161
|
+
string material = 7;
|
|
162
|
+
string title = 8;
|
|
163
|
+
string description = 9;
|
|
164
|
+
string thumbnail = 10;
|
|
165
|
+
float weight = 11;
|
|
166
|
+
float length = 12;
|
|
167
|
+
float width = 13;
|
|
168
|
+
float height = 14;
|
|
169
|
+
}
|
|
170
|
+
string id = 1;
|
|
171
|
+
int32 required_quantity = 2;
|
|
172
|
+
string variant_id = 3;
|
|
173
|
+
string inventory_item_id = 4;
|
|
174
|
+
InventoryItemData inventory = 5;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
message CalculatedPrice {
|
|
178
|
+
string id = 1;
|
|
179
|
+
float calculated_amount = 2;
|
|
180
|
+
float original_amount = 3;
|
|
181
|
+
string currency_code = 4;
|
|
182
|
+
float original_amount_with_tax = 5;
|
|
183
|
+
float original_amount_without_tax = 6;
|
|
184
|
+
optional float is_calculated_price_price_list = 7;
|
|
185
|
+
optional bool is_calculated_price_tax_inclusive = 8;
|
|
186
|
+
optional float calculated_amount_with_tax = 9;
|
|
187
|
+
optional float calculated_amount_without_tax = 10;
|
|
188
|
+
optional bool is_original_price_price_list = 11;
|
|
189
|
+
optional bool is_original_price_tax_inclusive = 12;
|
|
190
|
+
optional Price calculated_price = 13;
|
|
191
|
+
optional Price original_price = 14;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
string id = 1;
|
|
195
|
+
string title = 2;
|
|
196
|
+
string sku = 3;
|
|
197
|
+
string barcode = 4;
|
|
198
|
+
string ean = 5;
|
|
199
|
+
string upc = 6;
|
|
200
|
+
bool allow_backorder = 7;
|
|
201
|
+
bool is_managed_inventory = 8;
|
|
202
|
+
string hs_code = 9;
|
|
203
|
+
string origin_country = 10;
|
|
204
|
+
string mid_code = 11;
|
|
205
|
+
string material = 12;
|
|
206
|
+
float weight = 13;
|
|
207
|
+
float length = 14;
|
|
208
|
+
float height = 15;
|
|
209
|
+
float width = 16;
|
|
210
|
+
string thumbnail = 17;
|
|
211
|
+
string product_id = 18;
|
|
212
|
+
|
|
213
|
+
CalculatedPrice calculated_price = 19;
|
|
214
|
+
repeated InventoryItem inventory_items = 20;
|
|
215
|
+
repeated Image images = 21;
|
|
216
|
+
repeated Option options = 22;
|
|
217
|
+
repeated Price prices = 23;
|
|
218
|
+
}
|
|
219
|
+
message ShippingProfile {
|
|
220
|
+
string id = 1;
|
|
221
|
+
string name = 2;
|
|
222
|
+
string type = 3;
|
|
223
|
+
map<string, string> metadata = 4;
|
|
224
|
+
}
|
|
225
|
+
string id = 1;
|
|
226
|
+
float length = 2;
|
|
227
|
+
string title = 3;
|
|
228
|
+
ProductStatus status = 4;
|
|
229
|
+
string description = 5;
|
|
230
|
+
string slug = 6;
|
|
231
|
+
string subtitle = 7;
|
|
232
|
+
string thumbnail = 8;
|
|
233
|
+
bool is_giftcard = 9;
|
|
234
|
+
float weight = 10;
|
|
235
|
+
float height = 11;
|
|
236
|
+
float width = 12;
|
|
237
|
+
string origin_country = 13;
|
|
238
|
+
string hs_code = 14;
|
|
239
|
+
string mid_code = 15;
|
|
240
|
+
string collection_id = 16;
|
|
241
|
+
string type_id = 17;
|
|
242
|
+
bool is_discountable = 18;
|
|
243
|
+
string external_id = 19;
|
|
244
|
+
|
|
245
|
+
repeated ProductVariant variants = 20;
|
|
246
|
+
Type type = 21;
|
|
247
|
+
Option options = 22;
|
|
248
|
+
repeated Image images = 23;
|
|
249
|
+
Collection collection = 24;
|
|
250
|
+
repeated Category categories = 25;
|
|
251
|
+
repeated SalesChannel sales_channels = 26;
|
|
252
|
+
repeated Tag tags = 27;
|
|
253
|
+
ShippingProfile shipping_profile = 28;
|
|
254
|
+
map<string, string> metadata = 29;
|
|
255
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "buf/validate/validate.proto";
|
|
4
|
+
import "src/proto/products/v1/entities/product/shared.proto";
|
|
5
|
+
|
|
6
|
+
message UpdateProductRequest {
|
|
7
|
+
|
|
8
|
+
string id = 1;
|
|
9
|
+
optional string title = 2;
|
|
10
|
+
optional string subtitle = 3;
|
|
11
|
+
optional string description = 4;
|
|
12
|
+
optional bool is_giftcard = 5;
|
|
13
|
+
optional bool is_discountable = 6;
|
|
14
|
+
optional string thumbnail = 7;
|
|
15
|
+
optional string slug = 8;
|
|
16
|
+
optional ProductStatus status = 9;
|
|
17
|
+
optional float weight = 10;
|
|
18
|
+
optional float height = 11;
|
|
19
|
+
optional float width = 12;
|
|
20
|
+
optional float length = 13;
|
|
21
|
+
optional string hs_code = 14;
|
|
22
|
+
optional string mid_code = 15;
|
|
23
|
+
optional string origin_country = 16;
|
|
24
|
+
optional string material = 17;
|
|
25
|
+
optional string external_id = 18;
|
|
26
|
+
repeated string images = 19;
|
|
27
|
+
repeated string tags = 20;
|
|
28
|
+
repeated string categories = 21;
|
|
29
|
+
repeated string sales_channels = 22;
|
|
30
|
+
repeated ProductOption options = 23;
|
|
31
|
+
repeated Variant variants = 24;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
message UpdateProductResponse {
|
|
36
|
+
ProductResponse product = 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
message DeleteProductRequest {
|
|
41
|
+
string product_id = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message DeleteProductResponse {}
|
|
45
|
+
|
|
46
|
+
message DeleteVariantRequest {
|
|
47
|
+
string variant_id = 1;
|
|
48
|
+
string product_id = 2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message DeleteVariantResponse {}
|
|
52
|
+
|
|
53
|
+
message DeleteOptionRequest {
|
|
54
|
+
string option_id = 1;
|
|
55
|
+
string product_id = 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message DeleteOptionResponse {}
|
|
59
|
+
|
|
60
|
+
message RemoveInventoryItemRequest {
|
|
61
|
+
string inventory_item_id = 1;
|
|
62
|
+
string product_id = 2;
|
|
63
|
+
string variant_id = 3;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message RemoveInventoryItemResponse {}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import "buf/validate/validate.proto";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
message CreateTagRequest {
|
|
9
|
+
string value = 1 [
|
|
10
|
+
(buf.validate.field).string.min_len = 1,
|
|
11
|
+
(buf.validate.field).string.max_len = 100
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message CreateTagResponse {
|
|
16
|
+
string id = 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message GetTagByIDRequest {
|
|
20
|
+
string id = 1 [
|
|
21
|
+
(buf.validate.field).string.min_len = 1,
|
|
22
|
+
(buf.validate.field).string.max_len = 100
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetTagByIDResponse {
|
|
27
|
+
string id = 1;
|
|
28
|
+
string value = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message ListTagsRequest {
|
|
32
|
+
int32 offset = 1 [
|
|
33
|
+
(buf.validate.field).int32.gte = 1
|
|
34
|
+
];
|
|
35
|
+
uint32 limit = 2 [
|
|
36
|
+
(buf.validate.field).int32.gte = 1,
|
|
37
|
+
(buf.validate.field).int32.lte = 100
|
|
38
|
+
];
|
|
39
|
+
string order_by = 3;
|
|
40
|
+
string filter = 4;
|
|
41
|
+
bool ascending = 5;
|
|
42
|
+
string request_path = 6;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message ListTagsResponse {
|
|
46
|
+
repeated GetTagByIDResponse tags = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message UpdateTagRequest {
|
|
50
|
+
string id = 1 [
|
|
51
|
+
(buf.validate.field).string.min_len = 1,
|
|
52
|
+
(buf.validate.field).string.max_len = 100
|
|
53
|
+
];
|
|
54
|
+
string value = 2 [
|
|
55
|
+
(buf.validate.field).string.min_len = 1,
|
|
56
|
+
(buf.validate.field).string.max_len = 100
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message UpdateTagResponse {
|
|
61
|
+
string id = 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message DeleteTagByIDRequest {
|
|
65
|
+
string id = 1 [
|
|
66
|
+
(buf.validate.field).string.min_len = 1,
|
|
67
|
+
(buf.validate.field).string.max_len = 100
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message DeleteTagByIDResponse {
|
|
72
|
+
string id = 1;
|
|
73
|
+
}
|