@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.
Files changed (270) hide show
  1. package/README.md +89 -3
  2. package/dist/_/codec.d.ts +93 -0
  3. package/dist/_/codec.js +298 -0
  4. package/dist/_/error.d.ts +27 -0
  5. package/dist/_/error.js +68 -0
  6. package/dist/_/hooks/envelope.d.ts +11 -0
  7. package/dist/_/hooks/envelope.js +15 -0
  8. package/dist/_/index.d.ts +3 -0
  9. package/dist/_/index.js +5 -0
  10. package/dist/_/transport.d.ts +146 -0
  11. package/dist/_/transport.js +220 -0
  12. package/dist/activities/client.d.ts +35 -0
  13. package/dist/activities/client.js +23 -0
  14. package/dist/activities/index.d.ts +5 -0
  15. package/dist/activities/index.js +4 -0
  16. package/dist/activities/models.d.ts +27 -0
  17. package/dist/activities/models.js +3 -0
  18. package/dist/activityDestinations/client.d.ts +24 -0
  19. package/dist/activityDestinations/client.js +17 -0
  20. package/dist/activityDestinations/index.d.ts +4 -0
  21. package/dist/activityDestinations/index.js +4 -0
  22. package/dist/balances/client.d.ts +29 -0
  23. package/dist/balances/client.js +18 -0
  24. package/dist/balances/index.d.ts +5 -0
  25. package/dist/balances/index.js +4 -0
  26. package/dist/balances/models.d.ts +12 -0
  27. package/dist/balances/models.js +3 -0
  28. package/dist/bookingSelections/client.d.ts +54 -0
  29. package/dist/bookingSelections/client.js +25 -0
  30. package/dist/bookingSelections/index.d.ts +5 -0
  31. package/dist/bookingSelections/index.js +4 -0
  32. package/dist/bookingSelections/models.d.ts +35 -0
  33. package/dist/bookingSelections/models.js +3 -0
  34. package/dist/carRentals/client.d.ts +55 -0
  35. package/dist/carRentals/client.js +25 -0
  36. package/dist/carRentals/index.d.ts +5 -0
  37. package/dist/carRentals/index.js +4 -0
  38. package/dist/carRentals/models.d.ts +157 -0
  39. package/dist/carRentals/models.js +3 -0
  40. package/dist/carriers/client.d.ts +32 -0
  41. package/dist/carriers/client.js +18 -0
  42. package/dist/carriers/index.d.ts +5 -0
  43. package/dist/carriers/index.js +4 -0
  44. package/dist/carriers/models.d.ts +9 -0
  45. package/dist/carriers/models.js +3 -0
  46. package/dist/chats/client.d.ts +69 -0
  47. package/dist/chats/client.js +38 -0
  48. package/dist/chats/index.d.ts +5 -0
  49. package/dist/chats/index.js +4 -0
  50. package/dist/chats/models.d.ts +25 -0
  51. package/dist/chats/models.js +3 -0
  52. package/dist/checkouts/client.d.ts +27 -0
  53. package/dist/checkouts/client.js +18 -0
  54. package/dist/checkouts/index.d.ts +5 -0
  55. package/dist/checkouts/index.js +4 -0
  56. package/dist/checkouts/models.d.ts +23 -0
  57. package/dist/checkouts/models.js +3 -0
  58. package/dist/client.d.ts +95 -0
  59. package/dist/client.js +220 -0
  60. package/dist/commissionExports/client.d.ts +62 -0
  61. package/dist/commissionExports/client.js +33 -0
  62. package/dist/commissionExports/index.d.ts +5 -0
  63. package/dist/commissionExports/index.js +4 -0
  64. package/dist/commissionExports/models.d.ts +165 -0
  65. package/dist/commissionExports/models.js +3 -0
  66. package/dist/commissionImports/client.d.ts +61 -0
  67. package/dist/commissionImports/client.js +34 -0
  68. package/dist/commissionImports/index.d.ts +5 -0
  69. package/dist/commissionImports/index.js +4 -0
  70. package/dist/commissionImports/models.d.ts +118 -0
  71. package/dist/commissionImports/models.js +3 -0
  72. package/dist/commissionItems/client.d.ts +128 -0
  73. package/dist/commissionItems/client.js +41 -0
  74. package/dist/commissionItems/index.d.ts +5 -0
  75. package/dist/commissionItems/index.js +4 -0
  76. package/dist/commissionItems/models.d.ts +217 -0
  77. package/dist/commissionItems/models.js +3 -0
  78. package/dist/commissionReports/client.d.ts +76 -0
  79. package/dist/commissionReports/client.js +18 -0
  80. package/dist/commissionReports/index.d.ts +5 -0
  81. package/dist/commissionReports/index.js +4 -0
  82. package/dist/commissionReports/models.d.ts +208 -0
  83. package/dist/commissionReports/models.js +3 -0
  84. package/dist/crmSettings/client.d.ts +50 -0
  85. package/dist/crmSettings/client.js +25 -0
  86. package/dist/crmSettings/index.d.ts +5 -0
  87. package/dist/crmSettings/index.js +4 -0
  88. package/dist/crmSettings/models.d.ts +313 -0
  89. package/dist/crmSettings/models.js +3 -0
  90. package/dist/earnings/client.d.ts +30 -0
  91. package/dist/earnings/client.js +18 -0
  92. package/dist/earnings/index.d.ts +5 -0
  93. package/dist/earnings/index.js +4 -0
  94. package/dist/earnings/models.d.ts +16 -0
  95. package/dist/earnings/models.js +3 -0
  96. package/dist/externalBookings/client.d.ts +56 -0
  97. package/dist/externalBookings/client.js +33 -0
  98. package/dist/externalBookings/index.d.ts +5 -0
  99. package/dist/externalBookings/index.js +4 -0
  100. package/dist/externalBookings/models.d.ts +93 -0
  101. package/dist/externalBookings/models.js +3 -0
  102. package/dist/externalPayments/client.d.ts +23 -0
  103. package/dist/externalPayments/client.js +18 -0
  104. package/dist/externalPayments/index.d.ts +5 -0
  105. package/dist/externalPayments/index.js +4 -0
  106. package/dist/externalPayments/models.d.ts +47 -0
  107. package/dist/externalPayments/models.js +3 -0
  108. package/dist/favorites/client.d.ts +87 -0
  109. package/dist/favorites/client.js +63 -0
  110. package/dist/favorites/index.d.ts +5 -0
  111. package/dist/favorites/index.js +4 -0
  112. package/dist/favorites/models.d.ts +79 -0
  113. package/dist/favorites/models.js +3 -0
  114. package/dist/flightSchedules/client.d.ts +29 -0
  115. package/dist/flightSchedules/client.js +18 -0
  116. package/dist/flightSchedules/index.d.ts +5 -0
  117. package/dist/flightSchedules/index.js +4 -0
  118. package/dist/flightSchedules/models.d.ts +25 -0
  119. package/dist/flightSchedules/models.js +3 -0
  120. package/dist/flights/client.d.ts +73 -0
  121. package/dist/flights/client.js +25 -0
  122. package/dist/flights/index.d.ts +5 -0
  123. package/dist/flights/index.js +4 -0
  124. package/dist/flights/models.d.ts +345 -0
  125. package/dist/flights/models.js +3 -0
  126. package/dist/hotels/client.d.ts +104 -0
  127. package/dist/hotels/client.js +26 -0
  128. package/dist/hotels/index.d.ts +5 -0
  129. package/dist/hotels/index.js +4 -0
  130. package/dist/hotels/models.d.ts +355 -0
  131. package/dist/hotels/models.js +3 -0
  132. package/dist/index.d.ts +5 -0
  133. package/dist/index.js +4 -0
  134. package/dist/insuranceQuotes/client.d.ts +27 -0
  135. package/dist/insuranceQuotes/client.js +18 -0
  136. package/dist/insuranceQuotes/index.d.ts +5 -0
  137. package/dist/insuranceQuotes/index.js +4 -0
  138. package/dist/insuranceQuotes/models.d.ts +76 -0
  139. package/dist/insuranceQuotes/models.js +3 -0
  140. package/dist/itineraries/client.d.ts +165 -0
  141. package/dist/itineraries/client.js +86 -0
  142. package/dist/itineraries/index.d.ts +5 -0
  143. package/dist/itineraries/index.js +4 -0
  144. package/dist/itineraries/models.d.ts +1619 -0
  145. package/dist/itineraries/models.js +4 -0
  146. package/dist/models.d.ts +1361 -0
  147. package/dist/models.js +3 -0
  148. package/dist/notes/client.d.ts +82 -0
  149. package/dist/notes/client.js +41 -0
  150. package/dist/notes/index.d.ts +5 -0
  151. package/dist/notes/index.js +4 -0
  152. package/dist/notes/models.d.ts +116 -0
  153. package/dist/notes/models.js +3 -0
  154. package/dist/offers/client.d.ts +27 -0
  155. package/dist/offers/client.js +17 -0
  156. package/dist/offers/index.d.ts +5 -0
  157. package/dist/offers/index.js +4 -0
  158. package/dist/offers/models.d.ts +19 -0
  159. package/dist/offers/models.js +3 -0
  160. package/dist/options/index.d.ts +114 -0
  161. package/dist/options/index.js +115 -0
  162. package/dist/orders/client.d.ts +154 -0
  163. package/dist/orders/client.js +65 -0
  164. package/dist/orders/index.d.ts +5 -0
  165. package/dist/orders/index.js +4 -0
  166. package/dist/orders/models.d.ts +2510 -0
  167. package/dist/orders/models.js +3 -0
  168. package/dist/payees/client.d.ts +48 -0
  169. package/dist/payees/client.js +26 -0
  170. package/dist/payees/index.d.ts +5 -0
  171. package/dist/payees/index.js +4 -0
  172. package/dist/payees/models.d.ts +50 -0
  173. package/dist/payees/models.js +3 -0
  174. package/dist/paymentMethods/client.d.ts +24 -0
  175. package/dist/paymentMethods/client.js +18 -0
  176. package/dist/paymentMethods/index.d.ts +5 -0
  177. package/dist/paymentMethods/index.js +4 -0
  178. package/dist/paymentMethods/models.d.ts +60 -0
  179. package/dist/paymentMethods/models.js +3 -0
  180. package/dist/places/client.d.ts +61 -0
  181. package/dist/places/client.js +25 -0
  182. package/dist/places/index.d.ts +5 -0
  183. package/dist/places/index.js +4 -0
  184. package/dist/places/models.d.ts +51 -0
  185. package/dist/places/models.js +3 -0
  186. package/dist/profileForms/client.d.ts +38 -0
  187. package/dist/profileForms/client.js +25 -0
  188. package/dist/profileForms/index.d.ts +5 -0
  189. package/dist/profileForms/index.js +4 -0
  190. package/dist/profileForms/models.d.ts +24 -0
  191. package/dist/profileForms/models.js +3 -0
  192. package/dist/quotes/client.d.ts +30 -0
  193. package/dist/quotes/client.js +18 -0
  194. package/dist/quotes/index.d.ts +5 -0
  195. package/dist/quotes/index.js +4 -0
  196. package/dist/quotes/models.d.ts +47 -0
  197. package/dist/quotes/models.js +3 -0
  198. package/dist/remittanceBatches/client.d.ts +78 -0
  199. package/dist/remittanceBatches/client.js +42 -0
  200. package/dist/remittanceBatches/index.d.ts +5 -0
  201. package/dist/remittanceBatches/index.js +4 -0
  202. package/dist/remittanceBatches/models.d.ts +131 -0
  203. package/dist/remittanceBatches/models.js +3 -0
  204. package/dist/remittanceClaims/client.d.ts +27 -0
  205. package/dist/remittanceClaims/client.js +18 -0
  206. package/dist/remittanceClaims/index.d.ts +5 -0
  207. package/dist/remittanceClaims/index.js +4 -0
  208. package/dist/remittanceClaims/models.d.ts +5 -0
  209. package/dist/remittanceClaims/models.js +3 -0
  210. package/dist/remittanceLines/client.d.ts +27 -0
  211. package/dist/remittanceLines/client.js +18 -0
  212. package/dist/remittanceLines/index.d.ts +5 -0
  213. package/dist/remittanceLines/index.js +4 -0
  214. package/dist/remittanceLines/models.d.ts +5 -0
  215. package/dist/remittanceLines/models.js +3 -0
  216. package/dist/remittances/client.d.ts +78 -0
  217. package/dist/remittances/client.js +42 -0
  218. package/dist/remittances/index.d.ts +5 -0
  219. package/dist/remittances/index.js +4 -0
  220. package/dist/remittances/models.d.ts +116 -0
  221. package/dist/remittances/models.js +3 -0
  222. package/dist/statements/client.d.ts +75 -0
  223. package/dist/statements/client.js +34 -0
  224. package/dist/statements/index.d.ts +5 -0
  225. package/dist/statements/index.js +4 -0
  226. package/dist/statements/models.d.ts +147 -0
  227. package/dist/statements/models.js +3 -0
  228. package/dist/suppliers/client.d.ts +71 -0
  229. package/dist/suppliers/client.js +41 -0
  230. package/dist/suppliers/index.d.ts +5 -0
  231. package/dist/suppliers/index.js +4 -0
  232. package/dist/suppliers/models.d.ts +130 -0
  233. package/dist/suppliers/models.js +3 -0
  234. package/dist/taskTemplates/client.d.ts +36 -0
  235. package/dist/taskTemplates/client.js +18 -0
  236. package/dist/taskTemplates/index.d.ts +5 -0
  237. package/dist/taskTemplates/index.js +4 -0
  238. package/dist/taskTemplates/models.d.ts +15 -0
  239. package/dist/taskTemplates/models.js +3 -0
  240. package/dist/tasks/client.d.ts +105 -0
  241. package/dist/tasks/client.js +41 -0
  242. package/dist/tasks/index.d.ts +5 -0
  243. package/dist/tasks/index.js +4 -0
  244. package/dist/tasks/models.d.ts +59 -0
  245. package/dist/tasks/models.js +3 -0
  246. package/dist/timeline/client.d.ts +42 -0
  247. package/dist/timeline/client.js +18 -0
  248. package/dist/timeline/index.d.ts +5 -0
  249. package/dist/timeline/index.js +4 -0
  250. package/dist/timeline/models.d.ts +65 -0
  251. package/dist/timeline/models.js +3 -0
  252. package/dist/travelProfile/client.d.ts +56 -0
  253. package/dist/travelProfile/client.js +25 -0
  254. package/dist/travelProfile/index.d.ts +5 -0
  255. package/dist/travelProfile/index.js +4 -0
  256. package/dist/travelProfile/models.d.ts +95 -0
  257. package/dist/travelProfile/models.js +3 -0
  258. package/dist/travelers/client.d.ts +214 -0
  259. package/dist/travelers/client.js +76 -0
  260. package/dist/travelers/index.d.ts +5 -0
  261. package/dist/travelers/index.js +4 -0
  262. package/dist/travelers/models.d.ts +576 -0
  263. package/dist/travelers/models.js +3 -0
  264. package/dist/trips/client.d.ts +224 -0
  265. package/dist/trips/client.js +88 -0
  266. package/dist/trips/index.d.ts +5 -0
  267. package/dist/trips/index.js +4 -0
  268. package/dist/trips/models.d.ts +486 -0
  269. package/dist/trips/models.js +3 -0
  270. package/package.json +35 -2
@@ -0,0 +1,486 @@
1
+ import type { CountryCode, FrequentFlyerProgram, HotelMembership, ParticipantSex, PersonAddress, PersonContact, PersonName, SalesStage, TravelDocument, TravelerId, TravelersTripRelationship, TripItineraryStatus } from "../models.js";
2
+ export interface CreateTravelersTripBody {
3
+ advisorId?: string;
4
+ amount?: number;
5
+ assignedAdvisorUserId?: string | null;
6
+ availableDate?: string | {
7
+ from: string;
8
+ to: string;
9
+ };
10
+ budget?: "goodValue" | "luxury";
11
+ budgetCurrency?: string | null;
12
+ companyName?: string;
13
+ createdReason?: "CREATED_BY_TRAVELER" | "CREATED_BY_ADVISOR" | "CREATED_BY_MATCHING_ADVISOR" | "CREATED_BY_BOOKING";
14
+ destinations: {
15
+ address?: string | null;
16
+ amenities?: string[];
17
+ city?: string | null;
18
+ country?: string;
19
+ countryCode?: string;
20
+ description?: string;
21
+ distanceFromSearch?: {
22
+ unit: "km" | "mi";
23
+ value: number;
24
+ };
25
+ endDateTime?: string;
26
+ features?: string[];
27
+ fullAddress?: string;
28
+ gate?: string | null;
29
+ iataCode?: string | null;
30
+ internovaId?: string;
31
+ latitude?: number;
32
+ longitude?: number;
33
+ name?: string;
34
+ photos?: {
35
+ key?: string;
36
+ name: string;
37
+ url?: string;
38
+ }[];
39
+ placeId?: string;
40
+ region?: string;
41
+ source?: string;
42
+ startDateTime?: string;
43
+ state?: string | null;
44
+ terminal?: string | null;
45
+ timeZone?: string;
46
+ zipCode?: string | null;
47
+ }[];
48
+ hasFlexibleDates: boolean;
49
+ isAllPricesHidden?: boolean;
50
+ isItineraryVisible?: boolean;
51
+ isSummaryHidden?: boolean;
52
+ primaryTravelerUserId?: string;
53
+ purpose?: "holidays" | "business" | "honeymoon" | "familyFriends";
54
+ specialRequests?: string | null;
55
+ suggestionsEnabled?: boolean;
56
+ travelers?: {
57
+ adults?: number;
58
+ children?: number;
59
+ };
60
+ tripEndDate: string;
61
+ tripStartDate: string;
62
+ tripTitle: string;
63
+ who?: "solo" | "withKids" | "partner" | "group";
64
+ }
65
+ export interface CreateTravelersTripResponse {
66
+ amount?: number;
67
+ assignedAdvisorUserId?: string | null;
68
+ associatedChatId?: string | null;
69
+ associatedTripItineraryId?: string | null;
70
+ associatedUserIds: string[];
71
+ availableDate?: string | {
72
+ from: string;
73
+ to: string;
74
+ };
75
+ budget?: "goodValue" | "luxury";
76
+ budgetCurrency?: string | null;
77
+ companyName: string;
78
+ conciergeMessageSentAt?: string | null;
79
+ createdAt: string;
80
+ createdBy: string;
81
+ createdReason?: "CREATED_BY_TRAVELER" | "CREATED_BY_ADVISOR" | "CREATED_BY_MATCHING_ADVISOR" | "CREATED_BY_BOOKING";
82
+ deleted?: boolean;
83
+ deletedAt?: string | null;
84
+ deletedBy?: string;
85
+ destinations: Destination[];
86
+ hasActivity?: boolean;
87
+ hasFlexibleDates: boolean;
88
+ isAllPricesHidden: boolean;
89
+ isItineraryVisible: boolean;
90
+ isSummaryHidden: boolean;
91
+ lastMessageTimestamp?: string | null;
92
+ lastModifiedBy: string;
93
+ primaryTravelerUserId: string;
94
+ purpose?: "holidays" | "business" | "honeymoon" | "familyFriends";
95
+ specialRequests?: string | null;
96
+ suggestionsEnabled?: boolean;
97
+ travelers?: {
98
+ adults?: number;
99
+ children?: number;
100
+ };
101
+ travelersTripId: string;
102
+ tripEndDate: string;
103
+ tripStartDate: string;
104
+ tripTitle: string;
105
+ type: "TravelersTrip";
106
+ updatedAt: string;
107
+ who?: "solo" | "withKids" | "partner" | "group";
108
+ }
109
+ /**
110
+ * A trip as the CRM sees it: its sales stage, its primary traveler and how many
111
+ * travel on it, and, in the answers about one trip, who travels on it with the
112
+ * details a checkout needs.
113
+ */
114
+ export interface CrmTrip {
115
+ /**
116
+ * The user id of the trip's advisor; null while it has none.
117
+ */
118
+ assignedAdvisorUserId: string | null;
119
+ /**
120
+ * The trip's itinerary (TI…), when its advisor started one; null otherwise.
121
+ */
122
+ associatedTripItineraryId: string | null;
123
+ /**
124
+ * The agency the trip belongs to.
125
+ */
126
+ companyName: string;
127
+ /**
128
+ * The traveler the trip is for, its PRIMARY traveler; null while it has none.
129
+ */
130
+ primaryTravelerId: TravelerId | null;
131
+ /**
132
+ * The primary traveler's name as the agency knows them; null while the trip
133
+ * has no primary traveler.
134
+ */
135
+ primaryTravelerName: string | null;
136
+ /**
137
+ * The revision of the trip's CRM record: send it back with a change, and a
138
+ * change made since answers 409 CRM_REVISION_CONFLICT. 0 while the CRM keeps
139
+ * nothing of the trip yet.
140
+ */
141
+ revision: number;
142
+ /**
143
+ * Where the trip stands as a sale; null while it has no stage.
144
+ */
145
+ salesStage: SalesStage | null;
146
+ /**
147
+ * How many travelers are on the trip.
148
+ */
149
+ travelerCount: number;
150
+ /**
151
+ * Who travels on the trip, the PRIMARY traveler first. Present in the answers
152
+ * about one trip (GET and PUT /crm/trips/{travelersTripId}, POST
153
+ * /crm/trips/{travelersTripId}/travelers); absent from GET /crm/trips, which
154
+ * never reads a trip's travelers.
155
+ */
156
+ travelers?: TripTraveler[];
157
+ /**
158
+ * The trip's id (TT…).
159
+ */
160
+ travelersTripId: string;
161
+ /**
162
+ * The trip's last day, YYYY-MM-DD; null while it has no dates.
163
+ */
164
+ tripEndDate: string | null;
165
+ /**
166
+ * The trip's name; null when it has none.
167
+ */
168
+ tripName: string | null;
169
+ /**
170
+ * The trip's first day, YYYY-MM-DD; null while it has no dates.
171
+ */
172
+ tripStartDate: string | null;
173
+ /**
174
+ * When the trip's CRM record last changed; null while the CRM keeps nothing
175
+ * of the trip yet.
176
+ */
177
+ updatedAt: string | null;
178
+ }
179
+ /**
180
+ * One page of the agency's trips by sales stage, soonest first, without their
181
+ * travelers, and the token of the next page.
182
+ */
183
+ export interface CrmTripList {
184
+ /**
185
+ * The items of this page.
186
+ */
187
+ items: CrmTrip[];
188
+ /**
189
+ * Send it back as nextToken to read the next page; null on the last page.
190
+ */
191
+ nextToken: string | null;
192
+ }
193
+ /**
194
+ * The trip's whole list of travelers to keep, its sales stage, or both, with
195
+ * the revision read. A traveler sent as a participant is found by email or
196
+ * phone, or added.
197
+ */
198
+ export interface CrmTripUpdate {
199
+ /**
200
+ * The trip's revision as read; a change made since answers 409
201
+ * CRM_REVISION_CONFLICT.
202
+ */
203
+ revision: number;
204
+ /**
205
+ * The sales stage to move the trip to. Only the trip's staff, its advisor or
206
+ * an agency admin, may send it.
207
+ */
208
+ salesStage?: SalesStage;
209
+ /**
210
+ * Every traveler to keep on the trip, up to 20: one on the trip left out
211
+ * leaves it, and one sent twice keeps the part sent last.
212
+ */
213
+ travelers?: TripTravelerInput[];
214
+ }
215
+ export interface Destination {
216
+ address?: string | null;
217
+ amenities?: string[];
218
+ city?: string | null;
219
+ country?: string;
220
+ countryCode?: string;
221
+ description?: string;
222
+ distanceFromSearch?: {
223
+ unit: "km" | "mi";
224
+ value: number;
225
+ };
226
+ endDateTime: string;
227
+ features?: string[];
228
+ fullAddress?: string;
229
+ gate?: string | null;
230
+ headerImageUrl?: string;
231
+ iataCode?: string | null;
232
+ internovaId?: string;
233
+ latitude?: number;
234
+ longitude?: number;
235
+ name?: string;
236
+ photos?: {
237
+ key?: string;
238
+ name: string;
239
+ url?: string;
240
+ }[];
241
+ placeId?: string;
242
+ region?: string;
243
+ source?: string;
244
+ startDateTime: string;
245
+ state?: string | null;
246
+ terminal?: string | null;
247
+ timeZone?: string;
248
+ zipCode?: string | null;
249
+ }
250
+ export interface GetTravelersTripResponse {
251
+ amount?: number;
252
+ assignedAdvisorUserId?: string | null;
253
+ associatedChatId?: string | null;
254
+ associatedTripItineraryId?: string | null;
255
+ associatedUserIds: string[];
256
+ availableDate?: string | {
257
+ from: string;
258
+ to: string;
259
+ };
260
+ budget?: "goodValue" | "luxury";
261
+ budgetCurrency?: string | null;
262
+ companyName: string;
263
+ conciergeMessageSentAt?: string | null;
264
+ createdAt: string;
265
+ createdBy: string;
266
+ createdReason?: "CREATED_BY_TRAVELER" | "CREATED_BY_ADVISOR" | "CREATED_BY_MATCHING_ADVISOR" | "CREATED_BY_BOOKING";
267
+ deleted?: boolean;
268
+ deletedAt?: string | null;
269
+ deletedBy?: string;
270
+ destinations: Destination[];
271
+ hasActivity?: boolean;
272
+ hasFlexibleDates: boolean;
273
+ isAllPricesHidden: boolean;
274
+ isArchived: boolean;
275
+ isItineraryVisible: boolean;
276
+ isSummaryHidden: boolean;
277
+ lastMessageTimestamp?: string | null;
278
+ lastModifiedBy: string;
279
+ primaryTravelerUserId: string;
280
+ purpose?: "holidays" | "business" | "honeymoon" | "familyFriends";
281
+ specialRequests?: string | null;
282
+ status: TripItineraryStatus;
283
+ suggestionsEnabled?: boolean;
284
+ travelers?: {
285
+ adults?: number;
286
+ children?: number;
287
+ };
288
+ travelersTripId: string;
289
+ tripEndDate: string;
290
+ tripStartDate: string;
291
+ tripTitle: string;
292
+ type: "TravelersTrip";
293
+ updatedAt: string;
294
+ who?: "solo" | "withKids" | "partner" | "group";
295
+ }
296
+ export interface ListTravelersTripResponse {
297
+ items: {
298
+ assignedAdvisorUserId?: string | null;
299
+ associatedChatId?: string | null;
300
+ associatedTripItineraryId?: string | null;
301
+ associatedUserIds: string[];
302
+ companyName: string;
303
+ createdAt: string;
304
+ destinations: Destination[];
305
+ hasActivity?: boolean;
306
+ isArchived: boolean;
307
+ primaryTravelerUserId: string;
308
+ status: TripItineraryStatus;
309
+ travelers?: {
310
+ adults?: number;
311
+ children?: number;
312
+ };
313
+ travelersTripId: string;
314
+ tripEndDate: string;
315
+ tripStartDate: string;
316
+ tripTitle: string;
317
+ updatedAt: string;
318
+ }[];
319
+ nextToken?: string | number | null;
320
+ }
321
+ export interface TravelersTripInviteBody {
322
+ email?: string;
323
+ familyName?: string;
324
+ givenName?: string;
325
+ phoneNumber?: string;
326
+ }
327
+ export interface TravelersTripToggleArchiveBody {
328
+ isArchived: boolean;
329
+ }
330
+ export interface TravelersTripToggleArchiveResponse {
331
+ isArchived: boolean;
332
+ }
333
+ /**
334
+ * The traveler as a checkout takes them: legal name, birth date, sex,
335
+ * nationality, contact, address, documents and frequent flyer memberships.
336
+ */
337
+ export interface TripParticipant {
338
+ /**
339
+ * The person's postal address; null when unknown.
340
+ */
341
+ address: PersonAddress | null;
342
+ /**
343
+ * The person's date of birth, YYYY-MM-DD; null when unknown.
344
+ */
345
+ birthDate: string | null;
346
+ /**
347
+ * How to reach the person.
348
+ */
349
+ contact: PersonContact;
350
+ /**
351
+ * The person's travel documents (passport, visa, national ID), up to 12;
352
+ * empty when there are none.
353
+ */
354
+ documents: TravelDocument[];
355
+ /**
356
+ * The person's airline loyalty memberships, up to 8, sent with a flight
357
+ * booking.
358
+ */
359
+ frequentFlyerPrograms?: FrequentFlyerProgram[];
360
+ /**
361
+ * The person's membership number with the hotel chain (chainCode), for a
362
+ * hotel booking; null or left out when there is none.
363
+ */
364
+ hotelMembership?: HotelMembership | null;
365
+ /**
366
+ * The person's legal name, as printed on their travel document.
367
+ */
368
+ name: PersonName;
369
+ /**
370
+ * The person's nationality, as an ISO 3166-1 alpha-2 country code; null when
371
+ * unknown.
372
+ */
373
+ nationalityCountryCode: CountryCode | null;
374
+ /**
375
+ * The sex marker printed on the person's travel document; null when unknown.
376
+ */
377
+ sex: ParticipantSex | null;
378
+ }
379
+ /**
380
+ * One traveler of a trip, their part in it and the details a checkout needs.
381
+ */
382
+ export interface TripTraveler {
383
+ /**
384
+ * The traveler's details as a checkout takes them. Their documents are
385
+ * answered to the trip's staff, and to a traveler on the trip for themselves
386
+ * and the relatives they fill in for; anyone else reads an empty list.
387
+ */
388
+ participant: TripParticipant;
389
+ /**
390
+ * The traveler's part in the trip; PRIMARY is the traveler the trip is for.
391
+ */
392
+ relationship: TravelersTripRelationship;
393
+ /**
394
+ * The traveler's id in the CRM (TRV…).
395
+ */
396
+ travelerId: TravelerId;
397
+ }
398
+ /**
399
+ * An existing traveler of the agency to put on the trip, and their part in it.
400
+ */
401
+ export interface TripTravelerAdd {
402
+ /**
403
+ * The traveler's part in the trip; PRIMARY is the traveler the trip is for.
404
+ */
405
+ relationship: TravelersTripRelationship;
406
+ /**
407
+ * The traveler's id in the CRM (TRV…).
408
+ */
409
+ travelerId: TravelerId;
410
+ }
411
+ /**
412
+ * A traveler to keep on a trip: an existing one by travelerId, or a person as a
413
+ * checkout collects them, found by email or phone or added.
414
+ */
415
+ export interface TripTravelerInput {
416
+ /**
417
+ * A person as a checkout collects them, used when travelerId is left out: for
418
+ * the trip's staff, the agency's traveler with this email or phone when they
419
+ * may see one; otherwise a new traveler of the agency.
420
+ */
421
+ participant?: TripParticipant;
422
+ /**
423
+ * The traveler's part in the trip.
424
+ */
425
+ relationship: TravelersTripRelationship;
426
+ /**
427
+ * An existing traveler of the agency (TRV…). Required unless participant is
428
+ * sent. Only the trip's staff may name one who is not on the trip yet.
429
+ */
430
+ travelerId?: TravelerId;
431
+ }
432
+ export interface UpdateTravelersTripBody {
433
+ assignedAdvisorUserId?: string | null;
434
+ availableDate?: string | {
435
+ from: string;
436
+ to: string;
437
+ };
438
+ budgetCurrency?: string | null;
439
+ destinations?: {
440
+ address?: string | null;
441
+ amenities?: string[];
442
+ city?: string | null;
443
+ country?: string;
444
+ countryCode?: string;
445
+ description?: string;
446
+ distanceFromSearch?: {
447
+ unit: "km" | "mi";
448
+ value: number;
449
+ };
450
+ endDateTime?: string;
451
+ features?: string[];
452
+ fullAddress?: string;
453
+ gate?: string | null;
454
+ headerImageUrl?: string;
455
+ iataCode?: string | null;
456
+ internovaId?: string;
457
+ latitude?: number;
458
+ longitude?: number;
459
+ name?: string;
460
+ photos?: {
461
+ key?: string;
462
+ name: string;
463
+ url?: string;
464
+ }[];
465
+ placeId?: string;
466
+ region?: string;
467
+ source?: string;
468
+ startDateTime?: string;
469
+ state?: string | null;
470
+ terminal?: string | null;
471
+ timeZone?: string;
472
+ zipCode?: string | null;
473
+ }[];
474
+ hasFlexibleDates?: boolean;
475
+ isAllPricesHidden?: boolean;
476
+ isItineraryVisible?: boolean;
477
+ isSummaryHidden?: boolean;
478
+ specialRequests?: string | null;
479
+ travelers?: {
480
+ adults?: number;
481
+ children?: number;
482
+ };
483
+ tripEndDate?: string;
484
+ tripStartDate?: string;
485
+ tripTitle?: string;
486
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
package/package.json CHANGED
@@ -1,16 +1,49 @@
1
1
  {
2
2
  "name": "@nicertravel/sdk",
3
- "version": "0.0.0",
4
- "description": "The Nicer API for TypeScript and JavaScript. This version only reserves the name: the first usable version is published from nicertravel/sdk-js.",
3
+ "version": "1.0.0-beta.2",
4
+ "description": "The Nicer API for TypeScript and JavaScript, generated by Cloudflare Forge from Nicer's public OpenAPI document.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/nicertravel/sdk-js.git"
9
9
  },
10
10
  "files": [
11
+ "dist",
11
12
  "README.md"
12
13
  ],
14
+ "type": "module",
15
+ "sideEffects": false,
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./_": null,
22
+ "./_/*": null,
23
+ "./*": {
24
+ "types": "./dist/*/index.d.ts",
25
+ "default": "./dist/*/index.js"
26
+ }
27
+ },
13
28
  "publishConfig": {
14
29
  "access": "public"
30
+ },
31
+ "scripts": {
32
+ "openapi": "curl -fsS --proto =https --max-redirs 0 --max-filesize 33554432 -o openapi.json \"$OPENAPI_URL\"",
33
+ "hash": "bun scripts/release.ts hash",
34
+ "generate": "rm -rf src && bun scripts/prepare.ts && forge generate openapi.sdk.json --target ts --out src && bun scripts/release.ts record",
35
+ "check-types": "tsc -p tsconfig.json --noEmit",
36
+ "build": "rm -rf dist && tsc -p tsconfig.json"
37
+ },
38
+ "devDependencies": {
39
+ "@cloudflare/forge": "0.3.0",
40
+ "typescript": "7.0.2"
41
+ },
42
+ "packageManager": "bun@1.3.14",
43
+ "nicer": {
44
+ "openapi": {
45
+ "release": "1.0.0",
46
+ "sha256": "909cb6fa195819451c35bf2acdddebaa36d275b2c22fa899ee845b80ccbef987"
47
+ }
15
48
  }
16
49
  }