autosync_backend2 1.2.31 → 1.2.32

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
@@ -1371,6 +1371,7 @@ export declare const app: Elysia<"", {
1371
1371
  oldId: number | null;
1372
1372
  }[];
1373
1373
  };
1374
+ 401: "Session not found";
1374
1375
  422: {
1375
1376
  type: "validation";
1376
1377
  on: string;
@@ -1407,6 +1408,7 @@ export declare const app: Elysia<"", {
1407
1408
  oldId: number | null;
1408
1409
  description: string | null;
1409
1410
  };
1411
+ 401: "Session not found";
1410
1412
  422: {
1411
1413
  type: "validation";
1412
1414
  on: string;
@@ -1445,6 +1447,7 @@ export declare const app: Elysia<"", {
1445
1447
  deletedAt: string | null;
1446
1448
  oldId: number | null;
1447
1449
  };
1450
+ 401: "Session not found";
1448
1451
  404: "Агуулах олдсонгүй.";
1449
1452
  422: {
1450
1453
  type: "validation";
@@ -1470,6 +1473,7 @@ export declare const app: Elysia<"", {
1470
1473
  query: unknown;
1471
1474
  headers: unknown;
1472
1475
  response: {
1476
+ 401: "Session not found";
1473
1477
  422: {
1474
1478
  type: "validation";
1475
1479
  on: string;
@@ -4394,6 +4398,7 @@ export declare const app: Elysia<"", {
4394
4398
  timeCompleted: string | null;
4395
4399
  km: number;
4396
4400
  type: "Service" | "ProductSell";
4401
+ description: string | null;
4397
4402
  id: string;
4398
4403
  createdAt: string;
4399
4404
  updatedAt: string;
@@ -4513,6 +4518,7 @@ export declare const app: Elysia<"", {
4513
4518
  timeCompleted: string | null;
4514
4519
  km: number;
4515
4520
  type: "Service" | "ProductSell";
4521
+ description: string | null;
4516
4522
  id: string;
4517
4523
  createdAt: string;
4518
4524
  updatedAt: string;
@@ -4625,6 +4631,7 @@ export declare const app: Elysia<"", {
4625
4631
  companyId: string;
4626
4632
  deletedAt: string | null;
4627
4633
  oldId: number | null;
4634
+ description: string | null;
4628
4635
  isNoat: boolean | null;
4629
4636
  companyBranchId: string;
4630
4637
  customerId: string | null;
@@ -4728,6 +4735,7 @@ export declare const app: Elysia<"", {
4728
4735
  timeCompleted: string | null;
4729
4736
  km: number;
4730
4737
  type: "Service" | "ProductSell";
4738
+ description: string | null;
4731
4739
  id: string;
4732
4740
  createdAt: string;
4733
4741
  updatedAt: string;
@@ -4771,6 +4779,7 @@ export declare const app: Elysia<"", {
4771
4779
  type?: "Service" | "ProductSell" | undefined;
4772
4780
  companyId?: string | undefined;
4773
4781
  oldId?: number | null | undefined;
4782
+ description?: string | null | undefined;
4774
4783
  isNoat?: boolean | null | undefined;
4775
4784
  companyBranchId?: string | undefined;
4776
4785
  customerId?: string | null | undefined;
@@ -4797,6 +4806,7 @@ export declare const app: Elysia<"", {
4797
4806
  timeCompleted: string | null;
4798
4807
  km: number;
4799
4808
  type: "Service" | "ProductSell";
4809
+ description: string | null;
4800
4810
  id: string;
4801
4811
  createdAt: string;
4802
4812
  updatedAt: string;
@@ -7246,6 +7256,7 @@ export declare const app: Elysia<"", {
7246
7256
  timeCompleted: string | null;
7247
7257
  km: number;
7248
7258
  type: "Service" | "ProductSell";
7259
+ description: string | null;
7249
7260
  id: string;
7250
7261
  createdAt: string;
7251
7262
  updatedAt: string;
@@ -7484,6 +7495,7 @@ export declare const app: Elysia<"", {
7484
7495
  timeCompleted: string | null;
7485
7496
  km: number;
7486
7497
  type: "Service" | "ProductSell";
7498
+ description: string | null;
7487
7499
  id: string;
7488
7500
  createdAt: string;
7489
7501
  updatedAt: string;
package/dist/index.js CHANGED
@@ -142906,7 +142906,8 @@ var crmCpOrderTable = crmSchema.table("cp_order", {
142906
142906
  mode: "string"
142907
142907
  }),
142908
142908
  km: integer2().notNull().default(0),
142909
- type: crmCpOrderTypeEnum().default("Service").notNull()
142909
+ type: crmCpOrderTypeEnum().default("Service").notNull(),
142910
+ description: text()
142910
142911
  }, (t2) => [
142911
142912
  index().on(t2.companyId),
142912
142913
  index().on(t2.companyBranchId),
@@ -154096,7 +154097,7 @@ var WarehouseWarehouseLogic;
154096
154097
  ((WarehouseWarehouseLogic) => {
154097
154098
  WarehouseWarehouseLogic.select = async (query, user2) => {
154098
154099
  const columns = getTableColumns(warehouseWarehouseTable);
154099
- const filter = and(eq(warehouseWarehouseTable.companyId, user2.companyId), eq(warehouseWarehouseTable.branchId, query.branchId ?? user2.branchId).if(query.branchId && user2.kind === "COMPANY_ADMIN"), softDeletedFilter(warehouseWarehouseTable));
154100
+ const filter = and(eq(warehouseWarehouseTable.companyId, user2.companyId), eq(warehouseWarehouseTable.branchId, query.branchId ?? user2.branchId), softDeletedFilter(warehouseWarehouseTable));
154100
154101
  const baseQuery = db_default.select({
154101
154102
  ...columns,
154102
154103
  totalCount: totalCountSql
@@ -154156,8 +154157,10 @@ var model_default24 = WarehouseWarehouseModel;
154156
154157
  var warehouseRoutes = new Elysia({
154157
154158
  prefix: "/warehouse",
154158
154159
  tags: ["Warehouse"]
154159
- }).use(better_auth_default).guard({ userKind: "COMPANY_ADMIN" }).get("/", async ({ query, user: user2 }) => logic_default24.select(query, user2), {
154160
+ }).use(better_auth_default).guard({ auth: true }).get("/", async ({ query, user: user2 }) => logic_default24.select(query, user2), {
154160
154161
  query: model_default24.select
154162
+ }).guard({
154163
+ userKind: "COMPANY_ADMIN"
154161
154164
  }).post("/", async ({ body, user: user2 }) => logic_default24.create(body, user2), {
154162
154165
  body: model_default24.create
154163
154166
  }).guard({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autosync_backend2",
3
- "version": "1.2.31",
3
+ "version": "1.2.32",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",