@grupolapa/cotizador-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/dist/bundle-payment-schedule.calc.d.ts +2 -0
- package/dist/bundle-payment-schedule.calc.js +160 -0
- package/dist/calculate-quote.d.ts +2 -0
- package/dist/calculate-quote.js +382 -0
- package/dist/corporate-actions.d.ts +95 -0
- package/dist/corporate-actions.js +87 -0
- package/dist/corporate-rent.d.ts +5 -0
- package/dist/corporate-rent.js +43 -0
- package/dist/delivery-date.d.ts +6 -0
- package/dist/delivery-date.js +22 -0
- package/dist/entrada.d.ts +111 -0
- package/dist/entrada.js +139 -0
- package/dist/format.d.ts +7 -0
- package/dist/format.js +37 -0
- package/dist/http.d.ts +28 -0
- package/dist/http.js +133 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +22 -0
- package/dist/installment-allocation.d.ts +30 -0
- package/dist/installment-allocation.js +69 -0
- package/dist/inventory-availability.d.ts +10 -0
- package/dist/inventory-availability.js +105 -0
- package/dist/live-inventory-availability.d.ts +16 -0
- package/dist/live-inventory-availability.js +88 -0
- package/dist/payment-schemes.d.ts +22 -0
- package/dist/payment-schemes.js +99 -0
- package/dist/post-delivery-value.d.ts +3 -0
- package/dist/post-delivery-value.js +61 -0
- package/dist/product-types.d.ts +16 -0
- package/dist/product-types.js +82 -0
- package/dist/query-state.d.ts +5 -0
- package/dist/query-state.js +157 -0
- package/dist/quote-outcome-graph.d.ts +31 -0
- package/dist/quote-outcome-graph.js +113 -0
- package/dist/quote.d.ts +19 -0
- package/dist/quote.js +18 -0
- package/dist/selection-state.d.ts +34 -0
- package/dist/selection-state.js +156 -0
- package/dist/server.d.ts +16 -0
- package/dist/server.js +17 -0
- package/dist/sitemap.d.ts +22 -0
- package/dist/sitemap.js +45 -0
- package/dist/social-quote.d.ts +8 -0
- package/dist/social-quote.js +51 -0
- package/dist/tax.d.ts +5 -0
- package/dist/tax.js +11 -0
- package/dist/types.d.ts +502 -0
- package/dist/types.js +1 -0
- package/package.json +51 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
export type PaymentSchemeType = "cashback" | "installment";
|
|
2
|
+
export type PaymentProvider = "mercado_pago" | "stripe";
|
|
3
|
+
export type InventoryStatus = "available" | "reserved" | "sold" | "unavailable";
|
|
4
|
+
export type InventoryStatusLabels = {
|
|
5
|
+
available: string;
|
|
6
|
+
reserved: string;
|
|
7
|
+
sold: string;
|
|
8
|
+
unavailable?: string;
|
|
9
|
+
};
|
|
10
|
+
export type ProductInventoryMode = "units" | "shares";
|
|
11
|
+
export type InventoryCategory = string;
|
|
12
|
+
export type EntryProductKind = "copropiedad" | "acciones";
|
|
13
|
+
export type ReservationProductKind = "inventory" | "copropiedad" | "acciones";
|
|
14
|
+
export interface ProductTypeInventoryUnit {
|
|
15
|
+
id: string;
|
|
16
|
+
unitNumber: string;
|
|
17
|
+
areaM2: number;
|
|
18
|
+
pricePerM2MXN: number;
|
|
19
|
+
status: InventoryStatus;
|
|
20
|
+
svgElementIds?: string[];
|
|
21
|
+
svgPath?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ProductTypeShareInventory {
|
|
24
|
+
totalShares: number;
|
|
25
|
+
soldSharesBaseline: number;
|
|
26
|
+
}
|
|
27
|
+
export interface ProductType {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
category: InventoryCategory;
|
|
31
|
+
deliveryDate: string;
|
|
32
|
+
allowedSchemeIds: string[];
|
|
33
|
+
defaultSchemeId: string;
|
|
34
|
+
inventoryMode?: ProductInventoryMode;
|
|
35
|
+
shareInventory?: ProductTypeShareInventory;
|
|
36
|
+
inventory: ProductTypeInventoryUnit[];
|
|
37
|
+
}
|
|
38
|
+
export interface InventoryUnit {
|
|
39
|
+
id: string;
|
|
40
|
+
unitNumber: string;
|
|
41
|
+
name: string;
|
|
42
|
+
productTypeId: string;
|
|
43
|
+
productTypeName: string;
|
|
44
|
+
category: InventoryCategory;
|
|
45
|
+
areaM2: number;
|
|
46
|
+
pricePerM2MXN: number;
|
|
47
|
+
deliveryDate: string;
|
|
48
|
+
allowedSchemeIds: string[];
|
|
49
|
+
defaultSchemeId: string;
|
|
50
|
+
inventoryMode?: ProductInventoryMode;
|
|
51
|
+
status: InventoryStatus;
|
|
52
|
+
svgElementIds?: string[];
|
|
53
|
+
svgPath?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface InventoryShareAvailability {
|
|
56
|
+
total: number;
|
|
57
|
+
soldBaseline: number;
|
|
58
|
+
soldPaid: number;
|
|
59
|
+
soldTotal: number;
|
|
60
|
+
remaining: number;
|
|
61
|
+
}
|
|
62
|
+
export interface InventoryAvailability {
|
|
63
|
+
unitId: string;
|
|
64
|
+
productTypeId: string;
|
|
65
|
+
inventoryMode: ProductInventoryMode;
|
|
66
|
+
status: InventoryStatus;
|
|
67
|
+
canCheckout: boolean;
|
|
68
|
+
isSoldOutByShares?: boolean;
|
|
69
|
+
share?: InventoryShareAvailability;
|
|
70
|
+
}
|
|
71
|
+
export type InventoryAvailabilityByUnitId = Record<string, InventoryAvailability>;
|
|
72
|
+
export interface FloorPlan {
|
|
73
|
+
floor: string;
|
|
74
|
+
image: string;
|
|
75
|
+
svg: string;
|
|
76
|
+
viewBox: string;
|
|
77
|
+
label: string;
|
|
78
|
+
}
|
|
79
|
+
export type FloorPlansByCategory = Partial<Record<InventoryCategory, FloorPlan>>;
|
|
80
|
+
export interface RangeRule {
|
|
81
|
+
min: number;
|
|
82
|
+
max: number;
|
|
83
|
+
step: number;
|
|
84
|
+
}
|
|
85
|
+
interface PaymentSchemeBase {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
description: string;
|
|
89
|
+
type: PaymentSchemeType;
|
|
90
|
+
active: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface CashbackPaymentScheme extends PaymentSchemeBase {
|
|
93
|
+
type: "cashback";
|
|
94
|
+
cashbackRate: number;
|
|
95
|
+
downPaymentRange: RangeRule;
|
|
96
|
+
}
|
|
97
|
+
export interface InstallmentPaymentScheme extends PaymentSchemeBase {
|
|
98
|
+
type: "installment";
|
|
99
|
+
downPaymentPct: number;
|
|
100
|
+
monthlyPct: number;
|
|
101
|
+
deferredPct: number;
|
|
102
|
+
deliveryPct: number;
|
|
103
|
+
}
|
|
104
|
+
export type PaymentSchemeDefinition = CashbackPaymentScheme | InstallmentPaymentScheme;
|
|
105
|
+
export interface FinanceRules {
|
|
106
|
+
rentalRate: number;
|
|
107
|
+
accionesRentalRate: number;
|
|
108
|
+
corporateInflationRate: number;
|
|
109
|
+
bookingAmountMXN: number;
|
|
110
|
+
paymentsEnabled: boolean;
|
|
111
|
+
paymentProvider: PaymentProvider;
|
|
112
|
+
defaults: {
|
|
113
|
+
category: InventoryCategory;
|
|
114
|
+
unitId: string;
|
|
115
|
+
schemeId: string;
|
|
116
|
+
plusvaliaAnnualPct: number;
|
|
117
|
+
postDeliveryYears: number;
|
|
118
|
+
downPaymentPct: number;
|
|
119
|
+
};
|
|
120
|
+
ranges: {
|
|
121
|
+
postDeliveryYears: RangeRule;
|
|
122
|
+
};
|
|
123
|
+
milestones: {
|
|
124
|
+
cashbackStart: string;
|
|
125
|
+
midpoint: string;
|
|
126
|
+
delivery: string;
|
|
127
|
+
annualityPrefix: string;
|
|
128
|
+
};
|
|
129
|
+
disclaimer: string;
|
|
130
|
+
}
|
|
131
|
+
export interface SiteCategoryCopy {
|
|
132
|
+
id: InventoryCategory;
|
|
133
|
+
label: string;
|
|
134
|
+
description: string;
|
|
135
|
+
defaultDeliveryDate?: string;
|
|
136
|
+
}
|
|
137
|
+
export interface UploadedImageAsset {
|
|
138
|
+
imageUrl: string;
|
|
139
|
+
imageKey?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface SplashScreenContent extends UploadedImageAsset {
|
|
142
|
+
backgroundColor: string;
|
|
143
|
+
}
|
|
144
|
+
export interface SiteContent {
|
|
145
|
+
brand: string;
|
|
146
|
+
subBrand: string;
|
|
147
|
+
heroEyebrow: string;
|
|
148
|
+
heroTitle: string;
|
|
149
|
+
heroDescription: string;
|
|
150
|
+
splash: SplashScreenContent;
|
|
151
|
+
favicon?: UploadedImageAsset;
|
|
152
|
+
uondrHeaderIcon?: UploadedImageAsset;
|
|
153
|
+
categories: SiteCategoryCopy[];
|
|
154
|
+
statusLabels: InventoryStatusLabels;
|
|
155
|
+
sections: Record<"inventory" | "proposal" | "metrics" | "breakdown" | "timeline" | "outlook" | "contact" | "disclaimer", string>;
|
|
156
|
+
cta: {
|
|
157
|
+
primaryLabel: string;
|
|
158
|
+
secondaryLabel: string;
|
|
159
|
+
missingWhatsapp: string;
|
|
160
|
+
unavailableInventory: string;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface EntrySettings {
|
|
164
|
+
apartmentLotIds: string[];
|
|
165
|
+
corporateLotId: string | null;
|
|
166
|
+
}
|
|
167
|
+
export interface EntryInventoryContent {
|
|
168
|
+
apartmentUnitIds: string[];
|
|
169
|
+
corporateUnitId: string | null;
|
|
170
|
+
}
|
|
171
|
+
export interface AppContent {
|
|
172
|
+
entryInventory: EntryInventoryContent;
|
|
173
|
+
entrySettings: EntrySettings;
|
|
174
|
+
financeRules: FinanceRules;
|
|
175
|
+
floorPlans: FloorPlansByCategory;
|
|
176
|
+
productTypes: ProductType[];
|
|
177
|
+
inventory: InventoryUnit[];
|
|
178
|
+
paymentSchemes: PaymentSchemeDefinition[];
|
|
179
|
+
siteContent: SiteContent;
|
|
180
|
+
}
|
|
181
|
+
export type ContentStorage = "convex";
|
|
182
|
+
export interface ContentSnapshot {
|
|
183
|
+
content: AppContent;
|
|
184
|
+
inventoryAvailabilityByUnitId: InventoryAvailabilityByUnitId;
|
|
185
|
+
updatedAt: string;
|
|
186
|
+
storage: ContentStorage;
|
|
187
|
+
}
|
|
188
|
+
export interface ApiErrorResponse {
|
|
189
|
+
message: string;
|
|
190
|
+
fieldErrors?: Record<string, string>;
|
|
191
|
+
}
|
|
192
|
+
export interface QuoteInput {
|
|
193
|
+
unitId: string;
|
|
194
|
+
scheme: string;
|
|
195
|
+
plusvaliaAnnualPct: number;
|
|
196
|
+
postDeliveryYears: number;
|
|
197
|
+
downPaymentPct: number;
|
|
198
|
+
installmentDownPaymentPct?: number;
|
|
199
|
+
installmentMonthlyPct?: number;
|
|
200
|
+
includeIva: boolean;
|
|
201
|
+
}
|
|
202
|
+
export interface QuoteBreakdownItem {
|
|
203
|
+
label: string;
|
|
204
|
+
valueMXN: number;
|
|
205
|
+
tone: "negative" | "positive" | "auric" | "neutral";
|
|
206
|
+
}
|
|
207
|
+
export interface QuoteTimelineRow {
|
|
208
|
+
month: number;
|
|
209
|
+
paymentMXN: number;
|
|
210
|
+
paymentLabel: string;
|
|
211
|
+
cashbackMXN: number;
|
|
212
|
+
plusvaliaDeltaMXN: number;
|
|
213
|
+
accumulatedCashbackMXN: number;
|
|
214
|
+
accumulatedPlusvaliaMXN: number;
|
|
215
|
+
assetValueMXN: number;
|
|
216
|
+
isMilestone: boolean;
|
|
217
|
+
milestoneLabel: string;
|
|
218
|
+
}
|
|
219
|
+
export interface ProjectionPoint {
|
|
220
|
+
yearOffset: number;
|
|
221
|
+
label: string;
|
|
222
|
+
assetValueMXN: number;
|
|
223
|
+
rentalAccumulatedMXN: number;
|
|
224
|
+
valueWithRentMXN: number;
|
|
225
|
+
}
|
|
226
|
+
export interface PostDeliveryValueRow {
|
|
227
|
+
periodIndex: number;
|
|
228
|
+
label: string;
|
|
229
|
+
plusvaliaDeltaMXN: number;
|
|
230
|
+
rentalDeltaMXN: number;
|
|
231
|
+
valueAddedMXN: number;
|
|
232
|
+
assetValueMXN: number;
|
|
233
|
+
rentalAccumulatedMXN: number;
|
|
234
|
+
ownerValueMXN: number;
|
|
235
|
+
}
|
|
236
|
+
export interface QuoteResult {
|
|
237
|
+
unit: InventoryUnit;
|
|
238
|
+
scheme: PaymentSchemeDefinition;
|
|
239
|
+
input: QuoteInput;
|
|
240
|
+
listPriceMXN: number;
|
|
241
|
+
deliveryMonths: number;
|
|
242
|
+
isCashback: boolean;
|
|
243
|
+
cashbackMonths: number;
|
|
244
|
+
isCashbackCapped: boolean;
|
|
245
|
+
downPaymentPct: number;
|
|
246
|
+
downPaymentAmountMXN: number;
|
|
247
|
+
balanceAmountMXN: number;
|
|
248
|
+
cashbackMonthlyMXN: number;
|
|
249
|
+
cashbackTotalMXN: number;
|
|
250
|
+
installmentDiscountPct: number;
|
|
251
|
+
installmentDiscountMXN: number;
|
|
252
|
+
monthlyPaymentPct: number;
|
|
253
|
+
monthlyPaymentCount: number;
|
|
254
|
+
monthlyPaymentAmountMXN: number;
|
|
255
|
+
deferredPaymentPct: number;
|
|
256
|
+
deferredPaymentsTotalMXN: number;
|
|
257
|
+
deferredPaymentsCount: number;
|
|
258
|
+
deferredPaymentMonths: number[];
|
|
259
|
+
deferredPaymentAmountMXN: number;
|
|
260
|
+
deliveryPaymentPct: number;
|
|
261
|
+
deliveryPaymentAmountMXN: number;
|
|
262
|
+
netCostMXN: number;
|
|
263
|
+
plusvaliaAtDeliveryMXN: number;
|
|
264
|
+
plusvaliaPostDeliveryMXN: number;
|
|
265
|
+
totalGainMXN: number;
|
|
266
|
+
finalAssetValueMXN: number;
|
|
267
|
+
projectedAssetValueMXN: number;
|
|
268
|
+
rentalMonthlyMXN: number;
|
|
269
|
+
rentalAccumulatedMXN: number;
|
|
270
|
+
projectionPoints: ProjectionPoint[];
|
|
271
|
+
timelineRows: QuoteTimelineRow[];
|
|
272
|
+
visibleTimelineRows: QuoteTimelineRow[];
|
|
273
|
+
costBreakdown: QuoteBreakdownItem[];
|
|
274
|
+
gainBreakdown: QuoteBreakdownItem[];
|
|
275
|
+
}
|
|
276
|
+
export interface QuoteUrlState {
|
|
277
|
+
category: InventoryCategory;
|
|
278
|
+
unitId: string;
|
|
279
|
+
scheme: string;
|
|
280
|
+
postDeliveryYears: number;
|
|
281
|
+
downPaymentPct: number;
|
|
282
|
+
installmentDownPaymentPct?: number;
|
|
283
|
+
installmentMonthlyPct?: number;
|
|
284
|
+
includeIva: boolean;
|
|
285
|
+
}
|
|
286
|
+
export interface ContactFormValues {
|
|
287
|
+
name: string;
|
|
288
|
+
phone: string;
|
|
289
|
+
notes: string;
|
|
290
|
+
}
|
|
291
|
+
export type PublicApiLookup = "host" | "preview";
|
|
292
|
+
export interface CotizadorApiErrorBody {
|
|
293
|
+
code?: string;
|
|
294
|
+
fieldErrors?: Record<string, string>;
|
|
295
|
+
message: string;
|
|
296
|
+
}
|
|
297
|
+
export interface CotizadorApiBaseOptions {
|
|
298
|
+
baseUrl: string;
|
|
299
|
+
fetch?: typeof fetch;
|
|
300
|
+
}
|
|
301
|
+
export interface PublicSiteInfo {
|
|
302
|
+
developmentName: string | null;
|
|
303
|
+
displayName: string;
|
|
304
|
+
host: string;
|
|
305
|
+
previewSlug: string;
|
|
306
|
+
status: string;
|
|
307
|
+
}
|
|
308
|
+
export interface PublicInstanceInfo {
|
|
309
|
+
displayName: string;
|
|
310
|
+
hidden: boolean;
|
|
311
|
+
isDefault: boolean;
|
|
312
|
+
rendererId: string;
|
|
313
|
+
slug: string;
|
|
314
|
+
}
|
|
315
|
+
export interface PublicInstancesResponse {
|
|
316
|
+
instances: PublicInstanceInfo[];
|
|
317
|
+
}
|
|
318
|
+
export interface PublicSnapshotResponse {
|
|
319
|
+
enabledSurfaces: string[];
|
|
320
|
+
instance: PublicInstanceInfo | null;
|
|
321
|
+
instances: PublicInstanceInfo[];
|
|
322
|
+
site: PublicSiteInfo;
|
|
323
|
+
snapshot: ContentSnapshot;
|
|
324
|
+
}
|
|
325
|
+
export interface PublicInventoryResponse {
|
|
326
|
+
availabilityByUnitId: InventoryAvailabilityByUnitId;
|
|
327
|
+
inventory: InventoryUnit[];
|
|
328
|
+
instance: PublicInstanceInfo | null;
|
|
329
|
+
site: PublicSiteInfo;
|
|
330
|
+
updatedAt: string;
|
|
331
|
+
}
|
|
332
|
+
export interface PublicPaymentProviderConfig {
|
|
333
|
+
enabled: boolean;
|
|
334
|
+
publicKey: string | null;
|
|
335
|
+
}
|
|
336
|
+
export interface PublicPaymentMethodsResponse {
|
|
337
|
+
activeProvider: PaymentProvider;
|
|
338
|
+
bookingAmountMXN: number;
|
|
339
|
+
enabled: boolean;
|
|
340
|
+
instance: PublicInstanceInfo | null;
|
|
341
|
+
paymentSchemes: PaymentSchemeDefinition[];
|
|
342
|
+
providers: Record<PaymentProvider, PublicPaymentProviderConfig>;
|
|
343
|
+
publicKey: string | null;
|
|
344
|
+
site: PublicSiteInfo;
|
|
345
|
+
}
|
|
346
|
+
export type PublicSitemapShapeTag = "circle" | "ellipse" | "path" | "polygon" | "polyline" | "rect";
|
|
347
|
+
export interface PublicSitemapShape {
|
|
348
|
+
attributes: Record<string, string>;
|
|
349
|
+
geometry: Record<string, string>;
|
|
350
|
+
svgElementId: string;
|
|
351
|
+
tagName: PublicSitemapShapeTag;
|
|
352
|
+
}
|
|
353
|
+
export interface PublicSitemapUnitHotspot {
|
|
354
|
+
availability: string | null;
|
|
355
|
+
lotCode: string;
|
|
356
|
+
shape: PublicSitemapShape | null;
|
|
357
|
+
svgElementId: string;
|
|
358
|
+
unitId: string | null;
|
|
359
|
+
}
|
|
360
|
+
export interface PublicSitemapNavigationHotspot {
|
|
361
|
+
shape: PublicSitemapShape | null;
|
|
362
|
+
svgElementId: string;
|
|
363
|
+
targetMapId: string;
|
|
364
|
+
targetMapName: string;
|
|
365
|
+
}
|
|
366
|
+
export interface PublicSitemapMap {
|
|
367
|
+
appliedAt: string | null;
|
|
368
|
+
assets: {
|
|
369
|
+
imageHeight: number | null;
|
|
370
|
+
imageUrl: string;
|
|
371
|
+
imageWidth: number | null;
|
|
372
|
+
overlayUrl: string;
|
|
373
|
+
overlayViewBox: string | null;
|
|
374
|
+
};
|
|
375
|
+
clusterKey: string | null;
|
|
376
|
+
counts: {
|
|
377
|
+
clusterLinkHotspots: number;
|
|
378
|
+
linkedShapes: number;
|
|
379
|
+
lotHotspots: number;
|
|
380
|
+
missingShapes: number;
|
|
381
|
+
};
|
|
382
|
+
id: string;
|
|
383
|
+
imageHeight: number | null;
|
|
384
|
+
imageUrl: string;
|
|
385
|
+
imageWidth: number | null;
|
|
386
|
+
kind: "cluster" | "root";
|
|
387
|
+
missingShapeElementIds: string[];
|
|
388
|
+
name: string;
|
|
389
|
+
navigationHotspots: PublicSitemapNavigationHotspot[];
|
|
390
|
+
overlayUrl: string;
|
|
391
|
+
overlayViewBox: string | null;
|
|
392
|
+
parentMapId: string | null;
|
|
393
|
+
shapes: PublicSitemapShape[];
|
|
394
|
+
unitHotspots: PublicSitemapUnitHotspot[];
|
|
395
|
+
}
|
|
396
|
+
export interface PublicSitemapResponse {
|
|
397
|
+
development: {
|
|
398
|
+
id: string;
|
|
399
|
+
name: string;
|
|
400
|
+
};
|
|
401
|
+
maps: PublicSitemapMap[];
|
|
402
|
+
site: PublicSiteInfo;
|
|
403
|
+
}
|
|
404
|
+
export interface PublicSessionResponse {
|
|
405
|
+
expiresAt: string;
|
|
406
|
+
token: string;
|
|
407
|
+
tokenType: "Bearer";
|
|
408
|
+
}
|
|
409
|
+
export interface PublicReservationItemRequest {
|
|
410
|
+
productKind?: ReservationProductKind;
|
|
411
|
+
productLabel?: string;
|
|
412
|
+
quoteState?: Record<string, unknown>;
|
|
413
|
+
selection?: Record<string, unknown>;
|
|
414
|
+
shareQuantity?: number;
|
|
415
|
+
unitId: string;
|
|
416
|
+
}
|
|
417
|
+
export type PublicReservationPaymentRequest = {
|
|
418
|
+
provider: "stripe";
|
|
419
|
+
returnUrl: string;
|
|
420
|
+
} | {
|
|
421
|
+
installments?: number;
|
|
422
|
+
payer?: {
|
|
423
|
+
email: string;
|
|
424
|
+
first_name?: string;
|
|
425
|
+
last_name?: string;
|
|
426
|
+
};
|
|
427
|
+
payment_method_id: string;
|
|
428
|
+
payment_type_id: string;
|
|
429
|
+
provider: "mercado_pago";
|
|
430
|
+
token: string;
|
|
431
|
+
};
|
|
432
|
+
export interface PublicReservationRequest {
|
|
433
|
+
instanceSlug?: string;
|
|
434
|
+
items: PublicReservationItemRequest[];
|
|
435
|
+
partnerReference?: string;
|
|
436
|
+
payment: PublicReservationPaymentRequest;
|
|
437
|
+
posthogDistinctId?: string;
|
|
438
|
+
posthogSessionId?: string;
|
|
439
|
+
surface?: "default" | "social" | "uondr" | "entrada";
|
|
440
|
+
}
|
|
441
|
+
export interface PublicReservationItemStatus {
|
|
442
|
+
fulfillmentStatus: string;
|
|
443
|
+
inventoryMode?: ProductInventoryMode;
|
|
444
|
+
productKind: ReservationProductKind;
|
|
445
|
+
productLabel: string;
|
|
446
|
+
shareQuantity: number | null;
|
|
447
|
+
unitId: string;
|
|
448
|
+
unitName: string;
|
|
449
|
+
}
|
|
450
|
+
export interface PublicReservationStatus {
|
|
451
|
+
amountMXN: number;
|
|
452
|
+
checkoutUrl: string | null;
|
|
453
|
+
externalReference: string;
|
|
454
|
+
itemCount: number;
|
|
455
|
+
items: PublicReservationItemStatus[];
|
|
456
|
+
partnerReference: string | null;
|
|
457
|
+
productKind: ReservationProductKind;
|
|
458
|
+
productLabel: string;
|
|
459
|
+
provider: PaymentProvider;
|
|
460
|
+
providerStatus: string | null;
|
|
461
|
+
providerStatusDetail: string | null;
|
|
462
|
+
status: string;
|
|
463
|
+
stripePaymentIntentId: string | null;
|
|
464
|
+
stripeSessionId: string | null;
|
|
465
|
+
surface: string;
|
|
466
|
+
unitId: string;
|
|
467
|
+
unitName: string;
|
|
468
|
+
updatedAt: string;
|
|
469
|
+
mercadoPagoStatus?: string | null;
|
|
470
|
+
mercadoPagoStatusDetail?: string | null;
|
|
471
|
+
orderId?: string | null;
|
|
472
|
+
orderStatus?: string | null;
|
|
473
|
+
orderStatusDetail?: string | null;
|
|
474
|
+
paymentId?: string | null;
|
|
475
|
+
preferenceId?: string | null;
|
|
476
|
+
transactionId?: string | null;
|
|
477
|
+
}
|
|
478
|
+
export interface CotizadorSiteRequest {
|
|
479
|
+
instanceSlug?: string;
|
|
480
|
+
lookup?: PublicApiLookup;
|
|
481
|
+
siteKey: string;
|
|
482
|
+
}
|
|
483
|
+
export interface CotizadorInventoryRequest extends CotizadorSiteRequest {
|
|
484
|
+
unitIds?: string[];
|
|
485
|
+
}
|
|
486
|
+
export interface CotizadorSitemapRequest extends CotizadorSiteRequest {
|
|
487
|
+
includeShapes?: boolean;
|
|
488
|
+
}
|
|
489
|
+
export interface CreatePublicSessionRequest {
|
|
490
|
+
lookup?: PublicApiLookup;
|
|
491
|
+
origin?: string;
|
|
492
|
+
siteKey: string;
|
|
493
|
+
}
|
|
494
|
+
export interface CreatePublicReservationRequest extends CotizadorSiteRequest {
|
|
495
|
+
request: PublicReservationRequest;
|
|
496
|
+
sessionToken?: string;
|
|
497
|
+
}
|
|
498
|
+
export interface GetPublicReservationRequest {
|
|
499
|
+
externalReference: string;
|
|
500
|
+
sessionToken?: string;
|
|
501
|
+
}
|
|
502
|
+
export {};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grupolapa/cotizador-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Framework-agnostic TypeScript SDK for Grupo LAPA public cotizador integrations.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./server": {
|
|
22
|
+
"types": "./dist/server.d.ts",
|
|
23
|
+
"import": "./dist/server.js",
|
|
24
|
+
"default": "./dist/server.js"
|
|
25
|
+
},
|
|
26
|
+
"./quote": {
|
|
27
|
+
"types": "./dist/quote.d.ts",
|
|
28
|
+
"import": "./dist/quote.js",
|
|
29
|
+
"default": "./dist/quote.js"
|
|
30
|
+
},
|
|
31
|
+
"./sitemap": {
|
|
32
|
+
"types": "./dist/sitemap.d.ts",
|
|
33
|
+
"import": "./dist/sitemap.js",
|
|
34
|
+
"default": "./dist/sitemap.js"
|
|
35
|
+
},
|
|
36
|
+
"./types": {
|
|
37
|
+
"types": "./dist/types.d.ts",
|
|
38
|
+
"import": "./dist/types.js",
|
|
39
|
+
"default": "./dist/types.js"
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
48
|
+
"prepack": "pnpm run build",
|
|
49
|
+
"typecheck": "tsc --noEmit"
|
|
50
|
+
}
|
|
51
|
+
}
|