@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
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type BaseClientOptions, Transport } from "./_/index.js";
|
|
2
|
+
import { type Client as ActivitiesClient } from "./activities/client.js";
|
|
3
|
+
import { type Client as ActivityDestinationsClient } from "./activityDestinations/client.js";
|
|
4
|
+
import { type Client as BalancesClient } from "./balances/client.js";
|
|
5
|
+
import { type Client as BookingSelectionsClient } from "./bookingSelections/client.js";
|
|
6
|
+
import { type Client as CarRentalsClient } from "./carRentals/client.js";
|
|
7
|
+
import { type Client as CarriersClient } from "./carriers/client.js";
|
|
8
|
+
import { type Client as ChatsClient } from "./chats/client.js";
|
|
9
|
+
import { type Client as CheckoutsClient } from "./checkouts/client.js";
|
|
10
|
+
import { type Client as CommissionExportsClient } from "./commissionExports/client.js";
|
|
11
|
+
import { type Client as CommissionImportsClient } from "./commissionImports/client.js";
|
|
12
|
+
import { type Client as CommissionItemsClient } from "./commissionItems/client.js";
|
|
13
|
+
import { type Client as CommissionReportsClient } from "./commissionReports/client.js";
|
|
14
|
+
import { type Client as CrmSettingsClient } from "./crmSettings/client.js";
|
|
15
|
+
import { type Client as EarningsClient } from "./earnings/client.js";
|
|
16
|
+
import { type Client as ExternalBookingsClient } from "./externalBookings/client.js";
|
|
17
|
+
import { type Client as ExternalPaymentsClient } from "./externalPayments/client.js";
|
|
18
|
+
import { type Client as FavoritesClient } from "./favorites/client.js";
|
|
19
|
+
import { type Client as FlightSchedulesClient } from "./flightSchedules/client.js";
|
|
20
|
+
import { type Client as FlightsClient } from "./flights/client.js";
|
|
21
|
+
import { type Client as HotelsClient } from "./hotels/client.js";
|
|
22
|
+
import { type Client as InsuranceQuotesClient } from "./insuranceQuotes/client.js";
|
|
23
|
+
import { type Client as ItinerariesClient } from "./itineraries/client.js";
|
|
24
|
+
import { type Client as NotesClient } from "./notes/client.js";
|
|
25
|
+
import { type Client as OffersClient } from "./offers/client.js";
|
|
26
|
+
import { type Client as OrdersClient } from "./orders/client.js";
|
|
27
|
+
import { type Client as PayeesClient } from "./payees/client.js";
|
|
28
|
+
import { type Client as PaymentMethodsClient } from "./paymentMethods/client.js";
|
|
29
|
+
import { type Client as PlacesClient } from "./places/client.js";
|
|
30
|
+
import { type Client as ProfileFormsClient } from "./profileForms/client.js";
|
|
31
|
+
import { type Client as QuotesClient } from "./quotes/client.js";
|
|
32
|
+
import { type Client as RemittanceBatchesClient } from "./remittanceBatches/client.js";
|
|
33
|
+
import { type Client as RemittanceClaimsClient } from "./remittanceClaims/client.js";
|
|
34
|
+
import { type Client as RemittanceLinesClient } from "./remittanceLines/client.js";
|
|
35
|
+
import { type Client as RemittancesClient } from "./remittances/client.js";
|
|
36
|
+
import { type Client as StatementsClient } from "./statements/client.js";
|
|
37
|
+
import { type Client as SuppliersClient } from "./suppliers/client.js";
|
|
38
|
+
import { type Client as TaskTemplatesClient } from "./taskTemplates/client.js";
|
|
39
|
+
import { type Client as TasksClient } from "./tasks/client.js";
|
|
40
|
+
import { type Client as TimelineClient } from "./timeline/client.js";
|
|
41
|
+
import { type Client as TravelProfileClient } from "./travelProfile/client.js";
|
|
42
|
+
import { type Client as TravelersClient } from "./travelers/client.js";
|
|
43
|
+
import { type Client as TripsClient } from "./trips/client.js";
|
|
44
|
+
export interface ClientOptions extends BaseClientOptions {
|
|
45
|
+
/**
|
|
46
|
+
* The URL the paths of the API are relative to.
|
|
47
|
+
*/
|
|
48
|
+
baseUrl: string;
|
|
49
|
+
}
|
|
50
|
+
export interface Client {
|
|
51
|
+
readonly activities: ActivitiesClient;
|
|
52
|
+
readonly activityDestinations: ActivityDestinationsClient;
|
|
53
|
+
readonly balances: BalancesClient;
|
|
54
|
+
readonly bookingSelections: BookingSelectionsClient;
|
|
55
|
+
readonly carRentals: CarRentalsClient;
|
|
56
|
+
readonly carriers: CarriersClient;
|
|
57
|
+
readonly chats: ChatsClient;
|
|
58
|
+
readonly checkouts: CheckoutsClient;
|
|
59
|
+
readonly commissionExports: CommissionExportsClient;
|
|
60
|
+
readonly commissionImports: CommissionImportsClient;
|
|
61
|
+
readonly commissionItems: CommissionItemsClient;
|
|
62
|
+
readonly commissionReports: CommissionReportsClient;
|
|
63
|
+
readonly crmSettings: CrmSettingsClient;
|
|
64
|
+
readonly earnings: EarningsClient;
|
|
65
|
+
readonly externalBookings: ExternalBookingsClient;
|
|
66
|
+
readonly externalPayments: ExternalPaymentsClient;
|
|
67
|
+
readonly favorites: FavoritesClient;
|
|
68
|
+
readonly flightSchedules: FlightSchedulesClient;
|
|
69
|
+
readonly flights: FlightsClient;
|
|
70
|
+
readonly hotels: HotelsClient;
|
|
71
|
+
readonly insuranceQuotes: InsuranceQuotesClient;
|
|
72
|
+
readonly itineraries: ItinerariesClient;
|
|
73
|
+
readonly notes: NotesClient;
|
|
74
|
+
readonly offers: OffersClient;
|
|
75
|
+
readonly orders: OrdersClient;
|
|
76
|
+
readonly payees: PayeesClient;
|
|
77
|
+
readonly paymentMethods: PaymentMethodsClient;
|
|
78
|
+
readonly places: PlacesClient;
|
|
79
|
+
readonly profileForms: ProfileFormsClient;
|
|
80
|
+
readonly quotes: QuotesClient;
|
|
81
|
+
readonly remittanceBatches: RemittanceBatchesClient;
|
|
82
|
+
readonly remittanceClaims: RemittanceClaimsClient;
|
|
83
|
+
readonly remittanceLines: RemittanceLinesClient;
|
|
84
|
+
readonly remittances: RemittancesClient;
|
|
85
|
+
readonly statements: StatementsClient;
|
|
86
|
+
readonly suppliers: SuppliersClient;
|
|
87
|
+
readonly taskTemplates: TaskTemplatesClient;
|
|
88
|
+
readonly tasks: TasksClient;
|
|
89
|
+
readonly timeline: TimelineClient;
|
|
90
|
+
readonly travelProfile: TravelProfileClient;
|
|
91
|
+
readonly travelers: TravelersClient;
|
|
92
|
+
readonly trips: TripsClient;
|
|
93
|
+
}
|
|
94
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
95
|
+
export declare function bind(transport: Transport): Client;
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport } from "./_/index.js";
|
|
4
|
+
import { bind as bindActivities, } from "./activities/client.js";
|
|
5
|
+
import { bind as bindActivityDestinations, } from "./activityDestinations/client.js";
|
|
6
|
+
import { bind as bindBalances, } from "./balances/client.js";
|
|
7
|
+
import { bind as bindBookingSelections, } from "./bookingSelections/client.js";
|
|
8
|
+
import { bind as bindCarRentals, } from "./carRentals/client.js";
|
|
9
|
+
import { bind as bindCarriers, } from "./carriers/client.js";
|
|
10
|
+
import { bind as bindChats, } from "./chats/client.js";
|
|
11
|
+
import { bind as bindCheckouts, } from "./checkouts/client.js";
|
|
12
|
+
import { bind as bindCommissionExports, } from "./commissionExports/client.js";
|
|
13
|
+
import { bind as bindCommissionImports, } from "./commissionImports/client.js";
|
|
14
|
+
import { bind as bindCommissionItems, } from "./commissionItems/client.js";
|
|
15
|
+
import { bind as bindCommissionReports, } from "./commissionReports/client.js";
|
|
16
|
+
import { bind as bindCrmSettings, } from "./crmSettings/client.js";
|
|
17
|
+
import { bind as bindEarnings, } from "./earnings/client.js";
|
|
18
|
+
import { bind as bindExternalBookings, } from "./externalBookings/client.js";
|
|
19
|
+
import { bind as bindExternalPayments, } from "./externalPayments/client.js";
|
|
20
|
+
import { bind as bindFavorites, } from "./favorites/client.js";
|
|
21
|
+
import { bind as bindFlightSchedules, } from "./flightSchedules/client.js";
|
|
22
|
+
import { bind as bindFlights, } from "./flights/client.js";
|
|
23
|
+
import { bind as bindHotels, } from "./hotels/client.js";
|
|
24
|
+
import { bind as bindInsuranceQuotes, } from "./insuranceQuotes/client.js";
|
|
25
|
+
import { bind as bindItineraries, } from "./itineraries/client.js";
|
|
26
|
+
import { bind as bindNotes, } from "./notes/client.js";
|
|
27
|
+
import { bind as bindOffers, } from "./offers/client.js";
|
|
28
|
+
import { bind as bindOrders, } from "./orders/client.js";
|
|
29
|
+
import { bind as bindPayees, } from "./payees/client.js";
|
|
30
|
+
import { bind as bindPaymentMethods, } from "./paymentMethods/client.js";
|
|
31
|
+
import { bind as bindPlaces, } from "./places/client.js";
|
|
32
|
+
import { bind as bindProfileForms, } from "./profileForms/client.js";
|
|
33
|
+
import { bind as bindQuotes, } from "./quotes/client.js";
|
|
34
|
+
import { bind as bindRemittanceBatches, } from "./remittanceBatches/client.js";
|
|
35
|
+
import { bind as bindRemittanceClaims, } from "./remittanceClaims/client.js";
|
|
36
|
+
import { bind as bindRemittanceLines, } from "./remittanceLines/client.js";
|
|
37
|
+
import { bind as bindRemittances, } from "./remittances/client.js";
|
|
38
|
+
import { bind as bindStatements, } from "./statements/client.js";
|
|
39
|
+
import { bind as bindSuppliers, } from "./suppliers/client.js";
|
|
40
|
+
import { bind as bindTaskTemplates, } from "./taskTemplates/client.js";
|
|
41
|
+
import { bind as bindTasks, } from "./tasks/client.js";
|
|
42
|
+
import { bind as bindTimeline, } from "./timeline/client.js";
|
|
43
|
+
import { bind as bindTravelProfile, } from "./travelProfile/client.js";
|
|
44
|
+
import { bind as bindTravelers, } from "./travelers/client.js";
|
|
45
|
+
import { bind as bindTrips, } from "./trips/client.js";
|
|
46
|
+
export function createClient(options) {
|
|
47
|
+
return bind(new Transport(options));
|
|
48
|
+
}
|
|
49
|
+
export function bind(transport) {
|
|
50
|
+
let activitiesClient;
|
|
51
|
+
let activityDestinationsClient;
|
|
52
|
+
let balancesClient;
|
|
53
|
+
let bookingSelectionsClient;
|
|
54
|
+
let carRentalsClient;
|
|
55
|
+
let carriersClient;
|
|
56
|
+
let chatsClient;
|
|
57
|
+
let checkoutsClient;
|
|
58
|
+
let commissionExportsClient;
|
|
59
|
+
let commissionImportsClient;
|
|
60
|
+
let commissionItemsClient;
|
|
61
|
+
let commissionReportsClient;
|
|
62
|
+
let crmSettingsClient;
|
|
63
|
+
let earningsClient;
|
|
64
|
+
let externalBookingsClient;
|
|
65
|
+
let externalPaymentsClient;
|
|
66
|
+
let favoritesClient;
|
|
67
|
+
let flightSchedulesClient;
|
|
68
|
+
let flightsClient;
|
|
69
|
+
let hotelsClient;
|
|
70
|
+
let insuranceQuotesClient;
|
|
71
|
+
let itinerariesClient;
|
|
72
|
+
let notesClient;
|
|
73
|
+
let offersClient;
|
|
74
|
+
let ordersClient;
|
|
75
|
+
let payeesClient;
|
|
76
|
+
let paymentMethodsClient;
|
|
77
|
+
let placesClient;
|
|
78
|
+
let profileFormsClient;
|
|
79
|
+
let quotesClient;
|
|
80
|
+
let remittanceBatchesClient;
|
|
81
|
+
let remittanceClaimsClient;
|
|
82
|
+
let remittanceLinesClient;
|
|
83
|
+
let remittancesClient;
|
|
84
|
+
let statementsClient;
|
|
85
|
+
let suppliersClient;
|
|
86
|
+
let taskTemplatesClient;
|
|
87
|
+
let tasksClient;
|
|
88
|
+
let timelineClient;
|
|
89
|
+
let travelProfileClient;
|
|
90
|
+
let travelersClient;
|
|
91
|
+
let tripsClient;
|
|
92
|
+
return {
|
|
93
|
+
get activities() {
|
|
94
|
+
return (activitiesClient ??= bindActivities(transport));
|
|
95
|
+
},
|
|
96
|
+
get activityDestinations() {
|
|
97
|
+
return (activityDestinationsClient ??= bindActivityDestinations(transport));
|
|
98
|
+
},
|
|
99
|
+
get balances() {
|
|
100
|
+
return (balancesClient ??= bindBalances(transport));
|
|
101
|
+
},
|
|
102
|
+
get bookingSelections() {
|
|
103
|
+
return (bookingSelectionsClient ??= bindBookingSelections(transport));
|
|
104
|
+
},
|
|
105
|
+
get carRentals() {
|
|
106
|
+
return (carRentalsClient ??= bindCarRentals(transport));
|
|
107
|
+
},
|
|
108
|
+
get carriers() {
|
|
109
|
+
return (carriersClient ??= bindCarriers(transport));
|
|
110
|
+
},
|
|
111
|
+
get chats() {
|
|
112
|
+
return (chatsClient ??= bindChats(transport));
|
|
113
|
+
},
|
|
114
|
+
get checkouts() {
|
|
115
|
+
return (checkoutsClient ??= bindCheckouts(transport));
|
|
116
|
+
},
|
|
117
|
+
get commissionExports() {
|
|
118
|
+
return (commissionExportsClient ??= bindCommissionExports(transport));
|
|
119
|
+
},
|
|
120
|
+
get commissionImports() {
|
|
121
|
+
return (commissionImportsClient ??= bindCommissionImports(transport));
|
|
122
|
+
},
|
|
123
|
+
get commissionItems() {
|
|
124
|
+
return (commissionItemsClient ??= bindCommissionItems(transport));
|
|
125
|
+
},
|
|
126
|
+
get commissionReports() {
|
|
127
|
+
return (commissionReportsClient ??= bindCommissionReports(transport));
|
|
128
|
+
},
|
|
129
|
+
get crmSettings() {
|
|
130
|
+
return (crmSettingsClient ??= bindCrmSettings(transport));
|
|
131
|
+
},
|
|
132
|
+
get earnings() {
|
|
133
|
+
return (earningsClient ??= bindEarnings(transport));
|
|
134
|
+
},
|
|
135
|
+
get externalBookings() {
|
|
136
|
+
return (externalBookingsClient ??= bindExternalBookings(transport));
|
|
137
|
+
},
|
|
138
|
+
get externalPayments() {
|
|
139
|
+
return (externalPaymentsClient ??= bindExternalPayments(transport));
|
|
140
|
+
},
|
|
141
|
+
get favorites() {
|
|
142
|
+
return (favoritesClient ??= bindFavorites(transport));
|
|
143
|
+
},
|
|
144
|
+
get flightSchedules() {
|
|
145
|
+
return (flightSchedulesClient ??= bindFlightSchedules(transport));
|
|
146
|
+
},
|
|
147
|
+
get flights() {
|
|
148
|
+
return (flightsClient ??= bindFlights(transport));
|
|
149
|
+
},
|
|
150
|
+
get hotels() {
|
|
151
|
+
return (hotelsClient ??= bindHotels(transport));
|
|
152
|
+
},
|
|
153
|
+
get insuranceQuotes() {
|
|
154
|
+
return (insuranceQuotesClient ??= bindInsuranceQuotes(transport));
|
|
155
|
+
},
|
|
156
|
+
get itineraries() {
|
|
157
|
+
return (itinerariesClient ??= bindItineraries(transport));
|
|
158
|
+
},
|
|
159
|
+
get notes() {
|
|
160
|
+
return (notesClient ??= bindNotes(transport));
|
|
161
|
+
},
|
|
162
|
+
get offers() {
|
|
163
|
+
return (offersClient ??= bindOffers(transport));
|
|
164
|
+
},
|
|
165
|
+
get orders() {
|
|
166
|
+
return (ordersClient ??= bindOrders(transport));
|
|
167
|
+
},
|
|
168
|
+
get payees() {
|
|
169
|
+
return (payeesClient ??= bindPayees(transport));
|
|
170
|
+
},
|
|
171
|
+
get paymentMethods() {
|
|
172
|
+
return (paymentMethodsClient ??= bindPaymentMethods(transport));
|
|
173
|
+
},
|
|
174
|
+
get places() {
|
|
175
|
+
return (placesClient ??= bindPlaces(transport));
|
|
176
|
+
},
|
|
177
|
+
get profileForms() {
|
|
178
|
+
return (profileFormsClient ??= bindProfileForms(transport));
|
|
179
|
+
},
|
|
180
|
+
get quotes() {
|
|
181
|
+
return (quotesClient ??= bindQuotes(transport));
|
|
182
|
+
},
|
|
183
|
+
get remittanceBatches() {
|
|
184
|
+
return (remittanceBatchesClient ??= bindRemittanceBatches(transport));
|
|
185
|
+
},
|
|
186
|
+
get remittanceClaims() {
|
|
187
|
+
return (remittanceClaimsClient ??= bindRemittanceClaims(transport));
|
|
188
|
+
},
|
|
189
|
+
get remittanceLines() {
|
|
190
|
+
return (remittanceLinesClient ??= bindRemittanceLines(transport));
|
|
191
|
+
},
|
|
192
|
+
get remittances() {
|
|
193
|
+
return (remittancesClient ??= bindRemittances(transport));
|
|
194
|
+
},
|
|
195
|
+
get statements() {
|
|
196
|
+
return (statementsClient ??= bindStatements(transport));
|
|
197
|
+
},
|
|
198
|
+
get suppliers() {
|
|
199
|
+
return (suppliersClient ??= bindSuppliers(transport));
|
|
200
|
+
},
|
|
201
|
+
get taskTemplates() {
|
|
202
|
+
return (taskTemplatesClient ??= bindTaskTemplates(transport));
|
|
203
|
+
},
|
|
204
|
+
get tasks() {
|
|
205
|
+
return (tasksClient ??= bindTasks(transport));
|
|
206
|
+
},
|
|
207
|
+
get timeline() {
|
|
208
|
+
return (timelineClient ??= bindTimeline(transport));
|
|
209
|
+
},
|
|
210
|
+
get travelProfile() {
|
|
211
|
+
return (travelProfileClient ??= bindTravelProfile(transport));
|
|
212
|
+
},
|
|
213
|
+
get travelers() {
|
|
214
|
+
return (travelersClient ??= bindTravelers(transport));
|
|
215
|
+
},
|
|
216
|
+
get trips() {
|
|
217
|
+
return (tripsClient ??= bindTrips(transport));
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
|
|
2
|
+
import type { CommissionExport, CommissionExportCreateBody, CommissionExportsListResponse } 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
|
+
* Export a commission list
|
|
12
|
+
*
|
|
13
|
+
* Queues an export of a commission list (items, payments, remittances,
|
|
14
|
+
* statements, suppliers, payees, payouts, commission invoices or earnings) as
|
|
15
|
+
* CSV, XLSX or PDF, with a preset or ad-hoc columns, or AGENCY: everything of
|
|
16
|
+
* the company in one ZIP archive, `<company> commission <YYYY-MM-DD>.zip`,
|
|
17
|
+
* with a CSV file of each list holding all of its columns (AGENCY takes
|
|
18
|
+
* nothing but its subject); and answers it QUEUED. A Rust worker pages
|
|
19
|
+
* through the rows and streams them to the file; GET the export until it is
|
|
20
|
+
* READY to receive a link that works for 15 minutes. The file is kept 7 days.
|
|
21
|
+
* Advisors export their own bookings and statements; agency admins and
|
|
22
|
+
* finance staff anything of the company (payees never with a legal name).
|
|
23
|
+
* Columns must belong to the subject (400), CSV holds 2,000,000 rows (so does
|
|
24
|
+
* each file of an archive), XLSX 1,048,575, PDF 10,000 and an archive 4 GiB
|
|
25
|
+
* (the export fails COMMISSION_EXPORT_TOO_LARGE past them). A company may
|
|
26
|
+
* have 3 exports queued or running, an archive counting as one (429
|
|
27
|
+
* COMMISSION_RATE_LIMITED). The request and its filter are audited.
|
|
28
|
+
*/
|
|
29
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Get a commission export
|
|
32
|
+
*
|
|
33
|
+
* One export and its progress. While READY, each read signs a download link
|
|
34
|
+
* that works for 15 minutes and records the download in the audit log; after
|
|
35
|
+
* 7 days the export answers EXPIRED without a link. Advisors read the exports
|
|
36
|
+
* they requested; agency admins and finance staff any export of the company.
|
|
37
|
+
* Another company's export answers 404.
|
|
38
|
+
*/
|
|
39
|
+
get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* List commission exports
|
|
42
|
+
*
|
|
43
|
+
* The company's exports, newest first (25 by default, at most 100,
|
|
44
|
+
* keyset-paged), without download links. Advisors see the exports they
|
|
45
|
+
* requested; agency admins and finance staff all of the company's.
|
|
46
|
+
*/
|
|
47
|
+
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
48
|
+
}
|
|
49
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
50
|
+
export declare function bind(transport: Transport): Client;
|
|
51
|
+
export type CreateRequest = CommissionExportCreateBody;
|
|
52
|
+
export type CreateResponse = CommissionExport;
|
|
53
|
+
export interface GetRequest {
|
|
54
|
+
exportId: string;
|
|
55
|
+
}
|
|
56
|
+
export type GetResponse = CommissionExport;
|
|
57
|
+
export interface ListRequest {
|
|
58
|
+
cursor?: string;
|
|
59
|
+
limit?: number;
|
|
60
|
+
status?: string;
|
|
61
|
+
}
|
|
62
|
+
export type ListResponse = CommissionExportsListResponse;
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
10
|
+
get: (request, options) => transport.send(GetOperation, request, options),
|
|
11
|
+
list: (request, options) => transport.send(ListOperation, request, options),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const CreateOperation = {
|
|
15
|
+
method: "POST",
|
|
16
|
+
route: "/commerce/commission-exports",
|
|
17
|
+
body: "flat",
|
|
18
|
+
response: null,
|
|
19
|
+
errors: { "400": true, "401": true, "403": true },
|
|
20
|
+
};
|
|
21
|
+
const GetOperation = {
|
|
22
|
+
method: "GET",
|
|
23
|
+
route: "/commerce/commission-exports/{exportId}",
|
|
24
|
+
response: null,
|
|
25
|
+
errors: { "400": true, "401": true, "403": true },
|
|
26
|
+
};
|
|
27
|
+
const ListOperation = {
|
|
28
|
+
method: "GET",
|
|
29
|
+
route: "/commerce/commission-exports",
|
|
30
|
+
query: { cursor: "cursor", limit: "limit", status: "status" },
|
|
31
|
+
response: null,
|
|
32
|
+
errors: { "400": true, "401": true, "403": true },
|
|
33
|
+
};
|
|
@@ -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, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, } from "./client.js";
|
|
5
|
+
export type { CommissionExport, CommissionExportCreateBody, CommissionExportStatus, CommissionExportsListResponse, CommissionFilter, ExportColumn, ExportFormat, ExportSubject, } from "./models.js";
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { CommissionTag, CurrencyCode } from "../models.js";
|
|
2
|
+
export interface CommissionExport {
|
|
3
|
+
columns: ExportColumn[];
|
|
4
|
+
companyName: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
downloadUrl: string | null;
|
|
7
|
+
errorCode: "COMMISSION_EXPORT_TOO_LARGE" | "COMMISSION_EXPORT_TIMED_OUT" | "COMMISSION_EXPORT_FAILED" | null;
|
|
8
|
+
expiresAt: string | null;
|
|
9
|
+
exportId: string;
|
|
10
|
+
fileName: string;
|
|
11
|
+
filter: {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
finishedAt: string | null;
|
|
15
|
+
format: ExportFormat;
|
|
16
|
+
groupBy: ExportColumn | null;
|
|
17
|
+
presetId: string | null;
|
|
18
|
+
requestedByUserId: string;
|
|
19
|
+
rowCount: number | null;
|
|
20
|
+
sizeBytes: number | null;
|
|
21
|
+
startedAt: string | null;
|
|
22
|
+
status: CommissionExportStatus;
|
|
23
|
+
subject: ExportSubject;
|
|
24
|
+
totalsOnly: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type CommissionExportCreateBody = {
|
|
27
|
+
columns?: ExportColumn[];
|
|
28
|
+
fileName?: string;
|
|
29
|
+
filter?: CommissionFilter;
|
|
30
|
+
format?: ExportFormat;
|
|
31
|
+
groupBy?: ExportColumn | null;
|
|
32
|
+
presetId?: string;
|
|
33
|
+
subject: "COMMISSION_ITEMS";
|
|
34
|
+
totalsOnly?: boolean;
|
|
35
|
+
} | {
|
|
36
|
+
columns?: ExportColumn[];
|
|
37
|
+
fileName?: string;
|
|
38
|
+
filter?: {
|
|
39
|
+
channel?: string;
|
|
40
|
+
from?: string;
|
|
41
|
+
remittanceId?: string;
|
|
42
|
+
to?: string;
|
|
43
|
+
};
|
|
44
|
+
format?: ExportFormat;
|
|
45
|
+
groupBy?: ExportColumn | null;
|
|
46
|
+
presetId?: string;
|
|
47
|
+
subject: "PAYMENTS";
|
|
48
|
+
totalsOnly?: boolean;
|
|
49
|
+
} | {
|
|
50
|
+
columns?: ExportColumn[];
|
|
51
|
+
fileName?: string;
|
|
52
|
+
filter?: {
|
|
53
|
+
batchId?: string;
|
|
54
|
+
channel?: string;
|
|
55
|
+
from?: string;
|
|
56
|
+
q?: string;
|
|
57
|
+
state?: string;
|
|
58
|
+
to?: string;
|
|
59
|
+
unallocated?: "true" | "false";
|
|
60
|
+
};
|
|
61
|
+
format?: ExportFormat;
|
|
62
|
+
groupBy?: ExportColumn | null;
|
|
63
|
+
presetId?: string;
|
|
64
|
+
subject: "REMITTANCES";
|
|
65
|
+
totalsOnly?: boolean;
|
|
66
|
+
} | {
|
|
67
|
+
columns?: ExportColumn[];
|
|
68
|
+
fileName?: string;
|
|
69
|
+
filter?: {
|
|
70
|
+
currency?: CurrencyCode;
|
|
71
|
+
from?: string;
|
|
72
|
+
payeeId?: string;
|
|
73
|
+
payeeKind?: "ADVISOR" | "COMPANY";
|
|
74
|
+
status?: string;
|
|
75
|
+
to?: string;
|
|
76
|
+
};
|
|
77
|
+
format?: ExportFormat;
|
|
78
|
+
groupBy?: ExportColumn | null;
|
|
79
|
+
presetId?: string;
|
|
80
|
+
subject: "STATEMENTS";
|
|
81
|
+
totalsOnly?: boolean;
|
|
82
|
+
} | {
|
|
83
|
+
columns?: ExportColumn[];
|
|
84
|
+
fileName?: string;
|
|
85
|
+
filter?: {
|
|
86
|
+
kind?: string;
|
|
87
|
+
q?: string;
|
|
88
|
+
};
|
|
89
|
+
format?: ExportFormat;
|
|
90
|
+
groupBy?: ExportColumn | null;
|
|
91
|
+
presetId?: string;
|
|
92
|
+
subject: "SUPPLIERS";
|
|
93
|
+
totalsOnly?: boolean;
|
|
94
|
+
} | {
|
|
95
|
+
columns?: ExportColumn[];
|
|
96
|
+
fileName?: string;
|
|
97
|
+
filter?: {
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
};
|
|
100
|
+
format?: ExportFormat;
|
|
101
|
+
groupBy?: ExportColumn | null;
|
|
102
|
+
presetId?: string;
|
|
103
|
+
subject: "PAYEES";
|
|
104
|
+
totalsOnly?: boolean;
|
|
105
|
+
} | {
|
|
106
|
+
columns?: ExportColumn[];
|
|
107
|
+
fileName?: string;
|
|
108
|
+
filter?: {
|
|
109
|
+
[key: string]: unknown;
|
|
110
|
+
};
|
|
111
|
+
format?: ExportFormat;
|
|
112
|
+
groupBy?: ExportColumn | null;
|
|
113
|
+
presetId?: string;
|
|
114
|
+
subject: "PAYOUTS";
|
|
115
|
+
totalsOnly?: boolean;
|
|
116
|
+
} | {
|
|
117
|
+
columns?: ExportColumn[];
|
|
118
|
+
fileName?: string;
|
|
119
|
+
filter?: {
|
|
120
|
+
[key: string]: unknown;
|
|
121
|
+
};
|
|
122
|
+
format?: ExportFormat;
|
|
123
|
+
groupBy?: ExportColumn | null;
|
|
124
|
+
presetId?: string;
|
|
125
|
+
subject: "COMMISSION_INVOICES";
|
|
126
|
+
totalsOnly?: boolean;
|
|
127
|
+
} | {
|
|
128
|
+
columns?: ExportColumn[];
|
|
129
|
+
fileName?: string;
|
|
130
|
+
filter?: {
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
};
|
|
133
|
+
format?: ExportFormat;
|
|
134
|
+
groupBy?: ExportColumn | null;
|
|
135
|
+
presetId?: string;
|
|
136
|
+
subject: "EARNINGS";
|
|
137
|
+
totalsOnly?: boolean;
|
|
138
|
+
} | {
|
|
139
|
+
subject: "AGENCY";
|
|
140
|
+
};
|
|
141
|
+
export type CommissionExportStatus = "QUEUED" | "RUNNING" | "READY" | "FAILED" | "EXPIRED";
|
|
142
|
+
export interface CommissionExportsListResponse {
|
|
143
|
+
items: CommissionExport[];
|
|
144
|
+
nextCursor: string | null;
|
|
145
|
+
}
|
|
146
|
+
export interface CommissionFilter {
|
|
147
|
+
advisorUserId?: string;
|
|
148
|
+
agingBucket?: string;
|
|
149
|
+
category?: string;
|
|
150
|
+
dateField?: "TRAVEL_END" | "TRAVEL_START" | "BOOKED" | "DUE";
|
|
151
|
+
from?: string;
|
|
152
|
+
identifierId?: string;
|
|
153
|
+
kind?: string;
|
|
154
|
+
needsReview?: "true" | "false";
|
|
155
|
+
q?: string;
|
|
156
|
+
source?: string;
|
|
157
|
+
status?: string;
|
|
158
|
+
supplierId?: string;
|
|
159
|
+
tag?: CommissionTag;
|
|
160
|
+
to?: string;
|
|
161
|
+
view?: "BOOKINGS" | "RECEIVABLES";
|
|
162
|
+
}
|
|
163
|
+
export type ExportColumn = string;
|
|
164
|
+
export type ExportFormat = "CSV" | "XLSX" | "PDF";
|
|
165
|
+
export type ExportSubject = "COMMISSION_ITEMS" | "PAYMENTS" | "REMITTANCES" | "STATEMENTS" | "SUPPLIERS" | "PAYEES" | "PAYOUTS" | "COMMISSION_INVOICES" | "EARNINGS" | "AGENCY";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../_/index.js";
|
|
2
|
+
import type { CommissionImport, CommissionImportActionRunBody, CommissionImportCreateBody, CommissionImportCreateResponse, CommissionImportGetResponse, ImportRowStatus } 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
|
+
* Import a file of bookings
|
|
12
|
+
*
|
|
13
|
+
* Registers a file of bookings made elsewhere (CSV, TSV, TXT or XLSX, up to
|
|
14
|
+
* 100 MiB) and answers a presigned upload. Once S3 has the file, a worker
|
|
15
|
+
* reads it (status PARSING, then READY with the column names and the rows as
|
|
16
|
+
* the mapping reads them). The same file twice answers 409
|
|
17
|
+
* COMMISSION_FILE_ALREADY_IMPORTED. Poll `GET
|
|
18
|
+
* /commission-imports/{importId}`. Admins may map the emails a file names to
|
|
19
|
+
* members (`advisors`).
|
|
20
|
+
*/
|
|
21
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Get an import of bookings
|
|
24
|
+
*
|
|
25
|
+
* An import with a page of its rows (50 by default, at most 200, in file
|
|
26
|
+
* order; `status` keeps one kind of row): the cells as read (cleared once the
|
|
27
|
+
* import is committed), the values the mapping makes of them, and why a row
|
|
28
|
+
* is invalid or a duplicate. An advisor gets their own imports only, and of
|
|
29
|
+
* the emails mapped to members (`advisors`) only those mapped to them.
|
|
30
|
+
* Another company's import answers 404.
|
|
31
|
+
*/
|
|
32
|
+
get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Run an action on an import of bookings
|
|
35
|
+
*
|
|
36
|
+
* APPLY_MAPPING re-reads the rows with a new mapping (status PARSING, then
|
|
37
|
+
* READY); MAP_ADVISORS (admins and staff) replaces the emails-to-members map
|
|
38
|
+
* and re-reads the rows; SAVE_PRESET keeps the mapping for the company's next
|
|
39
|
+
* files; COMMIT creates one booking made elsewhere with its commission item
|
|
40
|
+
* per valid row, as a resumable job (status COMMITTING, then COMMITTED;
|
|
41
|
+
* duplicates are skipped and counted; a commit that failed stays COMMITTING
|
|
42
|
+
* and resumes when COMMIT is asked again); DISCARD drops a file that was not
|
|
43
|
+
* committed. Each action is audited.
|
|
44
|
+
*/
|
|
45
|
+
runAction(request: RunActionRequest, options?: RequestOptions): Promise<RunActionResponse>;
|
|
46
|
+
}
|
|
47
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
48
|
+
export declare function bind(transport: Transport): Client;
|
|
49
|
+
export type CreateRequest = CommissionImportCreateBody;
|
|
50
|
+
export type CreateResponse = CommissionImportCreateResponse;
|
|
51
|
+
export interface GetRequest {
|
|
52
|
+
importId: string;
|
|
53
|
+
cursor?: string;
|
|
54
|
+
limit?: number;
|
|
55
|
+
status?: ImportRowStatus;
|
|
56
|
+
}
|
|
57
|
+
export type GetResponse = CommissionImportGetResponse;
|
|
58
|
+
export type RunActionRequest = {
|
|
59
|
+
importId: string;
|
|
60
|
+
} & CommissionImportActionRunBody;
|
|
61
|
+
export type RunActionResponse = CommissionImport;
|