@servicelabsco/slabs-access-manager 0.1.137 → 0.1.138
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/access/dtos/get.nsql.response.dto.d.ts +1 -1
- package/dist/access/dtos/get.nsql.response.dto.js +1 -1
- package/dist/access/dtos/get.nsql.response.dto.js.map +1 -1
- package/dist/access/es6.classes.d.ts +1 -2
- package/dist/access/services/gpt.service.d.ts +2 -2
- package/dist/access/services/gpt.service.js +30 -5
- package/dist/access/services/gpt.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ __decorate([
|
|
|
20
20
|
(0, class_validator_1.IsString)(),
|
|
21
21
|
(0, class_validator_1.IsNotEmpty)(),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
|
-
], GetNsqlResponseDto.prototype, "
|
|
23
|
+
], GetNsqlResponseDto.prototype, "query", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, class_transformer_1.Expose)(),
|
|
26
26
|
(0, class_validator_1.IsString)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.nsql.response.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/get.nsql.response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA8E;AAE9E,MAAa,kBAAkB;CAoB9B;AApBD,gDAoBC;AAhBG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;
|
|
1
|
+
{"version":3,"file":"get.nsql.response.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/get.nsql.response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA8E;AAE9E,MAAa,kBAAkB;CAoB9B;AApBD,gDAoBC;AAhBG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACC;AAKd;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACI;AAKjB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACC;AAKd;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;2DACc"}
|
|
@@ -47,7 +47,6 @@ import { DbFindDto } from './dtos/db.find.dto';
|
|
|
47
47
|
import { EditQueryDto } from './dtos/edit.query.dto';
|
|
48
48
|
import { FcmTemplateAttributesDto } from './dtos/fcm.template.attributes.dto';
|
|
49
49
|
import { GchatPostingPayloadDto } from './dtos/gchat.posting.payload.dto';
|
|
50
|
-
import { GetNsqlResponseDto } from './dtos/get.nsql.response.dto';
|
|
51
50
|
import { GetScriptValuesDto } from './dtos/get.script.values.dto';
|
|
52
51
|
import { ListResponseDto } from './dtos/list.response.dto';
|
|
53
52
|
import { ListResponseFormatDto } from './dtos/list.response.format.dto';
|
|
@@ -328,7 +327,7 @@ import { WhatsappTemplateSubscriber } from './subscribers/whatsapp.template.subs
|
|
|
328
327
|
declare const es6Classes: {
|
|
329
328
|
commands: (typeof WebhookPollCommand)[];
|
|
330
329
|
controllers: (typeof AccessMenuController | typeof ApiAccountController | typeof BulkUploadController | typeof BulkUploadItemController | typeof BusinessAppIntegrationController | typeof BusinessPreferenceController | typeof BusinessUserGroupController | typeof ChoiceListController | typeof ChoiceTypeController | typeof CommonWebhookController | typeof CustomFieldController | typeof DashboardBuilderController | typeof DashboardComponentController | typeof DashboardController | typeof DashboardReportController | typeof DeveloperModeController | typeof DownloadLogController | typeof FcmTokenController | typeof GroupMemberController | typeof GroupRoleController | typeof ListingController | typeof ListingPreferenceController | typeof ScheduledReportController | typeof ScheduledReportItemController | typeof TagController | typeof UserNotificationController | typeof UserPreferenceController)[];
|
|
331
|
-
dtos: (typeof FcmTemplateAttributesDto | typeof NotificationPayloadDto | typeof SendEmailNotificationDataDto | typeof GchatPostingPayloadDto | typeof AddShortUrlDto | typeof BankAccountPayloadDto | typeof RecurringDefinitionDto | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof DbFindDto | typeof ListResponseDto | typeof AddListingPreferenceDto | typeof ProcessCommonListConfigDto | typeof AddBusinessAppIntegrationDto | typeof AddBusinessPreferenceDto | typeof ModifyCustomFieldStatusDto | typeof GetScriptValuesDto | typeof AddDashboardComponentPropertiesDto | typeof AddDashboardComponentDto | typeof StringSearchDto | typeof EditQueryDto | typeof TokenPayloadDto | typeof AddGroupMemberDto | typeof AddRoleDto | typeof AddScheduledReportDto | typeof AddConversationDto | typeof AddTagDto | typeof BusinessAppIntegrationMessagePayloadDto | typeof
|
|
330
|
+
dtos: (typeof FcmTemplateAttributesDto | typeof NotificationPayloadDto | typeof SendEmailNotificationDataDto | typeof GchatPostingPayloadDto | typeof AddShortUrlDto | typeof BankAccountPayloadDto | typeof RecurringDefinitionDto | typeof AccessBusinessParamDto | typeof DateRangeFilterDto | typeof DateFilterDto | typeof ListResponseFormatDto | typeof NumberRangeFilterDto | typeof CommonListFilterDto | typeof DbFindDto | typeof ListResponseDto | typeof AddListingPreferenceDto | typeof ProcessCommonListConfigDto | typeof AddBusinessAppIntegrationDto | typeof AddBusinessPreferenceDto | typeof ModifyCustomFieldStatusDto | typeof GetScriptValuesDto | typeof AddDashboardComponentPropertiesDto | typeof AddDashboardComponentDto | typeof StringSearchDto | typeof EditQueryDto | typeof TokenPayloadDto | typeof AddGroupMemberDto | typeof AddRoleDto | typeof AddScheduledReportDto | typeof AddConversationDto | typeof AddTagDto | typeof BusinessAppIntegrationMessagePayloadDto | typeof ProcessListingPayloadDto | typeof ServerEmailRecipientsDto | typeof ServerEmailMessageDto | typeof SlackMessageDataDto)[];
|
|
332
331
|
entities: (typeof AccessBusinessEntity | typeof BusinessUserEntity | typeof ProductEntity | typeof GchatUserEntity | typeof GchatMessageEntity | typeof GchatWebhookMessageEntity | typeof SlackIntegrationEntity | typeof SlackMessageEntity | typeof SlackUserEntity | typeof WhatsappMessageEntity | typeof WhatsappPreferenceEntity | typeof FcmMessageEntity | typeof FcmTokenEntity | typeof BusinessAppIntegrationCredentialEntity | typeof BusinessAppIntegrationMessagesEntity | typeof BusinessEmailEntity | typeof BusinessGroupRoleEntity | typeof GroupRoleEntity | typeof BusinessUserRoleEntity | typeof MenuRoleEntity | typeof MenuEntity | typeof UiActionRoleEntity | typeof MenuActionEntity | typeof ChildMenuEntity | typeof ConversationEntity | typeof DashboardComponentEntity | typeof DownloadLogEntity | typeof EmailRecipientEntity | typeof EmailMessageEntity | typeof GroupMemberEntity | typeof PreferenceUserEntity | typeof PreferenceUserGroupEntity | typeof ModuleMenuEntity | typeof ScheduledReportEntity | typeof ScheduledReportEmailEntity | typeof ScheduledReportItemEntity | typeof SlackWebhookMessageEntity | typeof UserNotificationEntity | typeof UserRoleEntity | typeof WatchlistAssignmentEntity | typeof WebhookSlugEntity)[];
|
|
333
332
|
enums: (typeof NotificationTypeEnum | typeof RecurringPeriodEnum | typeof CustomColumnTypeEnum | typeof PlatformTypeEnum)[];
|
|
334
333
|
jobs: (typeof AccessTestJob | typeof ApiAccountJob | typeof AppIntegrationJob | typeof BusinessAppIntegrationCredentialJob | typeof BusinessAppIntegrationJob | typeof BusinessAppIntegrationMessagesJob | typeof BusinessEmailJob | typeof BusinessGroupRoleJob | typeof BusinessPreferenceJob | typeof BusinessUserGroupJob | typeof BusinessUserJob | typeof BusinessUserRoleJob | typeof ChildMenuJob | typeof ChoiceListJob | typeof ChoiceTypeJob | typeof ConversationJob | typeof CustomFieldJob | typeof CustomReportJob | typeof DashboardComponentJob | typeof DashboardJob | typeof DownloadLogJob | typeof EmailAttachmentJob | typeof EmailMessageJob | typeof EmailRecipientJob | typeof FcmMessageJob | typeof FcmNotificationJob | typeof FcmTemplateJob | typeof FcmTokenJob | typeof GchatIncomingWebhookJob | typeof GchatMessageJob | typeof GchatTemplateJob | typeof GchatUserJob | typeof GchatWebhookJob | typeof GchatWebhookMessageJob | typeof GroupMemberJob | typeof GroupRoleJob | typeof ListPreferenceJob | typeof ListingColumnJob | typeof ListingPageJob | typeof ListingPreferenceJob | typeof MenuActionJob | typeof MenuJob | typeof MenuRoleJob | typeof ModuleJob | typeof ModuleMenuJob | typeof PreferenceUserGroupJob | typeof PreferenceUsersJob | typeof ProcessServerEmailJob | typeof ProductJob | typeof RoleGroupJob | typeof ScheduledReportEmailJob | typeof ScheduledReportItemJob | typeof ScheduledReportJob | typeof SlackIncomingWebhookJob | typeof SlackIntegrationJob | typeof SlackMessageJob | typeof SlackTemplateJob | typeof SlackUserJob | typeof SlackWebhookJob | typeof SlackWebhookMessageJob | typeof SyncBURoleJob | typeof UiActionJob | typeof UiActionRoleJob | typeof UserNotificationJob | typeof UserPreferenceJob | typeof UserRoleJob | typeof WatchlistAssignmentJob | typeof WebhookSlugJob | typeof WebhookTypeJob | typeof WhatsappIncomingWebhookJob | typeof WhatsappMessageJob | typeof WhatsappTemplateJob)[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropertyService, SqlService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
-
import { LambdaService } from '
|
|
2
|
+
import { LambdaService } from '../../accessUtility/services/lambda.service';
|
|
3
3
|
import { GetNsqlResponseDto } from '../dtos/get.nsql.response.dto';
|
|
4
4
|
export declare class GptService {
|
|
5
5
|
private readonly lambdaService;
|
|
6
6
|
private readonly propertyService;
|
|
7
7
|
private readonly sqlService;
|
|
8
8
|
constructor(lambdaService: LambdaService, propertyService: PropertyService, sqlService: SqlService);
|
|
9
|
-
getNsqlGptResponse(nsql: GetNsqlResponseDto): Promise<any>;
|
|
9
|
+
getNsqlGptResponse(nsql: GetNsqlResponseDto, business_id?: number): Promise<any>;
|
|
10
10
|
}
|
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.GptService = void 0;
|
|
4
|
-
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
|
+
const lambda_service_1 = require("../../accessUtility/services/lambda.service");
|
|
16
|
+
let GptService = class GptService {
|
|
5
17
|
constructor(lambdaService, propertyService, sqlService) {
|
|
6
18
|
this.lambdaService = lambdaService;
|
|
7
19
|
this.propertyService = propertyService;
|
|
8
20
|
this.sqlService = sqlService;
|
|
9
21
|
}
|
|
10
|
-
async getNsqlGptResponse(nsql) {
|
|
22
|
+
async getNsqlGptResponse(nsql, business_id) {
|
|
11
23
|
const functionName = await this.propertyService.get('nsql.lambda.function.name', 'nsql');
|
|
12
|
-
const response = await this.lambdaService.getResponseFromLambda(functionName, {
|
|
13
|
-
|
|
24
|
+
const response = await this.lambdaService.getResponseFromLambda(functionName, {
|
|
25
|
+
require_dataset: false,
|
|
26
|
+
mode: 'gpt',
|
|
27
|
+
...nsql,
|
|
28
|
+
business_id,
|
|
29
|
+
});
|
|
30
|
+
if (!response?.body?.sql)
|
|
31
|
+
throw new nestjs_utility_services_1.OperationException('Error Getting The Sql');
|
|
32
|
+
return this.sqlService.read(response?.body?.sql);
|
|
14
33
|
}
|
|
15
|
-
}
|
|
34
|
+
};
|
|
16
35
|
exports.GptService = GptService;
|
|
36
|
+
exports.GptService = GptService = __decorate([
|
|
37
|
+
(0, common_1.Injectable)(),
|
|
38
|
+
__metadata("design:paramtypes", [lambda_service_1.LambdaService,
|
|
39
|
+
nestjs_utility_services_1.PropertyService,
|
|
40
|
+
nestjs_utility_services_1.SqlService])
|
|
41
|
+
], GptService);
|
|
17
42
|
//# sourceMappingURL=gpt.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpt.service.js","sourceRoot":"","sources":["../../../src/access/services/gpt.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gpt.service.js","sourceRoot":"","sources":["../../../src/access/services/gpt.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAyG;AACzG,gFAA4E;AAIrE,IAAM,UAAU,GAAhB,MAAM,UAAU;IACnB,YACqB,aAA4B,EAC5B,eAAgC,EAChC,UAAsB;QAFtB,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,eAAU,GAAV,UAAU,CAAY;IACxC,CAAC;IAEG,KAAK,CAAC,kBAAkB,CAAC,IAAwB,EAAE,WAAoB;QAC1E,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;QAEzF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,YAAY,EAAE;YAC1E,eAAe,EAAE,KAAK;YACtB,IAAI,EAAE,KAAK;YACX,GAAG,IAAI;YACP,WAAW;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG;YAAE,MAAM,IAAI,4CAAkB,CAAC,uBAAuB,CAAC,CAAC;QAEhF,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;IACrD,CAAC;CACJ,CAAA;AArBY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;qCAG2B,8BAAa;QACX,yCAAe;QACpB,oCAAU;GAJlC,UAAU,CAqBtB"}
|
package/package.json
CHANGED