agentphone 1.0.15 → 1.0.16
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +5 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +5 -0
- package/dist/cjs/api/resources/calls/client/requests/CreateOutboundCallRequest.d.ts +4 -0
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +20 -0
- package/dist/cjs/api/resources/contacts/client/Client.js +62 -0
- package/dist/cjs/api/resources/contacts/client/requests/GetContactCapabilitiesV1ContactsCapabilitiesGetRequest.d.ts +10 -0
- package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/registration/client/Client.d.ts +36 -9
- package/dist/cjs/api/resources/registration/client/Client.js +67 -9
- package/dist/cjs/api/resources/registration/client/requests/GetRegistrationStatusV1RegisterStatusGetRequest.d.ts +8 -0
- package/dist/cjs/api/resources/registration/client/requests/GetRegistrationStatusV1RegisterStatusGetRequest.js +3 -0
- package/dist/cjs/api/resources/registration/client/requests/RegistrationRequest.d.ts +52 -30
- package/dist/cjs/api/resources/registration/client/requests/RegistrationRequest.js +9 -0
- package/dist/cjs/api/resources/registration/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/resources/registration/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/subAccounts/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/subAccounts/client/Client.js +23 -10
- package/dist/cjs/api/resources/subAccounts/client/requests/ListSubAccountsV1SubAccountsGetRequest.d.ts +8 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/ListSubAccountsV1SubAccountsGetRequest.js +3 -0
- package/dist/cjs/api/resources/subAccounts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/AgentResponse.d.ts +3 -0
- package/dist/cjs/api/types/CampaignInclude.d.ts +7 -0
- package/dist/cjs/api/types/CampaignInclude.js +10 -0
- package/dist/cjs/api/types/CampaignStatusResponse.d.ts +4 -0
- package/dist/cjs/api/types/CampaignStatusResponse.js +3 -0
- package/dist/cjs/api/types/ContactCapabilitiesResponse.d.ts +6 -0
- package/dist/cjs/api/types/ContactCapabilitiesResponse.js +3 -0
- package/dist/cjs/api/types/ContactCapabilityFlags.d.ts +4 -0
- package/dist/cjs/api/types/ContactCapabilityFlags.js +3 -0
- package/dist/cjs/api/types/ContactTitle.d.ts +11 -0
- package/dist/cjs/api/types/ContactTitle.js +14 -0
- package/dist/cjs/api/types/CustomToolParam.d.ts +28 -0
- package/dist/cjs/api/types/CustomToolParam.js +12 -0
- package/dist/cjs/api/types/OrganizationType.d.ts +11 -0
- package/dist/cjs/api/types/OrganizationType.js +14 -0
- package/dist/cjs/api/types/RegistrationResponse.d.ts +2 -3
- package/dist/cjs/api/types/UseCase.d.ts +13 -0
- package/dist/cjs/api/types/UseCase.js +16 -0
- package/dist/cjs/api/types/Volume.d.ts +5 -0
- package/dist/cjs/api/types/Volume.js +8 -0
- package/dist/cjs/api/types/index.d.ts +9 -1
- package/dist/cjs/api/types/index.js +9 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +5 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +5 -0
- package/dist/esm/api/resources/calls/client/requests/CreateOutboundCallRequest.d.mts +4 -0
- package/dist/esm/api/resources/contacts/client/Client.d.mts +20 -0
- package/dist/esm/api/resources/contacts/client/Client.mjs +62 -0
- package/dist/esm/api/resources/contacts/client/requests/GetContactCapabilitiesV1ContactsCapabilitiesGetRequest.d.mts +10 -0
- package/dist/esm/api/resources/contacts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/registration/client/Client.d.mts +36 -9
- package/dist/esm/api/resources/registration/client/Client.mjs +68 -10
- package/dist/esm/api/resources/registration/client/requests/GetRegistrationStatusV1RegisterStatusGetRequest.d.mts +8 -0
- package/dist/esm/api/resources/registration/client/requests/GetRegistrationStatusV1RegisterStatusGetRequest.mjs +2 -0
- package/dist/esm/api/resources/registration/client/requests/RegistrationRequest.d.mts +52 -30
- package/dist/esm/api/resources/registration/client/requests/RegistrationRequest.mjs +8 -1
- package/dist/esm/api/resources/registration/client/requests/index.d.mts +2 -1
- package/dist/esm/api/resources/registration/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/subAccounts/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/subAccounts/client/Client.mjs +23 -10
- package/dist/esm/api/resources/subAccounts/client/requests/ListSubAccountsV1SubAccountsGetRequest.d.mts +8 -0
- package/dist/esm/api/resources/subAccounts/client/requests/ListSubAccountsV1SubAccountsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/subAccounts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/AgentResponse.d.mts +3 -0
- package/dist/esm/api/types/CampaignInclude.d.mts +7 -0
- package/dist/esm/api/types/CampaignInclude.mjs +7 -0
- package/dist/esm/api/types/CampaignStatusResponse.d.mts +4 -0
- package/dist/esm/api/types/CampaignStatusResponse.mjs +2 -0
- package/dist/esm/api/types/ContactCapabilitiesResponse.d.mts +6 -0
- package/dist/esm/api/types/ContactCapabilitiesResponse.mjs +2 -0
- package/dist/esm/api/types/ContactCapabilityFlags.d.mts +4 -0
- package/dist/esm/api/types/ContactCapabilityFlags.mjs +2 -0
- package/dist/esm/api/types/ContactTitle.d.mts +11 -0
- package/dist/esm/api/types/ContactTitle.mjs +11 -0
- package/dist/esm/api/types/CustomToolParam.d.mts +28 -0
- package/dist/esm/api/types/CustomToolParam.mjs +9 -0
- package/dist/esm/api/types/OrganizationType.d.mts +11 -0
- package/dist/esm/api/types/OrganizationType.mjs +11 -0
- package/dist/esm/api/types/RegistrationResponse.d.mts +2 -3
- package/dist/esm/api/types/UseCase.d.mts +13 -0
- package/dist/esm/api/types/UseCase.mjs +13 -0
- package/dist/esm/api/types/Volume.d.mts +5 -0
- package/dist/esm/api/types/Volume.mjs +5 -0
- package/dist/esm/api/types/index.d.mts +9 -1
- package/dist/esm/api/types/index.mjs +9 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +167 -10
- package/dist/cjs/api/types/FieldWarning.d.ts +0 -6
- package/dist/esm/api/types/FieldWarning.d.mts +0 -6
- /package/dist/cjs/api/{types/FieldWarning.js → resources/contacts/client/requests/GetContactCapabilitiesV1ContactsCapabilitiesGetRequest.js} +0 -0
- /package/dist/esm/api/{types/FieldWarning.mjs → resources/contacts/client/requests/GetContactCapabilitiesV1ContactsCapabilitiesGetRequest.mjs} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CampaignInclude: {
|
|
2
|
+
readonly Links: "links";
|
|
3
|
+
readonly PhoneNumbers: "phone_numbers";
|
|
4
|
+
readonly AgeGated: "age_gated";
|
|
5
|
+
readonly DirectLending: "direct_lending";
|
|
6
|
+
};
|
|
7
|
+
export type CampaignInclude = (typeof CampaignInclude)[keyof typeof CampaignInclude];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CampaignInclude = void 0;
|
|
5
|
+
exports.CampaignInclude = {
|
|
6
|
+
Links: "links",
|
|
7
|
+
PhoneNumbers: "phone_numbers",
|
|
8
|
+
AgeGated: "age_gated",
|
|
9
|
+
DirectLending: "direct_lending",
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ContactTitle: {
|
|
2
|
+
readonly Ceo: "ceo";
|
|
3
|
+
readonly Cfo: "cfo";
|
|
4
|
+
readonly Cto: "cto";
|
|
5
|
+
readonly Coo: "coo";
|
|
6
|
+
readonly Vp: "vp";
|
|
7
|
+
readonly Gm: "gm";
|
|
8
|
+
readonly Director: "director";
|
|
9
|
+
readonly Other: "other";
|
|
10
|
+
};
|
|
11
|
+
export type ContactTitle = (typeof ContactTitle)[keyof typeof ContactTitle];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ContactTitle = void 0;
|
|
5
|
+
exports.ContactTitle = {
|
|
6
|
+
Ceo: "ceo",
|
|
7
|
+
Cfo: "cfo",
|
|
8
|
+
Cto: "cto",
|
|
9
|
+
Coo: "coo",
|
|
10
|
+
Vp: "vp",
|
|
11
|
+
Gm: "gm",
|
|
12
|
+
Director: "director",
|
|
13
|
+
Other: "other",
|
|
14
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface CustomToolParam {
|
|
2
|
+
/** Function name the agent calls. Letters, numbers, underscores, hyphens; max 64 chars. Must be unique and not a reserved built-in name. */
|
|
3
|
+
name: string;
|
|
4
|
+
/** What the tool does and when to use it. The agent relies on this to decide when to call it. */
|
|
5
|
+
description: string;
|
|
6
|
+
/** HTTPS endpoint the voice provider calls when the agent invokes this tool. */
|
|
7
|
+
url: string;
|
|
8
|
+
/** HTTP method. Defaults to POST. */
|
|
9
|
+
method?: CustomToolParam.Method;
|
|
10
|
+
/** Optional HTTP headers sent with the request (e.g. an Authorization token for your endpoint). */
|
|
11
|
+
headers?: Record<string, string | null> | null;
|
|
12
|
+
/** JSON Schema object describing the arguments the agent fills in. Omit for a no-argument tool. */
|
|
13
|
+
parameters?: Record<string, unknown> | null;
|
|
14
|
+
/** How long to wait for your endpoint before giving up. Range 1000-120000 ms. */
|
|
15
|
+
timeoutMs?: number | null;
|
|
16
|
+
/** When true, the agent speaks executionMessage while the tool runs. */
|
|
17
|
+
speakDuringExecution?: boolean | null;
|
|
18
|
+
/** What the agent says while the tool runs (used when speakDuringExecution is true). */
|
|
19
|
+
executionMessage?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace CustomToolParam {
|
|
22
|
+
/** HTTP method. Defaults to POST. */
|
|
23
|
+
const Method: {
|
|
24
|
+
readonly Get: "GET";
|
|
25
|
+
readonly Post: "POST";
|
|
26
|
+
};
|
|
27
|
+
type Method = (typeof Method)[keyof typeof Method];
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CustomToolParam = void 0;
|
|
5
|
+
var CustomToolParam;
|
|
6
|
+
(function (CustomToolParam) {
|
|
7
|
+
/** HTTP method. Defaults to POST. */
|
|
8
|
+
CustomToolParam.Method = {
|
|
9
|
+
Get: "GET",
|
|
10
|
+
Post: "POST",
|
|
11
|
+
};
|
|
12
|
+
})(CustomToolParam || (exports.CustomToolParam = CustomToolParam = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const OrganizationType: {
|
|
2
|
+
readonly SoleProprietor: "sole_proprietor";
|
|
3
|
+
readonly PrivateCorporation: "private_corporation";
|
|
4
|
+
readonly PublicCorporation: "public_corporation";
|
|
5
|
+
readonly Llc: "llc";
|
|
6
|
+
readonly Partnership: "partnership";
|
|
7
|
+
readonly NonProfit: "non_profit";
|
|
8
|
+
readonly CoOp: "co_op";
|
|
9
|
+
readonly Government: "government";
|
|
10
|
+
};
|
|
11
|
+
export type OrganizationType = (typeof OrganizationType)[keyof typeof OrganizationType];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OrganizationType = void 0;
|
|
5
|
+
exports.OrganizationType = {
|
|
6
|
+
SoleProprietor: "sole_proprietor",
|
|
7
|
+
PrivateCorporation: "private_corporation",
|
|
8
|
+
PublicCorporation: "public_corporation",
|
|
9
|
+
Llc: "llc",
|
|
10
|
+
Partnership: "partnership",
|
|
11
|
+
NonProfit: "non_profit",
|
|
12
|
+
CoOp: "co_op",
|
|
13
|
+
Government: "government",
|
|
14
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type * as AgentPhone from "../index.js";
|
|
2
1
|
export interface RegistrationResponse {
|
|
3
2
|
ok: boolean;
|
|
4
3
|
message: string;
|
|
5
|
-
payment_url: string;
|
|
6
4
|
campaign_status: string;
|
|
7
|
-
|
|
5
|
+
sub_account_id?: string | null;
|
|
6
|
+
fee_cents?: number;
|
|
8
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const UseCase: {
|
|
2
|
+
readonly AccountNotification: "account_notification";
|
|
3
|
+
readonly CustomerCare: "customer_care";
|
|
4
|
+
readonly DeliveryNotification: "delivery_notification";
|
|
5
|
+
readonly FraudAlert: "fraud_alert";
|
|
6
|
+
readonly HigherEducation: "higher_education";
|
|
7
|
+
readonly Marketing: "marketing";
|
|
8
|
+
readonly PollingVoting: "polling_voting";
|
|
9
|
+
readonly PublicServiceAnnouncement: "public_service_announcement";
|
|
10
|
+
readonly SecurityAlert: "security_alert";
|
|
11
|
+
readonly TwoFactorAuthentication: "two_factor_authentication";
|
|
12
|
+
};
|
|
13
|
+
export type UseCase = (typeof UseCase)[keyof typeof UseCase];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.UseCase = void 0;
|
|
5
|
+
exports.UseCase = {
|
|
6
|
+
AccountNotification: "account_notification",
|
|
7
|
+
CustomerCare: "customer_care",
|
|
8
|
+
DeliveryNotification: "delivery_notification",
|
|
9
|
+
FraudAlert: "fraud_alert",
|
|
10
|
+
HigherEducation: "higher_education",
|
|
11
|
+
Marketing: "marketing",
|
|
12
|
+
PollingVoting: "polling_voting",
|
|
13
|
+
PublicServiceAnnouncement: "public_service_announcement",
|
|
14
|
+
SecurityAlert: "security_alert",
|
|
15
|
+
TwoFactorAuthentication: "two_factor_authentication",
|
|
16
|
+
};
|
|
@@ -13,14 +13,19 @@ export * from "./AppRoutesConversationsConversationSummary.js";
|
|
|
13
13
|
export * from "./AttachNumberResponse.js";
|
|
14
14
|
export * from "./CallListResponse.js";
|
|
15
15
|
export * from "./CallSummary.js";
|
|
16
|
+
export * from "./CampaignInclude.js";
|
|
17
|
+
export * from "./CampaignStatusResponse.js";
|
|
18
|
+
export * from "./ContactCapabilitiesResponse.js";
|
|
19
|
+
export * from "./ContactCapabilityFlags.js";
|
|
16
20
|
export * from "./ContactCardResponse.js";
|
|
17
21
|
export * from "./ContactListResponse.js";
|
|
18
22
|
export * from "./ContactResponse.js";
|
|
23
|
+
export * from "./ContactTitle.js";
|
|
19
24
|
export * from "./ConversationDetail.js";
|
|
25
|
+
export * from "./CustomToolParam.js";
|
|
20
26
|
export * from "./DailyUsagePoint.js";
|
|
21
27
|
export * from "./DailyUsageResponse.js";
|
|
22
28
|
export * from "./DeleteAgentResponse.js";
|
|
23
|
-
export * from "./FieldWarning.js";
|
|
24
29
|
export * from "./GroupParticipant.js";
|
|
25
30
|
export * from "./HttpValidationError.js";
|
|
26
31
|
export * from "./LocationRefreshResponse.js";
|
|
@@ -34,6 +39,7 @@ export * from "./MonthlyUsageResponse.js";
|
|
|
34
39
|
export * from "./NumberLimits.js";
|
|
35
40
|
export * from "./NumberUsageItem.js";
|
|
36
41
|
export * from "./NumberUsageResponse.js";
|
|
42
|
+
export * from "./OrganizationType.js";
|
|
37
43
|
export * from "./PaginatedDeliveriesResponse.js";
|
|
38
44
|
export * from "./PhoneNumberListResponse.js";
|
|
39
45
|
export * from "./PhoneNumberResponse.js";
|
|
@@ -48,7 +54,9 @@ export * from "./SendTypingResponse.js";
|
|
|
48
54
|
export * from "./SetBackgroundResponse.js";
|
|
49
55
|
export * from "./UsageResponse.js";
|
|
50
56
|
export * from "./UsageStats.js";
|
|
57
|
+
export * from "./UseCase.js";
|
|
51
58
|
export * from "./ValidationError.js";
|
|
59
|
+
export * from "./Volume.js";
|
|
52
60
|
export * from "./WebhookCreateRequest.js";
|
|
53
61
|
export * from "./WebhookDeliveryResponse.js";
|
|
54
62
|
export * from "./WebhookDeliveryStatsResponse.js";
|
|
@@ -29,14 +29,19 @@ __exportStar(require("./AppRoutesConversationsConversationSummary.js"), exports)
|
|
|
29
29
|
__exportStar(require("./AttachNumberResponse.js"), exports);
|
|
30
30
|
__exportStar(require("./CallListResponse.js"), exports);
|
|
31
31
|
__exportStar(require("./CallSummary.js"), exports);
|
|
32
|
+
__exportStar(require("./CampaignInclude.js"), exports);
|
|
33
|
+
__exportStar(require("./CampaignStatusResponse.js"), exports);
|
|
34
|
+
__exportStar(require("./ContactCapabilitiesResponse.js"), exports);
|
|
35
|
+
__exportStar(require("./ContactCapabilityFlags.js"), exports);
|
|
32
36
|
__exportStar(require("./ContactCardResponse.js"), exports);
|
|
33
37
|
__exportStar(require("./ContactListResponse.js"), exports);
|
|
34
38
|
__exportStar(require("./ContactResponse.js"), exports);
|
|
39
|
+
__exportStar(require("./ContactTitle.js"), exports);
|
|
35
40
|
__exportStar(require("./ConversationDetail.js"), exports);
|
|
41
|
+
__exportStar(require("./CustomToolParam.js"), exports);
|
|
36
42
|
__exportStar(require("./DailyUsagePoint.js"), exports);
|
|
37
43
|
__exportStar(require("./DailyUsageResponse.js"), exports);
|
|
38
44
|
__exportStar(require("./DeleteAgentResponse.js"), exports);
|
|
39
|
-
__exportStar(require("./FieldWarning.js"), exports);
|
|
40
45
|
__exportStar(require("./GroupParticipant.js"), exports);
|
|
41
46
|
__exportStar(require("./HttpValidationError.js"), exports);
|
|
42
47
|
__exportStar(require("./LocationRefreshResponse.js"), exports);
|
|
@@ -50,6 +55,7 @@ __exportStar(require("./MonthlyUsageResponse.js"), exports);
|
|
|
50
55
|
__exportStar(require("./NumberLimits.js"), exports);
|
|
51
56
|
__exportStar(require("./NumberUsageItem.js"), exports);
|
|
52
57
|
__exportStar(require("./NumberUsageResponse.js"), exports);
|
|
58
|
+
__exportStar(require("./OrganizationType.js"), exports);
|
|
53
59
|
__exportStar(require("./PaginatedDeliveriesResponse.js"), exports);
|
|
54
60
|
__exportStar(require("./PhoneNumberListResponse.js"), exports);
|
|
55
61
|
__exportStar(require("./PhoneNumberResponse.js"), exports);
|
|
@@ -64,7 +70,9 @@ __exportStar(require("./SendTypingResponse.js"), exports);
|
|
|
64
70
|
__exportStar(require("./SetBackgroundResponse.js"), exports);
|
|
65
71
|
__exportStar(require("./UsageResponse.js"), exports);
|
|
66
72
|
__exportStar(require("./UsageStats.js"), exports);
|
|
73
|
+
__exportStar(require("./UseCase.js"), exports);
|
|
67
74
|
__exportStar(require("./ValidationError.js"), exports);
|
|
75
|
+
__exportStar(require("./Volume.js"), exports);
|
|
68
76
|
__exportStar(require("./WebhookCreateRequest.js"), exports);
|
|
69
77
|
__exportStar(require("./WebhookDeliveryResponse.js"), exports);
|
|
70
78
|
__exportStar(require("./WebhookDeliveryStatsResponse.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.16";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentphone",
|
|
9
|
-
"X-Fern-SDK-Version": "1.0.
|
|
10
|
-
"User-Agent": "agentphone/1.0.
|
|
9
|
+
"X-Fern-SDK-Version": "1.0.16",
|
|
10
|
+
"User-Agent": "agentphone/1.0.16",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as AgentPhone from "../../../../index.mjs";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -17,7 +18,11 @@ export interface CreateAgentRequest {
|
|
|
17
18
|
beginMessage?: string | null;
|
|
18
19
|
voice?: string | null;
|
|
19
20
|
transferNumber?: string | null;
|
|
21
|
+
/** Hosted-mode only. User-defined function tools the agent can call during a call (look up a record, save call notes, etc.). Each points at your HTTPS endpoint; the voice provider invokes it and feeds the JSON response back to the agent. Ignored in webhook mode. Maximum 20 tools. */
|
|
22
|
+
customTools?: AgentPhone.CustomToolParam[] | null;
|
|
20
23
|
voicemailMessage?: string | null;
|
|
24
|
+
callScreeningIdentity?: string | null;
|
|
25
|
+
callScreeningPurpose?: string | null;
|
|
21
26
|
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
22
27
|
sttMode?: CreateAgentRequest.SttMode;
|
|
23
28
|
/** Background ambience to mask synthetic silence between turns. 'none' disables; 'office', 'coffee-shop', 'outdoor' enable a quiet bed. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as AgentPhone from "../../../../index.mjs";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -18,7 +19,11 @@ export interface UpdateAgentRequest {
|
|
|
18
19
|
beginMessage?: string | null;
|
|
19
20
|
voice?: string | null;
|
|
20
21
|
transferNumber?: string | null;
|
|
22
|
+
/** Hosted-mode only. User-defined function tools the agent can call during a call. Replaces the full set on each update; send [] to clear all tools, or omit to leave unchanged. Ignored in webhook mode. Maximum 20 tools. */
|
|
23
|
+
customTools?: AgentPhone.CustomToolParam[] | null;
|
|
21
24
|
voicemailMessage?: string | null;
|
|
25
|
+
callScreeningIdentity?: string | null;
|
|
26
|
+
callScreeningPurpose?: string | null;
|
|
22
27
|
/** Speech-to-text mode. 'fast' optimizes for latency, 'accurate' optimizes for transcription accuracy (~200ms additional latency). */
|
|
23
28
|
sttMode?: UpdateAgentRequest.SttMode;
|
|
24
29
|
/** Background ambience to mask synthetic silence between turns. 'none' disables; 'office', 'coffee-shop', 'outdoor' enable a quiet bed. */
|
|
@@ -22,4 +22,8 @@ export interface CreateOutboundCallRequest {
|
|
|
22
22
|
systemPrompt?: string | null;
|
|
23
23
|
/** Optional per-call dynamic variables. Values are substituted into ``{{var_name}}`` placeholders in the agent's system prompt and initial greeting at call time. Requires either ``systemPrompt`` or a hosted-mode agent. */
|
|
24
24
|
variables?: Record<string, string | null> | null;
|
|
25
|
+
/** For outbound calls that hit an automated call screener (e.g. iOS 26 Call Screening or Android Call Screen): the identity the agent gives when asked who is calling. Overrides the agent's stored default for this call. Both identity and purpose are required to enable screening; if only a purpose is set, the agent's name is used. */
|
|
26
|
+
callScreeningIdentity?: string | null;
|
|
27
|
+
/** For outbound calls that hit an automated call screener: the purpose the agent gives when asked why it is calling. Overrides the agent's stored default for this call. */
|
|
28
|
+
callScreeningPurpose?: string | null;
|
|
25
29
|
}
|
|
@@ -44,6 +44,26 @@ export declare class ContactsClient {
|
|
|
44
44
|
*/
|
|
45
45
|
createContact(request: AgentPhone.CreateContactRequest, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<AgentPhone.ContactResponse>;
|
|
46
46
|
private __createContact;
|
|
47
|
+
/**
|
|
48
|
+
* Check which messaging channels a phone number supports, without sending
|
|
49
|
+
* a message.
|
|
50
|
+
*
|
|
51
|
+
* Runs a live check (typically 1-2 seconds), so the result reflects the
|
|
52
|
+
* number right now. Capabilities can still change by the time you send.
|
|
53
|
+
* Requires at least one active iMessage-capable number on the account.
|
|
54
|
+
*
|
|
55
|
+
* @param {AgentPhone.GetContactCapabilitiesV1ContactsCapabilitiesGetRequest} request
|
|
56
|
+
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* await client.contacts.getContactCapabilities({
|
|
62
|
+
* phone_number: "phone_number"
|
|
63
|
+
* })
|
|
64
|
+
*/
|
|
65
|
+
getContactCapabilities(request: AgentPhone.GetContactCapabilitiesV1ContactsCapabilitiesGetRequest, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<AgentPhone.ContactCapabilitiesResponse>;
|
|
66
|
+
private __getContactCapabilities;
|
|
47
67
|
/**
|
|
48
68
|
* Get a single contact by ID.
|
|
49
69
|
*
|
|
@@ -142,6 +142,68 @@ export class ContactsClient {
|
|
|
142
142
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/contacts");
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Check which messaging channels a phone number supports, without sending
|
|
147
|
+
* a message.
|
|
148
|
+
*
|
|
149
|
+
* Runs a live check (typically 1-2 seconds), so the result reflects the
|
|
150
|
+
* number right now. Capabilities can still change by the time you send.
|
|
151
|
+
* Requires at least one active iMessage-capable number on the account.
|
|
152
|
+
*
|
|
153
|
+
* @param {AgentPhone.GetContactCapabilitiesV1ContactsCapabilitiesGetRequest} request
|
|
154
|
+
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
155
|
+
*
|
|
156
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* await client.contacts.getContactCapabilities({
|
|
160
|
+
* phone_number: "phone_number"
|
|
161
|
+
* })
|
|
162
|
+
*/
|
|
163
|
+
getContactCapabilities(request, requestOptions) {
|
|
164
|
+
return core.HttpResponsePromise.fromPromise(this.__getContactCapabilities(request, requestOptions));
|
|
165
|
+
}
|
|
166
|
+
__getContactCapabilities(request, requestOptions) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
169
|
+
const { phone_number: phoneNumber } = request;
|
|
170
|
+
const _queryParams = {
|
|
171
|
+
phone_number: phoneNumber,
|
|
172
|
+
};
|
|
173
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
174
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
175
|
+
const _response = yield core.fetcher({
|
|
176
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Production, "v1/contacts/capabilities"),
|
|
177
|
+
method: "GET",
|
|
178
|
+
headers: _headers,
|
|
179
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
180
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
181
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
182
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
183
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
184
|
+
logging: this._options.logging,
|
|
185
|
+
});
|
|
186
|
+
if (_response.ok) {
|
|
187
|
+
return {
|
|
188
|
+
data: _response.body,
|
|
189
|
+
rawResponse: _response.rawResponse,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
if (_response.error.reason === "status-code") {
|
|
193
|
+
switch (_response.error.statusCode) {
|
|
194
|
+
case 422:
|
|
195
|
+
throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
196
|
+
default:
|
|
197
|
+
throw new errors.AgentPhoneError({
|
|
198
|
+
statusCode: _response.error.statusCode,
|
|
199
|
+
body: _response.error.body,
|
|
200
|
+
rawResponse: _response.rawResponse,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/contacts/capabilities");
|
|
205
|
+
});
|
|
206
|
+
}
|
|
145
207
|
/**
|
|
146
208
|
* Get a single contact by ID.
|
|
147
209
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { CreateContactRequest } from "./CreateContactRequest.mjs";
|
|
2
2
|
export type { DeleteContactV1ContactsContactIdDeleteRequest } from "./DeleteContactV1ContactsContactIdDeleteRequest.mjs";
|
|
3
|
+
export type { GetContactCapabilitiesV1ContactsCapabilitiesGetRequest } from "./GetContactCapabilitiesV1ContactsCapabilitiesGetRequest.mjs";
|
|
3
4
|
export type { GetContactV1ContactsContactIdGetRequest } from "./GetContactV1ContactsContactIdGetRequest.mjs";
|
|
4
5
|
export type { ListContactsV1ContactsGetRequest } from "./ListContactsV1ContactsGetRequest.mjs";
|
|
5
6
|
export type { UpdateContactRequest } from "./UpdateContactRequest.mjs";
|
|
@@ -10,6 +10,27 @@ export declare namespace RegistrationClient {
|
|
|
10
10
|
export declare class RegistrationClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<RegistrationClient.Options>;
|
|
12
12
|
constructor(options?: RegistrationClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Check the status of your A2P 10DLC registration.
|
|
15
|
+
*
|
|
16
|
+
* ### Sub-account status
|
|
17
|
+
*
|
|
18
|
+
* To check the registration status of a sub-account, pass the `X-Sub-Account-Id` header with the sub-account ID returned from `POST /v1/register`.
|
|
19
|
+
*
|
|
20
|
+
* ### Possible statuses
|
|
21
|
+
*
|
|
22
|
+
* - `none` -- No registration submitted.
|
|
23
|
+
* - `pending` -- Registration is under review.
|
|
24
|
+
* - `approved` -- Registration approved. Your account is ready to send messages.
|
|
25
|
+
*
|
|
26
|
+
* @param {AgentPhone.GetRegistrationStatusV1RegisterStatusGetRequest} request
|
|
27
|
+
* @param {RegistrationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await client.registration.getRegistrationStatus()
|
|
31
|
+
*/
|
|
32
|
+
getRegistrationStatus(request?: AgentPhone.GetRegistrationStatusV1RegisterStatusGetRequest, requestOptions?: RegistrationClient.RequestOptions): core.HttpResponsePromise<AgentPhone.CampaignStatusResponse>;
|
|
33
|
+
private __getRegistrationStatus;
|
|
13
34
|
/**
|
|
14
35
|
* Submit an A2P 10DLC registration to enable outbound SMS on your account.
|
|
15
36
|
*
|
|
@@ -18,15 +39,18 @@ export declare class RegistrationClient {
|
|
|
18
39
|
* ### How it works
|
|
19
40
|
*
|
|
20
41
|
* 1. Submit your registration details via this endpoint
|
|
21
|
-
* 2.
|
|
22
|
-
* 3.
|
|
23
|
-
* 4.
|
|
24
|
-
* 5. Carrier approval typically takes 7-10 business days
|
|
42
|
+
* 2. A one-time $25 registration fee is deducted from your account balance
|
|
43
|
+
* 3. We submit your registration to the carriers on your behalf
|
|
44
|
+
* 4. Carrier approval typically takes 7-10 business days
|
|
25
45
|
*
|
|
26
46
|
* ### Registration types
|
|
27
47
|
*
|
|
28
|
-
* - **`sole_proprietor`**
|
|
29
|
-
* - **`standard_brand`**
|
|
48
|
+
* - **`sole_proprietor`** -- For individuals or small businesses. Simpler requirements, fewer fields.
|
|
49
|
+
* - **`standard_brand`** -- For established businesses. Requires `business_name`, `organization_type`, `ein`, `privacy_policy_url`, `terms_of_service_url`.
|
|
50
|
+
*
|
|
51
|
+
* ### Sub-accounts
|
|
52
|
+
*
|
|
53
|
+
* Parent accounts can set `create_sub_account: true` (the default) to create a dedicated sub-account for each registration. This lets you manage multiple campaigns independently. The $25 fee is always charged to the parent account.
|
|
30
54
|
*
|
|
31
55
|
* ### Opt-in image
|
|
32
56
|
*
|
|
@@ -34,7 +58,7 @@ export declare class RegistrationClient {
|
|
|
34
58
|
*
|
|
35
59
|
* ### Re-submitting
|
|
36
60
|
*
|
|
37
|
-
* If
|
|
61
|
+
* If your previous registration was rejected, you can call this endpoint again to re-register.
|
|
38
62
|
*
|
|
39
63
|
* @param {AgentPhone.RegistrationRequest} request
|
|
40
64
|
* @param {RegistrationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -43,7 +67,7 @@ export declare class RegistrationClient {
|
|
|
43
67
|
*
|
|
44
68
|
* @example
|
|
45
69
|
* await client.registration.registerA2P({
|
|
46
|
-
* registration_type: "
|
|
70
|
+
* registration_type: "sole_proprietor",
|
|
47
71
|
* first_name: "first_name",
|
|
48
72
|
* last_name: "last_name",
|
|
49
73
|
* email: "email",
|
|
@@ -52,7 +76,10 @@ export declare class RegistrationClient {
|
|
|
52
76
|
* city: "city",
|
|
53
77
|
* state: "state",
|
|
54
78
|
* zip_code: "zip_code",
|
|
55
|
-
*
|
|
79
|
+
* description: "description",
|
|
80
|
+
* use_cases: ["account_notification"],
|
|
81
|
+
* message_samples: ["message_samples"],
|
|
82
|
+
* consent_flow: "consent_flow",
|
|
56
83
|
* opt_in_image_url: "opt_in_image_url"
|
|
57
84
|
* })
|
|
58
85
|
*/
|