@shophost/rest-api 0.1.15 → 0.1.17

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.
Files changed (40) hide show
  1. package/package.json +9 -6
  2. package/src/contracts/cart.contract.d.ts +6 -140
  3. package/src/contracts/customers.contract.d.ts +3 -3
  4. package/src/contracts/index.d.ts +100 -515
  5. package/src/contracts/manufacturers.contract.d.ts +15 -15
  6. package/src/contracts/orders.contract.d.ts +13 -13
  7. package/src/contracts/organizations.contract.d.ts +3 -3
  8. package/src/contracts/product-categories.contract.d.ts +18 -18
  9. package/src/contracts/products.contract.d.ts +24 -292
  10. package/src/contracts/shipping-methods.contract.d.ts +6 -6
  11. package/src/contracts/shipping.contract.d.ts +15 -28
  12. package/src/db/__generated__/client/internal/class.js +3 -3
  13. package/src/db/__generated__/client/internal/class.js.map +1 -1
  14. package/src/db/__generated__/client/internal/prismaNamespace.d.ts +11 -11
  15. package/src/db/__generated__/client/internal/prismaNamespace.js +4 -4
  16. package/src/db/__generated__/client/libquery_engine-darwin-arm64.dylib.node +0 -0
  17. package/src/db/__generated__/client/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  18. package/src/db/__generated__/client/libquery_engine-rhel-openssl-3.0.x.so.node +0 -0
  19. package/src/lib/better-auth.lib.d.ts +1 -10202
  20. package/src/lib/better-auth.lib.js +0 -1
  21. package/src/lib/better-auth.lib.js.map +1 -1
  22. package/src/routers/cart.router.d.ts +6 -140
  23. package/src/routers/manufacturer.router.d.ts +15 -15
  24. package/src/routers/order.router.d.ts +13 -13
  25. package/src/routers/organization.router.d.ts +3 -3
  26. package/src/routers/product-category.router.d.ts +18 -18
  27. package/src/routers/product.router.d.ts +24 -292
  28. package/src/routers/shipping-method.router.d.ts +6 -6
  29. package/src/routers/shipping.router.d.ts +15 -28
  30. package/src/schemas/address.schema.d.ts +9 -16
  31. package/src/schemas/cart.schema.d.ts +6 -140
  32. package/src/schemas/manufacturer.schema.d.ts +3 -3
  33. package/src/schemas/order.schema.d.ts +3 -3
  34. package/src/schemas/organization.schema.d.ts +3 -3
  35. package/src/schemas/params.schema.d.ts +3 -3
  36. package/src/schemas/product-category.schema.d.ts +6 -6
  37. package/src/schemas/product-modifier.schema.d.ts +3 -3
  38. package/src/schemas/product.schema.d.ts +9 -143
  39. package/src/schemas/recipient.schema.d.ts +3 -3
  40. package/src/schemas/shipping-method.schema.d.ts +3 -3
@@ -131,7 +131,7 @@ export declare const manufacturersContract: {
131
131
  filename: string;
132
132
  url: string;
133
133
  } | null | undefined;
134
- }>, z.ZodObject<z.objectUtil.extendShape<Omit<{
134
+ }>, z.ZodObject<Omit<{
135
135
  id: z.ZodString;
136
136
  name: z.ZodString;
137
137
  logo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -164,9 +164,9 @@ export declare const manufacturersContract: {
164
164
  locale: string;
165
165
  about?: string | null | undefined;
166
166
  }>, "many">>;
167
- }, "translations">, {
167
+ }, "translations"> & {
168
168
  about: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
169
- }>, "strip", z.ZodTypeAny, {
169
+ }, "strip", z.ZodTypeAny, {
170
170
  id: string;
171
171
  createdAt: Date;
172
172
  name: string;
@@ -505,11 +505,11 @@ export declare const manufacturersContract: {
505
505
  };
506
506
  getManufacturer: {
507
507
  method: "GET";
508
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
508
+ pathParams: z.ZodObject<{
509
509
  organizationId: z.ZodString;
510
- }, {
510
+ } & {
511
511
  id: z.ZodString;
512
- }>, "strip", z.ZodTypeAny, {
512
+ }, "strip", z.ZodTypeAny, {
513
513
  id: string;
514
514
  organizationId: string;
515
515
  }, {
@@ -599,7 +599,7 @@ export declare const manufacturersContract: {
599
599
  filename: string;
600
600
  url: string;
601
601
  } | null | undefined;
602
- }>, z.ZodObject<z.objectUtil.extendShape<Omit<{
602
+ }>, z.ZodObject<Omit<{
603
603
  id: z.ZodString;
604
604
  name: z.ZodString;
605
605
  logo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -632,9 +632,9 @@ export declare const manufacturersContract: {
632
632
  locale: string;
633
633
  about?: string | null | undefined;
634
634
  }>, "many">>;
635
- }, "translations">, {
635
+ }, "translations"> & {
636
636
  about: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
637
- }>, "strip", z.ZodTypeAny, {
637
+ }, "strip", z.ZodTypeAny, {
638
638
  id: string;
639
639
  createdAt: Date;
640
640
  name: string;
@@ -684,11 +684,11 @@ export declare const manufacturersContract: {
684
684
  updateManufacturer: {
685
685
  description: "Updates an existing manufacturer";
686
686
  method: "PUT";
687
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
687
+ pathParams: z.ZodObject<{
688
688
  organizationId: z.ZodString;
689
- }, {
689
+ } & {
690
690
  id: z.ZodString;
691
- }>, "strip", z.ZodTypeAny, {
691
+ }, "strip", z.ZodTypeAny, {
692
692
  id: string;
693
693
  organizationId: string;
694
694
  }, {
@@ -871,11 +871,11 @@ export declare const manufacturersContract: {
871
871
  deleteManufacturer: {
872
872
  description: "Soft deletes a manufacturer";
873
873
  method: "DELETE";
874
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
874
+ pathParams: z.ZodObject<{
875
875
  organizationId: z.ZodString;
876
- }, {
876
+ } & {
877
877
  id: z.ZodString;
878
- }>, "strip", z.ZodTypeAny, {
878
+ }, "strip", z.ZodTypeAny, {
879
879
  id: string;
880
880
  organizationId: string;
881
881
  }, {
@@ -1078,7 +1078,7 @@ export declare const ordersContract: {
1078
1078
  organizationId: string;
1079
1079
  }>;
1080
1080
  summary: "Create Order";
1081
- body: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
1081
+ body: z.ZodEffects<z.ZodObject<{
1082
1082
  items: z.ZodArray<z.ZodObject<{
1083
1083
  productId: z.ZodString;
1084
1084
  quantity: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
@@ -1129,7 +1129,7 @@ export declare const ordersContract: {
1129
1129
  quantity?: number | undefined;
1130
1130
  }>, "many">;
1131
1131
  shippingMethodId: z.ZodOptional<z.ZodString>;
1132
- }, {
1132
+ } & {
1133
1133
  fulfilmentMethod: z.ZodDefault<z.ZodEnum<["delivery", "pickup"]>>;
1134
1134
  payment: z.ZodObject<{
1135
1135
  provider: z.ZodEnum<["stripe", "revolut", "payu", "not_applicable"]>;
@@ -1142,7 +1142,7 @@ export declare const ordersContract: {
1142
1142
  method: "card" | "blik" | "cash_on_delivery" | "paypal";
1143
1143
  }>;
1144
1144
  checkoutBaseUrl: z.ZodString;
1145
- }>, "strip", z.ZodTypeAny, {
1145
+ }, "strip", z.ZodTypeAny, {
1146
1146
  items: {
1147
1147
  modifierGroups: {
1148
1148
  id: string;
@@ -2225,11 +2225,11 @@ export declare const ordersContract: {
2225
2225
  };
2226
2226
  getOrder: {
2227
2227
  method: "GET";
2228
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
2228
+ pathParams: z.ZodObject<{
2229
2229
  organizationId: z.ZodString;
2230
- }, {
2230
+ } & {
2231
2231
  id: z.ZodString;
2232
- }>, "strip", z.ZodTypeAny, {
2232
+ }, "strip", z.ZodTypeAny, {
2233
2233
  id: string;
2234
2234
  organizationId: string;
2235
2235
  }, {
@@ -3030,13 +3030,13 @@ export declare const ordersContract: {
3030
3030
  updateStatus: {
3031
3031
  description: "Changes the status of an existing order based on the operation";
3032
3032
  method: "POST";
3033
- pathParams: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
3033
+ pathParams: z.ZodObject<{
3034
3034
  organizationId: z.ZodString;
3035
- }, {
3035
+ } & {
3036
3036
  id: z.ZodString;
3037
- }>, {
3037
+ } & {
3038
3038
  operation: z.ZodEnum<["draft", "pending", "accepted", "ready-for-dispatch", "dispatched", "completed", "cancelled"]>;
3039
- }>, "strip", z.ZodTypeAny, {
3039
+ }, "strip", z.ZodTypeAny, {
3040
3040
  id: string;
3041
3041
  organizationId: string;
3042
3042
  operation: "pending" | "draft" | "accepted" | "ready-for-dispatch" | "dispatched" | "completed" | "cancelled";
@@ -3850,11 +3850,11 @@ export declare const ordersContract: {
3850
3850
  deleteOrder: {
3851
3851
  description: "Soft deletes order";
3852
3852
  method: "DELETE";
3853
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
3853
+ pathParams: z.ZodObject<{
3854
3854
  organizationId: z.ZodString;
3855
- }, {
3855
+ } & {
3856
3856
  id: z.ZodString;
3857
- }>, "strip", z.ZodTypeAny, {
3857
+ }, "strip", z.ZodTypeAny, {
3858
3858
  id: string;
3859
3859
  organizationId: string;
3860
3860
  }, {
@@ -915,7 +915,7 @@ export declare const organizationsContract: {
915
915
  description: "Creates a new organization";
916
916
  method: "POST";
917
917
  summary: "Create Organization";
918
- body: z.ZodObject<z.objectUtil.extendShape<Pick<{
918
+ body: z.ZodObject<Pick<{
919
919
  id: z.ZodString;
920
920
  name: z.ZodString;
921
921
  phone: z.ZodString;
@@ -1117,7 +1117,7 @@ export declare const organizationsContract: {
1117
1117
  filename: string;
1118
1118
  url: string;
1119
1119
  }>>>;
1120
- }, "email" | "name" | "phone" | "logoFile">, {
1120
+ }, "email" | "name" | "phone" | "logoFile"> & {
1121
1121
  logoId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1122
1122
  address: z.ZodObject<Pick<{
1123
1123
  id: z.ZodString;
@@ -1149,7 +1149,7 @@ export declare const organizationsContract: {
1149
1149
  addressLineTwo?: string | null | undefined;
1150
1150
  zipCode?: string | undefined;
1151
1151
  }>;
1152
- }>, "strip", z.ZodTypeAny, {
1152
+ }, "strip", z.ZodTypeAny, {
1153
1153
  name: string;
1154
1154
  phone: string;
1155
1155
  address: {
@@ -139,7 +139,7 @@ export declare const productCategoriesContract: {
139
139
  url: string;
140
140
  } | null | undefined;
141
141
  publishedAt?: Date | null | undefined;
142
- }>, z.ZodObject<z.objectUtil.extendShape<Omit<{
142
+ }>, z.ZodObject<Omit<{
143
143
  id: z.ZodString;
144
144
  slug: z.ZodString;
145
145
  image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -176,10 +176,10 @@ export declare const productCategoriesContract: {
176
176
  title?: string | undefined;
177
177
  description?: string | null | undefined;
178
178
  }>, "many">;
179
- }, "translations">, {
179
+ }, "translations"> & {
180
180
  title: z.ZodDefault<z.ZodString>;
181
181
  description: z.ZodDefault<z.ZodString>;
182
- }>, "strip", z.ZodTypeAny, {
182
+ }, "strip", z.ZodTypeAny, {
183
183
  id: string;
184
184
  slug: string;
185
185
  createdAt: Date;
@@ -326,7 +326,7 @@ export declare const productCategoriesContract: {
326
326
  organizationId: string;
327
327
  }>;
328
328
  summary: "Create Product Category";
329
- body: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<Pick<{
329
+ body: z.ZodEffects<z.ZodObject<Pick<{
330
330
  id: z.ZodString;
331
331
  slug: z.ZodString;
332
332
  image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -363,10 +363,10 @@ export declare const productCategoriesContract: {
363
363
  title?: string | undefined;
364
364
  description?: string | null | undefined;
365
365
  }>, "many">;
366
- }, "translations" | "slug" | "image">, {
366
+ }, "translations" | "slug" | "image"> & {
367
367
  defaultLocale: z.ZodString;
368
368
  imageId: z.ZodOptional<z.ZodString>;
369
- }>, "strip", z.ZodTypeAny, {
369
+ }, "strip", z.ZodTypeAny, {
370
370
  translations: {
371
371
  locale: string;
372
372
  title: string;
@@ -550,11 +550,11 @@ export declare const productCategoriesContract: {
550
550
  getProductCategory: {
551
551
  description: "Fetches a specific product category by ID";
552
552
  method: "GET";
553
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
553
+ pathParams: z.ZodObject<{
554
554
  organizationId: z.ZodString;
555
- }, {
555
+ } & {
556
556
  id: z.ZodString;
557
- }>, "strip", z.ZodTypeAny, {
557
+ }, "strip", z.ZodTypeAny, {
558
558
  id: string;
559
559
  organizationId: string;
560
560
  }, {
@@ -652,7 +652,7 @@ export declare const productCategoriesContract: {
652
652
  url: string;
653
653
  } | null | undefined;
654
654
  publishedAt?: Date | null | undefined;
655
- }>, z.ZodObject<z.objectUtil.extendShape<Omit<{
655
+ }>, z.ZodObject<Omit<{
656
656
  id: z.ZodString;
657
657
  slug: z.ZodString;
658
658
  image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -689,10 +689,10 @@ export declare const productCategoriesContract: {
689
689
  title?: string | undefined;
690
690
  description?: string | null | undefined;
691
691
  }>, "many">;
692
- }, "translations">, {
692
+ }, "translations"> & {
693
693
  title: z.ZodDefault<z.ZodString>;
694
694
  description: z.ZodDefault<z.ZodString>;
695
- }>, "strip", z.ZodTypeAny, {
695
+ }, "strip", z.ZodTypeAny, {
696
696
  id: string;
697
697
  slug: string;
698
698
  createdAt: Date;
@@ -746,11 +746,11 @@ export declare const productCategoriesContract: {
746
746
  updateProductCategory: {
747
747
  description: "Updates a specific product category by ID";
748
748
  method: "PATCH";
749
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
749
+ pathParams: z.ZodObject<{
750
750
  organizationId: z.ZodString;
751
- }, {
751
+ } & {
752
752
  id: z.ZodString;
753
- }>, "strip", z.ZodTypeAny, {
753
+ }, "strip", z.ZodTypeAny, {
754
754
  id: string;
755
755
  organizationId: string;
756
756
  }, {
@@ -1112,11 +1112,11 @@ export declare const productCategoriesContract: {
1112
1112
  deleteProductCategory: {
1113
1113
  description: "Deletes a specific product category by ID";
1114
1114
  method: "DELETE";
1115
- pathParams: z.ZodObject<z.objectUtil.extendShape<{
1115
+ pathParams: z.ZodObject<{
1116
1116
  organizationId: z.ZodString;
1117
- }, {
1117
+ } & {
1118
1118
  id: z.ZodString;
1119
- }>, "strip", z.ZodTypeAny, {
1119
+ }, "strip", z.ZodTypeAny, {
1120
1120
  id: string;
1121
1121
  organizationId: string;
1122
1122
  }, {