@maioradv/cms-basic-lib 1.6.1 → 1.6.3
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/bundles/graphql.js +6 -0
- package/dist/bundles/types.d.ts +3 -0
- package/dist/gid.d.ts +13 -0
- package/dist/gid.js +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/products/graphql.js +6 -0
- package/dist/products/types.d.ts +3 -0
- package/package.json +1 -1
package/dist/bundles/graphql.js
CHANGED
package/dist/bundles/types.d.ts
CHANGED
|
@@ -19,8 +19,11 @@ export type Bundle = {
|
|
|
19
19
|
};
|
|
20
20
|
export type BundleVariant = {
|
|
21
21
|
id: number;
|
|
22
|
+
title: string | null;
|
|
23
|
+
subtitle: string | null;
|
|
22
24
|
description: string | null;
|
|
23
25
|
translations: Translation[];
|
|
26
|
+
metafields: Metafield[];
|
|
24
27
|
price: number | null;
|
|
25
28
|
fullPrice: number | null;
|
|
26
29
|
bundleId: number;
|
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
22
|
export { TiDelizioPlan, TiDelizioConfig } from './configs/services/ti-delizio.config';
|
|
22
23
|
export declare function maiorCmsApiClient(opt: MaiorCmsApiConfigs): MaiorCmsApiClient;
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __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
38
|
var ti_delizio_config_1 = require("./configs/services/ti-delizio.config");
|
|
38
39
|
Object.defineProperty(exports, "TiDelizioPlan", { enumerable: true, get: function () { return ti_delizio_config_1.TiDelizioPlan; } });
|
package/dist/products/graphql.js
CHANGED
package/dist/products/types.d.ts
CHANGED
|
@@ -21,8 +21,11 @@ export type Product = {
|
|
|
21
21
|
};
|
|
22
22
|
export type ProductVariant = {
|
|
23
23
|
id: number;
|
|
24
|
+
title: string | null;
|
|
25
|
+
subtitle: string | null;
|
|
24
26
|
description: string | null;
|
|
25
27
|
translations: Translation[];
|
|
28
|
+
metafields: Metafield[];
|
|
26
29
|
price: number | null;
|
|
27
30
|
fullPrice: number | null;
|
|
28
31
|
productId: number;
|