@voyantjs/resources 0.6.7 → 0.6.9

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/routes.d.ts CHANGED
@@ -1057,12 +1057,12 @@ export declare const resourcesRoutes: import("hono/hono-base").HonoBase<Env, {
1057
1057
  data: {
1058
1058
  id: string;
1059
1059
  createdAt: string;
1060
+ createdBy: string | null;
1060
1061
  resourceId: string;
1061
1062
  dateLocal: string;
1062
1063
  startsAt: string | null;
1063
1064
  endsAt: string | null;
1064
1065
  reason: string | null;
1065
- createdBy: string | null;
1066
1066
  } | undefined;
1067
1067
  };
1068
1068
  outputFormat: "json";
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,gBAAgB,kGAO3B,CAAA;AAEF,eAAO,MAAM,0BAA0B,+DAGrC,CAAA;AAEF,eAAO,MAAM,4BAA4B,sGAMvC,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBrB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBzB,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;EAKvC,CAAA;AAEH,eAAO,MAAM,4BAA4B;;EAAgC,CAAA;AAEzE,eAAO,MAAM,gCAAgC;;;EAS1C,CAAA;AAEH,eAAO,MAAM,0BAA0B;;EAKpC,CAAA"}
package/dist/schema.js CHANGED
@@ -33,10 +33,11 @@ export const resources = pgTable("resources", {
33
33
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
34
34
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
35
35
  }, (table) => [
36
- index("idx_resources_supplier").on(table.supplierId),
37
- index("idx_resources_facility").on(table.facilityId),
38
- index("idx_resources_kind").on(table.kind),
39
- index("idx_resources_active").on(table.active),
36
+ index("idx_resources_created").on(table.createdAt),
37
+ index("idx_resources_supplier_created").on(table.supplierId, table.createdAt),
38
+ index("idx_resources_facility_created").on(table.facilityId, table.createdAt),
39
+ index("idx_resources_kind_created").on(table.kind, table.createdAt),
40
+ index("idx_resources_active_created").on(table.active, table.createdAt),
40
41
  ]);
41
42
  export const resourcePools = pgTable("resource_pools", {
42
43
  id: typeId("resource_pools"),
@@ -49,9 +50,10 @@ export const resourcePools = pgTable("resource_pools", {
49
50
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
50
51
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
51
52
  }, (table) => [
52
- index("idx_resource_pools_product").on(table.productId),
53
- index("idx_resource_pools_kind").on(table.kind),
54
- index("idx_resource_pools_active").on(table.active),
53
+ index("idx_resource_pools_created").on(table.createdAt),
54
+ index("idx_resource_pools_product_created").on(table.productId, table.createdAt),
55
+ index("idx_resource_pools_kind_created").on(table.kind, table.createdAt),
56
+ index("idx_resource_pools_active_created").on(table.active, table.createdAt),
55
57
  ]);
56
58
  export const resourcePoolMembers = pgTable("resource_pool_members", {
57
59
  id: typeId("resource_pool_members"),
@@ -63,8 +65,9 @@ export const resourcePoolMembers = pgTable("resource_pool_members", {
63
65
  .references(() => resources.id, { onDelete: "cascade" }),
64
66
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
65
67
  }, (table) => [
68
+ index("idx_resource_pool_members_created").on(table.createdAt),
66
69
  index("idx_resource_pool_members_pool_created").on(table.poolId, table.createdAt),
67
- index("idx_resource_pool_members_resource").on(table.resourceId),
70
+ index("idx_resource_pool_members_resource_created").on(table.resourceId, table.createdAt),
68
71
  ]);
69
72
  export const resourceRequirements = pgTable("resource_requirements", {
70
73
  id: typeId("resource_requirements"),
@@ -81,9 +84,9 @@ export const resourceRequirements = pgTable("resource_requirements", {
81
84
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
82
85
  }, (table) => [
83
86
  index("idx_resource_requirements_pool_priority_created").on(table.poolId, table.priority, table.createdAt),
84
- index("idx_resource_requirements_product").on(table.productId),
85
- index("idx_resource_requirements_rule").on(table.availabilityRuleId),
86
- index("idx_resource_requirements_start_time").on(table.startTimeId),
87
+ index("idx_resource_requirements_product_priority_created").on(table.productId, table.priority, table.createdAt),
88
+ index("idx_resource_requirements_rule_priority_created").on(table.availabilityRuleId, table.priority, table.createdAt),
89
+ index("idx_resource_requirements_start_time_priority_created").on(table.startTimeId, table.priority, table.createdAt),
87
90
  ]);
88
91
  export const resourceSlotAssignments = pgTable("resource_slot_assignments", {
89
92
  id: typeId("resource_slot_assignments"),
@@ -98,9 +101,10 @@ export const resourceSlotAssignments = pgTable("resource_slot_assignments", {
98
101
  notes: text("notes"),
99
102
  }, (table) => [
100
103
  index("idx_resource_slot_assignments_slot_assigned").on(table.slotId, table.assignedAt),
101
- index("idx_resource_slot_assignments_pool").on(table.poolId),
102
- index("idx_resource_slot_assignments_resource").on(table.resourceId),
103
- index("idx_resource_slot_assignments_booking").on(table.bookingId),
104
+ index("idx_resource_slot_assignments_pool_assigned").on(table.poolId, table.assignedAt),
105
+ index("idx_resource_slot_assignments_resource_assigned").on(table.resourceId, table.assignedAt),
106
+ index("idx_resource_slot_assignments_booking_assigned").on(table.bookingId, table.assignedAt),
107
+ index("idx_resource_slot_assignments_status_assigned").on(table.status, table.assignedAt),
104
108
  ]);
105
109
  export const resourceCloseouts = pgTable("resource_closeouts", {
106
110
  id: typeId("resource_closeouts"),
@@ -115,7 +119,7 @@ export const resourceCloseouts = pgTable("resource_closeouts", {
115
119
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
116
120
  }, (table) => [
117
121
  index("idx_resource_closeouts_resource_created").on(table.resourceId, table.createdAt),
118
- index("idx_resource_closeouts_date").on(table.dateLocal),
122
+ index("idx_resource_closeouts_date_created").on(table.dateLocal, table.createdAt),
119
123
  ]);
120
124
  export const resourceAllocations = resourceRequirements;
121
125
  export const resourcesRelations = relations(resources, ({ many }) => ({
package/dist/service.d.ts CHANGED
@@ -347,12 +347,12 @@ export declare const resourcesService: {
347
347
  createCloseout(db: PostgresJsDatabase, data: CreateResourceCloseoutInput): Promise<{
348
348
  id: string;
349
349
  createdAt: Date;
350
+ createdBy: string | null;
350
351
  resourceId: string;
351
352
  dateLocal: string;
352
353
  startsAt: Date | null;
353
354
  endsAt: Date | null;
354
355
  reason: string | null;
355
- createdBy: string | null;
356
356
  } | undefined>;
357
357
  updateCloseout(db: PostgresJsDatabase, id: string, data: UpdateResourceCloseoutInput): Promise<{
358
358
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/resources",
3
- "version": "0.6.7",
3
+ "version": "0.6.9",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,14 +25,14 @@
25
25
  "drizzle-orm": "^0.45.2",
26
26
  "hono": "^4.12.10",
27
27
  "zod": "^4.3.6",
28
- "@voyantjs/core": "0.6.7",
29
- "@voyantjs/db": "0.6.7",
30
- "@voyantjs/hono": "0.6.7"
28
+ "@voyantjs/core": "0.6.9",
29
+ "@voyantjs/db": "0.6.9",
30
+ "@voyantjs/hono": "0.6.9"
31
31
  },
32
32
  "devDependencies": {
33
33
  "typescript": "^6.0.2",
34
- "@voyantjs/availability": "0.6.7",
35
- "@voyantjs/products": "0.6.7",
34
+ "@voyantjs/availability": "0.6.9",
35
+ "@voyantjs/products": "0.6.9",
36
36
  "@voyantjs/voyant-typescript-config": "0.1.0"
37
37
  },
38
38
  "files": [