@meeovi/layer-shared 1.0.0 → 1.0.1
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/nuxt.config.ts +12 -2
- package/package.json +2 -1
- package/src/mappers/createMapper.ts +11 -0
- package/src/mappers/errors.ts +13 -0
- package/src/mappers/index.ts +7 -0
- package/src/mappers/registry.ts +28 -0
- package/src/mappers/testHarness.ts +142 -0
- package/src/mappers/types.ts +6 -0
- package/src/mappers/zodMapper.ts +37 -0
- package/src/runtime/plugin.ts +5 -0
- package/src/runtime/server/tsconfig.json +3 -0
- package/src/schema/commerce/attributes.ts +10 -0
- package/src/schema/commerce/blocks.ts +7 -0
- package/src/schema/commerce/bundleProduts.ts +12 -0
- package/src/schema/commerce/cart.ts +35 -0
- package/src/schema/commerce/category.ts +15 -0
- package/src/schema/commerce/checkout.ts +11 -0
- package/src/schema/commerce/company.ts +8 -0
- package/src/schema/commerce/configurableProducts.ts +11 -0
- package/src/schema/commerce/coupons.ts +10 -0
- package/src/schema/commerce/credit-memos.ts +50 -0
- package/src/schema/commerce/digitalProducts.ts +13 -0
- package/src/schema/commerce/directory.ts +8 -0
- package/src/schema/commerce/events.ts +30 -0
- package/src/schema/commerce/gift-registry.ts +9 -0
- package/src/schema/commerce/guest-cart.ts +6 -0
- package/src/schema/commerce/inventory.ts +9 -0
- package/src/schema/commerce/invoices.ts +49 -0
- package/src/schema/commerce/orders.ts +39 -0
- package/src/schema/commerce/payments.ts +11 -0
- package/src/schema/commerce/price.ts +12 -0
- package/src/schema/commerce/product-types.ts +9 -0
- package/src/schema/commerce/product.ts +23 -0
- package/src/schema/commerce/quotes.ts +10 -0
- package/src/schema/commerce/requisition-lists.ts +7 -0
- package/src/schema/commerce/returns.ts +11 -0
- package/src/schema/commerce/reward.ts +8 -0
- package/src/schema/commerce/rules.ts +8 -0
- package/src/schema/commerce/shipment.ts +21 -0
- package/src/schema/commerce/shops.ts +10 -0
- package/src/schema/commerce/stockItems.ts +8 -0
- package/src/schema/commerce/store.ts +8 -0
- package/src/schema/commerce/subscriptons.ts +11 -0
- package/src/schema/commerce/taxRates.ts +9 -0
- package/src/schema/commerce/taxRules.ts +8 -0
- package/src/schema/commerce/teams.ts +7 -0
- package/src/schema/commerce/transactions.ts +13 -0
- package/src/schema/identity/customerGroup.ts +8 -0
- package/src/schema/identity/user.ts +47 -0
- package/src/schema/media/asset.ts +31 -0
- package/src/schema/social/post.ts +28 -0
- package/src/schema/social/profile.ts +25 -0
- package/src/schema/social/space.ts +19 -0
- package/src/utils/assert.ts +8 -0
- package/src/utils/deepMerge.ts +21 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/isObject.ts +7 -0
- package/src/utils/module.ts +19 -0
- package/src/utils/safeGet.ts +8 -0
- package/app/types/api/global-search.ts +0 -8
- package/app/types/blocks/block-button-group.ts +0 -7
- package/app/types/blocks/block-button.ts +0 -14
- package/app/types/blocks/block-column.ts +0 -20
- package/app/types/blocks/block-cta.ts +0 -10
- package/app/types/blocks/block-divider.ts +0 -4
- package/app/types/blocks/block-faq.ts +0 -12
- package/app/types/blocks/block-form.ts +0 -8
- package/app/types/blocks/block-gallery.ts +0 -14
- package/app/types/blocks/block-hero.ts +0 -12
- package/app/types/blocks/block-html.ts +0 -4
- package/app/types/blocks/block-logocloud.ts +0 -14
- package/app/types/blocks/block-quote.ts +0 -11
- package/app/types/blocks/block-richtext.ts +0 -7
- package/app/types/blocks/block-steps.ts +0 -22
- package/app/types/blocks/block-team.ts +0 -6
- package/app/types/blocks/block-testimonial.ts +0 -14
- package/app/types/blocks/block-video.ts +0 -10
- package/app/types/blocks/block.ts +0 -49
- package/app/types/blocks/index.ts +0 -18
- package/app/types/componentMap.ts +0 -15
- package/app/types/content/category.ts +0 -11
- package/app/types/content/form.ts +0 -20
- package/app/types/content/index.ts +0 -6
- package/app/types/content/page.ts +0 -76
- package/app/types/content/post.ts +0 -39
- package/app/types/content/team.ts +0 -16
- package/app/types/content/testimonial.ts +0 -19
- package/app/types/directus.d.ts +0 -47
- package/app/types/env.d.ts +0 -8
- package/app/types/help/index.ts +0 -53
- package/app/types/index.d.ts +0 -9
- package/app/types/index.ts +0 -7
- package/app/types/meta/analytics.ts +0 -18
- package/app/types/meta/config.ts +0 -21
- package/app/types/meta/globals.ts +0 -30
- package/app/types/meta/index.ts +0 -6
- package/app/types/meta/navigation.ts +0 -32
- package/app/types/meta/redirect.ts +0 -13
- package/app/types/meta/seo.ts +0 -19
- package/app/types/os/contact.ts +0 -23
- package/app/types/os/conversation.ts +0 -25
- package/app/types/os/index.ts +0 -16
- package/app/types/os/organization.ts +0 -54
- package/app/types/os/os-activity.ts +0 -28
- package/app/types/os/os-deal.ts +0 -45
- package/app/types/os/os-expense.ts +0 -22
- package/app/types/os/os-invoice.ts +0 -48
- package/app/types/os/os-item.ts +0 -18
- package/app/types/os/os-payment.ts +0 -29
- package/app/types/os/os-project.ts +0 -47
- package/app/types/os/os-proposal.ts +0 -84
- package/app/types/os/os-settings.ts +0 -19
- package/app/types/os/os-subscription.ts +0 -12
- package/app/types/os/os-task.ts +0 -34
- package/app/types/os/os-tax-rate.ts +0 -13
- package/app/types/pageComponentMap.ts +0 -8
- package/app/types/schema.d.ts +0 -39
- package/app/types/schema.ts +0 -151
- package/app/types/system/file.ts +0 -46
- package/app/types/system/folder.ts +0 -8
- package/app/types/system/index.ts +0 -4
- package/app/types/system/role.ts +0 -21
- package/app/types/system/user.ts +0 -56
package/nuxt.config.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
defineNuxtConfig
|
|
3
3
|
} from 'nuxt/config'
|
|
4
4
|
|
|
5
|
-
export default defineNuxtConfig({
|
|
5
|
+
export default defineNuxtConfig({
|
|
6
|
+
$meta: {
|
|
7
|
+
name: 'shared',
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
modules: [
|
|
11
|
+
'nuxt-tiptap-editor',
|
|
12
|
+
],
|
|
13
|
+
|
|
14
|
+
runtimeConfig: {}
|
|
15
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meeovi/layer-shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Shared Layer for the Alternate Framework",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"lg-video": "^1.4.0",
|
|
22
22
|
"lg-zoom": "^1.3.0",
|
|
23
23
|
"lightgallery": "^2.9.0",
|
|
24
|
+
"nuxt-tiptap-editor": "^3.2.0",
|
|
24
25
|
"tailwindcss": "^4.1.18",
|
|
25
26
|
"vuetify-nuxt-module": "^0.18.8"
|
|
26
27
|
},
|
|
@@ -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,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,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,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 { 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,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,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,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,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
|
+
|