@cosmoops/connect-sdk 0.50.0 → 0.51.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 +16 -0
- package/dist/cjs/server/client.js +1 -1
- package/dist/cjs/server/resources/calls.js +21 -0
- package/dist/esm/server/client.js +1 -1
- package/dist/esm/server/resources/calls.js +21 -0
- package/dist/types/server/client.d.ts +1 -1
- package/dist/types/server/resources/calls.d.ts +13 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
`@cosmoops/connect-sdk` follows semver, with the 0.x convention that **minor
|
|
4
4
|
versions may carry breaking changes** and patch versions never do.
|
|
5
5
|
|
|
6
|
+
## 0.51.0
|
|
7
|
+
|
|
8
|
+
### Inbound call routing
|
|
9
|
+
|
|
10
|
+
`connect.calls.getRouting({ asUser })` reads the workspace's inbound call
|
|
11
|
+
routing flow and its published agents; `connect.calls.setRouting({ routing,
|
|
12
|
+
asUser })` sets it (smart CRM owner routing, AI agent, single number, team,
|
|
13
|
+
fallback). Needs `CHANNEL_MANAGE` to write.
|
|
14
|
+
|
|
15
|
+
### Add-ons billed yearly
|
|
16
|
+
|
|
17
|
+
`Addon.billingCadence` is `"annual"` for an add-on billed once on the first
|
|
18
|
+
cycle that holds it and on each anniversary, even on a monthly plan; render
|
|
19
|
+
its price as "/year". `"plan"` or absent means every plan cycle, as before.
|
|
20
|
+
`ConnectPlans` already draws the suffix. Additive; nothing else changed.
|
|
21
|
+
|
|
6
22
|
## 0.50.0
|
|
7
23
|
|
|
8
24
|
### Background tasks
|
|
@@ -80,6 +80,27 @@ class CallsResource {
|
|
|
80
80
|
headers: (0, acting_as_js_1.actingAs)(input.asUser),
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Reads the inbound call routing flow and published agents for the workspace.
|
|
85
|
+
*/
|
|
86
|
+
getRouting(input) {
|
|
87
|
+
return (0, http_js_1.request)(this.transport, {
|
|
88
|
+
method: "GET",
|
|
89
|
+
path: "/calls/routing",
|
|
90
|
+
headers: (0, acting_as_js_1.actingAs)(input.asUser),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Sets the inbound call routing flow (smart CRM owner routing, AI agent, single number, team, fallback).
|
|
95
|
+
*/
|
|
96
|
+
setRouting(input) {
|
|
97
|
+
return (0, http_js_1.request)(this.transport, {
|
|
98
|
+
method: "PUT",
|
|
99
|
+
path: "/calls/routing",
|
|
100
|
+
json: input.routing,
|
|
101
|
+
headers: (0, acting_as_js_1.actingAs)(input.asUser),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
83
104
|
/**
|
|
84
105
|
* Whether the workspace records its member calls, and whether this member
|
|
85
106
|
* may change that. The same switch as Connect's Calling screen.
|
|
@@ -77,6 +77,27 @@ export class CallsResource {
|
|
|
77
77
|
headers: actingAs(input.asUser),
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Reads the inbound call routing flow and published agents for the workspace.
|
|
82
|
+
*/
|
|
83
|
+
getRouting(input) {
|
|
84
|
+
return request(this.transport, {
|
|
85
|
+
method: "GET",
|
|
86
|
+
path: "/calls/routing",
|
|
87
|
+
headers: actingAs(input.asUser),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Sets the inbound call routing flow (smart CRM owner routing, AI agent, single number, team, fallback).
|
|
92
|
+
*/
|
|
93
|
+
setRouting(input) {
|
|
94
|
+
return request(this.transport, {
|
|
95
|
+
method: "PUT",
|
|
96
|
+
path: "/calls/routing",
|
|
97
|
+
json: input.routing,
|
|
98
|
+
headers: actingAs(input.asUser),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
80
101
|
/**
|
|
81
102
|
* Whether the workspace records its member calls, and whether this member
|
|
82
103
|
* may change that. The same switch as Connect's Calling screen.
|
|
@@ -59,6 +59,19 @@ export declare class CallsResource {
|
|
|
59
59
|
getCallingAvailability(input: {
|
|
60
60
|
asUser: string;
|
|
61
61
|
}): Promise<CallingAvailability>;
|
|
62
|
+
/**
|
|
63
|
+
* Reads the inbound call routing flow and published agents for the workspace.
|
|
64
|
+
*/
|
|
65
|
+
getRouting(input: {
|
|
66
|
+
asUser: string;
|
|
67
|
+
}): Promise<any>;
|
|
68
|
+
/**
|
|
69
|
+
* Sets the inbound call routing flow (smart CRM owner routing, AI agent, single number, team, fallback).
|
|
70
|
+
*/
|
|
71
|
+
setRouting(input: {
|
|
72
|
+
routing: Record<string, unknown>;
|
|
73
|
+
asUser: string;
|
|
74
|
+
}): Promise<any>;
|
|
62
75
|
/**
|
|
63
76
|
* Whether the workspace records its member calls, and whether this member
|
|
64
77
|
* may change that. The same switch as Connect's Calling screen.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmoops/connect-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "Official server-side SDK for the CosmoOps Connect platform API - Login with Connect, entitlements, billing and metering.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "commonjs",
|