@voyantjs/bookings 0.101.0 → 0.101.1
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/pricing-ref.d.ts +281 -0
- package/dist/pricing-ref.d.ts.map +1 -1
- package/dist/pricing-ref.js +19 -1
- package/dist/routes.d.ts +14 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/service-public.d.ts +12 -0
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +22 -2
- package/package.json +8 -8
package/dist/pricing-ref.d.ts
CHANGED
|
@@ -689,6 +689,287 @@ export declare const optionUnitTiersRef: import("drizzle-orm/pg-core").PgTableWi
|
|
|
689
689
|
};
|
|
690
690
|
dialect: "pg";
|
|
691
691
|
}>;
|
|
692
|
+
export declare const pricingCategoriesRef: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
693
|
+
name: "pricing_categories";
|
|
694
|
+
schema: undefined;
|
|
695
|
+
columns: {
|
|
696
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
697
|
+
name: string;
|
|
698
|
+
tableName: "pricing_categories";
|
|
699
|
+
dataType: "string";
|
|
700
|
+
columnType: "PgText";
|
|
701
|
+
data: string;
|
|
702
|
+
driverParam: string;
|
|
703
|
+
notNull: true;
|
|
704
|
+
hasDefault: true;
|
|
705
|
+
isPrimaryKey: true;
|
|
706
|
+
isAutoincrement: false;
|
|
707
|
+
hasRuntimeDefault: true;
|
|
708
|
+
enumValues: [string, ...string[]];
|
|
709
|
+
baseColumn: never;
|
|
710
|
+
identity: undefined;
|
|
711
|
+
generated: undefined;
|
|
712
|
+
}, {}, {}>;
|
|
713
|
+
productId: import("drizzle-orm/pg-core").PgColumn<{
|
|
714
|
+
name: "product_id";
|
|
715
|
+
tableName: "pricing_categories";
|
|
716
|
+
dataType: "string";
|
|
717
|
+
columnType: "PgText";
|
|
718
|
+
data: string;
|
|
719
|
+
driverParam: string;
|
|
720
|
+
notNull: false;
|
|
721
|
+
hasDefault: false;
|
|
722
|
+
isPrimaryKey: false;
|
|
723
|
+
isAutoincrement: false;
|
|
724
|
+
hasRuntimeDefault: false;
|
|
725
|
+
enumValues: [string, ...string[]];
|
|
726
|
+
baseColumn: never;
|
|
727
|
+
identity: undefined;
|
|
728
|
+
generated: undefined;
|
|
729
|
+
}, {}, {}>;
|
|
730
|
+
optionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
731
|
+
name: "option_id";
|
|
732
|
+
tableName: "pricing_categories";
|
|
733
|
+
dataType: "string";
|
|
734
|
+
columnType: "PgText";
|
|
735
|
+
data: string;
|
|
736
|
+
driverParam: string;
|
|
737
|
+
notNull: false;
|
|
738
|
+
hasDefault: false;
|
|
739
|
+
isPrimaryKey: false;
|
|
740
|
+
isAutoincrement: false;
|
|
741
|
+
hasRuntimeDefault: false;
|
|
742
|
+
enumValues: [string, ...string[]];
|
|
743
|
+
baseColumn: never;
|
|
744
|
+
identity: undefined;
|
|
745
|
+
generated: undefined;
|
|
746
|
+
}, {}, {}>;
|
|
747
|
+
unitId: import("drizzle-orm/pg-core").PgColumn<{
|
|
748
|
+
name: "unit_id";
|
|
749
|
+
tableName: "pricing_categories";
|
|
750
|
+
dataType: "string";
|
|
751
|
+
columnType: "PgText";
|
|
752
|
+
data: string;
|
|
753
|
+
driverParam: string;
|
|
754
|
+
notNull: false;
|
|
755
|
+
hasDefault: false;
|
|
756
|
+
isPrimaryKey: false;
|
|
757
|
+
isAutoincrement: false;
|
|
758
|
+
hasRuntimeDefault: false;
|
|
759
|
+
enumValues: [string, ...string[]];
|
|
760
|
+
baseColumn: never;
|
|
761
|
+
identity: undefined;
|
|
762
|
+
generated: undefined;
|
|
763
|
+
}, {}, {}>;
|
|
764
|
+
code: import("drizzle-orm/pg-core").PgColumn<{
|
|
765
|
+
name: "code";
|
|
766
|
+
tableName: "pricing_categories";
|
|
767
|
+
dataType: "string";
|
|
768
|
+
columnType: "PgText";
|
|
769
|
+
data: string;
|
|
770
|
+
driverParam: string;
|
|
771
|
+
notNull: false;
|
|
772
|
+
hasDefault: false;
|
|
773
|
+
isPrimaryKey: false;
|
|
774
|
+
isAutoincrement: false;
|
|
775
|
+
hasRuntimeDefault: false;
|
|
776
|
+
enumValues: [string, ...string[]];
|
|
777
|
+
baseColumn: never;
|
|
778
|
+
identity: undefined;
|
|
779
|
+
generated: undefined;
|
|
780
|
+
}, {}, {}>;
|
|
781
|
+
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
782
|
+
name: "name";
|
|
783
|
+
tableName: "pricing_categories";
|
|
784
|
+
dataType: "string";
|
|
785
|
+
columnType: "PgText";
|
|
786
|
+
data: string;
|
|
787
|
+
driverParam: string;
|
|
788
|
+
notNull: true;
|
|
789
|
+
hasDefault: false;
|
|
790
|
+
isPrimaryKey: false;
|
|
791
|
+
isAutoincrement: false;
|
|
792
|
+
hasRuntimeDefault: false;
|
|
793
|
+
enumValues: [string, ...string[]];
|
|
794
|
+
baseColumn: never;
|
|
795
|
+
identity: undefined;
|
|
796
|
+
generated: undefined;
|
|
797
|
+
}, {}, {}>;
|
|
798
|
+
categoryType: import("drizzle-orm/pg-core").PgColumn<{
|
|
799
|
+
name: "category_type";
|
|
800
|
+
tableName: "pricing_categories";
|
|
801
|
+
dataType: "string";
|
|
802
|
+
columnType: "PgText";
|
|
803
|
+
data: string;
|
|
804
|
+
driverParam: string;
|
|
805
|
+
notNull: true;
|
|
806
|
+
hasDefault: false;
|
|
807
|
+
isPrimaryKey: false;
|
|
808
|
+
isAutoincrement: false;
|
|
809
|
+
hasRuntimeDefault: false;
|
|
810
|
+
enumValues: [string, ...string[]];
|
|
811
|
+
baseColumn: never;
|
|
812
|
+
identity: undefined;
|
|
813
|
+
generated: undefined;
|
|
814
|
+
}, {}, {}>;
|
|
815
|
+
seatOccupancy: import("drizzle-orm/pg-core").PgColumn<{
|
|
816
|
+
name: "seat_occupancy";
|
|
817
|
+
tableName: "pricing_categories";
|
|
818
|
+
dataType: "number";
|
|
819
|
+
columnType: "PgInteger";
|
|
820
|
+
data: number;
|
|
821
|
+
driverParam: string | number;
|
|
822
|
+
notNull: true;
|
|
823
|
+
hasDefault: true;
|
|
824
|
+
isPrimaryKey: false;
|
|
825
|
+
isAutoincrement: false;
|
|
826
|
+
hasRuntimeDefault: false;
|
|
827
|
+
enumValues: undefined;
|
|
828
|
+
baseColumn: never;
|
|
829
|
+
identity: undefined;
|
|
830
|
+
generated: undefined;
|
|
831
|
+
}, {}, {}>;
|
|
832
|
+
groupSize: import("drizzle-orm/pg-core").PgColumn<{
|
|
833
|
+
name: "group_size";
|
|
834
|
+
tableName: "pricing_categories";
|
|
835
|
+
dataType: "number";
|
|
836
|
+
columnType: "PgInteger";
|
|
837
|
+
data: number;
|
|
838
|
+
driverParam: string | number;
|
|
839
|
+
notNull: false;
|
|
840
|
+
hasDefault: false;
|
|
841
|
+
isPrimaryKey: false;
|
|
842
|
+
isAutoincrement: false;
|
|
843
|
+
hasRuntimeDefault: false;
|
|
844
|
+
enumValues: undefined;
|
|
845
|
+
baseColumn: never;
|
|
846
|
+
identity: undefined;
|
|
847
|
+
generated: undefined;
|
|
848
|
+
}, {}, {}>;
|
|
849
|
+
isAgeQualified: import("drizzle-orm/pg-core").PgColumn<{
|
|
850
|
+
name: "is_age_qualified";
|
|
851
|
+
tableName: "pricing_categories";
|
|
852
|
+
dataType: "boolean";
|
|
853
|
+
columnType: "PgBoolean";
|
|
854
|
+
data: boolean;
|
|
855
|
+
driverParam: boolean;
|
|
856
|
+
notNull: true;
|
|
857
|
+
hasDefault: true;
|
|
858
|
+
isPrimaryKey: false;
|
|
859
|
+
isAutoincrement: false;
|
|
860
|
+
hasRuntimeDefault: false;
|
|
861
|
+
enumValues: undefined;
|
|
862
|
+
baseColumn: never;
|
|
863
|
+
identity: undefined;
|
|
864
|
+
generated: undefined;
|
|
865
|
+
}, {}, {}>;
|
|
866
|
+
minAge: import("drizzle-orm/pg-core").PgColumn<{
|
|
867
|
+
name: "min_age";
|
|
868
|
+
tableName: "pricing_categories";
|
|
869
|
+
dataType: "number";
|
|
870
|
+
columnType: "PgInteger";
|
|
871
|
+
data: number;
|
|
872
|
+
driverParam: string | number;
|
|
873
|
+
notNull: false;
|
|
874
|
+
hasDefault: false;
|
|
875
|
+
isPrimaryKey: false;
|
|
876
|
+
isAutoincrement: false;
|
|
877
|
+
hasRuntimeDefault: false;
|
|
878
|
+
enumValues: undefined;
|
|
879
|
+
baseColumn: never;
|
|
880
|
+
identity: undefined;
|
|
881
|
+
generated: undefined;
|
|
882
|
+
}, {}, {}>;
|
|
883
|
+
maxAge: import("drizzle-orm/pg-core").PgColumn<{
|
|
884
|
+
name: "max_age";
|
|
885
|
+
tableName: "pricing_categories";
|
|
886
|
+
dataType: "number";
|
|
887
|
+
columnType: "PgInteger";
|
|
888
|
+
data: number;
|
|
889
|
+
driverParam: string | number;
|
|
890
|
+
notNull: false;
|
|
891
|
+
hasDefault: false;
|
|
892
|
+
isPrimaryKey: false;
|
|
893
|
+
isAutoincrement: false;
|
|
894
|
+
hasRuntimeDefault: false;
|
|
895
|
+
enumValues: undefined;
|
|
896
|
+
baseColumn: never;
|
|
897
|
+
identity: undefined;
|
|
898
|
+
generated: undefined;
|
|
899
|
+
}, {}, {}>;
|
|
900
|
+
internalUseOnly: import("drizzle-orm/pg-core").PgColumn<{
|
|
901
|
+
name: "internal_use_only";
|
|
902
|
+
tableName: "pricing_categories";
|
|
903
|
+
dataType: "boolean";
|
|
904
|
+
columnType: "PgBoolean";
|
|
905
|
+
data: boolean;
|
|
906
|
+
driverParam: boolean;
|
|
907
|
+
notNull: true;
|
|
908
|
+
hasDefault: true;
|
|
909
|
+
isPrimaryKey: false;
|
|
910
|
+
isAutoincrement: false;
|
|
911
|
+
hasRuntimeDefault: false;
|
|
912
|
+
enumValues: undefined;
|
|
913
|
+
baseColumn: never;
|
|
914
|
+
identity: undefined;
|
|
915
|
+
generated: undefined;
|
|
916
|
+
}, {}, {}>;
|
|
917
|
+
active: import("drizzle-orm/pg-core").PgColumn<{
|
|
918
|
+
name: "active";
|
|
919
|
+
tableName: "pricing_categories";
|
|
920
|
+
dataType: "boolean";
|
|
921
|
+
columnType: "PgBoolean";
|
|
922
|
+
data: boolean;
|
|
923
|
+
driverParam: boolean;
|
|
924
|
+
notNull: true;
|
|
925
|
+
hasDefault: true;
|
|
926
|
+
isPrimaryKey: false;
|
|
927
|
+
isAutoincrement: false;
|
|
928
|
+
hasRuntimeDefault: false;
|
|
929
|
+
enumValues: undefined;
|
|
930
|
+
baseColumn: never;
|
|
931
|
+
identity: undefined;
|
|
932
|
+
generated: undefined;
|
|
933
|
+
}, {}, {}>;
|
|
934
|
+
sortOrder: import("drizzle-orm/pg-core").PgColumn<{
|
|
935
|
+
name: "sort_order";
|
|
936
|
+
tableName: "pricing_categories";
|
|
937
|
+
dataType: "number";
|
|
938
|
+
columnType: "PgInteger";
|
|
939
|
+
data: number;
|
|
940
|
+
driverParam: string | number;
|
|
941
|
+
notNull: true;
|
|
942
|
+
hasDefault: true;
|
|
943
|
+
isPrimaryKey: false;
|
|
944
|
+
isAutoincrement: false;
|
|
945
|
+
hasRuntimeDefault: false;
|
|
946
|
+
enumValues: undefined;
|
|
947
|
+
baseColumn: never;
|
|
948
|
+
identity: undefined;
|
|
949
|
+
generated: undefined;
|
|
950
|
+
}, {}, {}>;
|
|
951
|
+
metadata: import("drizzle-orm/pg-core").PgColumn<{
|
|
952
|
+
name: "metadata";
|
|
953
|
+
tableName: "pricing_categories";
|
|
954
|
+
dataType: "json";
|
|
955
|
+
columnType: "PgJsonb";
|
|
956
|
+
data: Record<string, unknown>;
|
|
957
|
+
driverParam: unknown;
|
|
958
|
+
notNull: false;
|
|
959
|
+
hasDefault: false;
|
|
960
|
+
isPrimaryKey: false;
|
|
961
|
+
isAutoincrement: false;
|
|
962
|
+
hasRuntimeDefault: false;
|
|
963
|
+
enumValues: undefined;
|
|
964
|
+
baseColumn: never;
|
|
965
|
+
identity: undefined;
|
|
966
|
+
generated: undefined;
|
|
967
|
+
}, {}, {
|
|
968
|
+
$type: Record<string, unknown>;
|
|
969
|
+
}>;
|
|
970
|
+
};
|
|
971
|
+
dialect: "pg";
|
|
972
|
+
}>;
|
|
692
973
|
export declare const departurePriceOverridesRef: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
693
974
|
name: "departure_price_overrides";
|
|
694
975
|
schema: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-ref.d.ts","sourceRoot":"","sources":["../src/pricing-ref.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ3B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9B,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAalC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB/B,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASrC,CAAA"}
|
package/dist/pricing-ref.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { typeId, typeIdRef } from "@voyantjs/db/lib/typeid-column";
|
|
2
|
-
import { boolean, integer, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
2
|
+
import { boolean, integer, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
3
3
|
export const priceCatalogsRef = pgTable("price_catalogs", {
|
|
4
4
|
id: typeId("price_catalogs").primaryKey(),
|
|
5
5
|
code: text("code").notNull(),
|
|
@@ -47,6 +47,24 @@ export const optionUnitTiersRef = pgTable("option_unit_tiers", {
|
|
|
47
47
|
active: boolean("active").notNull().default(true),
|
|
48
48
|
sortOrder: integer("sort_order").notNull().default(0),
|
|
49
49
|
});
|
|
50
|
+
export const pricingCategoriesRef = pgTable("pricing_categories", {
|
|
51
|
+
id: typeId("pricing_categories").primaryKey(),
|
|
52
|
+
productId: text("product_id"),
|
|
53
|
+
optionId: text("option_id"),
|
|
54
|
+
unitId: text("unit_id"),
|
|
55
|
+
code: text("code"),
|
|
56
|
+
name: text("name").notNull(),
|
|
57
|
+
categoryType: text("category_type").notNull(),
|
|
58
|
+
seatOccupancy: integer("seat_occupancy").notNull().default(1),
|
|
59
|
+
groupSize: integer("group_size"),
|
|
60
|
+
isAgeQualified: boolean("is_age_qualified").notNull().default(false),
|
|
61
|
+
minAge: integer("min_age"),
|
|
62
|
+
maxAge: integer("max_age"),
|
|
63
|
+
internalUseOnly: boolean("internal_use_only").notNull().default(false),
|
|
64
|
+
active: boolean("active").notNull().default(true),
|
|
65
|
+
sortOrder: integer("sort_order").notNull().default(0),
|
|
66
|
+
metadata: jsonb("metadata").$type(),
|
|
67
|
+
});
|
|
50
68
|
export const departurePriceOverridesRef = pgTable("departure_price_overrides", {
|
|
51
69
|
id: typeId("departure_price_overrides").primaryKey(),
|
|
52
70
|
departureId: text("departure_id").notNull(),
|
package/dist/routes.d.ts
CHANGED
|
@@ -185,6 +185,18 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
185
185
|
baseSellAmountCents: number | null;
|
|
186
186
|
isDefault: boolean;
|
|
187
187
|
}[];
|
|
188
|
+
pricingCategories: never[] | {
|
|
189
|
+
id: string;
|
|
190
|
+
name: string;
|
|
191
|
+
code: string | null;
|
|
192
|
+
categoryType: string;
|
|
193
|
+
minAge: number | null;
|
|
194
|
+
maxAge: number | null;
|
|
195
|
+
metadata: {
|
|
196
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
197
|
+
} | null;
|
|
198
|
+
sortOrder: number;
|
|
199
|
+
}[];
|
|
188
200
|
unitPrices: {
|
|
189
201
|
sellAmountCents: number | null;
|
|
190
202
|
tiers: {
|
|
@@ -197,9 +209,11 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
|
|
|
197
209
|
}[];
|
|
198
210
|
id: string;
|
|
199
211
|
optionPriceRuleId: string;
|
|
212
|
+
optionId: string;
|
|
200
213
|
unitId: string;
|
|
201
214
|
unitName: string;
|
|
202
215
|
unitType: string | null;
|
|
216
|
+
occupancyMax: number | null;
|
|
203
217
|
pricingCategoryId: string | null;
|
|
204
218
|
pricingMode: string;
|
|
205
219
|
minQuantity: number | null;
|
package/dist/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAE3B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAe/B,MAAM,yBAAyB,CAAA;AAehC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAkBvB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AAgN7C,UAAU,iCAAiC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,yBAAyB,EAAE,CAAA;IACjC,SAAS,EAAE,iCAAiC,EAAE,CAAA;IAC9C,QAAQ,EAAE;QACR,UAAU,EAAE;YACV,UAAU,EAAE,MAAM,CAAA;YAClB,EAAE,EAAE,MAAM,CAAA;SACX,GAAG,IAAI,CAAA;KACT,CAAA;CACF;AAED,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE;QACJ,QAAQ,EAAE,sBAAsB,CAAA;QAChC,cAAc,EAAE,yBAAyB,CAAA;KAC1C,CAAA;CACF;AAwDD,KAAK,qBAAqB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE3D,i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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDA0jDa,CAAA;AAEvC,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA;AAChD,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;CAQpB,CAAA"}
|
package/dist/service-public.d.ts
CHANGED
|
@@ -48,6 +48,16 @@ export declare function resolveSessionPricingSnapshot(db: PostgresJsDatabase, pr
|
|
|
48
48
|
baseSellAmountCents: number | null;
|
|
49
49
|
isDefault: boolean;
|
|
50
50
|
}[];
|
|
51
|
+
pricingCategories: never[] | {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
code: string | null;
|
|
55
|
+
categoryType: string;
|
|
56
|
+
minAge: number | null;
|
|
57
|
+
maxAge: number | null;
|
|
58
|
+
metadata: Record<string, unknown> | null;
|
|
59
|
+
sortOrder: number;
|
|
60
|
+
}[];
|
|
51
61
|
unitPrices: {
|
|
52
62
|
sellAmountCents: number | null;
|
|
53
63
|
tiers: {
|
|
@@ -60,9 +70,11 @@ export declare function resolveSessionPricingSnapshot(db: PostgresJsDatabase, pr
|
|
|
60
70
|
}[];
|
|
61
71
|
id: string;
|
|
62
72
|
optionPriceRuleId: string;
|
|
73
|
+
optionId: string;
|
|
63
74
|
unitId: string;
|
|
64
75
|
unitName: string;
|
|
65
76
|
unitType: string | null;
|
|
77
|
+
occupancyMax: number | null;
|
|
66
78
|
pricingCategoryId: string | null;
|
|
67
79
|
pricingMode: string;
|
|
68
80
|
minQuantity: number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-public.d.ts","sourceRoot":"","sources":["../src/service-public.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"service-public.d.ts","sourceRoot":"","sources":["../src/service-public.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAWjE,OAAO,KAAK,EAEV,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,oBAAoB,CAAA;AAY3B,OAAO,KAAK,EACV,kCAAkC,EAClC,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,gCAAgC,EAEhC,+BAA+B,EAC/B,+BAA+B,EAC/B,oCAAoC,EACrC,MAAM,wBAAwB,CAAA;AAG/B;;;;;;;GAOG;AACH,MAAM,WAAW,8BAA8B;IAC7C,oBAAoB,CAAC,EAAE,2BAA2B,CAAA;IAClD,qBAAqB,CAAC,EAAE,4BAA4B,CAAA;CACrD;AAisBD;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE;IACL,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,mHA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RulesRef, optionUnitPriceRulesRef, optionUnitTiersRef, priceCatalogsRef, } from "./pricing-ref.js";
|
|
2
|
+
import { departurePriceOverridesRef, optionPriceRulesRef, optionUnitPriceRulesRef, optionUnitTiersRef, priceCatalogsRef, pricingCategoriesRef, } from "./pricing-ref.js";
|
|
3
3
|
import { optionUnitsRef, productOptionsRef, productsRef } from "./products-ref.js";
|
|
4
4
|
import { bookingAllocations, bookingDocuments, bookingFulfillments, bookingItems, bookingItemTravelers, bookingSessionStates, bookings, bookingTravelers, } from "./schema.js";
|
|
5
5
|
import { bookingsService } from "./service.js";
|
|
@@ -538,9 +538,11 @@ export async function resolveSessionPricingSnapshot(db, productId, input) {
|
|
|
538
538
|
.select({
|
|
539
539
|
id: optionUnitPriceRulesRef.id,
|
|
540
540
|
optionPriceRuleId: optionUnitPriceRulesRef.optionPriceRuleId,
|
|
541
|
+
optionId: optionUnitPriceRulesRef.optionId,
|
|
541
542
|
unitId: optionUnitPriceRulesRef.unitId,
|
|
542
543
|
unitName: optionUnitsRef.name,
|
|
543
544
|
unitType: optionUnitsRef.unitType,
|
|
545
|
+
occupancyMax: optionUnitsRef.occupancyMax,
|
|
544
546
|
pricingCategoryId: optionUnitPriceRulesRef.pricingCategoryId,
|
|
545
547
|
pricingMode: optionUnitPriceRulesRef.pricingMode,
|
|
546
548
|
sellAmountCents: optionUnitPriceRulesRef.sellAmountCents,
|
|
@@ -552,7 +554,8 @@ export async function resolveSessionPricingSnapshot(db, productId, input) {
|
|
|
552
554
|
.where(and(inArray(optionUnitPriceRulesRef.optionId, optionIds), eq(optionUnitPriceRulesRef.active, true)))
|
|
553
555
|
.orderBy(asc(optionUnitPriceRulesRef.sortOrder), asc(optionUnitPriceRulesRef.createdAt)),
|
|
554
556
|
]);
|
|
555
|
-
const
|
|
557
|
+
const pricingCategoryIds = Array.from(new Set(unitPrices.flatMap((row) => (row.pricingCategoryId ? [row.pricingCategoryId] : []))));
|
|
558
|
+
const [tiers, departureOverrides, pricingCategories] = await Promise.all([
|
|
556
559
|
unitPrices.length > 0
|
|
557
560
|
? db
|
|
558
561
|
.select({
|
|
@@ -576,6 +579,22 @@ export async function resolveSessionPricingSnapshot(db, productId, input) {
|
|
|
576
579
|
.from(departurePriceOverridesRef)
|
|
577
580
|
.where(and(eq(departurePriceOverridesRef.departureId, input.departureId), eq(departurePriceOverridesRef.priceCatalogId, catalog.id), eq(departurePriceOverridesRef.active, true)))
|
|
578
581
|
: Promise.resolve([]),
|
|
582
|
+
pricingCategoryIds.length > 0
|
|
583
|
+
? db
|
|
584
|
+
.select({
|
|
585
|
+
id: pricingCategoriesRef.id,
|
|
586
|
+
name: pricingCategoriesRef.name,
|
|
587
|
+
code: pricingCategoriesRef.code,
|
|
588
|
+
categoryType: pricingCategoriesRef.categoryType,
|
|
589
|
+
minAge: pricingCategoriesRef.minAge,
|
|
590
|
+
maxAge: pricingCategoriesRef.maxAge,
|
|
591
|
+
metadata: pricingCategoriesRef.metadata,
|
|
592
|
+
sortOrder: pricingCategoriesRef.sortOrder,
|
|
593
|
+
})
|
|
594
|
+
.from(pricingCategoriesRef)
|
|
595
|
+
.where(and(inArray(pricingCategoriesRef.id, pricingCategoryIds), eq(pricingCategoriesRef.active, true)))
|
|
596
|
+
.orderBy(asc(pricingCategoriesRef.sortOrder), asc(pricingCategoriesRef.name))
|
|
597
|
+
: Promise.resolve([]),
|
|
579
598
|
]);
|
|
580
599
|
const tiersByUnitPriceId = new Map();
|
|
581
600
|
for (const tier of tiers) {
|
|
@@ -588,6 +607,7 @@ export async function resolveSessionPricingSnapshot(db, productId, input) {
|
|
|
588
607
|
catalog: catalog,
|
|
589
608
|
options: options,
|
|
590
609
|
rules: rules,
|
|
610
|
+
pricingCategories: pricingCategories,
|
|
591
611
|
unitPrices: unitPrices.map((row) => {
|
|
592
612
|
const override = departureOverrideByUnitId.get(row.unitId);
|
|
593
613
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/bookings",
|
|
3
|
-
"version": "0.101.
|
|
3
|
+
"version": "0.101.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -84,16 +84,16 @@
|
|
|
84
84
|
"drizzle-orm": "^0.45.2",
|
|
85
85
|
"hono": "^4.12.10",
|
|
86
86
|
"zod": "^4.3.6",
|
|
87
|
-
"@voyantjs/action-ledger": "0.101.
|
|
88
|
-
"@voyantjs/bookings-contracts": "0.101.
|
|
89
|
-
"@voyantjs/core": "0.101.
|
|
90
|
-
"@voyantjs/db": "0.101.
|
|
91
|
-
"@voyantjs/hono": "0.101.
|
|
92
|
-
"@voyantjs/utils": "0.101.
|
|
87
|
+
"@voyantjs/action-ledger": "0.101.1",
|
|
88
|
+
"@voyantjs/bookings-contracts": "0.101.1",
|
|
89
|
+
"@voyantjs/core": "0.101.1",
|
|
90
|
+
"@voyantjs/db": "0.101.1",
|
|
91
|
+
"@voyantjs/hono": "0.101.1",
|
|
92
|
+
"@voyantjs/utils": "0.101.1"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"typescript": "^6.0.2",
|
|
96
|
-
"@voyantjs/products": "0.101.
|
|
96
|
+
"@voyantjs/products": "0.101.1",
|
|
97
97
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
98
98
|
},
|
|
99
99
|
"files": [
|