@localess/js-client 0.0.5-next.20240528-193539.0 → 0.0.5-next.20240531-164126.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/README.md CHANGED
@@ -32,13 +32,20 @@ yarn add @localess/js-client@latest
32
32
  import {localessClient} from "@localess/js-client";
33
33
 
34
34
  const llClient = localessClient({
35
- origin: 'https://my-localess.web.app', // A fully qualified domain name with protocol (http/https) and port.
36
- spaceId: 'I1LoVe2LocaLess4Rever', // Localess space ID, cna be found in the Localess Space settings
37
- token: 'Baz00KaT0KeN8S3CureLL' // Localess API token, can be found in the Localess Space settings
35
+ // A fully qualified domain name with protocol (http/https) and port.
36
+ origin: 'https://my-localess.web.app',
37
+ // Localess space ID, cna be found in the Localess Space settings
38
+ spaceId: 'I1LoVe2LocaLess4Rever',
39
+ // Localess API token, can be found in the Localess Space settings
40
+ token: 'Baz00KaT0KeN8S3CureLL'
38
41
  });
39
42
 
40
- llClient.getLinks() // Fetch all Content Links
41
- llClient.getContentBySlug('docs/overview') // Fetch content by SLUG
42
- llClient.getContentById('FRnIT7CUABoRCdSVVGGs') // Fetch content by ID
43
- llClient.getTranslations('en') // Fetch translations by locale
43
+ // Fetch all Content Links
44
+ llClient.getLinks()
45
+ // Fetch content by SLUG
46
+ llClient.getContentBySlug('docs/overview')
47
+ // Fetch content by ID
48
+ llClient.getContentById('FRnIT7CUABoRCdSVVGGs')
49
+ // Fetch translations by locale
50
+ llClient.getTranslations('en')
44
51
  ````
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Content Link define reference to a Link.
3
+ */
4
+ export interface ContentLink {
5
+ /**
6
+ * Define the type of Link
7
+ */
8
+ kind: 'LINK';
9
+ /**
10
+ * Define the target of the link. _blank for new tab and _self for same tab.
11
+ */
12
+ target: '_blank' | '_self';
13
+ /**
14
+ * Define the type of Link. URL for external links and Content for internal links.
15
+ */
16
+ type: 'url' | 'content';
17
+ /**
18
+ * If type is content, then it will be Content ID. Otherwise it will be URL.
19
+ */
20
+ uri: string;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=content-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-link.js","sourceRoot":"","sources":["../../../src/models/content-link.ts"],"names":[],"mappings":""}
@@ -1,6 +1,7 @@
1
1
  export * from './content';
2
2
  export * from './content-asset';
3
3
  export * from './content-data';
4
+ export * from './content-link';
4
5
  export * from './content-metadata';
5
6
  export * from './links';
6
7
  export * from './translations';
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./content"), exports);
18
18
  __exportStar(require("./content-asset"), exports);
19
19
  __exportStar(require("./content-data"), exports);
20
+ __exportStar(require("./content-link"), exports);
20
21
  __exportStar(require("./content-metadata"), exports);
21
22
  __exportStar(require("./links"), exports);
22
23
  __exportStar(require("./translations"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,iDAA+B;AAC/B,qDAAmC;AACnC,0CAAwB;AACxB,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,iDAA+B;AAC/B,iDAA+B;AAC/B,qDAAmC;AACnC,0CAAwB;AACxB,iDAA+B"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Content Link define reference to a Link.
3
+ */
4
+ export interface ContentLink {
5
+ /**
6
+ * Define the type of Link
7
+ */
8
+ kind: 'LINK';
9
+ /**
10
+ * Define the target of the link. _blank for new tab and _self for same tab.
11
+ */
12
+ target: '_blank' | '_self';
13
+ /**
14
+ * Define the type of Link. URL for external links and Content for internal links.
15
+ */
16
+ type: 'url' | 'content';
17
+ /**
18
+ * If type is content, then it will be Content ID. Otherwise it will be URL.
19
+ */
20
+ uri: string;
21
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=content-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-link.js","sourceRoot":"","sources":["../../src/models/content-link.ts"],"names":[],"mappings":""}
@@ -1,6 +1,7 @@
1
1
  export * from './content';
2
2
  export * from './content-asset';
3
3
  export * from './content-data';
4
+ export * from './content-link';
4
5
  export * from './content-metadata';
5
6
  export * from './links';
6
7
  export * from './translations';
@@ -1,6 +1,7 @@
1
1
  export * from './content';
2
2
  export * from './content-asset';
3
3
  export * from './content-data';
4
+ export * from './content-link';
4
5
  export * from './content-metadata';
5
6
  export * from './links';
6
7
  export * from './translations';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localess/js-client",
3
- "version": "0.0.5-next.20240528-193539.0",
3
+ "version": "0.0.5-next.20240531-164126.0",
4
4
  "description": "Universal JavaScript/TypeScript SDK for Localess's API.",
5
5
  "keywords": [
6
6
  "localess",
@@ -11,7 +11,7 @@
11
11
  "typescript"
12
12
  ],
13
13
  "author": "Lessify",
14
- "homepage": "https://localess.org",
14
+ "homepage": "https://github.com/Lessify/localess-js-client",
15
15
  "sideEffects": false,
16
16
  "files": [
17
17
  "dist"
@@ -26,7 +26,8 @@
26
26
  "types": "./dist/index.d.ts",
27
27
  "default": "./dist/index.js",
28
28
  "node": "./dist/cjs/index.js"
29
- }
29
+ },
30
+ "./models": "./dist/models/index.d.ts"
30
31
  },
31
32
  "repository": {
32
33
  "type": "git",