@semiont/api-client 0.1.0 → 0.2.0-build.11

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
@@ -1,5 +1,9 @@
1
1
  # @semiont/api-client
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@semiont/api-client.svg)](https://www.npmjs.com/package/@semiont/api-client)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@semiont/api-client.svg)](https://www.npmjs.com/package/@semiont/api-client)
5
+ [![License](https://img.shields.io/npm/l/@semiont/api-client.svg)](https://github.com/The-AI-Alliance/semiont/blob/main/LICENSE)
6
+
3
7
  TypeScript SDK for [Semiont](https://github.com/The-AI-Alliance/semiont) - a knowledge management system for semantic annotations, AI-powered entity detection, and collaborative document analysis.
4
8
 
5
9
  ## What is Semiont?
@@ -17,10 +21,18 @@ Semiont lets you:
17
21
 
18
22
  ## Installation
19
23
 
24
+ Install the latest stable release from npm:
25
+
20
26
  ```bash
21
27
  npm install @semiont/api-client
22
28
  ```
23
29
 
30
+ Or install the latest development build:
31
+
32
+ ```bash
33
+ npm install @semiont/api-client@dev
34
+ ```
35
+
24
36
  **Prerequisites**: Semiont backend running. See [Running the Backend](../../apps/backend/README.md#quick-start) for setup.
25
37
 
26
38
  ## Quick Start
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semiont/api-client",
3
- "version": "0.1.0",
3
+ "version": "0.2.0-build.11",
4
4
  "description": "Semiont API SDK - types, client, and utilities",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,19 +0,0 @@
1
- /**
2
- * Branded URI types for compile-time type safety.
3
- *
4
- * These types are in api-client because they deal with HTTP URIs
5
- * returned by the API, not internal IDs.
6
- */
7
- export type ResourceUri = string & {
8
- readonly __brand: 'ResourceUri';
9
- };
10
- export type AnnotationUri = string & {
11
- readonly __brand: 'AnnotationUri';
12
- };
13
- export type ResourceAnnotationUri = string & {
14
- readonly __brand: 'ResourceAnnotationUri';
15
- };
16
- export declare function resourceUri(uri: string): ResourceUri;
17
- export declare function annotationUri(uri: string): AnnotationUri;
18
- export declare function resourceAnnotationUri(uri: string): ResourceAnnotationUri;
19
- //# sourceMappingURL=uri-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uri-types.d.ts","sourceRoot":"","sources":["../src/uri-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC;AAGvE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAG3E,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAG3F,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAKpD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAKxD;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CASxE"}
package/dist/uri-types.js DELETED
@@ -1,35 +0,0 @@
1
- "use strict";
2
- /**
3
- * Branded URI types for compile-time type safety.
4
- *
5
- * These types are in api-client because they deal with HTTP URIs
6
- * returned by the API, not internal IDs.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.resourceUri = resourceUri;
10
- exports.annotationUri = annotationUri;
11
- exports.resourceAnnotationUri = resourceAnnotationUri;
12
- // Factory functions with runtime validation
13
- function resourceUri(uri) {
14
- if (!uri.startsWith('http://') && !uri.startsWith('https://')) {
15
- throw new TypeError(`Expected ResourceUri, got: ${uri}`);
16
- }
17
- return uri;
18
- }
19
- function annotationUri(uri) {
20
- if (!uri.startsWith('http://') && !uri.startsWith('https://')) {
21
- throw new TypeError(`Expected AnnotationUri, got: ${uri}`);
22
- }
23
- return uri;
24
- }
25
- function resourceAnnotationUri(uri) {
26
- if (!uri.startsWith('http://') && !uri.startsWith('https://')) {
27
- throw new TypeError(`Expected ResourceAnnotationUri, got: ${uri}`);
28
- }
29
- // Additional validation: must contain /resources/ and /annotations/
30
- if (!uri.includes('/resources/') || !uri.includes('/annotations/')) {
31
- throw new TypeError(`Expected nested ResourceAnnotationUri format, got: ${uri}`);
32
- }
33
- return uri;
34
- }
35
- //# sourceMappingURL=uri-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uri-types.js","sourceRoot":"","sources":["../src/uri-types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAYH,kCAKC;AAED,sCAKC;AAED,sDASC;AAxBD,4CAA4C;AAC5C,SAAgB,WAAW,CAAC,GAAW;IACrC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,SAAS,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,GAAkB,CAAC;AAC5B,CAAC;AAED,SAAgB,aAAa,CAAC,GAAW;IACvC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,SAAS,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,GAAoB,CAAC;AAC9B,CAAC;AAED,SAAgB,qBAAqB,CAAC,GAAW;IAC/C,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,SAAS,CAAC,wCAAwC,GAAG,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,oEAAoE;IACpE,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,SAAS,CAAC,sDAAsD,GAAG,EAAE,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,GAA4B,CAAC;AACtC,CAAC"}