@grupolapa/desarrollos-sdk 0.3.1 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { DesarrollosApiError } from "./http.js";
2
2
  import type { CompleteJourneyConfigurationRequest, CreateJourneyCheckoutRequest, CreateJourneyConfiguratorSessionRequest, CreateJourneyQuoteRequest, CreateJourneyRequest, DesarrollosApiBaseOptions, CreatePublicReservationRequest, GetJourneyRequest, GetPublicReservationRequest, UpdateJourneyLeadRequest, UpdateJourneySelectionRequest } from "./types.js";
3
3
  export { DesarrollosApiError };
4
+ export { JOURNEY_STATUSES } from "./types.js";
4
5
  export type * from "./types.js";
5
6
  export * from "./embed-protocol.js";
6
7
  export declare function createDesarrollosClient(options: DesarrollosApiBaseOptions): {
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { DesarrollosApiError, createDesarrollosApiRequester } from "./http.js";
2
2
  export { DesarrollosApiError };
3
+ export { JOURNEY_STATUSES } from "./types.js";
3
4
  export * from "./embed-protocol.js";
4
5
  export function createDesarrollosClient(options) {
5
6
  const api = createDesarrollosApiRequester(options);
package/dist/types.d.ts CHANGED
@@ -422,7 +422,15 @@ export interface PublicSessionResponse {
422
422
  tokenType: "Bearer";
423
423
  }
424
424
  export type JourneyErrorCode = "origin_denied" | "mapping_not_found" | "configuration_required" | "configuration_invalid" | "quote_expired" | "unit_unavailable" | "hold_conflict" | "payment_conflict" | "rate_limited" | "session_expired";
425
- export type JourneyStatus = "active" | "payment_pending" | "operation_pending" | "completed" | "paid_conflict" | "expired";
425
+ /**
426
+ * Every journey status the public API can return, in lifecycle order.
427
+ *
428
+ * These are wire values, not Lapa's internal persisted statuses. The serializer
429
+ * collapses `checkout_started` and `paid` into `payment_pending`, and reports
430
+ * `cancelled` as `expired`. Branch on these; the internal names never arrive.
431
+ */
432
+ export declare const JOURNEY_STATUSES: readonly ["active", "payment_pending", "operation_pending", "completed", "paid_conflict", "expired"];
433
+ export type JourneyStatus = (typeof JOURNEY_STATUSES)[number];
426
434
  export type JourneyConfigurationStatus = "required" | "completed" | "invalid" | "superseded";
427
435
  export type JourneyQuoteStatus = "active" | "expired" | "superseded" | "consumed";
428
436
  export type JourneyHoldStatus = "acquiring" | "active" | "confirmed" | "released" | "expired" | "conflict";
package/dist/types.js CHANGED
@@ -1 +1,15 @@
1
- export {};
1
+ /**
2
+ * Every journey status the public API can return, in lifecycle order.
3
+ *
4
+ * These are wire values, not Lapa's internal persisted statuses. The serializer
5
+ * collapses `checkout_started` and `paid` into `payment_pending`, and reports
6
+ * `cancelled` as `expired`. Branch on these; the internal names never arrive.
7
+ */
8
+ export const JOURNEY_STATUSES = [
9
+ "active",
10
+ "payment_pending",
11
+ "operation_pending",
12
+ "completed",
13
+ "paid_conflict",
14
+ "expired",
15
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grupolapa/desarrollos-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Framework-agnostic TypeScript SDK for Grupo LAPA public desarrollo integrations.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",