feeef 0.0.10 → 0.0.13

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 (76) hide show
  1. package/.eslintrc.cjs +19 -0
  2. package/package.json +4 -24
  3. package/src/core/core.ts +10 -0
  4. package/src/core/embadded/address.ts +13 -0
  5. package/src/core/embadded/category.ts +7 -0
  6. package/src/core/embadded/contact.ts +24 -0
  7. package/src/core/entities/order.ts +52 -0
  8. package/src/core/entities/product.ts +99 -0
  9. package/src/core/entities/shipping_method.ts +32 -0
  10. package/src/core/entities/store.ts +84 -0
  11. package/src/core/entities/user.ts +24 -0
  12. package/src/core/sdk/fif.ts +3 -0
  13. package/src/feeef/feeef.ts +99 -0
  14. package/src/feeef/repositories/orders.ts +37 -0
  15. package/src/feeef/repositories/products.ts +25 -0
  16. package/src/feeef/repositories/repository.ts +175 -0
  17. package/src/feeef/repositories/stores.ts +39 -0
  18. package/src/feeef/repositories/users.ts +92 -0
  19. package/src/feeef/validators/auth.ts +50 -0
  20. package/{build/src/feeef/validators/custom/datetime.js → src/feeef/validators/custom/datetime.ts} +3 -1
  21. package/src/feeef/validators/helpers.ts +76 -0
  22. package/src/feeef/validators/order.ts +89 -0
  23. package/src/feeef/validators/product.ts +95 -0
  24. package/src/feeef/validators/shipping_method.ts +44 -0
  25. package/src/feeef/validators/stores.ts +105 -0
  26. package/src/feeef/validators/user_stores.ts +84 -0
  27. package/src/feeef/validators/users.ts +69 -0
  28. package/src/index.ts +0 -0
  29. package/src/vite-env.d.ts +1 -0
  30. package/tsconfig.json +24 -0
  31. package/tsconfig.node.json +10 -0
  32. package/{build/vite.config.js → vite.config.ts} +2 -1
  33. package/build/index.d.ts +0 -1
  34. package/build/index.js +0 -1
  35. package/build/src/core/core.d.ts +0 -8
  36. package/build/src/core/core.js +0 -10
  37. package/build/src/core/embadded/address.d.ts +0 -13
  38. package/build/src/core/embadded/address.js +0 -1
  39. package/build/src/core/embadded/category.d.ts +0 -7
  40. package/build/src/core/embadded/category.js +0 -1
  41. package/build/src/core/embadded/contact.d.ts +0 -21
  42. package/build/src/core/embadded/contact.js +0 -17
  43. package/build/src/core/entities/order.d.ts +0 -49
  44. package/build/src/core/entities/order.js +0 -22
  45. package/build/src/core/entities/product.d.ts +0 -65
  46. package/build/src/core/entities/product.js +0 -19
  47. package/build/src/core/entities/shipping_method.d.ts +0 -29
  48. package/build/src/core/entities/shipping_method.js +0 -11
  49. package/build/src/core/entities/store.d.ts +0 -71
  50. package/build/src/core/entities/store.js +0 -15
  51. package/build/src/core/entities/user.d.ts +0 -23
  52. package/build/src/core/entities/user.js +0 -1
  53. package/build/src/core/sdk/fif.d.ts +0 -1
  54. package/build/src/core/sdk/fif.js +0 -4
  55. package/build/src/feeef/feeef.d.ts +0 -62
  56. package/build/src/feeef/feeef.js +0 -65
  57. package/build/src/feeef/repositories/orders.d.ts +0 -21
  58. package/build/src/feeef/repositories/orders.js +0 -27
  59. package/build/src/feeef/repositories/products.d.ts +0 -15
  60. package/build/src/feeef/repositories/products.js +0 -13
  61. package/build/src/feeef/repositories/repository.d.ts +0 -112
  62. package/build/src/feeef/repositories/repository.js +0 -96
  63. package/build/src/feeef/repositories/stores.d.ts +0 -22
  64. package/build/src/feeef/repositories/stores.js +0 -25
  65. package/build/src/feeef/repositories/users.d.ts +0 -51
  66. package/build/src/feeef/repositories/users.js +0 -65
  67. package/build/src/feeef/validators/auth.js +0 -46
  68. package/build/src/feeef/validators/custom/datetime.d.ts +0 -1
  69. package/build/src/feeef/validators/helpers.js +0 -65
  70. package/build/src/feeef/validators/order.js +0 -84
  71. package/build/src/feeef/validators/product.js +0 -92
  72. package/build/src/feeef/validators/shipping_method.js +0 -41
  73. package/build/src/feeef/validators/stores.js +0 -97
  74. package/build/src/feeef/validators/user_stores.js +0 -74
  75. package/build/src/feeef/validators/users.js +0 -67
  76. package/build/vite.config.d.ts +0 -2
@@ -0,0 +1,105 @@
1
+ import vine from "@vinejs/vine";
2
+ import {
3
+ AvatarFileSchema,
4
+ ContactSchema,
5
+ DomainSchema,
6
+ EmbaddedAddressSchema,
7
+ EmbaddedCategorySchema,
8
+ StoreDecorationSchema,
9
+ } from "./helpers.js";
10
+ import { DefaultShippingRatesSchema } from "./user_stores.js";
11
+
12
+ export const CreateStoreSchema = vine.object({
13
+ name: vine.string().minLength(2).maxLength(32),
14
+ slug: vine
15
+ .string()
16
+ .regex(/^[a-z0-9-]+$/)
17
+ .minLength(2)
18
+ .maxLength(32),
19
+ // .unique(async (db, value, field) => {
20
+ // const store = await db.from('stores').where('slug', value).first()
21
+ // return !store
22
+ // })
23
+ domain: vine
24
+ .object({
25
+ name: vine.string().minLength(2).maxLength(32),
26
+ verifiedAt: vine.date().optional(),
27
+ metadata: vine.object({}).optional(),
28
+ })
29
+ .optional(),
30
+ decoration: StoreDecorationSchema.optional(),
31
+ logoUrl: vine.string().optional(),
32
+ ondarkLogoUrl: vine.string().optional(),
33
+ logoFile: AvatarFileSchema.optional(),
34
+ ondarkLogoFile: AvatarFileSchema.optional(),
35
+ userId: vine.string(),
36
+ // .exists(async (db, value, field) => {
37
+ // const user = await db.from('users').where('id', value).first()
38
+ // return !!user
39
+ // })
40
+ categories: vine.array(EmbaddedCategorySchema).optional(),
41
+ title: vine.string().minLength(2).maxLength(255).optional(),
42
+ description: vine.string().minLength(2).maxLength(255).optional(),
43
+ addresses: vine.array(EmbaddedAddressSchema).optional(),
44
+ metadata: vine.object({}).optional(),
45
+ contacts: vine
46
+ .array(
47
+ vine.object({
48
+ type: vine.string().minLength(2).maxLength(32),
49
+ value: vine.string().minLength(2).maxLength(255),
50
+ metadata: vine.object({}).optional(),
51
+ })
52
+ )
53
+ .optional(),
54
+ shippingRates: vine
55
+ .array(vine.string().minLength(2).maxLength(48))
56
+ .optional(),
57
+ verifiedAt: vine.date().optional(),
58
+ blockedAt: vine.date().optional(),
59
+ integrations: vine.array(vine.any()).optional(),
60
+ // default_shipping_rates
61
+ defaultShippingRates: DefaultShippingRatesSchema.optional(),
62
+ });
63
+
64
+ // UpdateStoreSchema
65
+ export const UpdateStoreSchema = vine.object({
66
+ name: vine.string().minLength(2).maxLength(32).optional(),
67
+ slug: vine
68
+ .string()
69
+ .regex(/^[a-z0-9-]+$/)
70
+ .minLength(2)
71
+ .maxLength(32)
72
+ // .unique(async (db, value, field) => {
73
+ // const store = await db.from('stores').where('slug', value).first()
74
+ // return !store
75
+ // })
76
+ .optional(),
77
+ domain: DomainSchema.optional(),
78
+ decoration: StoreDecorationSchema.optional(),
79
+ logoUrl: vine.string().optional(),
80
+ ondarkLogoUrl: vine.string().optional(),
81
+ logoFile: AvatarFileSchema.optional(),
82
+ ondarkLogoFile: AvatarFileSchema.optional(),
83
+ userId: vine
84
+ .string()
85
+ // .exists(async (db, value, field) => {
86
+ // const user = await db.from('users').where('id', value).first()
87
+ // return !!user
88
+ // })
89
+ .optional(),
90
+ categories: vine.array(EmbaddedCategorySchema).optional(),
91
+ title: vine.string().minLength(2).maxLength(255).optional(),
92
+ description: vine.string().minLength(2).maxLength(255).optional(),
93
+ addresses: vine.array(EmbaddedAddressSchema).optional(),
94
+ metadata: vine.object({}).optional(),
95
+ contacts: vine.array(ContactSchema).optional(),
96
+ shippingRates: vine
97
+ .array(vine.string().minLength(2).maxLength(48))
98
+ .optional(),
99
+ verifiedAt: vine.date().optional(),
100
+ blockedAt: vine.date().optional(),
101
+ // integrations
102
+ integrations: vine.array(vine.any()).optional(),
103
+ // default_shipping_rates
104
+ defaultShippingRates: DefaultShippingRatesSchema.optional(),
105
+ });
@@ -0,0 +1,84 @@
1
+ import vine from "@vinejs/vine";
2
+ import {
3
+ AvatarFileSchema,
4
+ ContactSchema,
5
+ DomainSchema,
6
+ EmbaddedAddressSchema,
7
+ EmbaddedCategorySchema,
8
+ StoreBunnerSchema,
9
+ StoreDecorationSchema,
10
+ } from "./helpers.js";
11
+ // "defaultShippingRates.1"
12
+ export const DefaultShippingRatesSchema = vine.array(
13
+ vine.array(vine.number().min(0).max(10000).nullable()).nullable()
14
+ );
15
+
16
+ export const CreateUserStoreSchema = vine.object({
17
+ name: vine.string().minLength(2).maxLength(32),
18
+ banner: StoreBunnerSchema.optional(),
19
+ slug: vine
20
+ .string()
21
+ .regex(/^[a-z0-9-]+$/)
22
+ .minLength(2)
23
+ .maxLength(32),
24
+ // .unique(async (db, value, field) => {
25
+ // const store = await db.from('stores').where('slug', value).first()
26
+ // return !store
27
+ // })
28
+ domain: vine
29
+ .object({
30
+ name: vine.string().minLength(2).maxLength(32),
31
+ })
32
+ .optional(),
33
+ decoration: StoreDecorationSchema.optional(),
34
+ logoUrl: vine.string().optional(),
35
+ ondarkLogoUrl: vine.string().optional(),
36
+ logoFile: AvatarFileSchema.optional(),
37
+ ondarkLogoFile: AvatarFileSchema.optional(),
38
+ categories: vine.array(EmbaddedCategorySchema).optional(),
39
+ title: vine.string().minLength(2).maxLength(255).optional(),
40
+ description: vine.string().minLength(2).maxLength(255).optional(),
41
+ addresses: vine.array(EmbaddedAddressSchema).optional(),
42
+ metadata: vine.object({}).optional(),
43
+ contacts: vine
44
+ .array(
45
+ vine.object({
46
+ type: vine.string().minLength(2).maxLength(32),
47
+ value: vine.string().minLength(2).maxLength(255),
48
+ metadata: vine.object({}).optional(),
49
+ })
50
+ )
51
+ .optional(),
52
+ defaultShippingRates: DefaultShippingRatesSchema.optional(),
53
+ integrations: vine.array(vine.any()).optional(),
54
+ });
55
+
56
+ // UpdateStoreSchema
57
+ export const UpdateUserStoreSchema = vine.object({
58
+ name: vine.string().minLength(2).maxLength(32).optional(),
59
+ slug: vine
60
+ .string()
61
+ .regex(/^[a-z0-9-]+$/)
62
+ .minLength(2)
63
+ .maxLength(32)
64
+ // .unique(async (db, value, field) => {
65
+ // const store = await db.from('stores').where('slug', value).first()
66
+ // return !store
67
+ // })
68
+ .optional(),
69
+ domain: DomainSchema.optional(),
70
+ decoration: StoreDecorationSchema.optional(),
71
+ banner: StoreBunnerSchema.optional(),
72
+ logoUrl: vine.string().nullable().optional(),
73
+ ondarkLogoUrl: vine.string().nullable().optional(),
74
+ logoFile: AvatarFileSchema.optional(),
75
+ ondarkLogoFile: AvatarFileSchema.optional(),
76
+ categories: vine.array(EmbaddedCategorySchema).optional(),
77
+ title: vine.string().minLength(2).maxLength(255).optional(),
78
+ description: vine.string().minLength(2).maxLength(255).optional(),
79
+ addresses: vine.array(EmbaddedAddressSchema).optional(),
80
+ metadata: vine.object({}).optional(),
81
+ contacts: vine.array(ContactSchema).optional(),
82
+ defaultShippingRates: DefaultShippingRatesSchema.optional(),
83
+ integrations: vine.array(vine.any()).optional(),
84
+ });
@@ -0,0 +1,69 @@
1
+ import vine from "@vinejs/vine";
2
+
3
+ // User Schemas
4
+ //CreateUserSchema
5
+ export const CreateUserSchema = vine.object({
6
+ name: vine.string().minLength(2).maxLength(32),
7
+ email: vine.string(),
8
+ // .unique(async (db, value, field) => {
9
+ // const user = await db.from('users').where('email', value).first()
10
+ // return !user
11
+ // }),
12
+ phone: vine
13
+ .string()
14
+ .regex(/^0(5|6|7)\d{8}$|^0(2)\d{7}$/)
15
+ // .unique(async (db, value, field) => {
16
+ // const user = await db.from('users').where('phone', value).first()
17
+ // return !user
18
+ // })
19
+ .optional(),
20
+ password: vine.string().minLength(8).maxLength(32),
21
+ // for upload file
22
+ photoFile: vine.any(),
23
+ // .file({
24
+ // size: '1mb',
25
+ // extnames: ['jpg', 'jpeg', 'png', 'gif', 'webp'],
26
+ // })
27
+ // .optional(),
28
+ photoUrl: vine.string().optional(),
29
+ // metadata (any object)
30
+ metadata: vine.object({}).optional(),
31
+ // dates
32
+ emailVerifiedAt: vine.date().optional(),
33
+ phoneVerifiedAt: vine.date().optional(),
34
+ verifiedAt: vine.date().optional(),
35
+ blockedAt: vine.date().optional(),
36
+ });
37
+
38
+ //UpdateUserSchema
39
+ export const UpdateUserSchema = vine.object({
40
+ name: vine.string().minLength(2).maxLength(32).optional(),
41
+ email: vine
42
+ .string()
43
+ // .unique(async (db, value, field) => {
44
+ // const user = await db.from('users').where('email', value).first()
45
+ // return !user
46
+ // })
47
+ .optional(),
48
+ phone: vine
49
+ .string()
50
+ // must start with 0 then if secend is (5|6|7) then 8 digits and if secend is (2) then 7 digits
51
+ .regex(/^0(5|6|7)\d{8}$|^0(2)\d{7}$/)
52
+ .optional(),
53
+ password: vine.string().minLength(8).maxLength(32).confirmed().optional(),
54
+ // for upload file
55
+ photoFile: vine
56
+ // .file({
57
+ // size: '1mb',
58
+ // extnames: ['jpg', 'jpeg', 'png', 'gif', 'webp'],
59
+ // })
60
+ .any(),
61
+ photoUrl: vine.string().optional(),
62
+ // metadata (any object)
63
+ metadata: vine.object({}).optional(),
64
+ // dates
65
+ emailVerifiedAt: vine.date().optional(),
66
+ phoneVerifiedAt: vine.date().optional(),
67
+ verifiedAt: vine.string().optional(),
68
+ blockedAt: vine.date().optional(),
69
+ });
package/src/index.ts ADDED
File without changes
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
package/tsconfig.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "strict": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "noFallthroughCasesInSwitch": true
21
+ },
22
+ "include": ["src"],
23
+ "references": [{ "path": "./tsconfig.node.json" }]
24
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": ["vite.config.ts"]
10
+ }
@@ -1,5 +1,6 @@
1
1
  import { defineConfig } from "vite";
2
+
2
3
  // https://vitejs.dev/config/
3
4
  export default defineConfig({
4
- plugins: [],
5
+ plugins: [],
5
6
  });
package/build/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * as core from "./src/core/core.js";
package/build/index.js DELETED
@@ -1 +0,0 @@
1
- export * as core from "./src/core/core.js";
@@ -1,8 +0,0 @@
1
- export * from './entities/order.js';
2
- export * from './entities/store.js';
3
- export * from './entities/product.js';
4
- export * from './entities/user.js';
5
- export * from './entities/shipping_method.js';
6
- export * from './embadded/address.js';
7
- export * from './embadded/category.js';
8
- export * from './embadded/contact.js';
@@ -1,10 +0,0 @@
1
- // entities
2
- export * from './entities/order.js';
3
- export * from './entities/store.js';
4
- export * from './entities/product.js';
5
- export * from './entities/user.js';
6
- export * from './entities/shipping_method.js';
7
- // embaddeds
8
- export * from './embadded/address.js';
9
- export * from './embadded/category.js';
10
- export * from './embadded/contact.js';
@@ -1,13 +0,0 @@
1
- export interface EmbaddedAddress {
2
- city: string;
3
- state: string;
4
- country?: string;
5
- street?: string;
6
- zip?: string;
7
- location?: {
8
- geohash?: string;
9
- lat: number;
10
- long: number;
11
- };
12
- metadata?: Record<string, any>;
13
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- export interface EmbaddedCategory {
2
- name: string;
3
- description: string | null;
4
- photoUrl: string | null;
5
- ondarkPhotoUrl?: string | null;
6
- metadata?: Record<string, any>;
7
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- export declare enum EmbaddedContactType {
2
- phone = "phone",
3
- email = "email",
4
- facebook = "facebook",
5
- twitter = "twitter",
6
- instagram = "instagram",
7
- linkedin = "linkedin",
8
- website = "website",
9
- whatsapp = "whatsapp",
10
- telegram = "telegram",
11
- signal = "signal",
12
- viber = "viber",
13
- skype = "skype",
14
- zoom = "zoom",
15
- other = "other"
16
- }
17
- export interface EmbaddedContact {
18
- type: EmbaddedContactType;
19
- value: string;
20
- metadata?: Record<string, any>;
21
- }
@@ -1,17 +0,0 @@
1
- export var EmbaddedContactType;
2
- (function (EmbaddedContactType) {
3
- EmbaddedContactType["phone"] = "phone";
4
- EmbaddedContactType["email"] = "email";
5
- EmbaddedContactType["facebook"] = "facebook";
6
- EmbaddedContactType["twitter"] = "twitter";
7
- EmbaddedContactType["instagram"] = "instagram";
8
- EmbaddedContactType["linkedin"] = "linkedin";
9
- EmbaddedContactType["website"] = "website";
10
- EmbaddedContactType["whatsapp"] = "whatsapp";
11
- EmbaddedContactType["telegram"] = "telegram";
12
- EmbaddedContactType["signal"] = "signal";
13
- EmbaddedContactType["viber"] = "viber";
14
- EmbaddedContactType["skype"] = "skype";
15
- EmbaddedContactType["zoom"] = "zoom";
16
- EmbaddedContactType["other"] = "other";
17
- })(EmbaddedContactType || (EmbaddedContactType = {}));
@@ -1,49 +0,0 @@
1
- export declare enum OrderStatus {
2
- draft = "draft",
3
- pending = "pending",
4
- processing = "processing",
5
- completed = "completed",
6
- cancelled = "cancelled"
7
- }
8
- export declare enum PaymentStatus {
9
- unpaid = "unpaid",
10
- paid = "paid",
11
- received = "received"
12
- }
13
- export declare enum DeliveryStatus {
14
- pending = "pending",
15
- delivering = "delivering",
16
- delivered = "delivered",
17
- returned = "returned"
18
- }
19
- export interface OrderEntity {
20
- id: string;
21
- customerName: string | null;
22
- customerPhone: string;
23
- customerIp: string | null;
24
- shippingAddress: string | null;
25
- shippingCity: string | null;
26
- shippingState: string | null;
27
- shippingMethodId: string | null;
28
- paymentMethodId: string | null;
29
- items: OrderItem[];
30
- subtotal: number;
31
- shippingPrice: number;
32
- total: number;
33
- discount: number;
34
- coupon: string | null;
35
- storeId: string;
36
- metadata: any;
37
- status: OrderStatus;
38
- paymentStatus: PaymentStatus;
39
- deliveryStatus: DeliveryStatus;
40
- createdAt: any;
41
- updatedAt: any;
42
- }
43
- export interface OrderItem {
44
- productId: string;
45
- productName: string;
46
- variantPath?: string;
47
- quantity: number;
48
- price: number;
49
- }
@@ -1,22 +0,0 @@
1
- export var OrderStatus;
2
- (function (OrderStatus) {
3
- OrderStatus["draft"] = "draft";
4
- OrderStatus["pending"] = "pending";
5
- OrderStatus["processing"] = "processing";
6
- OrderStatus["completed"] = "completed";
7
- OrderStatus["cancelled"] = "cancelled";
8
- })(OrderStatus || (OrderStatus = {}));
9
- // PaymentStatus
10
- export var PaymentStatus;
11
- (function (PaymentStatus) {
12
- PaymentStatus["unpaid"] = "unpaid";
13
- PaymentStatus["paid"] = "paid";
14
- PaymentStatus["received"] = "received";
15
- })(PaymentStatus || (PaymentStatus = {}));
16
- export var DeliveryStatus;
17
- (function (DeliveryStatus) {
18
- DeliveryStatus["pending"] = "pending";
19
- DeliveryStatus["delivering"] = "delivering";
20
- DeliveryStatus["delivered"] = "delivered";
21
- DeliveryStatus["returned"] = "returned";
22
- })(DeliveryStatus || (DeliveryStatus = {}));
@@ -1,65 +0,0 @@
1
- import { EmbaddedCategory } from "../embadded/category.js";
2
- export interface ProductEntity {
3
- id: string;
4
- slug: string;
5
- decoration: ProductDecoration | null;
6
- name: string | null;
7
- photoUrl: string | null;
8
- media: string[];
9
- storeId: string;
10
- category: EmbaddedCategory;
11
- title: string | null;
12
- description: string | null;
13
- body: string | null;
14
- sku: string | null;
15
- price: number;
16
- discount: number | null;
17
- stock: number;
18
- sold: number;
19
- views: number;
20
- likes: number;
21
- dislikes: number;
22
- variant?: ProductVariant | null;
23
- metadata: Record<string, any>;
24
- status: ProductStatus;
25
- type: ProductType;
26
- verifiedAt: any | null;
27
- blockedAt: any | null;
28
- createdAt: any;
29
- updatedAt: any;
30
- }
31
- export declare enum ProductStatus {
32
- draft = "draft",
33
- published = "published",
34
- archived = "archived",
35
- deleted = "deleted"
36
- }
37
- export interface ProductDecoration {
38
- metadata: Record<string, any>;
39
- }
40
- export interface ProductVariant {
41
- name: string;
42
- options: ProductVariantOption[];
43
- }
44
- export interface ProductVariantOption {
45
- name: string;
46
- sku?: string | null;
47
- price?: number | null;
48
- discount?: number | null;
49
- stock?: number | null;
50
- sold?: number | null;
51
- type?: VariantOptionType;
52
- child?: ProductVariant | null;
53
- mediaIndex?: number | null;
54
- hint?: string | null;
55
- }
56
- export declare enum VariantOptionType {
57
- color = "color",
58
- image = "image",
59
- text = "text"
60
- }
61
- export declare enum ProductType {
62
- physical = "physical",
63
- digital = "digital",
64
- service = "service"
65
- }
@@ -1,19 +0,0 @@
1
- export var ProductStatus;
2
- (function (ProductStatus) {
3
- ProductStatus["draft"] = "draft";
4
- ProductStatus["published"] = "published";
5
- ProductStatus["archived"] = "archived";
6
- ProductStatus["deleted"] = "deleted";
7
- })(ProductStatus || (ProductStatus = {}));
8
- export var VariantOptionType;
9
- (function (VariantOptionType) {
10
- VariantOptionType["color"] = "color";
11
- VariantOptionType["image"] = "image";
12
- VariantOptionType["text"] = "text";
13
- })(VariantOptionType || (VariantOptionType = {}));
14
- export var ProductType;
15
- (function (ProductType) {
16
- ProductType["physical"] = "physical";
17
- ProductType["digital"] = "digital";
18
- ProductType["service"] = "service";
19
- })(ProductType || (ProductType = {}));
@@ -1,29 +0,0 @@
1
- import { OrderEntity } from "./order.js";
2
- export interface ShippingMethodEntity {
3
- id: string;
4
- name: string;
5
- description: string | null;
6
- logoUrl: string | null;
7
- ondarkLogoUrl: string | null;
8
- price: number;
9
- forks: number;
10
- sourceId: string;
11
- storeId: string;
12
- rates: (number | null)[];
13
- status: ShippingMethodStatus;
14
- policy: ShippingMethodPolicy;
15
- verifiedAt: any;
16
- createdAt: any;
17
- updatedAt: any;
18
- orders: OrderEntity[];
19
- source: ShippingMethodEntity | null;
20
- }
21
- export declare enum ShippingMethodStatus {
22
- draft = "draft",
23
- published = "published",
24
- archived = "archived"
25
- }
26
- export declare enum ShippingMethodPolicy {
27
- private = "private",
28
- public = "public"
29
- }
@@ -1,11 +0,0 @@
1
- export var ShippingMethodStatus;
2
- (function (ShippingMethodStatus) {
3
- ShippingMethodStatus["draft"] = "draft";
4
- ShippingMethodStatus["published"] = "published";
5
- ShippingMethodStatus["archived"] = "archived";
6
- })(ShippingMethodStatus || (ShippingMethodStatus = {}));
7
- export var ShippingMethodPolicy;
8
- (function (ShippingMethodPolicy) {
9
- ShippingMethodPolicy["private"] = "private";
10
- ShippingMethodPolicy["public"] = "public";
11
- })(ShippingMethodPolicy || (ShippingMethodPolicy = {}));