@dvina/sdk 4.1.58 → 4.1.64

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.
Files changed (86) hide show
  1. package/dist/_generated_documents-XONZIXZ4.js +1 -0
  2. package/dist/adapters/angular/index.d.ts +1 -1
  3. package/dist/adapters/angular/index.js +1 -159
  4. package/dist/adapters/react/index.js +1 -49
  5. package/dist/billing/index.js +1 -5
  6. package/dist/chunk-5E7LX4YQ.js +1 -0
  7. package/dist/chunk-EK7ODJWE.js +1 -0
  8. package/dist/chunk-EOIDWBEZ.js +1 -0
  9. package/dist/chunk-G34ETQUN.js +1 -0
  10. package/dist/chunk-H3TI6B7T.js +1 -0
  11. package/dist/chunk-IIQ3WGOJ.js +1 -0
  12. package/dist/chunk-JQL7QV2D.js +5 -0
  13. package/dist/chunk-SJ6Q5IDB.js +31 -0
  14. package/dist/{client-K9LxSCVw.d.ts → client-D309vpHA.d.ts} +206 -1
  15. package/dist/index.d.ts +110 -3
  16. package/dist/index.js +1 -10
  17. package/dist/inference/index.js +1 -5
  18. package/dist/package.json +12 -48
  19. package/dist/pagination/index.js +1 -5
  20. package/package.json +13 -49
  21. package/dist/_generated_documents-2RBYHBRH.js +0 -4
  22. package/dist/_generated_documents-2RBYHBRH.js.map +0 -1
  23. package/dist/_generated_documents-3OGB3BZM.cjs +0 -2545
  24. package/dist/_generated_documents-3OGB3BZM.cjs.map +0 -1
  25. package/dist/adapters/angular/index.cjs +0 -163
  26. package/dist/adapters/angular/index.cjs.map +0 -1
  27. package/dist/adapters/angular/index.d.cts +0 -254
  28. package/dist/adapters/angular/index.js.map +0 -1
  29. package/dist/adapters/react/index.cjs +0 -51
  30. package/dist/adapters/react/index.cjs.map +0 -1
  31. package/dist/adapters/react/index.d.cts +0 -62
  32. package/dist/adapters/react/index.js.map +0 -1
  33. package/dist/billing/index.cjs +0 -26
  34. package/dist/billing/index.cjs.map +0 -1
  35. package/dist/billing/index.d.cts +0 -328
  36. package/dist/billing/index.js.map +0 -1
  37. package/dist/chunk-2J5WONKO.cjs +0 -1608
  38. package/dist/chunk-2J5WONKO.cjs.map +0 -1
  39. package/dist/chunk-342BFYZZ.cjs +0 -98
  40. package/dist/chunk-342BFYZZ.cjs.map +0 -1
  41. package/dist/chunk-5WRI5ZAA.js +0 -29
  42. package/dist/chunk-5WRI5ZAA.js.map +0 -1
  43. package/dist/chunk-7XBJ77RJ.js +0 -103
  44. package/dist/chunk-7XBJ77RJ.js.map +0 -1
  45. package/dist/chunk-AE5KAIKK.js +0 -24
  46. package/dist/chunk-AE5KAIKK.js.map +0 -1
  47. package/dist/chunk-AQ45E6MZ.cjs +0 -23951
  48. package/dist/chunk-AQ45E6MZ.cjs.map +0 -1
  49. package/dist/chunk-DLCUHX6I.js +0 -1064
  50. package/dist/chunk-DLCUHX6I.js.map +0 -1
  51. package/dist/chunk-DZUJEN5N.cjs +0 -32
  52. package/dist/chunk-DZUJEN5N.cjs.map +0 -1
  53. package/dist/chunk-FOKGSMXS.cjs +0 -27
  54. package/dist/chunk-FOKGSMXS.cjs.map +0 -1
  55. package/dist/chunk-IWQGSVFY.js +0 -23541
  56. package/dist/chunk-IWQGSVFY.js.map +0 -1
  57. package/dist/chunk-KEM6SUTS.js +0 -92
  58. package/dist/chunk-KEM6SUTS.js.map +0 -1
  59. package/dist/chunk-KV5SP7RP.cjs +0 -114
  60. package/dist/chunk-KV5SP7RP.cjs.map +0 -1
  61. package/dist/chunk-PDM2KR7T.js +0 -392
  62. package/dist/chunk-PDM2KR7T.js.map +0 -1
  63. package/dist/chunk-UELAE75E.cjs +0 -408
  64. package/dist/chunk-UELAE75E.cjs.map +0 -1
  65. package/dist/chunk-USR4MXFW.cjs +0 -1699
  66. package/dist/chunk-USR4MXFW.cjs.map +0 -1
  67. package/dist/chunk-WX7EFPHT.js +0 -1600
  68. package/dist/chunk-WX7EFPHT.js.map +0 -1
  69. package/dist/client-Bb2gD6Iz.d.cts +0 -488
  70. package/dist/client-X8guW4nw.d.cts +0 -7954
  71. package/dist/error-CsVoUTY8.d.cts +0 -95
  72. package/dist/index-D_Z25Pa1.d.cts +0 -79
  73. package/dist/index.cjs +0 -1979
  74. package/dist/index.cjs.map +0 -1
  75. package/dist/index.d.cts +0 -3716
  76. package/dist/index.js.map +0 -1
  77. package/dist/inference/index.cjs +0 -70
  78. package/dist/inference/index.cjs.map +0 -1
  79. package/dist/inference/index.d.cts +0 -80
  80. package/dist/inference/index.js.map +0 -1
  81. package/dist/pagination/index.cjs +0 -34
  82. package/dist/pagination/index.cjs.map +0 -1
  83. package/dist/pagination/index.d.cts +0 -6
  84. package/dist/pagination/index.js.map +0 -1
  85. package/dist/sync-engine-gpxyhQBl.d.cts +0 -478
  86. package/dist/types-Chg8ASmf.d.cts +0 -116
@@ -1,95 +0,0 @@
1
- /**
2
- * Base error class for all Dvina SDK errors.
3
- */
4
- declare class DvinaError extends Error {
5
- /** The original error, if any */
6
- readonly cause?: Error;
7
- constructor(message: string, cause?: Error);
8
- }
9
- /**
10
- * Error thrown when the GraphQL response contains errors.
11
- */
12
- declare class DvinaGraphQLError extends DvinaError {
13
- /** The raw GraphQL errors array */
14
- readonly errors: readonly GraphQLErrorEntry[];
15
- /** The query that caused the error (for debugging) */
16
- readonly query?: string;
17
- /** The variables that were passed */
18
- readonly variables?: Record<string, unknown>;
19
- constructor(errors: readonly GraphQLErrorEntry[], query?: string, variables?: Record<string, unknown>);
20
- }
21
- /**
22
- * Error thrown on network failures (connection refused, timeout, etc.)
23
- */
24
- declare class DvinaNetworkError extends DvinaError {
25
- /** HTTP status code, if available */
26
- readonly status?: number;
27
- constructor(message: string, status?: number, cause?: Error);
28
- }
29
- /**
30
- * Error thrown when authentication fails (401/403).
31
- */
32
- declare class DvinaAuthenticationError extends DvinaError {
33
- /** The token that was used when the auth error occurred (for stale-token detection). */
34
- readonly failedToken?: string;
35
- constructor(message?: string, failedTokenOrCause?: string | Error, cause?: Error);
36
- }
37
- /**
38
- * Known GraphQL error codes returned by the Dvina API in `extensions.code`.
39
- * Used for programmatic matching in SDK error detection.
40
- */
41
- declare const GRAPHQL_ERROR_CODES: {
42
- readonly SESSION_TOKEN_LIMIT_REACHED: "SESSION_TOKEN_LIMIT_REACHED";
43
- readonly STORAGE_LIMIT_REACHED: "STORAGE_LIMIT_REACHED";
44
- readonly DEEP_ANALYSIS_LIMIT_EXCEEDED: "DEEP_ANALYSIS_LIMIT_EXCEEDED";
45
- readonly PLAN_DETAIL_RESTRICTION: "PLAN_DETAIL_RESTRICTION";
46
- readonly RESOURCE_NOT_FOUND: "RESOURCE_NOT_FOUND";
47
- };
48
- /**
49
- * Base class for plan/billing restriction errors.
50
- * Thrown when the workspace exceeds a plan limit (storage, capabilities, deep analysis).
51
- *
52
- * Consumers can `catch (e) { if (e instanceof DvinaPlanRestrictionError) showUpgradeDialog(); }`
53
- */
54
- declare class DvinaPlanRestrictionError extends DvinaGraphQLError {
55
- /** The specific restriction code (e.g. 'PLAN_DETAIL_RESTRICTION') */
56
- readonly restrictionCode: string;
57
- constructor(errors: readonly GraphQLErrorEntry[], restrictionCode: string, query?: string, variables?: Record<string, unknown>);
58
- }
59
- /**
60
- * Error thrown when the chat session token limit is reached (SESSION_TOKEN_LIMIT_REACHED).
61
- * Distinct from inference quota — this is a per-session GraphQL limit.
62
- */
63
- declare class DvinaTokenLimitError extends DvinaGraphQLError {
64
- constructor(errors: readonly GraphQLErrorEntry[], query?: string, variables?: Record<string, unknown>);
65
- }
66
- /**
67
- * Error thrown when a requested resource is not found (RESOURCE_NOT_FOUND).
68
- */
69
- declare class DvinaNotFoundError extends DvinaGraphQLError {
70
- constructor(errors: readonly GraphQLErrorEntry[], query?: string, variables?: Record<string, unknown>);
71
- }
72
- /**
73
- * Extract the first extension code from a list of GraphQL errors (normalized to uppercase).
74
- * Returns `undefined` if no code is present.
75
- */
76
- declare function extractErrorCode(errors: readonly GraphQLErrorEntry[]): string | undefined;
77
- /**
78
- * Create the appropriate `DvinaGraphQLError` subclass for the given errors,
79
- * or return a generic `DvinaGraphQLError` if no specific match is found.
80
- */
81
- declare function createGraphQLError(errors: readonly GraphQLErrorEntry[], query?: string, variables?: Record<string, unknown>): DvinaGraphQLError;
82
- /**
83
- * Shape of a single GraphQL error in the response.
84
- */
85
- interface GraphQLErrorEntry {
86
- message: string;
87
- locations?: readonly {
88
- line: number;
89
- column: number;
90
- }[];
91
- path?: readonly (string | number)[];
92
- extensions?: Record<string, unknown>;
93
- }
94
-
95
- export { DvinaError as D, GRAPHQL_ERROR_CODES as G, DvinaAuthenticationError as a, DvinaGraphQLError as b, DvinaNetworkError as c, DvinaNotFoundError as d, DvinaPlanRestrictionError as e, DvinaTokenLimitError as f, type GraphQLErrorEntry as g, createGraphQLError as h, extractErrorCode as i };
@@ -1,79 +0,0 @@
1
- import { b as DvinaRequest, c as DvinaSubscribe, P as PageInfoData, C as ConnectionVariables, F as FetchOptions } from './types-Chg8ASmf.cjs';
2
- import { S as SyncEngine } from './sync-engine-gpxyhQBl.cjs';
3
-
4
- /**
5
- * Base class that holds the transport functions.
6
- * Every generated model, connection, query, and the root SDK class extend this.
7
- *
8
- * Operation classes use `_syncEngine` for queries/mutations/watch.
9
- * Subscription classes use `_subscribe` for WebSocket streaming.
10
- * Model classes use `_request` for compatibility (lazy fetch).
11
- */
12
- declare class Request {
13
- protected _request: DvinaRequest;
14
- protected _syncEngine?: SyncEngine;
15
- protected _subscribe?: DvinaSubscribe;
16
- protected _baseUrl?: string;
17
- constructor(request: DvinaRequest, syncEngine?: SyncEngine, subscribe?: DvinaSubscribe, baseUrl?: string);
18
- }
19
-
20
- /**
21
- * Default connection variables when paginating.
22
- * Ensures `first` or `last` is set when a cursor is provided.
23
- */
24
- declare function defaultConnection<V extends ConnectionVariables>(variables: V): V;
25
- /**
26
- * PageInfo model following the Relay spec.
27
- */
28
- declare class PageInfo {
29
- hasNextPage: boolean;
30
- hasPreviousPage: boolean;
31
- startCursor?: string | null;
32
- endCursor?: string | null;
33
- constructor(data: PageInfoData);
34
- }
35
- /**
36
- * Abstract base class for connection types.
37
- * Holds nodes and page info, used for type checking.
38
- */
39
- declare abstract class AbstractConnection<Node> extends Request {
40
- pageInfo: PageInfo;
41
- nodes: Node[];
42
- totalCount?: number;
43
- constructor(request: DvinaRequest);
44
- }
45
- /**
46
- * Concrete connection class with pagination helpers.
47
- * Generated connection subclasses extend this.
48
- *
49
- * The `_fetch` closure is created by the query class and allows re-fetching
50
- * with different pagination variables.
51
- */
52
- declare class Connection<Node> extends AbstractConnection<Node> {
53
- private _fetch;
54
- constructor(request: DvinaRequest, fetch: (variables?: ConnectionVariables, options?: FetchOptions) => Promise<Connection<Node> | undefined>, nodes: Node[], pageInfo: PageInfo, totalCount?: number);
55
- /**
56
- * Fetch the next page and append nodes.
57
- * Mutates this connection instance in place (nodes are appended, pageInfo updated).
58
- */
59
- fetchNext(options?: FetchOptions): Promise<this>;
60
- /**
61
- * Fetch the previous page and prepend nodes.
62
- * Mutates this connection instance in place (nodes are prepended, pageInfo updated).
63
- */
64
- fetchPrevious(options?: FetchOptions): Promise<this>;
65
- }
66
-
67
- /**
68
- * Extract all nodes from a connection.
69
- */
70
- declare function extractNodes<T>(connection: Connection<T>): T[];
71
- /**
72
- * Merge two connections into a new connection. Appends the second connection's
73
- * nodes after the first's. Uses the second connection's end cursor and hasNextPage.
74
- *
75
- * Neither input connection is modified.
76
- */
77
- declare function mergeConnections<T>(first: Connection<T>, second: Connection<T>): Connection<T>;
78
-
79
- export { AbstractConnection as A, Connection as C, PageInfo as P, Request as R, defaultConnection as d, extractNodes as e, mergeConnections as m };