agentphone 1.0.11 → 1.0.12
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 +10 -10
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -6
- package/dist/cjs/Client.js +25 -30
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +69 -0
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.js +66 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +69 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +66 -0
- package/dist/cjs/api/resources/index.d.ts +2 -4
- package/dist/cjs/api/resources/index.js +3 -5
- package/dist/cjs/api/resources/registration/client/Client.d.ts +61 -0
- package/dist/cjs/api/resources/{agentSignup → registration}/client/Client.js +44 -69
- package/dist/cjs/api/resources/registration/client/requests/RegistrationRequest.d.ts +61 -0
- package/dist/cjs/api/resources/registration/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/AgentResponse.d.ts +2 -0
- package/dist/cjs/api/{resources/agentSignup/client/requests → types}/AgentSignUpRequest.d.ts +0 -6
- package/dist/cjs/api/types/AgentVerifyRequest.d.ts +4 -0
- package/dist/cjs/api/types/FieldWarning.d.ts +6 -0
- package/dist/cjs/api/types/FieldWarning.js +3 -0
- package/dist/cjs/api/types/RegistrationResponse.d.ts +8 -0
- package/dist/cjs/api/types/RegistrationResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- 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/Client.d.mts +3 -6
- package/dist/esm/Client.mjs +5 -10
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +69 -0
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.mjs +66 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +69 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +66 -0
- package/dist/esm/api/resources/index.d.mts +2 -4
- package/dist/esm/api/resources/index.mjs +2 -4
- package/dist/esm/api/resources/registration/client/Client.d.mts +61 -0
- package/dist/esm/api/resources/registration/client/Client.mjs +108 -0
- package/dist/esm/api/resources/registration/client/requests/RegistrationRequest.d.mts +61 -0
- package/dist/esm/api/resources/registration/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/AgentResponse.d.mts +2 -0
- package/dist/esm/api/{resources/agentSignup/client/requests → types}/AgentSignUpRequest.d.mts +0 -6
- package/dist/esm/api/types/AgentVerifyRequest.d.mts +4 -0
- package/dist/esm/api/types/FieldWarning.d.mts +6 -0
- package/dist/esm/api/types/FieldWarning.mjs +2 -0
- package/dist/esm/api/types/RegistrationResponse.d.mts +8 -0
- package/dist/esm/api/types/RegistrationResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +83 -380
- package/dist/cjs/api/resources/agentSignup/client/Client.d.ts +0 -50
- package/dist/cjs/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.ts +0 -11
- package/dist/cjs/api/resources/agentSignup/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/integrations/client/Client.d.ts +0 -64
- package/dist/cjs/api/resources/integrations/client/Client.js +0 -268
- package/dist/cjs/api/resources/integrations/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/integrations/client/index.js +0 -17
- package/dist/cjs/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.ts +0 -9
- package/dist/cjs/api/resources/integrations/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/integrations/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/integrations/index.d.ts +0 -1
- package/dist/cjs/api/resources/integrations/index.js +0 -17
- package/dist/esm/api/resources/agentSignup/client/Client.d.mts +0 -50
- package/dist/esm/api/resources/agentSignup/client/Client.mjs +0 -133
- package/dist/esm/api/resources/agentSignup/client/requests/AgentVerifyRequest.d.mts +0 -11
- package/dist/esm/api/resources/agentSignup/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/integrations/client/Client.d.mts +0 -64
- package/dist/esm/api/resources/integrations/client/Client.mjs +0 -231
- package/dist/esm/api/resources/integrations/client/index.d.mts +0 -1
- package/dist/esm/api/resources/integrations/client/index.mjs +0 -1
- package/dist/esm/api/resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.d.mts +0 -9
- package/dist/esm/api/resources/integrations/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/integrations/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/integrations/index.d.mts +0 -1
- package/dist/esm/api/resources/integrations/index.mjs +0 -1
- /package/dist/cjs/api/resources/{agentSignup → registration}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{agentSignup/client/requests/AgentSignUpRequest.js → registration/client/requests/RegistrationRequest.js} +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{agentSignup → registration}/index.js +0 -0
- /package/dist/cjs/api/{resources/agentSignup/client/requests/AgentVerifyRequest.js → types/AgentSignUpRequest.js} +0 -0
- /package/dist/cjs/api/{resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.js → types/AgentVerifyRequest.js} +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{agentSignup/client/requests/AgentSignUpRequest.mjs → registration/client/requests/RegistrationRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{agentSignup → registration}/index.mjs +0 -0
- /package/dist/esm/api/{resources/agentSignup/client/requests/AgentVerifyRequest.mjs → types/AgentSignUpRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/integrations/client/requests/SupabaseConnectIntegrationsSupabaseConnectGetRequest.mjs → types/AgentVerifyRequest.mjs} +0 -0
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.RegistrationClient = void 0;
|
|
47
47
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
@@ -51,91 +51,66 @@ const environments = __importStar(require("../../../../environments.js"));
|
|
|
51
51
|
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
53
|
const AgentPhone = __importStar(require("../../../index.js"));
|
|
54
|
-
class
|
|
54
|
+
class RegistrationClient {
|
|
55
55
|
constructor(options = {}) {
|
|
56
|
-
this._options = (0, BaseClient_js_1.
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Submit an A2P 10DLC registration to enable outbound SMS on your account.
|
|
60
60
|
*
|
|
61
|
-
*
|
|
62
|
-
* until /v0/agent/verify is called with the code.
|
|
61
|
+
* US carriers require 10DLC registration before your AI agent can send text messages. This endpoint accepts both `sole_proprietor` and `standard_brand` registration types.
|
|
63
62
|
*
|
|
64
|
-
*
|
|
65
|
-
* @param {AgentSignupClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
* ### How it works
|
|
66
64
|
*
|
|
67
|
-
*
|
|
65
|
+
* 1. Submit your registration details via this endpoint
|
|
66
|
+
* 2. We validate your submission and flag any issues (RED = blocked, YELLOW = warning)
|
|
67
|
+
* 3. On success, you receive a Stripe payment URL to pay the one-time registration fee
|
|
68
|
+
* 4. After payment, we submit your registration to the carriers on your behalf
|
|
69
|
+
* 5. Carrier approval typically takes 7-10 business days
|
|
68
70
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
80
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
|
-
const _response = yield core.fetcher({
|
|
82
|
-
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, "v0/agent/sign-up"),
|
|
83
|
-
method: "POST",
|
|
84
|
-
headers: _headers,
|
|
85
|
-
contentType: "application/json",
|
|
86
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
87
|
-
requestType: "json",
|
|
88
|
-
body: request,
|
|
89
|
-
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,
|
|
90
|
-
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,
|
|
91
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
93
|
-
logging: this._options.logging,
|
|
94
|
-
});
|
|
95
|
-
if (_response.ok) {
|
|
96
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
97
|
-
}
|
|
98
|
-
if (_response.error.reason === "status-code") {
|
|
99
|
-
switch (_response.error.statusCode) {
|
|
100
|
-
case 422:
|
|
101
|
-
throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
102
|
-
default:
|
|
103
|
-
throw new errors.AgentPhoneError({
|
|
104
|
-
statusCode: _response.error.statusCode,
|
|
105
|
-
body: _response.error.body,
|
|
106
|
-
rawResponse: _response.rawResponse,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/agent/sign-up");
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Verify the OTP and atomically provision everything.
|
|
71
|
+
* ### Registration types
|
|
72
|
+
*
|
|
73
|
+
* - **`sole_proprietor`** — For individuals or small businesses. Simpler requirements, fewer fields.
|
|
74
|
+
* - **`standard_brand`** — For established businesses. Requires `business_name`, `privacy_policy_url`, `terms_of_service_url`, `sample_message_1`, and `sample_message_2`.
|
|
75
|
+
*
|
|
76
|
+
* ### Opt-in image
|
|
77
|
+
*
|
|
78
|
+
* `opt_in_image_url` must be a publicly accessible HTTPS URL to a screenshot showing how users opt in to receive messages from you (e.g. a consent checkbox on your signup form). Supports PNG, JPG, WEBP, and GIF up to 2MB. Google Drive links (`drive.google.com/file/d/.../view`) are automatically converted if the file is shared publicly.
|
|
79
|
+
*
|
|
80
|
+
* ### Re-submitting
|
|
115
81
|
*
|
|
116
|
-
*
|
|
117
|
-
* + first-month charge + API key. Returns the key once — agents must save it.
|
|
82
|
+
* If you've already submitted but haven't completed payment, calling this endpoint again returns the payment URL without re-sending the registration email.
|
|
118
83
|
*
|
|
119
|
-
* @param {AgentPhone.
|
|
120
|
-
* @param {
|
|
84
|
+
* @param {AgentPhone.RegistrationRequest} request
|
|
85
|
+
* @param {RegistrationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
86
|
*
|
|
122
87
|
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
123
88
|
*
|
|
124
89
|
* @example
|
|
125
|
-
* await client.
|
|
126
|
-
*
|
|
127
|
-
*
|
|
90
|
+
* await client.registration.registerA2P({
|
|
91
|
+
* registration_type: "registration_type",
|
|
92
|
+
* first_name: "first_name",
|
|
93
|
+
* last_name: "last_name",
|
|
94
|
+
* email: "email",
|
|
95
|
+
* phone_number: "phone_number",
|
|
96
|
+
* street_address: "street_address",
|
|
97
|
+
* city: "city",
|
|
98
|
+
* state: "state",
|
|
99
|
+
* zip_code: "zip_code",
|
|
100
|
+
* use_case_description: "use_case_description",
|
|
101
|
+
* opt_in_image_url: "opt_in_image_url"
|
|
128
102
|
* })
|
|
129
103
|
*/
|
|
130
|
-
|
|
131
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
104
|
+
registerA2P(request, requestOptions) {
|
|
105
|
+
return core.HttpResponsePromise.fromPromise(this.__registerA2P(request, requestOptions));
|
|
132
106
|
}
|
|
133
|
-
|
|
107
|
+
__registerA2P(request, requestOptions) {
|
|
134
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
109
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
136
|
-
const
|
|
110
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
111
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
137
112
|
const _response = yield core.fetcher({
|
|
138
|
-
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, "
|
|
113
|
+
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/register"),
|
|
139
114
|
method: "POST",
|
|
140
115
|
headers: _headers,
|
|
141
116
|
contentType: "application/json",
|
|
@@ -163,8 +138,8 @@ class AgentSignupClient {
|
|
|
163
138
|
});
|
|
164
139
|
}
|
|
165
140
|
}
|
|
166
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/
|
|
141
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/register");
|
|
167
142
|
});
|
|
168
143
|
}
|
|
169
144
|
}
|
|
170
|
-
exports.
|
|
145
|
+
exports.RegistrationClient = RegistrationClient;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* registration_type: "registration_type",
|
|
5
|
+
* first_name: "first_name",
|
|
6
|
+
* last_name: "last_name",
|
|
7
|
+
* email: "email",
|
|
8
|
+
* phone_number: "phone_number",
|
|
9
|
+
* street_address: "street_address",
|
|
10
|
+
* city: "city",
|
|
11
|
+
* state: "state",
|
|
12
|
+
* zip_code: "zip_code",
|
|
13
|
+
* use_case_description: "use_case_description",
|
|
14
|
+
* opt_in_image_url: "opt_in_image_url"
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
export interface RegistrationRequest {
|
|
18
|
+
/** 'sole_proprietor' or 'standard_brand' */
|
|
19
|
+
registration_type: string;
|
|
20
|
+
/** Required for standard_brand */
|
|
21
|
+
business_name?: string | null;
|
|
22
|
+
first_name: string;
|
|
23
|
+
last_name: string;
|
|
24
|
+
email: string;
|
|
25
|
+
/** E.164 format, e.g. +15551234567 */
|
|
26
|
+
phone_number: string;
|
|
27
|
+
/** Number of phone numbers you plan to use */
|
|
28
|
+
planned_numbers?: number;
|
|
29
|
+
street_address: string;
|
|
30
|
+
city: string;
|
|
31
|
+
state: string;
|
|
32
|
+
zip_code: string;
|
|
33
|
+
country?: string;
|
|
34
|
+
business_type?: string | null;
|
|
35
|
+
business_industry?: string | null;
|
|
36
|
+
position_in_company?: string | null;
|
|
37
|
+
/** EIN / Tax ID (standard_brand only) */
|
|
38
|
+
ein?: string | null;
|
|
39
|
+
registration_id_type?: string | null;
|
|
40
|
+
company_type?: string | null;
|
|
41
|
+
website_url?: string | null;
|
|
42
|
+
social_media_url?: string | null;
|
|
43
|
+
business_regions?: string | null;
|
|
44
|
+
/** Required for standard_brand */
|
|
45
|
+
privacy_policy_url?: string | null;
|
|
46
|
+
/** Required for standard_brand */
|
|
47
|
+
terms_of_service_url?: string | null;
|
|
48
|
+
use_case?: string | null;
|
|
49
|
+
/** Who you message, why, and how. Minimum 40 characters. */
|
|
50
|
+
use_case_description: string;
|
|
51
|
+
/** Required for standard_brand. Min 20 chars, include brand name. */
|
|
52
|
+
sample_message_1?: string | null;
|
|
53
|
+
/** Required for standard_brand. Min 20 chars, include brand name. */
|
|
54
|
+
sample_message_2?: string | null;
|
|
55
|
+
/** How users opt in to receive messages */
|
|
56
|
+
message_flow?: string | null;
|
|
57
|
+
/** Publicly accessible URL to a screenshot of your opt-in flow (PNG, JPG, WEBP, or GIF, max 2MB) */
|
|
58
|
+
opt_in_image_url: string;
|
|
59
|
+
has_embedded_links?: boolean;
|
|
60
|
+
has_embedded_phone?: boolean;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { RegistrationRequest } from "./RegistrationRequest.js";
|
|
@@ -25,6 +25,8 @@ export interface AgentResponse {
|
|
|
25
25
|
interruptionSensitivity?: number;
|
|
26
26
|
/** When true, the agent interjects short filler words like 'uh-huh' or 'mhmm' during longer caller utterances. Defaults to true. */
|
|
27
27
|
enableBackchannel?: boolean;
|
|
28
|
+
/** BCP-47 locale that drives the agent's speech recognition and pronunciation. Defaults to 'en-US'. */
|
|
29
|
+
language?: string;
|
|
28
30
|
createdAt: string;
|
|
29
31
|
numbers?: AgentPhone.AgentNumberResponse[] | null;
|
|
30
32
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from "./AgentListResponse.js";
|
|
2
2
|
export * from "./AgentNumberResponse.js";
|
|
3
3
|
export * from "./AgentResponse.js";
|
|
4
|
+
export * from "./AgentSignUpRequest.js";
|
|
4
5
|
export * from "./AgentUsageItem.js";
|
|
5
6
|
export * from "./AgentUsageResponse.js";
|
|
7
|
+
export * from "./AgentVerifyRequest.js";
|
|
6
8
|
export * from "./AllTimeStatsResponse.js";
|
|
7
9
|
export * from "./AppRoutesAgentsConversationListResponse.js";
|
|
8
10
|
export * from "./AppRoutesAgentsConversationSummary.js";
|
|
@@ -18,6 +20,7 @@ export * from "./ConversationDetail.js";
|
|
|
18
20
|
export * from "./DailyUsagePoint.js";
|
|
19
21
|
export * from "./DailyUsageResponse.js";
|
|
20
22
|
export * from "./DeleteAgentResponse.js";
|
|
23
|
+
export * from "./FieldWarning.js";
|
|
21
24
|
export * from "./HttpValidationError.js";
|
|
22
25
|
export * from "./MessageInConversation.js";
|
|
23
26
|
export * from "./MessageListResponse.js";
|
|
@@ -34,6 +37,7 @@ export * from "./PhoneNumberResponse.js";
|
|
|
34
37
|
export * from "./PlanInfo.js";
|
|
35
38
|
export * from "./PlanLimits.js";
|
|
36
39
|
export * from "./ReactionInConversation.js";
|
|
40
|
+
export * from "./RegistrationResponse.js";
|
|
37
41
|
export * from "./SendMessageResponse.js";
|
|
38
42
|
export * from "./SendReactionResponse.js";
|
|
39
43
|
export * from "./SendTypingResponse.js";
|
|
@@ -17,8 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./AgentListResponse.js"), exports);
|
|
18
18
|
__exportStar(require("./AgentNumberResponse.js"), exports);
|
|
19
19
|
__exportStar(require("./AgentResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./AgentSignUpRequest.js"), exports);
|
|
20
21
|
__exportStar(require("./AgentUsageItem.js"), exports);
|
|
21
22
|
__exportStar(require("./AgentUsageResponse.js"), exports);
|
|
23
|
+
__exportStar(require("./AgentVerifyRequest.js"), exports);
|
|
22
24
|
__exportStar(require("./AllTimeStatsResponse.js"), exports);
|
|
23
25
|
__exportStar(require("./AppRoutesAgentsConversationListResponse.js"), exports);
|
|
24
26
|
__exportStar(require("./AppRoutesAgentsConversationSummary.js"), exports);
|
|
@@ -34,6 +36,7 @@ __exportStar(require("./ConversationDetail.js"), exports);
|
|
|
34
36
|
__exportStar(require("./DailyUsagePoint.js"), exports);
|
|
35
37
|
__exportStar(require("./DailyUsageResponse.js"), exports);
|
|
36
38
|
__exportStar(require("./DeleteAgentResponse.js"), exports);
|
|
39
|
+
__exportStar(require("./FieldWarning.js"), exports);
|
|
37
40
|
__exportStar(require("./HttpValidationError.js"), exports);
|
|
38
41
|
__exportStar(require("./MessageInConversation.js"), exports);
|
|
39
42
|
__exportStar(require("./MessageListResponse.js"), exports);
|
|
@@ -50,6 +53,7 @@ __exportStar(require("./PhoneNumberResponse.js"), exports);
|
|
|
50
53
|
__exportStar(require("./PlanInfo.js"), exports);
|
|
51
54
|
__exportStar(require("./PlanLimits.js"), exports);
|
|
52
55
|
__exportStar(require("./ReactionInConversation.js"), exports);
|
|
56
|
+
__exportStar(require("./RegistrationResponse.js"), exports);
|
|
53
57
|
__exportStar(require("./SendMessageResponse.js"), exports);
|
|
54
58
|
__exportStar(require("./SendReactionResponse.js"), exports);
|
|
55
59
|
__exportStar(require("./SendTypingResponse.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.12";
|
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.12",
|
|
10
|
+
"User-Agent": "agentphone/1.0.12",
|
|
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);
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { AgentSignupClient } from "./api/resources/agentSignup/client/Client.mjs";
|
|
2
1
|
import { AgentsClient } from "./api/resources/agents/client/Client.mjs";
|
|
3
2
|
import { AgentWebhooksClient } from "./api/resources/agentWebhooks/client/Client.mjs";
|
|
4
3
|
import { CallsClient } from "./api/resources/calls/client/Client.mjs";
|
|
5
4
|
import { ContactCardsClient } from "./api/resources/contactCards/client/Client.mjs";
|
|
6
5
|
import { ContactsClient } from "./api/resources/contacts/client/Client.mjs";
|
|
7
6
|
import { ConversationsClient } from "./api/resources/conversations/client/Client.mjs";
|
|
8
|
-
import { IntegrationsClient } from "./api/resources/integrations/client/Client.mjs";
|
|
9
7
|
import { MessagesClient } from "./api/resources/messages/client/Client.mjs";
|
|
10
8
|
import { NumbersClient } from "./api/resources/numbers/client/Client.mjs";
|
|
9
|
+
import { RegistrationClient } from "./api/resources/registration/client/Client.mjs";
|
|
11
10
|
import { UsageClient } from "./api/resources/usage/client/Client.mjs";
|
|
12
11
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
|
|
13
12
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
@@ -19,7 +18,6 @@ export declare namespace AgentPhoneClient {
|
|
|
19
18
|
}
|
|
20
19
|
export declare class AgentPhoneClient {
|
|
21
20
|
protected readonly _options: NormalizedClientOptionsWithAuth<AgentPhoneClient.Options>;
|
|
22
|
-
protected _agentSignup: AgentSignupClient | undefined;
|
|
23
21
|
protected _agents: AgentsClient | undefined;
|
|
24
22
|
protected _numbers: NumbersClient | undefined;
|
|
25
23
|
protected _webhooks: WebhooksClient | undefined;
|
|
@@ -28,11 +26,10 @@ export declare class AgentPhoneClient {
|
|
|
28
26
|
protected _conversations: ConversationsClient | undefined;
|
|
29
27
|
protected _calls: CallsClient | undefined;
|
|
30
28
|
protected _usage: UsageClient | undefined;
|
|
31
|
-
protected _integrations: IntegrationsClient | undefined;
|
|
32
29
|
protected _messages: MessagesClient | undefined;
|
|
33
30
|
protected _contactCards: ContactCardsClient | undefined;
|
|
31
|
+
protected _registration: RegistrationClient | undefined;
|
|
34
32
|
constructor(options?: AgentPhoneClient.Options);
|
|
35
|
-
get agentSignup(): AgentSignupClient;
|
|
36
33
|
get agents(): AgentsClient;
|
|
37
34
|
get numbers(): NumbersClient;
|
|
38
35
|
get webhooks(): WebhooksClient;
|
|
@@ -41,7 +38,7 @@ export declare class AgentPhoneClient {
|
|
|
41
38
|
get conversations(): ConversationsClient;
|
|
42
39
|
get calls(): CallsClient;
|
|
43
40
|
get usage(): UsageClient;
|
|
44
|
-
get integrations(): IntegrationsClient;
|
|
45
41
|
get messages(): MessagesClient;
|
|
46
42
|
get contactCards(): ContactCardsClient;
|
|
43
|
+
get registration(): RegistrationClient;
|
|
47
44
|
}
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
import { AgentSignupClient } from "./api/resources/agentSignup/client/Client.mjs";
|
|
3
2
|
import { AgentsClient } from "./api/resources/agents/client/Client.mjs";
|
|
4
3
|
import { AgentWebhooksClient } from "./api/resources/agentWebhooks/client/Client.mjs";
|
|
5
4
|
import { CallsClient } from "./api/resources/calls/client/Client.mjs";
|
|
6
5
|
import { ContactCardsClient } from "./api/resources/contactCards/client/Client.mjs";
|
|
7
6
|
import { ContactsClient } from "./api/resources/contacts/client/Client.mjs";
|
|
8
7
|
import { ConversationsClient } from "./api/resources/conversations/client/Client.mjs";
|
|
9
|
-
import { IntegrationsClient } from "./api/resources/integrations/client/Client.mjs";
|
|
10
8
|
import { MessagesClient } from "./api/resources/messages/client/Client.mjs";
|
|
11
9
|
import { NumbersClient } from "./api/resources/numbers/client/Client.mjs";
|
|
10
|
+
import { RegistrationClient } from "./api/resources/registration/client/Client.mjs";
|
|
12
11
|
import { UsageClient } from "./api/resources/usage/client/Client.mjs";
|
|
13
12
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
|
|
14
13
|
import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
@@ -16,10 +15,6 @@ export class AgentPhoneClient {
|
|
|
16
15
|
constructor(options = {}) {
|
|
17
16
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
18
17
|
}
|
|
19
|
-
get agentSignup() {
|
|
20
|
-
var _a;
|
|
21
|
-
return ((_a = this._agentSignup) !== null && _a !== void 0 ? _a : (this._agentSignup = new AgentSignupClient(this._options)));
|
|
22
|
-
}
|
|
23
18
|
get agents() {
|
|
24
19
|
var _a;
|
|
25
20
|
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new AgentsClient(this._options)));
|
|
@@ -52,10 +47,6 @@ export class AgentPhoneClient {
|
|
|
52
47
|
var _a;
|
|
53
48
|
return ((_a = this._usage) !== null && _a !== void 0 ? _a : (this._usage = new UsageClient(this._options)));
|
|
54
49
|
}
|
|
55
|
-
get integrations() {
|
|
56
|
-
var _a;
|
|
57
|
-
return ((_a = this._integrations) !== null && _a !== void 0 ? _a : (this._integrations = new IntegrationsClient(this._options)));
|
|
58
|
-
}
|
|
59
50
|
get messages() {
|
|
60
51
|
var _a;
|
|
61
52
|
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new MessagesClient(this._options)));
|
|
@@ -64,4 +55,8 @@ export class AgentPhoneClient {
|
|
|
64
55
|
var _a;
|
|
65
56
|
return ((_a = this._contactCards) !== null && _a !== void 0 ? _a : (this._contactCards = new ContactCardsClient(this._options)));
|
|
66
57
|
}
|
|
58
|
+
get registration() {
|
|
59
|
+
var _a;
|
|
60
|
+
return ((_a = this._registration) !== null && _a !== void 0 ? _a : (this._registration = new RegistrationClient(this._options)));
|
|
61
|
+
}
|
|
67
62
|
}
|
|
@@ -30,6 +30,8 @@ export interface CreateAgentRequest {
|
|
|
30
30
|
interruptionSensitivity?: number | null;
|
|
31
31
|
/** When true, the agent interjects short filler words like 'uh-huh' or 'mhmm' during longer caller utterances. Set false to keep the agent silent while the caller is speaking. Defaults to true. */
|
|
32
32
|
enableBackchannel?: boolean | null;
|
|
33
|
+
/** BCP-47 locale that drives the agent's speech recognition and pronunciation. Defaults to 'en-US'. See the enum for the full set of supported codes. */
|
|
34
|
+
language?: CreateAgentRequest.Language;
|
|
33
35
|
}
|
|
34
36
|
export declare namespace CreateAgentRequest {
|
|
35
37
|
const VoiceMode: {
|
|
@@ -63,4 +65,71 @@ export declare namespace CreateAgentRequest {
|
|
|
63
65
|
readonly NoiseAndBackgroundSpeechCancellation: "noise-and-background-speech-cancellation";
|
|
64
66
|
};
|
|
65
67
|
type DenoisingMode = (typeof DenoisingMode)[keyof typeof DenoisingMode];
|
|
68
|
+
/** BCP-47 locale that drives the agent's speech recognition and pronunciation. Defaults to 'en-US'. See the enum for the full set of supported codes. */
|
|
69
|
+
const Language: {
|
|
70
|
+
readonly AfZa: "af-ZA";
|
|
71
|
+
readonly ArSa: "ar-SA";
|
|
72
|
+
readonly AzAz: "az-AZ";
|
|
73
|
+
readonly BgBg: "bg-BG";
|
|
74
|
+
readonly BsBa: "bs-BA";
|
|
75
|
+
readonly CaEs: "ca-ES";
|
|
76
|
+
readonly CsCz: "cs-CZ";
|
|
77
|
+
readonly CyGb: "cy-GB";
|
|
78
|
+
readonly DaDk: "da-DK";
|
|
79
|
+
readonly DeDe: "de-DE";
|
|
80
|
+
readonly ElGr: "el-GR";
|
|
81
|
+
readonly EnAu: "en-AU";
|
|
82
|
+
readonly EnGb: "en-GB";
|
|
83
|
+
readonly EnIn: "en-IN";
|
|
84
|
+
readonly EnNz: "en-NZ";
|
|
85
|
+
readonly EnUs: "en-US";
|
|
86
|
+
readonly Es419: "es-419";
|
|
87
|
+
readonly EsEs: "es-ES";
|
|
88
|
+
readonly FaIr: "fa-IR";
|
|
89
|
+
readonly FiFi: "fi-FI";
|
|
90
|
+
readonly FilPh: "fil-PH";
|
|
91
|
+
readonly FrCa: "fr-CA";
|
|
92
|
+
readonly FrFr: "fr-FR";
|
|
93
|
+
readonly GlEs: "gl-ES";
|
|
94
|
+
readonly HeIl: "he-IL";
|
|
95
|
+
readonly HiIn: "hi-IN";
|
|
96
|
+
readonly HrHr: "hr-HR";
|
|
97
|
+
readonly HuHu: "hu-HU";
|
|
98
|
+
readonly HyAm: "hy-AM";
|
|
99
|
+
readonly IdId: "id-ID";
|
|
100
|
+
readonly IsIs: "is-IS";
|
|
101
|
+
readonly ItIt: "it-IT";
|
|
102
|
+
readonly JaJp: "ja-JP";
|
|
103
|
+
readonly KkKz: "kk-KZ";
|
|
104
|
+
readonly KnIn: "kn-IN";
|
|
105
|
+
readonly KoKr: "ko-KR";
|
|
106
|
+
readonly LtLt: "lt-LT";
|
|
107
|
+
readonly LvLv: "lv-LV";
|
|
108
|
+
readonly MkMk: "mk-MK";
|
|
109
|
+
readonly MrIn: "mr-IN";
|
|
110
|
+
readonly MsMy: "ms-MY";
|
|
111
|
+
readonly NeNp: "ne-NP";
|
|
112
|
+
readonly NlBe: "nl-BE";
|
|
113
|
+
readonly NlNl: "nl-NL";
|
|
114
|
+
readonly NoNo: "no-NO";
|
|
115
|
+
readonly PlPl: "pl-PL";
|
|
116
|
+
readonly PtBr: "pt-BR";
|
|
117
|
+
readonly PtPt: "pt-PT";
|
|
118
|
+
readonly RoRo: "ro-RO";
|
|
119
|
+
readonly RuRu: "ru-RU";
|
|
120
|
+
readonly SkSk: "sk-SK";
|
|
121
|
+
readonly SlSi: "sl-SI";
|
|
122
|
+
readonly SrRs: "sr-RS";
|
|
123
|
+
readonly SvSe: "sv-SE";
|
|
124
|
+
readonly SwKe: "sw-KE";
|
|
125
|
+
readonly TaIn: "ta-IN";
|
|
126
|
+
readonly ThTh: "th-TH";
|
|
127
|
+
readonly TrTr: "tr-TR";
|
|
128
|
+
readonly UkUa: "uk-UA";
|
|
129
|
+
readonly UrIn: "ur-IN";
|
|
130
|
+
readonly ViVn: "vi-VN";
|
|
131
|
+
readonly YueCn: "yue-CN";
|
|
132
|
+
readonly ZhCn: "zh-CN";
|
|
133
|
+
};
|
|
134
|
+
type Language = (typeof Language)[keyof typeof Language];
|
|
66
135
|
}
|
|
@@ -27,4 +27,70 @@ export var CreateAgentRequest;
|
|
|
27
27
|
NoiseCancellation: "noise-cancellation",
|
|
28
28
|
NoiseAndBackgroundSpeechCancellation: "noise-and-background-speech-cancellation",
|
|
29
29
|
};
|
|
30
|
+
/** BCP-47 locale that drives the agent's speech recognition and pronunciation. Defaults to 'en-US'. See the enum for the full set of supported codes. */
|
|
31
|
+
CreateAgentRequest.Language = {
|
|
32
|
+
AfZa: "af-ZA",
|
|
33
|
+
ArSa: "ar-SA",
|
|
34
|
+
AzAz: "az-AZ",
|
|
35
|
+
BgBg: "bg-BG",
|
|
36
|
+
BsBa: "bs-BA",
|
|
37
|
+
CaEs: "ca-ES",
|
|
38
|
+
CsCz: "cs-CZ",
|
|
39
|
+
CyGb: "cy-GB",
|
|
40
|
+
DaDk: "da-DK",
|
|
41
|
+
DeDe: "de-DE",
|
|
42
|
+
ElGr: "el-GR",
|
|
43
|
+
EnAu: "en-AU",
|
|
44
|
+
EnGb: "en-GB",
|
|
45
|
+
EnIn: "en-IN",
|
|
46
|
+
EnNz: "en-NZ",
|
|
47
|
+
EnUs: "en-US",
|
|
48
|
+
Es419: "es-419",
|
|
49
|
+
EsEs: "es-ES",
|
|
50
|
+
FaIr: "fa-IR",
|
|
51
|
+
FiFi: "fi-FI",
|
|
52
|
+
FilPh: "fil-PH",
|
|
53
|
+
FrCa: "fr-CA",
|
|
54
|
+
FrFr: "fr-FR",
|
|
55
|
+
GlEs: "gl-ES",
|
|
56
|
+
HeIl: "he-IL",
|
|
57
|
+
HiIn: "hi-IN",
|
|
58
|
+
HrHr: "hr-HR",
|
|
59
|
+
HuHu: "hu-HU",
|
|
60
|
+
HyAm: "hy-AM",
|
|
61
|
+
IdId: "id-ID",
|
|
62
|
+
IsIs: "is-IS",
|
|
63
|
+
ItIt: "it-IT",
|
|
64
|
+
JaJp: "ja-JP",
|
|
65
|
+
KkKz: "kk-KZ",
|
|
66
|
+
KnIn: "kn-IN",
|
|
67
|
+
KoKr: "ko-KR",
|
|
68
|
+
LtLt: "lt-LT",
|
|
69
|
+
LvLv: "lv-LV",
|
|
70
|
+
MkMk: "mk-MK",
|
|
71
|
+
MrIn: "mr-IN",
|
|
72
|
+
MsMy: "ms-MY",
|
|
73
|
+
NeNp: "ne-NP",
|
|
74
|
+
NlBe: "nl-BE",
|
|
75
|
+
NlNl: "nl-NL",
|
|
76
|
+
NoNo: "no-NO",
|
|
77
|
+
PlPl: "pl-PL",
|
|
78
|
+
PtBr: "pt-BR",
|
|
79
|
+
PtPt: "pt-PT",
|
|
80
|
+
RoRo: "ro-RO",
|
|
81
|
+
RuRu: "ru-RU",
|
|
82
|
+
SkSk: "sk-SK",
|
|
83
|
+
SlSi: "sl-SI",
|
|
84
|
+
SrRs: "sr-RS",
|
|
85
|
+
SvSe: "sv-SE",
|
|
86
|
+
SwKe: "sw-KE",
|
|
87
|
+
TaIn: "ta-IN",
|
|
88
|
+
ThTh: "th-TH",
|
|
89
|
+
TrTr: "tr-TR",
|
|
90
|
+
UkUa: "uk-UA",
|
|
91
|
+
UrIn: "ur-IN",
|
|
92
|
+
ViVn: "vi-VN",
|
|
93
|
+
YueCn: "yue-CN",
|
|
94
|
+
ZhCn: "zh-CN",
|
|
95
|
+
};
|
|
30
96
|
})(CreateAgentRequest || (CreateAgentRequest = {}));
|