@restorecommerce/protos 0.4.5

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 (61) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/LICENSE +19 -0
  3. package/README.md +9 -0
  4. package/google/protobuf/any.proto +133 -0
  5. package/google/protobuf/descriptor.proto +805 -0
  6. package/google/protobuf/empty.proto +53 -0
  7. package/google/protobuf/struct.proto +96 -0
  8. package/google/protobuf/wrappers.proto +123 -0
  9. package/grpc/health/v1/health.proto +50 -0
  10. package/grpc/reflection/v1alpha/reflection.proto +154 -0
  11. package/io/restorecommerce/access_control.proto +48 -0
  12. package/io/restorecommerce/address.proto +65 -0
  13. package/io/restorecommerce/attribute.proto +13 -0
  14. package/io/restorecommerce/auth.proto +48 -0
  15. package/io/restorecommerce/authentication_log.proto +56 -0
  16. package/io/restorecommerce/command.proto +57 -0
  17. package/io/restorecommerce/commandinterface.proto +30 -0
  18. package/io/restorecommerce/contact_point.proto +49 -0
  19. package/io/restorecommerce/contact_point_type.proto +46 -0
  20. package/io/restorecommerce/country.proto +49 -0
  21. package/io/restorecommerce/credential.proto +51 -0
  22. package/io/restorecommerce/customer.proto +63 -0
  23. package/io/restorecommerce/filter.proto +38 -0
  24. package/io/restorecommerce/fulfillment.proto +199 -0
  25. package/io/restorecommerce/fulfillment_courier.proto +54 -0
  26. package/io/restorecommerce/fulfillment_product.proto +49 -0
  27. package/io/restorecommerce/graph.proto +76 -0
  28. package/io/restorecommerce/image.proto +24 -0
  29. package/io/restorecommerce/invoice.proto +121 -0
  30. package/io/restorecommerce/job.proto +173 -0
  31. package/io/restorecommerce/locale.proto +47 -0
  32. package/io/restorecommerce/location.proto +53 -0
  33. package/io/restorecommerce/manufacturer.proto +45 -0
  34. package/io/restorecommerce/meta.proto +15 -0
  35. package/io/restorecommerce/notification.proto +52 -0
  36. package/io/restorecommerce/notification_channel.proto +50 -0
  37. package/io/restorecommerce/notification_req.proto +49 -0
  38. package/io/restorecommerce/order.proto +121 -0
  39. package/io/restorecommerce/organization.proto +63 -0
  40. package/io/restorecommerce/ostorage.proto +154 -0
  41. package/io/restorecommerce/payment.proto +115 -0
  42. package/io/restorecommerce/payment_method.proto +60 -0
  43. package/io/restorecommerce/policy.proto +59 -0
  44. package/io/restorecommerce/policy_set.proto +53 -0
  45. package/io/restorecommerce/price_group.proto +45 -0
  46. package/io/restorecommerce/product.proto +101 -0
  47. package/io/restorecommerce/product_category.proto +53 -0
  48. package/io/restorecommerce/product_prototype.proto +47 -0
  49. package/io/restorecommerce/rendering.proto +34 -0
  50. package/io/restorecommerce/resource_base.proto +137 -0
  51. package/io/restorecommerce/role.proto +45 -0
  52. package/io/restorecommerce/rule.proto +86 -0
  53. package/io/restorecommerce/search.proto +21 -0
  54. package/io/restorecommerce/status.proto +26 -0
  55. package/io/restorecommerce/tax.proto +49 -0
  56. package/io/restorecommerce/tax_type.proto +47 -0
  57. package/io/restorecommerce/timezone.proto +46 -0
  58. package/io/restorecommerce/token.proto +36 -0
  59. package/io/restorecommerce/user.proto +258 -0
  60. package/package.json +19 -0
  61. package/test/test.proto +71 -0
@@ -0,0 +1,49 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.fulfillment_courier;
4
+
5
+ import "google/protobuf/any.proto";
6
+ import "io/restorecommerce/resource_base.proto";
7
+ import "io/restorecommerce/meta.proto";
8
+ import "io/restorecommerce/auth.proto";
9
+ import "io/restorecommerce/status.proto";
10
+
11
+ /**
12
+ Microservice defination
13
+ */
14
+
15
+ service Service {
16
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ProductResponseList);
17
+ rpc Create (ProductList) returns (ProductResponseList);
18
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
19
+ rpc Update (ProductList) returns (ProductResponseList);
20
+ rpc Upsert (ProductList) returns (ProductResponseList);
21
+ }
22
+
23
+ message Product {
24
+ string id = 1;
25
+ string uks_id = 2;
26
+ string courier_id = 3;
27
+ string name = 4;
28
+ string description = 5;
29
+ string account_number = 6;
30
+ io.restorecommerce.meta.Meta meta = 7;
31
+ google.protobuf.Any options = 8;
32
+ }
33
+
34
+ message ProductList {
35
+ repeated Product items = 1;
36
+ uint32 total_count = 2;
37
+ io.restorecommerce.auth.Subject subject = 3;
38
+ }
39
+
40
+ message ProductResponse {
41
+ Product payload = 1;
42
+ io.restorecommerce.status.Status status = 2;
43
+ }
44
+
45
+ message ProductResponseList {
46
+ repeated ProductResponse items = 1;
47
+ uint32 total_count = 2;
48
+ io.restorecommerce.status.OperationStatus operation_status = 3;
49
+ }
@@ -0,0 +1,76 @@
1
+ syntax = "proto3";
2
+ package io.restorecommerce.graph;
3
+ import "google/protobuf/any.proto";
4
+ import "io/restorecommerce/auth.proto";
5
+
6
+ // Service provides the CRUD operations
7
+ service Service {
8
+ rpc Traversal (TraversalRequest) returns (stream TraversalResponse);
9
+ }
10
+
11
+ message TraversalRequest {
12
+ message StartVertices {
13
+ repeated string vertices = 1;
14
+ }
15
+
16
+ // Document handle either _id or _key value
17
+ oneof vertex {
18
+ string start_vertex = 1;
19
+ StartVertices start_vertices = 2;
20
+ }
21
+
22
+ // Filter based on fieldName|operation, value|list
23
+ Options opts = 3;
24
+ string collection_name = 4;
25
+ string edge_name = 5;
26
+ bool data = 6;
27
+ bool path = 7;
28
+ bool aql = 8;
29
+ io.restorecommerce.auth.Subject subject = 9;
30
+ }
31
+
32
+ message TraversalResponse {
33
+ repeated VertexFields vertex_fields = 1;
34
+ google.protobuf.Any paths = 2;
35
+ google.protobuf.Any data = 3;
36
+ }
37
+
38
+ message VertexFields {
39
+ string id = 1;
40
+ string key = 2;
41
+ string rev = 3;
42
+ }
43
+
44
+ message Options {
45
+ string sort = 1; // JS code
46
+ string direction = 2; // either inbound or outbound
47
+ uint32 min_depth = 3; // ANDed with any existing filters): visits only nodes in at least the given depth
48
+ string start_vertex = 4; // id of the startVertex
49
+ string visitor = 5; // JS code
50
+ string item_order = 6; // item iteration order can be "forward" or "backward"
51
+ string strategy = 7; // traversal strategy can be "depthfirst" or "breadthfirst"
52
+ repeated Filter filter = 8; // JS code
53
+ string init = 9; // JS code
54
+ uint32 max_iterations = 10; // maximum number of iterations in each traversal
55
+ uint32 max_depth = 11; // ANDed with any existing filters visits only nodes in at most the given depth
56
+ Uniqueness uniqueness = 12; // specifies uniqueness for vertices and edges visited
57
+ string order = 13; // "preorder", "postorder" or "preorder-expander"
58
+ string graph_name = 14; // name of graph that contains the edges
59
+ repeated Expander expander = 15; // JS code
60
+ string edge_collection = 16; // name of the collection that contains the edges
61
+ bool lowest_common_ancestor = 17;
62
+ }
63
+
64
+ message Filter {
65
+ string vertex = 1; // exclude these vertices
66
+ }
67
+
68
+ message Expander {
69
+ string edge = 1; // expand these edges
70
+ string direction = 2;
71
+ }
72
+
73
+ message Uniqueness {
74
+ string vertices = 1; // "none"|"global"|"path" for unique vertices
75
+ string edges = 2; // "none"|"global"|"path" for unique edges
76
+ }
@@ -0,0 +1,24 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.image;
4
+
5
+ // ProductCategory resource
6
+ message Image {
7
+ string id = 1;
8
+ string caption = 2;
9
+ string filename = 3;
10
+ string content_type = 4;
11
+ string url = 5;
12
+ double width = 6;
13
+ double height = 7;
14
+ double length = 8;
15
+ }
16
+
17
+ message ImageList {
18
+ repeated Image items = 1;
19
+ uint32 total_count = 2;
20
+ }
21
+
22
+ message Deleted {
23
+ string id = 1;
24
+ }
@@ -0,0 +1,121 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.invoice;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/organization.proto";
8
+ import "io/restorecommerce/auth.proto";
9
+ import "google/protobuf/any.proto";
10
+ import "io/restorecommerce/status.proto";
11
+
12
+ /*
13
+ * Microservice definition.
14
+ */
15
+ service Service {
16
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (InvoiceListResponse);
17
+ rpc Create (InvoiceList) returns (InvoiceListResponse);
18
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
19
+ rpc Update (InvoiceList) returns (InvoiceListResponse);
20
+ rpc Upsert (InvoiceList) returns (InvoiceListResponse);
21
+ }
22
+
23
+ message Deleted {
24
+ string id = 1;
25
+ }
26
+
27
+ /*
28
+ * For multiple invoices
29
+ */
30
+ message InvoiceList {
31
+ repeated Invoice items = 1;
32
+ uint32 total_count = 2;
33
+ io.restorecommerce.auth.Subject subject = 3;
34
+ }
35
+
36
+ message InvoiceListResponse {
37
+ repeated InvoiceResponse items = 1;
38
+ uint32 total_count = 2;
39
+ io.restorecommerce.status.OperationStatus operation_status = 3;
40
+ }
41
+
42
+ message InvoiceResponse {
43
+ Invoice payload = 1;
44
+ io.restorecommerce.status.Status status = 2;
45
+ }
46
+
47
+ /*
48
+ * A simple invoice.
49
+ */
50
+ message Invoice {
51
+ string id = 1;
52
+ io.restorecommerce.meta.Meta meta = 2;
53
+ string timestamp = 4;
54
+ string customer_id = 5;
55
+ string payment_status = 6;
56
+ double total_amount = 7;
57
+ double net_amount = 8;
58
+ double vat_amount = 9; // difference between net and total
59
+ string document = 10;
60
+ string invoice_number = 11;
61
+ string customer_remark = 12;
62
+ }
63
+
64
+ /**
65
+ * List of Invoice Positions data
66
+ */
67
+ message InvoicesPositionsData {
68
+ repeated InvoicePositions invoices_positions_data = 1;
69
+ }
70
+
71
+ message InvoicePositions {
72
+ string id = 1; // contract or customer identifier
73
+ repeated InvoicePosition invoice_positions = 2;
74
+ RecipientCustomer recipient_customer = 3;
75
+ BillingAddress recipient_billing_address = 4;
76
+ BillingAddress sender_billing_address = 5;
77
+ io.restorecommerce.organization.Organization recipient_organization = 6;
78
+ io.restorecommerce.organization.Organization sender_organization = 7;
79
+ google.protobuf.Any payment_method_details = 8;
80
+ }
81
+
82
+ message RecipientCustomer {
83
+ string id = 1; // customer id - used to store the resource in DB
84
+ string customer_number = 2; // displayed in invoice - auto generated per customer
85
+ }
86
+
87
+ message BillingAddress {
88
+ string email = 1;
89
+ string website = 2;
90
+ string street = 3;
91
+ string building_number = 4;
92
+ string postcode = 5;
93
+ string region = 6;
94
+ string country_name = 7;
95
+ string telephone = 9;
96
+ string timezone = 10;
97
+ string economic_area = 11;
98
+ }
99
+
100
+ message InvoicePosition {
101
+ string currency = 1;
102
+ repeated InvoiceRow tableList = 2;
103
+ InvoicePrice totalPrice = 3;
104
+ }
105
+
106
+ message InvoiceRow {
107
+ string product = 1;
108
+ uint32 pricePerUnit = 2;
109
+ uint32 quantity = 3;
110
+ string vat = 4;
111
+ uint32 amount = 5;
112
+ }
113
+
114
+ message InvoicePrice {
115
+ uint32 gross = 1;
116
+ uint32 net = 2;
117
+ }
118
+
119
+ message TriggerInvoices {
120
+ repeated string ids = 1; // list of id referring to contract_ids or customer_ids
121
+ }
@@ -0,0 +1,173 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.job;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "google/protobuf/any.proto";
7
+ import "io/restorecommerce/meta.proto";
8
+ import "io/restorecommerce/auth.proto";
9
+ import "io/restorecommerce/status.proto";
10
+
11
+ /**
12
+ * The microservice for scheduling jobs.
13
+ * Provides CRUD operations.
14
+ */
15
+ service Service {
16
+ rpc Read (JobReadRequest) returns (JobListResponse);
17
+ rpc Create (JobList) returns (JobListResponse);
18
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
19
+ rpc Update (JobList) returns (JobListResponse);
20
+ rpc Upsert (JobList) returns (JobListResponse);
21
+ }
22
+
23
+ /**
24
+ * A Kafka event.
25
+ * Send when a job resource got deleted.
26
+ */
27
+ message Deleted {
28
+ string id = 1;
29
+ }
30
+
31
+ /**
32
+ * A list of jobs.
33
+ */
34
+ message JobList {
35
+ repeated Job items = 1;
36
+ uint32 total_count = 2;
37
+ io.restorecommerce.auth.Subject subject = 3;
38
+ }
39
+
40
+ message JobListResponse {
41
+ repeated JobResponse items = 1;
42
+ uint32 total_count = 2;
43
+ io.restorecommerce.status.OperationStatus operation_status = 3;
44
+ }
45
+
46
+ message JobResponse {
47
+ Job payload = 1;
48
+ io.restorecommerce.status.Status status = 2;
49
+ }
50
+
51
+ /**
52
+ * A Job resource
53
+ */
54
+ message Job {
55
+ string id = 1; // Job ID
56
+
57
+ string type = 11; // Job type
58
+ Data data = 12; // Job-specific data with variable payload
59
+
60
+ string when = 21; // Used to specify the time at which the job is run
61
+
62
+ JobOptions options = 30; // The job options
63
+ }
64
+
65
+ /**
66
+ * Job Options
67
+ */
68
+ message JobOptions {
69
+ enum Priority {
70
+ NORMAL = 0;
71
+ LOW = 10;
72
+ MEDIUM = -5;
73
+ HIGH = -10;
74
+ CRITICAL = -15;
75
+ }
76
+
77
+ Priority priority = 13; // Job priority
78
+ uint32 attempts = 14; // Amount of possible failing runs until job fails
79
+ Backoff backoff = 15; // Delay settings between failed job runs
80
+ uint32 timeout = 16; // The number of milliseconds after which the job should be fail with a timeout error
81
+
82
+ Repeat repeat = 20; // Used for periodic jobs
83
+ string jobId = 21; // To override the job ID - by default, the job ID is a unique generated by bull
84
+ bool removeOnComplete = 22; // If true, removes the job when it successfully completes
85
+ }
86
+
87
+ message Repeat {
88
+ uint32 every = 1;
89
+ string cron = 2;
90
+ string startDate = 3;
91
+ string endDate = 4;
92
+ uint32 count = 5;
93
+ string jobId = 6; // To override the job ID - by default, the job ID is a unique generated by bull
94
+ }
95
+
96
+ // Data which is stored within a job instance
97
+ message Data {
98
+ string timezone = 1;
99
+ google.protobuf.Any payload = 2; // optional variable payload
100
+ io.restorecommerce.meta.Meta meta = 3;
101
+ string subject_id = 4; // id of job creator
102
+ }
103
+
104
+ /**
105
+ * A scheduled Job.
106
+ * Emitted to Kafka by the scheduling service with event name 'queuedJob' and retreived by a service which processes this job.
107
+ */
108
+ message ScheduledJob {
109
+ string id = 1; // Job instance ID
110
+ string type = 2;
111
+ Data data = 3; // Job-specific data with variable payload
112
+ string schedule_type = 4; // Type of schedule (ONCE, RECURR, etc)
113
+ }
114
+
115
+ /**
116
+ * A finished scheduled Job.
117
+ * Emitted to Kafka by the service which processed the job with event name 'done' and retrieved by the scheduling service.
118
+ */
119
+ message JobDone {
120
+ string id = 1; // Job instance ID
121
+ string schedule_type = 2; // Type of schedule (ONCE, RECURR, etc)
122
+ bool delete_scheduled = 3; // Whether to delete scheduled job
123
+ string type = 4; // Job type
124
+ google.protobuf.Any result = 5;
125
+ }
126
+
127
+ /**
128
+ * A failed scheduled Job event from the Job Service.
129
+ * Emitted to Kafka by the service which processed the Job and retrieved by the scheduling service.
130
+ */
131
+ message JobFailed {
132
+ string id = 1; // Job instance ID
133
+ string error = 2; // Error message
134
+ string schedule_type = 3; // Type of job ex: ONCE, RECURR etc.
135
+ string type = 4; // Job type
136
+ }
137
+
138
+ /**
139
+ * Delay between retries.
140
+ */
141
+ message Backoff {
142
+ enum Type {
143
+ FIXED = 0; // Retry with the same delay
144
+ EXPONENTIAL = 1; // Exponential delay increase between retries
145
+ }
146
+ double delay = 1; // Time until retry in milliseconds
147
+ Type type = 2; // Calculation of the delay
148
+ }
149
+
150
+ // Job-specific read request
151
+ message JobReadRequest {
152
+ uint32 limit = 1;
153
+ // only possible to sort jobs by creation date
154
+ enum SortOrder {
155
+ UNSORTED = 0;
156
+ ASCENDING = 1;
157
+ DESCENDING = 2;
158
+ }
159
+ SortOrder sort = 2;
160
+
161
+ // Filter based on fieldName|operation, value|list
162
+ JobFilter filter = 4;
163
+
164
+ // Fields selector
165
+ repeated io.restorecommerce.resourcebase.FieldFilter field = 3;
166
+ io.restorecommerce.auth.Subject subject = 5;
167
+ }
168
+
169
+ // filter
170
+ message JobFilter {
171
+ repeated string job_ids = 1;
172
+ string type = 2;
173
+ }
@@ -0,0 +1,47 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.locale;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ /*
11
+ * Microservice definition.
12
+ */
13
+ service Service {
14
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (LocaleListResponse);
15
+ rpc Create (LocaleList) returns (LocaleListResponse);
16
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
17
+ rpc Update (LocaleList) returns (LocaleListResponse);
18
+ rpc Upsert (LocaleList) returns (LocaleListResponse);
19
+ }
20
+
21
+ message Deleted {
22
+ string id = 1;
23
+ }
24
+
25
+ message LocaleList {
26
+ repeated Locale items = 1;
27
+ uint32 total_count = 2;
28
+ io.restorecommerce.auth.Subject subject = 3;
29
+ }
30
+
31
+ message LocaleListResponse {
32
+ repeated LocaleResponse items = 1;
33
+ uint32 total_count = 2;
34
+ io.restorecommerce.status.OperationStatus operation_status = 3;
35
+ }
36
+
37
+ message LocaleResponse {
38
+ Locale payload = 1;
39
+ io.restorecommerce.status.Status status = 2;
40
+ }
41
+
42
+ message Locale {
43
+ string id = 1;
44
+ io.restorecommerce.meta.Meta meta = 2;
45
+ string value = 3;
46
+ string description = 4;
47
+ }
@@ -0,0 +1,53 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.location;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "google/protobuf/any.proto";
7
+ import "io/restorecommerce/meta.proto";
8
+ import "io/restorecommerce/auth.proto";
9
+ import "io/restorecommerce/status.proto";
10
+
11
+ /*
12
+ * Microservice definition.
13
+ */
14
+ service Service {
15
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (LocationListResponse);
16
+ rpc Create (LocationList) returns (LocationListResponse);
17
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
18
+ rpc Update (LocationList) returns (LocationListResponse);
19
+ rpc Upsert (LocationList) returns (LocationListResponse);
20
+ }
21
+
22
+ message Deleted {
23
+ string id = 1;
24
+ }
25
+
26
+ message LocationList {
27
+ repeated Location items = 1;
28
+ uint32 total_count = 2;
29
+ io.restorecommerce.auth.Subject subject = 3;
30
+ }
31
+
32
+ message LocationListResponse {
33
+ repeated LocationResponse items = 1;
34
+ uint32 total_count = 2;
35
+ io.restorecommerce.status.OperationStatus operation_status = 3;
36
+ }
37
+
38
+ message LocationResponse {
39
+ Location payload = 1;
40
+ io.restorecommerce.status.Status status = 2;
41
+ }
42
+
43
+ message Location {
44
+ string id = 1; // Location ID, unique, key
45
+ io.restorecommerce.meta.Meta meta = 2;
46
+ string name = 3; // Location name
47
+ string description = 4;
48
+ string organization_id = 5; // Organization to which this location is linked
49
+ string parent_id = 6; // Location which may contain this location; may be null
50
+ repeated string children_ids = 7; // Locations contained in this location
51
+ string address_id = 8;
52
+ google.protobuf.Any data = 9; /// additional data
53
+ }
@@ -0,0 +1,45 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.manufacturer;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ // Manufacturer resource
11
+ message Manufacturer {
12
+ string id = 1;
13
+ io.restorecommerce.meta.Meta meta = 2;
14
+ string name = 3;
15
+ string description = 4;
16
+ }
17
+
18
+ message ManufacturerList {
19
+ repeated Manufacturer items = 1;
20
+ uint32 total_count = 2;
21
+ io.restorecommerce.auth.Subject subject = 3;
22
+ }
23
+
24
+ message ManufacturerListResponse {
25
+ repeated ManufacturerResponse items = 1;
26
+ uint32 total_count = 2;
27
+ io.restorecommerce.status.OperationStatus operation_status = 3;
28
+ }
29
+
30
+ message ManufacturerResponse {
31
+ Manufacturer payload = 1;
32
+ io.restorecommerce.status.Status status = 2;
33
+ }
34
+
35
+ message Deleted {
36
+ string id = 1;
37
+ }
38
+
39
+ service Service {
40
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ManufacturerListResponse);
41
+ rpc Create (ManufacturerList) returns (ManufacturerListResponse);
42
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
43
+ rpc Update (ManufacturerList) returns (ManufacturerListResponse);
44
+ rpc Upsert (ManufacturerList) returns (ManufacturerListResponse);
45
+ }
@@ -0,0 +1,15 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.meta;
4
+
5
+ import "io/restorecommerce/attribute.proto";
6
+
7
+ // meta properties common to all resources
8
+
9
+ message Meta {
10
+ double created = 1; // timestamp
11
+ double modified = 2; // timestamp
12
+ string modified_by = 3; // ID from last User who modified it
13
+ repeated io.restorecommerce.attribute.Attribute owner = 4;
14
+ repeated io.restorecommerce.attribute.AttributeObj acl = 5;
15
+ }
@@ -0,0 +1,52 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.notification;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ // Message structure for Notification
11
+ service Service {
12
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (NotificationListResponse);
13
+ rpc Create (NotificationList) returns (NotificationListResponse);
14
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
15
+ rpc Update (NotificationList) returns (NotificationListResponse);
16
+ rpc Upsert (NotificationList) returns (NotificationListResponse);
17
+ }
18
+
19
+ message Deleted {
20
+ string id = 1;
21
+ }
22
+
23
+ message NotificationList {
24
+ repeated Notification items = 1;
25
+ uint32 total_count = 2;
26
+ io.restorecommerce.auth.Subject subject = 3;
27
+ }
28
+
29
+ message NotificationListResponse {
30
+ repeated NotificationResponse items = 1;
31
+ uint32 total_count = 2;
32
+ io.restorecommerce.status.OperationStatus operation_status = 3;
33
+ }
34
+
35
+ message NotificationResponse {
36
+ Notification items = 1;
37
+ io.restorecommerce.status.Status status = 2;
38
+ }
39
+
40
+ message Notification {
41
+ string id = 1;
42
+ io.restorecommerce.meta.Meta meta = 2;
43
+ string name = 3;
44
+ string description = 4;
45
+ repeated string notification_channel_ids = 5;
46
+ oneof address_type {
47
+ string email = 6;
48
+ string telephone_number = 7;
49
+ }
50
+ string subject_template = 8;
51
+ string body_template = 9;
52
+ }