@xylabs/api 4.13.13 → 4.13.15

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.
@@ -0,0 +1,9 @@
1
+ import { ApiStage } from './ApiStage.ts';
2
+ declare abstract class ApiClient {
3
+ protected token?: string | null | undefined;
4
+ protected stage?: ApiStage | undefined;
5
+ constructor(token?: string | null | undefined, stage?: ApiStage | undefined);
6
+ abstract endPoint(): string;
7
+ }
8
+ export { ApiClient };
9
+ //# sourceMappingURL=ApiClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiClient.d.ts","sourceRoot":"","sources":["../../src/ApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,uBAAe,SAAS;IAEpB,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAC/B,SAAS,CAAC,KAAK,CAAC,EAAE,QAAQ;gBADhB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,YAAA,EACrB,KAAK,CAAC,EAAE,QAAQ,YAAA;IAM5B,QAAQ,CAAC,QAAQ,IAAI,MAAM;CAC5B;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,8 @@
1
+ interface ApiConfig {
2
+ apiDomain: string;
3
+ apiKey?: string;
4
+ jwtToken?: string;
5
+ userid?: string;
6
+ }
7
+ export type { ApiConfig };
8
+ //# sourceMappingURL=ApiConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiConfig.d.ts","sourceRoot":"","sources":["../../src/ApiConfig.ts"],"names":[],"mappings":"AAAA,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,YAAY,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { ApiConfig } from './ApiConfig.ts';
2
+ declare class ApiEndpoint<T> {
3
+ private _value?;
4
+ private config;
5
+ private path;
6
+ constructor(config: ApiConfig, path: string);
7
+ get value(): T | undefined;
8
+ private get headers();
9
+ private get url();
10
+ fetch(): Promise<T>;
11
+ get(): Promise<T | NonNullable<T>>;
12
+ insert(value: T): Promise<T>;
13
+ }
14
+ export { ApiEndpoint };
15
+ //# sourceMappingURL=ApiEndpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiEndpoint.d.ts","sourceRoot":"","sources":["../../src/ApiEndpoint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,cAAM,WAAW,CAAC,CAAC;IACjB,OAAO,CAAC,MAAM,CAAC,CAAG;IAClB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,IAAI,CAAQ;gBAER,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM;IAK3C,IAAI,KAAK,kBAER;IAED,OAAO,KAAK,OAAO,GAElB;IAED,OAAO,KAAK,GAAG,GAEd;IAEK,KAAK;IAUL,GAAG;IAIH,MAAM,CAAC,KAAK,EAAE,CAAC;CAStB;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { EnumValue } from '@xylabs/enum';
2
+ import { Enum } from '@xylabs/enum';
3
+ export declare const ApiStage: Enum<{
4
+ Beta: "beta";
5
+ Local: "local";
6
+ Prod: "prod";
7
+ }>;
8
+ export type ApiStage = EnumValue<typeof ApiStage>;
9
+ //# sourceMappingURL=ApiStage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiStage.d.ts","sourceRoot":"","sources":["../../src/ApiStage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,eAAO,MAAM,QAAQ;;;;EAInB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const getApiStage: (hostname: string) => "beta" | "local" | "prod";
2
+ export { getApiStage };
3
+ //# sourceMappingURL=getApiStage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getApiStage.d.ts","sourceRoot":"","sources":["../../src/getApiStage.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,GAAI,UAAU,MAAM,8BAQpC,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './ApiClient.ts';
2
+ export * from './ApiConfig.ts';
3
+ export * from './ApiEndpoint.ts';
4
+ export * from './ApiStage.ts';
5
+ export * from './getApiStage.ts';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA"}
@@ -13,6 +13,7 @@ declare abstract class ApiClient {
13
13
  constructor(token?: string | null | undefined, stage?: ApiStage | undefined);
14
14
  abstract endPoint(): string;
15
15
  }
16
+ //# sourceMappingURL=ApiClient.d.ts.map
16
17
 
17
18
  interface ApiConfig {
18
19
  apiDomain: string;
@@ -20,6 +21,7 @@ interface ApiConfig {
20
21
  jwtToken?: string;
21
22
  userid?: string;
22
23
  }
24
+ //# sourceMappingURL=ApiConfig.d.ts.map
23
25
 
24
26
  declare class ApiEndpoint<T> {
25
27
  private _value?;
@@ -33,8 +35,10 @@ declare class ApiEndpoint<T> {
33
35
  get(): Promise<T | NonNullable<T>>;
34
36
  insert(value: T): Promise<T>;
35
37
  }
38
+ //# sourceMappingURL=ApiEndpoint.d.ts.map
36
39
 
37
40
  declare const getApiStage: (hostname: string) => "beta" | "local" | "prod";
41
+ //# sourceMappingURL=getApiStage.d.ts.map
38
42
 
39
43
  export { ApiClient, ApiEndpoint, ApiStage, getApiStage };
40
44
  export type { ApiConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/api",
3
- "version": "4.13.13",
3
+ "version": "4.13.15",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -38,13 +38,13 @@
38
38
  "packages/**/*"
39
39
  ],
40
40
  "dependencies": {
41
- "@xylabs/enum": "^4.13.13",
42
- "@xylabs/typeof": "^4.13.13",
41
+ "@xylabs/enum": "^4.13.15",
42
+ "@xylabs/typeof": "^4.13.15",
43
43
  "axios": "^1.10.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.9",
47
- "@xylabs/tsconfig": "^7.0.0-rc.9",
46
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
47
+ "@xylabs/tsconfig": "^7.0.0-rc.20",
48
48
  "typescript": "^5.8.3",
49
49
  "vitest": "^3.2.4"
50
50
  },