@maioradv/cms-basic-lib 1.6.2 → 1.6.4
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/configs/graphql.js +0 -2
- package/dist/configs/index.d.ts +1 -1
- package/dist/configs/model.d.ts +0 -2
- package/dist/configs/services/tidelizio.config.d.ts +25 -0
- package/dist/configs/services/tidelizio.config.js +9 -0
- package/dist/gid.d.ts +13 -0
- package/dist/gid.js +15 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/configs/graphql.js
CHANGED
|
@@ -43,7 +43,6 @@ exports.ConfigsResolvers = {
|
|
|
43
43
|
allowGoogleAnalytics
|
|
44
44
|
allowMetaPixel
|
|
45
45
|
allowGoogleTagManager
|
|
46
|
-
accountsApiToken
|
|
47
46
|
allowAdvancedMenu
|
|
48
47
|
allowDiscounts
|
|
49
48
|
allowBundles
|
|
@@ -52,7 +51,6 @@ exports.ConfigsResolvers = {
|
|
|
52
51
|
allowProductVideo
|
|
53
52
|
allowCustomProductModal
|
|
54
53
|
allowCustomTheme
|
|
55
|
-
dashboardId
|
|
56
54
|
maxMenuCollectionNumber
|
|
57
55
|
maxProductImageNumber
|
|
58
56
|
maxProductsCollectionNumber
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { PaginatedDto, PaginatedGQL } from "../core/dto/pagination";
|
|
|
2
2
|
import { RemoveGQL } from "../core/model/remove-gql.response";
|
|
3
3
|
import { RestApiModuleI, ApiModule, GraphApiModuleI } from "../model";
|
|
4
4
|
import { QueryConfigGQLDto } from "./graphql";
|
|
5
|
-
import { TiDelizioConfig, TiDelizioPlan } from "./services/
|
|
5
|
+
import { TiDelizioConfig, TiDelizioPlan } from "./services/tidelizio.config";
|
|
6
6
|
import { Config, CreateConfigDto, PutConfigDto, QueryConfigDto, UpdateConfigDto } from "./types";
|
|
7
7
|
export default class Configs extends ApiModule implements RestApiModuleI, GraphApiModuleI {
|
|
8
8
|
create(args: CreateConfigDto): Promise<Config>;
|
package/dist/configs/model.d.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ServiceConfig } from "../model";
|
|
2
|
+
export declare enum TiDelizioPlan {
|
|
3
|
+
standard = "standard",
|
|
4
|
+
plus = "plus",
|
|
5
|
+
premium = "premium"
|
|
6
|
+
}
|
|
7
|
+
export interface TiDelizioConfig extends ServiceConfig {
|
|
8
|
+
allowGoogleAnalytics?: boolean;
|
|
9
|
+
allowMetaPixel?: boolean;
|
|
10
|
+
allowGoogleTagManager?: boolean;
|
|
11
|
+
allowAdvancedMenu?: boolean;
|
|
12
|
+
allowDiscounts?: boolean;
|
|
13
|
+
allowBundles?: boolean;
|
|
14
|
+
allowCustomProductModal?: boolean;
|
|
15
|
+
allowLocalization?: boolean;
|
|
16
|
+
allowProductVideo?: boolean;
|
|
17
|
+
allowPopup?: boolean;
|
|
18
|
+
allowCustomTheme?: boolean;
|
|
19
|
+
plan?: TiDelizioPlan;
|
|
20
|
+
qrLinkRedirect?: string;
|
|
21
|
+
maxMenuCollectionNumber?: number;
|
|
22
|
+
maxProductsCollectionNumber?: number;
|
|
23
|
+
maxProductImageNumber?: number;
|
|
24
|
+
maxAdditionalLanguages?: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TiDelizioPlan = void 0;
|
|
4
|
+
var TiDelizioPlan;
|
|
5
|
+
(function (TiDelizioPlan) {
|
|
6
|
+
TiDelizioPlan["standard"] = "standard";
|
|
7
|
+
TiDelizioPlan["plus"] = "plus";
|
|
8
|
+
TiDelizioPlan["premium"] = "premium";
|
|
9
|
+
})(TiDelizioPlan || (exports.TiDelizioPlan = TiDelizioPlan = {}));
|
package/dist/gid.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type GlobalEntities = {
|
|
2
|
+
tidelizio: 'Product' | 'ProductVariant' | 'Bundle' | 'BundleVariant' | 'Collection';
|
|
3
|
+
accounts: 'Customer' | 'Dashboard';
|
|
4
|
+
};
|
|
5
|
+
export type Namespace = keyof GlobalEntities;
|
|
6
|
+
export type Entity<N extends Namespace> = GlobalEntities[N];
|
|
7
|
+
export type Gid<N extends Namespace> = `gid://${N}/${Entity<N>}/${number}`;
|
|
8
|
+
export declare function toGlobalId<N extends Namespace, E extends Entity<N>>(namespace: N, entity: E, id: number): Gid<N>;
|
|
9
|
+
export declare function fromGlobalId<T extends Gid<Namespace>>(gid: T): {
|
|
10
|
+
namespace: Namespace;
|
|
11
|
+
entity: GlobalEntities[Namespace];
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
package/dist/gid.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toGlobalId = toGlobalId;
|
|
4
|
+
exports.fromGlobalId = fromGlobalId;
|
|
5
|
+
function toGlobalId(namespace, entity, id) {
|
|
6
|
+
return `gid://${namespace}/${entity}/${id}`;
|
|
7
|
+
}
|
|
8
|
+
function fromGlobalId(gid) {
|
|
9
|
+
const [, , namespace, entity, id] = gid.split("/");
|
|
10
|
+
return {
|
|
11
|
+
namespace: namespace,
|
|
12
|
+
entity: entity,
|
|
13
|
+
id: id,
|
|
14
|
+
};
|
|
15
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './products/types';
|
|
|
17
17
|
export * from './roles/types';
|
|
18
18
|
export * from './settings/types';
|
|
19
19
|
export * from './bundles/types';
|
|
20
|
+
export * from './gid';
|
|
20
21
|
export * from './core/dto/pagination';
|
|
21
|
-
export { TiDelizioPlan, TiDelizioConfig } from './configs/services/
|
|
22
|
+
export { TiDelizioPlan, TiDelizioConfig } from './configs/services/tidelizio.config';
|
|
22
23
|
export declare function maiorCmsApiClient(opt: MaiorCmsApiConfigs): MaiorCmsApiClient;
|
package/dist/index.js
CHANGED
|
@@ -33,9 +33,10 @@ __exportStar(require("./products/types"), exports);
|
|
|
33
33
|
__exportStar(require("./roles/types"), exports);
|
|
34
34
|
__exportStar(require("./settings/types"), exports);
|
|
35
35
|
__exportStar(require("./bundles/types"), exports);
|
|
36
|
+
__exportStar(require("./gid"), exports);
|
|
36
37
|
__exportStar(require("./core/dto/pagination"), exports);
|
|
37
|
-
var
|
|
38
|
-
Object.defineProperty(exports, "TiDelizioPlan", { enumerable: true, get: function () { return
|
|
38
|
+
var tidelizio_config_1 = require("./configs/services/tidelizio.config");
|
|
39
|
+
Object.defineProperty(exports, "TiDelizioPlan", { enumerable: true, get: function () { return tidelizio_config_1.TiDelizioPlan; } });
|
|
39
40
|
function maiorCmsApiClient(opt) {
|
|
40
41
|
return new client_1.MaiorCmsApiClient(opt);
|
|
41
42
|
}
|