@merkaly/api 0.9.0 → 0.10.0
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/integration/supplier/product.d.ts +9 -0
- package/dist/inventory/catalog/product/product.entity.d.ts +4 -0
- package/dist/inventory/catalog/variant/index.d.ts +1 -0
- package/dist/inventory/catalog/variant/variant.entity.d.ts +3 -0
- package/dist/inventory/catalog/variant/variant.option.entity.d.ts +16 -0
- package/dist/settings/organization/organization.contract.d.ts +2 -0
- package/dist/settings/organization/request.validator.d.ts +2 -0
- package/dist/settings/organization/request.validator.js +16 -0
- package/package.json +1 -1
|
@@ -4,9 +4,18 @@ export interface SupplierProductAsset {
|
|
|
4
4
|
type: AssetType;
|
|
5
5
|
url: string;
|
|
6
6
|
}
|
|
7
|
+
export interface SupplierProductOption {
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
externalNameId: string;
|
|
12
|
+
externalValueId: string;
|
|
13
|
+
}
|
|
7
14
|
export interface SupplierProductVariant {
|
|
8
15
|
externalVariantId: string;
|
|
9
16
|
name: string;
|
|
17
|
+
options: SupplierProductOption[];
|
|
18
|
+
shipsFrom?: SupplierProductOption;
|
|
10
19
|
supplierPrice: number;
|
|
11
20
|
stock: number;
|
|
12
21
|
picture?: string;
|
|
@@ -21,5 +21,9 @@ export declare class CatalogProductEntity extends AbstractEntity {
|
|
|
21
21
|
hashtags: string[];
|
|
22
22
|
readonly picture: AssetEntity;
|
|
23
23
|
readonly assets: AssetEntity[];
|
|
24
|
+
readonly options: {
|
|
25
|
+
name: string;
|
|
26
|
+
values: string[];
|
|
27
|
+
}[];
|
|
24
28
|
readonly variants: CatalogVariantEntity[];
|
|
25
29
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AssetEntity } from '../../../assets/asset';
|
|
2
2
|
import { AbstractEntity } from '../../../abstract.entity.js';
|
|
3
|
+
import { CatalogVariantOptionEntity } from './variant.option.entity.js';
|
|
3
4
|
import type { CatalogProductEntity } from '../product';
|
|
4
5
|
export declare class CatalogVariantEntity extends AbstractEntity {
|
|
5
6
|
product: CatalogProductEntity;
|
|
@@ -8,5 +9,7 @@ export declare class CatalogVariantEntity extends AbstractEntity {
|
|
|
8
9
|
active: boolean;
|
|
9
10
|
picture?: AssetEntity;
|
|
10
11
|
assets: AssetEntity[];
|
|
12
|
+
options: CatalogVariantOptionEntity[];
|
|
13
|
+
shipsFrom?: CatalogVariantOptionEntity;
|
|
11
14
|
externalVariantId?: string;
|
|
12
15
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class CatalogVariantOptionEntity {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
externalNameId?: string;
|
|
6
|
+
externalValueId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CatalogVariantOptionSchema: import("mongoose").Schema<CatalogVariantOptionEntity, import("mongoose").Model<CatalogVariantOptionEntity, any, any, any, import("mongoose").Document<unknown, any, CatalogVariantOptionEntity, any, {}> & CatalogVariantOptionEntity & {
|
|
9
|
+
_id: import("mongoose").Types.ObjectId;
|
|
10
|
+
} & {
|
|
11
|
+
__v: number;
|
|
12
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CatalogVariantOptionEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CatalogVariantOptionEntity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<CatalogVariantOptionEntity> & {
|
|
13
|
+
_id: import("mongoose").Types.ObjectId;
|
|
14
|
+
} & {
|
|
15
|
+
__v: number;
|
|
16
|
+
}>;
|
|
@@ -18,7 +18,9 @@ export interface SettingsOrganizationContactContract {
|
|
|
18
18
|
website?: string;
|
|
19
19
|
}
|
|
20
20
|
export interface SettingsOrganizationLocalizationContract {
|
|
21
|
+
country?: string;
|
|
21
22
|
currency?: string;
|
|
23
|
+
language?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface SettingsOrganizationIdentityContract {
|
|
24
26
|
legalName?: string;
|
|
@@ -22,7 +22,9 @@ export declare class UpdateOrganizationContactRequestValidator extends AbstractR
|
|
|
22
22
|
constructor(contact?: SettingsOrganizationContactContract);
|
|
23
23
|
}
|
|
24
24
|
export declare class UpdateOrganizationLocalizationRequestValidator extends AbstractRequestValidator {
|
|
25
|
+
country?: string;
|
|
25
26
|
currency?: string;
|
|
27
|
+
language?: string;
|
|
26
28
|
constructor(localization?: SettingsOrganizationLocalizationContract);
|
|
27
29
|
}
|
|
28
30
|
export declare class UpdateOrganizationIdentityRequestValidator extends AbstractRequestValidator {
|
|
@@ -121,18 +121,34 @@ __decorate([
|
|
|
121
121
|
__metadata("design:type", String)
|
|
122
122
|
], UpdateOrganizationContactRequestValidator.prototype, "website", void 0);
|
|
123
123
|
export class UpdateOrganizationLocalizationRequestValidator extends abstract_validator_1.AbstractRequestValidator {
|
|
124
|
+
country;
|
|
124
125
|
currency;
|
|
126
|
+
language;
|
|
125
127
|
constructor(localization) {
|
|
126
128
|
super();
|
|
129
|
+
this.country = localization?.country;
|
|
127
130
|
this.currency = localization?.currency;
|
|
131
|
+
this.language = localization?.language;
|
|
128
132
|
}
|
|
129
133
|
}
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, class_validator_1.IsString)(),
|
|
136
|
+
(0, class_validator_1.Length)(2, 2),
|
|
137
|
+
(0, class_validator_1.IsOptional)(),
|
|
138
|
+
__metadata("design:type", String)
|
|
139
|
+
], UpdateOrganizationLocalizationRequestValidator.prototype, "country", void 0);
|
|
130
140
|
__decorate([
|
|
131
141
|
(0, class_validator_1.IsString)(),
|
|
132
142
|
(0, class_validator_1.Length)(0, 3),
|
|
133
143
|
(0, class_validator_1.IsOptional)(),
|
|
134
144
|
__metadata("design:type", String)
|
|
135
145
|
], UpdateOrganizationLocalizationRequestValidator.prototype, "currency", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, class_validator_1.IsString)(),
|
|
148
|
+
(0, class_validator_1.Length)(2, 5),
|
|
149
|
+
(0, class_validator_1.IsOptional)(),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], UpdateOrganizationLocalizationRequestValidator.prototype, "language", void 0);
|
|
136
152
|
export class UpdateOrganizationIdentityRequestValidator extends abstract_validator_1.AbstractRequestValidator {
|
|
137
153
|
legalName;
|
|
138
154
|
name;
|