@happyrobot-ai/sdk 0.1.13 → 0.1.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/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* GET /adversarial-tests/runs/:run_id/messages
|
|
12
12
|
*/
|
|
13
13
|
import type { HttpClient } from "../core/http";
|
|
14
|
-
import type { GetAdversarialTestResponse, PatchAdversarialTestBody, PatchAdversarialTestResponse, RunAdversarialTestBody, RunAdversarialTestResponse, ListAdversarialTestRunsResponse, ListAdversarialTestRunMessagesResponse } from "../types/adversarial-tests.types";
|
|
14
|
+
import type { AdversarialTestEffectiveScope, GetAdversarialTestResponse, PatchAdversarialTestBody, PatchAdversarialTestResponse, RunAdversarialTestBody, RunAdversarialTestResponse, ListAdversarialTestRunsResponse, ListAdversarialTestRunMessagesResponse } from "../types/adversarial-tests.types";
|
|
15
15
|
export declare class AdversarialTestsResource {
|
|
16
16
|
private readonly http;
|
|
17
17
|
constructor(http: HttpClient);
|
|
@@ -33,4 +33,10 @@ export declare class AdversarialTestsResource {
|
|
|
33
33
|
}>;
|
|
34
34
|
/** Get the conversation messages from a test run. */
|
|
35
35
|
getRunMessages(runId: string): Promise<ListAdversarialTestRunMessagesResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Get the resolved audit scope for a test — the northstar categories
|
|
38
|
+
* that BEA will grade against. Generated tests inherit suite scope;
|
|
39
|
+
* standalone tests carry their own.
|
|
40
|
+
*/
|
|
41
|
+
getEffectiveScope(testId: string): Promise<AdversarialTestEffectiveScope>;
|
|
36
42
|
}
|
|
@@ -70,6 +70,17 @@ class AdversarialTestsResource {
|
|
|
70
70
|
path: `/adversarial-tests/runs/${enc(runId)}/messages`,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Get the resolved audit scope for a test — the northstar categories
|
|
75
|
+
* that BEA will grade against. Generated tests inherit suite scope;
|
|
76
|
+
* standalone tests carry their own.
|
|
77
|
+
*/
|
|
78
|
+
async getEffectiveScope(testId) {
|
|
79
|
+
return this.http.request({
|
|
80
|
+
method: "GET",
|
|
81
|
+
path: `/adversarial-tests/${enc(testId)}/effective-scope`,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
73
84
|
}
|
|
74
85
|
exports.AdversarialTestsResource = AdversarialTestsResource;
|
|
75
86
|
function enc(s) {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Integrations resource — client.integrations.*
|
|
3
3
|
*
|
|
4
4
|
* Maps to:
|
|
5
|
-
* GET /integrations
|
|
6
|
-
* GET /integrations
|
|
5
|
+
* GET /integrations — list integrations (paginated, filterable by category/provider)
|
|
6
|
+
* GET /integrations/categories — category → providers map
|
|
7
|
+
* GET /integrations/:integrationId — get single integration (supports composite IDs for delegated providers)
|
|
7
8
|
* POST /integrations/:integrationId/create-credential
|
|
8
9
|
*
|
|
9
10
|
* Integration-specific resources:
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
* GET /integrations/whatsapp/message-templates
|
|
24
25
|
*/
|
|
25
26
|
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
|
+
import type { ListIntegrationsQuery, ListIntegrationsResponse, Integration, CreateCredentialBody, CreateCredentialResponse, CategoriesResponse, CredentialIdQuery, GoogleSheetsWorksheetsQuery, GoogleSheetsColumnsQuery, GoogleSheetsRowsQuery, TeamsChannelsQuery, WhatsAppCredentialQuery, WhatsAppBusinessAccountsQuery, WhatsAppPhoneNumbersQuery, WhatsAppMessageTemplatesQuery, ResourceListResponse, ResourceListWithDescriptionResponse, WhatsAppTemplateListResponse } from "../types/integrations.types";
|
|
27
28
|
declare class GoogleSheetsResource {
|
|
28
29
|
private readonly http;
|
|
29
30
|
constructor(http: HttpClient);
|
|
@@ -91,5 +92,11 @@ export declare class IntegrationsResource {
|
|
|
91
92
|
get(integrationId: string): Promise<Integration>;
|
|
92
93
|
/** Create a credential for a form-based integration. */
|
|
93
94
|
createCredential(integrationId: string, body: CreateCredentialBody): Promise<CreateCredentialResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* List all categories with their providers.
|
|
97
|
+
* Returns a unified map of categories (internal groups + delegated categories)
|
|
98
|
+
* to the providers available in each.
|
|
99
|
+
*/
|
|
100
|
+
categories(): Promise<CategoriesResponse>;
|
|
94
101
|
}
|
|
95
102
|
export {};
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Integrations resource — client.integrations.*
|
|
4
4
|
*
|
|
5
5
|
* Maps to:
|
|
6
|
-
* GET /integrations
|
|
7
|
-
* GET /integrations
|
|
6
|
+
* GET /integrations — list integrations (paginated, filterable by category/provider)
|
|
7
|
+
* GET /integrations/categories — category → providers map
|
|
8
|
+
* GET /integrations/:integrationId — get single integration (supports composite IDs for delegated providers)
|
|
8
9
|
* POST /integrations/:integrationId/create-credential
|
|
9
10
|
*
|
|
10
11
|
* Integration-specific resources:
|
|
@@ -212,6 +213,17 @@ class IntegrationsResource {
|
|
|
212
213
|
body,
|
|
213
214
|
});
|
|
214
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* List all categories with their providers.
|
|
218
|
+
* Returns a unified map of categories (internal groups + delegated categories)
|
|
219
|
+
* to the providers available in each.
|
|
220
|
+
*/
|
|
221
|
+
async categories() {
|
|
222
|
+
return this.http.request({
|
|
223
|
+
method: "GET",
|
|
224
|
+
path: "/integrations/categories",
|
|
225
|
+
});
|
|
226
|
+
}
|
|
215
227
|
}
|
|
216
228
|
exports.IntegrationsResource = IntegrationsResource;
|
|
217
229
|
function enc(s) {
|
|
@@ -7,8 +7,10 @@ import type { PatchAdversarialTestBodySchema, PatchAdversarialTestResponseSchema
|
|
|
7
7
|
import type { RunAdversarialTestBodySchema, RunAdversarialTestResponseSchema } from "../../routes/adversarial-tests/run/post";
|
|
8
8
|
import type { AdversarialTestRunMessageSchema, GetAdversarialTestRunMessagesResponseSchema } from "../../routes/adversarial-tests/runs/:run_id/messages/get";
|
|
9
9
|
import type { AuditRemarkApiSchema, AdversarialTestRunApiSchema, GetAdversarialTestRunsResponseSchema } from "../../routes/adversarial-tests/runs/get";
|
|
10
|
+
import type { EffectiveScopeApiSchema } from "../../routes/adversarial-tests/effective-scope/get";
|
|
10
11
|
import type { AdversarialTestApiSchema } from "../../routes/nodes/:node_id/adversarial-tests/get";
|
|
11
12
|
export type AdversarialTest = z.infer<typeof AdversarialTestApiSchema>;
|
|
13
|
+
export type AdversarialTestEffectiveScope = z.infer<typeof EffectiveScopeApiSchema>;
|
|
12
14
|
export type GetAdversarialTestResponse = z.infer<typeof GetAdversarialTestByIdResponseSchema>;
|
|
13
15
|
export type PatchAdversarialTestBody = z.input<typeof PatchAdversarialTestBodySchema>;
|
|
14
16
|
export type PatchAdversarialTestResponse = z.infer<typeof PatchAdversarialTestResponseSchema>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { z } from "zod";
|
|
5
5
|
import type { ResourceListResponseSchema, ResourceListWithDescriptionResponseSchema, WhatsAppTemplateListResponseSchema } from "../../routes/integrations/resources-schemas";
|
|
6
|
-
import type { IntegrationSchema, EventSchema, CredentialSchema, ListIntegrationsQuerySchema, ListIntegrationsResponseSchema, CreateCredentialBodySchema, CreateCredentialResponseSchema } from "../../routes/integrations/schemas";
|
|
6
|
+
import type { IntegrationSchema, EventSchema, CredentialSchema, ListIntegrationsQuerySchema, ListIntegrationsResponseSchema, CreateCredentialBodySchema, CreateCredentialResponseSchema, CategoriesResponseSchema, PaginationMetaSchema } from "../../routes/integrations/schemas";
|
|
7
7
|
export type Integration = z.infer<typeof IntegrationSchema>;
|
|
8
8
|
export type IntegrationEvent = z.infer<typeof EventSchema>;
|
|
9
9
|
export type Credential = z.infer<typeof CredentialSchema>;
|
|
@@ -11,6 +11,8 @@ export type ListIntegrationsQuery = z.input<typeof ListIntegrationsQuerySchema>;
|
|
|
11
11
|
export type ListIntegrationsResponse = z.infer<typeof ListIntegrationsResponseSchema>;
|
|
12
12
|
export type CreateCredentialBody = z.infer<typeof CreateCredentialBodySchema>;
|
|
13
13
|
export type CreateCredentialResponse = z.infer<typeof CreateCredentialResponseSchema>;
|
|
14
|
+
export type PaginationMeta = z.infer<typeof PaginationMetaSchema>;
|
|
15
|
+
export type CategoriesResponse = z.infer<typeof CategoriesResponseSchema>;
|
|
14
16
|
export type ResourceListResponse = z.infer<typeof ResourceListResponseSchema>;
|
|
15
17
|
export type ResourceListWithDescriptionResponse = z.infer<typeof ResourceListWithDescriptionResponseSchema>;
|
|
16
18
|
export type WhatsAppTemplateListResponse = z.infer<typeof WhatsAppTemplateListResponseSchema>;
|