@dereekb/nestjs 13.0.0 → 13.0.2
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/index.cjs.default.js +1 -0
- package/index.cjs.js +136 -118
- package/index.cjs.mjs +2 -0
- package/index.esm.js +136 -118
- package/mailgun/index.cjs.default.js +1 -0
- package/mailgun/index.cjs.js +496 -503
- package/mailgun/index.cjs.mjs +2 -0
- package/mailgun/index.esm.js +496 -503
- package/mailgun/package.json +19 -20
- package/openai/index.cjs.default.js +1 -0
- package/openai/index.cjs.js +194 -161
- package/openai/index.cjs.mjs +2 -0
- package/openai/index.esm.js +194 -161
- package/openai/package.json +19 -20
- package/package.json +32 -55
- package/stripe/index.cjs.default.js +1 -0
- package/stripe/index.cjs.js +158 -128
- package/stripe/index.cjs.mjs +2 -0
- package/stripe/index.esm.js +158 -128
- package/stripe/package.json +19 -20
- package/typeform/index.cjs.default.js +1 -0
- package/typeform/index.cjs.js +257 -240
- package/typeform/index.cjs.mjs +2 -0
- package/typeform/index.esm.js +257 -240
- package/typeform/package.json +19 -20
- package/vapiai/index.cjs.default.js +1 -0
- package/vapiai/index.cjs.js +203 -190
- package/vapiai/index.cjs.mjs +2 -0
- package/vapiai/index.esm.js +203 -190
- package/vapiai/package.json +19 -20
package/openai/index.esm.js
CHANGED
|
@@ -11,32 +11,32 @@ import { ConfigService, ConfigModule } from '@nestjs/config';
|
|
|
11
11
|
* @returns
|
|
12
12
|
*/
|
|
13
13
|
function openAIWebhookEvent(event) {
|
|
14
|
-
|
|
14
|
+
return event;
|
|
15
15
|
}
|
|
16
|
-
const openaiEventHandlerFactory = handlerFactory(x => x.type);
|
|
16
|
+
const openaiEventHandlerFactory = handlerFactory((x) => x.type);
|
|
17
17
|
const openaiEventHandlerConfigurerFactory = handlerConfigurerFactory({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
configurerForAccessor: (accessor) => {
|
|
19
|
+
// eslint-disable-next-line
|
|
20
|
+
const fnWithKey = handlerMappedSetFunctionFactory(accessor, openAIWebhookEvent);
|
|
21
|
+
const configurer = {
|
|
22
|
+
...accessor,
|
|
23
|
+
handleBatchCancelled: fnWithKey('batch.cancelled'),
|
|
24
|
+
handleBatchCompleted: fnWithKey('batch.completed'),
|
|
25
|
+
handleBatchExpired: fnWithKey('batch.expired'),
|
|
26
|
+
handleBatchFailed: fnWithKey('batch.failed'),
|
|
27
|
+
handleEvalRunCanceled: fnWithKey('eval.run.canceled'),
|
|
28
|
+
handleEvalRunFailed: fnWithKey('eval.run.failed'),
|
|
29
|
+
handleEvalRunSucceeded: fnWithKey('eval.run.succeeded'),
|
|
30
|
+
handleFineTuningJobCancelled: fnWithKey('fine_tuning.job.cancelled'),
|
|
31
|
+
handleFineTuningJobFailed: fnWithKey('fine_tuning.job.failed'),
|
|
32
|
+
handleFineTuningJobSucceeded: fnWithKey('fine_tuning.job.succeeded'),
|
|
33
|
+
handleResponseCancelled: fnWithKey('response.cancelled'),
|
|
34
|
+
handleResponseCompleted: fnWithKey('response.completed'),
|
|
35
|
+
handleResponseFailed: fnWithKey('response.failed'),
|
|
36
|
+
handleResponseIncomplete: fnWithKey('response.incomplete')
|
|
37
|
+
};
|
|
38
|
+
return configurer;
|
|
39
|
+
}
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
const OPENAI_WEBHOOK_SECRET_TOKEN_ENV_VAR = 'OPENAI_WEBHOOK_SECRET_TOKEN';
|
|
@@ -44,12 +44,12 @@ const OPENAI_WEBHOOK_SECRET_TOKEN_ENV_VAR = 'OPENAI_WEBHOOK_SECRET_TOKEN';
|
|
|
44
44
|
* Configuration for OpenAIService
|
|
45
45
|
*/
|
|
46
46
|
class OpenAIWebhookServiceConfig {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
openaiWebhook;
|
|
48
|
+
static assertValidConfig(config) {
|
|
49
|
+
if (!config.openaiWebhook.webhookSecret) {
|
|
50
|
+
throw new Error('No OpenAI webhook secret specified.');
|
|
51
|
+
}
|
|
51
52
|
}
|
|
52
|
-
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/******************************************************************************
|
|
@@ -100,27 +100,33 @@ const OPENAI_PROJECT_ID_ENV_VAR = 'OPENAI_PROJECT_ID';
|
|
|
100
100
|
* Configuration for OpenAIService
|
|
101
101
|
*/
|
|
102
102
|
class OpenAIServiceConfig {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
openai;
|
|
104
|
+
static assertValidConfig(config) {
|
|
105
|
+
if (!config.openai.config.apiKey) {
|
|
106
|
+
throw new Error('No OpenAI API key specified.');
|
|
107
|
+
}
|
|
108
|
+
else if (!config.openai.config.organization) {
|
|
109
|
+
throw new Error('No OpenAI organization specified.');
|
|
110
|
+
}
|
|
111
|
+
else if (!config.openai.config.project) {
|
|
112
|
+
throw new Error('No OpenAI project specified.');
|
|
113
|
+
}
|
|
111
114
|
}
|
|
112
|
-
}
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
let OpenAIApi = class OpenAIApi {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
config;
|
|
119
|
+
openAIClient;
|
|
120
|
+
constructor(config) {
|
|
121
|
+
this.config = config;
|
|
122
|
+
this.openAIClient = new OpenAI(config.openai.config);
|
|
123
|
+
}
|
|
122
124
|
};
|
|
123
|
-
OpenAIApi = __decorate([
|
|
125
|
+
OpenAIApi = __decorate([
|
|
126
|
+
Injectable(),
|
|
127
|
+
__param(0, Inject(OpenAIServiceConfig)),
|
|
128
|
+
__metadata("design:paramtypes", [OpenAIServiceConfig])
|
|
129
|
+
], OpenAIApi);
|
|
124
130
|
|
|
125
131
|
/**
|
|
126
132
|
* Verifies a OpenAI webhook event header.
|
|
@@ -129,124 +135,150 @@ OpenAIApi = __decorate([Injectable(), __param(0, Inject(OpenAIServiceConfig)), _
|
|
|
129
135
|
* @returns A function that verifies a OpenAI webhook event.
|
|
130
136
|
*/
|
|
131
137
|
function openAIWebhookEventVerifier(config) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
138
|
+
const { secret, client } = config;
|
|
139
|
+
return async (request, rawBody) => {
|
|
140
|
+
const headers = request.headers;
|
|
141
|
+
const requestBodyString = String(request.body);
|
|
142
|
+
let event;
|
|
143
|
+
let valid = false;
|
|
144
|
+
try {
|
|
145
|
+
event = await client.webhooks.unwrap(requestBodyString, headers, secret);
|
|
146
|
+
valid = true;
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
if (e instanceof InvalidWebhookSignatureError) {
|
|
150
|
+
valid = false;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
throw e;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const result = {
|
|
157
|
+
valid,
|
|
158
|
+
event
|
|
159
|
+
};
|
|
160
|
+
return result;
|
|
154
161
|
};
|
|
155
|
-
return result;
|
|
156
|
-
};
|
|
157
162
|
}
|
|
158
163
|
|
|
159
164
|
/**
|
|
160
165
|
* Service that makes system changes based on OpenAI webhook events.
|
|
161
166
|
*/
|
|
162
167
|
let OpenAIWebhookService = class OpenAIWebhookService {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
client: openAiApi.openAIClient
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
async updateForWebhook(req, rawBody) {
|
|
177
|
-
const result = await this._verifier(req, rawBody);
|
|
178
|
-
if (!result.valid) {
|
|
179
|
-
this.logger.warn('Received invalid OpenAI event.', req);
|
|
180
|
-
} else {
|
|
181
|
-
await this.updateForOpenAIEvent(result.event);
|
|
168
|
+
logger = new Logger('OpenAIWebhookService');
|
|
169
|
+
_verifier;
|
|
170
|
+
handler = openaiEventHandlerFactory();
|
|
171
|
+
configure = openaiEventHandlerConfigurerFactory(this.handler);
|
|
172
|
+
constructor(openAiApi, openAIWebhookServiceConfig) {
|
|
173
|
+
const { webhookSecret } = openAIWebhookServiceConfig.openaiWebhook;
|
|
174
|
+
this._verifier = openAIWebhookEventVerifier({
|
|
175
|
+
secret: webhookSecret,
|
|
176
|
+
client: openAiApi.openAIClient
|
|
177
|
+
});
|
|
182
178
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
179
|
+
async updateForWebhook(req, rawBody) {
|
|
180
|
+
const result = await this._verifier(req, rawBody);
|
|
181
|
+
if (!result.valid) {
|
|
182
|
+
this.logger.warn('Received invalid OpenAI event.', req);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
await this.updateForOpenAIEvent(result.event);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
async updateForOpenAIEvent(event) {
|
|
189
|
+
const result = await this.handler(event);
|
|
190
|
+
if (!result) {
|
|
191
|
+
this.logger.warn('Received unexpected/unhandled OpenAI event.', event);
|
|
192
|
+
}
|
|
188
193
|
}
|
|
189
|
-
}
|
|
190
194
|
};
|
|
191
|
-
OpenAIWebhookService = __decorate([
|
|
195
|
+
OpenAIWebhookService = __decorate([
|
|
196
|
+
Injectable(),
|
|
197
|
+
__param(0, Inject(OpenAIApi)),
|
|
198
|
+
__param(1, Inject(OpenAIWebhookServiceConfig)),
|
|
199
|
+
__metadata("design:paramtypes", [OpenAIApi, OpenAIWebhookServiceConfig])
|
|
200
|
+
], OpenAIWebhookService);
|
|
192
201
|
|
|
193
202
|
let OpenAIWebhookController = class OpenAIWebhookController {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
203
|
+
_openaiWebhookService;
|
|
204
|
+
constructor(openaiWebhookService) {
|
|
205
|
+
this._openaiWebhookService = openaiWebhookService;
|
|
206
|
+
}
|
|
207
|
+
async handleOpenAIWebhook(req, rawBody) {
|
|
208
|
+
await this._openaiWebhookService.updateForWebhook(req, rawBody);
|
|
209
|
+
}
|
|
201
210
|
};
|
|
202
|
-
__decorate([
|
|
203
|
-
|
|
211
|
+
__decorate([
|
|
212
|
+
Post(),
|
|
213
|
+
__param(0, Req()),
|
|
214
|
+
__param(1, RawBody()),
|
|
215
|
+
__metadata("design:type", Function),
|
|
216
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
217
|
+
__metadata("design:returntype", Promise)
|
|
218
|
+
], OpenAIWebhookController.prototype, "handleOpenAIWebhook", null);
|
|
219
|
+
OpenAIWebhookController = __decorate([
|
|
220
|
+
Controller('/webhook/openai'),
|
|
221
|
+
__param(0, Inject(OpenAIWebhookService)),
|
|
222
|
+
__metadata("design:paramtypes", [OpenAIWebhookService])
|
|
223
|
+
], OpenAIWebhookController);
|
|
204
224
|
|
|
205
225
|
function openAIServiceConfigFactory(configService) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
226
|
+
const config = {
|
|
227
|
+
openai: {
|
|
228
|
+
config: {
|
|
229
|
+
apiKey: configService.get(OPENAI_API_KEY_ENV_VAR),
|
|
230
|
+
baseURL: configService.get(OPENAI_BASE_URL_ENV_VAR) ?? undefined,
|
|
231
|
+
organization: configService.get(OPENAI_ORGANIZATION_ID_ENV_VAR),
|
|
232
|
+
project: configService.get(OPENAI_PROJECT_ID_ENV_VAR)
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
OpenAIServiceConfig.assertValidConfig(config);
|
|
237
|
+
return config;
|
|
218
238
|
}
|
|
219
|
-
let OpenAIModule = class OpenAIModule {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
239
|
+
let OpenAIModule = class OpenAIModule {
|
|
240
|
+
};
|
|
241
|
+
OpenAIModule = __decorate([
|
|
242
|
+
Module({
|
|
243
|
+
imports: [ConfigModule],
|
|
244
|
+
providers: [
|
|
245
|
+
{
|
|
246
|
+
provide: OpenAIServiceConfig,
|
|
247
|
+
inject: [ConfigService],
|
|
248
|
+
useFactory: openAIServiceConfigFactory
|
|
249
|
+
},
|
|
250
|
+
OpenAIApi
|
|
251
|
+
],
|
|
252
|
+
exports: [OpenAIApi]
|
|
253
|
+
})
|
|
254
|
+
], OpenAIModule);
|
|
229
255
|
|
|
230
256
|
function openAIWebhookServiceConfigFactory(configService) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
257
|
+
const config = {
|
|
258
|
+
openaiWebhook: {
|
|
259
|
+
webhookSecret: configService.get(OPENAI_WEBHOOK_SECRET_TOKEN_ENV_VAR)
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
OpenAIWebhookServiceConfig.assertValidConfig(config);
|
|
263
|
+
return config;
|
|
238
264
|
}
|
|
239
|
-
let OpenAIWebhookModule = class OpenAIWebhookModule {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
265
|
+
let OpenAIWebhookModule = class OpenAIWebhookModule {
|
|
266
|
+
};
|
|
267
|
+
OpenAIWebhookModule = __decorate([
|
|
268
|
+
Module({
|
|
269
|
+
imports: [ConfigModule, OpenAIModule],
|
|
270
|
+
controllers: [OpenAIWebhookController],
|
|
271
|
+
providers: [
|
|
272
|
+
{
|
|
273
|
+
provide: OpenAIWebhookServiceConfig,
|
|
274
|
+
inject: [ConfigService],
|
|
275
|
+
useFactory: openAIWebhookServiceConfigFactory
|
|
276
|
+
},
|
|
277
|
+
OpenAIWebhookService
|
|
278
|
+
],
|
|
279
|
+
exports: [OpenAIWebhookService]
|
|
280
|
+
})
|
|
281
|
+
], OpenAIWebhookModule);
|
|
250
282
|
|
|
251
283
|
/**
|
|
252
284
|
* Returns true if the response has a json response.
|
|
@@ -255,7 +287,7 @@ OpenAIWebhookModule = __decorate([Module({
|
|
|
255
287
|
* @returns
|
|
256
288
|
*/
|
|
257
289
|
function isParsedOpenAIJsonResponseWithJson(response) {
|
|
258
|
-
|
|
290
|
+
return response.isJsonResponse && Boolean(response.jsonResponse) && Boolean(response.jsonResponseFieldMap);
|
|
259
291
|
}
|
|
260
292
|
/**
|
|
261
293
|
* Parses the OpenAI response into a ParsedOpenAIJsonResponse.
|
|
@@ -264,21 +296,22 @@ function isParsedOpenAIJsonResponseWithJson(response) {
|
|
|
264
296
|
* @returns The parsed OpenAI response.
|
|
265
297
|
*/
|
|
266
298
|
function parseOpenAIJsonResponse(response) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
299
|
+
const output_text = typeof response === 'string' ? response : response.output_text;
|
|
300
|
+
let jsonResponse = undefined;
|
|
301
|
+
let jsonResponseFieldMap = undefined;
|
|
302
|
+
try {
|
|
303
|
+
jsonResponse = JSON.parse(output_text);
|
|
304
|
+
jsonResponseFieldMap = openAIJsonResponseFieldsMap(jsonResponse);
|
|
305
|
+
}
|
|
306
|
+
catch (e) {
|
|
307
|
+
// ignore
|
|
308
|
+
}
|
|
309
|
+
return {
|
|
310
|
+
output_text,
|
|
311
|
+
isJsonResponse: Boolean(jsonResponse),
|
|
312
|
+
jsonResponse,
|
|
313
|
+
jsonResponseFieldMap
|
|
314
|
+
};
|
|
282
315
|
}
|
|
283
316
|
/**
|
|
284
317
|
* Creates a map of the OpenAI json response fields.
|
|
@@ -287,7 +320,7 @@ function parseOpenAIJsonResponse(response) {
|
|
|
287
320
|
* @returns The map of the OpenAI json response fields.
|
|
288
321
|
*/
|
|
289
322
|
function openAIJsonResponseFieldsMap(response) {
|
|
290
|
-
|
|
323
|
+
return new Map(response.fields.map((x) => [x.field_name, x.field_value]));
|
|
291
324
|
}
|
|
292
325
|
|
|
293
326
|
export { OPENAI_API_KEY_ENV_VAR, OPENAI_BASE_URL_ENV_VAR, OPENAI_ORGANIZATION_ID_ENV_VAR, OPENAI_PROJECT_ID_ENV_VAR, OPENAI_WEBHOOK_SECRET_TOKEN_ENV_VAR, OpenAIApi, OpenAIModule, OpenAIServiceConfig, OpenAIWebhookController, OpenAIWebhookModule, OpenAIWebhookService, OpenAIWebhookServiceConfig, isParsedOpenAIJsonResponseWithJson, openAIJsonResponseFieldsMap, openAIServiceConfigFactory, openAIWebhookEvent, openAIWebhookEventVerifier, openAIWebhookServiceConfigFactory, openaiEventHandlerConfigurerFactory, openaiEventHandlerFactory, parseOpenAIJsonResponse };
|
package/openai/package.json
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/nestjs/openai",
|
|
3
|
-
"version": "13.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"version": "13.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@dereekb/date": "13.0.2",
|
|
6
|
+
"@dereekb/model": "13.0.2",
|
|
7
|
+
"@dereekb/nestjs": "13.0.2",
|
|
8
|
+
"@dereekb/rxjs": "13.0.2",
|
|
9
|
+
"@dereekb/util": "13.0.2",
|
|
10
|
+
"@nestjs/common": "^11.0.0",
|
|
11
|
+
"@nestjs/config": "^4.0.0",
|
|
12
|
+
"express": "^5.0.0",
|
|
13
|
+
"openai": "^5.12.2"
|
|
14
|
+
},
|
|
7
15
|
"exports": {
|
|
16
|
+
"./package.json": "./package.json",
|
|
8
17
|
".": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"browser": {
|
|
14
|
-
"require": "./index.cjs.js",
|
|
15
|
-
"import": "./index.esm.js"
|
|
16
|
-
},
|
|
18
|
+
"module": "./index.esm.js",
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"import": "./index.cjs.mjs",
|
|
17
21
|
"default": "./index.cjs.js"
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"@dereekb/nestjs": "13.0.0",
|
|
24
|
-
"@dereekb/model": "13.0.0",
|
|
25
|
-
"@dereekb/rxjs": "13.0.0",
|
|
26
|
-
"core-js": "^3.0.0"
|
|
27
|
-
}
|
|
24
|
+
"module": "./index.esm.js",
|
|
25
|
+
"main": "./index.cjs.js",
|
|
26
|
+
"types": "./index.d.ts"
|
|
28
27
|
}
|
package/package.json
CHANGED
|
@@ -1,84 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/nestjs",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
4
4
|
"types": "./src/index.d.ts",
|
|
5
5
|
"module": "./index.esm.js",
|
|
6
6
|
"main": "./index.cjs.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./src/index.d.ts",
|
|
10
|
-
"node": {
|
|
11
|
-
"require": "./index.cjs.js"
|
|
12
|
-
},
|
|
13
|
-
"browser": {
|
|
14
|
-
"require": "./index.cjs.js",
|
|
15
|
-
"import": "./index.esm.js"
|
|
16
|
-
},
|
|
17
|
-
"default": "./index.cjs.js"
|
|
18
|
-
},
|
|
19
8
|
"./stripe": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
"browser": {
|
|
25
|
-
"require": "./stripe/index.cjs.js",
|
|
26
|
-
"import": "./stripe/index.esm.js"
|
|
27
|
-
},
|
|
9
|
+
"module": "./stripe/index.esm.js",
|
|
10
|
+
"types": "./stripe/index.d.ts",
|
|
11
|
+
"import": "./stripe/index.cjs.mjs",
|
|
28
12
|
"default": "./stripe/index.cjs.js"
|
|
29
13
|
},
|
|
30
14
|
"./mailgun": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
"browser": {
|
|
36
|
-
"require": "./mailgun/index.cjs.js",
|
|
37
|
-
"import": "./mailgun/index.esm.js"
|
|
38
|
-
},
|
|
15
|
+
"module": "./mailgun/index.esm.js",
|
|
16
|
+
"types": "./mailgun/index.d.ts",
|
|
17
|
+
"import": "./mailgun/index.cjs.mjs",
|
|
39
18
|
"default": "./mailgun/index.cjs.js"
|
|
40
19
|
},
|
|
41
20
|
"./vapiai": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
"browser": {
|
|
47
|
-
"require": "./vapiai/index.cjs.js",
|
|
48
|
-
"import": "./vapiai/index.esm.js"
|
|
49
|
-
},
|
|
21
|
+
"module": "./vapiai/index.esm.js",
|
|
22
|
+
"types": "./vapiai/index.d.ts",
|
|
23
|
+
"import": "./vapiai/index.cjs.mjs",
|
|
50
24
|
"default": "./vapiai/index.cjs.js"
|
|
51
25
|
},
|
|
52
26
|
"./openai": {
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
"browser": {
|
|
58
|
-
"require": "./openai/index.cjs.js",
|
|
59
|
-
"import": "./openai/index.esm.js"
|
|
60
|
-
},
|
|
27
|
+
"module": "./openai/index.esm.js",
|
|
28
|
+
"types": "./openai/index.d.ts",
|
|
29
|
+
"import": "./openai/index.cjs.mjs",
|
|
61
30
|
"default": "./openai/index.cjs.js"
|
|
62
31
|
},
|
|
63
32
|
"./typeform": {
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
"browser": {
|
|
69
|
-
"require": "./typeform/index.cjs.js",
|
|
70
|
-
"import": "./typeform/index.esm.js"
|
|
71
|
-
},
|
|
33
|
+
"module": "./typeform/index.esm.js",
|
|
34
|
+
"types": "./typeform/index.d.ts",
|
|
35
|
+
"import": "./typeform/index.cjs.mjs",
|
|
72
36
|
"default": "./typeform/index.cjs.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
".": {
|
|
40
|
+
"module": "./index.esm.js",
|
|
41
|
+
"types": "./index.d.ts",
|
|
42
|
+
"import": "./index.cjs.mjs",
|
|
43
|
+
"default": "./index.cjs.js"
|
|
73
44
|
}
|
|
74
45
|
},
|
|
75
46
|
"peerDependencies": {
|
|
47
|
+
"@dereekb/util": "13.0.2",
|
|
76
48
|
"@nestjs/common": "^11.0.0",
|
|
49
|
+
"@nestjs/config": "^4.0.0",
|
|
50
|
+
"@typeform/api-client": "^2.5.1",
|
|
51
|
+
"@vapi-ai/server-sdk": "^0.11.0",
|
|
52
|
+
"body-parser": "^2.0.0",
|
|
77
53
|
"express": "^5.0.0",
|
|
54
|
+
"form-data": "^4.0.0",
|
|
55
|
+
"mailgun.js": "^12.0.0",
|
|
56
|
+
"openai": "^5.12.2",
|
|
78
57
|
"raw-body": "^3.0.0",
|
|
79
|
-
"
|
|
80
|
-
"@nestjs/config": "^4.0.0",
|
|
81
|
-
"@dereekb/util": "13.0.0"
|
|
58
|
+
"stripe": "^9.1.0"
|
|
82
59
|
},
|
|
83
60
|
"dependencies": {}
|
|
84
61
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./index.cjs.js').default;
|