@elevasis/sdk 0.4.13 → 0.4.15
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/dist/cli.cjs +6 -3
- package/dist/types/worker/adapters/apify.d.ts +14 -0
- package/dist/types/worker/adapters/approval.d.ts +23 -0
- package/dist/types/worker/adapters/attio.d.ts +22 -0
- package/dist/types/worker/adapters/create-adapter.d.ts +41 -0
- package/dist/types/worker/adapters/dropbox.d.ts +14 -0
- package/dist/types/worker/adapters/email.d.ts +25 -0
- package/dist/types/worker/adapters/execution.d.ts +22 -0
- package/dist/types/worker/adapters/gmail.d.ts +14 -0
- package/dist/types/worker/adapters/google-sheets.d.ts +14 -0
- package/dist/types/worker/adapters/index.d.ts +29 -0
- package/dist/types/worker/adapters/instantly.d.ts +14 -0
- package/dist/types/worker/adapters/lead.d.ts +28 -0
- package/dist/types/worker/adapters/llm.d.ts +30 -0
- package/dist/types/worker/adapters/mailso.d.ts +14 -0
- package/dist/types/worker/adapters/notification.d.ts +28 -0
- package/dist/types/worker/adapters/notion.d.ts +14 -0
- package/dist/types/worker/adapters/pdf.d.ts +22 -0
- package/dist/types/worker/adapters/resend.d.ts +14 -0
- package/dist/types/worker/adapters/scheduler.d.ts +25 -0
- package/dist/types/worker/adapters/signature-api.d.ts +14 -0
- package/dist/types/worker/adapters/storage.d.ts +33 -0
- package/dist/types/worker/adapters/stripe.d.ts +14 -0
- package/dist/types/worker/adapters/trello.d.ts +14 -0
- package/dist/worker/index.js +4 -2
- package/package.json +2 -1
package/dist/cli.cjs
CHANGED
|
@@ -43830,7 +43830,7 @@ async function apiDelete(endpoint, apiUrl = resolveApiUrl()) {
|
|
|
43830
43830
|
// package.json
|
|
43831
43831
|
var package_default = {
|
|
43832
43832
|
name: "@elevasis/sdk",
|
|
43833
|
-
version: "0.4.
|
|
43833
|
+
version: "0.4.14",
|
|
43834
43834
|
description: "SDK for building Elevasis organization resources",
|
|
43835
43835
|
"comment:bin": "IMPORTANT: This package shares the 'elevasis' binary name with @repo/cli. They never conflict because @elevasis/sdk must NEVER be added as a dependency of any workspace package (apps/*, packages/*, organizations/*). Workspace projects use @repo/cli for the 'elevasis' binary. External developers (outside the workspace) get this SDK's binary via npm install.",
|
|
43836
43836
|
type: "module",
|
|
@@ -43858,6 +43858,7 @@ var package_default = {
|
|
|
43858
43858
|
"dist/worker/index.js",
|
|
43859
43859
|
"dist/types/worker/index.d.ts",
|
|
43860
43860
|
"dist/types/worker/platform.d.ts",
|
|
43861
|
+
"dist/types/worker/adapters/",
|
|
43861
43862
|
"dist/cli.cjs",
|
|
43862
43863
|
"dist/templates.js",
|
|
43863
43864
|
"dist/types/templates.d.ts",
|
|
@@ -44077,7 +44078,8 @@ function registerDeployCommand(program3) {
|
|
|
44077
44078
|
name: w.config.name,
|
|
44078
44079
|
version: w.config.version,
|
|
44079
44080
|
status: w.config.status,
|
|
44080
|
-
description: w.config.description
|
|
44081
|
+
description: w.config.description,
|
|
44082
|
+
domains: w.config.domains
|
|
44081
44083
|
};
|
|
44082
44084
|
if (w.contract.inputSchema) {
|
|
44083
44085
|
try {
|
|
@@ -44101,7 +44103,8 @@ function registerDeployCommand(program3) {
|
|
|
44101
44103
|
name: a.config.name,
|
|
44102
44104
|
version: a.config.version,
|
|
44103
44105
|
status: a.config.status,
|
|
44104
|
-
description: a.config.description
|
|
44106
|
+
description: a.config.description,
|
|
44107
|
+
domains: a.config.domains
|
|
44105
44108
|
};
|
|
44106
44109
|
if (a.contract.inputSchema) {
|
|
44107
44110
|
try {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apify Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Apify actor operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { ApifyToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Apify adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 1 typed method for Apify actor operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createApifyAdapter(credential: string): import("./create-adapter.js").TypedAdapter<ApifyToolMap>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approval Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for HITL (human-in-the-loop) tasks.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*/
|
|
7
|
+
import type { ApprovalToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Typed approval adapter for creating and managing HITL tasks.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { approval } from '@elevasis/sdk/worker'
|
|
14
|
+
*
|
|
15
|
+
* const task = await approval.create({
|
|
16
|
+
* actions: [{ id: 'approve', label: 'Approve', type: 'primary' }],
|
|
17
|
+
* context: { dealId: 'deal-123' },
|
|
18
|
+
* description: 'Review proposal for Acme Corp',
|
|
19
|
+
* humanCheckpoint: 'proposal-review',
|
|
20
|
+
* })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare const approval: import("./create-adapter.js").TypedAdapter<ApprovalToolMap>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attio Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Attio CRM operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*
|
|
7
|
+
* Types are shared with the server-side Attio adapter via @repo/core/execution.
|
|
8
|
+
*/
|
|
9
|
+
import type { AttioToolMap } from '../../types/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Create a typed Attio adapter bound to a specific credential.
|
|
12
|
+
*
|
|
13
|
+
* @param credential - Credential name as configured in the command center
|
|
14
|
+
* @returns Object with 12 typed methods for Attio CRM operations
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const attio = createAttioAdapter('my-attio-credential')
|
|
19
|
+
* const records = await attio.listRecords({ object: 'deals', filter: { ... } })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function createAttioAdapter(credential: string): import("./create-adapter.js").TypedAdapter<AttioToolMap>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic Typed Adapter Factory
|
|
3
|
+
*
|
|
4
|
+
* Given a ToolMethodMap type, tool name, and optional credential,
|
|
5
|
+
* generates a fully typed object where each key is a method name
|
|
6
|
+
* and each value is a typed function that calls platform.call().
|
|
7
|
+
*
|
|
8
|
+
* Eliminates: manual `as Promise<T>` casts, stringly-typed method names,
|
|
9
|
+
* per-method boilerplate.
|
|
10
|
+
*/
|
|
11
|
+
/** A single method entry: what params go in, what result comes out */
|
|
12
|
+
interface MethodEntry {
|
|
13
|
+
params: unknown;
|
|
14
|
+
result: unknown;
|
|
15
|
+
}
|
|
16
|
+
/** A tool's complete method map */
|
|
17
|
+
type ToolMethodMap = Record<string, MethodEntry>;
|
|
18
|
+
/**
|
|
19
|
+
* Derive the typed adapter interface from a ToolMethodMap.
|
|
20
|
+
* Methods with `Record<string, never>` params become zero-arg functions.
|
|
21
|
+
*/
|
|
22
|
+
export type TypedAdapter<TMap extends ToolMethodMap> = {
|
|
23
|
+
[K in keyof TMap]: TMap[K]['params'] extends Record<string, never> ? () => Promise<TMap[K]['result']> : (params: TMap[K]['params']) => Promise<TMap[K]['result']>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Create a typed adapter for a platform or integration tool.
|
|
27
|
+
*
|
|
28
|
+
* @param tool - Tool name (e.g., 'attio', 'storage', 'scheduler')
|
|
29
|
+
* @param methods - Array of method name strings (must match TMap keys -- misspellings are compile errors)
|
|
30
|
+
* @param credential - Optional credential name (required for integration tools)
|
|
31
|
+
* @returns Fully typed adapter object
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const attio = createAdapter<AttioToolMap>('attio', ['createRecord', 'listRecords', ...], 'my-cred')
|
|
36
|
+
* const result = await attio.createRecord({ object: 'deals', ... })
|
|
37
|
+
* // ^-- CreateRecordResult (fully typed)
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function createAdapter<TMap extends ToolMethodMap>(tool: string, methods: (keyof TMap & string)[], credential?: string): TypedAdapter<TMap>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dropbox Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Dropbox file operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { DropboxToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Dropbox adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 2 typed methods for Dropbox file operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createDropboxAdapter(credential: string): import("./create-adapter.js").TypedAdapter<DropboxToolMap>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Email Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for sending platform emails.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*
|
|
7
|
+
* Note: This is for internal organization notifications (from notifications@elevasis.io).
|
|
8
|
+
* For client-facing emails, use the resend or instantly integration adapters.
|
|
9
|
+
*/
|
|
10
|
+
import type { EmailToolMap } from '../../types/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* Typed email adapter for sending platform emails to organization members.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { email } from '@elevasis/sdk/worker'
|
|
17
|
+
*
|
|
18
|
+
* await email.send({
|
|
19
|
+
* subject: 'New deal closed',
|
|
20
|
+
* text: 'Acme Corp has signed the contract.',
|
|
21
|
+
* targetAll: true,
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const email: import("./create-adapter.js").TypedAdapter<EmailToolMap>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for cross-resource invocation.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*/
|
|
7
|
+
import type { ExecutionToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Typed execution adapter for triggering other resources (workflows/agents).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { execution } from '@elevasis/sdk/worker'
|
|
14
|
+
*
|
|
15
|
+
* const result = await execution.trigger({
|
|
16
|
+
* resourceId: 'acq-04-demo-send-link-workflow',
|
|
17
|
+
* input: { contactEmail: 'jane@acme.com' },
|
|
18
|
+
* })
|
|
19
|
+
* console.log(result.executionId)
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const execution: import("./create-adapter.js").TypedAdapter<ExecutionToolMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gmail Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Gmail operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { GmailToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Gmail adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 1 typed method for Gmail operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createGmailAdapter(credential: string): import("./create-adapter.js").TypedAdapter<GmailToolMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Sheets Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Google Sheets operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { GoogleSheetsToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Google Sheets adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 13 typed methods for Google Sheets operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createGoogleSheetsAdapter(credential: string): import("./create-adapter.js").TypedAdapter<GoogleSheetsToolMap>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK Adapters Barrel
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all typed adapters for platform.call() wrappers.
|
|
5
|
+
* Integration adapters use factory pattern (credential binding).
|
|
6
|
+
* Platform tool adapters are singletons.
|
|
7
|
+
*/
|
|
8
|
+
export { createAdapter, type TypedAdapter } from './create-adapter.js';
|
|
9
|
+
export { createAttioAdapter } from './attio.js';
|
|
10
|
+
export { createApifyAdapter } from './apify.js';
|
|
11
|
+
export { createDropboxAdapter } from './dropbox.js';
|
|
12
|
+
export { createGmailAdapter } from './gmail.js';
|
|
13
|
+
export { createGoogleSheetsAdapter } from './google-sheets.js';
|
|
14
|
+
export { createInstantlyAdapter } from './instantly.js';
|
|
15
|
+
export { createMailsoAdapter } from './mailso.js';
|
|
16
|
+
export { createNotionAdapter } from './notion.js';
|
|
17
|
+
export { createResendAdapter } from './resend.js';
|
|
18
|
+
export { createSignatureApiAdapter } from './signature-api.js';
|
|
19
|
+
export { createStripeAdapter } from './stripe.js';
|
|
20
|
+
export { createTrelloAdapter } from './trello.js';
|
|
21
|
+
export { scheduler } from './scheduler.js';
|
|
22
|
+
export { llm } from './llm.js';
|
|
23
|
+
export { storage } from './storage.js';
|
|
24
|
+
export { notifications, type NotificationInput } from './notification.js';
|
|
25
|
+
export { lead } from './lead.js';
|
|
26
|
+
export { pdf } from './pdf.js';
|
|
27
|
+
export { approval } from './approval.js';
|
|
28
|
+
export { execution } from './execution.js';
|
|
29
|
+
export { email } from './email.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Instantly Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Instantly email outreach operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { InstantlyToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Instantly adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 5 typed methods for Instantly email outreach operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createInstantlyAdapter(credential: string): import("./create-adapter.js").TypedAdapter<InstantlyToolMap>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lead Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for acquisition lead management.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*
|
|
7
|
+
* 35 methods covering lists, companies, contacts, deals, and deal-sync operations.
|
|
8
|
+
* organizationId is injected server-side by the dispatcher -- never sent from the SDK.
|
|
9
|
+
*/
|
|
10
|
+
import { type TypedAdapter } from './create-adapter.js';
|
|
11
|
+
import type { LeadToolMap } from '../../types/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* Typed lead adapter for acquisition data management.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { lead } from '@elevasis/sdk/worker'
|
|
18
|
+
*
|
|
19
|
+
* const deal = await lead.getDealByEmail({ email: 'jane@acme.com' })
|
|
20
|
+
* if (!deal) {
|
|
21
|
+
* const newDeal = await lead.upsertDeal({
|
|
22
|
+
* attioDealId: 'deal-123',
|
|
23
|
+
* contactEmail: 'jane@acme.com',
|
|
24
|
+
* })
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const lead: TypedAdapter<LeadToolMap>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for LLM generation.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*
|
|
7
|
+
* Types are shared with the server-side LLM engine via @repo/core/execution.
|
|
8
|
+
*/
|
|
9
|
+
import type { LLMGenerateRequest, LLMGenerateResponse } from '../../types/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Typed LLM adapter for structured output generation.
|
|
12
|
+
*
|
|
13
|
+
* Note: The `signal` property on LLMGenerateRequest is NOT serializable
|
|
14
|
+
* over the postMessage boundary. Abort signals are handled at the worker
|
|
15
|
+
* level via the parent process sending an 'abort' message.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { llm } from '@elevasis/sdk/worker'
|
|
20
|
+
*
|
|
21
|
+
* const response = await llm.generate({
|
|
22
|
+
* messages: [{ role: 'user', content: 'Summarize this document...' }],
|
|
23
|
+
* responseSchema: { type: 'object', properties: { summary: { type: 'string' } } },
|
|
24
|
+
* })
|
|
25
|
+
* console.log(response.output)
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const llm: {
|
|
29
|
+
generate: <T = unknown>(params: Omit<LLMGenerateRequest, "signal">) => Promise<LLMGenerateResponse<T>>;
|
|
30
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mailso Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Mails.so email verification operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { MailsoToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Mailso adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 1 typed method for Mails.so email verification
|
|
13
|
+
*/
|
|
14
|
+
export declare function createMailsoAdapter(credential: string): import("./create-adapter.js").TypedAdapter<MailsoToolMap>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for sending team notifications.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*
|
|
7
|
+
* NotificationInput is derived from CreateNotificationParams via Omit,
|
|
8
|
+
* since userId and organizationId are injected server-side from the execution context.
|
|
9
|
+
*/
|
|
10
|
+
import type { NotificationToolMap, NotificationSDKInput } from '../../types/index.js';
|
|
11
|
+
/** @deprecated Use NotificationSDKInput directly. Kept for backward compatibility. */
|
|
12
|
+
export type NotificationInput = NotificationSDKInput;
|
|
13
|
+
/**
|
|
14
|
+
* Typed notification adapter for sending team notifications.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { notifications } from '@elevasis/sdk/worker'
|
|
19
|
+
*
|
|
20
|
+
* await notifications.create({
|
|
21
|
+
* category: 'acquisition',
|
|
22
|
+
* title: 'New lead qualified',
|
|
23
|
+
* message: 'Acme Corp has been qualified and moved to proposal stage.',
|
|
24
|
+
* actionUrl: '/deals/deal-123',
|
|
25
|
+
* })
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const notifications: import("./create-adapter.js").TypedAdapter<NotificationToolMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notion Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Notion page operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { NotionToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Notion adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 8 typed methods for Notion page operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createNotionAdapter(credential: string): import("./create-adapter.js").TypedAdapter<NotionToolMap>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDF Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for PDF rendering.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*/
|
|
7
|
+
import type { PdfToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Typed PDF adapter for document rendering.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { pdf } from '@elevasis/sdk/worker'
|
|
14
|
+
*
|
|
15
|
+
* const result = await pdf.render({
|
|
16
|
+
* document: { pages: [...] },
|
|
17
|
+
* storage: { bucket: 'acquisition', path: 'proposals/doc.pdf' },
|
|
18
|
+
* })
|
|
19
|
+
* console.log(result.pdfUrl)
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const pdf: import("./create-adapter.js").TypedAdapter<PdfToolMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resend Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Resend email operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { ResendToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Resend adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 2 typed methods for Resend email operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createResendAdapter(credential: string): import("./create-adapter.js").TypedAdapter<ResendToolMap>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scheduler Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for task schedule operations.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*
|
|
7
|
+
* Types are shared with the server-side scheduler via @repo/core/execution.
|
|
8
|
+
*/
|
|
9
|
+
import type { SchedulerToolMap } from '../../types/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Typed scheduler adapter for creating and managing task schedules.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { scheduler } from '@elevasis/sdk/worker'
|
|
16
|
+
*
|
|
17
|
+
* const schedule = await scheduler.createSchedule({
|
|
18
|
+
* organizationId: '...',
|
|
19
|
+
* name: 'Follow-up sequence',
|
|
20
|
+
* target: { resourceType: 'workflow', resourceId: 'follow-up' },
|
|
21
|
+
* scheduleConfig: { type: 'relative', anchorAt: '2026-03-15', items: [...] },
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const scheduler: import("./create-adapter.js").TypedAdapter<SchedulerToolMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SignatureAPI Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for SignatureAPI eSignature operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { SignatureApiToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed SignatureAPI adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 4 typed methods for SignatureAPI eSignature operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createSignatureApiAdapter(credential: string): import("./create-adapter.js").TypedAdapter<SignatureApiToolMap>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Platform Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Supabase Storage operations.
|
|
5
|
+
* Singleton export -- no credential needed (platform tool).
|
|
6
|
+
*
|
|
7
|
+
* Types are shared with the server-side storage tools via @repo/core/execution.
|
|
8
|
+
*/
|
|
9
|
+
import type { StorageToolMap } from '../../types/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Typed storage adapter for file upload, download, and management.
|
|
12
|
+
*
|
|
13
|
+
* All paths are relative to the organization's storage prefix.
|
|
14
|
+
* The platform injects the organization prefix server-side.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { storage } from '@elevasis/sdk/worker'
|
|
19
|
+
*
|
|
20
|
+
* await storage.upload({
|
|
21
|
+
* bucket: 'acquisition',
|
|
22
|
+
* path: 'proposals/deal-123/proposal.pdf',
|
|
23
|
+
* content: base64Content,
|
|
24
|
+
* contentType: 'application/pdf',
|
|
25
|
+
* })
|
|
26
|
+
*
|
|
27
|
+
* const { signedUrl } = await storage.createSignedUrl({
|
|
28
|
+
* bucket: 'acquisition',
|
|
29
|
+
* path: 'proposals/deal-123/proposal.pdf',
|
|
30
|
+
* })
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const storage: import("./create-adapter.js").TypedAdapter<StorageToolMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stripe Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Stripe payment operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { StripeToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Stripe adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 6 typed methods for Stripe payment operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createStripeAdapter(credential: string): import("./create-adapter.js").TypedAdapter<StripeToolMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trello Integration Adapter
|
|
3
|
+
*
|
|
4
|
+
* Typed wrapper over platform.call() for Trello board operations.
|
|
5
|
+
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
+
*/
|
|
7
|
+
import type { TrelloToolMap } from '../../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Create a typed Trello adapter bound to a specific credential.
|
|
10
|
+
*
|
|
11
|
+
* @param credential - Credential name as configured in the command center
|
|
12
|
+
* @returns Object with 10 typed methods for Trello board operations
|
|
13
|
+
*/
|
|
14
|
+
export declare function createTrelloAdapter(credential: string): import("./create-adapter.js").TypedAdapter<TrelloToolMap>;
|
package/dist/worker/index.js
CHANGED
|
@@ -5121,7 +5121,8 @@ function startWorker(org) {
|
|
|
5121
5121
|
type: w.config.type,
|
|
5122
5122
|
status: w.config.status,
|
|
5123
5123
|
description: w.config.description,
|
|
5124
|
-
version: w.config.version
|
|
5124
|
+
version: w.config.version,
|
|
5125
|
+
domains: w.config.domains
|
|
5125
5126
|
})),
|
|
5126
5127
|
agents: (org.agents ?? []).map((a) => ({
|
|
5127
5128
|
resourceId: a.config.resourceId,
|
|
@@ -5129,7 +5130,8 @@ function startWorker(org) {
|
|
|
5129
5130
|
type: a.config.type,
|
|
5130
5131
|
status: a.config.status,
|
|
5131
5132
|
description: a.config.description,
|
|
5132
|
-
version: a.config.version
|
|
5133
|
+
version: a.config.version,
|
|
5134
|
+
domains: a.config.domains
|
|
5133
5135
|
})),
|
|
5134
5136
|
triggers: org.triggers ?? [],
|
|
5135
5137
|
integrations: org.integrations ?? [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.15",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"comment:bin": "IMPORTANT: This package shares the 'elevasis' binary name with @repo/cli. They never conflict because @elevasis/sdk must NEVER be added as a dependency of any workspace package (apps/*, packages/*, organizations/*). Workspace projects use @repo/cli for the 'elevasis' binary. External developers (outside the workspace) get this SDK's binary via npm install.",
|
|
6
6
|
"type": "module",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"dist/worker/index.js",
|
|
29
29
|
"dist/types/worker/index.d.ts",
|
|
30
30
|
"dist/types/worker/platform.d.ts",
|
|
31
|
+
"dist/types/worker/adapters/",
|
|
31
32
|
"dist/cli.cjs",
|
|
32
33
|
"dist/templates.js",
|
|
33
34
|
"dist/types/templates.d.ts",
|