@googlemaps/fleetengine 0.1.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.
- package/CHANGELOG.md +10 -0
- package/LICENSE +202 -0
- package/README.md +319 -0
- package/build/protos/google/geo/type/viewport.proto +69 -0
- package/build/protos/google/maps/fleetengine/v1/fleetengine.proto +331 -0
- package/build/protos/google/maps/fleetengine/v1/header.proto +108 -0
- package/build/protos/google/maps/fleetengine/v1/traffic.proto +68 -0
- package/build/protos/google/maps/fleetengine/v1/trip_api.proto +377 -0
- package/build/protos/google/maps/fleetengine/v1/trips.proto +311 -0
- package/build/protos/google/maps/fleetengine/v1/vehicle_api.proto +842 -0
- package/build/protos/google/maps/fleetengine/v1/vehicles.proto +348 -0
- package/build/protos/protos.d.ts +13292 -0
- package/build/protos/protos.js +36937 -0
- package/build/protos/protos.json +3997 -0
- package/build/src/index.d.ts +14 -0
- package/build/src/index.js +30 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/index.d.ts +2 -0
- package/build/src/v1/index.js +25 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1/trip_service_client.d.ts +555 -0
- package/build/src/v1/trip_service_client.js +631 -0
- package/build/src/v1/trip_service_client.js.map +1 -0
- package/build/src/v1/trip_service_client_config.json +62 -0
- package/build/src/v1/vehicle_service_client.d.ts +1165 -0
- package/build/src/v1/vehicle_service_client.js +904 -0
- package/build/src/v1/vehicle_service_client.js.map +1 -0
- package/build/src/v1/vehicle_service_client_config.json +75 -0
- package/package.json +70 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as v1 from './v1';
|
|
2
|
+
declare const TripServiceClient: typeof v1.TripServiceClient;
|
|
3
|
+
type TripServiceClient = v1.TripServiceClient;
|
|
4
|
+
declare const VehicleServiceClient: typeof v1.VehicleServiceClient;
|
|
5
|
+
type VehicleServiceClient = v1.VehicleServiceClient;
|
|
6
|
+
export { v1, TripServiceClient, VehicleServiceClient };
|
|
7
|
+
declare const _default: {
|
|
8
|
+
v1: typeof v1;
|
|
9
|
+
TripServiceClient: typeof v1.TripServiceClient;
|
|
10
|
+
VehicleServiceClient: typeof v1.VehicleServiceClient;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
import * as protos from '../protos/protos';
|
|
14
|
+
export { protos };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2024 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
//
|
|
16
|
+
// ** This file is automatically generated by synthtool. **
|
|
17
|
+
// ** https://github.com/googleapis/synthtool **
|
|
18
|
+
// ** All changes to this file may be overwritten. **
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.protos = exports.VehicleServiceClient = exports.TripServiceClient = exports.v1 = void 0;
|
|
21
|
+
const v1 = require("./v1");
|
|
22
|
+
exports.v1 = v1;
|
|
23
|
+
const TripServiceClient = v1.TripServiceClient;
|
|
24
|
+
exports.TripServiceClient = TripServiceClient;
|
|
25
|
+
const VehicleServiceClient = v1.VehicleServiceClient;
|
|
26
|
+
exports.VehicleServiceClient = VehicleServiceClient;
|
|
27
|
+
exports.default = { v1, TripServiceClient, VehicleServiceClient };
|
|
28
|
+
const protos = require("../protos/protos");
|
|
29
|
+
exports.protos = protos;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,2DAA2D;AAC3D,gDAAgD;AAChD,qDAAqD;;;AAErD,2BAA2B;AAOnB,gBAAE;AALV,MAAM,iBAAiB,GAAG,EAAE,CAAC,iBAAiB,CAAC;AAKnC,8CAAiB;AAH7B,MAAM,oBAAoB,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAGtB,oDAAoB;AACnD,kBAAe,EAAC,EAAE,EAAE,iBAAiB,EAAE,oBAAoB,EAAC,CAAC;AAC7D,2CAA2C;AACnC,wBAAM"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2024 Google LLC
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
//
|
|
16
|
+
// ** This file is automatically generated by gapic-generator-typescript. **
|
|
17
|
+
// ** https://github.com/googleapis/gapic-generator-typescript **
|
|
18
|
+
// ** All changes to this file may be overwritten. **
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.VehicleServiceClient = exports.TripServiceClient = void 0;
|
|
21
|
+
var trip_service_client_1 = require("./trip_service_client");
|
|
22
|
+
Object.defineProperty(exports, "TripServiceClient", { enumerable: true, get: function () { return trip_service_client_1.TripServiceClient; } });
|
|
23
|
+
var vehicle_service_client_1 = require("./vehicle_service_client");
|
|
24
|
+
Object.defineProperty(exports, "VehicleServiceClient", { enumerable: true, get: function () { return vehicle_service_client_1.VehicleServiceClient; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;;AAErD,6DAAwD;AAAhD,wHAAA,iBAAiB,OAAA;AACzB,mEAA8D;AAAtD,8HAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type * as gax from 'google-gax';
|
|
3
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
|
|
4
|
+
import { Transform } from 'stream';
|
|
5
|
+
import * as protos from '../../protos/protos';
|
|
6
|
+
/**
|
|
7
|
+
* Trip management service.
|
|
8
|
+
* @class
|
|
9
|
+
* @memberof v1
|
|
10
|
+
*/
|
|
11
|
+
export declare class TripServiceClient {
|
|
12
|
+
private _terminated;
|
|
13
|
+
private _opts;
|
|
14
|
+
private _providedCustomServicePath;
|
|
15
|
+
private _gaxModule;
|
|
16
|
+
private _gaxGrpc;
|
|
17
|
+
private _protos;
|
|
18
|
+
private _defaults;
|
|
19
|
+
private _universeDomain;
|
|
20
|
+
private _servicePath;
|
|
21
|
+
auth: gax.GoogleAuth;
|
|
22
|
+
descriptors: Descriptors;
|
|
23
|
+
warn: (code: string, message: string, warnType?: string) => void;
|
|
24
|
+
innerApiCalls: {
|
|
25
|
+
[name: string]: Function;
|
|
26
|
+
};
|
|
27
|
+
pathTemplates: {
|
|
28
|
+
[name: string]: gax.PathTemplate;
|
|
29
|
+
};
|
|
30
|
+
tripServiceStub?: Promise<{
|
|
31
|
+
[name: string]: Function;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Construct an instance of TripServiceClient.
|
|
35
|
+
*
|
|
36
|
+
* @param {object} [options] - The configuration object.
|
|
37
|
+
* The options accepted by the constructor are described in detail
|
|
38
|
+
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
|
|
39
|
+
* The common options are:
|
|
40
|
+
* @param {object} [options.credentials] - Credentials object.
|
|
41
|
+
* @param {string} [options.credentials.client_email]
|
|
42
|
+
* @param {string} [options.credentials.private_key]
|
|
43
|
+
* @param {string} [options.email] - Account email address. Required when
|
|
44
|
+
* using a .pem or .p12 keyFilename.
|
|
45
|
+
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
|
|
46
|
+
* .p12 key downloaded from the Google Developers Console. If you provide
|
|
47
|
+
* a path to a JSON file, the projectId option below is not necessary.
|
|
48
|
+
* NOTE: .pem and .p12 require you to specify options.email as well.
|
|
49
|
+
* @param {number} [options.port] - The port on which to connect to
|
|
50
|
+
* the remote host.
|
|
51
|
+
* @param {string} [options.projectId] - The project ID from the Google
|
|
52
|
+
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
53
|
+
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
54
|
+
* app is running in an environment which supports
|
|
55
|
+
* {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
|
|
56
|
+
* your project ID will be detected automatically.
|
|
57
|
+
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
58
|
+
* API remote host.
|
|
59
|
+
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
|
60
|
+
* Follows the structure of {@link gapicConfig}.
|
|
61
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
|
62
|
+
* For more information, please check the
|
|
63
|
+
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
|
64
|
+
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
|
65
|
+
* need to avoid loading the default gRPC version and want to use the fallback
|
|
66
|
+
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
|
67
|
+
* ```
|
|
68
|
+
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
|
69
|
+
* const client = new TripServiceClient({fallback: true}, gax);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
|
73
|
+
/**
|
|
74
|
+
* Initialize the client.
|
|
75
|
+
* Performs asynchronous operations (such as authentication) and prepares the client.
|
|
76
|
+
* This function will be called automatically when any class method is called for the
|
|
77
|
+
* first time, but if you need to initialize it before calling an actual method,
|
|
78
|
+
* feel free to call initialize() directly.
|
|
79
|
+
*
|
|
80
|
+
* You can await on this method if you want to make sure the client is initialized.
|
|
81
|
+
*
|
|
82
|
+
* @returns {Promise} A promise that resolves to an authenticated service stub.
|
|
83
|
+
*/
|
|
84
|
+
initialize(): Promise<{
|
|
85
|
+
[name: string]: Function;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* The DNS address for this API service.
|
|
89
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
90
|
+
* @returns {string} The DNS address for this service.
|
|
91
|
+
*/
|
|
92
|
+
static get servicePath(): string;
|
|
93
|
+
/**
|
|
94
|
+
* The DNS address for this API service - same as servicePath.
|
|
95
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
96
|
+
* @returns {string} The DNS address for this service.
|
|
97
|
+
*/
|
|
98
|
+
static get apiEndpoint(): string;
|
|
99
|
+
/**
|
|
100
|
+
* The DNS address for this API service.
|
|
101
|
+
* @returns {string} The DNS address for this service.
|
|
102
|
+
*/
|
|
103
|
+
get apiEndpoint(): string;
|
|
104
|
+
get universeDomain(): string;
|
|
105
|
+
/**
|
|
106
|
+
* The port for this API service.
|
|
107
|
+
* @returns {number} The default port for this service.
|
|
108
|
+
*/
|
|
109
|
+
static get port(): number;
|
|
110
|
+
/**
|
|
111
|
+
* The scopes needed to make gRPC calls for every method defined
|
|
112
|
+
* in this service.
|
|
113
|
+
* @returns {string[]} List of default scopes.
|
|
114
|
+
*/
|
|
115
|
+
static get scopes(): string[];
|
|
116
|
+
getProjectId(): Promise<string>;
|
|
117
|
+
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
118
|
+
/**
|
|
119
|
+
* Creates a trip in the Fleet Engine and returns the new trip.
|
|
120
|
+
*
|
|
121
|
+
* @param {Object} request
|
|
122
|
+
* The request object that will be sent.
|
|
123
|
+
* @param {maps.fleetengine.v1.RequestHeader} request.header
|
|
124
|
+
* The standard Fleet Engine request header.
|
|
125
|
+
* @param {string} request.parent
|
|
126
|
+
* Required. Must be in the format `providers/{provider}`.
|
|
127
|
+
* The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
128
|
+
* of the Google Cloud Project of which the service account making
|
|
129
|
+
* this call is a member.
|
|
130
|
+
* @param {string} request.tripId
|
|
131
|
+
* Required. Unique Trip ID.
|
|
132
|
+
* Subject to the following restrictions:
|
|
133
|
+
*
|
|
134
|
+
* * Must be a valid Unicode string.
|
|
135
|
+
* * Limited to a maximum length of 64 characters.
|
|
136
|
+
* * Normalized according to [Unicode Normalization Form C]
|
|
137
|
+
* (http://www.unicode.org/reports/tr15/).
|
|
138
|
+
* * May not contain any of the following ASCII characters: '/', ':', '?',
|
|
139
|
+
* ',', or '#'.
|
|
140
|
+
* @param {maps.fleetengine.v1.Trip} request.trip
|
|
141
|
+
* Required. Trip entity to create.
|
|
142
|
+
*
|
|
143
|
+
* When creating a Trip, the following fields are required:
|
|
144
|
+
*
|
|
145
|
+
* * `trip_type`
|
|
146
|
+
* * `pickup_point`
|
|
147
|
+
*
|
|
148
|
+
* The following fields are used if you provide them:
|
|
149
|
+
*
|
|
150
|
+
* * `number_of_passengers`
|
|
151
|
+
* * `vehicle_id`
|
|
152
|
+
* * `dropoff_point`
|
|
153
|
+
* * `intermediate_destinations`
|
|
154
|
+
* * `vehicle_waypoints`
|
|
155
|
+
*
|
|
156
|
+
* All other Trip fields are ignored. For example, all trips start with a
|
|
157
|
+
* `trip_status` of `NEW` even if you pass in a `trip_status` of `CANCELED` in
|
|
158
|
+
* the creation request.
|
|
159
|
+
*
|
|
160
|
+
* Only `EXCLUSIVE` trips support `intermediate_destinations`.
|
|
161
|
+
*
|
|
162
|
+
* When `vehicle_id` is set for a shared trip, you must supply
|
|
163
|
+
* the list of `Trip.vehicle_waypoints` to specify the order of the remaining
|
|
164
|
+
* waypoints for the vehicle, otherwise the waypoint order will be
|
|
165
|
+
* undetermined.
|
|
166
|
+
*
|
|
167
|
+
* When you specify `Trip.vehicle_waypoints`, the list must contain all
|
|
168
|
+
* the remaining waypoints of the vehicle's trips, with no extra waypoints.
|
|
169
|
+
* You must order these waypoints such that for a given trip, the pickup
|
|
170
|
+
* point is before intermediate destinations, and all intermediate
|
|
171
|
+
* destinations come before the drop-off point. An `EXCLUSIVE` trip's
|
|
172
|
+
* waypoints must not interleave with any other trips.
|
|
173
|
+
*
|
|
174
|
+
* The `trip_id`, `waypoint_type` and `location` fields are used, and all
|
|
175
|
+
* other TripWaypoint fields in `vehicle_waypoints` are ignored.
|
|
176
|
+
* @param {object} [options]
|
|
177
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
178
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
179
|
+
* The first element of the array is an object representing {@link protos.maps.fleetengine.v1.Trip|Trip}.
|
|
180
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
181
|
+
* for more details and examples.
|
|
182
|
+
* @example <caption>include:samples/generated/v1/trip_service.create_trip.js</caption>
|
|
183
|
+
* region_tag:fleetengine_v1_generated_TripService_CreateTrip_async
|
|
184
|
+
*/
|
|
185
|
+
createTrip(request?: protos.maps.fleetengine.v1.ICreateTripRequest, options?: CallOptions): Promise<[
|
|
186
|
+
protos.maps.fleetengine.v1.ITrip,
|
|
187
|
+
protos.maps.fleetengine.v1.ICreateTripRequest | undefined,
|
|
188
|
+
{} | undefined
|
|
189
|
+
]>;
|
|
190
|
+
createTrip(request: protos.maps.fleetengine.v1.ICreateTripRequest, options: CallOptions, callback: Callback<protos.maps.fleetengine.v1.ITrip, protos.maps.fleetengine.v1.ICreateTripRequest | null | undefined, {} | null | undefined>): void;
|
|
191
|
+
createTrip(request: protos.maps.fleetengine.v1.ICreateTripRequest, callback: Callback<protos.maps.fleetengine.v1.ITrip, protos.maps.fleetengine.v1.ICreateTripRequest | null | undefined, {} | null | undefined>): void;
|
|
192
|
+
/**
|
|
193
|
+
* Get information about a single trip.
|
|
194
|
+
*
|
|
195
|
+
* @param {Object} request
|
|
196
|
+
* The request object that will be sent.
|
|
197
|
+
* @param {maps.fleetengine.v1.RequestHeader} request.header
|
|
198
|
+
* The standard Fleet Engine request header.
|
|
199
|
+
* @param {string} request.name
|
|
200
|
+
* Required. Must be in the format `providers/{provider}/trips/{trip}`.
|
|
201
|
+
* The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
202
|
+
* of the Google Cloud Project of which the service account making
|
|
203
|
+
* this call is a member.
|
|
204
|
+
* @param {maps.fleetengine.v1.TripView} request.view
|
|
205
|
+
* The subset of Trip fields that should be returned and their interpretation.
|
|
206
|
+
* @param {google.protobuf.Timestamp} request.currentRouteSegmentVersion
|
|
207
|
+
* Indicates the minimum timestamp (exclusive) for which `Trip.route` or
|
|
208
|
+
* `Trip.current_route_segment` data are retrieved. If route data are
|
|
209
|
+
* unchanged since this timestamp, the route field is not set in the response.
|
|
210
|
+
* If a minimum is unspecified, the route data are always retrieved.
|
|
211
|
+
* @param {google.protobuf.Timestamp} request.remainingWaypointsVersion
|
|
212
|
+
* Indicates the minimum timestamp (exclusive) for which
|
|
213
|
+
* `Trip.remaining_waypoints` are retrieved. If they are unchanged since this
|
|
214
|
+
* timestamp, the `remaining_waypoints` are not set in the response. If this
|
|
215
|
+
* field is unspecified, `remaining_waypoints` is always retrieved.
|
|
216
|
+
* @param {maps.fleetengine.v1.PolylineFormatType} request.routeFormatType
|
|
217
|
+
* The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`),
|
|
218
|
+
* or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default
|
|
219
|
+
* is `LAT_LNG_LIST_TYPE`.
|
|
220
|
+
* @param {google.protobuf.Timestamp} request.currentRouteSegmentTrafficVersion
|
|
221
|
+
* Indicates the minimum timestamp (exclusive) for which
|
|
222
|
+
* `Trip.current_route_segment_traffic` is retrieved. If traffic data are
|
|
223
|
+
* unchanged since this timestamp, the `current_route_segment_traffic` field
|
|
224
|
+
* is not set in the response. If a minimum is unspecified, the traffic data
|
|
225
|
+
* are always retrieved. Note that traffic is only available for On-Demand
|
|
226
|
+
* Rides and Deliveries Solution customers.
|
|
227
|
+
* @param {google.protobuf.Timestamp} request.remainingWaypointsRouteVersion
|
|
228
|
+
* Indicates the minimum timestamp (exclusive) for which
|
|
229
|
+
* `Trip.remaining_waypoints.traffic_to_waypoint` and
|
|
230
|
+
* `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. If data are
|
|
231
|
+
* unchanged since this timestamp, the fields above are
|
|
232
|
+
* not set in the response. If `remaining_waypoints_route_version` is
|
|
233
|
+
* unspecified, traffic and path are always retrieved.
|
|
234
|
+
* @param {object} [options]
|
|
235
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
236
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
237
|
+
* The first element of the array is an object representing {@link protos.maps.fleetengine.v1.Trip|Trip}.
|
|
238
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
239
|
+
* for more details and examples.
|
|
240
|
+
* @example <caption>include:samples/generated/v1/trip_service.get_trip.js</caption>
|
|
241
|
+
* region_tag:fleetengine_v1_generated_TripService_GetTrip_async
|
|
242
|
+
*/
|
|
243
|
+
getTrip(request?: protos.maps.fleetengine.v1.IGetTripRequest, options?: CallOptions): Promise<[
|
|
244
|
+
protos.maps.fleetengine.v1.ITrip,
|
|
245
|
+
protos.maps.fleetengine.v1.IGetTripRequest | undefined,
|
|
246
|
+
{} | undefined
|
|
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;
|
|
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
|
+
* Report billable trip usage.
|
|
252
|
+
*
|
|
253
|
+
* @param {Object} request
|
|
254
|
+
* The request object that will be sent.
|
|
255
|
+
* @param {string} request.name
|
|
256
|
+
* Required. Must be in the format
|
|
257
|
+
* `providers/{provider}/billableTrips/{billable_trip}`. The
|
|
258
|
+
* provider must be the Project ID (for example, `sample-cloud-project`) of
|
|
259
|
+
* the Google Cloud Project of which the service account making this call is a
|
|
260
|
+
* member.
|
|
261
|
+
* @param {string} request.countryCode
|
|
262
|
+
* Required. Two letter country code of the country where the trip takes
|
|
263
|
+
* place. Price is defined according to country code.
|
|
264
|
+
* @param {maps.fleetengine.v1.BillingPlatformIdentifier} request.platform
|
|
265
|
+
* The platform upon which the request was issued.
|
|
266
|
+
* @param {string[]} request.relatedIds
|
|
267
|
+
* The identifiers that are directly related to the trip being reported. These
|
|
268
|
+
* are usually IDs (for example, session IDs) of pre-booking operations done
|
|
269
|
+
* before the trip ID is available. The number of `related_ids` is
|
|
270
|
+
* limited to 50.
|
|
271
|
+
* @param {maps.fleetengine.v1.ReportBillableTripRequest.SolutionType} request.solutionType
|
|
272
|
+
* The type of GMP product solution (for example,
|
|
273
|
+
* `ON_DEMAND_RIDESHARING_AND_DELIVERIES`) used for the reported trip.
|
|
274
|
+
* @param {object} [options]
|
|
275
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
276
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
277
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
278
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
279
|
+
* for more details and examples.
|
|
280
|
+
* @example <caption>include:samples/generated/v1/trip_service.report_billable_trip.js</caption>
|
|
281
|
+
* region_tag:fleetengine_v1_generated_TripService_ReportBillableTrip_async
|
|
282
|
+
*/
|
|
283
|
+
reportBillableTrip(request?: protos.maps.fleetengine.v1.IReportBillableTripRequest, options?: CallOptions): Promise<[
|
|
284
|
+
protos.google.protobuf.IEmpty,
|
|
285
|
+
protos.maps.fleetengine.v1.IReportBillableTripRequest | undefined,
|
|
286
|
+
{} | undefined
|
|
287
|
+
]>;
|
|
288
|
+
reportBillableTrip(request: protos.maps.fleetengine.v1.IReportBillableTripRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.maps.fleetengine.v1.IReportBillableTripRequest | null | undefined, {} | null | undefined>): void;
|
|
289
|
+
reportBillableTrip(request: protos.maps.fleetengine.v1.IReportBillableTripRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.maps.fleetengine.v1.IReportBillableTripRequest | null | undefined, {} | null | undefined>): void;
|
|
290
|
+
/**
|
|
291
|
+
* Updates trip data.
|
|
292
|
+
*
|
|
293
|
+
* @param {Object} request
|
|
294
|
+
* The request object that will be sent.
|
|
295
|
+
* @param {maps.fleetengine.v1.RequestHeader} request.header
|
|
296
|
+
* The standard Fleet Engine request header.
|
|
297
|
+
* @param {string} request.name
|
|
298
|
+
* Required. Must be in the format
|
|
299
|
+
* `providers/{provider}/trips/{trip}`. The provider must
|
|
300
|
+
* be the Project ID (for example, `sample-consumer-project`) of the Google
|
|
301
|
+
* Cloud Project of which the service account making this call is a member.
|
|
302
|
+
* @param {maps.fleetengine.v1.Trip} request.trip
|
|
303
|
+
* Required. The Trip associated with the update.
|
|
304
|
+
*
|
|
305
|
+
* The following fields are maintained by the Fleet Engine. Do not update
|
|
306
|
+
* them using Trip.update.
|
|
307
|
+
*
|
|
308
|
+
* * `current_route_segment`
|
|
309
|
+
* * `current_route_segment_end_point`
|
|
310
|
+
* * `current_route_segment_traffic`
|
|
311
|
+
* * `current_route_segment_traffic_version`
|
|
312
|
+
* * `current_route_segment_version`
|
|
313
|
+
* * `dropoff_time`
|
|
314
|
+
* * `eta_to_next_waypoint`
|
|
315
|
+
* * `intermediate_destinations_version`
|
|
316
|
+
* * `last_location`
|
|
317
|
+
* * `name`
|
|
318
|
+
* * `number_of_passengers`
|
|
319
|
+
* * `pickup_time`
|
|
320
|
+
* * `remaining_distance_meters`
|
|
321
|
+
* * `remaining_time_to_first_waypoint`
|
|
322
|
+
* * `remaining_waypoints`
|
|
323
|
+
* * `remaining_waypoints_version`
|
|
324
|
+
* * `route`
|
|
325
|
+
*
|
|
326
|
+
* When you update the `Trip.vehicle_id` for a shared trip, you must supply
|
|
327
|
+
* the list of `Trip.vehicle_waypoints` to specify the order of the remaining
|
|
328
|
+
* waypoints, otherwise the order will be undetermined.
|
|
329
|
+
*
|
|
330
|
+
* When you specify `Trip.vehicle_waypoints`, the list must contain all
|
|
331
|
+
* the remaining waypoints of the vehicle's trips, with no extra waypoints.
|
|
332
|
+
* You must order these waypoints such that for a given trip, the pickup
|
|
333
|
+
* point is before intermediate destinations, and all intermediate
|
|
334
|
+
* destinations come before the drop-off point. An `EXCLUSIVE` trip's
|
|
335
|
+
* waypoints must not interleave with any other trips.
|
|
336
|
+
* The `trip_id`, `waypoint_type` and `location` fields are used, and all
|
|
337
|
+
* other TripWaypoint fields in `vehicle_waypoints` are ignored.
|
|
338
|
+
*
|
|
339
|
+
* To avoid a race condition for trips with multiple destinations, you
|
|
340
|
+
* should provide `Trip.intermediate_destinations_version` when updating
|
|
341
|
+
* the trip status to `ENROUTE_TO_INTERMEDIATE_DESTINATION`. The
|
|
342
|
+
* `Trip.intermediate_destinations_version` passed must be consistent with
|
|
343
|
+
* Fleet Engine's version. If it isn't, the request fails.
|
|
344
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
345
|
+
* Required. The field mask indicating which fields in Trip to update.
|
|
346
|
+
* The `update_mask` must contain at least one field.
|
|
347
|
+
* @param {object} [options]
|
|
348
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
349
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
350
|
+
* The first element of the array is an object representing {@link protos.maps.fleetengine.v1.Trip|Trip}.
|
|
351
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
352
|
+
* for more details and examples.
|
|
353
|
+
* @example <caption>include:samples/generated/v1/trip_service.update_trip.js</caption>
|
|
354
|
+
* region_tag:fleetengine_v1_generated_TripService_UpdateTrip_async
|
|
355
|
+
*/
|
|
356
|
+
updateTrip(request?: protos.maps.fleetengine.v1.IUpdateTripRequest, options?: CallOptions): Promise<[
|
|
357
|
+
protos.maps.fleetengine.v1.ITrip,
|
|
358
|
+
protos.maps.fleetengine.v1.IUpdateTripRequest | undefined,
|
|
359
|
+
{} | undefined
|
|
360
|
+
]>;
|
|
361
|
+
updateTrip(request: protos.maps.fleetengine.v1.IUpdateTripRequest, options: CallOptions, callback: Callback<protos.maps.fleetengine.v1.ITrip, protos.maps.fleetengine.v1.IUpdateTripRequest | null | undefined, {} | null | undefined>): void;
|
|
362
|
+
updateTrip(request: protos.maps.fleetengine.v1.IUpdateTripRequest, callback: Callback<protos.maps.fleetengine.v1.ITrip, protos.maps.fleetengine.v1.IUpdateTripRequest | null | undefined, {} | null | undefined>): void;
|
|
363
|
+
/**
|
|
364
|
+
* Get all the trips for a specific vehicle.
|
|
365
|
+
*
|
|
366
|
+
* @param {Object} request
|
|
367
|
+
* The request object that will be sent.
|
|
368
|
+
* @param {maps.fleetengine.v1.RequestHeader} request.header
|
|
369
|
+
* The standard Fleet Engine request header.
|
|
370
|
+
* @param {string} request.parent
|
|
371
|
+
* Required. Must be in the format `providers/{provider}`.
|
|
372
|
+
* The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
373
|
+
* of the Google Cloud Project of which the service account making
|
|
374
|
+
* this call is a member.
|
|
375
|
+
* @param {string} request.vehicleId
|
|
376
|
+
* The vehicle associated with the trips in the request. If unspecified, the
|
|
377
|
+
* returned trips do not contain:
|
|
378
|
+
*
|
|
379
|
+
* * `current_route_segment`
|
|
380
|
+
* * `remaining_waypoints`
|
|
381
|
+
* * `remaining_distance_meters`
|
|
382
|
+
* * `eta_to_first_waypoint`
|
|
383
|
+
* @param {boolean} request.activeTripsOnly
|
|
384
|
+
* If set to true, the response includes Trips that influence a driver's
|
|
385
|
+
* route.
|
|
386
|
+
* @param {number} request.pageSize
|
|
387
|
+
* If not set, the server decides the number of results to return.
|
|
388
|
+
* @param {string} request.pageToken
|
|
389
|
+
* Set this to a value previously returned in the `SearchTripsResponse` to
|
|
390
|
+
* continue from previous results.
|
|
391
|
+
* @param {google.protobuf.Duration} request.minimumStaleness
|
|
392
|
+
* If specified, returns the trips that have not been updated after the time
|
|
393
|
+
* `(current - minimum_staleness)`.
|
|
394
|
+
* @param {object} [options]
|
|
395
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
396
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
397
|
+
* The first element of the array is Array of {@link protos.maps.fleetengine.v1.Trip|Trip}.
|
|
398
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
399
|
+
* times as needed and will merge results from all the pages into this array.
|
|
400
|
+
* Note that it can affect your quota.
|
|
401
|
+
* We recommend using `searchTripsAsync()`
|
|
402
|
+
* method described below for async iteration which you can stop as needed.
|
|
403
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
404
|
+
* for more details and examples.
|
|
405
|
+
*/
|
|
406
|
+
searchTrips(request?: protos.maps.fleetengine.v1.ISearchTripsRequest, options?: CallOptions): Promise<[
|
|
407
|
+
protos.maps.fleetengine.v1.ITrip[],
|
|
408
|
+
protos.maps.fleetengine.v1.ISearchTripsRequest | null,
|
|
409
|
+
protos.maps.fleetengine.v1.ISearchTripsResponse
|
|
410
|
+
]>;
|
|
411
|
+
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;
|
|
412
|
+
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;
|
|
413
|
+
/**
|
|
414
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
415
|
+
* @param {Object} request
|
|
416
|
+
* The request object that will be sent.
|
|
417
|
+
* @param {maps.fleetengine.v1.RequestHeader} request.header
|
|
418
|
+
* The standard Fleet Engine request header.
|
|
419
|
+
* @param {string} request.parent
|
|
420
|
+
* Required. Must be in the format `providers/{provider}`.
|
|
421
|
+
* The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
422
|
+
* of the Google Cloud Project of which the service account making
|
|
423
|
+
* this call is a member.
|
|
424
|
+
* @param {string} request.vehicleId
|
|
425
|
+
* The vehicle associated with the trips in the request. If unspecified, the
|
|
426
|
+
* returned trips do not contain:
|
|
427
|
+
*
|
|
428
|
+
* * `current_route_segment`
|
|
429
|
+
* * `remaining_waypoints`
|
|
430
|
+
* * `remaining_distance_meters`
|
|
431
|
+
* * `eta_to_first_waypoint`
|
|
432
|
+
* @param {boolean} request.activeTripsOnly
|
|
433
|
+
* If set to true, the response includes Trips that influence a driver's
|
|
434
|
+
* route.
|
|
435
|
+
* @param {number} request.pageSize
|
|
436
|
+
* If not set, the server decides the number of results to return.
|
|
437
|
+
* @param {string} request.pageToken
|
|
438
|
+
* Set this to a value previously returned in the `SearchTripsResponse` to
|
|
439
|
+
* continue from previous results.
|
|
440
|
+
* @param {google.protobuf.Duration} request.minimumStaleness
|
|
441
|
+
* If specified, returns the trips that have not been updated after the time
|
|
442
|
+
* `(current - minimum_staleness)`.
|
|
443
|
+
* @param {object} [options]
|
|
444
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
445
|
+
* @returns {Stream}
|
|
446
|
+
* An object stream which emits an object representing {@link protos.maps.fleetengine.v1.Trip|Trip} on 'data' event.
|
|
447
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
448
|
+
* times as needed. Note that it can affect your quota.
|
|
449
|
+
* We recommend using `searchTripsAsync()`
|
|
450
|
+
* method described below for async iteration which you can stop as needed.
|
|
451
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
452
|
+
* for more details and examples.
|
|
453
|
+
*/
|
|
454
|
+
searchTripsStream(request?: protos.maps.fleetengine.v1.ISearchTripsRequest, options?: CallOptions): Transform;
|
|
455
|
+
/**
|
|
456
|
+
* Equivalent to `searchTrips`, but returns an iterable object.
|
|
457
|
+
*
|
|
458
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
459
|
+
* @param {Object} request
|
|
460
|
+
* The request object that will be sent.
|
|
461
|
+
* @param {maps.fleetengine.v1.RequestHeader} request.header
|
|
462
|
+
* The standard Fleet Engine request header.
|
|
463
|
+
* @param {string} request.parent
|
|
464
|
+
* Required. Must be in the format `providers/{provider}`.
|
|
465
|
+
* The provider must be the Project ID (for example, `sample-cloud-project`)
|
|
466
|
+
* of the Google Cloud Project of which the service account making
|
|
467
|
+
* this call is a member.
|
|
468
|
+
* @param {string} request.vehicleId
|
|
469
|
+
* The vehicle associated with the trips in the request. If unspecified, the
|
|
470
|
+
* returned trips do not contain:
|
|
471
|
+
*
|
|
472
|
+
* * `current_route_segment`
|
|
473
|
+
* * `remaining_waypoints`
|
|
474
|
+
* * `remaining_distance_meters`
|
|
475
|
+
* * `eta_to_first_waypoint`
|
|
476
|
+
* @param {boolean} request.activeTripsOnly
|
|
477
|
+
* If set to true, the response includes Trips that influence a driver's
|
|
478
|
+
* route.
|
|
479
|
+
* @param {number} request.pageSize
|
|
480
|
+
* If not set, the server decides the number of results to return.
|
|
481
|
+
* @param {string} request.pageToken
|
|
482
|
+
* Set this to a value previously returned in the `SearchTripsResponse` to
|
|
483
|
+
* continue from previous results.
|
|
484
|
+
* @param {google.protobuf.Duration} request.minimumStaleness
|
|
485
|
+
* If specified, returns the trips that have not been updated after the time
|
|
486
|
+
* `(current - minimum_staleness)`.
|
|
487
|
+
* @param {object} [options]
|
|
488
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
489
|
+
* @returns {Object}
|
|
490
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
491
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
492
|
+
* {@link protos.maps.fleetengine.v1.Trip|Trip}. The API will be called under the hood as needed, once per the page,
|
|
493
|
+
* so you can stop the iteration when you don't need more results.
|
|
494
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
495
|
+
* for more details and examples.
|
|
496
|
+
* @example <caption>include:samples/generated/v1/trip_service.search_trips.js</caption>
|
|
497
|
+
* region_tag:fleetengine_v1_generated_TripService_SearchTrips_async
|
|
498
|
+
*/
|
|
499
|
+
searchTripsAsync(request?: protos.maps.fleetengine.v1.ISearchTripsRequest, options?: CallOptions): AsyncIterable<protos.maps.fleetengine.v1.ITrip>;
|
|
500
|
+
/**
|
|
501
|
+
* Return a fully-qualified trip resource name string.
|
|
502
|
+
*
|
|
503
|
+
* @param {string} provider
|
|
504
|
+
* @param {string} trip
|
|
505
|
+
* @returns {string} Resource name string.
|
|
506
|
+
*/
|
|
507
|
+
tripPath(provider: string, trip: string): string;
|
|
508
|
+
/**
|
|
509
|
+
* Parse the provider from Trip resource.
|
|
510
|
+
*
|
|
511
|
+
* @param {string} tripName
|
|
512
|
+
* A fully-qualified path representing Trip resource.
|
|
513
|
+
* @returns {string} A string representing the provider.
|
|
514
|
+
*/
|
|
515
|
+
matchProviderFromTripName(tripName: string): string | number;
|
|
516
|
+
/**
|
|
517
|
+
* Parse the trip from Trip resource.
|
|
518
|
+
*
|
|
519
|
+
* @param {string} tripName
|
|
520
|
+
* A fully-qualified path representing Trip resource.
|
|
521
|
+
* @returns {string} A string representing the trip.
|
|
522
|
+
*/
|
|
523
|
+
matchTripFromTripName(tripName: string): string | number;
|
|
524
|
+
/**
|
|
525
|
+
* Return a fully-qualified vehicle resource name string.
|
|
526
|
+
*
|
|
527
|
+
* @param {string} provider
|
|
528
|
+
* @param {string} vehicle
|
|
529
|
+
* @returns {string} Resource name string.
|
|
530
|
+
*/
|
|
531
|
+
vehiclePath(provider: string, vehicle: string): string;
|
|
532
|
+
/**
|
|
533
|
+
* Parse the provider from Vehicle resource.
|
|
534
|
+
*
|
|
535
|
+
* @param {string} vehicleName
|
|
536
|
+
* A fully-qualified path representing Vehicle resource.
|
|
537
|
+
* @returns {string} A string representing the provider.
|
|
538
|
+
*/
|
|
539
|
+
matchProviderFromVehicleName(vehicleName: string): string | number;
|
|
540
|
+
/**
|
|
541
|
+
* Parse the vehicle from Vehicle resource.
|
|
542
|
+
*
|
|
543
|
+
* @param {string} vehicleName
|
|
544
|
+
* A fully-qualified path representing Vehicle resource.
|
|
545
|
+
* @returns {string} A string representing the vehicle.
|
|
546
|
+
*/
|
|
547
|
+
matchVehicleFromVehicleName(vehicleName: string): string | number;
|
|
548
|
+
/**
|
|
549
|
+
* Terminate the gRPC channel and close the client.
|
|
550
|
+
*
|
|
551
|
+
* The client will no longer be usable and all future behavior is undefined.
|
|
552
|
+
* @returns {Promise} A promise that resolves when the client is closed.
|
|
553
|
+
*/
|
|
554
|
+
close(): Promise<void>;
|
|
555
|
+
}
|