@happyrobot-ai/sdk 0.1.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/client.d.ts +85 -0
- package/client.js +115 -0
- package/client.mjs +3 -0
- package/core/errors.d.ts +48 -0
- package/core/errors.js +82 -0
- package/core/errors.mjs +3 -0
- package/core/http.d.ts +26 -0
- package/core/http.js +189 -0
- package/core/http.mjs +3 -0
- package/core/pagination.d.ts +22 -0
- package/core/pagination.js +43 -0
- package/core/pagination.mjs +3 -0
- package/core/sse.d.ts +20 -0
- package/core/sse.js +104 -0
- package/core/sse.mjs +3 -0
- package/core/types.d.ts +50 -0
- package/core/types.js +6 -0
- package/core/types.mjs +3 -0
- package/helpers/index.d.ts +14 -0
- package/helpers/index.js +18 -0
- package/helpers/index.mjs +3 -0
- package/helpers/template-workflows.d.ts +49 -0
- package/helpers/template-workflows.js +46 -0
- package/helpers/template-workflows.mjs +3 -0
- package/helpers/trigger-and-wait.d.ts +37 -0
- package/helpers/trigger-and-wait.js +62 -0
- package/helpers/trigger-and-wait.mjs +3 -0
- package/helpers/voice-agent.d.ts +47 -0
- package/helpers/voice-agent.js +47 -0
- package/helpers/voice-agent.mjs +3 -0
- package/index.d.ts +75 -0
- package/index.js +90 -0
- package/index.mjs +3 -0
- package/package.json +42 -0
- package/resources/adversarial-suites.d.ts +42 -0
- package/resources/adversarial-suites.js +96 -0
- package/resources/adversarial-suites.mjs +3 -0
- package/resources/adversarial-tests.d.ts +36 -0
- package/resources/adversarial-tests.js +78 -0
- package/resources/adversarial-tests.mjs +3 -0
- package/resources/api-key.d.ts +23 -0
- package/resources/api-key.js +24 -0
- package/resources/api-key.mjs +3 -0
- package/resources/audit-remarks.d.ts +22 -0
- package/resources/audit-remarks.js +44 -0
- package/resources/audit-remarks.mjs +3 -0
- package/resources/billing.d.ts +25 -0
- package/resources/billing.js +34 -0
- package/resources/billing.mjs +3 -0
- package/resources/contacts.d.ts +40 -0
- package/resources/contacts.js +61 -0
- package/resources/contacts.mjs +3 -0
- package/resources/custom-evals.d.ts +28 -0
- package/resources/custom-evals.js +62 -0
- package/resources/custom-evals.mjs +3 -0
- package/resources/integrations.d.ts +95 -0
- package/resources/integrations.js +220 -0
- package/resources/integrations.mjs +3 -0
- package/resources/issues.d.ts +14 -0
- package/resources/issues.js +25 -0
- package/resources/issues.mjs +3 -0
- package/resources/knowledge-bases.d.ts +35 -0
- package/resources/knowledge-bases.js +68 -0
- package/resources/knowledge-bases.mjs +3 -0
- package/resources/mcp.d.ts +20 -0
- package/resources/mcp.js +42 -0
- package/resources/mcp.mjs +3 -0
- package/resources/messages.d.ts +17 -0
- package/resources/messages.js +37 -0
- package/resources/messages.mjs +3 -0
- package/resources/nodes.d.ts +50 -0
- package/resources/nodes.js +86 -0
- package/resources/nodes.mjs +3 -0
- package/resources/northstars.d.ts +29 -0
- package/resources/northstars.js +69 -0
- package/resources/northstars.mjs +3 -0
- package/resources/phone-numbers.d.ts +47 -0
- package/resources/phone-numbers.js +121 -0
- package/resources/phone-numbers.mjs +3 -0
- package/resources/runs.d.ts +31 -0
- package/resources/runs.js +71 -0
- package/resources/runs.mjs +3 -0
- package/resources/sessions.d.ts +36 -0
- package/resources/sessions.js +62 -0
- package/resources/sessions.mjs +3 -0
- package/resources/sip-trunks.d.ts +32 -0
- package/resources/sip-trunks.js +78 -0
- package/resources/sip-trunks.mjs +3 -0
- package/resources/usage.d.ts +27 -0
- package/resources/usage.js +70 -0
- package/resources/usage.mjs +3 -0
- package/resources/variables.d.ts +23 -0
- package/resources/variables.js +54 -0
- package/resources/variables.mjs +3 -0
- package/resources/versions.d.ts +38 -0
- package/resources/versions.js +90 -0
- package/resources/versions.mjs +3 -0
- package/resources/workflow-folders.d.ts +26 -0
- package/resources/workflow-folders.js +62 -0
- package/resources/workflow-folders.mjs +3 -0
- package/resources/workflows.d.ts +55 -0
- package/resources/workflows.js +134 -0
- package/resources/workflows.mjs +3 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Contacts resource — client.contacts.*
|
|
4
|
+
*
|
|
5
|
+
* Maps to:
|
|
6
|
+
* GET /contacts
|
|
7
|
+
* GET /contacts/resolve
|
|
8
|
+
* GET /contacts/:contact_id
|
|
9
|
+
* GET /contacts/:contact_id/interactions
|
|
10
|
+
* GET /contacts/:contact_id/memories
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ContactsResource = void 0;
|
|
14
|
+
class ContactsResource {
|
|
15
|
+
http;
|
|
16
|
+
constructor(http) {
|
|
17
|
+
this.http = http;
|
|
18
|
+
}
|
|
19
|
+
/** List contacts (cursor-paginated). */
|
|
20
|
+
async list(query) {
|
|
21
|
+
return this.http.request({
|
|
22
|
+
method: "GET",
|
|
23
|
+
path: "/contacts",
|
|
24
|
+
query: query,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** Resolve a contact by phone number or email. */
|
|
28
|
+
async resolve(query) {
|
|
29
|
+
return this.http.request({
|
|
30
|
+
method: "GET",
|
|
31
|
+
path: "/contacts/resolve",
|
|
32
|
+
query: query,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Get a contact by ID. */
|
|
36
|
+
async get(contactId) {
|
|
37
|
+
return this.http.request({
|
|
38
|
+
method: "GET",
|
|
39
|
+
path: `/contacts/${enc(contactId)}`,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** Get interactions for a contact. */
|
|
43
|
+
async getInteractions(contactId) {
|
|
44
|
+
return this.http.request({
|
|
45
|
+
method: "GET",
|
|
46
|
+
path: `/contacts/${enc(contactId)}/interactions`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/** Get memories for a contact. */
|
|
50
|
+
async getMemories(contactId) {
|
|
51
|
+
return this.http.request({
|
|
52
|
+
method: "GET",
|
|
53
|
+
path: `/contacts/${enc(contactId)}/memories`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.ContactsResource = ContactsResource;
|
|
58
|
+
function enc(s) {
|
|
59
|
+
return encodeURIComponent(s);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=contacts.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom eval resource — client.customEvals.*
|
|
3
|
+
*
|
|
4
|
+
* Maps to:
|
|
5
|
+
* GET /custom-evals/:eval_id
|
|
6
|
+
* PATCH /custom-evals/:eval_id
|
|
7
|
+
* DELETE /custom-evals/:eval_id
|
|
8
|
+
* POST /custom-evals/:eval_id/run
|
|
9
|
+
* GET /custom-evals/:eval_id/runs
|
|
10
|
+
*/
|
|
11
|
+
import type { HttpClient } from "../core/http";
|
|
12
|
+
import type { GetCustomEvalResponse, PatchCustomEvalBody, PatchCustomEvalResponse, RunCustomEvalBody, RunCustomEvalResponse, ListCustomEvalRunsResponse } from "../types/custom-evals.types";
|
|
13
|
+
export declare class CustomEvalsResource {
|
|
14
|
+
private readonly http;
|
|
15
|
+
constructor(http: HttpClient);
|
|
16
|
+
/** Get a custom eval by ID. */
|
|
17
|
+
get(evalId: string): Promise<GetCustomEvalResponse>;
|
|
18
|
+
/** Update a custom eval. */
|
|
19
|
+
update(evalId: string, body: PatchCustomEvalBody): Promise<PatchCustomEvalResponse>;
|
|
20
|
+
/** Delete a custom eval. */
|
|
21
|
+
delete(evalId: string): Promise<void>;
|
|
22
|
+
/** Run a custom eval asynchronously. */
|
|
23
|
+
run(evalId: string, body: RunCustomEvalBody): Promise<RunCustomEvalResponse>;
|
|
24
|
+
/** List runs for a custom eval. */
|
|
25
|
+
listRuns(evalId: string, query?: {
|
|
26
|
+
limit?: number;
|
|
27
|
+
}): Promise<ListCustomEvalRunsResponse>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Custom eval resource — client.customEvals.*
|
|
4
|
+
*
|
|
5
|
+
* Maps to:
|
|
6
|
+
* GET /custom-evals/:eval_id
|
|
7
|
+
* PATCH /custom-evals/:eval_id
|
|
8
|
+
* DELETE /custom-evals/:eval_id
|
|
9
|
+
* POST /custom-evals/:eval_id/run
|
|
10
|
+
* GET /custom-evals/:eval_id/runs
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.CustomEvalsResource = void 0;
|
|
14
|
+
class CustomEvalsResource {
|
|
15
|
+
http;
|
|
16
|
+
constructor(http) {
|
|
17
|
+
this.http = http;
|
|
18
|
+
}
|
|
19
|
+
/** Get a custom eval by ID. */
|
|
20
|
+
async get(evalId) {
|
|
21
|
+
return this.http.request({
|
|
22
|
+
method: "GET",
|
|
23
|
+
path: `/custom-evals/${enc(evalId)}`,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** Update a custom eval. */
|
|
27
|
+
async update(evalId, body) {
|
|
28
|
+
return this.http.request({
|
|
29
|
+
method: "PATCH",
|
|
30
|
+
path: `/custom-evals/${enc(evalId)}`,
|
|
31
|
+
body,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** Delete a custom eval. */
|
|
35
|
+
async delete(evalId) {
|
|
36
|
+
return this.http.request({
|
|
37
|
+
method: "DELETE",
|
|
38
|
+
path: `/custom-evals/${enc(evalId)}`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/** Run a custom eval asynchronously. */
|
|
42
|
+
async run(evalId, body) {
|
|
43
|
+
return this.http.request({
|
|
44
|
+
method: "POST",
|
|
45
|
+
path: `/custom-evals/${enc(evalId)}/run`,
|
|
46
|
+
body,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/** List runs for a custom eval. */
|
|
50
|
+
async listRuns(evalId, query) {
|
|
51
|
+
return this.http.request({
|
|
52
|
+
method: "GET",
|
|
53
|
+
path: `/custom-evals/${enc(evalId)}/runs`,
|
|
54
|
+
query: query,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.CustomEvalsResource = CustomEvalsResource;
|
|
59
|
+
function enc(s) {
|
|
60
|
+
return encodeURIComponent(s);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=custom-evals.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrations resource — client.integrations.*
|
|
3
|
+
*
|
|
4
|
+
* Maps to:
|
|
5
|
+
* GET /integrations
|
|
6
|
+
* GET /integrations/:integrationId
|
|
7
|
+
* POST /integrations/:integrationId/create-credential
|
|
8
|
+
*
|
|
9
|
+
* Integration-specific resources:
|
|
10
|
+
* GET /integrations/google-sheets/spreadsheets
|
|
11
|
+
* GET /integrations/google-sheets/worksheets
|
|
12
|
+
* GET /integrations/google-sheets/columns
|
|
13
|
+
* GET /integrations/google-sheets/rows
|
|
14
|
+
* GET /integrations/slack/channels
|
|
15
|
+
* GET /integrations/slack/users
|
|
16
|
+
* GET /integrations/teams/teams
|
|
17
|
+
* GET /integrations/teams/channels
|
|
18
|
+
* GET /integrations/teams/users
|
|
19
|
+
* GET /integrations/twilio-sms/phone-numbers
|
|
20
|
+
* GET /integrations/whatsapp/businesses
|
|
21
|
+
* GET /integrations/whatsapp/business-accounts
|
|
22
|
+
* GET /integrations/whatsapp/phone-numbers
|
|
23
|
+
* GET /integrations/whatsapp/message-templates
|
|
24
|
+
*/
|
|
25
|
+
import type { HttpClient } from "../core/http";
|
|
26
|
+
import type { ListIntegrationsQuery, ListIntegrationsResponse, Integration, CreateCredentialBody, CreateCredentialResponse, CredentialIdQuery, GoogleSheetsWorksheetsQuery, GoogleSheetsColumnsQuery, GoogleSheetsRowsQuery, TeamsChannelsQuery, WhatsAppCredentialQuery, WhatsAppBusinessAccountsQuery, WhatsAppPhoneNumbersQuery, WhatsAppMessageTemplatesQuery, ResourceListResponse, ResourceListWithDescriptionResponse, WhatsAppTemplateListResponse } from "../types/integrations.types";
|
|
27
|
+
declare class GoogleSheetsResource {
|
|
28
|
+
private readonly http;
|
|
29
|
+
constructor(http: HttpClient);
|
|
30
|
+
/** List Google Sheets spreadsheets. */
|
|
31
|
+
spreadsheets(query?: CredentialIdQuery): Promise<ResourceListResponse>;
|
|
32
|
+
/** List worksheets in a spreadsheet. */
|
|
33
|
+
worksheets(query: GoogleSheetsWorksheetsQuery): Promise<ResourceListResponse>;
|
|
34
|
+
/** List columns in a worksheet. */
|
|
35
|
+
columns(query: GoogleSheetsColumnsQuery): Promise<ResourceListResponse>;
|
|
36
|
+
/** List rows in a worksheet. */
|
|
37
|
+
rows(query: GoogleSheetsRowsQuery): Promise<ResourceListResponse>;
|
|
38
|
+
}
|
|
39
|
+
declare class SlackResource {
|
|
40
|
+
private readonly http;
|
|
41
|
+
constructor(http: HttpClient);
|
|
42
|
+
/** List Slack channels. */
|
|
43
|
+
channels(query?: CredentialIdQuery): Promise<ResourceListWithDescriptionResponse>;
|
|
44
|
+
/** List Slack users. */
|
|
45
|
+
users(query?: CredentialIdQuery): Promise<ResourceListWithDescriptionResponse>;
|
|
46
|
+
}
|
|
47
|
+
declare class TeamsResource {
|
|
48
|
+
private readonly http;
|
|
49
|
+
constructor(http: HttpClient);
|
|
50
|
+
/** List Microsoft Teams teams. */
|
|
51
|
+
teams(query?: CredentialIdQuery): Promise<ResourceListResponse>;
|
|
52
|
+
/** List Microsoft Teams channels. */
|
|
53
|
+
channels(query?: TeamsChannelsQuery): Promise<ResourceListResponse>;
|
|
54
|
+
/** List Microsoft Teams users. */
|
|
55
|
+
users(query?: CredentialIdQuery): Promise<ResourceListResponse>;
|
|
56
|
+
}
|
|
57
|
+
declare class TwilioSmsResource {
|
|
58
|
+
private readonly http;
|
|
59
|
+
constructor(http: HttpClient);
|
|
60
|
+
/** List Twilio SMS phone numbers. */
|
|
61
|
+
phoneNumbers(query?: CredentialIdQuery): Promise<ResourceListWithDescriptionResponse>;
|
|
62
|
+
}
|
|
63
|
+
declare class WhatsAppResource {
|
|
64
|
+
private readonly http;
|
|
65
|
+
constructor(http: HttpClient);
|
|
66
|
+
/** List WhatsApp businesses. */
|
|
67
|
+
businesses(query: WhatsAppCredentialQuery): Promise<ResourceListResponse>;
|
|
68
|
+
/** List WhatsApp business accounts. */
|
|
69
|
+
businessAccounts(query: WhatsAppBusinessAccountsQuery): Promise<ResourceListResponse>;
|
|
70
|
+
/** List WhatsApp phone numbers. */
|
|
71
|
+
phoneNumbers(query: WhatsAppPhoneNumbersQuery): Promise<ResourceListResponse>;
|
|
72
|
+
/** List WhatsApp message templates. */
|
|
73
|
+
messageTemplates(query: WhatsAppMessageTemplatesQuery): Promise<WhatsAppTemplateListResponse>;
|
|
74
|
+
}
|
|
75
|
+
export declare class IntegrationsResource {
|
|
76
|
+
private readonly http;
|
|
77
|
+
/** Google Sheets resource fetching. */
|
|
78
|
+
readonly googleSheets: GoogleSheetsResource;
|
|
79
|
+
/** Slack resource fetching. */
|
|
80
|
+
readonly slack: SlackResource;
|
|
81
|
+
/** Microsoft Teams resource fetching. */
|
|
82
|
+
readonly teams: TeamsResource;
|
|
83
|
+
/** Twilio SMS resource fetching. */
|
|
84
|
+
readonly twilioSms: TwilioSmsResource;
|
|
85
|
+
/** WhatsApp resource fetching. */
|
|
86
|
+
readonly whatsApp: WhatsAppResource;
|
|
87
|
+
constructor(http: HttpClient);
|
|
88
|
+
/** List all integrations (optionally filtered). */
|
|
89
|
+
list(query?: ListIntegrationsQuery): Promise<ListIntegrationsResponse>;
|
|
90
|
+
/** Get an integration by ID. */
|
|
91
|
+
get(integrationId: string): Promise<Integration>;
|
|
92
|
+
/** Create a credential for a form-based integration. */
|
|
93
|
+
createCredential(integrationId: string, body: CreateCredentialBody): Promise<CreateCredentialResponse>;
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Integrations resource — client.integrations.*
|
|
4
|
+
*
|
|
5
|
+
* Maps to:
|
|
6
|
+
* GET /integrations
|
|
7
|
+
* GET /integrations/:integrationId
|
|
8
|
+
* POST /integrations/:integrationId/create-credential
|
|
9
|
+
*
|
|
10
|
+
* Integration-specific resources:
|
|
11
|
+
* GET /integrations/google-sheets/spreadsheets
|
|
12
|
+
* GET /integrations/google-sheets/worksheets
|
|
13
|
+
* GET /integrations/google-sheets/columns
|
|
14
|
+
* GET /integrations/google-sheets/rows
|
|
15
|
+
* GET /integrations/slack/channels
|
|
16
|
+
* GET /integrations/slack/users
|
|
17
|
+
* GET /integrations/teams/teams
|
|
18
|
+
* GET /integrations/teams/channels
|
|
19
|
+
* GET /integrations/teams/users
|
|
20
|
+
* GET /integrations/twilio-sms/phone-numbers
|
|
21
|
+
* GET /integrations/whatsapp/businesses
|
|
22
|
+
* GET /integrations/whatsapp/business-accounts
|
|
23
|
+
* GET /integrations/whatsapp/phone-numbers
|
|
24
|
+
* GET /integrations/whatsapp/message-templates
|
|
25
|
+
*/
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.IntegrationsResource = void 0;
|
|
28
|
+
// ── Sub-resource classes ──
|
|
29
|
+
class GoogleSheetsResource {
|
|
30
|
+
http;
|
|
31
|
+
constructor(http) {
|
|
32
|
+
this.http = http;
|
|
33
|
+
}
|
|
34
|
+
/** List Google Sheets spreadsheets. */
|
|
35
|
+
async spreadsheets(query) {
|
|
36
|
+
return this.http.request({
|
|
37
|
+
method: "GET",
|
|
38
|
+
path: "/integrations/google-sheets/spreadsheets",
|
|
39
|
+
query: query,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** List worksheets in a spreadsheet. */
|
|
43
|
+
async worksheets(query) {
|
|
44
|
+
return this.http.request({
|
|
45
|
+
method: "GET",
|
|
46
|
+
path: "/integrations/google-sheets/worksheets",
|
|
47
|
+
query: { ...query },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/** List columns in a worksheet. */
|
|
51
|
+
async columns(query) {
|
|
52
|
+
return this.http.request({
|
|
53
|
+
method: "GET",
|
|
54
|
+
path: "/integrations/google-sheets/columns",
|
|
55
|
+
query: { ...query },
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/** List rows in a worksheet. */
|
|
59
|
+
async rows(query) {
|
|
60
|
+
return this.http.request({
|
|
61
|
+
method: "GET",
|
|
62
|
+
path: "/integrations/google-sheets/rows",
|
|
63
|
+
query: { ...query },
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
class SlackResource {
|
|
68
|
+
http;
|
|
69
|
+
constructor(http) {
|
|
70
|
+
this.http = http;
|
|
71
|
+
}
|
|
72
|
+
/** List Slack channels. */
|
|
73
|
+
async channels(query) {
|
|
74
|
+
return this.http.request({
|
|
75
|
+
method: "GET",
|
|
76
|
+
path: "/integrations/slack/channels",
|
|
77
|
+
query: query,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** List Slack users. */
|
|
81
|
+
async users(query) {
|
|
82
|
+
return this.http.request({
|
|
83
|
+
method: "GET",
|
|
84
|
+
path: "/integrations/slack/users",
|
|
85
|
+
query: query,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
class TeamsResource {
|
|
90
|
+
http;
|
|
91
|
+
constructor(http) {
|
|
92
|
+
this.http = http;
|
|
93
|
+
}
|
|
94
|
+
/** List Microsoft Teams teams. */
|
|
95
|
+
async teams(query) {
|
|
96
|
+
return this.http.request({
|
|
97
|
+
method: "GET",
|
|
98
|
+
path: "/integrations/teams/teams",
|
|
99
|
+
query: query,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/** List Microsoft Teams channels. */
|
|
103
|
+
async channels(query) {
|
|
104
|
+
return this.http.request({
|
|
105
|
+
method: "GET",
|
|
106
|
+
path: "/integrations/teams/channels",
|
|
107
|
+
query: query,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/** List Microsoft Teams users. */
|
|
111
|
+
async users(query) {
|
|
112
|
+
return this.http.request({
|
|
113
|
+
method: "GET",
|
|
114
|
+
path: "/integrations/teams/users",
|
|
115
|
+
query: query,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
class TwilioSmsResource {
|
|
120
|
+
http;
|
|
121
|
+
constructor(http) {
|
|
122
|
+
this.http = http;
|
|
123
|
+
}
|
|
124
|
+
/** List Twilio SMS phone numbers. */
|
|
125
|
+
async phoneNumbers(query) {
|
|
126
|
+
return this.http.request({
|
|
127
|
+
method: "GET",
|
|
128
|
+
path: "/integrations/twilio-sms/phone-numbers",
|
|
129
|
+
query: query,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
class WhatsAppResource {
|
|
134
|
+
http;
|
|
135
|
+
constructor(http) {
|
|
136
|
+
this.http = http;
|
|
137
|
+
}
|
|
138
|
+
/** List WhatsApp businesses. */
|
|
139
|
+
async businesses(query) {
|
|
140
|
+
return this.http.request({
|
|
141
|
+
method: "GET",
|
|
142
|
+
path: "/integrations/whatsapp/businesses",
|
|
143
|
+
query: { ...query },
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/** List WhatsApp business accounts. */
|
|
147
|
+
async businessAccounts(query) {
|
|
148
|
+
return this.http.request({
|
|
149
|
+
method: "GET",
|
|
150
|
+
path: "/integrations/whatsapp/business-accounts",
|
|
151
|
+
query: { ...query },
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/** List WhatsApp phone numbers. */
|
|
155
|
+
async phoneNumbers(query) {
|
|
156
|
+
return this.http.request({
|
|
157
|
+
method: "GET",
|
|
158
|
+
path: "/integrations/whatsapp/phone-numbers",
|
|
159
|
+
query: { ...query },
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/** List WhatsApp message templates. */
|
|
163
|
+
async messageTemplates(query) {
|
|
164
|
+
return this.http.request({
|
|
165
|
+
method: "GET",
|
|
166
|
+
path: "/integrations/whatsapp/message-templates",
|
|
167
|
+
query: { ...query },
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// ── Main resource ──
|
|
172
|
+
class IntegrationsResource {
|
|
173
|
+
http;
|
|
174
|
+
/** Google Sheets resource fetching. */
|
|
175
|
+
googleSheets;
|
|
176
|
+
/** Slack resource fetching. */
|
|
177
|
+
slack;
|
|
178
|
+
/** Microsoft Teams resource fetching. */
|
|
179
|
+
teams;
|
|
180
|
+
/** Twilio SMS resource fetching. */
|
|
181
|
+
twilioSms;
|
|
182
|
+
/** WhatsApp resource fetching. */
|
|
183
|
+
whatsApp;
|
|
184
|
+
constructor(http) {
|
|
185
|
+
this.http = http;
|
|
186
|
+
this.googleSheets = new GoogleSheetsResource(http);
|
|
187
|
+
this.slack = new SlackResource(http);
|
|
188
|
+
this.teams = new TeamsResource(http);
|
|
189
|
+
this.twilioSms = new TwilioSmsResource(http);
|
|
190
|
+
this.whatsApp = new WhatsAppResource(http);
|
|
191
|
+
}
|
|
192
|
+
/** List all integrations (optionally filtered). */
|
|
193
|
+
async list(query) {
|
|
194
|
+
return this.http.request({
|
|
195
|
+
method: "GET",
|
|
196
|
+
path: "/integrations",
|
|
197
|
+
query: query,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/** Get an integration by ID. */
|
|
201
|
+
async get(integrationId) {
|
|
202
|
+
return this.http.request({
|
|
203
|
+
method: "GET",
|
|
204
|
+
path: `/integrations/${enc(integrationId)}`,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/** Create a credential for a form-based integration. */
|
|
208
|
+
async createCredential(integrationId, body) {
|
|
209
|
+
return this.http.request({
|
|
210
|
+
method: "POST",
|
|
211
|
+
path: `/integrations/${enc(integrationId)}/create-credential`,
|
|
212
|
+
body,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.IntegrationsResource = IntegrationsResource;
|
|
217
|
+
function enc(s) {
|
|
218
|
+
return encodeURIComponent(s);
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=integrations.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue resource — client.issues.*
|
|
3
|
+
*
|
|
4
|
+
* Maps to:
|
|
5
|
+
* PATCH /issues/:issue_id
|
|
6
|
+
*/
|
|
7
|
+
import type { HttpClient } from "../core/http";
|
|
8
|
+
import type { UpdateIssueBody, UpdateIssueResponse } from "../types/issues.types";
|
|
9
|
+
export declare class IssuesResource {
|
|
10
|
+
private readonly http;
|
|
11
|
+
constructor(http: HttpClient);
|
|
12
|
+
/** Update the status of a quality issue (flag). */
|
|
13
|
+
update(issueId: string, body: UpdateIssueBody): Promise<UpdateIssueResponse>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Issue resource — client.issues.*
|
|
4
|
+
*
|
|
5
|
+
* Maps to:
|
|
6
|
+
* PATCH /issues/:issue_id
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.IssuesResource = void 0;
|
|
10
|
+
class IssuesResource {
|
|
11
|
+
http;
|
|
12
|
+
constructor(http) {
|
|
13
|
+
this.http = http;
|
|
14
|
+
}
|
|
15
|
+
/** Update the status of a quality issue (flag). */
|
|
16
|
+
async update(issueId, body) {
|
|
17
|
+
return this.http.request({
|
|
18
|
+
method: "PATCH",
|
|
19
|
+
path: `/issues/${encodeURIComponent(issueId)}`,
|
|
20
|
+
body,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.IssuesResource = IssuesResource;
|
|
25
|
+
//# sourceMappingURL=issues.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge bases resource — client.knowledgeBases.*
|
|
3
|
+
*
|
|
4
|
+
* Maps to:
|
|
5
|
+
* GET /knowledge-bases
|
|
6
|
+
* GET /knowledge-bases/:kbId/files
|
|
7
|
+
* POST /knowledge-bases/:kbId/upload-urls
|
|
8
|
+
* POST /knowledge-bases/:kbId/trigger-chunking
|
|
9
|
+
* DELETE /knowledge-bases/:kbId/files/:fileId
|
|
10
|
+
* DELETE /knowledge-bases/:kbId
|
|
11
|
+
*/
|
|
12
|
+
import type { HttpClient } from "../core/http";
|
|
13
|
+
import type { KnowledgeBase, KnowledgeBaseDocument } from "../types/knowledge-bases.types";
|
|
14
|
+
export interface UploadUrlsBody {
|
|
15
|
+
files: Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
content_type: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export declare class KnowledgeBasesResource {
|
|
21
|
+
private readonly http;
|
|
22
|
+
constructor(http: HttpClient);
|
|
23
|
+
/** List all knowledge bases. */
|
|
24
|
+
list(): Promise<KnowledgeBase[]>;
|
|
25
|
+
/** List files in a knowledge base. */
|
|
26
|
+
listFiles(kbId: string): Promise<KnowledgeBaseDocument[]>;
|
|
27
|
+
/** Get pre-signed upload URLs for files. */
|
|
28
|
+
getUploadUrls(kbId: string, body: UploadUrlsBody): Promise<unknown>;
|
|
29
|
+
/** Trigger document chunking/processing. */
|
|
30
|
+
triggerChunking(kbId: string): Promise<unknown>;
|
|
31
|
+
/** Delete a file from a knowledge base. */
|
|
32
|
+
deleteFile(kbId: string, fileId: string): Promise<void>;
|
|
33
|
+
/** Delete a knowledge base. */
|
|
34
|
+
delete(kbId: string): Promise<void>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Knowledge bases resource — client.knowledgeBases.*
|
|
4
|
+
*
|
|
5
|
+
* Maps to:
|
|
6
|
+
* GET /knowledge-bases
|
|
7
|
+
* GET /knowledge-bases/:kbId/files
|
|
8
|
+
* POST /knowledge-bases/:kbId/upload-urls
|
|
9
|
+
* POST /knowledge-bases/:kbId/trigger-chunking
|
|
10
|
+
* DELETE /knowledge-bases/:kbId/files/:fileId
|
|
11
|
+
* DELETE /knowledge-bases/:kbId
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.KnowledgeBasesResource = void 0;
|
|
15
|
+
class KnowledgeBasesResource {
|
|
16
|
+
http;
|
|
17
|
+
constructor(http) {
|
|
18
|
+
this.http = http;
|
|
19
|
+
}
|
|
20
|
+
/** List all knowledge bases. */
|
|
21
|
+
async list() {
|
|
22
|
+
return this.http.request({
|
|
23
|
+
method: "GET",
|
|
24
|
+
path: "/knowledge-bases",
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** List files in a knowledge base. */
|
|
28
|
+
async listFiles(kbId) {
|
|
29
|
+
return this.http.request({
|
|
30
|
+
method: "GET",
|
|
31
|
+
path: `/knowledge-bases/${enc(kbId)}/files`,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** Get pre-signed upload URLs for files. */
|
|
35
|
+
async getUploadUrls(kbId, body) {
|
|
36
|
+
return this.http.request({
|
|
37
|
+
method: "POST",
|
|
38
|
+
path: `/knowledge-bases/${enc(kbId)}/upload-urls`,
|
|
39
|
+
body,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** Trigger document chunking/processing. */
|
|
43
|
+
async triggerChunking(kbId) {
|
|
44
|
+
return this.http.request({
|
|
45
|
+
method: "POST",
|
|
46
|
+
path: `/knowledge-bases/${enc(kbId)}/trigger-chunking`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/** Delete a file from a knowledge base. */
|
|
50
|
+
async deleteFile(kbId, fileId) {
|
|
51
|
+
return this.http.request({
|
|
52
|
+
method: "DELETE",
|
|
53
|
+
path: `/knowledge-bases/${enc(kbId)}/files/${enc(fileId)}`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/** Delete a knowledge base. */
|
|
57
|
+
async delete(kbId) {
|
|
58
|
+
return this.http.request({
|
|
59
|
+
method: "DELETE",
|
|
60
|
+
path: `/knowledge-bases/${enc(kbId)}`,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.KnowledgeBasesResource = KnowledgeBasesResource;
|
|
65
|
+
function enc(s) {
|
|
66
|
+
return encodeURIComponent(s);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=knowledge-bases.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resource — client.mcp.*
|
|
3
|
+
*
|
|
4
|
+
* Maps to:
|
|
5
|
+
* GET /mcp
|
|
6
|
+
* POST /mcp
|
|
7
|
+
* POST /mcp/:mcpId/refresh
|
|
8
|
+
*/
|
|
9
|
+
import type { HttpClient } from "../core/http";
|
|
10
|
+
import type { ListMCPServersQuery, PaginatedMCPServersResponse, CreateMCPServerBody, MCPServerResponse } from "../types/mcp.types";
|
|
11
|
+
export declare class MCPResource {
|
|
12
|
+
private readonly http;
|
|
13
|
+
constructor(http: HttpClient);
|
|
14
|
+
/** List MCP servers (paginated). */
|
|
15
|
+
list(query?: ListMCPServersQuery): Promise<PaginatedMCPServersResponse>;
|
|
16
|
+
/** Register a new MCP server. */
|
|
17
|
+
create(body: CreateMCPServerBody): Promise<MCPServerResponse>;
|
|
18
|
+
/** Refresh (re-discover tools for) an MCP server. */
|
|
19
|
+
refresh(mcpId: string): Promise<MCPServerResponse>;
|
|
20
|
+
}
|