@contractspec/integration.providers-impls 1.57.0 → 1.58.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/dist/analytics.d.ts +1 -8
- package/dist/analytics.d.ts.map +1 -1
- package/dist/analytics.js +3 -3
- package/dist/calendar.d.ts +1 -8
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +3 -3
- package/dist/database.d.ts +1 -8
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +3 -3
- package/dist/email.d.ts +1 -8
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js +3 -3
- package/dist/embedding.d.ts +1 -8
- package/dist/embedding.d.ts.map +1 -1
- package/dist/embedding.js +3 -3
- package/dist/impls/elevenlabs-voice.d.ts +14 -18
- package/dist/impls/elevenlabs-voice.d.ts.map +1 -1
- package/dist/impls/elevenlabs-voice.js +98 -88
- package/dist/impls/fal-voice.d.ts +22 -26
- package/dist/impls/fal-voice.d.ts.map +1 -1
- package/dist/impls/fal-voice.js +103 -78
- package/dist/impls/fathom-meeting-recorder.d.ts +35 -39
- package/dist/impls/fathom-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.js +285 -142
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts +4 -8
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.mapper.js +102 -38
- package/dist/impls/fathom-meeting-recorder.types.d.ts +16 -20
- package/dist/impls/fathom-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.types.js +1 -0
- package/dist/impls/fathom-meeting-recorder.utils.d.ts +10 -14
- package/dist/impls/fathom-meeting-recorder.utils.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.utils.js +58 -41
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts +3 -7
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.webhooks.js +25 -20
- package/dist/impls/fireflies-meeting-recorder.d.ts +21 -25
- package/dist/impls/fireflies-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.js +272 -149
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts +3 -6
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.queries.js +10 -8
- package/dist/impls/fireflies-meeting-recorder.types.d.ts +26 -29
- package/dist/impls/fireflies-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.types.js +1 -0
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts +4 -7
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.utils.js +34 -27
- package/dist/impls/gcs-storage.d.ts +18 -22
- package/dist/impls/gcs-storage.d.ts.map +1 -1
- package/dist/impls/gcs-storage.js +92 -84
- package/dist/impls/gmail-inbound.d.ts +20 -24
- package/dist/impls/gmail-inbound.d.ts.map +1 -1
- package/dist/impls/gmail-inbound.js +212 -185
- package/dist/impls/gmail-outbound.d.ts +12 -16
- package/dist/impls/gmail-outbound.d.ts.map +1 -1
- package/dist/impls/gmail-outbound.js +126 -92
- package/dist/impls/google-calendar.d.ts +17 -21
- package/dist/impls/google-calendar.d.ts.map +1 -1
- package/dist/impls/google-calendar.js +182 -145
- package/dist/impls/gradium-voice.d.ts +20 -22
- package/dist/impls/gradium-voice.d.ts.map +1 -1
- package/dist/impls/gradium-voice.js +85 -74
- package/dist/impls/granola-meeting-recorder.d.ts +31 -24
- package/dist/impls/granola-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/granola-meeting-recorder.js +511 -143
- package/dist/impls/granola-meeting-recorder.mcp.d.ts +25 -0
- package/dist/impls/granola-meeting-recorder.mcp.d.ts.map +1 -0
- package/dist/impls/granola-meeting-recorder.mcp.js +279 -0
- package/dist/impls/granola-meeting-recorder.types.d.ts +60 -49
- package/dist/impls/granola-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/granola-meeting-recorder.types.js +1 -0
- package/dist/impls/index.d.ts +28 -28
- package/dist/impls/index.d.ts.map +1 -0
- package/dist/impls/index.js +4659 -29
- package/dist/impls/jira.d.ts +18 -22
- package/dist/impls/jira.d.ts.map +1 -1
- package/dist/impls/jira.js +112 -101
- package/dist/impls/linear.d.ts +17 -21
- package/dist/impls/linear.d.ts.map +1 -1
- package/dist/impls/linear.js +78 -69
- package/dist/impls/mistral-embedding.d.ts +17 -21
- package/dist/impls/mistral-embedding.d.ts.map +1 -1
- package/dist/impls/mistral-embedding.js +41 -39
- package/dist/impls/mistral-llm.d.ts +25 -29
- package/dist/impls/mistral-llm.d.ts.map +1 -1
- package/dist/impls/mistral-llm.js +266 -244
- package/dist/impls/notion.d.ts +20 -24
- package/dist/impls/notion.d.ts.map +1 -1
- package/dist/impls/notion.js +145 -110
- package/dist/impls/posthog-reader.d.ts +18 -22
- package/dist/impls/posthog-reader.d.ts.map +1 -1
- package/dist/impls/posthog-reader.js +148 -129
- package/dist/impls/posthog-utils.d.ts +4 -7
- package/dist/impls/posthog-utils.d.ts.map +1 -1
- package/dist/impls/posthog-utils.js +31 -22
- package/dist/impls/posthog.d.ts +33 -37
- package/dist/impls/posthog.d.ts.map +1 -1
- package/dist/impls/posthog.js +320 -119
- package/dist/impls/postmark-email.d.ts +13 -17
- package/dist/impls/postmark-email.d.ts.map +1 -1
- package/dist/impls/postmark-email.js +55 -50
- package/dist/impls/powens-client.d.ts +111 -114
- package/dist/impls/powens-client.d.ts.map +1 -1
- package/dist/impls/powens-client.js +194 -170
- package/dist/impls/powens-openbanking.d.ts +22 -26
- package/dist/impls/powens-openbanking.d.ts.map +1 -1
- package/dist/impls/powens-openbanking.js +425 -217
- package/dist/impls/provider-factory.d.ts +29 -33
- package/dist/impls/provider-factory.d.ts.map +1 -1
- package/dist/impls/provider-factory.js +4072 -275
- package/dist/impls/qdrant-vector.d.ts +18 -22
- package/dist/impls/qdrant-vector.d.ts.map +1 -1
- package/dist/impls/qdrant-vector.js +76 -69
- package/dist/impls/stripe-payments.d.ts +22 -26
- package/dist/impls/stripe-payments.d.ts.map +1 -1
- package/dist/impls/stripe-payments.js +219 -193
- package/dist/impls/supabase-psql.d.ts +21 -25
- package/dist/impls/supabase-psql.d.ts.map +1 -1
- package/dist/impls/supabase-psql.js +138 -98
- package/dist/impls/supabase-vector.d.ts +29 -33
- package/dist/impls/supabase-vector.d.ts.map +1 -1
- package/dist/impls/supabase-vector.js +278 -103
- package/dist/impls/tldv-meeting-recorder.d.ts +18 -22
- package/dist/impls/tldv-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/tldv-meeting-recorder.js +142 -127
- package/dist/impls/twilio-sms.d.ts +14 -17
- package/dist/impls/twilio-sms.d.ts.map +1 -1
- package/dist/impls/twilio-sms.js +62 -55
- package/dist/index.d.ts +15 -64
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4700 -107
- package/dist/llm.d.ts +1 -8
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +3 -3
- package/dist/meeting-recorder.d.ts +1 -8
- package/dist/meeting-recorder.d.ts.map +1 -1
- package/dist/meeting-recorder.js +3 -3
- package/dist/node/analytics.js +2 -0
- package/dist/node/calendar.js +2 -0
- package/dist/node/database.js +2 -0
- package/dist/node/email.js +2 -0
- package/dist/node/embedding.js +2 -0
- package/dist/node/impls/elevenlabs-voice.js +102 -0
- package/dist/node/impls/fal-voice.js +112 -0
- package/dist/node/impls/fathom-meeting-recorder.js +287 -0
- package/dist/node/impls/fathom-meeting-recorder.mapper.js +105 -0
- package/dist/node/impls/fathom-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fathom-meeting-recorder.utils.js +72 -0
- package/dist/node/impls/fathom-meeting-recorder.webhooks.js +29 -0
- package/dist/node/impls/fireflies-meeting-recorder.js +274 -0
- package/dist/node/impls/fireflies-meeting-recorder.queries.js +85 -0
- package/dist/node/impls/fireflies-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fireflies-meeting-recorder.utils.js +42 -0
- package/dist/node/impls/gcs-storage.js +97 -0
- package/dist/node/impls/gmail-inbound.js +227 -0
- package/dist/node/impls/gmail-outbound.js +139 -0
- package/dist/node/impls/google-calendar.js +191 -0
- package/dist/node/impls/gradium-voice.js +90 -0
- package/dist/node/impls/granola-meeting-recorder.js +512 -0
- package/dist/node/impls/granola-meeting-recorder.mcp.js +278 -0
- package/dist/node/impls/granola-meeting-recorder.types.js +0 -0
- package/dist/node/impls/index.js +4658 -0
- package/dist/node/impls/jira.js +124 -0
- package/dist/node/impls/linear.js +83 -0
- package/dist/node/impls/mistral-embedding.js +43 -0
- package/dist/node/impls/mistral-llm.js +269 -0
- package/dist/node/impls/notion.js +160 -0
- package/dist/node/impls/posthog-reader.js +159 -0
- package/dist/node/impls/posthog-utils.js +38 -0
- package/dist/node/impls/posthog.js +322 -0
- package/dist/node/impls/postmark-email.js +60 -0
- package/dist/node/impls/powens-client.js +195 -0
- package/dist/node/impls/powens-openbanking.js +426 -0
- package/dist/node/impls/provider-factory.js +4080 -0
- package/dist/node/impls/qdrant-vector.js +78 -0
- package/dist/node/impls/stripe-payments.js +228 -0
- package/dist/node/impls/supabase-psql.js +150 -0
- package/dist/node/impls/supabase-vector.js +323 -0
- package/dist/node/impls/tldv-meeting-recorder.js +145 -0
- package/dist/node/impls/twilio-sms.js +65 -0
- package/dist/node/index.js +4699 -0
- package/dist/node/llm.js +2 -0
- package/dist/node/meeting-recorder.js +2 -0
- package/dist/node/openbanking.js +2 -0
- package/dist/node/payments.js +2 -0
- package/dist/node/project-management.js +2 -0
- package/dist/node/runtime.js +0 -0
- package/dist/node/secrets/provider.js +11 -0
- package/dist/node/sms.js +2 -0
- package/dist/node/storage.js +2 -0
- package/dist/node/vector-store.js +2 -0
- package/dist/node/voice.js +2 -0
- package/dist/openbanking.d.ts +1 -8
- package/dist/openbanking.d.ts.map +1 -1
- package/dist/openbanking.js +3 -3
- package/dist/payments.d.ts +1 -8
- package/dist/payments.d.ts.map +1 -1
- package/dist/payments.js +3 -3
- package/dist/project-management.d.ts +1 -8
- package/dist/project-management.d.ts.map +1 -1
- package/dist/project-management.js +3 -3
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/secrets/provider.d.ts +3 -2
- package/dist/secrets/provider.d.ts.map +1 -0
- package/dist/secrets/provider.js +12 -3
- package/dist/sms.d.ts +1 -8
- package/dist/sms.d.ts.map +1 -1
- package/dist/sms.js +3 -3
- package/dist/storage.d.ts +1 -8
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +3 -3
- package/dist/vector-store.d.ts +1 -8
- package/dist/vector-store.d.ts.map +1 -1
- package/dist/vector-store.js +3 -3
- package/dist/voice.d.ts +1 -8
- package/dist/voice.d.ts.map +1 -1
- package/dist/voice.js +3 -3
- package/package.json +405 -114
- package/dist/_virtual/_rolldown/runtime.js +0 -36
- package/dist/impls/elevenlabs-voice.js.map +0 -1
- package/dist/impls/fal-voice.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.mapper.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.utils.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.webhooks.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.queries.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.utils.js.map +0 -1
- package/dist/impls/gcs-storage.js.map +0 -1
- package/dist/impls/gmail-inbound.js.map +0 -1
- package/dist/impls/gmail-outbound.js.map +0 -1
- package/dist/impls/google-calendar.js.map +0 -1
- package/dist/impls/gradium-voice.js.map +0 -1
- package/dist/impls/granola-meeting-recorder.js.map +0 -1
- package/dist/impls/jira.js.map +0 -1
- package/dist/impls/linear.js.map +0 -1
- package/dist/impls/mistral-embedding.js.map +0 -1
- package/dist/impls/mistral-llm.js.map +0 -1
- package/dist/impls/notion.js.map +0 -1
- package/dist/impls/posthog-reader.js.map +0 -1
- package/dist/impls/posthog-utils.js.map +0 -1
- package/dist/impls/posthog.js.map +0 -1
- package/dist/impls/postmark-email.js.map +0 -1
- package/dist/impls/powens-client.js.map +0 -1
- package/dist/impls/powens-openbanking.js.map +0 -1
- package/dist/impls/provider-factory.js.map +0 -1
- package/dist/impls/qdrant-vector.js.map +0 -1
- package/dist/impls/stripe-payments.js.map +0 -1
- package/dist/impls/supabase-psql.js.map +0 -1
- package/dist/impls/supabase-vector.js.map +0 -1
- package/dist/impls/tldv-meeting-recorder.js.map +0 -1
- package/dist/impls/twilio-sms.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,56 +1,61 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/impls/postmark-email.ts
|
|
1
3
|
import { ServerClient } from "postmark";
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
5
|
+
class PostmarkEmailProvider {
|
|
6
|
+
client;
|
|
7
|
+
defaultFromEmail;
|
|
8
|
+
messageStream;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.client = options.client ?? new ServerClient(options.serverToken, {
|
|
11
|
+
useHttps: true
|
|
12
|
+
});
|
|
13
|
+
this.defaultFromEmail = options.defaultFromEmail;
|
|
14
|
+
this.messageStream = options.messageStream;
|
|
15
|
+
}
|
|
16
|
+
async sendEmail(message) {
|
|
17
|
+
const request = {
|
|
18
|
+
From: formatAddress(message.from) ?? this.defaultFromEmail,
|
|
19
|
+
To: message.to.map((addr) => formatAddress(addr)).join(", "),
|
|
20
|
+
Cc: message.cc?.map((addr) => formatAddress(addr)).join(", ") || undefined,
|
|
21
|
+
Bcc: message.bcc?.map((addr) => formatAddress(addr)).join(", ") || undefined,
|
|
22
|
+
ReplyTo: message.replyTo ? formatAddress(message.replyTo) : undefined,
|
|
23
|
+
Subject: message.subject,
|
|
24
|
+
TextBody: message.textBody,
|
|
25
|
+
HtmlBody: message.htmlBody,
|
|
26
|
+
Headers: message.headers ? Object.entries(message.headers).map(([name, value]) => ({
|
|
27
|
+
Name: name,
|
|
28
|
+
Value: value
|
|
29
|
+
})) : undefined,
|
|
30
|
+
MessageStream: this.messageStream,
|
|
31
|
+
Attachments: buildAttachments(message)
|
|
32
|
+
};
|
|
33
|
+
const response = await this.client.sendEmail(request);
|
|
34
|
+
return {
|
|
35
|
+
id: response.MessageID,
|
|
36
|
+
providerMessageId: response.MessageID,
|
|
37
|
+
queuedAt: new Date(response.SubmittedAt ?? new Date().toISOString())
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
38
41
|
function formatAddress(address) {
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
if (address.name) {
|
|
43
|
+
return `"${address.name}" <${address.email}>`;
|
|
44
|
+
}
|
|
45
|
+
return address.email;
|
|
41
46
|
}
|
|
42
47
|
function buildAttachments(message) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
if (!message.attachments?.length)
|
|
49
|
+
return;
|
|
50
|
+
return message.attachments.filter((attachment) => attachment.data).map((attachment) => ({
|
|
51
|
+
Name: attachment.filename,
|
|
52
|
+
Content: Buffer.from(attachment.data ?? new Uint8Array).toString("base64"),
|
|
53
|
+
ContentType: attachment.contentType,
|
|
54
|
+
ContentID: null,
|
|
55
|
+
ContentLength: attachment.sizeBytes,
|
|
56
|
+
Disposition: "attachment"
|
|
57
|
+
}));
|
|
52
58
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
//# sourceMappingURL=postmark-email.js.map
|
|
59
|
+
export {
|
|
60
|
+
PostmarkEmailProvider
|
|
61
|
+
};
|
|
@@ -1,125 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
1
|
+
export type PowensEnvironment = 'sandbox' | 'production';
|
|
2
|
+
export interface PowensClientOptions {
|
|
3
|
+
clientId: string;
|
|
4
|
+
clientSecret: string;
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
environment: PowensEnvironment;
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
fetchImpl?: typeof fetch;
|
|
9
|
+
defaultTimeoutMs?: number;
|
|
10
|
+
logger?: {
|
|
11
|
+
debug?: (...args: unknown[]) => void;
|
|
12
|
+
warn?: (...args: unknown[]) => void;
|
|
13
|
+
error?: (...args: unknown[]) => void;
|
|
14
|
+
};
|
|
16
15
|
}
|
|
17
|
-
interface PowensAccount {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
export interface PowensAccount {
|
|
17
|
+
uuid: string;
|
|
18
|
+
reference: string;
|
|
19
|
+
userUuid: string;
|
|
20
|
+
institution: {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
logoUrl?: string;
|
|
24
|
+
};
|
|
23
25
|
name: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
type?: string;
|
|
33
|
-
status?: string;
|
|
34
|
-
metadata?: Record<string, unknown>;
|
|
26
|
+
iban?: string;
|
|
27
|
+
bic?: string;
|
|
28
|
+
currency?: string;
|
|
29
|
+
balance?: number;
|
|
30
|
+
availableBalance?: number;
|
|
31
|
+
type?: string;
|
|
32
|
+
status?: string;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
35
34
|
}
|
|
36
|
-
interface PowensAccountListResponse {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
export interface PowensAccountListResponse {
|
|
36
|
+
accounts: PowensAccount[];
|
|
37
|
+
pagination?: {
|
|
38
|
+
nextCursor?: string;
|
|
39
|
+
hasMore?: boolean;
|
|
40
|
+
};
|
|
42
41
|
}
|
|
43
|
-
interface PowensTransaction {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
export interface PowensTransaction {
|
|
43
|
+
uuid: string;
|
|
44
|
+
accountUuid: string;
|
|
45
|
+
amount: number;
|
|
46
|
+
currency: string;
|
|
47
|
+
direction: 'credit' | 'debit';
|
|
48
|
+
description?: string;
|
|
49
|
+
category?: string;
|
|
50
|
+
rawLabel?: string;
|
|
51
|
+
bookingDate?: string;
|
|
52
|
+
valueDate?: string;
|
|
53
|
+
status?: string;
|
|
54
|
+
merchantName?: string;
|
|
55
|
+
merchantCategoryCode?: string;
|
|
56
|
+
counterpartyName?: string;
|
|
57
|
+
counterpartyAccount?: string;
|
|
58
|
+
metadata?: Record<string, unknown>;
|
|
60
59
|
}
|
|
61
|
-
interface PowensTransactionListResponse {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
export interface PowensTransactionListResponse {
|
|
61
|
+
transactions: PowensTransaction[];
|
|
62
|
+
pagination?: {
|
|
63
|
+
nextCursor?: string;
|
|
64
|
+
hasMore?: boolean;
|
|
65
|
+
};
|
|
67
66
|
}
|
|
68
|
-
interface PowensBalance {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
export interface PowensBalance {
|
|
68
|
+
accountUuid: string;
|
|
69
|
+
type: string;
|
|
70
|
+
amount: number;
|
|
71
|
+
currency: string;
|
|
72
|
+
updatedAt: string;
|
|
73
|
+
metadata?: Record<string, unknown>;
|
|
75
74
|
}
|
|
76
|
-
interface PowensConnectionStatusResponse {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
export interface PowensConnectionStatusResponse {
|
|
76
|
+
connectionUuid: string;
|
|
77
|
+
status: 'healthy' | 'error' | 'revoked' | 'pending';
|
|
78
|
+
lastAttemptAt?: string;
|
|
79
|
+
errorCode?: string;
|
|
80
|
+
errorMessage?: string;
|
|
81
|
+
metadata?: Record<string, unknown>;
|
|
83
82
|
}
|
|
84
|
-
declare class PowensClientError extends Error {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
export declare class PowensClientError extends Error {
|
|
84
|
+
readonly status: number;
|
|
85
|
+
readonly code?: string;
|
|
86
|
+
readonly requestId?: string;
|
|
87
|
+
readonly response?: unknown;
|
|
88
|
+
constructor(message: string, status: number, code?: string, requestId?: string, response?: unknown);
|
|
90
89
|
}
|
|
91
|
-
declare class PowensClient {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
90
|
+
export declare class PowensClient {
|
|
91
|
+
private readonly clientId;
|
|
92
|
+
private readonly clientSecret;
|
|
93
|
+
private readonly apiKey?;
|
|
94
|
+
private readonly fetchImpl;
|
|
95
|
+
private readonly logger?;
|
|
96
|
+
private readonly defaultTimeoutMs;
|
|
97
|
+
private token?;
|
|
98
|
+
private readonly baseUrl;
|
|
99
|
+
constructor(options: PowensClientOptions);
|
|
100
|
+
listAccounts(params: {
|
|
101
|
+
userUuid: string;
|
|
102
|
+
cursor?: string;
|
|
103
|
+
limit?: number;
|
|
104
|
+
includeBalances?: boolean;
|
|
105
|
+
institutionUuid?: string;
|
|
106
|
+
}): Promise<PowensAccountListResponse>;
|
|
107
|
+
getAccount(accountUuid: string): Promise<PowensAccount>;
|
|
108
|
+
listTransactions(params: {
|
|
109
|
+
accountUuid: string;
|
|
110
|
+
cursor?: string;
|
|
111
|
+
limit?: number;
|
|
112
|
+
from?: string;
|
|
113
|
+
to?: string;
|
|
114
|
+
includePending?: boolean;
|
|
115
|
+
}): Promise<PowensTransactionListResponse>;
|
|
116
|
+
getBalances(accountUuid: string): Promise<PowensBalance[]>;
|
|
117
|
+
getConnectionStatus(connectionUuid: string): Promise<PowensConnectionStatusResponse>;
|
|
118
|
+
private request;
|
|
119
|
+
private ensureAccessToken;
|
|
120
|
+
private fetchAccessToken;
|
|
122
121
|
}
|
|
123
|
-
//#endregion
|
|
124
|
-
export { PowensAccount, PowensAccountListResponse, PowensBalance, PowensClient, PowensClientError, PowensClientOptions, PowensConnectionStatusResponse, PowensEnvironment, PowensTransaction, PowensTransactionListResponse };
|
|
125
122
|
//# sourceMappingURL=powens-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powens-client.d.ts","
|
|
1
|
+
{"version":3,"file":"powens-client.d.ts","sourceRoot":"","sources":["../../src/impls/powens-client.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,YAAY,CAAC;AAOzD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;QACrC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;QACpC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;KACtC,CAAC;CACH;AAeD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,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