@dvina/sdk 4.1.59 → 4.1.66

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 (89) hide show
  1. package/dist/_generated_documents-VM6RSSXR.js +1 -0
  2. package/dist/adapters/angular/index.d.ts +2 -2
  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-D2L26FRK.js +5 -0
  8. package/dist/chunk-EK7ODJWE.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-IO56LXKJ.js +1 -0
  13. package/dist/chunk-SJ6Q5IDB.js +31 -0
  14. package/dist/{client-D309vpHA.d.ts → client-CEoJfTM9.d.ts} +2 -257
  15. package/dist/{index-fFR5so7x.d.ts → index-BzmzBgTh.d.ts} +1 -1
  16. package/dist/index.d.ts +7 -134
  17. package/dist/index.js +1 -10
  18. package/dist/inference/index.js +1 -5
  19. package/dist/package.json +12 -48
  20. package/dist/pagination/index.d.ts +2 -2
  21. package/dist/pagination/index.js +1 -5
  22. package/dist/{sync-engine-BIaOIpU3.d.ts → sync-engine-Bh0UcTVd.d.ts} +13 -0
  23. package/package.json +13 -49
  24. package/dist/_generated_documents-GHGFCEAV.js +0 -4
  25. package/dist/_generated_documents-GHGFCEAV.js.map +0 -1
  26. package/dist/_generated_documents-Z5MUI5BE.cjs +0 -2777
  27. package/dist/_generated_documents-Z5MUI5BE.cjs.map +0 -1
  28. package/dist/adapters/angular/index.cjs +0 -163
  29. package/dist/adapters/angular/index.cjs.map +0 -1
  30. package/dist/adapters/angular/index.d.cts +0 -254
  31. package/dist/adapters/angular/index.js.map +0 -1
  32. package/dist/adapters/react/index.cjs +0 -51
  33. package/dist/adapters/react/index.cjs.map +0 -1
  34. package/dist/adapters/react/index.d.cts +0 -62
  35. package/dist/adapters/react/index.js.map +0 -1
  36. package/dist/billing/index.cjs +0 -26
  37. package/dist/billing/index.cjs.map +0 -1
  38. package/dist/billing/index.d.cts +0 -328
  39. package/dist/billing/index.js.map +0 -1
  40. package/dist/chunk-2J5WONKO.cjs +0 -1608
  41. package/dist/chunk-2J5WONKO.cjs.map +0 -1
  42. package/dist/chunk-342BFYZZ.cjs +0 -98
  43. package/dist/chunk-342BFYZZ.cjs.map +0 -1
  44. package/dist/chunk-5WRI5ZAA.js +0 -29
  45. package/dist/chunk-5WRI5ZAA.js.map +0 -1
  46. package/dist/chunk-7XBJ77RJ.js +0 -103
  47. package/dist/chunk-7XBJ77RJ.js.map +0 -1
  48. package/dist/chunk-AE5KAIKK.js +0 -24
  49. package/dist/chunk-AE5KAIKK.js.map +0 -1
  50. package/dist/chunk-COFT5ZYL.js +0 -23777
  51. package/dist/chunk-COFT5ZYL.js.map +0 -1
  52. package/dist/chunk-DZUJEN5N.cjs +0 -32
  53. package/dist/chunk-DZUJEN5N.cjs.map +0 -1
  54. package/dist/chunk-FOKGSMXS.cjs +0 -27
  55. package/dist/chunk-FOKGSMXS.cjs.map +0 -1
  56. package/dist/chunk-HHBDJ65K.cjs +0 -24198
  57. package/dist/chunk-HHBDJ65K.cjs.map +0 -1
  58. package/dist/chunk-KEM6SUTS.js +0 -92
  59. package/dist/chunk-KEM6SUTS.js.map +0 -1
  60. package/dist/chunk-KSVHC4YE.cjs +0 -1841
  61. package/dist/chunk-KSVHC4YE.cjs.map +0 -1
  62. package/dist/chunk-KV5SP7RP.cjs +0 -114
  63. package/dist/chunk-KV5SP7RP.cjs.map +0 -1
  64. package/dist/chunk-NH4SMZCW.js +0 -1148
  65. package/dist/chunk-NH4SMZCW.js.map +0 -1
  66. package/dist/chunk-PDM2KR7T.js +0 -392
  67. package/dist/chunk-PDM2KR7T.js.map +0 -1
  68. package/dist/chunk-UELAE75E.cjs +0 -408
  69. package/dist/chunk-UELAE75E.cjs.map +0 -1
  70. package/dist/chunk-WX7EFPHT.js +0 -1600
  71. package/dist/chunk-WX7EFPHT.js.map +0 -1
  72. package/dist/client-BRIS6DdR.d.cts +0 -8159
  73. package/dist/client-Bb2gD6Iz.d.cts +0 -488
  74. package/dist/error-CsVoUTY8.d.cts +0 -95
  75. package/dist/index-D_Z25Pa1.d.cts +0 -79
  76. package/dist/index.cjs +0 -2039
  77. package/dist/index.cjs.map +0 -1
  78. package/dist/index.d.cts +0 -3823
  79. package/dist/index.js.map +0 -1
  80. package/dist/inference/index.cjs +0 -70
  81. package/dist/inference/index.cjs.map +0 -1
  82. package/dist/inference/index.d.cts +0 -80
  83. package/dist/inference/index.js.map +0 -1
  84. package/dist/pagination/index.cjs +0 -34
  85. package/dist/pagination/index.cjs.map +0 -1
  86. package/dist/pagination/index.d.cts +0 -6
  87. package/dist/pagination/index.js.map +0 -1
  88. package/dist/sync-engine-gpxyhQBl.d.cts +0 -478
  89. package/dist/types-Chg8ASmf.d.cts +0 -116
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk2J5WONKO_cjs = require('../chunk-2J5WONKO.cjs');
4
- require('../chunk-KV5SP7RP.cjs');
5
- require('../chunk-DZUJEN5N.cjs');
6
-
7
-
8
-
9
- Object.defineProperty(exports, "BillingClient", {
10
- enumerable: true,
11
- get: function () { return chunk2J5WONKO_cjs.BillingClient; }
12
- });
13
- Object.defineProperty(exports, "EntitlementTier", {
14
- enumerable: true,
15
- get: function () { return chunk2J5WONKO_cjs.EntitlementTier; }
16
- });
17
- Object.defineProperty(exports, "SubscriptionCycle", {
18
- enumerable: true,
19
- get: function () { return chunk2J5WONKO_cjs.SubscriptionCycle; }
20
- });
21
- Object.defineProperty(exports, "SubscriptionProvider", {
22
- enumerable: true,
23
- get: function () { return chunk2J5WONKO_cjs.SubscriptionProvider; }
24
- });
25
- //# sourceMappingURL=index.cjs.map
26
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -1,328 +0,0 @@
1
- import { D as DvinaError } from '../error-CsVoUTY8.cjs';
2
-
3
- type Maybe<T> = T | null;
4
- type Exact<T extends {
5
- [key: string]: unknown;
6
- }> = {
7
- [K in keyof T]: T[K];
8
- };
9
- /** All built-in and custom scalars, mapped to their actual values */
10
- type Scalars = {
11
- ID: string;
12
- String: string;
13
- Boolean: boolean;
14
- Int: number;
15
- Float: number;
16
- /** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */
17
- DateTime: any;
18
- /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
19
- JSONObject: any;
20
- };
21
- type EntitlementDetail = {
22
- canAddReport: Scalars['Boolean'];
23
- canAddUser: Scalars['Boolean'];
24
- canUseApi: Scalars['Boolean'];
25
- capacity?: Maybe<Scalars['Int']>;
26
- deepAnalysisCharacterLimit?: Maybe<Scalars['Float']>;
27
- deepAnalysisTokenLimit?: Maybe<Scalars['Float']>;
28
- hardTokenUsageLimit?: Maybe<Scalars['Float']>;
29
- maxStructuredSize?: Maybe<Scalars['Int']>;
30
- maxUnstructuredSize?: Maybe<Scalars['Int']>;
31
- minUsers?: Maybe<Scalars['Int']>;
32
- softTokenUsageLimit?: Maybe<Scalars['Float']>;
33
- sourceTypes?: Maybe<Array<Scalars['String']>>;
34
- team: Scalars['Boolean'];
35
- };
36
- declare enum EntitlementTier {
37
- Enterprise = "enterprise",
38
- Free = "free",
39
- Max = "max",
40
- Plus = "plus",
41
- Pro = "pro"
42
- }
43
- type Plan = {
44
- entitlements: EntitlementDetail;
45
- features?: Maybe<Array<Scalars['JSONObject']>>;
46
- id: Scalars['String'];
47
- name: Scalars['String'];
48
- prices: Array<Price>;
49
- tier?: Maybe<EntitlementTier>;
50
- };
51
- type Price = {
52
- amount?: Maybe<Scalars['Float']>;
53
- currency: Scalars['String'];
54
- id: Scalars['String'];
55
- interval?: Maybe<SubscriptionCycle>;
56
- };
57
- type ScheduledChange = {
58
- effectiveDate?: Maybe<Scalars['DateTime']>;
59
- newCycle?: Maybe<SubscriptionCycle>;
60
- newSeats?: Maybe<Scalars['Int']>;
61
- newTier?: Maybe<EntitlementTier>;
62
- };
63
- declare enum SubscriptionCycle {
64
- Daily = "DAILY",
65
- Monthly = "MONTHLY",
66
- Weekly = "WEEKLY",
67
- Yearly = "YEARLY"
68
- }
69
- declare enum SubscriptionProvider {
70
- Revcat = "REVCAT",
71
- Stripe = "STRIPE"
72
- }
73
- type WorkspaceSubscription = {
74
- cancelAtPeriodEnd?: Maybe<Scalars['Boolean']>;
75
- currentPeriodEnd?: Maybe<Scalars['DateTime']>;
76
- currentPeriodStart?: Maybe<Scalars['DateTime']>;
77
- cycle?: Maybe<SubscriptionCycle>;
78
- provider?: Maybe<SubscriptionProvider>;
79
- scheduledChange?: Maybe<ScheduledChange>;
80
- seats: Scalars['Int'];
81
- tier: EntitlementTier;
82
- };
83
- type PlanQueryVariables = Exact<{
84
- id: Scalars['String'];
85
- }>;
86
- type PlanFragmentFragment = {
87
- id: string;
88
- name: string;
89
- tier?: EntitlementTier | null;
90
- features?: Array<any> | null;
91
- prices: Array<{
92
- id: string;
93
- currency: string;
94
- amount?: number | null;
95
- interval?: SubscriptionCycle | null;
96
- }>;
97
- entitlements: {
98
- canAddUser: boolean;
99
- minUsers?: number | null;
100
- team: boolean;
101
- capacity?: number | null;
102
- sourceTypes?: Array<string> | null;
103
- softTokenUsageLimit?: number | null;
104
- hardTokenUsageLimit?: number | null;
105
- canAddReport: boolean;
106
- canUseApi: boolean;
107
- maxStructuredSize?: number | null;
108
- maxUnstructuredSize?: number | null;
109
- deepAnalysisTokenLimit?: number | null;
110
- deepAnalysisCharacterLimit?: number | null;
111
- };
112
- };
113
- type SubscriptionForManagerQueryVariables = Exact<{
114
- workspaceId: Scalars['String'];
115
- }>;
116
- type SubscriptionEntitlementsForManagerQueryVariables = Exact<{
117
- workspaceId: Scalars['String'];
118
- }>;
119
- type UpgradePlanMutationVariables = Exact<{
120
- targetPriceId: Scalars['String'];
121
- }>;
122
- type DowngradePlanMutationVariables = Exact<{
123
- targetPriceId: Scalars['String'];
124
- }>;
125
- type AddSeatsMutationVariables = Exact<{
126
- additionalSeats: Scalars['Int'];
127
- }>;
128
- type ChangeBillingCycleMutationVariables = Exact<{
129
- targetPriceId: Scalars['String'];
130
- }>;
131
- type RemoveSeatsMutationVariables = Exact<{
132
- seatsToRemove: Scalars['Int'];
133
- }>;
134
- type CancelSubscriptionForManagerMutationVariables = Exact<{
135
- workspaceId: Scalars['String'];
136
- }>;
137
- type ReactivateSubscriptionForManagerMutationVariables = Exact<{
138
- workspaceId: Scalars['String'];
139
- }>;
140
- type CreateCustomerMutationVariables = Exact<{
141
- name: Scalars['String'];
142
- email: Scalars['String'];
143
- workspaceId: Scalars['String'];
144
- userId: Scalars['String'];
145
- }>;
146
- type CreateCheckoutSessionMutationVariables = Exact<{
147
- priceId: Scalars['String'];
148
- successUrl: Scalars['String'];
149
- cancelUrl: Scalars['String'];
150
- }>;
151
- type CreateCustomerPortalSessionMutationVariables = Exact<{
152
- returnUrl: Scalars['String'];
153
- }>;
154
-
155
- interface BillingClientOptions {
156
- /** Full billing GraphQL HTTP URL (e.g. 'https://billing.dvina.ai/graphql') */
157
- billingHttpUrl: string;
158
- /** Full billing SSE URL (e.g. 'https://billing.dvina.ai/subscriptions/stream') */
159
- billingSseUrl: string;
160
- /** Token callback — shared with the main SDK */
161
- getToken: (options?: {
162
- forceRefresh?: boolean;
163
- }) => Promise<string>;
164
- /** Global error callback — threaded from DvinaSdkOptions */
165
- onError?: (error: DvinaError) => void;
166
- }
167
- declare class BillingClient {
168
- private readonly http;
169
- private readonly options;
170
- private readonly activeUpdateStreams;
171
- constructor(options: BillingClientOptions);
172
- /**
173
- * Terminate all active SSE streams.
174
- * Call this on logout or SDK teardown to prevent lingering connections.
175
- */
176
- destroy(): void;
177
- reconnectAll(): void;
178
- get plans(): {
179
- list: () => Promise<{
180
- id: string;
181
- name: string;
182
- tier?: EntitlementTier | null;
183
- features?: Array<any> | null;
184
- prices: Array<{
185
- id: string;
186
- currency: string;
187
- amount?: number | null;
188
- interval?: SubscriptionCycle | null;
189
- }>;
190
- entitlements: {
191
- canAddUser: boolean;
192
- minUsers?: number | null;
193
- team: boolean;
194
- capacity?: number | null;
195
- sourceTypes?: Array<string> | null;
196
- softTokenUsageLimit?: number | null;
197
- hardTokenUsageLimit?: number | null;
198
- canAddReport: boolean;
199
- canUseApi: boolean;
200
- maxStructuredSize?: number | null;
201
- maxUnstructuredSize?: number | null;
202
- deepAnalysisTokenLimit?: number | null;
203
- deepAnalysisCharacterLimit?: number | null;
204
- };
205
- }[]>;
206
- get: (variables: PlanQueryVariables) => Promise<{
207
- id: string;
208
- name: string;
209
- tier?: EntitlementTier | null;
210
- features?: Array<any> | null;
211
- prices: Array<{
212
- id: string;
213
- currency: string;
214
- amount?: number | null;
215
- interval?: SubscriptionCycle | null;
216
- }>;
217
- entitlements: {
218
- canAddUser: boolean;
219
- minUsers?: number | null;
220
- team: boolean;
221
- capacity?: number | null;
222
- sourceTypes?: Array<string> | null;
223
- softTokenUsageLimit?: number | null;
224
- hardTokenUsageLimit?: number | null;
225
- canAddReport: boolean;
226
- canUseApi: boolean;
227
- maxStructuredSize?: number | null;
228
- maxUnstructuredSize?: number | null;
229
- deepAnalysisTokenLimit?: number | null;
230
- deepAnalysisCharacterLimit?: number | null;
231
- };
232
- } | null | undefined>;
233
- entitlements: () => Promise<Record<EntitlementTier, EntitlementDetail>>;
234
- tierOrders: () => Promise<any>;
235
- };
236
- get subscription(): {
237
- get: () => Promise<{
238
- tier: EntitlementTier;
239
- provider?: SubscriptionProvider | null;
240
- cycle?: SubscriptionCycle | null;
241
- seats: number;
242
- cancelAtPeriodEnd?: boolean | null;
243
- currentPeriodStart?: any | null;
244
- currentPeriodEnd?: any | null;
245
- scheduledChange?: {
246
- effectiveDate?: any | null;
247
- newTier?: EntitlementTier | null;
248
- newSeats?: number | null;
249
- newCycle?: SubscriptionCycle | null;
250
- } | null;
251
- }>;
252
- entitlements: () => Promise<{
253
- canAddUser: boolean;
254
- minUsers?: number | null;
255
- team: boolean;
256
- capacity?: number | null;
257
- sourceTypes?: Array<string> | null;
258
- softTokenUsageLimit?: number | null;
259
- hardTokenUsageLimit?: number | null;
260
- canAddReport: boolean;
261
- canUseApi: boolean;
262
- maxStructuredSize?: number | null;
263
- maxUnstructuredSize?: number | null;
264
- deepAnalysisTokenLimit?: number | null;
265
- deepAnalysisCharacterLimit?: number | null;
266
- }>;
267
- upgrade: (variables: UpgradePlanMutationVariables) => Promise<boolean>;
268
- prorationAmount: (variables: {
269
- targetPriceId: string;
270
- }) => Promise<number>;
271
- downgrade: (variables: DowngradePlanMutationVariables) => Promise<boolean>;
272
- changeBillingCycle: (variables: ChangeBillingCycleMutationVariables) => Promise<boolean>;
273
- cancel: () => Promise<boolean>;
274
- reactivate: () => Promise<boolean>;
275
- releaseSchedule: () => Promise<boolean>;
276
- updates: () => AsyncIterable<WorkspaceSubscription>;
277
- };
278
- get seats(): {
279
- add: (variables: AddSeatsMutationVariables) => Promise<boolean>;
280
- remove: (variables: RemoveSeatsMutationVariables) => Promise<boolean>;
281
- };
282
- get session(): {
283
- createSession: (variables: CreateCheckoutSessionMutationVariables) => Promise<{
284
- url: string;
285
- }>;
286
- createCustomerPortalSession: (variables: CreateCustomerPortalSessionMutationVariables) => Promise<{
287
- url: string;
288
- }>;
289
- };
290
- get management(): {
291
- subscription: (variables: SubscriptionForManagerQueryVariables) => Promise<{
292
- tier: EntitlementTier;
293
- provider?: SubscriptionProvider | null;
294
- cycle?: SubscriptionCycle | null;
295
- seats: number;
296
- cancelAtPeriodEnd?: boolean | null;
297
- currentPeriodStart?: any | null;
298
- currentPeriodEnd?: any | null;
299
- scheduledChange?: {
300
- effectiveDate?: any | null;
301
- newTier?: EntitlementTier | null;
302
- newSeats?: number | null;
303
- newCycle?: SubscriptionCycle | null;
304
- } | null;
305
- }>;
306
- entitlements: (variables: SubscriptionEntitlementsForManagerQueryVariables) => Promise<{
307
- canAddUser: boolean;
308
- minUsers?: number | null;
309
- team: boolean;
310
- capacity?: number | null;
311
- sourceTypes?: Array<string> | null;
312
- softTokenUsageLimit?: number | null;
313
- hardTokenUsageLimit?: number | null;
314
- canAddReport: boolean;
315
- canUseApi: boolean;
316
- maxStructuredSize?: number | null;
317
- maxUnstructuredSize?: number | null;
318
- deepAnalysisTokenLimit?: number | null;
319
- deepAnalysisCharacterLimit?: number | null;
320
- }>;
321
- cancel: (variables: CancelSubscriptionForManagerMutationVariables) => Promise<boolean>;
322
- reactivate: (variables: ReactivateSubscriptionForManagerMutationVariables) => Promise<boolean>;
323
- createCustomer: (variables: CreateCustomerMutationVariables) => Promise<string>;
324
- };
325
- private request;
326
- }
327
-
328
- export { BillingClient, type BillingClientOptions, type EntitlementDetail, EntitlementTier, type Plan, type PlanFragmentFragment as PlanFragment, type Price, type ScheduledChange, SubscriptionCycle, SubscriptionProvider, type WorkspaceSubscription };
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}