@nicertravel/sdk 0.0.0 → 1.0.0-beta.2
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/README.md +89 -3
- package/dist/_/codec.d.ts +93 -0
- package/dist/_/codec.js +298 -0
- package/dist/_/error.d.ts +27 -0
- package/dist/_/error.js +68 -0
- package/dist/_/hooks/envelope.d.ts +11 -0
- package/dist/_/hooks/envelope.js +15 -0
- package/dist/_/index.d.ts +3 -0
- package/dist/_/index.js +5 -0
- package/dist/_/transport.d.ts +146 -0
- package/dist/_/transport.js +220 -0
- package/dist/activities/client.d.ts +35 -0
- package/dist/activities/client.js +23 -0
- package/dist/activities/index.d.ts +5 -0
- package/dist/activities/index.js +4 -0
- package/dist/activities/models.d.ts +27 -0
- package/dist/activities/models.js +3 -0
- package/dist/activityDestinations/client.d.ts +24 -0
- package/dist/activityDestinations/client.js +17 -0
- package/dist/activityDestinations/index.d.ts +4 -0
- package/dist/activityDestinations/index.js +4 -0
- package/dist/balances/client.d.ts +29 -0
- package/dist/balances/client.js +18 -0
- package/dist/balances/index.d.ts +5 -0
- package/dist/balances/index.js +4 -0
- package/dist/balances/models.d.ts +12 -0
- package/dist/balances/models.js +3 -0
- package/dist/bookingSelections/client.d.ts +54 -0
- package/dist/bookingSelections/client.js +25 -0
- package/dist/bookingSelections/index.d.ts +5 -0
- package/dist/bookingSelections/index.js +4 -0
- package/dist/bookingSelections/models.d.ts +35 -0
- package/dist/bookingSelections/models.js +3 -0
- package/dist/carRentals/client.d.ts +55 -0
- package/dist/carRentals/client.js +25 -0
- package/dist/carRentals/index.d.ts +5 -0
- package/dist/carRentals/index.js +4 -0
- package/dist/carRentals/models.d.ts +157 -0
- package/dist/carRentals/models.js +3 -0
- package/dist/carriers/client.d.ts +32 -0
- package/dist/carriers/client.js +18 -0
- package/dist/carriers/index.d.ts +5 -0
- package/dist/carriers/index.js +4 -0
- package/dist/carriers/models.d.ts +9 -0
- package/dist/carriers/models.js +3 -0
- package/dist/chats/client.d.ts +69 -0
- package/dist/chats/client.js +38 -0
- package/dist/chats/index.d.ts +5 -0
- package/dist/chats/index.js +4 -0
- package/dist/chats/models.d.ts +25 -0
- package/dist/chats/models.js +3 -0
- package/dist/checkouts/client.d.ts +27 -0
- package/dist/checkouts/client.js +18 -0
- package/dist/checkouts/index.d.ts +5 -0
- package/dist/checkouts/index.js +4 -0
- package/dist/checkouts/models.d.ts +23 -0
- package/dist/checkouts/models.js +3 -0
- package/dist/client.d.ts +95 -0
- package/dist/client.js +220 -0
- package/dist/commissionExports/client.d.ts +62 -0
- package/dist/commissionExports/client.js +33 -0
- package/dist/commissionExports/index.d.ts +5 -0
- package/dist/commissionExports/index.js +4 -0
- package/dist/commissionExports/models.d.ts +165 -0
- package/dist/commissionExports/models.js +3 -0
- package/dist/commissionImports/client.d.ts +61 -0
- package/dist/commissionImports/client.js +34 -0
- package/dist/commissionImports/index.d.ts +5 -0
- package/dist/commissionImports/index.js +4 -0
- package/dist/commissionImports/models.d.ts +118 -0
- package/dist/commissionImports/models.js +3 -0
- package/dist/commissionItems/client.d.ts +128 -0
- package/dist/commissionItems/client.js +41 -0
- package/dist/commissionItems/index.d.ts +5 -0
- package/dist/commissionItems/index.js +4 -0
- package/dist/commissionItems/models.d.ts +217 -0
- package/dist/commissionItems/models.js +3 -0
- package/dist/commissionReports/client.d.ts +76 -0
- package/dist/commissionReports/client.js +18 -0
- package/dist/commissionReports/index.d.ts +5 -0
- package/dist/commissionReports/index.js +4 -0
- package/dist/commissionReports/models.d.ts +208 -0
- package/dist/commissionReports/models.js +3 -0
- package/dist/crmSettings/client.d.ts +50 -0
- package/dist/crmSettings/client.js +25 -0
- package/dist/crmSettings/index.d.ts +5 -0
- package/dist/crmSettings/index.js +4 -0
- package/dist/crmSettings/models.d.ts +313 -0
- package/dist/crmSettings/models.js +3 -0
- package/dist/earnings/client.d.ts +30 -0
- package/dist/earnings/client.js +18 -0
- package/dist/earnings/index.d.ts +5 -0
- package/dist/earnings/index.js +4 -0
- package/dist/earnings/models.d.ts +16 -0
- package/dist/earnings/models.js +3 -0
- package/dist/externalBookings/client.d.ts +56 -0
- package/dist/externalBookings/client.js +33 -0
- package/dist/externalBookings/index.d.ts +5 -0
- package/dist/externalBookings/index.js +4 -0
- package/dist/externalBookings/models.d.ts +93 -0
- package/dist/externalBookings/models.js +3 -0
- package/dist/externalPayments/client.d.ts +23 -0
- package/dist/externalPayments/client.js +18 -0
- package/dist/externalPayments/index.d.ts +5 -0
- package/dist/externalPayments/index.js +4 -0
- package/dist/externalPayments/models.d.ts +47 -0
- package/dist/externalPayments/models.js +3 -0
- package/dist/favorites/client.d.ts +87 -0
- package/dist/favorites/client.js +63 -0
- package/dist/favorites/index.d.ts +5 -0
- package/dist/favorites/index.js +4 -0
- package/dist/favorites/models.d.ts +79 -0
- package/dist/favorites/models.js +3 -0
- package/dist/flightSchedules/client.d.ts +29 -0
- package/dist/flightSchedules/client.js +18 -0
- package/dist/flightSchedules/index.d.ts +5 -0
- package/dist/flightSchedules/index.js +4 -0
- package/dist/flightSchedules/models.d.ts +25 -0
- package/dist/flightSchedules/models.js +3 -0
- package/dist/flights/client.d.ts +73 -0
- package/dist/flights/client.js +25 -0
- package/dist/flights/index.d.ts +5 -0
- package/dist/flights/index.js +4 -0
- package/dist/flights/models.d.ts +345 -0
- package/dist/flights/models.js +3 -0
- package/dist/hotels/client.d.ts +104 -0
- package/dist/hotels/client.js +26 -0
- package/dist/hotels/index.d.ts +5 -0
- package/dist/hotels/index.js +4 -0
- package/dist/hotels/models.d.ts +355 -0
- package/dist/hotels/models.js +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/insuranceQuotes/client.d.ts +27 -0
- package/dist/insuranceQuotes/client.js +18 -0
- package/dist/insuranceQuotes/index.d.ts +5 -0
- package/dist/insuranceQuotes/index.js +4 -0
- package/dist/insuranceQuotes/models.d.ts +76 -0
- package/dist/insuranceQuotes/models.js +3 -0
- package/dist/itineraries/client.d.ts +165 -0
- package/dist/itineraries/client.js +86 -0
- package/dist/itineraries/index.d.ts +5 -0
- package/dist/itineraries/index.js +4 -0
- package/dist/itineraries/models.d.ts +1619 -0
- package/dist/itineraries/models.js +4 -0
- package/dist/models.d.ts +1361 -0
- package/dist/models.js +3 -0
- package/dist/notes/client.d.ts +82 -0
- package/dist/notes/client.js +41 -0
- package/dist/notes/index.d.ts +5 -0
- package/dist/notes/index.js +4 -0
- package/dist/notes/models.d.ts +116 -0
- package/dist/notes/models.js +3 -0
- package/dist/offers/client.d.ts +27 -0
- package/dist/offers/client.js +17 -0
- package/dist/offers/index.d.ts +5 -0
- package/dist/offers/index.js +4 -0
- package/dist/offers/models.d.ts +19 -0
- package/dist/offers/models.js +3 -0
- package/dist/options/index.d.ts +114 -0
- package/dist/options/index.js +115 -0
- package/dist/orders/client.d.ts +154 -0
- package/dist/orders/client.js +65 -0
- package/dist/orders/index.d.ts +5 -0
- package/dist/orders/index.js +4 -0
- package/dist/orders/models.d.ts +2510 -0
- package/dist/orders/models.js +3 -0
- package/dist/payees/client.d.ts +48 -0
- package/dist/payees/client.js +26 -0
- package/dist/payees/index.d.ts +5 -0
- package/dist/payees/index.js +4 -0
- package/dist/payees/models.d.ts +50 -0
- package/dist/payees/models.js +3 -0
- package/dist/paymentMethods/client.d.ts +24 -0
- package/dist/paymentMethods/client.js +18 -0
- package/dist/paymentMethods/index.d.ts +5 -0
- package/dist/paymentMethods/index.js +4 -0
- package/dist/paymentMethods/models.d.ts +60 -0
- package/dist/paymentMethods/models.js +3 -0
- package/dist/places/client.d.ts +61 -0
- package/dist/places/client.js +25 -0
- package/dist/places/index.d.ts +5 -0
- package/dist/places/index.js +4 -0
- package/dist/places/models.d.ts +51 -0
- package/dist/places/models.js +3 -0
- package/dist/profileForms/client.d.ts +38 -0
- package/dist/profileForms/client.js +25 -0
- package/dist/profileForms/index.d.ts +5 -0
- package/dist/profileForms/index.js +4 -0
- package/dist/profileForms/models.d.ts +24 -0
- package/dist/profileForms/models.js +3 -0
- package/dist/quotes/client.d.ts +30 -0
- package/dist/quotes/client.js +18 -0
- package/dist/quotes/index.d.ts +5 -0
- package/dist/quotes/index.js +4 -0
- package/dist/quotes/models.d.ts +47 -0
- package/dist/quotes/models.js +3 -0
- package/dist/remittanceBatches/client.d.ts +78 -0
- package/dist/remittanceBatches/client.js +42 -0
- package/dist/remittanceBatches/index.d.ts +5 -0
- package/dist/remittanceBatches/index.js +4 -0
- package/dist/remittanceBatches/models.d.ts +131 -0
- package/dist/remittanceBatches/models.js +3 -0
- package/dist/remittanceClaims/client.d.ts +27 -0
- package/dist/remittanceClaims/client.js +18 -0
- package/dist/remittanceClaims/index.d.ts +5 -0
- package/dist/remittanceClaims/index.js +4 -0
- package/dist/remittanceClaims/models.d.ts +5 -0
- package/dist/remittanceClaims/models.js +3 -0
- package/dist/remittanceLines/client.d.ts +27 -0
- package/dist/remittanceLines/client.js +18 -0
- package/dist/remittanceLines/index.d.ts +5 -0
- package/dist/remittanceLines/index.js +4 -0
- package/dist/remittanceLines/models.d.ts +5 -0
- package/dist/remittanceLines/models.js +3 -0
- package/dist/remittances/client.d.ts +78 -0
- package/dist/remittances/client.js +42 -0
- package/dist/remittances/index.d.ts +5 -0
- package/dist/remittances/index.js +4 -0
- package/dist/remittances/models.d.ts +116 -0
- package/dist/remittances/models.js +3 -0
- package/dist/statements/client.d.ts +75 -0
- package/dist/statements/client.js +34 -0
- package/dist/statements/index.d.ts +5 -0
- package/dist/statements/index.js +4 -0
- package/dist/statements/models.d.ts +147 -0
- package/dist/statements/models.js +3 -0
- package/dist/suppliers/client.d.ts +71 -0
- package/dist/suppliers/client.js +41 -0
- package/dist/suppliers/index.d.ts +5 -0
- package/dist/suppliers/index.js +4 -0
- package/dist/suppliers/models.d.ts +130 -0
- package/dist/suppliers/models.js +3 -0
- package/dist/taskTemplates/client.d.ts +36 -0
- package/dist/taskTemplates/client.js +18 -0
- package/dist/taskTemplates/index.d.ts +5 -0
- package/dist/taskTemplates/index.js +4 -0
- package/dist/taskTemplates/models.d.ts +15 -0
- package/dist/taskTemplates/models.js +3 -0
- package/dist/tasks/client.d.ts +105 -0
- package/dist/tasks/client.js +41 -0
- package/dist/tasks/index.d.ts +5 -0
- package/dist/tasks/index.js +4 -0
- package/dist/tasks/models.d.ts +59 -0
- package/dist/tasks/models.js +3 -0
- package/dist/timeline/client.d.ts +42 -0
- package/dist/timeline/client.js +18 -0
- package/dist/timeline/index.d.ts +5 -0
- package/dist/timeline/index.js +4 -0
- package/dist/timeline/models.d.ts +65 -0
- package/dist/timeline/models.js +3 -0
- package/dist/travelProfile/client.d.ts +56 -0
- package/dist/travelProfile/client.js +25 -0
- package/dist/travelProfile/index.d.ts +5 -0
- package/dist/travelProfile/index.js +4 -0
- package/dist/travelProfile/models.d.ts +95 -0
- package/dist/travelProfile/models.js +3 -0
- package/dist/travelers/client.d.ts +214 -0
- package/dist/travelers/client.js +76 -0
- package/dist/travelers/index.d.ts +5 -0
- package/dist/travelers/index.js +4 -0
- package/dist/travelers/models.d.ts +576 -0
- package/dist/travelers/models.js +3 -0
- package/dist/trips/client.d.ts +224 -0
- package/dist/trips/client.js +88 -0
- package/dist/trips/index.d.ts +5 -0
- package/dist/trips/index.js +4 -0
- package/dist/trips/models.d.ts +486 -0
- package/dist/trips/models.js +3 -0
- package/package.json +35 -2
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
|
|
2
|
+
import type { CreateTravelersTripBody, CreateTravelersTripResponse, CrmTrip, CrmTripList, CrmTripUpdate, GetTravelersTripResponse, ListTravelersTripResponse, TravelersTripInviteBody, TravelersTripToggleArchiveBody, TravelersTripToggleArchiveResponse, TripTravelerAdd, UpdateTravelersTripBody } from "./models.js";
|
|
3
|
+
export interface ClientOptions extends BaseClientOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The URL the paths of the API are relative to.
|
|
6
|
+
*/
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Client {
|
|
10
|
+
/**
|
|
11
|
+
* Add a traveler to a trip
|
|
12
|
+
*
|
|
13
|
+
* Puts one existing traveler of the agency on the trip with their part in it,
|
|
14
|
+
* and leaves the trip's other travelers as they are. Nobody is messaged. A
|
|
15
|
+
* traveler already on the trip is left as they are, so the same call again
|
|
16
|
+
* changes nothing and answers the same trip. A trip keeps at most 20
|
|
17
|
+
* travelers and one PRIMARY. Only the trip's advisor or an agency admin adds
|
|
18
|
+
* a traveler, one they may see in the CRM. Returns the trip with its
|
|
19
|
+
* travelers as GET /crm/trips/{travelersTripId} does; the addition publishes
|
|
20
|
+
* crm.trip-updated.v1. Errors: 400 ERROR_BODY_VALIDATION, also for a trip
|
|
21
|
+
* with 20 travelers already or a second PRIMARY; 404 ERROR_ITEM_NOT_FOUND for
|
|
22
|
+
* a trip or a traveler the caller may not see; 409 CRM_REVISION_CONFLICT only
|
|
23
|
+
* when other changes to the trip kept landing through three tries.
|
|
24
|
+
*/
|
|
25
|
+
addTraveler(request: AddTravelerRequest, options?: RequestOptions): Promise<AddTravelerResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a trip
|
|
28
|
+
*
|
|
29
|
+
* Opens a trip: the container every itinerary, proposal, message and order
|
|
30
|
+
* hangs off. Send at least a title, the travel dates and one destination. The
|
|
31
|
+
* trip is created together with its itinerary and its conversation, so a
|
|
32
|
+
* single call is enough to start planning. Dates accept any parseable date
|
|
33
|
+
* string and are stored as `YYYY-MM-DD`; the start date cannot be in the past
|
|
34
|
+
* and the end date must come after it.
|
|
35
|
+
*/
|
|
36
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Get a trip
|
|
39
|
+
*
|
|
40
|
+
* Returns a single trip with its destinations, dates, travelers and the ids
|
|
41
|
+
* of the itinerary and conversation attached to it. `status` is derived on
|
|
42
|
+
* read from the trip dates and whether anything has been booked yet, so it is
|
|
43
|
+
* always current. Readable by the people on the trip, its advisor of record,
|
|
44
|
+
* the admins of the agency that owns it and Nicer staff; anyone else is
|
|
45
|
+
* refused (ERROR_UNAUTHORIZED), whatever the id.
|
|
46
|
+
*/
|
|
47
|
+
get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Get a trip's travelers
|
|
50
|
+
*
|
|
51
|
+
* Returns the trip as a CrmTrip with its travelers: who travels on it, the
|
|
52
|
+
* PRIMARY traveler first, each with the details a checkout needs, and the
|
|
53
|
+
* trip's sales stage, primary traveler, traveler count, itinerary and the
|
|
54
|
+
* revision PUT /crm/trips/{travelersTripId} sends back. The trip's staff (its
|
|
55
|
+
* advisor of record and the agency's admins) and the trip's own members
|
|
56
|
+
* signed in may read it; a payment link never does. Staff read every
|
|
57
|
+
* traveler's documents; a traveler on the trip reads only their own and those
|
|
58
|
+
* of the relatives they fill in for (a child, spouse or partner without an
|
|
59
|
+
* account of their own), and every other companion comes back with no
|
|
60
|
+
* documents. A trip the CRM keeps nothing of yet answers revision 0 and
|
|
61
|
+
* salesStage null. Errors: 404 ERROR_ITEM_NOT_FOUND for a trip that does not
|
|
62
|
+
* exist or that the caller may not read.
|
|
63
|
+
*/
|
|
64
|
+
getTravelers(request: GetTravelersRequest, options?: RequestOptions): Promise<GetTravelersResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Invite a traveler to a trip
|
|
67
|
+
*
|
|
68
|
+
* Invites a travel companion to a trip. A phone number, an email address or a
|
|
69
|
+
* name is enough. A person with a Nicer account joins the trip at once; a
|
|
70
|
+
* person without one becomes a traveler of the agency on the trip in the CRM,
|
|
71
|
+
* and joins the trip when they sign up, so a group can be assembled before
|
|
72
|
+
* everyone has an account. Returns the trip.
|
|
73
|
+
*/
|
|
74
|
+
invite(request: InviteRequest, options?: RequestOptions): Promise<InviteResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* List trips
|
|
77
|
+
*
|
|
78
|
+
* Returns one page of the trips the caller belongs to, newest first — 20 by
|
|
79
|
+
* default, at most 100, with `nextToken` for the next page. Travelers see
|
|
80
|
+
* their own trips; advisors and staff see the trips of the company they are
|
|
81
|
+
* signed in to. Each item carries the same derived `status` and `isArchived`
|
|
82
|
+
* as the single-trip endpoint, and trips whose end date has passed are
|
|
83
|
+
* archived as they are listed.
|
|
84
|
+
*/
|
|
85
|
+
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* List the sales pipeline
|
|
88
|
+
*
|
|
89
|
+
* Lists the agency's trips by sales stage, soonest first and undated trips
|
|
90
|
+
* last: an advisor's own trips, or for an admin every trip or one advisor's
|
|
91
|
+
* (assignedAdvisorUserId). salesStage keeps one column of the pipeline, NONE
|
|
92
|
+
* the trips without a stage; left out, the list runs stage by stage. Each
|
|
93
|
+
* trip is a CrmTrip without travelers: its primary traveler's id and name,
|
|
94
|
+
* how many travel on it, its itinerary and the revision PUT
|
|
95
|
+
* /crm/trips/{travelersTripId} needs. GET /crm/trips/{travelersTripId}
|
|
96
|
+
* answers who travels on one. 50 a page unless limit says otherwise; send the
|
|
97
|
+
* answer's nextToken back to read the next page, until it is null. The
|
|
98
|
+
* agency's advisors and admins may list. Errors: 400 ERROR_INVALID_QUERY for
|
|
99
|
+
* an unknown parameter, a limit out of range, a salesStage outside the
|
|
100
|
+
* pipeline or a nextToken of another list; 403 ERROR_UNAUTHORIZED for a
|
|
101
|
+
* traveler.
|
|
102
|
+
*/
|
|
103
|
+
listPipeline(request?: ListPipelineRequest, options?: RequestOptions): Promise<ListPipelineResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Archive or restore a trip
|
|
106
|
+
*
|
|
107
|
+
* Archives or restores a trip for the caller only. Archiving hides the trip
|
|
108
|
+
* from their list and their inbox; everyone else on the trip keeps seeing it.
|
|
109
|
+
* Nothing is deleted.
|
|
110
|
+
*/
|
|
111
|
+
setArchived(request: SetArchivedRequest, options?: RequestOptions): Promise<SetArchivedResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* Update a trip
|
|
114
|
+
*
|
|
115
|
+
* Edits a trip in place. Every field is optional; only what you send changes.
|
|
116
|
+
* Moving `tripStartDate` or `tripEndDate` is checked against the segments
|
|
117
|
+
* already in the itinerary, so a date change that would orphan a booked
|
|
118
|
+
* segment is rejected instead of silently breaking the trip.
|
|
119
|
+
*/
|
|
120
|
+
update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* Update a trip's travelers or sales stage
|
|
123
|
+
*
|
|
124
|
+
* Keeps exactly the travelers in the body and moves the trip to salesStage,
|
|
125
|
+
* if the trip is still at the revision sent, and answers the trip with its
|
|
126
|
+
* travelers as GET /crm/trips/{travelersTripId} does, at the next revision. A
|
|
127
|
+
* traveler on the trip left out of travelers leaves it, and stays among the
|
|
128
|
+
* agency's travelers; a body without travelers leaves the list as it is. A
|
|
129
|
+
* traveler sent as a participant, as a checkout collects them, is found by
|
|
130
|
+
* email or phone or added to the agency; a traveler added that way stays the
|
|
131
|
+
* agency's even if the trip's own change then fails. The trip's staff (its
|
|
132
|
+
* advisor of record and the agency's admins) and its members signed in may
|
|
133
|
+
* update its travelers; only staff move its sales stage. The change publishes
|
|
134
|
+
* crm.trip-updated.v1 with the sections it changed. Errors: 400
|
|
135
|
+
* ERROR_BODY_VALIDATION, also for a body with neither travelers nor
|
|
136
|
+
* salesStage; 403 ERROR_UNAUTHORIZED for a member moving the sales stage; 404
|
|
137
|
+
* ERROR_ITEM_NOT_FOUND for a trip the caller may not read, or a traveler they
|
|
138
|
+
* may not name; 409 CRM_REVISION_CONFLICT when the trip changed since it was
|
|
139
|
+
* read: read it again.
|
|
140
|
+
*/
|
|
141
|
+
updateTravelers(request: UpdateTravelersRequest, options?: RequestOptions): Promise<UpdateTravelersResponse>;
|
|
142
|
+
}
|
|
143
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
144
|
+
export declare function bind(transport: Transport): Client;
|
|
145
|
+
export type AddTravelerRequest = {
|
|
146
|
+
travelersTripId: string;
|
|
147
|
+
} & TripTravelerAdd;
|
|
148
|
+
export type AddTravelerResponse = CrmTrip;
|
|
149
|
+
export type CreateRequest = CreateTravelersTripBody;
|
|
150
|
+
export type CreateResponse = CreateTravelersTripResponse;
|
|
151
|
+
export interface GetRequest {
|
|
152
|
+
travelersTripId: string;
|
|
153
|
+
}
|
|
154
|
+
export type GetResponse = GetTravelersTripResponse;
|
|
155
|
+
export interface GetTravelersRequest {
|
|
156
|
+
travelersTripId: string;
|
|
157
|
+
}
|
|
158
|
+
export type GetTravelersResponse = CrmTrip;
|
|
159
|
+
export type InviteRequest = {
|
|
160
|
+
travelersTripId: string;
|
|
161
|
+
} & TravelersTripInviteBody;
|
|
162
|
+
export type InviteResponse = CreateTravelersTripResponse;
|
|
163
|
+
export interface ListRequest {
|
|
164
|
+
/**
|
|
165
|
+
* Comma-separated item fields to return, dotted for nested ones — for example
|
|
166
|
+
* `travelersTripId,tripTitle,destinations.name`; a leading `-` removes a path
|
|
167
|
+
* from what is kept. `nextToken` is always answered. Omitted, an item carries
|
|
168
|
+
* every projected field except the destination photo galleries, which are
|
|
169
|
+
* more than half the body: ask for `destinations.photos` to get them.
|
|
170
|
+
*/
|
|
171
|
+
fields?: string;
|
|
172
|
+
/**
|
|
173
|
+
* URL-encoded `field=value` expressions joined by `&`, applied to the page
|
|
174
|
+
* after it is read — for example `status=PROPOSAL&isArchived=false`.
|
|
175
|
+
*/
|
|
176
|
+
filter?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Trips per page. Defaults to 20, at most 100.
|
|
179
|
+
*/
|
|
180
|
+
limit?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Cursor from the previous response. Omit for the first page.
|
|
183
|
+
*/
|
|
184
|
+
nextToken?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Order by creation time. Defaults to newest first.
|
|
187
|
+
*/
|
|
188
|
+
sort?: "asc" | "desc";
|
|
189
|
+
}
|
|
190
|
+
export type ListResponse = ListTravelersTripResponse;
|
|
191
|
+
export interface ListPipelineRequest {
|
|
192
|
+
/**
|
|
193
|
+
* Admins: only this advisor's trips, by user id. An advisor always lists
|
|
194
|
+
* their own trips.
|
|
195
|
+
*/
|
|
196
|
+
assignedAdvisorUserId?: string;
|
|
197
|
+
/**
|
|
198
|
+
* How many trips a page holds, 1 to 100; 50 when left out.
|
|
199
|
+
*/
|
|
200
|
+
limit?: number;
|
|
201
|
+
/**
|
|
202
|
+
* The nextToken of the page before, to read the next one; left out for the
|
|
203
|
+
* first page.
|
|
204
|
+
*/
|
|
205
|
+
nextToken?: string;
|
|
206
|
+
/**
|
|
207
|
+
* One column of the pipeline: a sales stage, or NONE for the trips without
|
|
208
|
+
* one. Left out, every trip, stage by stage.
|
|
209
|
+
*/
|
|
210
|
+
salesStage?: "BOOKED" | "COMPLETED" | "INQUIRY" | "LOST" | "PLANNING" | "PROPOSAL" | "TRAVELING" | "NONE";
|
|
211
|
+
}
|
|
212
|
+
export type ListPipelineResponse = CrmTripList;
|
|
213
|
+
export type SetArchivedRequest = {
|
|
214
|
+
travelersTripId: string;
|
|
215
|
+
} & TravelersTripToggleArchiveBody;
|
|
216
|
+
export type SetArchivedResponse = TravelersTripToggleArchiveResponse;
|
|
217
|
+
export type UpdateRequest = {
|
|
218
|
+
travelersTripId: string;
|
|
219
|
+
} & UpdateTravelersTripBody;
|
|
220
|
+
export type UpdateResponse = CreateTravelersTripResponse;
|
|
221
|
+
export type UpdateTravelersRequest = {
|
|
222
|
+
travelersTripId: string;
|
|
223
|
+
} & CrmTripUpdate;
|
|
224
|
+
export type UpdateTravelersResponse = CrmTrip;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport, } from "../_/index.js";
|
|
4
|
+
export function createClient(options) {
|
|
5
|
+
return bind(new Transport(options));
|
|
6
|
+
}
|
|
7
|
+
export function bind(transport) {
|
|
8
|
+
return {
|
|
9
|
+
addTraveler: (request, options) => transport.send(AddTravelerOperation, request, options),
|
|
10
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
11
|
+
get: (request, options) => transport.send(GetOperation, request, options),
|
|
12
|
+
getTravelers: (request, options) => transport.send(GetTravelersOperation, request, options),
|
|
13
|
+
invite: (request, options) => transport.send(InviteOperation, request, options),
|
|
14
|
+
list: (request, options) => transport.send(ListOperation, request, options),
|
|
15
|
+
listPipeline: (request, options) => transport.send(ListPipelineOperation, request, options),
|
|
16
|
+
setArchived: (request, options) => transport.send(SetArchivedOperation, request, options),
|
|
17
|
+
update: (request, options) => transport.send(UpdateOperation, request, options),
|
|
18
|
+
updateTravelers: (request, options) => transport.send(UpdateTravelersOperation, request, options),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const AddTravelerOperation = {
|
|
22
|
+
method: "POST",
|
|
23
|
+
route: "/crm/trips/{travelersTripId}/travelers",
|
|
24
|
+
body: "flat",
|
|
25
|
+
response: null,
|
|
26
|
+
errors: { "400": true, "401": true, "403": true },
|
|
27
|
+
};
|
|
28
|
+
const CreateOperation = {
|
|
29
|
+
method: "POST",
|
|
30
|
+
route: "/travelers-trip",
|
|
31
|
+
body: "flat",
|
|
32
|
+
response: null,
|
|
33
|
+
errors: { "400": true, "401": true, "403": true },
|
|
34
|
+
};
|
|
35
|
+
const GetOperation = {
|
|
36
|
+
method: "GET",
|
|
37
|
+
route: "/travelers-trip/{travelersTripId}",
|
|
38
|
+
response: null,
|
|
39
|
+
errors: { "400": true, "401": true, "403": true },
|
|
40
|
+
};
|
|
41
|
+
const GetTravelersOperation = {
|
|
42
|
+
method: "GET",
|
|
43
|
+
route: "/crm/trips/{travelersTripId}",
|
|
44
|
+
response: null,
|
|
45
|
+
errors: { "400": true, "401": true, "403": true },
|
|
46
|
+
};
|
|
47
|
+
const InviteOperation = {
|
|
48
|
+
method: "POST",
|
|
49
|
+
route: "/travelers-trip/{travelersTripId}/invite",
|
|
50
|
+
body: "flat",
|
|
51
|
+
response: null,
|
|
52
|
+
errors: { "400": true, "401": true, "403": true },
|
|
53
|
+
};
|
|
54
|
+
const ListOperation = {
|
|
55
|
+
method: "GET",
|
|
56
|
+
route: "/travelers-trip",
|
|
57
|
+
query: { fields: "fields", filter: "filter", limit: "limit", nextToken: "nextToken", sort: "sort" },
|
|
58
|
+
response: null,
|
|
59
|
+
errors: { "400": true, "401": true, "403": true },
|
|
60
|
+
};
|
|
61
|
+
const ListPipelineOperation = {
|
|
62
|
+
method: "GET",
|
|
63
|
+
route: "/crm/trips",
|
|
64
|
+
query: { assignedAdvisorUserId: "assignedAdvisorUserId", limit: "limit", nextToken: "nextToken", salesStage: "salesStage" },
|
|
65
|
+
response: null,
|
|
66
|
+
errors: { "400": true, "401": true, "403": true },
|
|
67
|
+
};
|
|
68
|
+
const SetArchivedOperation = {
|
|
69
|
+
method: "POST",
|
|
70
|
+
route: "/travelers-trip/{travelersTripId}/toggle-archive",
|
|
71
|
+
body: "flat",
|
|
72
|
+
response: null,
|
|
73
|
+
errors: { "400": true, "401": true, "403": true },
|
|
74
|
+
};
|
|
75
|
+
const UpdateOperation = {
|
|
76
|
+
method: "PUT",
|
|
77
|
+
route: "/travelers-trip/{travelersTripId}",
|
|
78
|
+
body: "flat",
|
|
79
|
+
response: null,
|
|
80
|
+
errors: { "400": true, "401": true, "403": true },
|
|
81
|
+
};
|
|
82
|
+
const UpdateTravelersOperation = {
|
|
83
|
+
method: "PUT",
|
|
84
|
+
route: "/crm/trips/{travelersTripId}",
|
|
85
|
+
body: "flat",
|
|
86
|
+
response: null,
|
|
87
|
+
errors: { "400": true, "401": true, "403": true },
|
|
88
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ApiError } from "../_/index.js";
|
|
2
|
+
export type { RequestOptions } from "../_/index.js";
|
|
3
|
+
export { createClient } from "./client.js";
|
|
4
|
+
export type { Client, ClientOptions, AddTravelerRequest, AddTravelerResponse, CreateRequest, CreateResponse, GetRequest, GetResponse, GetTravelersRequest, GetTravelersResponse, InviteRequest, InviteResponse, ListRequest, ListResponse, ListPipelineRequest, ListPipelineResponse, SetArchivedRequest, SetArchivedResponse, UpdateRequest, UpdateResponse, UpdateTravelersRequest, UpdateTravelersResponse, } from "./client.js";
|
|
5
|
+
export type { CreateTravelersTripBody, CreateTravelersTripResponse, CrmTrip, CrmTripList, CrmTripUpdate, Destination, GetTravelersTripResponse, ListTravelersTripResponse, TravelersTripInviteBody, TravelersTripToggleArchiveBody, TravelersTripToggleArchiveResponse, TripParticipant, TripTraveler, TripTravelerAdd, TripTravelerInput, UpdateTravelersTripBody, } from "./models.js";
|