@bigfootai/sdk 0.1.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 +96 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +259 -0
- package/dist/index.js.map +1 -0
- package/package.json +25 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { 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 UpsertTableProviderRequest } from '@bigfootai/bigfoot-types';
|
|
2
|
+
import type { Transcription, TranscriptionFilter } from '@bigfootai/bigfoot-types/dist/types.js';
|
|
3
|
+
import { type Express } from 'express';
|
|
4
|
+
interface AuthMethods {
|
|
5
|
+
/**
|
|
6
|
+
* Get the authentication URL for authenticating with the provider.
|
|
7
|
+
*
|
|
8
|
+
* @returns The URL to redirect the user to for authentication.
|
|
9
|
+
*/
|
|
10
|
+
connect(application: string, connectionId: string): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Refresh the credentials for the connected provider.
|
|
13
|
+
*
|
|
14
|
+
* @param connectedProvider The connected provider to refresh the credentials for.
|
|
15
|
+
*/
|
|
16
|
+
refresh(connectedProvider: ConnectedProvider): Promise<Credential>;
|
|
17
|
+
}
|
|
18
|
+
interface LinkMethods {
|
|
19
|
+
/**
|
|
20
|
+
* TODO: application should be an enum
|
|
21
|
+
*
|
|
22
|
+
* This is the endpoint for getting document information from the integration. This will be called if the provider
|
|
23
|
+
* manifest indicates that the integration supports documents. This is also used for links to documents - basically
|
|
24
|
+
* - whenever the platform needs to invoke the document application, this is the endpoint that's used. The structure
|
|
25
|
+
* of the endpoint is {app}/link for the app that has link subscriptions.
|
|
26
|
+
*
|
|
27
|
+
* @param credential The credentials to use to authenticate with the provider.
|
|
28
|
+
* @param application The application to get the document information from.
|
|
29
|
+
* @param request The request to get the document information.
|
|
30
|
+
*/
|
|
31
|
+
link(credential: Credential, application: string, request: LinkSubscriptionProviderRequest): Promise<BusinessObjectIngestionResponse>;
|
|
32
|
+
}
|
|
33
|
+
interface SyncMethods {
|
|
34
|
+
/**
|
|
35
|
+
* Get calendar information from the provider.
|
|
36
|
+
*
|
|
37
|
+
* @param credentials The credentials to use to authenticate with the provider.
|
|
38
|
+
* @param request The request to get the calendar information.
|
|
39
|
+
*/
|
|
40
|
+
calendar(credentials: Credential, request: SyncCalendarProviderRequest): Promise<Calendar | null>;
|
|
41
|
+
/**
|
|
42
|
+
* Get all table metadata from the provider.
|
|
43
|
+
*
|
|
44
|
+
* @param credential The credentials to use to authenticate with the provider.
|
|
45
|
+
* @param request The request to get the table metadata.
|
|
46
|
+
*
|
|
47
|
+
* @return The tables that match the request.
|
|
48
|
+
*/
|
|
49
|
+
metadata(credential: Credential, request: SyncTableMetadataProviderRequest): Promise<Table[]>;
|
|
50
|
+
/**
|
|
51
|
+
* TODO: What's the difference between this and the metadata method?
|
|
52
|
+
*
|
|
53
|
+
* @param credential The credentials to use to authenticate with the provider.
|
|
54
|
+
* @param request TODO
|
|
55
|
+
*/
|
|
56
|
+
table(credential: Credential, request: SyncTableProviderRequest): Promise<Table[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Get the transcriptions from the provider.
|
|
59
|
+
*
|
|
60
|
+
* @param credential The credentials to use to authenticate with the provider.
|
|
61
|
+
* @param transcriptionFilter The filter to apply to the transcriptions
|
|
62
|
+
* @param onTranscription The callback to call for each transcription.
|
|
63
|
+
*/
|
|
64
|
+
transcriptions(credential: Credential, transcriptionFilter: TranscriptionFilter, onTranscription: (transcription: Transcription) => Promise<void>): Promise<void>;
|
|
65
|
+
}
|
|
66
|
+
interface UpsertMethods {
|
|
67
|
+
/**
|
|
68
|
+
* Upsert data into a table in the provider.
|
|
69
|
+
*
|
|
70
|
+
* @param credential The credentials to use to authenticate with the provider.
|
|
71
|
+
* @param request The request to upsert the data.
|
|
72
|
+
*/
|
|
73
|
+
table(credential: Credential, request: UpsertTableProviderRequest): Promise<Table>;
|
|
74
|
+
}
|
|
75
|
+
interface TagMethods {
|
|
76
|
+
/**
|
|
77
|
+
* Get tag references from the provider.
|
|
78
|
+
*
|
|
79
|
+
* @param credential The credentials to use to authenticate with the provider.
|
|
80
|
+
* @param request The request to get the tag references.
|
|
81
|
+
*
|
|
82
|
+
* @return The tags that match the request.
|
|
83
|
+
*/
|
|
84
|
+
tag(credential: Credential, request: ExternalTagReferenceRequest): Promise<Tag[]>;
|
|
85
|
+
}
|
|
86
|
+
interface StartServerOptions {
|
|
87
|
+
auth?: Partial<AuthMethods>;
|
|
88
|
+
link?: Partial<LinkMethods>;
|
|
89
|
+
sync?: Partial<SyncMethods>;
|
|
90
|
+
tag?: Partial<TagMethods>;
|
|
91
|
+
upsert?: Partial<UpsertMethods>;
|
|
92
|
+
}
|
|
93
|
+
export declare function startServer(options: StartServerOptions): Promise<Express>;
|
|
94
|
+
export declare const sendCredentialsToBigfoot: (providerRegistration: ConnectedProviderRegistration) => Promise<void>;
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,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,EAC7B,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,0BAA0B,EAC/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAGX,aAAa,EACb,mBAAmB,EACnB,MAAM,wCAAwC,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AG,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;CAClF;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,CA0R/E;AAED,eAAO,MAAM,wBAAwB,yBAAgC,6BAA6B,kBAWjG,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { ProcessingStage, } from '@bigfootai/bigfoot-types';
|
|
2
|
+
import bodyParser from 'body-parser';
|
|
3
|
+
import express from 'express';
|
|
4
|
+
export async function startServer(options) {
|
|
5
|
+
const app = express();
|
|
6
|
+
const port = process.env.PORT || 5000;
|
|
7
|
+
app.use(express.json());
|
|
8
|
+
app.use(bodyParser.urlencoded({
|
|
9
|
+
extended: true,
|
|
10
|
+
}));
|
|
11
|
+
app.get('/api/v1/hello', (req, res) => {
|
|
12
|
+
res.send('You look nice today :)');
|
|
13
|
+
});
|
|
14
|
+
app.get('/auth/connect', async (req, res) => {
|
|
15
|
+
const application = req.query.application;
|
|
16
|
+
const connectionId = req.query.connectionId;
|
|
17
|
+
if (application == null || application.length === 0) {
|
|
18
|
+
res.sendStatus(400);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
res.redirect(await options.auth.connect(application, connectionId));
|
|
22
|
+
});
|
|
23
|
+
app.post('/auth/refresh', async (req, res) => {
|
|
24
|
+
if (!req.body) {
|
|
25
|
+
res.send(400);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const body = req.body;
|
|
29
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
30
|
+
console.error('A body.credential must be provided in the request');
|
|
31
|
+
res.send(400);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
res.send(await options.auth.refresh(body.connectedProvider));
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
console.error(error);
|
|
40
|
+
res.send(400);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
app.post('/:application/link', async (req, res) => {
|
|
45
|
+
if (!req.body) {
|
|
46
|
+
res.send(400);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const body = req.body;
|
|
50
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
51
|
+
res.status(400).send({ message: 'A body.credential must be provided in the request' });
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (!body.url) {
|
|
55
|
+
res.status(400).send({ message: 'A body.url must be provided in the request' });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const application = req.params.application;
|
|
59
|
+
if (application == null || application.length === 0) {
|
|
60
|
+
res.status(400).send({ message: 'A body.application must be provided in the request' });
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
res.send(await options.link.link(body.connectedProvider.credential, application, body));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.error(error);
|
|
69
|
+
res.send({
|
|
70
|
+
businessObject: null,
|
|
71
|
+
callbackId: body.callbackId,
|
|
72
|
+
processingStage: ProcessingStage.Failed,
|
|
73
|
+
processingReason: error.message,
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
app.post('/sync/calendar', async (req, res) => {
|
|
79
|
+
if (!req.body) {
|
|
80
|
+
res.send(400);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const body = req.body;
|
|
84
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
85
|
+
res.send(400).send({ message: 'A body.credential must be provided in the request' });
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (!body.calendarFilter) {
|
|
89
|
+
res.status(400).send({ message: 'A body.calendarFilter must be provided in the request' });
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
res.send(await options.sync.calendar(body.connectedProvider.credential, body));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error(error);
|
|
98
|
+
res.send(400);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
app.post('/sync/metadata', async (req, res) => {
|
|
103
|
+
if (!req.body) {
|
|
104
|
+
res.send(400);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const body = req.body;
|
|
108
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
109
|
+
res.send(400).send({
|
|
110
|
+
message: 'A body.credential must be provided in the request',
|
|
111
|
+
});
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (body.tableMetadata == null || body.tableMetadata.length === 0) {
|
|
115
|
+
res.status(400).send({
|
|
116
|
+
message: 'A body.tableMetadata must be provided in the request',
|
|
117
|
+
});
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
res.send(await options.sync.metadata(body.connectedProvider.credential, body));
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
console.error(error);
|
|
126
|
+
res.send(400);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
app.post('/sync/table', async (req, res) => {
|
|
131
|
+
if (!req.body) {
|
|
132
|
+
res.send(400);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const body = req.body;
|
|
136
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
137
|
+
res.send(400).send({
|
|
138
|
+
message: 'A body.credential must be provided in the request',
|
|
139
|
+
});
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (body.recordFilter == null) {
|
|
143
|
+
res.status(400).send({
|
|
144
|
+
message: 'A body.recordFilter must be provided in the request',
|
|
145
|
+
});
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
try {
|
|
149
|
+
res.send(await options.sync.table(body.connectedProvider.credential, body));
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
console.error(error);
|
|
154
|
+
res.send(400);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
app.post('/sync/transcription', async (req, res) => {
|
|
159
|
+
if (!req.body) {
|
|
160
|
+
res.send(400);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const body = req.body;
|
|
164
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
165
|
+
console.error('A body.connectedProvider.credential must be provided in the request');
|
|
166
|
+
res.send(400);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (!body.transcriptionFilter) {
|
|
170
|
+
console.error('A body.transcriptionFilter must be provided in the request');
|
|
171
|
+
res.send(400);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
try {
|
|
175
|
+
await options.sync.transcriptions(body.connectedProvider.credential, body.transcriptionFilter, async (transcription) => {
|
|
176
|
+
console.log('Processing transcription:', transcription);
|
|
177
|
+
});
|
|
178
|
+
res.send(200);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
console.error(error);
|
|
183
|
+
res.send(400);
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
app.post('/tag', async (req, res) => {
|
|
188
|
+
if (!req.body) {
|
|
189
|
+
res.status(400).send({ message: 'A body must be provided in the request' });
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const body = req.body;
|
|
193
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
194
|
+
res.status(400).send({
|
|
195
|
+
message: 'A body.credential must be provided in the request',
|
|
196
|
+
});
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (body.connectedProvider.credential.instanceUrl == null ||
|
|
200
|
+
body.connectedProvider.credential.instanceUrl.trim().length === 0) {
|
|
201
|
+
res.status(400).send({ message: 'A body.credential.instanceUrl must be provided in the request' });
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
try {
|
|
205
|
+
res.send(await options.tag.tag(body.connectedProvider.credential, body));
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
res.status(400).send({ message: error.message });
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
app.post('/upsert/table', async (req, res) => {
|
|
214
|
+
if (!req.body) {
|
|
215
|
+
res.status(400).send({ message: 'A body must be provided in the request' });
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const body = req.body;
|
|
219
|
+
if (!body.connectedProvider || !body.connectedProvider.credential) {
|
|
220
|
+
res.status(400).send({
|
|
221
|
+
message: 'A body.credential must be provided in the request',
|
|
222
|
+
});
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (body.connectedProvider.credential.instanceUrl == null ||
|
|
226
|
+
body.connectedProvider.credential.instanceUrl.trim().length === 0) {
|
|
227
|
+
res.status(400).send({ message: 'A body.credential.instanceUrl must be provided in the request' });
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (!body.table) {
|
|
231
|
+
res.status(400).send({ message: 'A body.table must be provided in the request' });
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
try {
|
|
235
|
+
res.send(await options.upsert.table(body.connectedProvider.credential, body));
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
res.status(400).send({ message: error.message });
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
app.listen(port, () => {
|
|
243
|
+
console.log(`Provider listening on port ${port}`);
|
|
244
|
+
});
|
|
245
|
+
return app;
|
|
246
|
+
}
|
|
247
|
+
export const sendCredentialsToBigfoot = async (providerRegistration) => {
|
|
248
|
+
// Now that we have the provider registration, we send it back to Bigfoot to keep for us
|
|
249
|
+
const response = await fetch(`${process.env.BIGFOOT_ENVIRONMENT_URL}/api/v1/provider/credentials`, {
|
|
250
|
+
method: 'POST',
|
|
251
|
+
body: JSON.stringify(providerRegistration),
|
|
252
|
+
headers: {
|
|
253
|
+
'Content-Type': 'application/json',
|
|
254
|
+
apiKey: process.env.BIGFOOT_API_KEY,
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
console.log(await response.json());
|
|
258
|
+
};
|
|
259
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQN,eAAe,GAOf,MAAM,0BAA0B,CAAC;AAOlC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,OAAsD,MAAM,SAAS,CAAC;AA6G7E,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,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACxB,GAAG,CAAC,GAAG,CACN,UAAU,CAAC,UAAU,CAAC;QACrB,QAAQ,EAAE,IAAI;KACd,CAAC,CACF,CAAC;IAEF,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,CA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AC,GAAG,CAAC,uBAAuB,8BAA8B,EAAE;QAClG,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;QAC1C,OAAO,EAAE;YACR,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;SACnC;KACD,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bigfootai/sdk",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist",
|
|
7
|
+
"LICENSE",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@bigfootai/bigfoot-types": "^5.4.67",
|
|
13
|
+
"body-parser": "^2.1.0",
|
|
14
|
+
"express": "^5.0.1"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/body-parser": "^1.19.5",
|
|
18
|
+
"@types/express": "^5.0.0",
|
|
19
|
+
"typescript": "^5.7.3"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc"
|
|
23
|
+
},
|
|
24
|
+
"types": "dist/index.d.ts"
|
|
25
|
+
}
|