@vectora/contracts 1.0.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 (61) hide show
  1. package/LICENSE.md +25 -0
  2. package/dist/events/auth/index.d.ts +1 -0
  3. package/dist/events/auth/index.js +17 -0
  4. package/dist/events/auth/verification-request.interface.d.ts +5 -0
  5. package/dist/events/auth/verification-request.interface.js +2 -0
  6. package/dist/events/index.d.ts +1 -0
  7. package/dist/events/index.js +17 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.js +19 -0
  10. package/dist/proto/index.d.ts +1 -0
  11. package/dist/proto/index.js +17 -0
  12. package/dist/proto/paths.d.ts +18 -0
  13. package/dist/proto/paths.js +27 -0
  14. package/dist/utils/data-transformer.util.d.ts +55 -0
  15. package/dist/utils/data-transformer.util.js +141 -0
  16. package/dist/utils/index.d.ts +1 -0
  17. package/dist/utils/index.js +17 -0
  18. package/gen/go/mapbox-direction-v1.pb.go +621 -0
  19. package/gen/go/mapbox-geocode-v1.pb.go +473 -0
  20. package/gen/go/mapbox-matrix-v1.pb.go +337 -0
  21. package/gen/go/mapbox-optimization-v1.pb.go +422 -0
  22. package/gen/go/mapbox-search-v1.pb.go +699 -0
  23. package/gen/ts/common-geocode-v1.ts +368 -0
  24. package/gen/ts/common-pagination-v1.ts +713 -0
  25. package/gen/ts/fleet-truck-v1.ts +1102 -0
  26. package/gen/ts/fleet-unit-v1.ts +9 -0
  27. package/gen/ts/google/protobuf/field_mask.ts +295 -0
  28. package/gen/ts/google/protobuf/wrappers.ts +544 -0
  29. package/gen/ts/identify-account-v1.ts +9 -0
  30. package/gen/ts/identify-auth-v1.ts +9 -0
  31. package/gen/ts/identify-company-v1.ts +1025 -0
  32. package/gen/ts/identify-role-v1.ts +9 -0
  33. package/gen/ts/identify-user-v1.ts +9 -0
  34. package/gen/ts/mapbox-direction-v1.ts +718 -0
  35. package/gen/ts/mapbox-geocode-v1.ts +511 -0
  36. package/gen/ts/mapbox-matrix-v1.ts +369 -0
  37. package/gen/ts/mapbox-optimization-v1.ts +472 -0
  38. package/gen/ts/mapbox-search-v1.ts +803 -0
  39. package/gen/ts/shipments-freight-v1.ts +9 -0
  40. package/gen/ts/shipments-loads-v1.ts +9 -0
  41. package/gen/ts/shipments-rate-v1.ts +9 -0
  42. package/gen/ts/shipments-stop-v1.ts +9 -0
  43. package/package.json +40 -0
  44. package/proto/common-geocode-v1.proto +10 -0
  45. package/proto/common-pagination-v1.proto +39 -0
  46. package/proto/fleet-truck-v1.proto +145 -0
  47. package/proto/fleet-unit-v1.proto +3 -0
  48. package/proto/identify-account-v1.proto +3 -0
  49. package/proto/identify-auth-v1.proto +3 -0
  50. package/proto/identify-company-v1.proto +114 -0
  51. package/proto/identify-role-v1.proto +3 -0
  52. package/proto/identify-user-v1.proto +3 -0
  53. package/proto/mapbox-direction-v1.proto +61 -0
  54. package/proto/mapbox-geocode-v1.proto +47 -0
  55. package/proto/mapbox-matrix-v1.proto +34 -0
  56. package/proto/mapbox-optimization-v1.proto +43 -0
  57. package/proto/mapbox-search-v1.proto +68 -0
  58. package/proto/shipments-freight-v1.proto +3 -0
  59. package/proto/shipments-loads-v1.proto +3 -0
  60. package/proto/shipments-rate-v1.proto +3 -0
  61. package/proto/shipments-stop-v1.proto +3 -0
@@ -0,0 +1,337 @@
1
+ // Code generated by protoc-gen-go. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-go v1.36.11
4
+ // protoc v3.21.12
5
+ // source: mapbox-matrix-v1.proto
6
+
7
+ package matrix_v1
8
+
9
+ import (
10
+ common "github.com/vectora-os/contracts/gen/go/common"
11
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
12
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13
+ reflect "reflect"
14
+ sync "sync"
15
+ unsafe "unsafe"
16
+ )
17
+
18
+ const (
19
+ // Verify that this generated code is sufficiently up-to-date.
20
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
21
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
22
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
23
+ )
24
+
25
+ type MatrixRequest struct {
26
+ state protoimpl.MessageState `protogen:"open.v1"`
27
+ Coordinates []*common.Point `protobuf:"bytes,1,rep,name=coordinates,proto3" json:"coordinates,omitempty"`
28
+ Profile string `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"`
29
+ Annotations []string `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
30
+ unknownFields protoimpl.UnknownFields
31
+ sizeCache protoimpl.SizeCache
32
+ }
33
+
34
+ func (x *MatrixRequest) Reset() {
35
+ *x = MatrixRequest{}
36
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[0]
37
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
38
+ ms.StoreMessageInfo(mi)
39
+ }
40
+
41
+ func (x *MatrixRequest) String() string {
42
+ return protoimpl.X.MessageStringOf(x)
43
+ }
44
+
45
+ func (*MatrixRequest) ProtoMessage() {}
46
+
47
+ func (x *MatrixRequest) ProtoReflect() protoreflect.Message {
48
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[0]
49
+ if x != nil {
50
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
51
+ if ms.LoadMessageInfo() == nil {
52
+ ms.StoreMessageInfo(mi)
53
+ }
54
+ return ms
55
+ }
56
+ return mi.MessageOf(x)
57
+ }
58
+
59
+ // Deprecated: Use MatrixRequest.ProtoReflect.Descriptor instead.
60
+ func (*MatrixRequest) Descriptor() ([]byte, []int) {
61
+ return file_mapbox_matrix_v1_proto_rawDescGZIP(), []int{0}
62
+ }
63
+
64
+ func (x *MatrixRequest) GetCoordinates() []*common.Point {
65
+ if x != nil {
66
+ return x.Coordinates
67
+ }
68
+ return nil
69
+ }
70
+
71
+ func (x *MatrixRequest) GetProfile() string {
72
+ if x != nil {
73
+ return x.Profile
74
+ }
75
+ return ""
76
+ }
77
+
78
+ func (x *MatrixRequest) GetAnnotations() []string {
79
+ if x != nil {
80
+ return x.Annotations
81
+ }
82
+ return nil
83
+ }
84
+
85
+ type MatrixResponse struct {
86
+ state protoimpl.MessageState `protogen:"open.v1"`
87
+ Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
88
+ Durations []*MatrixRow `protobuf:"bytes,2,rep,name=durations,proto3" json:"durations,omitempty"`
89
+ Distances []*MatrixRow `protobuf:"bytes,3,rep,name=distances,proto3" json:"distances,omitempty"`
90
+ Destinations []*MatrixWaypoint `protobuf:"bytes,4,rep,name=destinations,proto3" json:"destinations,omitempty"`
91
+ Sources []*MatrixWaypoint `protobuf:"bytes,5,rep,name=sources,proto3" json:"sources,omitempty"`
92
+ unknownFields protoimpl.UnknownFields
93
+ sizeCache protoimpl.SizeCache
94
+ }
95
+
96
+ func (x *MatrixResponse) Reset() {
97
+ *x = MatrixResponse{}
98
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[1]
99
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
100
+ ms.StoreMessageInfo(mi)
101
+ }
102
+
103
+ func (x *MatrixResponse) String() string {
104
+ return protoimpl.X.MessageStringOf(x)
105
+ }
106
+
107
+ func (*MatrixResponse) ProtoMessage() {}
108
+
109
+ func (x *MatrixResponse) ProtoReflect() protoreflect.Message {
110
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[1]
111
+ if x != nil {
112
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
113
+ if ms.LoadMessageInfo() == nil {
114
+ ms.StoreMessageInfo(mi)
115
+ }
116
+ return ms
117
+ }
118
+ return mi.MessageOf(x)
119
+ }
120
+
121
+ // Deprecated: Use MatrixResponse.ProtoReflect.Descriptor instead.
122
+ func (*MatrixResponse) Descriptor() ([]byte, []int) {
123
+ return file_mapbox_matrix_v1_proto_rawDescGZIP(), []int{1}
124
+ }
125
+
126
+ func (x *MatrixResponse) GetCode() string {
127
+ if x != nil {
128
+ return x.Code
129
+ }
130
+ return ""
131
+ }
132
+
133
+ func (x *MatrixResponse) GetDurations() []*MatrixRow {
134
+ if x != nil {
135
+ return x.Durations
136
+ }
137
+ return nil
138
+ }
139
+
140
+ func (x *MatrixResponse) GetDistances() []*MatrixRow {
141
+ if x != nil {
142
+ return x.Distances
143
+ }
144
+ return nil
145
+ }
146
+
147
+ func (x *MatrixResponse) GetDestinations() []*MatrixWaypoint {
148
+ if x != nil {
149
+ return x.Destinations
150
+ }
151
+ return nil
152
+ }
153
+
154
+ func (x *MatrixResponse) GetSources() []*MatrixWaypoint {
155
+ if x != nil {
156
+ return x.Sources
157
+ }
158
+ return nil
159
+ }
160
+
161
+ type MatrixRow struct {
162
+ state protoimpl.MessageState `protogen:"open.v1"`
163
+ Values []float64 `protobuf:"fixed64,1,rep,packed,name=values,proto3" json:"values,omitempty"`
164
+ unknownFields protoimpl.UnknownFields
165
+ sizeCache protoimpl.SizeCache
166
+ }
167
+
168
+ func (x *MatrixRow) Reset() {
169
+ *x = MatrixRow{}
170
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[2]
171
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
172
+ ms.StoreMessageInfo(mi)
173
+ }
174
+
175
+ func (x *MatrixRow) String() string {
176
+ return protoimpl.X.MessageStringOf(x)
177
+ }
178
+
179
+ func (*MatrixRow) ProtoMessage() {}
180
+
181
+ func (x *MatrixRow) ProtoReflect() protoreflect.Message {
182
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[2]
183
+ if x != nil {
184
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
185
+ if ms.LoadMessageInfo() == nil {
186
+ ms.StoreMessageInfo(mi)
187
+ }
188
+ return ms
189
+ }
190
+ return mi.MessageOf(x)
191
+ }
192
+
193
+ // Deprecated: Use MatrixRow.ProtoReflect.Descriptor instead.
194
+ func (*MatrixRow) Descriptor() ([]byte, []int) {
195
+ return file_mapbox_matrix_v1_proto_rawDescGZIP(), []int{2}
196
+ }
197
+
198
+ func (x *MatrixRow) GetValues() []float64 {
199
+ if x != nil {
200
+ return x.Values
201
+ }
202
+ return nil
203
+ }
204
+
205
+ type MatrixWaypoint struct {
206
+ state protoimpl.MessageState `protogen:"open.v1"`
207
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
208
+ Location []float64 `protobuf:"fixed64,2,rep,packed,name=location,proto3" json:"location,omitempty"`
209
+ unknownFields protoimpl.UnknownFields
210
+ sizeCache protoimpl.SizeCache
211
+ }
212
+
213
+ func (x *MatrixWaypoint) Reset() {
214
+ *x = MatrixWaypoint{}
215
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[3]
216
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
217
+ ms.StoreMessageInfo(mi)
218
+ }
219
+
220
+ func (x *MatrixWaypoint) String() string {
221
+ return protoimpl.X.MessageStringOf(x)
222
+ }
223
+
224
+ func (*MatrixWaypoint) ProtoMessage() {}
225
+
226
+ func (x *MatrixWaypoint) ProtoReflect() protoreflect.Message {
227
+ mi := &file_mapbox_matrix_v1_proto_msgTypes[3]
228
+ if x != nil {
229
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
230
+ if ms.LoadMessageInfo() == nil {
231
+ ms.StoreMessageInfo(mi)
232
+ }
233
+ return ms
234
+ }
235
+ return mi.MessageOf(x)
236
+ }
237
+
238
+ // Deprecated: Use MatrixWaypoint.ProtoReflect.Descriptor instead.
239
+ func (*MatrixWaypoint) Descriptor() ([]byte, []int) {
240
+ return file_mapbox_matrix_v1_proto_rawDescGZIP(), []int{3}
241
+ }
242
+
243
+ func (x *MatrixWaypoint) GetName() string {
244
+ if x != nil {
245
+ return x.Name
246
+ }
247
+ return ""
248
+ }
249
+
250
+ func (x *MatrixWaypoint) GetLocation() []float64 {
251
+ if x != nil {
252
+ return x.Location
253
+ }
254
+ return nil
255
+ }
256
+
257
+ var File_mapbox_matrix_v1_proto protoreflect.FileDescriptor
258
+
259
+ const file_mapbox_matrix_v1_proto_rawDesc = "" +
260
+ "\n" +
261
+ "\x16mapbox-matrix-v1.proto\x12\tmatrix.v1\x1a\x17common-geocode-v1.proto\"\x87\x01\n" +
262
+ "\rMatrixRequest\x12:\n" +
263
+ "\vcoordinates\x18\x01 \x03(\v2\x18.common_geocode.v1.PointR\vcoordinates\x12\x18\n" +
264
+ "\aprofile\x18\x02 \x01(\tR\aprofile\x12 \n" +
265
+ "\vannotations\x18\x03 \x03(\tR\vannotations\"\x80\x02\n" +
266
+ "\x0eMatrixResponse\x12\x12\n" +
267
+ "\x04code\x18\x01 \x01(\tR\x04code\x122\n" +
268
+ "\tdurations\x18\x02 \x03(\v2\x14.matrix.v1.MatrixRowR\tdurations\x122\n" +
269
+ "\tdistances\x18\x03 \x03(\v2\x14.matrix.v1.MatrixRowR\tdistances\x12=\n" +
270
+ "\fdestinations\x18\x04 \x03(\v2\x19.matrix.v1.MatrixWaypointR\fdestinations\x123\n" +
271
+ "\asources\x18\x05 \x03(\v2\x19.matrix.v1.MatrixWaypointR\asources\"#\n" +
272
+ "\tMatrixRow\x12\x16\n" +
273
+ "\x06values\x18\x01 \x03(\x01R\x06values\"@\n" +
274
+ "\x0eMatrixWaypoint\x12\x12\n" +
275
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" +
276
+ "\blocation\x18\x02 \x03(\x01R\blocation2Q\n" +
277
+ "\rMatrixService\x12@\n" +
278
+ "\tGetMatrix\x12\x18.matrix.v1.MatrixRequest\x1a\x19.matrix.v1.MatrixResponseB9Z7github.com/vectora-os/contracts/gen/go/matrix;matrix_v1b\x06proto3"
279
+
280
+ var (
281
+ file_mapbox_matrix_v1_proto_rawDescOnce sync.Once
282
+ file_mapbox_matrix_v1_proto_rawDescData []byte
283
+ )
284
+
285
+ func file_mapbox_matrix_v1_proto_rawDescGZIP() []byte {
286
+ file_mapbox_matrix_v1_proto_rawDescOnce.Do(func() {
287
+ file_mapbox_matrix_v1_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mapbox_matrix_v1_proto_rawDesc), len(file_mapbox_matrix_v1_proto_rawDesc)))
288
+ })
289
+ return file_mapbox_matrix_v1_proto_rawDescData
290
+ }
291
+
292
+ var file_mapbox_matrix_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
293
+ var file_mapbox_matrix_v1_proto_goTypes = []any{
294
+ (*MatrixRequest)(nil), // 0: matrix.v1.MatrixRequest
295
+ (*MatrixResponse)(nil), // 1: matrix.v1.MatrixResponse
296
+ (*MatrixRow)(nil), // 2: matrix.v1.MatrixRow
297
+ (*MatrixWaypoint)(nil), // 3: matrix.v1.MatrixWaypoint
298
+ (*common.Point)(nil), // 4: common_geocode.v1.Point
299
+ }
300
+ var file_mapbox_matrix_v1_proto_depIdxs = []int32{
301
+ 4, // 0: matrix.v1.MatrixRequest.coordinates:type_name -> common_geocode.v1.Point
302
+ 2, // 1: matrix.v1.MatrixResponse.durations:type_name -> matrix.v1.MatrixRow
303
+ 2, // 2: matrix.v1.MatrixResponse.distances:type_name -> matrix.v1.MatrixRow
304
+ 3, // 3: matrix.v1.MatrixResponse.destinations:type_name -> matrix.v1.MatrixWaypoint
305
+ 3, // 4: matrix.v1.MatrixResponse.sources:type_name -> matrix.v1.MatrixWaypoint
306
+ 0, // 5: matrix.v1.MatrixService.GetMatrix:input_type -> matrix.v1.MatrixRequest
307
+ 1, // 6: matrix.v1.MatrixService.GetMatrix:output_type -> matrix.v1.MatrixResponse
308
+ 6, // [6:7] is the sub-list for method output_type
309
+ 5, // [5:6] is the sub-list for method input_type
310
+ 5, // [5:5] is the sub-list for extension type_name
311
+ 5, // [5:5] is the sub-list for extension extendee
312
+ 0, // [0:5] is the sub-list for field type_name
313
+ }
314
+
315
+ func init() { file_mapbox_matrix_v1_proto_init() }
316
+ func file_mapbox_matrix_v1_proto_init() {
317
+ if File_mapbox_matrix_v1_proto != nil {
318
+ return
319
+ }
320
+ type x struct{}
321
+ out := protoimpl.TypeBuilder{
322
+ File: protoimpl.DescBuilder{
323
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
324
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_mapbox_matrix_v1_proto_rawDesc), len(file_mapbox_matrix_v1_proto_rawDesc)),
325
+ NumEnums: 0,
326
+ NumMessages: 4,
327
+ NumExtensions: 0,
328
+ NumServices: 1,
329
+ },
330
+ GoTypes: file_mapbox_matrix_v1_proto_goTypes,
331
+ DependencyIndexes: file_mapbox_matrix_v1_proto_depIdxs,
332
+ MessageInfos: file_mapbox_matrix_v1_proto_msgTypes,
333
+ }.Build()
334
+ File_mapbox_matrix_v1_proto = out.File
335
+ file_mapbox_matrix_v1_proto_goTypes = nil
336
+ file_mapbox_matrix_v1_proto_depIdxs = nil
337
+ }