phonic 0.32.17 → 0.32.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/agents/client/Client.js +3 -0
  4. package/dist/cjs/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.ts +21 -0
  5. package/dist/cjs/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.js +13 -0
  6. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +1 -1
  7. package/dist/cjs/api/resources/agents/client/requests/index.js +3 -1
  8. package/dist/cjs/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.ts +20 -0
  9. package/dist/cjs/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.js +13 -0
  10. package/dist/cjs/api/resources/conversations/client/requests/index.d.ts +1 -1
  11. package/dist/cjs/api/resources/conversations/client/requests/index.js +3 -0
  12. package/dist/cjs/version.d.ts +1 -1
  13. package/dist/cjs/version.js +1 -1
  14. package/dist/esm/BaseClient.mjs +2 -2
  15. package/dist/esm/api/resources/agents/client/Client.d.mts +3 -0
  16. package/dist/esm/api/resources/agents/client/Client.mjs +3 -0
  17. package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.mts +21 -0
  18. package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.mjs +12 -1
  19. package/dist/esm/api/resources/agents/client/requests/index.d.mts +1 -1
  20. package/dist/esm/api/resources/agents/client/requests/index.mjs +1 -0
  21. package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.mts +20 -0
  22. package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.mjs +12 -1
  23. package/dist/esm/api/resources/conversations/client/requests/index.d.mts +1 -1
  24. package/dist/esm/api/resources/conversations/client/requests/index.mjs +1 -1
  25. package/dist/esm/version.d.mts +1 -1
  26. package/dist/esm/version.mjs +1 -1
  27. package/package.json +1 -1
  28. package/reference.md +3 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "phonic",
46
- "X-Fern-SDK-Version": "0.32.17",
47
- "User-Agent": "phonic/0.32.17",
46
+ "X-Fern-SDK-Version": "0.32.18",
47
+ "User-Agent": "phonic/0.32.18",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -253,6 +253,9 @@ export declare class AgentsClient {
253
253
  * "Authorization": "Bearer token123"
254
254
  * },
255
255
  * timeout_ms: 7000
256
+ * },
257
+ * sip: {
258
+ * media_encryption: "required"
256
259
  * }
257
260
  * })
258
261
  */
@@ -576,6 +576,9 @@ class AgentsClient {
576
576
  * "Authorization": "Bearer token123"
577
577
  * },
578
578
  * timeout_ms: 7000
579
+ * },
580
+ * sip: {
581
+ * media_encryption: "required"
579
582
  * }
580
583
  * })
581
584
  */
@@ -12,6 +12,9 @@
12
12
  * "Authorization": "Bearer token123"
13
13
  * },
14
14
  * timeout_ms: 7000
15
+ * },
16
+ * sip: {
17
+ * media_encryption: "required"
15
18
  * }
16
19
  * }
17
20
  */
@@ -28,6 +31,8 @@ export interface AgentsAddCustomPhoneNumberRequest {
28
31
  phone_number: string;
29
32
  /** When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number. */
30
33
  configuration_endpoint?: AgentsAddCustomPhoneNumberRequest.ConfigurationEndpoint | null;
34
+ /** SIP trunk settings for this phone number, applied to both its inbound trunk and the trunk created for each outbound call. Set at creation; remove and re-add the number to change them. */
35
+ sip?: AgentsAddCustomPhoneNumberRequest.Sip;
31
36
  }
32
37
  export declare namespace AgentsAddCustomPhoneNumberRequest {
33
38
  /**
@@ -41,4 +46,20 @@ export declare namespace AgentsAddCustomPhoneNumberRequest {
41
46
  /** Timeout in milliseconds for the endpoint call. */
42
47
  timeout_ms?: number | undefined;
43
48
  }
49
+ /**
50
+ * SIP trunk settings for this phone number, applied to both its inbound trunk and the trunk created for each outbound call. Set at creation; remove and re-add the number to change them.
51
+ */
52
+ interface Sip {
53
+ /** Whether media (SRTP) encryption is used on calls on this phone number. */
54
+ media_encryption?: Sip.MediaEncryption | undefined;
55
+ }
56
+ namespace Sip {
57
+ /** Whether media (SRTP) encryption is used on calls on this phone number. */
58
+ const MediaEncryption: {
59
+ readonly Disabled: "disabled";
60
+ readonly Allowed: "allowed";
61
+ readonly Required: "required";
62
+ };
63
+ type MediaEncryption = (typeof MediaEncryption)[keyof typeof MediaEncryption];
64
+ }
44
65
  }
@@ -1,3 +1,16 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AgentsAddCustomPhoneNumberRequest = void 0;
5
+ var AgentsAddCustomPhoneNumberRequest;
6
+ (function (AgentsAddCustomPhoneNumberRequest) {
7
+ let Sip;
8
+ (function (Sip) {
9
+ /** Whether media (SRTP) encryption is used on calls on this phone number. */
10
+ Sip.MediaEncryption = {
11
+ Disabled: "disabled",
12
+ Allowed: "allowed",
13
+ Required: "required",
14
+ };
15
+ })(Sip = AgentsAddCustomPhoneNumberRequest.Sip || (AgentsAddCustomPhoneNumberRequest.Sip = {}));
16
+ })(AgentsAddCustomPhoneNumberRequest || (exports.AgentsAddCustomPhoneNumberRequest = AgentsAddCustomPhoneNumberRequest = {}));
@@ -1,4 +1,4 @@
1
- export type { AgentsAddCustomPhoneNumberRequest } from "./AgentsAddCustomPhoneNumberRequest.js";
1
+ export { AgentsAddCustomPhoneNumberRequest } from "./AgentsAddCustomPhoneNumberRequest.js";
2
2
  export type { AgentsCreateRequest } from "./AgentsCreateRequest.js";
3
3
  export type { AgentsDeleteCustomPhoneNumberRequest } from "./AgentsDeleteCustomPhoneNumberRequest.js";
4
4
  export type { AgentsDeleteRequest } from "./AgentsDeleteRequest.js";
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateAgentRequest = void 0;
3
+ exports.UpdateAgentRequest = exports.AgentsAddCustomPhoneNumberRequest = void 0;
4
+ var AgentsAddCustomPhoneNumberRequest_js_1 = require("./AgentsAddCustomPhoneNumberRequest.js");
5
+ Object.defineProperty(exports, "AgentsAddCustomPhoneNumberRequest", { enumerable: true, get: function () { return AgentsAddCustomPhoneNumberRequest_js_1.AgentsAddCustomPhoneNumberRequest; } });
4
6
  var UpdateAgentRequest_js_1 = require("./UpdateAgentRequest.js");
5
7
  Object.defineProperty(exports, "UpdateAgentRequest", { enumerable: true, get: function () { return UpdateAgentRequest_js_1.UpdateAgentRequest; } });
@@ -21,4 +21,24 @@ export interface ConversationsSipOutboundCallRequest {
21
21
  config?: Phonic.OutboundCallConfig;
22
22
  /** If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` and `twilio_call_sid` set to null. */
23
23
  dry_run?: boolean;
24
+ /** SIP trunk settings for the outbound trunk created for this call. */
25
+ sip?: ConversationsSipOutboundCallRequest.Sip;
26
+ }
27
+ export declare namespace ConversationsSipOutboundCallRequest {
28
+ /**
29
+ * SIP trunk settings for the outbound trunk created for this call.
30
+ */
31
+ interface Sip {
32
+ /** Whether media (SRTP) encryption is used on this call. */
33
+ media_encryption?: Sip.MediaEncryption | undefined;
34
+ }
35
+ namespace Sip {
36
+ /** Whether media (SRTP) encryption is used on this call. */
37
+ const MediaEncryption: {
38
+ readonly Disabled: "disabled";
39
+ readonly Allowed: "allowed";
40
+ readonly Required: "required";
41
+ };
42
+ type MediaEncryption = (typeof MediaEncryption)[keyof typeof MediaEncryption];
43
+ }
24
44
  }
@@ -1,3 +1,16 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ConversationsSipOutboundCallRequest = void 0;
5
+ var ConversationsSipOutboundCallRequest;
6
+ (function (ConversationsSipOutboundCallRequest) {
7
+ let Sip;
8
+ (function (Sip) {
9
+ /** Whether media (SRTP) encryption is used on this call. */
10
+ Sip.MediaEncryption = {
11
+ Disabled: "disabled",
12
+ Allowed: "allowed",
13
+ Required: "required",
14
+ };
15
+ })(Sip = ConversationsSipOutboundCallRequest.Sip || (ConversationsSipOutboundCallRequest.Sip = {}));
16
+ })(ConversationsSipOutboundCallRequest || (exports.ConversationsSipOutboundCallRequest = ConversationsSipOutboundCallRequest = {}));
@@ -1,6 +1,6 @@
1
1
  export type { ConversationsGetRequest } from "./ConversationsGetRequest.js";
2
2
  export type { ConversationsListRequest } from "./ConversationsListRequest.js";
3
- export type { ConversationsSipOutboundCallRequest } from "./ConversationsSipOutboundCallRequest.js";
3
+ export { ConversationsSipOutboundCallRequest } from "./ConversationsSipOutboundCallRequest.js";
4
4
  export type { EvaluateConversationRequest } from "./EvaluateConversationRequest.js";
5
5
  export type { ExtractDataRequest } from "./ExtractDataRequest.js";
6
6
  export type { OutboundCallRequest } from "./OutboundCallRequest.js";
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConversationsSipOutboundCallRequest = void 0;
4
+ var ConversationsSipOutboundCallRequest_js_1 = require("./ConversationsSipOutboundCallRequest.js");
5
+ Object.defineProperty(exports, "ConversationsSipOutboundCallRequest", { enumerable: true, get: function () { return ConversationsSipOutboundCallRequest_js_1.ConversationsSipOutboundCallRequest; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.17";
1
+ export declare const SDK_VERSION = "0.32.18";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.32.17";
4
+ exports.SDK_VERSION = "0.32.18";
@@ -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": "phonic",
9
- "X-Fern-SDK-Version": "0.32.17",
10
- "User-Agent": "phonic/0.32.17",
9
+ "X-Fern-SDK-Version": "0.32.18",
10
+ "User-Agent": "phonic/0.32.18",
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);
@@ -253,6 +253,9 @@ export declare class AgentsClient {
253
253
  * "Authorization": "Bearer token123"
254
254
  * },
255
255
  * timeout_ms: 7000
256
+ * },
257
+ * sip: {
258
+ * media_encryption: "required"
256
259
  * }
257
260
  * })
258
261
  */
@@ -540,6 +540,9 @@ export class AgentsClient {
540
540
  * "Authorization": "Bearer token123"
541
541
  * },
542
542
  * timeout_ms: 7000
543
+ * },
544
+ * sip: {
545
+ * media_encryption: "required"
543
546
  * }
544
547
  * })
545
548
  */
@@ -12,6 +12,9 @@
12
12
  * "Authorization": "Bearer token123"
13
13
  * },
14
14
  * timeout_ms: 7000
15
+ * },
16
+ * sip: {
17
+ * media_encryption: "required"
15
18
  * }
16
19
  * }
17
20
  */
@@ -28,6 +31,8 @@ export interface AgentsAddCustomPhoneNumberRequest {
28
31
  phone_number: string;
29
32
  /** When not `null`, the agent will call this endpoint to get configuration options for calls on this phone number. */
30
33
  configuration_endpoint?: AgentsAddCustomPhoneNumberRequest.ConfigurationEndpoint | null;
34
+ /** SIP trunk settings for this phone number, applied to both its inbound trunk and the trunk created for each outbound call. Set at creation; remove and re-add the number to change them. */
35
+ sip?: AgentsAddCustomPhoneNumberRequest.Sip;
31
36
  }
32
37
  export declare namespace AgentsAddCustomPhoneNumberRequest {
33
38
  /**
@@ -41,4 +46,20 @@ export declare namespace AgentsAddCustomPhoneNumberRequest {
41
46
  /** Timeout in milliseconds for the endpoint call. */
42
47
  timeout_ms?: number | undefined;
43
48
  }
49
+ /**
50
+ * SIP trunk settings for this phone number, applied to both its inbound trunk and the trunk created for each outbound call. Set at creation; remove and re-add the number to change them.
51
+ */
52
+ interface Sip {
53
+ /** Whether media (SRTP) encryption is used on calls on this phone number. */
54
+ media_encryption?: Sip.MediaEncryption | undefined;
55
+ }
56
+ namespace Sip {
57
+ /** Whether media (SRTP) encryption is used on calls on this phone number. */
58
+ const MediaEncryption: {
59
+ readonly Disabled: "disabled";
60
+ readonly Allowed: "allowed";
61
+ readonly Required: "required";
62
+ };
63
+ type MediaEncryption = (typeof MediaEncryption)[keyof typeof MediaEncryption];
64
+ }
44
65
  }
@@ -1,2 +1,13 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var AgentsAddCustomPhoneNumberRequest;
3
+ (function (AgentsAddCustomPhoneNumberRequest) {
4
+ let Sip;
5
+ (function (Sip) {
6
+ /** Whether media (SRTP) encryption is used on calls on this phone number. */
7
+ Sip.MediaEncryption = {
8
+ Disabled: "disabled",
9
+ Allowed: "allowed",
10
+ Required: "required",
11
+ };
12
+ })(Sip = AgentsAddCustomPhoneNumberRequest.Sip || (AgentsAddCustomPhoneNumberRequest.Sip = {}));
13
+ })(AgentsAddCustomPhoneNumberRequest || (AgentsAddCustomPhoneNumberRequest = {}));
@@ -1,4 +1,4 @@
1
- export type { AgentsAddCustomPhoneNumberRequest } from "./AgentsAddCustomPhoneNumberRequest.mjs";
1
+ export { AgentsAddCustomPhoneNumberRequest } from "./AgentsAddCustomPhoneNumberRequest.mjs";
2
2
  export type { AgentsCreateRequest } from "./AgentsCreateRequest.mjs";
3
3
  export type { AgentsDeleteCustomPhoneNumberRequest } from "./AgentsDeleteCustomPhoneNumberRequest.mjs";
4
4
  export type { AgentsDeleteRequest } from "./AgentsDeleteRequest.mjs";
@@ -1 +1,2 @@
1
+ export { AgentsAddCustomPhoneNumberRequest } from "./AgentsAddCustomPhoneNumberRequest.mjs";
1
2
  export { UpdateAgentRequest } from "./UpdateAgentRequest.mjs";
@@ -21,4 +21,24 @@ export interface ConversationsSipOutboundCallRequest {
21
21
  config?: Phonic.OutboundCallConfig;
22
22
  /** If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` and `twilio_call_sid` set to null. */
23
23
  dry_run?: boolean;
24
+ /** SIP trunk settings for the outbound trunk created for this call. */
25
+ sip?: ConversationsSipOutboundCallRequest.Sip;
26
+ }
27
+ export declare namespace ConversationsSipOutboundCallRequest {
28
+ /**
29
+ * SIP trunk settings for the outbound trunk created for this call.
30
+ */
31
+ interface Sip {
32
+ /** Whether media (SRTP) encryption is used on this call. */
33
+ media_encryption?: Sip.MediaEncryption | undefined;
34
+ }
35
+ namespace Sip {
36
+ /** Whether media (SRTP) encryption is used on this call. */
37
+ const MediaEncryption: {
38
+ readonly Disabled: "disabled";
39
+ readonly Allowed: "allowed";
40
+ readonly Required: "required";
41
+ };
42
+ type MediaEncryption = (typeof MediaEncryption)[keyof typeof MediaEncryption];
43
+ }
24
44
  }
@@ -1,2 +1,13 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var ConversationsSipOutboundCallRequest;
3
+ (function (ConversationsSipOutboundCallRequest) {
4
+ let Sip;
5
+ (function (Sip) {
6
+ /** Whether media (SRTP) encryption is used on this call. */
7
+ Sip.MediaEncryption = {
8
+ Disabled: "disabled",
9
+ Allowed: "allowed",
10
+ Required: "required",
11
+ };
12
+ })(Sip = ConversationsSipOutboundCallRequest.Sip || (ConversationsSipOutboundCallRequest.Sip = {}));
13
+ })(ConversationsSipOutboundCallRequest || (ConversationsSipOutboundCallRequest = {}));
@@ -1,6 +1,6 @@
1
1
  export type { ConversationsGetRequest } from "./ConversationsGetRequest.mjs";
2
2
  export type { ConversationsListRequest } from "./ConversationsListRequest.mjs";
3
- export type { ConversationsSipOutboundCallRequest } from "./ConversationsSipOutboundCallRequest.mjs";
3
+ export { ConversationsSipOutboundCallRequest } from "./ConversationsSipOutboundCallRequest.mjs";
4
4
  export type { EvaluateConversationRequest } from "./EvaluateConversationRequest.mjs";
5
5
  export type { ExtractDataRequest } from "./ExtractDataRequest.mjs";
6
6
  export type { OutboundCallRequest } from "./OutboundCallRequest.mjs";
@@ -1 +1 @@
1
- export {};
1
+ export { ConversationsSipOutboundCallRequest } from "./ConversationsSipOutboundCallRequest.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.17";
1
+ export declare const SDK_VERSION = "0.32.18";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.32.17";
1
+ export const SDK_VERSION = "0.32.18";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.32.17",
3
+ "version": "0.32.18",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -568,6 +568,9 @@ await client.agents.addCustomPhoneNumber("nameOrId", {
568
568
  "Authorization": "Bearer token123"
569
569
  },
570
570
  timeout_ms: 7000
571
+ },
572
+ sip: {
573
+ media_encryption: "required"
571
574
  }
572
575
  });
573
576