@restorecommerce/protos 2.0.2 → 3.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +336 -0
  2. package/google/protobuf/timestamp.proto +147 -0
  3. package/io/restorecommerce/access_control.proto +3 -5
  4. package/io/restorecommerce/address.proto +38 -37
  5. package/io/restorecommerce/attribute.proto +4 -4
  6. package/io/restorecommerce/auth.proto +15 -15
  7. package/io/restorecommerce/authentication_log.proto +12 -14
  8. package/io/restorecommerce/command.proto +10 -12
  9. package/io/restorecommerce/commandinterface.proto +3 -4
  10. package/io/restorecommerce/contact_point.proto +11 -13
  11. package/io/restorecommerce/contact_point_type.proto +5 -7
  12. package/io/restorecommerce/country.proto +7 -9
  13. package/io/restorecommerce/credential.proto +9 -9
  14. package/io/restorecommerce/customer.proto +9 -11
  15. package/io/restorecommerce/file.proto +23 -0
  16. package/io/restorecommerce/filter.proto +1 -1
  17. package/io/restorecommerce/fulfillment.proto +87 -104
  18. package/io/restorecommerce/fulfillment_courier.proto +15 -17
  19. package/io/restorecommerce/fulfillment_product.proto +44 -47
  20. package/io/restorecommerce/geometry.proto +23 -0
  21. package/io/restorecommerce/graph.proto +17 -17
  22. package/io/restorecommerce/image.proto +13 -12
  23. package/io/restorecommerce/invoice.proto +49 -51
  24. package/io/restorecommerce/job.proto +44 -46
  25. package/io/restorecommerce/locale.proto +6 -8
  26. package/io/restorecommerce/location.proto +11 -13
  27. package/io/restorecommerce/manufacturer.proto +6 -8
  28. package/io/restorecommerce/meta.proto +5 -5
  29. package/io/restorecommerce/notification.proto +8 -10
  30. package/io/restorecommerce/notification_channel.proto +6 -6
  31. package/io/restorecommerce/notification_req.proto +16 -16
  32. package/io/restorecommerce/oauth.proto +1 -1
  33. package/io/restorecommerce/order.proto +65 -72
  34. package/io/restorecommerce/organization.proto +15 -17
  35. package/io/restorecommerce/ostorage.proto +31 -33
  36. package/io/restorecommerce/payment.proto +32 -34
  37. package/io/restorecommerce/payment_method.proto +7 -7
  38. package/io/restorecommerce/policy.proto +16 -18
  39. package/io/restorecommerce/policy_set.proto +12 -14
  40. package/io/restorecommerce/price_group.proto +6 -8
  41. package/io/restorecommerce/product.proto +146 -48
  42. package/io/restorecommerce/product_category.proto +10 -12
  43. package/io/restorecommerce/product_prototype.proto +8 -10
  44. package/io/restorecommerce/rendering.proto +2 -2
  45. package/io/restorecommerce/resource_base.proto +20 -20
  46. package/io/restorecommerce/role.proto +6 -8
  47. package/io/restorecommerce/rule.proto +20 -22
  48. package/io/restorecommerce/search.proto +4 -6
  49. package/io/restorecommerce/status.proto +13 -8
  50. package/io/restorecommerce/tax.proto +13 -10
  51. package/io/restorecommerce/tax_type.proto +13 -9
  52. package/io/restorecommerce/timezone.proto +5 -7
  53. package/io/restorecommerce/token.proto +11 -13
  54. package/io/restorecommerce/user.proto +46 -49
  55. package/package.json +2 -2
@@ -16,9 +16,7 @@ import "io/restorecommerce/customer.proto";
16
16
  /*
17
17
  * Microservice definition.
18
18
  */
19
- service Service {
20
- option (io.restorecommerce.options.service_name) = "invoice";
21
-
19
+ service InvoiceService {
22
20
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (InvoiceListResponse) {
23
21
  option (io.restorecommerce.options.is_query) = true;
24
22
  };
@@ -47,7 +45,7 @@ message Deleted {
47
45
  */
48
46
  message InvoiceList {
49
47
  repeated Invoice items = 1;
50
- uint32 total_count = 2;
48
+ optional uint32 total_count = 2;
51
49
  io.restorecommerce.auth.Subject subject = 3;
52
50
  }
53
51
 
@@ -66,10 +64,10 @@ message InvoiceResponse {
66
64
  * A simple invoice.
67
65
  */
68
66
  message Invoice {
69
- string id = 1;
70
- io.restorecommerce.meta.Meta meta = 2;
71
- string timestamp = 4;
72
- string customer_id = 5 [
67
+ optional string id = 1;
68
+ optional io.restorecommerce.meta.Meta meta = 2;
69
+ optional string timestamp = 4;
70
+ optional string customer_id = 5 [
73
71
  (io.restorecommerce.options.resolver) = {
74
72
  target_type: ".io.restorecommerce.customer.Customer",
75
73
  target_service: "resource",
@@ -78,74 +76,74 @@ message Invoice {
78
76
  field_name: "customer",
79
77
  }
80
78
  ];
81
- string payment_status = 6;
82
- double total_amount = 7;
83
- double net_amount = 8;
84
- double vat_amount = 9; // difference between net and total
85
- string document = 10;
86
- string invoice_number = 11;
87
- string customer_remark = 12;
79
+ optional string payment_status = 6;
80
+ optional double total_amount = 7;
81
+ optional double net_amount = 8;
82
+ optional double vat_amount = 9; // difference between net and total
83
+ optional string document = 10;
84
+ optional string invoice_number = 11;
85
+ optional string customer_remark = 12;
88
86
  }
89
87
 
90
88
  /**
91
89
  * List of Invoice Positions data
92
90
  */
93
91
  message InvoicesPositionsData {
94
- repeated InvoicePositions invoices_positions_data = 1;
92
+ repeated InvoicePositions invoice_positions = 1;
95
93
  }
96
94
 
97
95
  message InvoicePositions {
98
- string id = 1; // contract or customer identifier
96
+ optional string id = 1; // contract or customer identifier
99
97
  repeated InvoicePosition invoice_positions = 2;
100
- RecipientCustomer recipient_customer = 3;
101
- BillingAddress recipient_billing_address = 4;
102
- BillingAddress sender_billing_address = 5;
103
- io.restorecommerce.organization.Organization recipient_organization = 6;
104
- io.restorecommerce.organization.Organization sender_organization = 7;
105
- google.protobuf.Any payment_method_details = 8;
106
- string invoice_no = 9; // optional invoice number if not it will be generated by service
107
- double from_date = 10; // value performance from date
108
- double to_date = 11; // value performance to date
98
+ optional RecipientCustomer recipient_customer = 3;
99
+ optional BillingAddress recipient_billing_address = 4;
100
+ optional BillingAddress sender_billing_address = 5;
101
+ optional io.restorecommerce.organization.Organization recipient_organization = 6;
102
+ optional io.restorecommerce.organization.Organization sender_organization = 7;
103
+ optional google.protobuf.Any payment_method_details = 8;
104
+ optional string invoice_no = 9; // optional invoice number if not it will be generated by service
105
+ optional double from_date = 10; // value performance from date
106
+ optional double to_date = 11; // value performance to date
109
107
  }
110
108
 
111
109
  message RecipientCustomer {
112
- string id = 1; // customer id - used to store the resource in DB
113
- string customer_number = 2; // displayed in invoice
110
+ optional string id = 1; // customer id - used to store the resource in DB
111
+ optional string customer_number = 2; // displayed in invoice
114
112
  }
115
113
 
116
114
  message BillingAddress {
117
- string email = 1;
118
- string website = 2;
119
- string street = 3;
120
- string building_number = 4;
121
- string postcode = 5;
122
- string region = 6;
123
- string country_name = 7;
124
- string telephone = 9;
125
- string timezone = 10;
126
- string economic_area = 11;
127
- string locality = 12;
128
- string organization_name = 13;
115
+ optional string email = 1;
116
+ optional string website = 2;
117
+ optional string street = 3;
118
+ optional string building_number = 4;
119
+ optional string postcode = 5;
120
+ optional string region = 6;
121
+ optional string country_name = 7;
122
+ optional string telephone = 9;
123
+ optional string timezone = 10;
124
+ optional string economic_area = 11;
125
+ optional string locality = 12;
126
+ optional string organization_name = 13;
129
127
  }
130
128
 
131
129
  message InvoicePosition {
132
- string currency = 1;
133
- repeated InvoiceRow tableList = 2;
134
- InvoicePrice totalPrice = 3;
130
+ optional string currency = 1;
131
+ repeated InvoiceRow invoiceRows = 2;
132
+ optional InvoicePrice totalPrice = 3;
135
133
  }
136
134
 
137
135
  message InvoiceRow {
138
- string product = 1;
139
- double pricePerUnit = 2;
140
- uint32 quantity = 3;
141
- string vat = 4;
142
- double amount = 5;
143
- double contract_start_date = 6; // if there is any contract associated with product
136
+ optional string product = 1;
137
+ optional double pricePerUnit = 2;
138
+ optional uint32 quantity = 3;
139
+ optional string vat = 4;
140
+ optional double amount = 5;
141
+ optional double contract_start_date = 6; // if there is any contract associated with product
144
142
  }
145
143
 
146
144
  message InvoicePrice {
147
- double gross = 1;
148
- double net = 2;
145
+ optional double gross = 1;
146
+ optional double net = 2;
149
147
  }
150
148
 
151
149
  message TriggerInvoices {
@@ -13,9 +13,7 @@ import "io/restorecommerce/options.proto";
13
13
  * The microservice for scheduling jobs.
14
14
  * Provides CRUD operations.
15
15
  */
16
- service Service {
17
- option (io.restorecommerce.options.service_name) = "job";
18
-
16
+ service JobService {
19
17
  rpc Read (JobReadRequest) returns (JobListResponse) {
20
18
  option (io.restorecommerce.options.is_query) = true;
21
19
  };
@@ -38,7 +36,7 @@ message Deleted {
38
36
  */
39
37
  message JobList {
40
38
  repeated Job items = 1;
41
- uint32 total_count = 2;
39
+ optional uint32 total_count = 2;
42
40
  io.restorecommerce.auth.Subject subject = 3;
43
41
  }
44
42
 
@@ -57,14 +55,14 @@ message JobResponse {
57
55
  * A Job resource
58
56
  */
59
57
  message Job {
60
- string id = 1; // Job ID
58
+ optional string id = 1; // Job ID
61
59
 
62
- string type = 11; // Job type
63
- Data data = 12; // Job-specific data with variable payload
60
+ optional string type = 11; // Job type
61
+ optional Data data = 12; // Job-specific data with variable payload
64
62
 
65
- string when = 21; // Used to specify the time at which the job is run
63
+ optional string when = 21; // Used to specify the time at which the job is run
66
64
 
67
- JobOptions options = 30; // The job options
65
+ optional JobOptions options = 30; // The job options
68
66
  }
69
67
 
70
68
  /**
@@ -79,31 +77,31 @@ message JobOptions {
79
77
  CRITICAL = -15;
80
78
  }
81
79
 
82
- Priority priority = 13; // Job priority
83
- uint32 attempts = 14; // Amount of possible failing runs until job fails
84
- Backoff backoff = 15; // Delay settings between failed job runs
85
- uint32 timeout = 16; // The number of milliseconds after which the job should be fail with a timeout error
80
+ optional Priority priority = 13; // Job priority
81
+ optional uint32 attempts = 14; // Amount of possible failing runs until job fails
82
+ optional Backoff backoff = 15; // Delay settings between failed job runs
83
+ optional uint32 timeout = 16; // The number of milliseconds after which the job should be fail with a timeout error
86
84
 
87
- Repeat repeat = 20; // Used for periodic jobs
88
- string jobId = 21; // To override the job ID - by default, the job ID is a unique generated by bull
89
- bool removeOnComplete = 22; // If true, removes the job when it successfully completes
85
+ optional Repeat repeat = 20; // Used for periodic jobs
86
+ optional string jobId = 21; // To override the job ID - by default, the job ID is a unique generated by bull
87
+ optional bool removeOnComplete = 22; // If true, removes the job when it successfully completes
90
88
  }
91
89
 
92
90
  message Repeat {
93
- uint32 every = 1;
94
- string cron = 2;
95
- string startDate = 3;
96
- string endDate = 4;
97
- uint32 count = 5;
98
- string jobId = 6; // To override the job ID - by default, the job ID is a unique generated by bull
99
- string tz = 7; // time zone
91
+ optional uint32 every = 1;
92
+ optional string cron = 2;
93
+ optional string startDate = 3;
94
+ optional string endDate = 4;
95
+ optional uint32 count = 5;
96
+ optional string jobId = 6; // To override the job ID - by default, the job ID is a unique generated by bull
97
+ optional string tz = 7; // time zone
100
98
  }
101
99
 
102
100
  // Data which is stored within a job instance
103
101
  message Data {
104
- google.protobuf.Any payload = 2; // optional variable payload
105
- io.restorecommerce.meta.Meta meta = 3;
106
- string subject_id = 4; // id of job creator
102
+ optional google.protobuf.Any payload = 2; // optional variable payload
103
+ optional io.restorecommerce.meta.Meta meta = 3;
104
+ optional string subject_id = 4; // id of job creator
107
105
  }
108
106
 
109
107
  /**
@@ -111,10 +109,10 @@ message Data {
111
109
  * Emitted to Kafka by the scheduling service with event name 'queuedJob' and retreived by a service which processes this job.
112
110
  */
113
111
  message ScheduledJob {
114
- string id = 1; // Job instance ID
115
- string type = 2;
116
- Data data = 3; // Job-specific data with variable payload
117
- string schedule_type = 4; // Type of schedule (ONCE, RECURR, etc)
112
+ optional string id = 1; // Job instance ID
113
+ optional string type = 2;
114
+ optional Data data = 3; // Job-specific data with variable payload
115
+ optional string schedule_type = 4; // Type of schedule (ONCE, RECURR, etc)
118
116
  }
119
117
 
120
118
  /**
@@ -122,11 +120,11 @@ message ScheduledJob {
122
120
  * Emitted to Kafka by the service which processed the job with event name 'done' and retrieved by the scheduling service.
123
121
  */
124
122
  message JobDone {
125
- string id = 1; // Job instance ID
126
- string schedule_type = 2; // Type of schedule (ONCE, RECURR, etc)
127
- bool delete_scheduled = 3; // Whether to delete scheduled job
128
- string type = 4; // Job type
129
- google.protobuf.Any result = 5;
123
+ optional string id = 1; // Job instance ID
124
+ optional string schedule_type = 2; // Type of schedule (ONCE, RECURR, etc)
125
+ optional bool delete_scheduled = 3; // Whether to delete scheduled job
126
+ optional string type = 4; // Job type
127
+ optional google.protobuf.Any result = 5;
130
128
  }
131
129
 
132
130
  /**
@@ -134,10 +132,10 @@ message JobDone {
134
132
  * Emitted to Kafka by the service which processed the Job and retrieved by the scheduling service.
135
133
  */
136
134
  message JobFailed {
137
- string id = 1; // Job instance ID
138
- string error = 2; // Error message
139
- string schedule_type = 3; // Type of job ex: ONCE, RECURR etc.
140
- string type = 4; // Job type
135
+ optional string id = 1; // Job instance ID
136
+ optional string error = 2; // Error message
137
+ optional string schedule_type = 3; // Type of job ex: ONCE, RECURR etc.
138
+ optional string type = 4; // Job type
141
139
  }
142
140
 
143
141
  /**
@@ -148,31 +146,31 @@ message Backoff {
148
146
  FIXED = 0; // Retry with the same delay
149
147
  EXPONENTIAL = 1; // Exponential delay increase between retries
150
148
  }
151
- double delay = 1; // Time until retry in milliseconds
152
- Type type = 2; // Calculation of the delay
149
+ optional double delay = 1; // Time until retry in milliseconds
150
+ optional Type type = 2; // Calculation of the delay
153
151
  }
154
152
 
155
153
  // Job-specific read request
156
154
  message JobReadRequest {
157
- uint32 limit = 1;
155
+ optional uint32 limit = 1;
158
156
  // only possible to sort jobs by creation date
159
157
  enum SortOrder {
160
158
  UNSORTED = 0;
161
159
  ASCENDING = 1;
162
160
  DESCENDING = 2;
163
161
  }
164
- SortOrder sort = 2;
162
+ optional SortOrder sort = 2;
165
163
 
166
164
  // Filter based on fieldName|operation, value|list
167
- JobFilter filter = 4;
165
+ optional JobFilter filter = 4;
168
166
 
169
167
  // Fields selector
170
- repeated io.restorecommerce.resourcebase.FieldFilter field = 3;
168
+ repeated io.restorecommerce.resourcebase.FieldFilter fields = 3;
171
169
  io.restorecommerce.auth.Subject subject = 5;
172
170
  }
173
171
 
174
172
  // filter
175
173
  message JobFilter {
176
174
  repeated string job_ids = 1;
177
- string type = 2;
175
+ optional string type = 2;
178
176
  }
@@ -11,9 +11,7 @@ import "io/restorecommerce/options.proto";
11
11
  /*
12
12
  * Microservice definition.
13
13
  */
14
- service Service {
15
- option (io.restorecommerce.options.service_name) = "locale";
16
-
14
+ service LocaleService {
17
15
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (LocaleListResponse) {
18
16
  option (io.restorecommerce.options.is_query) = true;
19
17
  };
@@ -29,7 +27,7 @@ message Deleted {
29
27
 
30
28
  message LocaleList {
31
29
  repeated Locale items = 1;
32
- uint32 total_count = 2;
30
+ optional uint32 total_count = 2;
33
31
  io.restorecommerce.auth.Subject subject = 3;
34
32
  }
35
33
 
@@ -45,8 +43,8 @@ message LocaleResponse {
45
43
  }
46
44
 
47
45
  message Locale {
48
- string id = 1;
49
- io.restorecommerce.meta.Meta meta = 2;
50
- string value = 3;
51
- string description = 4;
46
+ optional string id = 1;
47
+ optional io.restorecommerce.meta.Meta meta = 2;
48
+ optional string value = 3;
49
+ optional string description = 4;
52
50
  }
@@ -16,9 +16,7 @@ import "io/restorecommerce/address.proto";
16
16
  /*
17
17
  * Microservice definition.
18
18
  */
19
- service Service {
20
- option (io.restorecommerce.options.service_name) = "location";
21
-
19
+ service LocationService {
22
20
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (LocationListResponse) {
23
21
  option (io.restorecommerce.options.is_query) = true;
24
22
  };
@@ -34,7 +32,7 @@ message Deleted {
34
32
 
35
33
  message LocationList {
36
34
  repeated Location items = 1;
37
- uint32 total_count = 2;
35
+ optional uint32 total_count = 2;
38
36
  io.restorecommerce.auth.Subject subject = 3;
39
37
  }
40
38
 
@@ -50,11 +48,11 @@ message LocationResponse {
50
48
  }
51
49
 
52
50
  message Location {
53
- string id = 1; // Location ID, unique, key
54
- io.restorecommerce.meta.Meta meta = 2;
55
- string name = 3; // Location name
56
- string description = 4;
57
- string organization_id = 5 [
51
+ optional string id = 1; // Location ID, unique, key
52
+ optional io.restorecommerce.meta.Meta meta = 2;
53
+ optional string name = 3; // Location name
54
+ optional string description = 4;
55
+ optional string organization_id = 5 [
58
56
  (io.restorecommerce.options.resolver) = {
59
57
  target_type: ".io.restorecommerce.organization.Organization",
60
58
  target_service: "resource",
@@ -63,7 +61,7 @@ message Location {
63
61
  field_name: "organization",
64
62
  }
65
63
  ]; // Organization to which this location is linked
66
- string parent_id = 6 [
64
+ optional string parent_id = 6 [
67
65
  (io.restorecommerce.options.resolver) = {
68
66
  target_type: ".io.restorecommerce.location.Location",
69
67
  target_service: "resource",
@@ -72,7 +70,7 @@ message Location {
72
70
  field_name: "parent",
73
71
  }
74
72
  ]; // Location which may contain this location; may be null
75
- string address_id = 8 [
73
+ optional string address_id = 8 [
76
74
  (io.restorecommerce.options.resolver) = {
77
75
  target_type: ".io.restorecommerce.address.Address",
78
76
  target_service: "resource",
@@ -81,6 +79,6 @@ message Location {
81
79
  field_name: "address",
82
80
  }
83
81
  ];
84
- google.protobuf.Any data = 9; /// additional data
85
- string type = 10; // location type
82
+ optional google.protobuf.Any data = 9; /// additional data
83
+ optional string type = 10; // location type
86
84
  }
@@ -10,15 +10,15 @@ import "io/restorecommerce/options.proto";
10
10
 
11
11
  // Manufacturer resource
12
12
  message Manufacturer {
13
- string id = 1;
14
- io.restorecommerce.meta.Meta meta = 2;
15
- string name = 3;
16
- string description = 4;
13
+ optional string id = 1;
14
+ optional io.restorecommerce.meta.Meta meta = 2;
15
+ optional string name = 3;
16
+ optional string description = 4;
17
17
  }
18
18
 
19
19
  message ManufacturerList {
20
20
  repeated Manufacturer items = 1;
21
- uint32 total_count = 2;
21
+ optional uint32 total_count = 2;
22
22
  io.restorecommerce.auth.Subject subject = 3;
23
23
  }
24
24
 
@@ -37,9 +37,7 @@ message Deleted {
37
37
  string id = 1;
38
38
  }
39
39
 
40
- service Service {
41
- option (io.restorecommerce.options.service_name) = "manufacturer";
42
-
40
+ service ManufacturerService {
43
41
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ManufacturerListResponse) {
44
42
  option (io.restorecommerce.options.is_query) = true;
45
43
  };
@@ -7,9 +7,9 @@ import "io/restorecommerce/attribute.proto";
7
7
  // meta properties common to all resources
8
8
 
9
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;
10
+ optional double created = 1; // timestamp
11
+ optional double modified = 2; // timestamp
12
+ optional string modified_by = 3; // ID from last User who modified it
13
+ repeated io.restorecommerce.attribute.Attribute owners = 4;
14
+ repeated io.restorecommerce.attribute.AttributeObj acls = 5;
15
15
  }
@@ -9,9 +9,7 @@ import "io/restorecommerce/status.proto";
9
9
  import "io/restorecommerce/options.proto";
10
10
 
11
11
  // Message structure for Notification
12
- service Service {
13
- option (io.restorecommerce.options.service_name) = "notification";
14
-
12
+ service NotificationService {
15
13
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (NotificationListResponse) {
16
14
  option (io.restorecommerce.options.is_query) = true;
17
15
  };
@@ -27,7 +25,7 @@ message Deleted {
27
25
 
28
26
  message NotificationList {
29
27
  repeated Notification items = 1;
30
- uint32 total_count = 2;
28
+ optional uint32 total_count = 2;
31
29
  io.restorecommerce.auth.Subject subject = 3;
32
30
  }
33
31
 
@@ -43,15 +41,15 @@ message NotificationResponse {
43
41
  }
44
42
 
45
43
  message Notification {
46
- string id = 1;
47
- io.restorecommerce.meta.Meta meta = 2;
48
- string name = 3;
49
- string description = 4;
44
+ optional string id = 1;
45
+ optional io.restorecommerce.meta.Meta meta = 2;
46
+ optional string name = 3;
47
+ optional string description = 4;
50
48
  repeated string notification_channel_ids = 5;
51
49
  oneof address_type {
52
50
  string email = 6;
53
51
  string telephone_number = 7;
54
52
  }
55
- string subject_template = 8;
56
- string body_template = 9;
53
+ optional string subject_template = 8;
54
+ optional string body_template = 9;
57
55
  }
@@ -8,7 +8,7 @@ import "io/restorecommerce/auth.proto";
8
8
  import "io/restorecommerce/status.proto";
9
9
 
10
10
  // Message structure for Notification Channel
11
- service Service {
11
+ service NotificationChannelService {
12
12
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (NotificationChannelListResponse);
13
13
  rpc Create (NotificationChannelList) returns (NotificationChannelListResponse);
14
14
  rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
@@ -22,7 +22,7 @@ message Deleted {
22
22
 
23
23
  message NotificationChannelList {
24
24
  repeated NotificationChannel items = 1;
25
- uint32 total_count = 2;
25
+ optional uint32 total_count = 2;
26
26
  io.restorecommerce.auth.Subject subject = 3;
27
27
  }
28
28
 
@@ -38,10 +38,10 @@ message NotificationChannelResponse {
38
38
  }
39
39
 
40
40
  message NotificationChannel {
41
- string id = 1;
42
- io.restorecommerce.meta.Meta meta = 2;
43
- string name = 3;
44
- string description = 4;
41
+ optional string id = 1;
42
+ optional io.restorecommerce.meta.Meta meta = 2;
43
+ optional string name = 3;
44
+ optional string description = 4;
45
45
  oneof configuration_type {
46
46
  string email = 5;
47
47
  string sms = 6;
@@ -4,24 +4,24 @@ package io.restorecommerce.notification_req;
4
4
 
5
5
  import "io/restorecommerce/status.proto";
6
6
 
7
- service Service {
7
+ service NotificationReqService {
8
8
  // direct notifications
9
9
  rpc Send (NotificationReq) returns (io.restorecommerce.status.OperationStatusObj); /// generic fallback
10
10
  }
11
11
 
12
12
  // mimics nodemailer properties for easy configuration
13
13
  message Attachment {
14
- string filename = 1;
14
+ optional string filename = 1;
15
15
 
16
16
  // the "content" may be on of the following:
17
- string text = 2; // for textual data
18
- bytes buffer = 3; // for binary data, eg.: images
19
-
20
- string path = 4;
21
- string content_type = 5;
22
- string content_disposition = 6;
23
- string cid = 7;
24
- string encoding = 8;
17
+ optional string text = 2; // for textual data
18
+ optional bytes buffer = 3; // for binary data, eg.: images
19
+
20
+ optional string path = 4;
21
+ optional string content_type = 5;
22
+ optional string content_disposition = 6;
23
+ optional string cid = 7;
24
+ optional string encoding = 8;
25
25
  }
26
26
 
27
27
  // sendEmail NotificationReq event
@@ -30,10 +30,10 @@ message NotificationReq {
30
30
  Email email = 1;
31
31
  Log log = 2;
32
32
  }
33
- string subject = 3;
34
- string body = 4; // text/HTML content
35
- string transport = 5; /// 'email', 'log', ... default == 'log'
36
- string provider = 6; /// specific transport provider, eg: 'console' for transport == 'log'
33
+ optional string subject = 3;
34
+ optional string body = 4; // text/HTML content
35
+ optional string transport = 5; /// 'email', 'log', ... default == 'log'
36
+ optional string provider = 6; /// specific transport provider, eg: 'console' for transport == 'log'
37
37
  repeated Attachment attachments = 7;
38
38
  }
39
39
 
@@ -41,9 +41,9 @@ message Email {
41
41
  repeated string to = 1; // array of to email list
42
42
  repeated string cc = 2 ;// array of cc email list
43
43
  repeated string bcc = 3; // array of bcc email list
44
- string replyto = 4; // if set, the outgoing mail will have this replyTo header set
44
+ optional string replyto = 4; // if set, the outgoing mail will have this replyTo header set
45
45
  }
46
46
 
47
47
  message Log {
48
- string level = 1;
48
+ optional string level = 1;
49
49
  }
@@ -7,7 +7,7 @@ import "io/restorecommerce/user.proto";
7
7
  import "io/restorecommerce/status.proto";
8
8
  import "google/protobuf/empty.proto";
9
9
 
10
- service Service {
10
+ service OAuthService {
11
11
  rpc AvailableServices(google.protobuf.Empty) returns (ServicesResponse);
12
12
  rpc GenerateLinks(google.protobuf.Empty) returns (GenerateLinksResponse);
13
13
  rpc ExchangeCode(ExchangeCodeRequest) returns (ExchangeCodeResponse);