@quiltt/core 5.0.1 → 5.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @quiltt/core
2
2
 
3
+ ## 5.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#412](https://github.com/quiltt/quiltt-js/pull/412) [`099070b`](https://github.com/quiltt/quiltt-js/commit/099070b984f7375491e1c736bc3fbd35c93c7fd3) Thanks [@rubendinho](https://github.com/rubendinho)! - Improve User Agent telemetry
8
+
9
+ - [#410](https://github.com/quiltt/quiltt-js/pull/410) [`628887c`](https://github.com/quiltt/quiltt-js/commit/628887cc592b492a1fb38ff5898aeda969140855) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Re-Export Upstream Packages
10
+
11
+ ## 5.0.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#407](https://github.com/quiltt/quiltt-js/pull/407) [`0262754`](https://github.com/quiltt/quiltt-js/commit/0262754fa680d39cea1426a09796783488a4f4d6) Thanks [@rubendinho](https://github.com/rubendinho)! - Add Institution Prop to QuilttContainer
16
+
3
17
  ## 5.0.1
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -38,7 +38,7 @@ The Auth API is used by the Quiltt Connector under the hood and can be used to p
38
38
  import { AuthAPI } from '@quiltt/core'
39
39
 
40
40
  // Set up client instance
41
- const auth = new AuthAPI('{CONNECTOR_ID}')
41
+ const auth = new AuthAPI()
42
42
 
43
43
  // Check if a Session token is valid
44
44
  await auth.ping('{SESSION_TOKEN}')
@@ -145,6 +145,7 @@ const createVersionLink = (platformInfo)=>{
145
145
  headers: {
146
146
  ...headers,
147
147
  'Quiltt-Client-Version': index_cjs.version,
148
+ 'Quiltt-SDK-Agent': userAgent,
148
149
  'User-Agent': userAgent
149
150
  }
150
151
  }));
@@ -140,6 +140,7 @@ const createVersionLink = (platformInfo)=>{
140
140
  headers: {
141
141
  ...headers,
142
142
  'Quiltt-Client-Version': version,
143
+ 'Quiltt-SDK-Agent': userAgent,
143
144
  'User-Agent': userAgent
144
145
  }
145
146
  }));
@@ -60,6 +60,7 @@ var AuthStrategies = /*#__PURE__*/ function(AuthStrategies) {
60
60
  }({});
61
61
  // https://www.quiltt.dev/api-reference/auth
62
62
  class AuthAPI {
63
+ // @todo userAgent: string | undefined - allow SDKs and callers to set a userAgent
63
64
  constructor(clientId){
64
65
  /**
65
66
  * Response Statuses:
@@ -207,6 +208,7 @@ class ConnectorsAPI {
207
208
  headers.set('Content-Type', 'application/json');
208
209
  headers.set('Accept', 'application/json');
209
210
  headers.set('User-Agent', this.userAgent);
211
+ headers.set('Quiltt-SDK-Agent', this.userAgent);
210
212
  headers.set('Authorization', `Bearer ${token}`);
211
213
  return {
212
214
  headers,
@@ -48,6 +48,7 @@ type Authenticate = SessionData | UnauthorizedData | UnprocessableData;
48
48
  type Revoke = NoContentData | UnauthorizedData;
49
49
  type SessionResponse = FetchResponse<SessionData>;
50
50
  declare class AuthAPI {
51
+ /** The Connector ID, required for identify & authenticate calls */
51
52
  clientId: string | undefined;
52
53
  constructor(clientId?: string | undefined);
53
54
  /**
@@ -54,6 +54,7 @@ var AuthStrategies = /*#__PURE__*/ function(AuthStrategies) {
54
54
  }({});
55
55
  // https://www.quiltt.dev/api-reference/auth
56
56
  class AuthAPI {
57
+ // @todo userAgent: string | undefined - allow SDKs and callers to set a userAgent
57
58
  constructor(clientId){
58
59
  /**
59
60
  * Response Statuses:
@@ -201,6 +202,7 @@ class ConnectorsAPI {
201
202
  headers.set('Content-Type', 'application/json');
202
203
  headers.set('Accept', 'application/json');
203
204
  headers.set('User-Agent', this.userAgent);
205
+ headers.set('Quiltt-SDK-Agent', this.userAgent);
204
206
  headers.set('Authorization', `Bearer ${token}`);
205
207
  return {
206
208
  headers,
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  var name = "@quiltt/core";
4
- var version$1 = "5.0.1";
4
+ var version$1 = "5.0.3";
5
5
 
6
6
  const QUILTT_API_INSECURE = (()=>{
7
7
  try {
@@ -1,5 +1,5 @@
1
1
  var name = "@quiltt/core";
2
- var version$1 = "5.0.1";
2
+ var version$1 = "5.0.3";
3
3
 
4
4
  const QUILTT_API_INSECURE = (()=>{
5
5
  try {
package/dist/index.cjs CHANGED
@@ -7,7 +7,6 @@ var index_cjs$3 = require('./observables/index.cjs');
7
7
  var index_cjs$4 = require('./storage/index.cjs');
8
8
  var index_cjs$5 = require('./timing/index.cjs');
9
9
  var types_cjs = require('./types.cjs');
10
- var index_cjs$6 = require('./utils/index.cjs');
11
10
 
12
11
 
13
12
 
@@ -53,9 +52,3 @@ Object.keys(types_cjs).forEach(function (k) {
53
52
  get: function () { return types_cjs[k]; }
54
53
  });
55
54
  });
56
- Object.keys(index_cjs$6).forEach(function (k) {
57
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
58
- enumerable: true,
59
- get: function () { return index_cjs$6[k]; }
60
- });
61
- });
package/dist/index.d.ts CHANGED
@@ -5,4 +5,3 @@ export * from './observables/index.js';
5
5
  export * from './storage/index.js';
6
6
  export * from './timing/index.js';
7
7
  export * from './types.js';
8
- export * from './utils/index.js';
package/dist/index.js CHANGED
@@ -5,4 +5,3 @@ export * from './observables/index.js';
5
5
  export * from './storage/index.js';
6
6
  export * from './timing/index.js';
7
7
  export * from './types.js';
8
- export * from './utils/index.js';
package/dist/types.d.ts CHANGED
@@ -1,26 +1,34 @@
1
- /** Utility types to extend default TS utilities */
1
+ /** Represents a value that can be T or null */
2
2
  type Maybe<T> = T | null;
3
+ /** Input variant of Maybe for function parameters */
3
4
  type InputMaybe<T> = Maybe<T>;
5
+ /** Ensures all properties of T are exactly their declared types */
4
6
  type Exact<T extends {
5
7
  [key: string]: unknown;
6
8
  }> = {
7
9
  [K in keyof T]: T[K];
8
10
  };
11
+ /** Makes specific keys K optional and nullable in type T */
9
12
  type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
10
13
  [SubKey in K]?: Maybe<T[SubKey]>;
11
14
  };
15
+ /** Makes specific keys K nullable (but still required) in type T */
12
16
  type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
13
17
  [SubKey in K]: Maybe<T[SubKey]>;
14
18
  };
19
+ /** Makes all properties of T nullable */
15
20
  type Nullable<T> = {
16
21
  [K in keyof T]: T[K] | null;
17
22
  };
23
+ /** Removes readonly modifier from all properties of Type */
18
24
  type Mutable<Type> = {
19
25
  -readonly [Key in keyof Type]: Type[Key];
20
26
  };
27
+ /** Recursively makes all properties of T optional */
21
28
  type DeepPartial<T> = T extends object ? {
22
29
  [P in keyof T]?: DeepPartial<T[P]>;
23
30
  } : T;
31
+ /** Recursively makes all properties of T readonly */
24
32
  type DeepReadonly<T> = T extends object ? {
25
33
  [P in keyof T]: DeepReadonly<T[P]>;
26
34
  } : T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/core",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "Javascript API client and utilities for Quiltt",
5
5
  "keywords": [
6
6
  "quiltt",
@@ -88,7 +88,7 @@
88
88
  ],
89
89
  "main": "dist/index.js",
90
90
  "dependencies": {
91
- "@apollo/client": "^4.1.3",
91
+ "@apollo/client": "^4.1.4",
92
92
  "@rails/actioncable": "^8.1.200",
93
93
  "braces": "^3.0.3",
94
94
  "cross-fetch": "^4.1.0",
@@ -96,12 +96,12 @@
96
96
  "rxjs": "^7.8.2"
97
97
  },
98
98
  "devDependencies": {
99
- "@biomejs/biome": "2.3.14",
100
- "@types/node": "24.10.10",
99
+ "@biomejs/biome": "2.4.0",
100
+ "@types/node": "24.10.13",
101
101
  "@types/rails__actioncable": "8.0.3",
102
- "@types/react": "19.2.11",
102
+ "@types/react": "19.2.14",
103
103
  "bunchee": "6.9.4",
104
- "rimraf": "6.1.2",
104
+ "rimraf": "6.1.3",
105
105
  "typescript": "5.9.3"
106
106
  },
107
107
  "tags": [
@@ -12,6 +12,7 @@ export const createVersionLink = (platformInfo: string) => {
12
12
  headers: {
13
13
  ...headers,
14
14
  'Quiltt-Client-Version': version,
15
+ 'Quiltt-SDK-Agent': userAgent,
15
16
  'User-Agent': userAgent,
16
17
  },
17
18
  }))
@@ -33,8 +33,11 @@ export type SessionResponse = FetchResponse<SessionData>
33
33
 
34
34
  // https://www.quiltt.dev/api-reference/auth
35
35
  export class AuthAPI {
36
+ /** The Connector ID, required for identify & authenticate calls */
36
37
  clientId: string | undefined
37
38
 
39
+ // @todo userAgent: string | undefined - allow SDKs and callers to set a userAgent
40
+
38
41
  constructor(clientId?: string | undefined) {
39
42
  this.clientId = clientId
40
43
  }
@@ -92,6 +92,7 @@ export class ConnectorsAPI {
92
92
  headers.set('Content-Type', 'application/json')
93
93
  headers.set('Accept', 'application/json')
94
94
  headers.set('User-Agent', this.userAgent)
95
+ headers.set('Quiltt-SDK-Agent', this.userAgent)
95
96
  headers.set('Authorization', `Bearer ${token}`)
96
97
 
97
98
  return {
package/src/index.ts CHANGED
@@ -1,3 +1,23 @@
1
+ // ============================================================================
2
+ // @quiltt/core - Core Quiltt SDK functionality
3
+ // ============================================================================
4
+ // This package provides the foundational TypeScript primitives for interacting
5
+ // with the Quiltt API. It works across all JavaScript environments (browser,
6
+ // Node.js, React Native) and contains no UI-specific dependencies.
7
+ //
8
+ // Main exports:
9
+ // - API clients (AuthAPI, ConnectorsAPI, QuilttClient)
10
+ // - Authentication utilities (JsonWebTokenParse, AuthStrategies)
11
+ // - Configuration helpers
12
+ // - Observable patterns for reactive data
13
+ // - Storage abstractions (GlobalStorage)
14
+ // - Timeout utilities (Timeoutable)
15
+ // - TypeScript utility types
16
+ //
17
+ // Note: Utils are NOT exported from the main entry point to keep the public
18
+ // API clean. Access utils via subpath import: '@quiltt/core/utils'
19
+ // ============================================================================
20
+
1
21
  export * from './api'
2
22
  export * from './auth'
3
23
  export * from './config'
@@ -5,4 +25,3 @@ export * from './observables'
5
25
  export * from './storage'
6
26
  export * from './timing'
7
27
  export * from './types'
8
- export * from './utils'
package/src/types.ts CHANGED
@@ -1,10 +1,33 @@
1
- /** Utility types to extend default TS utilities */
1
+ // ============================================================================
2
+ // TypeScript Utility Types
3
+ // ============================================================================
4
+ // Extended utility types to complement TypeScript's built-in utilities.
5
+ // These are commonly used throughout the Quiltt SDK for type safety.
6
+ // ============================================================================
7
+
8
+ /** Represents a value that can be T or null */
2
9
  export type Maybe<T> = T | null
10
+
11
+ /** Input variant of Maybe for function parameters */
3
12
  export type InputMaybe<T> = Maybe<T>
13
+
14
+ /** Ensures all properties of T are exactly their declared types */
4
15
  export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }
16
+
17
+ /** Makes specific keys K optional and nullable in type T */
5
18
  export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }
19
+
20
+ /** Makes specific keys K nullable (but still required) in type T */
6
21
  export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }
22
+
23
+ /** Makes all properties of T nullable */
7
24
  export type Nullable<T> = { [K in keyof T]: T[K] | null }
25
+
26
+ /** Removes readonly modifier from all properties of Type */
8
27
  export type Mutable<Type> = { -readonly [Key in keyof Type]: Type[Key] }
28
+
29
+ /** Recursively makes all properties of T optional */
9
30
  export type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T
31
+
32
+ /** Recursively makes all properties of T readonly */
10
33
  export type DeepReadonly<T> = T extends object ? { [P in keyof T]: DeepReadonly<T[P]> } : T