@roarkanalytics/sdk 5.20.0 → 5.22.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/CHANGELOG.md +24 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-draft.d.mts +1311 -0
- package/resources/agent-draft.d.mts.map +1 -0
- package/resources/agent-draft.d.ts +1311 -0
- package/resources/agent-draft.d.ts.map +1 -0
- package/resources/agent-draft.js +83 -0
- package/resources/agent-draft.js.map +1 -0
- package/resources/agent-draft.mjs +79 -0
- package/resources/agent-draft.mjs.map +1 -0
- package/resources/agent-version.d.mts +767 -0
- package/resources/agent-version.d.mts.map +1 -0
- package/resources/agent-version.d.ts +767 -0
- package/resources/agent-version.d.ts.map +1 -0
- package/resources/agent-version.js +59 -0
- package/resources/agent-version.js.map +1 -0
- package/resources/agent-version.mjs +55 -0
- package/resources/agent-version.mjs.map +1 -0
- package/resources/agent.d.mts +2 -3
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +2 -3
- package/resources/agent.d.ts.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/phone-number.d.mts +66 -14
- package/resources/phone-number.d.mts.map +1 -1
- package/resources/phone-number.d.ts +66 -14
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +11 -8
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +11 -8
- package/resources/phone-number.mjs.map +1 -1
- package/src/client.ts +46 -0
- package/src/resources/agent-draft.ts +1846 -0
- package/src/resources/agent-version.ts +1065 -0
- package/src/resources/agent.ts +2 -3
- package/src/resources/index.ts +20 -0
- package/src/resources/phone-number.ts +78 -14
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/agent.ts
CHANGED
|
@@ -355,10 +355,9 @@ export namespace AgentBuildParams {
|
|
|
355
355
|
*/
|
|
356
356
|
export interface Tts {
|
|
357
357
|
/**
|
|
358
|
-
* Text-to-speech provider, for example ELEVENLABS
|
|
359
|
-
* list.
|
|
358
|
+
* Text-to-speech provider, for example ELEVENLABS
|
|
360
359
|
*/
|
|
361
|
-
provider:
|
|
360
|
+
provider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME';
|
|
362
361
|
|
|
363
362
|
/**
|
|
364
363
|
* The provider's id for the voice
|
package/src/resources/index.ts
CHANGED
|
@@ -24,6 +24,17 @@ export {
|
|
|
24
24
|
type AgentConfigUpdateParams,
|
|
25
25
|
type AgentConfigResolveParams,
|
|
26
26
|
} from './agent-config';
|
|
27
|
+
export {
|
|
28
|
+
AgentDraft,
|
|
29
|
+
type AgentDraftCreateResponse,
|
|
30
|
+
type AgentDraftUpdateResponse,
|
|
31
|
+
type AgentDraftDeleteResponse,
|
|
32
|
+
type AgentDraftGetResponse,
|
|
33
|
+
type AgentDraftPublishResponse,
|
|
34
|
+
type AgentDraftCreateParams,
|
|
35
|
+
type AgentDraftUpdateParams,
|
|
36
|
+
type AgentDraftPublishParams,
|
|
37
|
+
} from './agent-draft';
|
|
27
38
|
export {
|
|
28
39
|
AgentEndpoint,
|
|
29
40
|
type AgentEndpointCreateResponse,
|
|
@@ -42,6 +53,15 @@ export {
|
|
|
42
53
|
type AgentPromptUpdateParams,
|
|
43
54
|
type AgentPromptListVersionsParams,
|
|
44
55
|
} from './agent-prompt';
|
|
56
|
+
export {
|
|
57
|
+
AgentVersion,
|
|
58
|
+
type AgentVersionListResponse,
|
|
59
|
+
type AgentVersionGetByIDResponse,
|
|
60
|
+
type AgentVersionRestoreResponse,
|
|
61
|
+
type AgentVersionListParams,
|
|
62
|
+
type AgentVersionGetByIDParams,
|
|
63
|
+
type AgentVersionRestoreParams,
|
|
64
|
+
} from './agent-version';
|
|
45
65
|
export {
|
|
46
66
|
Analytics,
|
|
47
67
|
type AnalyticsGetSchemaResponse,
|
|
@@ -7,17 +7,20 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class PhoneNumber extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Buys a number from the carrier for this project
|
|
11
|
-
*
|
|
10
|
+
* Buys a number from the carrier for this project: the one named by e164, or one
|
|
11
|
+
* Roark picks to match autoPick (trying the next match if the carrier has just
|
|
12
|
+
* sold one). Free inside the plan allowance; past it, the first month of rent is
|
|
13
|
+
* charged now and monthly after that.
|
|
12
14
|
*
|
|
13
15
|
* @example
|
|
14
16
|
* ```ts
|
|
15
|
-
* const phoneNumber = await client.phoneNumber.create(
|
|
16
|
-
* e164: '+14155550123',
|
|
17
|
-
* });
|
|
17
|
+
* const phoneNumber = await client.phoneNumber.create();
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
create(
|
|
20
|
+
create(
|
|
21
|
+
body: PhoneNumberCreateParams | null | undefined = {},
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): APIPromise<PhoneNumberCreateResponse> {
|
|
21
24
|
return this._client.post('/v1/phone-number', { body, ...options });
|
|
22
25
|
}
|
|
23
26
|
|
|
@@ -85,8 +88,11 @@ export class PhoneNumber extends APIResource {
|
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
/**
|
|
88
|
-
* Returns US numbers the carrier has for sale,
|
|
89
|
-
* the number must contain.
|
|
91
|
+
* Returns US or Canadian numbers the carrier has for sale, local or toll-free,
|
|
92
|
+
* narrowed by area code or by digits the number must contain. When an area code
|
|
93
|
+
* has no numbers, nearby ones are returned flagged bestEffort; an empty list means
|
|
94
|
+
* nothing matched. Buy one with POST /v1/phone-number, or let Roark pick with
|
|
95
|
+
* autoPick.
|
|
90
96
|
*
|
|
91
97
|
* @example
|
|
92
98
|
* ```ts
|
|
@@ -374,6 +380,12 @@ export namespace PhoneNumberListAvailableResponse {
|
|
|
374
380
|
* A number the carrier has for sale
|
|
375
381
|
*/
|
|
376
382
|
export interface Data {
|
|
383
|
+
/**
|
|
384
|
+
* True when the area code asked for had no numbers and the carrier offered this
|
|
385
|
+
* nearby one instead
|
|
386
|
+
*/
|
|
387
|
+
bestEffort: boolean;
|
|
388
|
+
|
|
377
389
|
/**
|
|
378
390
|
* The number in E.164 format
|
|
379
391
|
*/
|
|
@@ -393,14 +405,25 @@ export namespace PhoneNumberListAvailableResponse {
|
|
|
393
405
|
|
|
394
406
|
export interface PhoneNumberCreateParams {
|
|
395
407
|
/**
|
|
396
|
-
* The
|
|
408
|
+
* The agent to assign the number to
|
|
397
409
|
*/
|
|
398
|
-
|
|
410
|
+
agentId?: string;
|
|
399
411
|
|
|
400
412
|
/**
|
|
401
|
-
*
|
|
413
|
+
* Let Roark pick a matching number instead of naming one. Give this or e164.
|
|
402
414
|
*/
|
|
403
|
-
|
|
415
|
+
autoPick?: PhoneNumberCreateParams.AutoPick;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* The country of the number given by e164 (default: US). An auto-picked number
|
|
419
|
+
* uses autoPick.country.
|
|
420
|
+
*/
|
|
421
|
+
country?: 'US' | 'CA';
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* The number to buy, in E.164 format, from a search result. Give this or autoPick.
|
|
425
|
+
*/
|
|
426
|
+
e164?: string;
|
|
404
427
|
|
|
405
428
|
/**
|
|
406
429
|
* Whether you expect this number to be free (from the allowance). The purchase is
|
|
@@ -420,6 +443,35 @@ export interface PhoneNumberCreateParams {
|
|
|
420
443
|
name?: string;
|
|
421
444
|
}
|
|
422
445
|
|
|
446
|
+
export namespace PhoneNumberCreateParams {
|
|
447
|
+
/**
|
|
448
|
+
* Let Roark pick a matching number instead of naming one. Give this or e164.
|
|
449
|
+
*/
|
|
450
|
+
export interface AutoPick {
|
|
451
|
+
/**
|
|
452
|
+
* Three-digit area code, or a toll-free prefix such as 800. When it has no
|
|
453
|
+
* numbers, nearby ones are returned instead, flagged bestEffort.
|
|
454
|
+
*/
|
|
455
|
+
areaCode?: string;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Digits or letters the number must contain (1 to 7, \* matches any digit)
|
|
459
|
+
*/
|
|
460
|
+
contains?: string;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* ISO 3166-1 alpha-2 country of the number: US or CA
|
|
464
|
+
*/
|
|
465
|
+
country?: 'US' | 'CA';
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* LOCAL for a number in an area code, TOLL_FREE for one from the shared US and
|
|
469
|
+
* Canada toll-free pool
|
|
470
|
+
*/
|
|
471
|
+
numberType?: 'LOCAL' | 'TOLL_FREE';
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
423
475
|
export interface PhoneNumberUpdateParams {
|
|
424
476
|
/**
|
|
425
477
|
* Agent to assign the number to; null unassigns, omit to leave it alone
|
|
@@ -441,7 +493,8 @@ export interface PhoneNumberListParams {
|
|
|
441
493
|
|
|
442
494
|
export interface PhoneNumberListAvailableParams {
|
|
443
495
|
/**
|
|
444
|
-
* Three-digit
|
|
496
|
+
* Three-digit area code, or a toll-free prefix such as 800. When it has no
|
|
497
|
+
* numbers, nearby ones are returned instead, flagged bestEffort.
|
|
445
498
|
*/
|
|
446
499
|
areaCode?: string;
|
|
447
500
|
|
|
@@ -451,9 +504,20 @@ export interface PhoneNumberListAvailableParams {
|
|
|
451
504
|
contains?: string;
|
|
452
505
|
|
|
453
506
|
/**
|
|
454
|
-
*
|
|
507
|
+
* ISO 3166-1 alpha-2 country of the number: US or CA
|
|
508
|
+
*/
|
|
509
|
+
country?: 'US' | 'CA';
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Maximum number of results (default: 20, max: 100)
|
|
455
513
|
*/
|
|
456
514
|
limit?: number;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* LOCAL for a number in an area code, TOLL_FREE for one from the shared US and
|
|
518
|
+
* Canada toll-free pool
|
|
519
|
+
*/
|
|
520
|
+
numberType?: 'LOCAL' | 'TOLL_FREE';
|
|
457
521
|
}
|
|
458
522
|
|
|
459
523
|
export declare namespace PhoneNumber {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '5.
|
|
1
|
+
export const VERSION = '5.22.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "5.
|
|
1
|
+
export declare const VERSION = "5.22.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "5.
|
|
1
|
+
export declare const VERSION = "5.22.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '5.
|
|
1
|
+
export const VERSION = '5.22.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|