@talqing/sdk 0.2.1 → 0.4.0
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 +117 -29
- package/dist/cjs/client.d.ts +0 -2
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +0 -3
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/gen/index.d.ts +1 -1
- package/dist/cjs/gen/index.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.d.ts +72 -220
- package/dist/cjs/gen/sdk.gen.d.ts.map +1 -1
- package/dist/cjs/gen/sdk.gen.js +102 -408
- package/dist/cjs/gen/sdk.gen.js.map +1 -1
- package/dist/cjs/gen/types.gen.d.ts +307 -984
- package/dist/cjs/gen/types.gen.d.ts.map +1 -1
- package/dist/cjs/vocabulary.d.ts +1 -4
- package/dist/cjs/vocabulary.d.ts.map +1 -1
- package/dist/esm/client.d.ts +0 -2
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +0 -3
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/gen/index.d.ts +1 -1
- package/dist/esm/gen/index.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.d.ts +72 -220
- package/dist/esm/gen/sdk.gen.d.ts.map +1 -1
- package/dist/esm/gen/sdk.gen.js +98 -402
- package/dist/esm/gen/sdk.gen.js.map +1 -1
- package/dist/esm/gen/types.gen.d.ts +307 -984
- package/dist/esm/gen/types.gen.d.ts.map +1 -1
- package/dist/esm/vocabulary.d.ts +1 -4
- package/dist/esm/vocabulary.d.ts.map +1 -1
- package/package.json +7 -34
- package/src/client.ts +0 -6
- package/src/gen/index.ts +1 -1
- package/src/gen/sdk.gen.ts +116 -459
- package/src/gen/types.gen.ts +471 -1224
- package/src/vocabulary.ts +0 -5
- package/dist/cjs/browser.d.ts +0 -158
- package/dist/cjs/browser.d.ts.map +0 -1
- package/dist/cjs/browser.js +0 -465
- package/dist/cjs/browser.js.map +0 -1
- package/dist/esm/browser.d.ts +0 -158
- package/dist/esm/browser.d.ts.map +0 -1
- package/dist/esm/browser.js +0 -442
- package/dist/esm/browser.js.map +0 -1
- package/src/browser.tsx +0 -678
package/dist/esm/gen/sdk.gen.js
CHANGED
|
@@ -251,28 +251,78 @@ export class Agents extends HeyApiClient {
|
|
|
251
251
|
return this._versions ?? (this._versions = new Versions({ client: this.client }));
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
export class
|
|
254
|
+
export class Credits extends HeyApiClient {
|
|
255
255
|
/**
|
|
256
|
-
*
|
|
256
|
+
* Get Credits
|
|
257
|
+
*
|
|
258
|
+
* This workspace's credit balance in this region, what it buys, and what a
|
|
259
|
+
* top-up costs.
|
|
260
|
+
*
|
|
261
|
+
* Readable by every role: a VIEWER can start a web call, so a VIEWER must be
|
|
262
|
+
* able to see why one was refused.
|
|
263
|
+
*
|
|
264
|
+
* This is also where credit the control plane could not deliver lands. Anything
|
|
265
|
+
* it has issued for this workspace here — a purchase, a signup grant, a
|
|
266
|
+
* reversal — that this region has not written yet is applied before the balance
|
|
267
|
+
* is read. That is the backstop for a failed push, and it is a reconcile on
|
|
268
|
+
* demand rather than a timer: the moment someone cares is the moment this page
|
|
269
|
+
* loads, whether they arrived from the payment processor or from the "out of
|
|
270
|
+
* credits" banner. It costs nothing when there is nothing to apply, which is
|
|
271
|
+
* almost always.
|
|
257
272
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
273
|
+
get(parameters, options) {
|
|
274
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'topup' }] }]);
|
|
275
|
+
return (options?.client ?? this.client).get({
|
|
260
276
|
responseStyle: 'data',
|
|
261
|
-
|
|
262
|
-
|
|
277
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
278
|
+
in: 'cookie',
|
|
279
|
+
name: 'talqing_session',
|
|
280
|
+
type: 'apiKey'
|
|
281
|
+
}],
|
|
282
|
+
url: '/v1/billing/credits',
|
|
283
|
+
...options,
|
|
284
|
+
...params
|
|
263
285
|
});
|
|
264
286
|
}
|
|
265
287
|
/**
|
|
266
|
-
*
|
|
288
|
+
* Create Credit Checkout
|
|
289
|
+
*
|
|
290
|
+
* Start a credit purchase and return the hosted checkout URL to open.
|
|
267
291
|
*
|
|
268
|
-
*
|
|
292
|
+
* Organization admins only — spending the workspace's money is an admin act,
|
|
293
|
+
* the same as storing a secret or a provider key.
|
|
294
|
+
*
|
|
295
|
+
* The credit lands in THIS region, and that is decided by which region's API
|
|
296
|
+
* you called rather than by anything in the request. A slug in a body could be
|
|
297
|
+
* pointed at the other region, where the money would then be stuck: balances
|
|
298
|
+
* are per region and there is no transfer between them.
|
|
299
|
+
*/
|
|
300
|
+
checkout(parameters, options) {
|
|
301
|
+
const params = buildClientParams([parameters], [{ args: [{ key: 'creditCheckoutRequest', map: 'body' }] }]);
|
|
302
|
+
return (options?.client ?? this.client).post({
|
|
303
|
+
responseStyle: 'data',
|
|
304
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
305
|
+
in: 'cookie',
|
|
306
|
+
name: 'talqing_session',
|
|
307
|
+
type: 'apiKey'
|
|
308
|
+
}],
|
|
309
|
+
url: '/v1/billing/credits/checkout',
|
|
310
|
+
...options,
|
|
311
|
+
...params,
|
|
312
|
+
headers: {
|
|
313
|
+
'Content-Type': 'application/json',
|
|
314
|
+
...options?.headers,
|
|
315
|
+
...params.headers
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* List Credit Ledger
|
|
269
321
|
*
|
|
270
|
-
*
|
|
271
|
-
* (`ADMIN`, `EDITOR` or `VIEWER`) decides whether writes will be accepted. A
|
|
272
|
-
* user may belong to several organizations with a different role in each; this
|
|
273
|
-
* reports the one this credential is for.
|
|
322
|
+
* Every movement of this region's balance, newest first, with what caused each.
|
|
274
323
|
*/
|
|
275
|
-
|
|
324
|
+
ledger(parameters, options) {
|
|
325
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'limit' }, { in: 'query', key: 'offset' }] }]);
|
|
276
326
|
return (options?.client ?? this.client).get({
|
|
277
327
|
responseStyle: 'data',
|
|
278
328
|
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
@@ -280,11 +330,17 @@ export class Auth extends HeyApiClient {
|
|
|
280
330
|
name: 'talqing_session',
|
|
281
331
|
type: 'apiKey'
|
|
282
332
|
}],
|
|
283
|
-
url: '/v1/
|
|
284
|
-
...options
|
|
333
|
+
url: '/v1/billing/credits/ledger',
|
|
334
|
+
...options,
|
|
335
|
+
...params
|
|
285
336
|
});
|
|
286
337
|
}
|
|
287
338
|
}
|
|
339
|
+
export class Billing extends HeyApiClient {
|
|
340
|
+
get credits() {
|
|
341
|
+
return this._credits ?? (this._credits = new Credits({ client: this.client }));
|
|
342
|
+
}
|
|
343
|
+
}
|
|
288
344
|
export class ProviderKeys extends HeyApiClient {
|
|
289
345
|
/**
|
|
290
346
|
* List Provider Keys
|
|
@@ -1899,9 +1955,10 @@ export class Batches2 extends HeyApiClient {
|
|
|
1899
1955
|
/**
|
|
1900
1956
|
* Get Email Batch
|
|
1901
1957
|
*
|
|
1902
|
-
* One batch: its policy, its per-status counts
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1958
|
+
* One batch: its policy, its per-status counts and what drafting has cost.
|
|
1959
|
+
*
|
|
1960
|
+
* While the batch is waiting on a start time or a closed window, the response
|
|
1961
|
+
* also carries `next_draft_at`.
|
|
1905
1962
|
*/
|
|
1906
1963
|
get(parameters, options) {
|
|
1907
1964
|
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'batch_id' }] }]);
|
|
@@ -2157,8 +2214,10 @@ export class Triggers extends HeyApiClient {
|
|
|
2157
2214
|
* Patch Integration Trigger
|
|
2158
2215
|
*
|
|
2159
2216
|
* Update a trigger: reassign the agent, change reply mode, enable or
|
|
2160
|
-
* disable it.
|
|
2161
|
-
*
|
|
2217
|
+
* disable it.
|
|
2218
|
+
*
|
|
2219
|
+
* Omitted fields are left unchanged, and enabling one runs the same checks
|
|
2220
|
+
* creating it did.
|
|
2162
2221
|
*/
|
|
2163
2222
|
update(parameters, options) {
|
|
2164
2223
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -2654,113 +2713,6 @@ export class Knowledge2 extends HeyApiClient {
|
|
|
2654
2713
|
return this._pages ?? (this._pages = new Pages({ client: this.client }));
|
|
2655
2714
|
}
|
|
2656
2715
|
}
|
|
2657
|
-
export class Tokens extends HeyApiClient {
|
|
2658
|
-
/**
|
|
2659
|
-
* Mcp Token
|
|
2660
|
-
*
|
|
2661
|
-
* This user's MCP token, in plaintext, with the API URL to pair it with.
|
|
2662
|
-
*
|
|
2663
|
-
* Unlike a token created by hand, this one can be read whenever it is needed:
|
|
2664
|
-
* the dashboard renders it into ready-to-paste MCP configuration for Claude
|
|
2665
|
-
* Code, Codex and Grok. The value is re-derived from the token's row, not
|
|
2666
|
-
* stored, and is the same string every time — so a configuration a user
|
|
2667
|
-
* already saved keeps working.
|
|
2668
|
-
*
|
|
2669
|
-
* It is always the caller's own token, never anyone else's, and is created on
|
|
2670
|
-
* the spot for a user who somehow has none. Delete it from the tokens list to
|
|
2671
|
-
* revoke it; the next call issues a new one, which rotates the credential.
|
|
2672
|
-
*/
|
|
2673
|
-
mcp(options) {
|
|
2674
|
-
return (options?.client ?? this.client).get({
|
|
2675
|
-
responseStyle: 'data',
|
|
2676
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2677
|
-
in: 'cookie',
|
|
2678
|
-
name: 'talqing_session',
|
|
2679
|
-
type: 'apiKey'
|
|
2680
|
-
}],
|
|
2681
|
-
url: '/v1/mcp-token',
|
|
2682
|
-
...options
|
|
2683
|
-
});
|
|
2684
|
-
}
|
|
2685
|
-
/**
|
|
2686
|
-
* List Tokens
|
|
2687
|
-
*
|
|
2688
|
-
* List personal access tokens: your own, or every one in the organization
|
|
2689
|
-
* if you are an admin.
|
|
2690
|
-
*
|
|
2691
|
-
* Who holds which credential is organization-admin information, so an EDITOR
|
|
2692
|
-
* or VIEWER sees only what they created. Plaintext token values are never
|
|
2693
|
-
* returned. A token with `kind: mcp` was issued automatically for the
|
|
2694
|
-
* dashboard's MCP setup; the rest were created by hand.
|
|
2695
|
-
*/
|
|
2696
|
-
list(parameters, options) {
|
|
2697
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'limit' }, { in: 'query', key: 'offset' }] }]);
|
|
2698
|
-
return (options?.client ?? this.client).get({
|
|
2699
|
-
responseStyle: 'data',
|
|
2700
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2701
|
-
in: 'cookie',
|
|
2702
|
-
name: 'talqing_session',
|
|
2703
|
-
type: 'apiKey'
|
|
2704
|
-
}],
|
|
2705
|
-
url: '/v1/tokens',
|
|
2706
|
-
...options,
|
|
2707
|
-
...params
|
|
2708
|
-
});
|
|
2709
|
-
}
|
|
2710
|
-
/**
|
|
2711
|
-
* Create Token
|
|
2712
|
-
*
|
|
2713
|
-
* Create a personal access token for driving this API without the dashboard.
|
|
2714
|
-
*
|
|
2715
|
-
* The token authenticates as its creator and acts with that user's live role,
|
|
2716
|
-
* so it can never do more than they can. It does not expire; deleting it is
|
|
2717
|
-
* the revocation. The plaintext value is returned once here and never again —
|
|
2718
|
-
* treat it like a password and do not echo it back into a conversation.
|
|
2719
|
-
*/
|
|
2720
|
-
create(parameters, options) {
|
|
2721
|
-
const params = buildClientParams([parameters], [{ args: [{ key: 'createTokenRequest', map: 'body' }] }]);
|
|
2722
|
-
return (options?.client ?? this.client).post({
|
|
2723
|
-
responseStyle: 'data',
|
|
2724
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2725
|
-
in: 'cookie',
|
|
2726
|
-
name: 'talqing_session',
|
|
2727
|
-
type: 'apiKey'
|
|
2728
|
-
}],
|
|
2729
|
-
url: '/v1/tokens',
|
|
2730
|
-
...options,
|
|
2731
|
-
...params,
|
|
2732
|
-
headers: {
|
|
2733
|
-
'Content-Type': 'application/json',
|
|
2734
|
-
...options?.headers,
|
|
2735
|
-
...params.headers
|
|
2736
|
-
}
|
|
2737
|
-
});
|
|
2738
|
-
}
|
|
2739
|
-
/**
|
|
2740
|
-
* Delete Token
|
|
2741
|
-
*
|
|
2742
|
-
* Revoke a token immediately and permanently.
|
|
2743
|
-
*
|
|
2744
|
-
* Owners can delete their own; organization admins can delete any in the
|
|
2745
|
-
* organization. Deleting an `mcp` token rotates it: the owner's next dashboard
|
|
2746
|
-
* visit issues a replacement, and anything still configured with the old one
|
|
2747
|
-
* stops working.
|
|
2748
|
-
*/
|
|
2749
|
-
delete(parameters, options) {
|
|
2750
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'token_id' }] }]);
|
|
2751
|
-
return (options?.client ?? this.client).delete({
|
|
2752
|
-
responseStyle: 'data',
|
|
2753
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2754
|
-
in: 'cookie',
|
|
2755
|
-
name: 'talqing_session',
|
|
2756
|
-
type: 'apiKey'
|
|
2757
|
-
}],
|
|
2758
|
-
url: '/v1/tokens/{token_id}',
|
|
2759
|
-
...options,
|
|
2760
|
-
...params
|
|
2761
|
-
});
|
|
2762
|
-
}
|
|
2763
|
-
}
|
|
2764
2716
|
export class Observability extends HeyApiClient {
|
|
2765
2717
|
/**
|
|
2766
2718
|
* Get Observability
|
|
@@ -2802,218 +2754,19 @@ export class Observability extends HeyApiClient {
|
|
|
2802
2754
|
});
|
|
2803
2755
|
}
|
|
2804
2756
|
}
|
|
2805
|
-
export class
|
|
2806
|
-
/**
|
|
2807
|
-
* List Invites
|
|
2808
|
-
*
|
|
2809
|
-
* Invites waiting on a first login. Accepted and revoked ones drop off the
|
|
2810
|
-
* list — an accepted invite is a member, and belongs on the roster instead.
|
|
2811
|
-
*/
|
|
2812
|
-
list(parameters, options) {
|
|
2813
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'limit' }, { in: 'query', key: 'offset' }] }]);
|
|
2814
|
-
return (options?.client ?? this.client).get({
|
|
2815
|
-
responseStyle: 'data',
|
|
2816
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2817
|
-
in: 'cookie',
|
|
2818
|
-
name: 'talqing_session',
|
|
2819
|
-
type: 'apiKey'
|
|
2820
|
-
}],
|
|
2821
|
-
url: '/v1/org/invites',
|
|
2822
|
-
...options,
|
|
2823
|
-
...params
|
|
2824
|
-
});
|
|
2825
|
-
}
|
|
2826
|
-
/**
|
|
2827
|
-
* Create Invite
|
|
2828
|
-
*
|
|
2829
|
-
* Invite an email address into this organization with a role.
|
|
2830
|
-
*
|
|
2831
|
-
* There is no invite link and no accept step: the invite is keyed to a Google
|
|
2832
|
-
* identity, so signing in with that address *is* the check. Someone who
|
|
2833
|
-
* already has an account joins immediately; anyone else joins the first time
|
|
2834
|
-
* they sign in.
|
|
2835
|
-
*
|
|
2836
|
-
* No email is sent at MVP, so an existing user finds out by seeing the
|
|
2837
|
-
* organization appear in their switcher — tell them yourself.
|
|
2838
|
-
*/
|
|
2839
|
-
create(parameters, options) {
|
|
2840
|
-
const params = buildClientParams([parameters], [{ args: [{ key: 'inviteRequest', map: 'body' }] }]);
|
|
2841
|
-
return (options?.client ?? this.client).post({
|
|
2842
|
-
responseStyle: 'data',
|
|
2843
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2844
|
-
in: 'cookie',
|
|
2845
|
-
name: 'talqing_session',
|
|
2846
|
-
type: 'apiKey'
|
|
2847
|
-
}],
|
|
2848
|
-
url: '/v1/org/invites',
|
|
2849
|
-
...options,
|
|
2850
|
-
...params,
|
|
2851
|
-
headers: {
|
|
2852
|
-
'Content-Type': 'application/json',
|
|
2853
|
-
...options?.headers,
|
|
2854
|
-
...params.headers
|
|
2855
|
-
}
|
|
2856
|
-
});
|
|
2857
|
-
}
|
|
2858
|
-
/**
|
|
2859
|
-
* Revoke Invite
|
|
2860
|
-
*
|
|
2861
|
-
* Withdraw a pending invite, so signing in with that address no longer
|
|
2862
|
-
* joins this organization.
|
|
2863
|
-
*/
|
|
2864
|
-
revoke(parameters, options) {
|
|
2865
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'invite_id' }] }]);
|
|
2866
|
-
return (options?.client ?? this.client).delete({
|
|
2867
|
-
responseStyle: 'data',
|
|
2868
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2869
|
-
in: 'cookie',
|
|
2870
|
-
name: 'talqing_session',
|
|
2871
|
-
type: 'apiKey'
|
|
2872
|
-
}],
|
|
2873
|
-
url: '/v1/org/invites/{invite_id}',
|
|
2874
|
-
...options,
|
|
2875
|
-
...params
|
|
2876
|
-
});
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
|
-
export class Members extends HeyApiClient {
|
|
2880
|
-
/**
|
|
2881
|
-
* List Members
|
|
2882
|
-
*
|
|
2883
|
-
* Every member sees the roster; only an ADMIN can change it.
|
|
2884
|
-
*/
|
|
2885
|
-
list(parameters, options) {
|
|
2886
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'limit' }, { in: 'query', key: 'offset' }] }]);
|
|
2887
|
-
return (options?.client ?? this.client).get({
|
|
2888
|
-
responseStyle: 'data',
|
|
2889
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2890
|
-
in: 'cookie',
|
|
2891
|
-
name: 'talqing_session',
|
|
2892
|
-
type: 'apiKey'
|
|
2893
|
-
}],
|
|
2894
|
-
url: '/v1/org/members',
|
|
2895
|
-
...options,
|
|
2896
|
-
...params
|
|
2897
|
-
});
|
|
2898
|
-
}
|
|
2757
|
+
export class Functions extends HeyApiClient {
|
|
2899
2758
|
/**
|
|
2900
|
-
*
|
|
2759
|
+
* Describe Function
|
|
2901
2760
|
*
|
|
2902
|
-
*
|
|
2761
|
+
* The full argument schema of one function, by name.
|
|
2903
2762
|
*
|
|
2904
|
-
*
|
|
2905
|
-
*
|
|
2906
|
-
*
|
|
2907
|
-
*
|
|
2908
|
-
* they have somewhere else to go is not this organization's problem, and their
|
|
2909
|
-
* next sign-in gives them one of their own.
|
|
2763
|
+
* Every function's arguments are fetched here rather than shown up front, so
|
|
2764
|
+
* call this before the first time you use one. Two exceptions, which carry
|
|
2765
|
+
* their own shape because they would otherwise be uncallable: this function
|
|
2766
|
+
* and `describe_schema`.
|
|
2910
2767
|
*/
|
|
2911
|
-
|
|
2912
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: '
|
|
2913
|
-
return (options?.client ?? this.client).delete({
|
|
2914
|
-
responseStyle: 'data',
|
|
2915
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2916
|
-
in: 'cookie',
|
|
2917
|
-
name: 'talqing_session',
|
|
2918
|
-
type: 'apiKey'
|
|
2919
|
-
}],
|
|
2920
|
-
url: '/v1/org/members/{user_id}',
|
|
2921
|
-
...options,
|
|
2922
|
-
...params
|
|
2923
|
-
});
|
|
2924
|
-
}
|
|
2925
|
-
/**
|
|
2926
|
-
* Set Member Role
|
|
2927
|
-
*
|
|
2928
|
-
* Change a member's role. Takes effect on their very next request.
|
|
2929
|
-
*/
|
|
2930
|
-
setRole(parameters, options) {
|
|
2931
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'user_id' }, { key: 'roleRequest', map: 'body' }] }]);
|
|
2932
|
-
return (options?.client ?? this.client).patch({
|
|
2933
|
-
responseStyle: 'data',
|
|
2934
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2935
|
-
in: 'cookie',
|
|
2936
|
-
name: 'talqing_session',
|
|
2937
|
-
type: 'apiKey'
|
|
2938
|
-
}],
|
|
2939
|
-
url: '/v1/org/members/{user_id}',
|
|
2940
|
-
...options,
|
|
2941
|
-
...params,
|
|
2942
|
-
headers: {
|
|
2943
|
-
'Content-Type': 'application/json',
|
|
2944
|
-
...options?.headers,
|
|
2945
|
-
...params.headers
|
|
2946
|
-
}
|
|
2947
|
-
});
|
|
2948
|
-
}
|
|
2949
|
-
}
|
|
2950
|
-
export class Orgs extends HeyApiClient {
|
|
2951
|
-
/**
|
|
2952
|
-
* Patch Org
|
|
2953
|
-
*
|
|
2954
|
-
* Change this organization's name or its data retention policy.
|
|
2955
|
-
*
|
|
2956
|
-
* The name is display only — nothing keys on it.
|
|
2957
|
-
*
|
|
2958
|
-
* `retention_days` is how long call and conversation *content* is kept:
|
|
2959
|
-
* recordings, transcripts, summaries, extracted fields and the phone numbers
|
|
2960
|
-
* on a call. When it passes, all of that is deleted and the call itself
|
|
2961
|
-
* remains, with its duration, outcome and cost, so past invoices still
|
|
2962
|
-
* resolve. `null` keeps everything forever, which is the default.
|
|
2963
|
-
*
|
|
2964
|
-
* It applies to calls from now on: a call already in the system keeps the
|
|
2965
|
-
* deadline it was given when it ended, so shortening the policy never
|
|
2966
|
-
* retroactively destroys anything. Erasing a contact's last call also resets
|
|
2967
|
-
* what your agents remember about that person.
|
|
2968
|
-
*/
|
|
2969
|
-
update(parameters, options) {
|
|
2970
|
-
const params = buildClientParams([parameters], [{ args: [{ key: 'patchOrgRequest', map: 'body' }] }]);
|
|
2971
|
-
return (options?.client ?? this.client).patch({
|
|
2972
|
-
responseStyle: 'data',
|
|
2973
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2974
|
-
in: 'cookie',
|
|
2975
|
-
name: 'talqing_session',
|
|
2976
|
-
type: 'apiKey'
|
|
2977
|
-
}],
|
|
2978
|
-
url: '/v1/org',
|
|
2979
|
-
...options,
|
|
2980
|
-
...params,
|
|
2981
|
-
headers: {
|
|
2982
|
-
'Content-Type': 'application/json',
|
|
2983
|
-
...options?.headers,
|
|
2984
|
-
...params.headers
|
|
2985
|
-
}
|
|
2986
|
-
});
|
|
2987
|
-
}
|
|
2988
|
-
/**
|
|
2989
|
-
* Leave Org
|
|
2990
|
-
*
|
|
2991
|
-
* Leave this organization. Any member may, including an admin who has
|
|
2992
|
-
* promoted a successor. Nothing they created is deleted.
|
|
2993
|
-
*/
|
|
2994
|
-
leave(options) {
|
|
2995
|
-
return (options?.client ?? this.client).post({
|
|
2996
|
-
responseStyle: 'data',
|
|
2997
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
2998
|
-
in: 'cookie',
|
|
2999
|
-
name: 'talqing_session',
|
|
3000
|
-
type: 'apiKey'
|
|
3001
|
-
}],
|
|
3002
|
-
url: '/v1/org/leave',
|
|
3003
|
-
...options
|
|
3004
|
-
});
|
|
3005
|
-
}
|
|
3006
|
-
/**
|
|
3007
|
-
* List Orgs
|
|
3008
|
-
*
|
|
3009
|
-
* Every organization the signed-in user belongs to, with their role in each.
|
|
3010
|
-
*
|
|
3011
|
-
* Newest membership first, deliberately: an admin can add you to their
|
|
3012
|
-
* organization without you being asked or emailed, so the one you did not know
|
|
3013
|
-
* about is the one that needs to be visible.
|
|
3014
|
-
*/
|
|
3015
|
-
list(parameters, options) {
|
|
3016
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'limit' }, { in: 'query', key: 'offset' }] }]);
|
|
2768
|
+
get(parameters, options) {
|
|
2769
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'name' }] }]);
|
|
3017
2770
|
return (options?.client ?? this.client).get({
|
|
3018
2771
|
responseStyle: 'data',
|
|
3019
2772
|
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
@@ -3021,66 +2774,11 @@ export class Orgs extends HeyApiClient {
|
|
|
3021
2774
|
name: 'talqing_session',
|
|
3022
2775
|
type: 'apiKey'
|
|
3023
2776
|
}],
|
|
3024
|
-
url: '/v1/
|
|
3025
|
-
...options,
|
|
3026
|
-
...params
|
|
3027
|
-
});
|
|
3028
|
-
}
|
|
3029
|
-
/**
|
|
3030
|
-
* Create Org
|
|
3031
|
-
*
|
|
3032
|
-
* Create a new, empty organization with the caller as its ADMIN.
|
|
3033
|
-
*
|
|
3034
|
-
* Any member can do this — it grants nothing in the organization they are
|
|
3035
|
-
* currently in. Switch into it to start working there.
|
|
3036
|
-
*/
|
|
3037
|
-
create(parameters, options) {
|
|
3038
|
-
const params = buildClientParams([parameters], [{ args: [{ key: 'orgNameRequest', map: 'body' }] }]);
|
|
3039
|
-
return (options?.client ?? this.client).post({
|
|
3040
|
-
responseStyle: 'data',
|
|
3041
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
3042
|
-
in: 'cookie',
|
|
3043
|
-
name: 'talqing_session',
|
|
3044
|
-
type: 'apiKey'
|
|
3045
|
-
}],
|
|
3046
|
-
url: '/v1/orgs',
|
|
3047
|
-
...options,
|
|
3048
|
-
...params,
|
|
3049
|
-
headers: {
|
|
3050
|
-
'Content-Type': 'application/json',
|
|
3051
|
-
...options?.headers,
|
|
3052
|
-
...params.headers
|
|
3053
|
-
}
|
|
3054
|
-
});
|
|
3055
|
-
}
|
|
3056
|
-
/**
|
|
3057
|
-
* Switch Org
|
|
3058
|
-
*
|
|
3059
|
-
* Point the dashboard session at another of the caller's organizations.
|
|
3060
|
-
*
|
|
3061
|
-
* The session cookie carries the organization, so switching re-issues it — the
|
|
3062
|
-
* caller's role, resources and billing all move with it. Reload after this.
|
|
3063
|
-
*/
|
|
3064
|
-
switch(parameters, options) {
|
|
3065
|
-
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'org_id' }] }]);
|
|
3066
|
-
return (options?.client ?? this.client).post({
|
|
3067
|
-
responseStyle: 'data',
|
|
3068
|
-
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
3069
|
-
in: 'cookie',
|
|
3070
|
-
name: 'talqing_session',
|
|
3071
|
-
type: 'apiKey'
|
|
3072
|
-
}],
|
|
3073
|
-
url: '/v1/orgs/{org_id}/switch',
|
|
2777
|
+
url: '/v1/schemas/functions/{name}',
|
|
3074
2778
|
...options,
|
|
3075
2779
|
...params
|
|
3076
2780
|
});
|
|
3077
2781
|
}
|
|
3078
|
-
get invites() {
|
|
3079
|
-
return this._invites ?? (this._invites = new Invites({ client: this.client }));
|
|
3080
|
-
}
|
|
3081
|
-
get members() {
|
|
3082
|
-
return this._members ?? (this._members = new Members({ client: this.client }));
|
|
3083
|
-
}
|
|
3084
2782
|
}
|
|
3085
2783
|
export class Schemas extends HeyApiClient {
|
|
3086
2784
|
/**
|
|
@@ -3113,6 +2811,9 @@ export class Schemas extends HeyApiClient {
|
|
|
3113
2811
|
...params
|
|
3114
2812
|
});
|
|
3115
2813
|
}
|
|
2814
|
+
get functions() {
|
|
2815
|
+
return this._functions ?? (this._functions = new Functions({ client: this.client }));
|
|
2816
|
+
}
|
|
3116
2817
|
}
|
|
3117
2818
|
export class Secrets extends HeyApiClient {
|
|
3118
2819
|
/**
|
|
@@ -3299,7 +3000,8 @@ export class Tasks2 extends HeyApiClient {
|
|
|
3299
3000
|
/**
|
|
3300
3001
|
* Create Task
|
|
3301
3002
|
*
|
|
3302
|
-
* Create an agent task
|
|
3003
|
+
* Create an agent task: an agent nobody talks to, which takes named inputs
|
|
3004
|
+
* and returns a typed result.
|
|
3303
3005
|
*
|
|
3304
3006
|
* A task has no draft and no publish step: it is valid the moment it saves and
|
|
3305
3007
|
* callable immediately. An invalid config is a 400 listing every problem and
|
|
@@ -4248,8 +3950,8 @@ export class TalqingApi extends HeyApiClient {
|
|
|
4248
3950
|
*
|
|
4249
3951
|
* Liveness probe: `200` once this process is serving. Unauthenticated.
|
|
4250
3952
|
*
|
|
4251
|
-
* It answers for the API process, not its dependencies — a `200` here does
|
|
4252
|
-
* promise Postgres, Redis or LiveKit are reachable.
|
|
3953
|
+
* It answers for the API process, not its dependencies — a `200` here does
|
|
3954
|
+
* not promise Postgres, Redis or LiveKit are reachable.
|
|
4253
3955
|
*/
|
|
4254
3956
|
health(options) {
|
|
4255
3957
|
return (options?.client ?? this.client).get({
|
|
@@ -4261,8 +3963,8 @@ export class TalqingApi extends HeyApiClient {
|
|
|
4261
3963
|
get agents() {
|
|
4262
3964
|
return this._agents ?? (this._agents = new Agents({ client: this.client }));
|
|
4263
3965
|
}
|
|
4264
|
-
get
|
|
4265
|
-
return this.
|
|
3966
|
+
get billing() {
|
|
3967
|
+
return this._billing ?? (this._billing = new Billing({ client: this.client }));
|
|
4266
3968
|
}
|
|
4267
3969
|
get providerKeys() {
|
|
4268
3970
|
return this._providerKeys ?? (this._providerKeys = new ProviderKeys({ client: this.client }));
|
|
@@ -4288,15 +3990,9 @@ export class TalqingApi extends HeyApiClient {
|
|
|
4288
3990
|
get knowledge() {
|
|
4289
3991
|
return this._knowledge ?? (this._knowledge = new Knowledge2({ client: this.client }));
|
|
4290
3992
|
}
|
|
4291
|
-
get tokens() {
|
|
4292
|
-
return this._tokens ?? (this._tokens = new Tokens({ client: this.client }));
|
|
4293
|
-
}
|
|
4294
3993
|
get observability() {
|
|
4295
3994
|
return this._observability ?? (this._observability = new Observability({ client: this.client }));
|
|
4296
3995
|
}
|
|
4297
|
-
get orgs() {
|
|
4298
|
-
return this._orgs ?? (this._orgs = new Orgs({ client: this.client }));
|
|
4299
|
-
}
|
|
4300
3996
|
get schemas() {
|
|
4301
3997
|
return this._schemas ?? (this._schemas = new Schemas({ client: this.client }));
|
|
4302
3998
|
}
|