@meeovi/layer-shared 1.0.0 → 1.0.2

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 (121) hide show
  1. package/app/composables/mappers/createMapper.ts +11 -0
  2. package/app/composables/mappers/errors.ts +13 -0
  3. package/app/composables/mappers/index.ts +7 -0
  4. package/app/composables/mappers/registry.ts +28 -0
  5. package/app/composables/mappers/testHarness.ts +142 -0
  6. package/app/composables/mappers/types.ts +6 -0
  7. package/app/composables/mappers/zodMapper.ts +37 -0
  8. package/app/composables/schema/commerce/attributes.ts +10 -0
  9. package/app/composables/schema/commerce/blocks.ts +7 -0
  10. package/app/composables/schema/commerce/bundleProduts.ts +12 -0
  11. package/app/composables/schema/commerce/cart.ts +35 -0
  12. package/app/composables/schema/commerce/category.ts +15 -0
  13. package/app/composables/schema/commerce/checkout.ts +11 -0
  14. package/app/composables/schema/commerce/company.ts +8 -0
  15. package/app/composables/schema/commerce/configurableProducts.ts +11 -0
  16. package/app/composables/schema/commerce/coupons.ts +10 -0
  17. package/app/composables/schema/commerce/credit-memos.ts +50 -0
  18. package/app/composables/schema/commerce/digitalProducts.ts +13 -0
  19. package/app/composables/schema/commerce/directory.ts +8 -0
  20. package/app/composables/schema/commerce/events.ts +30 -0
  21. package/app/composables/schema/commerce/gift-registry.ts +9 -0
  22. package/app/composables/schema/commerce/guest-cart.ts +6 -0
  23. package/app/composables/schema/commerce/inventory.ts +9 -0
  24. package/app/composables/schema/commerce/invoices.ts +49 -0
  25. package/app/composables/schema/commerce/orders.ts +39 -0
  26. package/app/composables/schema/commerce/payments.ts +11 -0
  27. package/app/composables/schema/commerce/price.ts +12 -0
  28. package/app/composables/schema/commerce/product-types.ts +9 -0
  29. package/app/composables/schema/commerce/product.ts +23 -0
  30. package/app/composables/schema/commerce/quotes.ts +10 -0
  31. package/app/composables/schema/commerce/requisition-lists.ts +7 -0
  32. package/app/composables/schema/commerce/returns.ts +11 -0
  33. package/app/composables/schema/commerce/reward.ts +8 -0
  34. package/app/composables/schema/commerce/rules.ts +8 -0
  35. package/app/composables/schema/commerce/shipment.ts +21 -0
  36. package/app/composables/schema/commerce/shops.ts +10 -0
  37. package/app/composables/schema/commerce/stockItems.ts +8 -0
  38. package/app/composables/schema/commerce/store.ts +8 -0
  39. package/app/composables/schema/commerce/subscriptons.ts +11 -0
  40. package/app/composables/schema/commerce/taxRates.ts +9 -0
  41. package/app/composables/schema/commerce/taxRules.ts +8 -0
  42. package/app/composables/schema/commerce/teams.ts +7 -0
  43. package/app/composables/schema/commerce/transactions.ts +13 -0
  44. package/app/composables/schema/identity/customerGroup.ts +8 -0
  45. package/app/composables/schema/identity/user.ts +47 -0
  46. package/app/composables/schema/media/asset.ts +31 -0
  47. package/app/composables/schema/social/post.ts +28 -0
  48. package/app/composables/schema/social/profile.ts +25 -0
  49. package/app/composables/schema/social/space.ts +19 -0
  50. package/app/composables/utils/assert.ts +8 -0
  51. package/app/composables/utils/deepMerge.ts +21 -0
  52. package/app/composables/utils/index.ts +4 -0
  53. package/app/composables/utils/isObject.ts +7 -0
  54. package/app/composables/utils/module.ts +19 -0
  55. package/app/composables/utils/safeGet.ts +8 -0
  56. package/nuxt.config.ts +12 -2
  57. package/package.json +2 -1
  58. package/app/types/api/global-search.ts +0 -8
  59. package/app/types/blocks/block-button-group.ts +0 -7
  60. package/app/types/blocks/block-button.ts +0 -14
  61. package/app/types/blocks/block-column.ts +0 -20
  62. package/app/types/blocks/block-cta.ts +0 -10
  63. package/app/types/blocks/block-divider.ts +0 -4
  64. package/app/types/blocks/block-faq.ts +0 -12
  65. package/app/types/blocks/block-form.ts +0 -8
  66. package/app/types/blocks/block-gallery.ts +0 -14
  67. package/app/types/blocks/block-hero.ts +0 -12
  68. package/app/types/blocks/block-html.ts +0 -4
  69. package/app/types/blocks/block-logocloud.ts +0 -14
  70. package/app/types/blocks/block-quote.ts +0 -11
  71. package/app/types/blocks/block-richtext.ts +0 -7
  72. package/app/types/blocks/block-steps.ts +0 -22
  73. package/app/types/blocks/block-team.ts +0 -6
  74. package/app/types/blocks/block-testimonial.ts +0 -14
  75. package/app/types/blocks/block-video.ts +0 -10
  76. package/app/types/blocks/block.ts +0 -49
  77. package/app/types/blocks/index.ts +0 -18
  78. package/app/types/componentMap.ts +0 -15
  79. package/app/types/content/category.ts +0 -11
  80. package/app/types/content/form.ts +0 -20
  81. package/app/types/content/index.ts +0 -6
  82. package/app/types/content/page.ts +0 -76
  83. package/app/types/content/post.ts +0 -39
  84. package/app/types/content/team.ts +0 -16
  85. package/app/types/content/testimonial.ts +0 -19
  86. package/app/types/directus.d.ts +0 -47
  87. package/app/types/env.d.ts +0 -8
  88. package/app/types/help/index.ts +0 -53
  89. package/app/types/index.d.ts +0 -9
  90. package/app/types/index.ts +0 -7
  91. package/app/types/meta/analytics.ts +0 -18
  92. package/app/types/meta/config.ts +0 -21
  93. package/app/types/meta/globals.ts +0 -30
  94. package/app/types/meta/index.ts +0 -6
  95. package/app/types/meta/navigation.ts +0 -32
  96. package/app/types/meta/redirect.ts +0 -13
  97. package/app/types/meta/seo.ts +0 -19
  98. package/app/types/os/contact.ts +0 -23
  99. package/app/types/os/conversation.ts +0 -25
  100. package/app/types/os/index.ts +0 -16
  101. package/app/types/os/organization.ts +0 -54
  102. package/app/types/os/os-activity.ts +0 -28
  103. package/app/types/os/os-deal.ts +0 -45
  104. package/app/types/os/os-expense.ts +0 -22
  105. package/app/types/os/os-invoice.ts +0 -48
  106. package/app/types/os/os-item.ts +0 -18
  107. package/app/types/os/os-payment.ts +0 -29
  108. package/app/types/os/os-project.ts +0 -47
  109. package/app/types/os/os-proposal.ts +0 -84
  110. package/app/types/os/os-settings.ts +0 -19
  111. package/app/types/os/os-subscription.ts +0 -12
  112. package/app/types/os/os-task.ts +0 -34
  113. package/app/types/os/os-tax-rate.ts +0 -13
  114. package/app/types/pageComponentMap.ts +0 -8
  115. package/app/types/schema.d.ts +0 -39
  116. package/app/types/schema.ts +0 -151
  117. package/app/types/system/file.ts +0 -46
  118. package/app/types/system/folder.ts +0 -8
  119. package/app/types/system/index.ts +0 -4
  120. package/app/types/system/role.ts +0 -21
  121. package/app/types/system/user.ts +0 -56
@@ -0,0 +1,11 @@
1
+ import { MapperDefinition, MapperFn } from './types'
2
+
3
+ export function createMapper<TInput, TOutput>(
4
+ name: string,
5
+ fn: MapperFn<TInput, TOutput>
6
+ ): MapperDefinition<TInput, TOutput> {
7
+ return {
8
+ name,
9
+ map: fn
10
+ }
11
+ }
@@ -0,0 +1,13 @@
1
+ export class MapperError extends Error {
2
+ constructor(message: string) {
3
+ super(message)
4
+ this.name = 'MapperError'
5
+ }
6
+ }
7
+
8
+ export class MapperNotFoundError extends MapperError {
9
+ constructor(name: string) {
10
+ super(`Mapper "${name}" was not found`)
11
+ this.name = 'MapperNotFoundError'
12
+ }
13
+ }
@@ -0,0 +1,7 @@
1
+ // /packages/mapper-core/index.ts
2
+ export * from './types'
3
+ export * from './errors'
4
+ export * from './createMapper'
5
+ export * from './registry'
6
+ export * from './zodMapper'
7
+ export * from './testHarness'
@@ -0,0 +1,28 @@
1
+ import { MapperDefinition } from './types'
2
+ import { MapperNotFoundError } from './errors'
3
+
4
+ const registry = new Map<string, MapperDefinition<any, any>>()
5
+
6
+ export function registerMapper<TInput, TOutput>(
7
+ mapper: MapperDefinition<TInput, TOutput>
8
+ ) {
9
+ registry.set(mapper.name, mapper)
10
+ }
11
+
12
+ export function getMapper<TInput, TOutput>(
13
+ name: string
14
+ ): MapperDefinition<TInput, TOutput> {
15
+ const mapper = registry.get(name)
16
+ if (!mapper) {
17
+ throw new MapperNotFoundError(name)
18
+ }
19
+ return mapper
20
+ }
21
+
22
+ export function hasMapper(name: string): boolean {
23
+ return registry.has(name)
24
+ }
25
+
26
+ export function listMappers(): string[] {
27
+ return Array.from(registry.keys())
28
+ }
@@ -0,0 +1,142 @@
1
+ import { MapperDefinition } from './types'
2
+ import { MapperError } from './errors'
3
+
4
+ export interface MapperTestCase<TInput, TOutput> {
5
+ name: string
6
+ input: TInput
7
+ expected: TOutput | ((output: TOutput) => void | Promise<void>)
8
+ snapshot?: boolean
9
+ }
10
+
11
+ export interface MapperTestOptions<TInput, TOutput> {
12
+ mapper: MapperDefinition<TInput, TOutput>
13
+ cases: MapperTestCase<TInput, TOutput>[]
14
+ async?: boolean
15
+ }
16
+
17
+ export async function runMapperTests<TInput, TOutput>(
18
+ options: MapperTestOptions<TInput, TOutput>
19
+ ) {
20
+ const { mapper, cases } = options
21
+
22
+ for (const testCase of cases) {
23
+ const { name, input, expected, snapshot } = testCase
24
+
25
+ try {
26
+ const result = await maybeAsync(mapper.map, input)
27
+
28
+ // Snapshot mode (stringified)
29
+ if (snapshot) {
30
+ const snap = JSON.stringify(result, null, 2)
31
+ console.log(`\n📸 Snapshot for "${mapper.name}" → "${name}":\n${snap}\n`)
32
+ }
33
+
34
+ // Function-based expectation
35
+ if (isExpectedFunction<TOutput>(expected)) {
36
+ await expected(result)
37
+ continue
38
+ }
39
+
40
+ // Deep equality check
41
+ const pass = deepEqual(result, expected)
42
+ if (!pass) {
43
+ throw new MapperError(
44
+ `Mapper "${mapper.name}" test "${name}" failed.\n` +
45
+ diffString(expected, result)
46
+ )
47
+ }
48
+ } catch (error) {
49
+ if (error instanceof Error) {
50
+ throw new MapperError(
51
+ `Mapper "${mapper.name}" test "${name}" threw an error:\n${error.message}`
52
+ )
53
+ }
54
+ throw error
55
+ }
56
+ }
57
+ }
58
+
59
+ /* -------------------------------------------------------
60
+ Helpers
61
+ ------------------------------------------------------- */
62
+
63
+ async function maybeAsync<TInput, TOutput>(
64
+ fn: (input: TInput) => TOutput | Promise<TOutput>,
65
+ input: TInput
66
+ ): Promise<TOutput> {
67
+ return await fn(input)
68
+ }
69
+
70
+ function isExpectedFunction<TOutput>(
71
+ value: unknown
72
+ ): value is (output: TOutput) => void | Promise<void> {
73
+ return typeof value === 'function'
74
+ }
75
+
76
+ function deepEqual(a: unknown, b: unknown): boolean {
77
+ if (Object.is(a, b)) return true
78
+
79
+ if (
80
+ typeof a !== 'object' ||
81
+ typeof b !== 'object' ||
82
+ a === null ||
83
+ b === null
84
+ ) {
85
+ return false
86
+ }
87
+
88
+ const aKeys = Object.keys(a as object)
89
+ const bKeys = Object.keys(b as object)
90
+ if (aKeys.length !== bKeys.length) return false
91
+
92
+ for (const key of aKeys) {
93
+ if (!deepEqual((a as any)[key], (b as any)[key])) return false
94
+ }
95
+
96
+ return true
97
+ }
98
+
99
+ /**
100
+ * Pretty diff output (no deps)
101
+ */
102
+ function diffString(expected: unknown, received: unknown): string {
103
+ const exp = JSON.stringify(expected, null, 2)
104
+ const rec = JSON.stringify(received, null, 2)
105
+
106
+ return (
107
+ `\nExpected:\n${indent(exp)}\n\nReceived:\n${indent(rec)}\n` +
108
+ `\nDiff:\n${indent(generateDiff(exp, rec))}`
109
+ )
110
+ }
111
+
112
+ function indent(str: string): string {
113
+ return str
114
+ .split('\n')
115
+ .map((line) => ` ${line}`)
116
+ .join('\n')
117
+ }
118
+
119
+ /**
120
+ * Minimal diff generator (line-by-line)
121
+ */
122
+ function generateDiff(a: string, b: string): string {
123
+ const aLines = a.split('\n')
124
+ const bLines = b.split('\n')
125
+ const max = Math.max(aLines.length, bLines.length)
126
+
127
+ const diff: string[] = []
128
+
129
+ for (let i = 0; i < max; i++) {
130
+ const left = aLines[i]
131
+ const right = bLines[i]
132
+
133
+ if (left === right) {
134
+ diff.push(` ${left ?? ''}`)
135
+ } else {
136
+ if (left !== undefined) diff.push(`- ${left}`)
137
+ if (right !== undefined) diff.push(`+ ${right}`)
138
+ }
139
+ }
140
+
141
+ return diff.join('\n')
142
+ }
@@ -0,0 +1,6 @@
1
+ export type MapperFn<TInput, TOutput> = (input: TInput) => TOutput
2
+
3
+ export interface MapperDefinition<TInput, TOutput> {
4
+ name: string
5
+ map: MapperFn<TInput, TOutput>
6
+ }
@@ -0,0 +1,37 @@
1
+ import type { ZodSchema } from 'zod'
2
+ import type { MapperDefinition, MapperFn } from './types'
3
+ import { createMapper } from './createMapper'
4
+ import { MapperError } from './errors'
5
+
6
+ export interface ZodMapperOptions<TInput, TOutput> {
7
+ name: string
8
+ inputSchema: ZodSchema<TInput>
9
+ outputSchema: ZodSchema<TOutput>
10
+ map: MapperFn<TInput, TOutput>
11
+ }
12
+
13
+ export function createZodMapper<TInput, TOutput>(
14
+ options: ZodMapperOptions<TInput, TOutput>
15
+ ): MapperDefinition<TInput, TOutput> {
16
+ const { name, inputSchema, outputSchema, map } = options
17
+
18
+ return createMapper<TInput, TOutput>(name, (rawInput) => {
19
+ const parsedInput = inputSchema.safeParse(rawInput)
20
+ if (!parsedInput.success) {
21
+ throw new MapperError(
22
+ `Mapper "${name}" input validation failed: ${parsedInput.error.message}`
23
+ )
24
+ }
25
+
26
+ const output = map(parsedInput.data)
27
+
28
+ const parsedOutput = outputSchema.safeParse(output)
29
+ if (!parsedOutput.success) {
30
+ throw new MapperError(
31
+ `Mapper "${name}" output validation failed: ${parsedOutput.error.message}`
32
+ )
33
+ }
34
+
35
+ return parsedOutput.data
36
+ })
37
+ }
@@ -0,0 +1,10 @@
1
+ export interface MeeoviAttribute {
2
+ id: number
3
+ default_label?: string | null
4
+ isPublic?: boolean | null
5
+ options?: Record<string, unknown> | null
6
+ attribute_code?: string | null
7
+ // relations omitted: attributes_product_types[], attributes_products[], integrations_attributes[], product_attributes[], products_attributes[], videos[]
8
+ }
9
+
10
+
@@ -0,0 +1,7 @@
1
+ export interface MeeoviBlock {
2
+ id: string
3
+ type: string
4
+ content: string | null
5
+ metadata?: Record<string, unknown>
6
+ }
7
+
@@ -0,0 +1,12 @@
1
+ import { MeeoviProduct } from './product'
2
+
3
+ export interface MeeoviBundleProduct {
4
+ id: string
5
+ title: string
6
+ items: MeeoviProduct[]
7
+ price: number
8
+ currency: string
9
+ stock: number | null
10
+ metadata?: Record<string, unknown>
11
+ }
12
+
@@ -0,0 +1,35 @@
1
+ import { MeeoviProduct } from './product'
2
+
3
+ export interface MeeoviCartItem {
4
+ id: number
5
+ quantity?: number | null
6
+ metadata?: Record<string, unknown> | null
7
+ products?: string | null
8
+ cart?: number | null
9
+ product_id?: string | null
10
+ price?: number | null
11
+ total?: number | null
12
+ variant_id?: string | null
13
+ variant?: string | null
14
+ }
15
+
16
+ export interface MeeoviCart {
17
+ id: number
18
+ date_created?: string | null
19
+ user_updated?: string | null
20
+ date_updated?: string | null
21
+ session_id?: string | null
22
+ total_price?: number | null
23
+ user?: string | null
24
+ status?: string | null
25
+ subtotal?: number | null
26
+ tax_amount?: number | null
27
+ shipping_amount?: number | null
28
+ discount_amount?: number | null
29
+ total?: number | null
30
+ currency?: string | null
31
+ coupon_code?: string | null
32
+ // relations omitted: address_cart[], cart_cart_items[], cart_items[], cart_products[]
33
+ }
34
+
35
+
@@ -0,0 +1,15 @@
1
+ export interface MeeoviCategory {
2
+ id: number
3
+ name?: string | null
4
+ description?: string | null
5
+ content?: string | null
6
+ image?: string | null
7
+ menus?: Record<string, unknown> | null
8
+ uid?: string | null
9
+ color?: string | null
10
+ colortext?: string | null
11
+ slug?: string | null
12
+ // relations omitted: articles_categories[], brands_categories[], ...
13
+ }
14
+
15
+
@@ -0,0 +1,11 @@
1
+ import { MeeoviCart } from './cart'
2
+
3
+ export interface MeeoviCheckout {
4
+ id: string
5
+ cart: MeeoviCart
6
+ total: number
7
+ currency: string
8
+ status: 'pending' | 'completed' | 'failed' | string
9
+ metadata?: Record<string, unknown>
10
+ }
11
+
@@ -0,0 +1,8 @@
1
+ export interface MeeoviCompany {
2
+ id: string
3
+ name: string
4
+ website?: string | null
5
+ description?: string | null
6
+ metadata?: Record<string, unknown>
7
+ }
8
+
@@ -0,0 +1,11 @@
1
+ import { MeeoviProduct } from './product'
2
+
3
+ export interface MeeoviConfigurableProduct {
4
+ id: string
5
+ baseProductId: string
6
+ title?: string | null
7
+ options: { name: string; values: string[] }[]
8
+ variants: MeeoviProduct[]
9
+ metadata?: Record<string, unknown>
10
+ }
11
+
@@ -0,0 +1,10 @@
1
+ export interface MeeoviCoupon {
2
+ id: string
3
+ code: string
4
+ description?: string | null
5
+ discountType: 'percentage' | 'fixed' | string
6
+ amount: number
7
+ expiresAt?: string | null
8
+ metadata?: Record<string, unknown>
9
+ }
10
+
@@ -0,0 +1,50 @@
1
+ export interface MeeoviCreditMemo {
2
+ id: number
3
+ created_at?: string | null
4
+ updated_at?: string | null
5
+ adjustment?: number | null
6
+ adjustment_negative?: number | null
7
+ adjustment_positive?: number | null
8
+ base_adjustment?: number | null
9
+ base_adjustment_negative?: number | null
10
+ base_adjustment_positive?: number | null
11
+ base_currency_code?: string | null
12
+ base_discount_amount?: number | null
13
+ base_grand_total?: number | null
14
+ base_discount_tax_compensation_amount?: number | null
15
+ base_shipping_amount?: number | null
16
+ base_shipping_discount_tax_compensation_amnt?: number | null
17
+ base_shipping_incl_tax?: number | null
18
+ base_shipping_tax_amount?: number | null
19
+ base_subtotal?: number | null
20
+ base_subtotal_incl_tax?: number | null
21
+ base_tax_amount?: number | null
22
+ base_to_global_rate?: number | null
23
+ base_to_order_rate?: number | null
24
+ creditmemo_status?: number | null
25
+ discount_amount?: number | null
26
+ discount_description?: string | null
27
+ email_sent?: number | null
28
+ entity_id?: number | null
29
+ global_currency_code?: string | null
30
+ grand_total?: number | null
31
+ discount_tax_compensation_amount?: number | null
32
+ increment_id?: string | null
33
+ invoice_id?: number | null
34
+ order_currency_code?: string | null
35
+ shipping_amount?: number | null
36
+ shipping_discount_tax_compensation_amount?: number | null
37
+ shipping_incl_tax?: number | null
38
+ shipping_tax_amount?: number | null
39
+ state?: number | null
40
+ store_currency_code?: string | null
41
+ store_id?: number | null
42
+ store_to_base_rate?: number | null
43
+ store_to_order_rate?: number | null
44
+ subtotal?: number | null
45
+ subtotal_incl_tax?: number | null
46
+ tax_amount?: number | null
47
+ user?: string | null
48
+ }
49
+
50
+
@@ -0,0 +1,13 @@
1
+ import { MeeoviProduct } from './product'
2
+
3
+ export interface MeeoviDigitalProduct {
4
+ id: string
5
+ title: string
6
+ downloadUrl?: string | null
7
+ fileId?: string | null
8
+ product?: MeeoviProduct
9
+ price?: number
10
+ currency?: string
11
+ metadata?: Record<string, unknown>
12
+ }
13
+
@@ -0,0 +1,8 @@
1
+ export interface MeeoviDirectoryEntry {
2
+ id: string
3
+ name: string
4
+ type?: string | null
5
+ url?: string | null
6
+ metadata?: Record<string, unknown>
7
+ }
8
+
@@ -0,0 +1,30 @@
1
+ export interface MeeoviEvent {
2
+ id: number
3
+ status?: string | null
4
+ sort?: number | null
5
+ user_created?: string | null
6
+ date_created?: string | null
7
+ user_updated?: string | null
8
+ date_updated?: string | null
9
+ name?: string | null
10
+ description?: string | null
11
+ event_calendar?: string | null
12
+ image?: string | null
13
+ location?: string | null
14
+ start_time?: string | null
15
+ end_time?: string | null
16
+ url?: string | null
17
+ postalcode?: string | null
18
+ type?: string | null
19
+ qr_code?: string | null
20
+ check_in?: string | null
21
+ rsvp_status?: string | null
22
+ rsvp_policies?: Record<string, unknown> | null
23
+ date?: string | null
24
+ slug?: string | null
25
+ tickets_url?: string | null
26
+ address?: string | null
27
+ // relations omitted
28
+ }
29
+
30
+
@@ -0,0 +1,9 @@
1
+ import { MeeoviProduct } from './product'
2
+
3
+ export interface MeeoviGiftRegistry {
4
+ id: string
5
+ ownerId?: string | null
6
+ items: MeeoviProduct[]
7
+ metadata?: Record<string, unknown>
8
+ }
9
+
@@ -0,0 +1,6 @@
1
+ import { MeeoviCart } from './cart'
2
+
3
+ export interface MeeoviGuestCart extends MeeoviCart {
4
+ guestId: string
5
+ }
6
+
@@ -0,0 +1,9 @@
1
+ export interface MeeoviInventoryLot {
2
+ id: number
3
+ location_id?: number | null
4
+ qty?: number | null
5
+ batch?: string | null
6
+ expires_at?: string | null
7
+ created_at?: string | null
8
+ }
9
+
@@ -0,0 +1,49 @@
1
+ export interface MeeoviInvoice {
2
+ id: string
3
+ created_at?: string | null
4
+ updated_at?: string | null
5
+ base_currency_code?: string | null
6
+ base_discount_amount?: number | null
7
+ base_grand_total?: number | null
8
+ base_discount_tax_compensation_amount?: number | null
9
+ base_shipping_amount?: number | null
10
+ base_shipping_discount_tax_compensation_amnt?: number | null
11
+ base_shipping_incl_tax?: number | null
12
+ base_shipping_tax_amount?: number | null
13
+ base_subtotal?: number | null
14
+ base_subtotal_incl_tax?: number | null
15
+ base_tax_amount?: number | null
16
+ base_total_refunded?: number | null
17
+ base_to_global_rate?: number | null
18
+ base_to_order_rate?: number | null
19
+ can_void_flag?: number | null
20
+ discount_amount?: number | null
21
+ discount_description?: string | null
22
+ email_sent?: number | null
23
+ entity_id?: number | null
24
+ global_currency_code?: string | null
25
+ grand_total?: number | null
26
+ discount_tax_compensation_amount?: number | null
27
+ increment_id?: string | null
28
+ is_used_for_refund?: number | null
29
+ order_currency_code?: string | null
30
+ shipping_amount?: number | null
31
+ shipping_discount_tax_compensation_amount?: number | null
32
+ shipping_incl_tax?: number | null
33
+ shipping_tax_amount?: number | null
34
+ state?: number | null
35
+ store_currency_code?: string | null
36
+ store_id?: number | null
37
+ store_to_base_rate?: number | null
38
+ store_to_order_rate?: number | null
39
+ subtotal?: number | null
40
+ subtotal_incl_tax?: number | null
41
+ tax_amount?: number | null
42
+ total_qty?: number | null
43
+ user?: string | null
44
+ plan?: string | null
45
+ service_period?: string | null
46
+ payment_period?: string | null
47
+ }
48
+
49
+
@@ -0,0 +1,39 @@
1
+ import { MeeoviProduct } from './product'
2
+
3
+ export interface MeeoviOrderItem {
4
+ id: number
5
+ quantity?: number | null
6
+ price?: number | null
7
+ }
8
+
9
+ export interface MeeoviOrder {
10
+ id: number
11
+ status?: string | null
12
+ date_created?: string | null
13
+ date_updated?: string | null
14
+ type?: string | null
15
+ adjustment_negative?: number | null
16
+ adjustment_positive?: number | null
17
+ applied_rule_ids?: string | null
18
+ base_adjustment_negative?: number | null
19
+ base_adjustment_positive?: number | null
20
+ base_currency_code?: string | null
21
+ base_discount_amount?: number | null
22
+ base_discount_canceled?: number | null
23
+ base_discount_invoiced?: number | null
24
+ base_discount_refunded?: number | null
25
+ base_grand_total?: number | null
26
+ // many more base_* and other fields omitted for brevity; include as needed
27
+ coupon_code?: string | null
28
+ customer_email?: string | null
29
+ grand_total?: number | null
30
+ order_currency_code?: string | null
31
+ shipping_amount?: number | null
32
+ subtotal?: number | null
33
+ tax_amount?: number | null
34
+ payment_status?: string | null
35
+ user_id?: string | null
36
+ // relations omitted: incentives_orders[], invoices_orders[], order_items_orders[], etc.
37
+ }
38
+
39
+
@@ -0,0 +1,11 @@
1
+ export interface MeeoviPayment {
2
+ id: number
3
+ status?: string | null
4
+ description?: string | null
5
+ gateway?: string | null
6
+ amount?: number | null
7
+ created_at?: string | null
8
+ // relations omitted: payments_countries[], payments_currency[]
9
+ }
10
+
11
+
@@ -0,0 +1,12 @@
1
+ export interface MeeoviCurrency {
2
+ id: number
3
+ sort?: number | null
4
+ date_created?: string | null
5
+ date_updated?: string | null
6
+ name?: string | null
7
+ code?: string | null
8
+ symbol?: string | null
9
+ // relations omitted: countries_currency[], currency_departments[], etc.
10
+ }
11
+
12
+
@@ -0,0 +1,9 @@
1
+ export interface MeeoviProductType {
2
+ id: number
3
+ name?: string | null
4
+ isShippable?: boolean | null
5
+ options?: Record<string, unknown> | null
6
+ // relations omitted: attributes_product_types[], integrations_product_types[], product_types_products[], videos_product_types[]
7
+ }
8
+
9
+
@@ -0,0 +1,23 @@
1
+ export interface MeeoviProduct {
2
+ id: string
3
+ sku?: string | null
4
+ name?: string | null
5
+ tax_class?: string | null
6
+ created_at?: string | null
7
+ content?: string | null
8
+ part_number?: string | null
9
+ file?: string | null
10
+ image?: string | null
11
+ visibility?: boolean | null
12
+ stock?: number | null
13
+ rating?: number | null
14
+ salable_quantity?: string | null
15
+ updated_at?: string | null
16
+ status?: string | null
17
+ price?: number | null
18
+ ratings?: string | null
19
+ uuid?: string | null
20
+ // relations omitted: many relation arrays like Space_products[], brands_products[], variants[], etc.
21
+ }
22
+
23
+
@@ -0,0 +1,10 @@
1
+ export interface MeeoviQuote {
2
+ id: string
3
+ customerId?: string | null
4
+ items: Array<{ productId: string; quantity: number; price: number }>
5
+ total: number
6
+ currency: string
7
+ status?: string | null
8
+ metadata?: Record<string, unknown>
9
+ }
10
+