@happyrobot-ai/sdk 0.1.12 → 0.1.14

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 CHANGED
@@ -543,6 +543,8 @@ await client.mcp.refresh("mcp-id");
543
543
  | `create(body)` | POST | `/mcp` | Register a new MCP server |
544
544
  | `refresh(mcpId)` | POST | `/mcp/:id/refresh` | Re-discover tools for an MCP server |
545
545
 
546
+ **OAuth2 (`auth_type: "oauth2"`)**: set `oauth2_credential_id` to the UUID of an **OAuth 2.0** integration credential (same org) configured with your provider’s token URL. Do not send `auth_token`; the API fetches a short-lived access token when creating, listing refresh, or when workflows run.
547
+
546
548
  ---
547
549
 
548
550
  ## `client.billing`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyrobot-ai/sdk",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "TypeScript SDK for the HappyRobot Public API",
5
5
  "main": "./index.js",
6
6
  "module": "./index.mjs",
@@ -2,8 +2,9 @@
2
2
  * Integrations resource — client.integrations.*
3
3
  *
4
4
  * Maps to:
5
- * GET /integrations
6
- * GET /integrations/:integrationId
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/:integrationId
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) {
@@ -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>;