@bigfootai/sdk 0.11.1 → 0.12.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/index.d.ts +11 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/html.d.ts +0 -2
- package/dist/html.d.ts.map +0 -1
- package/dist/html.js +0 -167
- package/dist/html.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AuthRefreshProviderResponse, type BusinessObjectIngestionResponse, type Calendar, type ConnectedProvider, type ConnectedProviderRegistration, type Credential, type ExternalTagReferenceRequest, type LinkSubscriptionProviderRequest, type SyncCalendarProviderRequest, type SyncTableMetadataProviderRequest, type SyncTableProviderRequest, type Table, type Tag, type Transcription, type TranscriptionFilter, type UpsertTableProviderRequest } from '@bigfootai/bigfoot-types';
|
|
1
|
+
import { type AuthRefreshProviderResponse, type BusinessObjectIngestionResponse, type Calendar, type ConnectedProvider, type ConnectedProviderRegistration, type Credential, type Email, type EmailFilter, type ExternalTagReferenceRequest, type LinkSubscriptionProviderRequest, type SyncCalendarProviderRequest, type SyncTableMetadataProviderRequest, type SyncTableProviderRequest, type Table, type Tag, type Transcription, type TranscriptionFilter, type UpsertTableProviderRequest } from '@bigfootai/bigfoot-types';
|
|
2
2
|
import { type Express } from 'express';
|
|
3
3
|
export declare const logger: import("pino").Logger<never, boolean>;
|
|
4
4
|
export type Logger = typeof logger;
|
|
@@ -22,17 +22,6 @@ interface AuthMethods {
|
|
|
22
22
|
* @returns The connected provider registration, which includes the credentials to use for the provider.
|
|
23
23
|
*/
|
|
24
24
|
callback(logger: Logger, uri: string, queryParams: URLSearchParams): Promise<ConnectedProviderRegistration>;
|
|
25
|
-
/**
|
|
26
|
-
* Check that the provided credentials are valid for the provider. This will be called after the callback to
|
|
27
|
-
* validate that the credentials are correct, for example, to ensure that a user has granted all the permissions
|
|
28
|
-
* required by the application.
|
|
29
|
-
*
|
|
30
|
-
* @optional Depending on the authentication method used by the provider.
|
|
31
|
-
* @param logger The logger to use for logging.
|
|
32
|
-
* @param application The application to check the credentials for.
|
|
33
|
-
* @param credential The credentials to check.
|
|
34
|
-
*/
|
|
35
|
-
check(logger: Logger, application: string, credential: Credential): Promise<void>;
|
|
36
25
|
/**
|
|
37
26
|
* Get the authentication URL for authenticating with the provider.
|
|
38
27
|
*
|
|
@@ -96,6 +85,16 @@ interface SyncMethods {
|
|
|
96
85
|
* @returns The transcriptions that match the filter.
|
|
97
86
|
*/
|
|
98
87
|
transcriptions(logger: Logger, credential: Credential, transcriptionFilter: TranscriptionFilter): Promise<Transcription[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Get the emails from the provider.
|
|
90
|
+
*
|
|
91
|
+
* @param logger The logger to use for logging.
|
|
92
|
+
* @param credential The credentials to use to authenticate with the provider.
|
|
93
|
+
* @param emailFilter The filter to apply to the emails
|
|
94
|
+
*
|
|
95
|
+
* @returns The emails that match the filter.
|
|
96
|
+
*/
|
|
97
|
+
emails(logger: Logger, credential: Credential, emailFilter: EmailFilter): Promise<Email[]>;
|
|
99
98
|
}
|
|
100
99
|
interface UpsertMethods {
|
|
101
100
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACpC,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,UAAU,EACf,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EAEpC,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,wBAAwB,EAE7B,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,0BA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,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;CAClG;AAED,UAAU,kBAAkB;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CAChC;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAgO/E;AAED,eAAO,MAAM,wBAAwB,yBAAgC,6BAA6B,kBAcjG,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import express from 'express';
|
|
|
4
4
|
import { pino } from 'pino';
|
|
5
5
|
import { pinoHttp } from 'pino-http';
|
|
6
6
|
import { ValidationError, errorHandler } from './errors.js';
|
|
7
|
-
import { getConnectionErrorHtml } from './html.js';
|
|
8
7
|
export const logger = pino({});
|
|
9
8
|
export async function startServer(options) {
|
|
10
9
|
const app = express();
|
|
@@ -28,22 +27,7 @@ export async function startServer(options) {
|
|
|
28
27
|
res.send('You look nice today :)');
|
|
29
28
|
});
|
|
30
29
|
app.get('/auth/callback', async (req, res) => {
|
|
31
|
-
const
|
|
32
|
-
const registration = await options.auth.callback(req.log, `${req.protocol}://${req.get('host')}${req.originalUrl}`, queryParams);
|
|
33
|
-
const state = queryParams.get('state');
|
|
34
|
-
if (state && state.length > 0 && options.auth.check) {
|
|
35
|
-
const connectionId = state.split('.')[0];
|
|
36
|
-
const application = state.split('.')[1];
|
|
37
|
-
try {
|
|
38
|
-
await options.auth.check(req.log, application, registration.credential);
|
|
39
|
-
}
|
|
40
|
-
catch (e) {
|
|
41
|
-
req.log.error(e, 'Error validating credentials');
|
|
42
|
-
res.setHeader('Content-Type', 'text/html');
|
|
43
|
-
res.send(getConnectionErrorHtml(application, connectionId));
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
30
|
+
const registration = await options.auth.callback(req.log, `${req.protocol}://${req.get('host')}${req.originalUrl}`, new URLSearchParams(req.query));
|
|
47
31
|
await sendCredentialsToBigfoot(registration);
|
|
48
32
|
res.setHeader('Content-Type', 'text/html');
|
|
49
33
|
res.send(`<!doctype html><script>window.close()</script><a href="#" onclick="window.close()">Click here to close</a>`);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAYN,eAAe,GAUf,MAAM,0BAA0B,CAAC;AAClC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,OAAsD,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AA0J/B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAA2B;IAC5D,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;IACtB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;IAEtC,2HAA2H;IAC3H,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAE7B,GAAG,CAAC,GAAG,CACN,QAAQ,CAAC;QACR,WAAW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,CAAC,SAAS,CAAC,oBAAoB,CAAC;QAC1C,OAAO,EAAE;YACR,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;SACnC;KACD,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACpF,CAAC;AACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigfootai/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"LICENSE",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@bigfootai/bigfoot-types": "
|
|
12
|
+
"@bigfootai/bigfoot-types": "5.4.106",
|
|
13
13
|
"body-parser": "^2.1.0",
|
|
14
14
|
"express": "^5.0.1",
|
|
15
15
|
"pino": "^9.9.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc",
|
|
26
|
-
"prepublish": "pnpm build && pnpm version
|
|
26
|
+
"prepublish": "pnpm build && pnpm version minor --no-workspaces-update"
|
|
27
27
|
},
|
|
28
28
|
"types": "dist/index.d.ts"
|
|
29
29
|
}
|
package/dist/html.d.ts
DELETED
package/dist/html.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAAA,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAqK/E"}
|
package/dist/html.js
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
export function getConnectionErrorHtml(application, connectionId) {
|
|
2
|
-
return `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
<html style="font-size:18px" dir="ltr" lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<link
|
|
6
|
-
rel="preload"
|
|
7
|
-
as="image"
|
|
8
|
-
href="https://cdn.mcauto-images-production.sendgrid.net/8a59cc7ae067c2e6/c0e28327-83a6-4598-9feb-96c62cf772c1/288x64.png" />
|
|
9
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
|
10
|
-
<meta name="x-apple-disable-message-reformatting" />
|
|
11
|
-
<style>
|
|
12
|
-
@font-face {
|
|
13
|
-
font-family: 'Inter';
|
|
14
|
-
font-style: normal;
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
mso-font-alt: 'Helvetica';
|
|
17
|
-
src: url(https://rsms.me/inter/font-files/Inter.woff2?v=4.1) format('woff2');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
* {
|
|
21
|
-
font-family: 'Inter', Helvetica, Arial, sans-serif;
|
|
22
|
-
}
|
|
23
|
-
</style>
|
|
24
|
-
</head>
|
|
25
|
-
<body style="background:#e5ebec">
|
|
26
|
-
<!--$-->
|
|
27
|
-
<table
|
|
28
|
-
align="center"
|
|
29
|
-
width="100%"
|
|
30
|
-
border="0"
|
|
31
|
-
cellpadding="0"
|
|
32
|
-
cellspacing="0"
|
|
33
|
-
role="presentation"
|
|
34
|
-
style="max-width:42rem;padding:1rem">
|
|
35
|
-
<tbody>
|
|
36
|
-
<tr style="width:100%">
|
|
37
|
-
<td>
|
|
38
|
-
<table
|
|
39
|
-
align="center"
|
|
40
|
-
width="100%"
|
|
41
|
-
border="0"
|
|
42
|
-
cellpadding="0"
|
|
43
|
-
cellspacing="0"
|
|
44
|
-
role="presentation"
|
|
45
|
-
style="background-color:rgb(255,255,255);padding:2rem;border-radius:0.75rem;max-width:36rem">
|
|
46
|
-
<tbody>
|
|
47
|
-
<tr style="width:100%">
|
|
48
|
-
<td>
|
|
49
|
-
<img
|
|
50
|
-
alt="Noded Ai logo"
|
|
51
|
-
src="https://cdn.mcauto-images-production.sendgrid.net/8a59cc7ae067c2e6/c0e28327-83a6-4598-9feb-96c62cf772c1/288x64.png"
|
|
52
|
-
style="display:block;outline:none;border:none;text-decoration:none"
|
|
53
|
-
width="144" />
|
|
54
|
-
<hr
|
|
55
|
-
style="margin-top:1.5rem;margin-bottom:1.5rem;width:100%;border:none;border-top:1px solid #eaeaea" />
|
|
56
|
-
<table
|
|
57
|
-
align="center"
|
|
58
|
-
width="100%"
|
|
59
|
-
border="0"
|
|
60
|
-
cellpadding="0"
|
|
61
|
-
cellspacing="0"
|
|
62
|
-
role="presentation"
|
|
63
|
-
style="text-align:center">
|
|
64
|
-
<tbody>
|
|
65
|
-
<tr>
|
|
66
|
-
<td>
|
|
67
|
-
<h1 style="margin-bottom:0.5rem;margin-top:1.25rem">
|
|
68
|
-
Unable to connect
|
|
69
|
-
</h1>
|
|
70
|
-
</td>
|
|
71
|
-
</tr>
|
|
72
|
-
</tbody>
|
|
73
|
-
</table>
|
|
74
|
-
<table
|
|
75
|
-
align="center"
|
|
76
|
-
width="100%"
|
|
77
|
-
border="0"
|
|
78
|
-
cellpadding="0"
|
|
79
|
-
cellspacing="0"
|
|
80
|
-
role="presentation">
|
|
81
|
-
<tbody>
|
|
82
|
-
<tr>
|
|
83
|
-
<td>
|
|
84
|
-
<p
|
|
85
|
-
align="center"
|
|
86
|
-
style="font-size:1rem;line-height:1.5rem;margin-top:16px;margin-bottom:16px">
|
|
87
|
-
We were unable to verify your credentials and
|
|
88
|
-
complete the connection to the provider.
|
|
89
|
-
</p>
|
|
90
|
-
</td>
|
|
91
|
-
</tr>
|
|
92
|
-
</tbody>
|
|
93
|
-
</table>
|
|
94
|
-
<table
|
|
95
|
-
align="center"
|
|
96
|
-
width="100%"
|
|
97
|
-
border="0"
|
|
98
|
-
cellpadding="0"
|
|
99
|
-
cellspacing="0"
|
|
100
|
-
role="presentation">
|
|
101
|
-
<tbody>
|
|
102
|
-
<tr>
|
|
103
|
-
<td>
|
|
104
|
-
<p
|
|
105
|
-
align="center"
|
|
106
|
-
style="font-size:1rem;line-height:1.5rem;margin-top:16px;margin-bottom:16px">
|
|
107
|
-
This usually happens when some permissions
|
|
108
|
-
weren't granted in the previous connection
|
|
109
|
-
steps. Please ensure you approve all necessary
|
|
110
|
-
permissions when prompted.
|
|
111
|
-
</p>
|
|
112
|
-
</td>
|
|
113
|
-
</tr>
|
|
114
|
-
</tbody>
|
|
115
|
-
</table>
|
|
116
|
-
<table
|
|
117
|
-
align="center"
|
|
118
|
-
width="100%"
|
|
119
|
-
border="0"
|
|
120
|
-
cellpadding="0"
|
|
121
|
-
cellspacing="0"
|
|
122
|
-
role="presentation"
|
|
123
|
-
style="padding-top:0.5rem;padding-bottom:0.5rem">
|
|
124
|
-
<tbody>
|
|
125
|
-
<tr>
|
|
126
|
-
<td>
|
|
127
|
-
<a
|
|
128
|
-
href="/auth/connect?application=${application}&connectionId=${connectionId}"
|
|
129
|
-
style="color:rgb(255,255,255);background-color:rgb(36,111,121);font-size:1rem;line-height:1.75rem;text-align:center;font-weight:500;border-radius:0.25rem;padding-top:0.75rem;padding-bottom:0.75rem;width:100%;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;padding:12px 0px 12px 0px"
|
|
130
|
-
><span
|
|
131
|
-
><!--[if mso]><i style="mso-font-width:0%;mso-text-raise:24" hidden></i><![endif]--></span
|
|
132
|
-
><span
|
|
133
|
-
style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:12px"
|
|
134
|
-
>Try again</span
|
|
135
|
-
><span
|
|
136
|
-
><!--[if mso]><i style="mso-font-width:0%" hidden>​</i><![endif]--></span
|
|
137
|
-
></a
|
|
138
|
-
>
|
|
139
|
-
</td>
|
|
140
|
-
</tr>
|
|
141
|
-
</tbody>
|
|
142
|
-
</table>
|
|
143
|
-
<hr
|
|
144
|
-
style="margin-top:0.5rem;margin-bottom:0.5rem;width:100%;border:none;border-top:1px solid #eaeaea" />
|
|
145
|
-
<p
|
|
146
|
-
style="font-size:0.875rem;line-height:1.25rem;text-align:center;color:rgb(161,181,185);margin-top:16px;margin-bottom:16px">
|
|
147
|
-
Still having trouble?
|
|
148
|
-
<a
|
|
149
|
-
href="mailto:contact@getnoded.ai"
|
|
150
|
-
style="color:rgb(36,111,121);text-decoration-line:none"
|
|
151
|
-
target="_blank"
|
|
152
|
-
>Contact support</a
|
|
153
|
-
>.
|
|
154
|
-
</p>
|
|
155
|
-
</td>
|
|
156
|
-
</tr>
|
|
157
|
-
</tbody>
|
|
158
|
-
</table>
|
|
159
|
-
</td>
|
|
160
|
-
</tr>
|
|
161
|
-
</tbody>
|
|
162
|
-
</table>
|
|
163
|
-
<!--7--><!--/$-->
|
|
164
|
-
</body>
|
|
165
|
-
</html>`;
|
|
166
|
-
}
|
|
167
|
-
//# sourceMappingURL=html.js.map
|
package/dist/html.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html.js","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,sBAAsB,CAAC,WAAmB,EAAE,YAAoB;IAC/E,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EA8HsE,WAAW,qBAAqB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqClH,CAAC;AACT,CAAC"}
|