autosync_backend2 1.1.9 → 1.1.11

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
@@ -327,7 +327,15 @@ declare const app: Elysia<"", {
327
327
  page: import("@sinclair/typebox").TInteger;
328
328
  size: import("@sinclair/typebox").TInteger;
329
329
  }>;
330
+ id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
331
+ createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
332
+ phone: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
333
+ orderId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
330
334
  state: import("@sinclair/typebox").TOptional<import("elysia/dist/type-system/types").TUnionEnum<["CREATED", "PROGRESSING", "COMPLETE"]>>;
335
+ vin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
336
+ licensePlate: import("@sinclair/typebox").TOptional<import("elysia/dist/type-system/types").TTransform<import("@sinclair/typebox").TString, string>>;
337
+ timeCompleted: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
338
+ model: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
331
339
  }>;
332
340
  readonly "CrmSpPackageServiceModel.create": import("@sinclair/typebox").TObject<{
333
341
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
@@ -3055,7 +3063,15 @@ declare const app: Elysia<"", {
3055
3063
  body: unknown;
3056
3064
  params: {};
3057
3065
  query: {
3066
+ id?: string | undefined;
3067
+ createdAt?: string | undefined;
3068
+ phone?: string | undefined;
3069
+ orderId?: string | undefined;
3058
3070
  state?: "CREATED" | "COMPLETE" | "PROGRESSING" | undefined;
3071
+ vin?: string | undefined;
3072
+ licensePlate?: string | undefined;
3073
+ timeCompleted?: string | undefined;
3074
+ model?: string | undefined;
3059
3075
  pagination: {
3060
3076
  size: number;
3061
3077
  page: number;
package/dist/index.js CHANGED
@@ -143443,7 +143443,7 @@ var logic_default9 = CrmCpOrderServiceLogic;
143443
143443
  var CrmCpOrderLogic;
143444
143444
  ((CrmCpOrderLogic) => {
143445
143445
  CrmCpOrderLogic.select = async (query, user2) => {
143446
- const filter = and(eq(crmCpOrderTable.companyId, user2.companyId), eq(crmCpOrderTable.companyBranchId, user2.branchId).if(user2.kind === "CUSTOMER"), eq(crmCpOrderTable.state, query.state ?? "CREATED").if(query.state));
143446
+ const filter = and(eq(crmCpOrderTable.companyId, user2.companyId), eq(crmCpOrderTable.companyBranchId, user2.branchId).if(user2.kind === "CUSTOMER"), eq(crmCpOrderTable.state, query.state ?? "CREATED").if(query.state), eq(crmCpOrderTable.id, query.id ?? "").if(query.id), softDeletedFilter(crmCpOrderTable), like(crmCpOrderTable.orderId, query.orderId ?? "").if(query.orderId), ilike(techdocVehicleKindTable.name, sql3`%${query.model}%`).if(query.model), eq(crmVehicleTable.createdAt, query.createdAt ?? "").if(query.createdAt), like(crmVehicleTable.licensePlate, sql3`${query.licensePlate}%`).if(query.licensePlate), ilike(crmVehicleTable.vin, sql3`%${query.vin}%`).if(query.vin), like(crmCustomerTable.phoneNumber, sql3`${query.phone}%`).if(query.phone));
143447
143447
  const baseQuery = db_default.select({
143448
143448
  totalCount: totalCountSql,
143449
143449
  order: crmCpOrderTable,
@@ -143453,7 +143453,7 @@ var CrmCpOrderLogic;
143453
143453
  (select count(*) from ${crmCpOrderProductTable} where ${crmCpOrderProductTable.cpOrderId} = ${crmCpOrderTable.id} and ${crmCpOrderProductTable.deletedAt} is null)
143454
143454
  + (select count(*) from ${crmCpOrderServiceTable} where ${crmCpOrderServiceTable.cpOrderId} = ${crmCpOrderTable.id} and ${crmCpOrderServiceTable.deletedAt} is null)
143455
143455
  ) = 0`.as("is_delete_able")
143456
- }).from(crmCpOrderTable).innerJoin(crmVehicleTable, eq(crmVehicleTable.id, crmCpOrderTable.vehicleId)).leftJoin(crmCustomerTable, eq(crmCustomerTable.id, crmCpOrderTable.customerId)).where(filter).$dynamic();
143456
+ }).from(crmCpOrderTable).innerJoin(crmVehicleTable, eq(crmVehicleTable.id, crmCpOrderTable.vehicleId)).leftJoin(crmCustomerTable, eq(crmCustomerTable.id, crmCpOrderTable.customerId)).leftJoin(techdocVehicleKindTable, eq(techdocVehicleKindTable.id, crmVehicleTable.vehicleKindId)).where(filter).$dynamic();
143457
143457
  const result = await pagination_helper_default(baseQuery, query.pagination);
143458
143458
  const content = {
143459
143459
  totalCount: result[0].totalCount,
@@ -143592,7 +143592,15 @@ var CrmCpOrderModel;
143592
143592
  CrmCpOrderModel.select = t.Composite([
143593
143593
  PaginationSchema,
143594
143594
  t.Partial(t.Object({
143595
- state: t.UnionEnum(crmCpOrderStateEnum.enumValues)
143595
+ state: t.UnionEnum(crmCpOrderStateEnum.enumValues),
143596
+ id: t.String({ format: "uuid" }),
143597
+ model: t.String(),
143598
+ phone: t.String(),
143599
+ createdAt: t.String({ format: "date" }),
143600
+ timeCompleted: t.String({ format: "date" }),
143601
+ vin: t.String(),
143602
+ orderId: t.String(),
143603
+ licensePlate: t.Transform(t.String()).Decode((value) => value.toUpperCase()).Encode((value) => value)
143596
143604
  }))
143597
143605
  ]);
143598
143606
  })(CrmCpOrderModel ||= {});
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
1
  {
2
- "name": "autosync_backend2",
3
- "version": "1.1.9",
4
- "module": "src/index.ts",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "test": "echo \"Error: no test specified\" && exit 1",
10
- "dev": "bun run --watch src/index.ts",
11
- "build": "bun build --target=bun ./src/index.ts --outfile=dist/index.js && bun run build:declaration",
12
- "build:declaration": "tsc --emitDeclarationOnly --project tsconfig.types.json",
13
- "db:migrate": "bunx --bun drizzle-kit migrate",
14
- "db:generate": "bunx --bun drizzle-kit generate",
15
- "biome:check": "bunx biome check --write",
16
- "email": "email dev --dir src/lib/emails",
17
- "prepare": "husky"
18
- },
19
- "dependencies": {
20
- "@bogeychan/elysia-logger": "^0.1.8",
21
- "@elysiajs/cors": "^1.3.3",
22
- "@elysiajs/eden": "^1.3.2",
23
- "@elysiajs/swagger": "^1.3.0",
24
- "@react-email/components": "^0.0.41",
25
- "@sinclair/typebox": "^0.34.35",
26
- "@upstash/redis": "^1.35.0",
27
- "better-auth": "^1.2.9",
28
- "drizzle-orm": "^0.44.2",
29
- "drizzle-typebox": "^0.3.3",
30
- "elysia": "^1.3.5",
31
- "exceljs": "^4.4.0",
32
- "fast-xml-parser": "^5.2.5",
33
- "generate-password": "^1.7.1",
34
- "nodemailer": "^7.0.3",
35
- "pg": "^8.16.1",
36
- "pino": "^9.7.0",
37
- "pino-pretty": "^13.0.0",
38
- "react": "^19.1.0",
39
- "react-dom": "^19.1.0",
40
- "xlsx": "^0.18.5"
41
- },
42
- "devDependencies": {
43
- "@biomejs/biome": "1.9.4",
44
- "@types/nodemailer": "^6.4.17",
45
- "@types/pg": "^8.15.4",
46
- "@types/react": "^19.1.8",
47
- "@types/react-dom": "^19.1.6",
48
- "bun-types": "latest",
49
- "drizzle-kit": "^0.31.1",
50
- "husky": "^9.1.7",
51
- "react-email": "^4.0.16"
52
- },
53
- "files": [
54
- "dist/*.js",
55
- "dist/*.d.ts"
56
- ],
57
- "repository": {
58
- "type": "git",
59
- "url": "git+https://github.com/Suld-United/autosync_back_2.git"
60
- },
61
- "packageManager": "pnpm@10.6.3+sha512.bb45e34d50a9a76e858a95837301bfb6bd6d35aea2c5d52094fa497a467c43f5c440103ce2511e9e0a2f89c3d6071baac3358fc68ac6fb75e2ceb3d2736065e6"
2
+ "name": "autosync_backend2",
3
+ "version": "1.1.11",
4
+ "module": "src/index.ts",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "test": "echo \"Error: no test specified\" && exit 1",
10
+ "dev": "bun run --watch src/index.ts",
11
+ "build": "bun build --target=bun ./src/index.ts --outfile=dist/index.js && bun run build:declaration",
12
+ "build:declaration": "tsc --emitDeclarationOnly --project tsconfig.types.json",
13
+ "db:migrate": "bunx --bun drizzle-kit migrate",
14
+ "db:generate": "bunx --bun drizzle-kit generate",
15
+ "biome:check": "bunx biome check --write",
16
+ "email": "email dev --dir src/lib/emails",
17
+ "prepare": "husky"
18
+ },
19
+ "dependencies": {
20
+ "@bogeychan/elysia-logger": "^0.1.8",
21
+ "@elysiajs/cors": "^1.3.3",
22
+ "@elysiajs/eden": "^1.3.2",
23
+ "@elysiajs/swagger": "^1.3.0",
24
+ "@react-email/components": "^0.0.41",
25
+ "@sinclair/typebox": "^0.34.35",
26
+ "@upstash/redis": "^1.35.0",
27
+ "better-auth": "^1.2.9",
28
+ "drizzle-orm": "^0.44.2",
29
+ "drizzle-typebox": "^0.3.3",
30
+ "elysia": "^1.3.5",
31
+ "exceljs": "^4.4.0",
32
+ "fast-xml-parser": "^5.2.5",
33
+ "generate-password": "^1.7.1",
34
+ "nodemailer": "^7.0.3",
35
+ "pg": "^8.16.1",
36
+ "pino": "^9.7.0",
37
+ "pino-pretty": "^13.0.0",
38
+ "react": "^19.1.0",
39
+ "react-dom": "^19.1.0",
40
+ "xlsx": "^0.18.5"
41
+ },
42
+ "devDependencies": {
43
+ "@biomejs/biome": "1.9.4",
44
+ "@types/nodemailer": "^6.4.17",
45
+ "@types/pg": "^8.15.4",
46
+ "@types/react": "^19.1.8",
47
+ "@types/react-dom": "^19.1.6",
48
+ "bun-types": "latest",
49
+ "drizzle-kit": "^0.31.1",
50
+ "husky": "^9.1.7",
51
+ "react-email": "^4.0.16"
52
+ },
53
+ "files": [
54
+ "dist/*.js",
55
+ "dist/*.d.ts"
56
+ ],
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/Suld-United/autosync_back_2.git"
60
+ },
61
+ "packageManager": "pnpm@10.6.3+sha512.bb45e34d50a9a76e858a95837301bfb6bd6d35aea2c5d52094fa497a467c43f5c440103ce2511e9e0a2f89c3d6071baac3358fc68ac6fb75e2ceb3d2736065e6"
62
62
  }