@googlemaps/fleetengine 0.4.0 → 0.6.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.
@@ -1,7 +1,4 @@
1
1
  {
2
- "options": {
3
- "syntax": "proto3"
4
- },
5
2
  "nested": {
6
3
  "maps": {
7
4
  "nested": {
@@ -524,6 +521,34 @@
524
521
  }
525
522
  ]
526
523
  },
524
+ "DeleteTrip": {
525
+ "requestType": "DeleteTripRequest",
526
+ "responseType": "google.protobuf.Empty",
527
+ "options": {
528
+ "(google.api.http).delete": "/v1/{name=providers/*/trips/*}",
529
+ "(google.api.routing).routing_parameters.field": "name",
530
+ "(google.api.routing).routing_parameters.path_template": "{provider_id=providers/*}",
531
+ "(google.api.method_signature)": "name"
532
+ },
533
+ "parsedOptions": [
534
+ {
535
+ "(google.api.http)": {
536
+ "delete": "/v1/{name=providers/*/trips/*}"
537
+ }
538
+ },
539
+ {
540
+ "(google.api.routing)": {
541
+ "routing_parameters": {
542
+ "field": "name",
543
+ "path_template": "{provider_id=providers/*}"
544
+ }
545
+ }
546
+ },
547
+ {
548
+ "(google.api.method_signature)": "name"
549
+ }
550
+ ]
551
+ },
527
552
  "ReportBillableTrip": {
528
553
  "requestType": "ReportBillableTripRequest",
529
554
  "responseType": "google.protobuf.Empty",
@@ -674,6 +699,25 @@
674
699
  }
675
700
  }
676
701
  },
702
+ "DeleteTripRequest": {
703
+ "fields": {
704
+ "header": {
705
+ "type": "RequestHeader",
706
+ "id": 1,
707
+ "options": {
708
+ "(google.api.field_behavior)": "OPTIONAL"
709
+ }
710
+ },
711
+ "name": {
712
+ "type": "string",
713
+ "id": 2,
714
+ "options": {
715
+ "(google.api.field_behavior)": "REQUIRED",
716
+ "(google.api.resource_reference).type": "fleetengine.googleapis.com/Trip"
717
+ }
718
+ }
719
+ }
720
+ },
677
721
  "ReportBillableTripRequest": {
678
722
  "fields": {
679
723
  "name": {
@@ -1114,6 +1158,34 @@
1114
1158
  }
1115
1159
  ]
1116
1160
  },
1161
+ "DeleteVehicle": {
1162
+ "requestType": "DeleteVehicleRequest",
1163
+ "responseType": "google.protobuf.Empty",
1164
+ "options": {
1165
+ "(google.api.http).delete": "/v1/{name=providers/*/vehicles/*}",
1166
+ "(google.api.routing).routing_parameters.field": "name",
1167
+ "(google.api.routing).routing_parameters.path_template": "{provider_id=providers/*}",
1168
+ "(google.api.method_signature)": "name"
1169
+ },
1170
+ "parsedOptions": [
1171
+ {
1172
+ "(google.api.http)": {
1173
+ "delete": "/v1/{name=providers/*/vehicles/*}"
1174
+ }
1175
+ },
1176
+ {
1177
+ "(google.api.routing)": {
1178
+ "routing_parameters": {
1179
+ "field": "name",
1180
+ "path_template": "{provider_id=providers/*}"
1181
+ }
1182
+ }
1183
+ },
1184
+ {
1185
+ "(google.api.method_signature)": "name"
1186
+ }
1187
+ ]
1188
+ },
1117
1189
  "UpdateVehicle": {
1118
1190
  "requestType": "UpdateVehicleRequest",
1119
1191
  "responseType": "Vehicle",
@@ -1271,6 +1343,25 @@
1271
1343
  }
1272
1344
  }
1273
1345
  },
1346
+ "DeleteVehicleRequest": {
1347
+ "fields": {
1348
+ "header": {
1349
+ "type": "RequestHeader",
1350
+ "id": 1,
1351
+ "options": {
1352
+ "(google.api.field_behavior)": "OPTIONAL"
1353
+ }
1354
+ },
1355
+ "name": {
1356
+ "type": "string",
1357
+ "id": 2,
1358
+ "options": {
1359
+ "(google.api.field_behavior)": "REQUIRED",
1360
+ "(google.api.resource_reference).type": "fleetengine.googleapis.com/Vehicle"
1361
+ }
1362
+ }
1363
+ }
1364
+ },
1274
1365
  "UpdateVehicleRequest": {
1275
1366
  "fields": {
1276
1367
  "header": {
@@ -1696,6 +1787,14 @@
1696
1787
  "type": "VehicleLocation",
1697
1788
  "id": 5
1698
1789
  },
1790
+ "pastLocations": {
1791
+ "rule": "repeated",
1792
+ "type": "VehicleLocation",
1793
+ "id": 30,
1794
+ "options": {
1795
+ "(google.api.field_behavior)": "INPUT_ONLY"
1796
+ }
1797
+ },
1699
1798
  "maximumCapacity": {
1700
1799
  "type": "int32",
1701
1800
  "id": 6
@@ -2044,6 +2143,83 @@
2044
2143
  "IDENTIFIER": 8
2045
2144
  }
2046
2145
  },
2146
+ "resourceReference": {
2147
+ "type": "google.api.ResourceReference",
2148
+ "id": 1055,
2149
+ "extend": "google.protobuf.FieldOptions"
2150
+ },
2151
+ "resourceDefinition": {
2152
+ "rule": "repeated",
2153
+ "type": "google.api.ResourceDescriptor",
2154
+ "id": 1053,
2155
+ "extend": "google.protobuf.FileOptions"
2156
+ },
2157
+ "resource": {
2158
+ "type": "google.api.ResourceDescriptor",
2159
+ "id": 1053,
2160
+ "extend": "google.protobuf.MessageOptions"
2161
+ },
2162
+ "ResourceDescriptor": {
2163
+ "fields": {
2164
+ "type": {
2165
+ "type": "string",
2166
+ "id": 1
2167
+ },
2168
+ "pattern": {
2169
+ "rule": "repeated",
2170
+ "type": "string",
2171
+ "id": 2
2172
+ },
2173
+ "nameField": {
2174
+ "type": "string",
2175
+ "id": 3
2176
+ },
2177
+ "history": {
2178
+ "type": "History",
2179
+ "id": 4
2180
+ },
2181
+ "plural": {
2182
+ "type": "string",
2183
+ "id": 5
2184
+ },
2185
+ "singular": {
2186
+ "type": "string",
2187
+ "id": 6
2188
+ },
2189
+ "style": {
2190
+ "rule": "repeated",
2191
+ "type": "Style",
2192
+ "id": 10
2193
+ }
2194
+ },
2195
+ "nested": {
2196
+ "History": {
2197
+ "values": {
2198
+ "HISTORY_UNSPECIFIED": 0,
2199
+ "ORIGINALLY_SINGLE_PATTERN": 1,
2200
+ "FUTURE_MULTI_PATTERN": 2
2201
+ }
2202
+ },
2203
+ "Style": {
2204
+ "values": {
2205
+ "STYLE_UNSPECIFIED": 0,
2206
+ "DECLARATIVE_FRIENDLY": 1
2207
+ }
2208
+ }
2209
+ }
2210
+ },
2211
+ "ResourceReference": {
2212
+ "fields": {
2213
+ "type": {
2214
+ "type": "string",
2215
+ "id": 1
2216
+ },
2217
+ "childType": {
2218
+ "type": "string",
2219
+ "id": 2
2220
+ }
2221
+ }
2222
+ },
2047
2223
  "http": {
2048
2224
  "type": "HttpRule",
2049
2225
  "id": 72295728,
@@ -2426,83 +2602,6 @@
2426
2602
  "DEPRECATED": 5
2427
2603
  }
2428
2604
  },
2429
- "resourceReference": {
2430
- "type": "google.api.ResourceReference",
2431
- "id": 1055,
2432
- "extend": "google.protobuf.FieldOptions"
2433
- },
2434
- "resourceDefinition": {
2435
- "rule": "repeated",
2436
- "type": "google.api.ResourceDescriptor",
2437
- "id": 1053,
2438
- "extend": "google.protobuf.FileOptions"
2439
- },
2440
- "resource": {
2441
- "type": "google.api.ResourceDescriptor",
2442
- "id": 1053,
2443
- "extend": "google.protobuf.MessageOptions"
2444
- },
2445
- "ResourceDescriptor": {
2446
- "fields": {
2447
- "type": {
2448
- "type": "string",
2449
- "id": 1
2450
- },
2451
- "pattern": {
2452
- "rule": "repeated",
2453
- "type": "string",
2454
- "id": 2
2455
- },
2456
- "nameField": {
2457
- "type": "string",
2458
- "id": 3
2459
- },
2460
- "history": {
2461
- "type": "History",
2462
- "id": 4
2463
- },
2464
- "plural": {
2465
- "type": "string",
2466
- "id": 5
2467
- },
2468
- "singular": {
2469
- "type": "string",
2470
- "id": 6
2471
- },
2472
- "style": {
2473
- "rule": "repeated",
2474
- "type": "Style",
2475
- "id": 10
2476
- }
2477
- },
2478
- "nested": {
2479
- "History": {
2480
- "values": {
2481
- "HISTORY_UNSPECIFIED": 0,
2482
- "ORIGINALLY_SINGLE_PATTERN": 1,
2483
- "FUTURE_MULTI_PATTERN": 2
2484
- }
2485
- },
2486
- "Style": {
2487
- "values": {
2488
- "STYLE_UNSPECIFIED": 0,
2489
- "DECLARATIVE_FRIENDLY": 1
2490
- }
2491
- }
2492
- }
2493
- },
2494
- "ResourceReference": {
2495
- "fields": {
2496
- "type": {
2497
- "type": "string",
2498
- "id": 1
2499
- },
2500
- "childType": {
2501
- "type": "string",
2502
- "id": 2
2503
- }
2504
- }
2505
- },
2506
2605
  "routing": {
2507
2606
  "type": "google.api.RoutingRule",
2508
2607
  "id": 72295729,
@@ -0,0 +1,175 @@
1
+ {
2
+ "schema": "1.0",
3
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
4
+ "language": "typescript",
5
+ "protoPackage": "maps.fleetengine.v1",
6
+ "libraryPackage": "@googlemaps/fleetengine",
7
+ "services": {
8
+ "TripService": {
9
+ "clients": {
10
+ "grpc": {
11
+ "libraryClient": "TripServiceClient",
12
+ "rpcs": {
13
+ "CreateTrip": {
14
+ "methods": [
15
+ "createTrip"
16
+ ]
17
+ },
18
+ "GetTrip": {
19
+ "methods": [
20
+ "getTrip"
21
+ ]
22
+ },
23
+ "DeleteTrip": {
24
+ "methods": [
25
+ "deleteTrip"
26
+ ]
27
+ },
28
+ "ReportBillableTrip": {
29
+ "methods": [
30
+ "reportBillableTrip"
31
+ ]
32
+ },
33
+ "UpdateTrip": {
34
+ "methods": [
35
+ "updateTrip"
36
+ ]
37
+ },
38
+ "SearchTrips": {
39
+ "methods": [
40
+ "searchTrips",
41
+ "searchTripsStream",
42
+ "searchTripsAsync"
43
+ ]
44
+ }
45
+ }
46
+ },
47
+ "grpc-fallback": {
48
+ "libraryClient": "TripServiceClient",
49
+ "rpcs": {
50
+ "CreateTrip": {
51
+ "methods": [
52
+ "createTrip"
53
+ ]
54
+ },
55
+ "GetTrip": {
56
+ "methods": [
57
+ "getTrip"
58
+ ]
59
+ },
60
+ "DeleteTrip": {
61
+ "methods": [
62
+ "deleteTrip"
63
+ ]
64
+ },
65
+ "ReportBillableTrip": {
66
+ "methods": [
67
+ "reportBillableTrip"
68
+ ]
69
+ },
70
+ "UpdateTrip": {
71
+ "methods": [
72
+ "updateTrip"
73
+ ]
74
+ },
75
+ "SearchTrips": {
76
+ "methods": [
77
+ "searchTrips",
78
+ "searchTripsStream",
79
+ "searchTripsAsync"
80
+ ]
81
+ }
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "VehicleService": {
87
+ "clients": {
88
+ "grpc": {
89
+ "libraryClient": "VehicleServiceClient",
90
+ "rpcs": {
91
+ "CreateVehicle": {
92
+ "methods": [
93
+ "createVehicle"
94
+ ]
95
+ },
96
+ "GetVehicle": {
97
+ "methods": [
98
+ "getVehicle"
99
+ ]
100
+ },
101
+ "DeleteVehicle": {
102
+ "methods": [
103
+ "deleteVehicle"
104
+ ]
105
+ },
106
+ "UpdateVehicle": {
107
+ "methods": [
108
+ "updateVehicle"
109
+ ]
110
+ },
111
+ "UpdateVehicleAttributes": {
112
+ "methods": [
113
+ "updateVehicleAttributes"
114
+ ]
115
+ },
116
+ "SearchVehicles": {
117
+ "methods": [
118
+ "searchVehicles"
119
+ ]
120
+ },
121
+ "ListVehicles": {
122
+ "methods": [
123
+ "listVehicles",
124
+ "listVehiclesStream",
125
+ "listVehiclesAsync"
126
+ ]
127
+ }
128
+ }
129
+ },
130
+ "grpc-fallback": {
131
+ "libraryClient": "VehicleServiceClient",
132
+ "rpcs": {
133
+ "CreateVehicle": {
134
+ "methods": [
135
+ "createVehicle"
136
+ ]
137
+ },
138
+ "GetVehicle": {
139
+ "methods": [
140
+ "getVehicle"
141
+ ]
142
+ },
143
+ "DeleteVehicle": {
144
+ "methods": [
145
+ "deleteVehicle"
146
+ ]
147
+ },
148
+ "UpdateVehicle": {
149
+ "methods": [
150
+ "updateVehicle"
151
+ ]
152
+ },
153
+ "UpdateVehicleAttributes": {
154
+ "methods": [
155
+ "updateVehicleAttributes"
156
+ ]
157
+ },
158
+ "SearchVehicles": {
159
+ "methods": [
160
+ "searchVehicles"
161
+ ]
162
+ },
163
+ "ListVehicles": {
164
+ "methods": [
165
+ "listVehicles",
166
+ "listVehiclesStream",
167
+ "listVehiclesAsync"
168
+ ]
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
@@ -17,6 +17,7 @@ export declare class TripServiceClient {
17
17
  private _defaults;
18
18
  private _universeDomain;
19
19
  private _servicePath;
20
+ private _log;
20
21
  auth: gax.GoogleAuth;
21
22
  descriptors: Descriptors;
22
23
  warn: (code: string, message: string, warnType?: string) => void;
@@ -51,7 +52,7 @@ export declare class TripServiceClient {
51
52
  * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
52
53
  * the environment variable GCLOUD_PROJECT for your project ID. If your
53
54
  * app is running in an environment which supports
54
- * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
55
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
55
56
  * your project ID will be detected automatically.
56
57
  * @param {string} [options.apiEndpoint] - The domain name of the
57
58
  * API remote host.
@@ -246,6 +247,37 @@ export declare class TripServiceClient {
246
247
  ]>;
247
248
  getTrip(request: protos.maps.fleetengine.v1.IGetTripRequest, options: CallOptions, callback: Callback<protos.maps.fleetengine.v1.ITrip, protos.maps.fleetengine.v1.IGetTripRequest | null | undefined, {} | null | undefined>): void;
248
249
  getTrip(request: protos.maps.fleetengine.v1.IGetTripRequest, callback: Callback<protos.maps.fleetengine.v1.ITrip, protos.maps.fleetengine.v1.IGetTripRequest | null | undefined, {} | null | undefined>): void;
250
+ /**
251
+ * Deletes a single Trip.
252
+ *
253
+ * Returns FAILED_PRECONDITION if the Trip is active and assigned to a
254
+ * vehicle.
255
+ *
256
+ * @param {Object} request
257
+ * The request object that will be sent.
258
+ * @param {maps.fleetengine.v1.RequestHeader} [request.header]
259
+ * Optional. The standard Fleet Engine request header.
260
+ * @param {string} request.name
261
+ * Required. Must be in the format `providers/{provider}/trips/{trip}`.
262
+ * The provider must be the Project ID (for example, `sample-cloud-project`)
263
+ * of the Google Cloud Project of which the service account making
264
+ * this call is a member.
265
+ * @param {object} [options]
266
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
267
+ * @returns {Promise} - The promise which resolves to an array.
268
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
269
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
270
+ * for more details and examples.
271
+ * @example <caption>include:samples/generated/v1/trip_service.delete_trip.js</caption>
272
+ * region_tag:fleetengine_v1_generated_TripService_DeleteTrip_async
273
+ */
274
+ deleteTrip(request?: protos.maps.fleetengine.v1.IDeleteTripRequest, options?: CallOptions): Promise<[
275
+ protos.google.protobuf.IEmpty,
276
+ protos.maps.fleetengine.v1.IDeleteTripRequest | undefined,
277
+ {} | undefined
278
+ ]>;
279
+ deleteTrip(request: protos.maps.fleetengine.v1.IDeleteTripRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.maps.fleetengine.v1.IDeleteTripRequest | null | undefined, {} | null | undefined>): void;
280
+ deleteTrip(request: protos.maps.fleetengine.v1.IDeleteTripRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.maps.fleetengine.v1.IDeleteTripRequest | null | undefined, {} | null | undefined>): void;
249
281
  /**
250
282
  * Report billable trip usage.
251
283
  *
@@ -410,7 +442,7 @@ export declare class TripServiceClient {
410
442
  searchTrips(request: protos.maps.fleetengine.v1.ISearchTripsRequest, options: CallOptions, callback: PaginationCallback<protos.maps.fleetengine.v1.ISearchTripsRequest, protos.maps.fleetengine.v1.ISearchTripsResponse | null | undefined, protos.maps.fleetengine.v1.ITrip>): void;
411
443
  searchTrips(request: protos.maps.fleetengine.v1.ISearchTripsRequest, callback: PaginationCallback<protos.maps.fleetengine.v1.ISearchTripsRequest, protos.maps.fleetengine.v1.ISearchTripsResponse | null | undefined, protos.maps.fleetengine.v1.ITrip>): void;
412
444
  /**
413
- * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
445
+ * Equivalent to `searchTrips`, but returns a NodeJS Stream object.
414
446
  * @param {Object} request
415
447
  * The request object that will be sent.
416
448
  * @param {maps.fleetengine.v1.RequestHeader} request.header