shopify-taxonomy-core
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -1,2 +0,3 @@ | ||
import { TaxonomyCategory, TaxonomyLanguage } from "./types"; | ||
import { TaxonomyLanguage, TaxonomyLanguageName } from "./locale"; | ||
import { TaxonomyCategory } from "./types"; | ||
export default class ShopifyTaxonomyClient { | ||
@@ -13,3 +14,3 @@ private language; | ||
} | ||
export { TaxonomyLanguage }; | ||
export { TaxonomyLanguage, TaxonomyLanguageName }; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TaxonomyLanguage = void 0; | ||
exports.TaxonomyLanguageName = exports.TaxonomyLanguage = void 0; | ||
const load_1 = require("./load"); | ||
const locale_1 = require("./locale"); | ||
Object.defineProperty(exports, "TaxonomyLanguage", { enumerable: true, get: function () { return locale_1.TaxonomyLanguage; } }); | ||
Object.defineProperty(exports, "TaxonomyLanguageName", { enumerable: true, get: function () { return locale_1.TaxonomyLanguageName; } }); | ||
const types_1 = require("./types"); | ||
Object.defineProperty(exports, "TaxonomyLanguage", { enumerable: true, get: function () { return types_1.TaxonomyLanguage; } }); | ||
class ShopifyTaxonomyClient { | ||
constructor({ language = types_1.TaxonomyLanguage.English, definitionsFolderPath = "./", }) { | ||
constructor({ language = locale_1.TaxonomyLanguage.English, definitionsFolderPath = "./", }) { | ||
this.language = language; | ||
@@ -10,0 +12,0 @@ this.taxonomyTree = (0, load_1.loadTaxonomyTree)(definitionsFolderPath, language); |
@@ -1,2 +0,2 @@ | ||
import { TaxonomyLanguage } from "./types"; | ||
import { TaxonomyLanguage } from "./locale"; | ||
export declare function loadTaxonomyTree(directory: string | undefined, language: TaxonomyLanguage): { | ||
@@ -3,0 +3,0 @@ version: string; |
import { z } from "zod"; | ||
export declare enum TaxonomyLanguage { | ||
Danish = "da", | ||
German = "de", | ||
English = "en", | ||
Spanish = "es", | ||
Finnish = "fi", | ||
French = "fr", | ||
Italy = "it", | ||
Japanese = "ja", | ||
Korean = "ko", | ||
Dutch = "nl", | ||
Polish = "pl", | ||
BrazilianPortuguese = "pt-BR", | ||
Portuguese = "pt-PT", | ||
Chinese = "zh-CN" | ||
} | ||
export declare const CATEGORY_ID_REGEXP: RegExp; | ||
@@ -19,0 +3,0 @@ declare const TaxonomyTreeVerticalCategoryValidator: z.ZodObject<{ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TaxonomyTreeValidator = exports.CATEGORY_ID_REGEXP = exports.TaxonomyLanguage = void 0; | ||
exports.TaxonomyTreeValidator = exports.CATEGORY_ID_REGEXP = void 0; | ||
const zod_1 = require("zod"); | ||
var TaxonomyLanguage; | ||
(function (TaxonomyLanguage) { | ||
TaxonomyLanguage["Danish"] = "da"; | ||
TaxonomyLanguage["German"] = "de"; | ||
TaxonomyLanguage["English"] = "en"; | ||
TaxonomyLanguage["Spanish"] = "es"; | ||
TaxonomyLanguage["Finnish"] = "fi"; | ||
TaxonomyLanguage["French"] = "fr"; | ||
TaxonomyLanguage["Italy"] = "it"; | ||
TaxonomyLanguage["Japanese"] = "ja"; | ||
TaxonomyLanguage["Korean"] = "ko"; | ||
TaxonomyLanguage["Dutch"] = "nl"; | ||
TaxonomyLanguage["Polish"] = "pl"; | ||
TaxonomyLanguage["BrazilianPortuguese"] = "pt-BR"; | ||
TaxonomyLanguage["Portuguese"] = "pt-PT"; | ||
TaxonomyLanguage["Chinese"] = "zh-CN"; | ||
})(TaxonomyLanguage || (exports.TaxonomyLanguage = TaxonomyLanguage = {})); | ||
exports.CATEGORY_ID_REGEXP = new RegExp(/^[a-z]{2}((-[0-9]+)*)$/); | ||
@@ -23,0 +6,0 @@ const TaxonomyTreeVerticalCategoryValidator = zod_1.z.object({ |
@@ -58,3 +58,3 @@ { | ||
}, | ||
"version": "1.0.1" | ||
"version": "1.1.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
50631
19
287