common-tg-service 1.1.8 → 1.1.9
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.
Potentially problematic release.
This version of common-tg-service might be problematic. Click here for more details.
- package/dist/app.module.js +2 -0
- package/dist/app.module.js.map +1 -1
- package/dist/components/dynamic-data/dto/create-dynamic-data.dto.d.ts +4 -0
- package/dist/components/dynamic-data/dto/create-dynamic-data.dto.js +44 -0
- package/dist/components/dynamic-data/dto/create-dynamic-data.dto.js.map +1 -0
- package/dist/components/dynamic-data/dto/get-dynamic-data.dto.d.ts +3 -0
- package/dist/components/dynamic-data/dto/get-dynamic-data.dto.js +31 -0
- package/dist/components/dynamic-data/dto/get-dynamic-data.dto.js.map +1 -0
- package/dist/components/dynamic-data/dto/update-dynamic-data.dto.d.ts +16 -0
- package/dist/components/dynamic-data/dto/update-dynamic-data.dto.js +74 -0
- package/dist/components/dynamic-data/dto/update-dynamic-data.dto.js.map +1 -0
- package/dist/components/dynamic-data/dynamic-data.controller.d.ts +12 -0
- package/dist/components/dynamic-data/dynamic-data.controller.js +107 -0
- package/dist/components/dynamic-data/dynamic-data.controller.js.map +1 -0
- package/dist/components/dynamic-data/dynamic-data.module.d.ts +2 -0
- package/dist/components/dynamic-data/dynamic-data.module.js +30 -0
- package/dist/components/dynamic-data/dynamic-data.module.js.map +1 -0
- package/dist/components/dynamic-data/dynamic-data.schema.d.ts +15 -0
- package/dist/components/dynamic-data/dynamic-data.schema.js +42 -0
- package/dist/components/dynamic-data/dynamic-data.schema.js.map +1 -0
- package/dist/components/dynamic-data/dynamic-data.service.d.ts +15 -0
- package/dist/components/dynamic-data/dynamic-data.service.js +208 -0
- package/dist/components/dynamic-data/dynamic-data.service.js.map +1 -0
- package/dist/components/dynamic-data/index.d.ts +7 -0
- package/dist/components/dynamic-data/index.js +24 -0
- package/dist/components/dynamic-data/index.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/app.module.js
CHANGED
|
@@ -30,6 +30,7 @@ const tg_signup_module_1 = require("./components/TgSignup/tg-signup.module");
|
|
|
30
30
|
const transaction_module_1 = require("./components/transactions/transaction.module");
|
|
31
31
|
const npoint_module_1 = require("./components/n-point/npoint.module");
|
|
32
32
|
const timestamp_module_1 = require("./components/timestamps/timestamp.module");
|
|
33
|
+
const dynamic_data_module_1 = require("./components/dynamic-data/dynamic-data.module");
|
|
33
34
|
const memory_cleanup_service_1 = require("./memory-cleanup.service");
|
|
34
35
|
let AppModule = class AppModule {
|
|
35
36
|
configure(consumer) {
|
|
@@ -60,6 +61,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
60
61
|
transaction_module_1.TransactionModule,
|
|
61
62
|
npoint_module_1.NpointModule,
|
|
62
63
|
timestamp_module_1.TimestampModule,
|
|
64
|
+
dynamic_data_module_1.DynamicDataModule,
|
|
63
65
|
],
|
|
64
66
|
providers: [memory_cleanup_service_1.MemoryCleanerService],
|
|
65
67
|
controllers: [app_controller_1.AppController],
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwE;AACxE,kEAA8D;AAC9D,8EAAyE;AACzE,sEAAkE;AAClE,2EAAuE;AACvE,2FAAsF;AACtF,gGAA2F;AAC3F,iGAA4F;AAC5F,4EAAwE;AACxE,2EAAuE;AACvE,qDAAiD;AACjD,uEAAmE;AACnE,mEAA+D;AAC/D,wEAAkE;AAClE,uFAAiF;AACjF,gEAA4D;AAC5D,mEAA+D;AAC/D,wFAAmF;AACnF,8FAAyF;AACzF,6EAAwE;AACxE,qFAAiF;AACjF,sEAAkE;AAClE,+EAA2E;AAC3E,qEAAgE;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;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
+
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateDynamicDataDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class CreateDynamicDataDto {
|
|
16
|
+
}
|
|
17
|
+
exports.CreateDynamicDataDto = CreateDynamicDataDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'Unique identifier for the dynamic data',
|
|
21
|
+
example: 'user123',
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CreateDynamicDataDto.prototype, "configKey", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: 'Dynamic JSON data',
|
|
30
|
+
example: {
|
|
31
|
+
profile: {
|
|
32
|
+
name: 'John Doe',
|
|
33
|
+
age: 30,
|
|
34
|
+
},
|
|
35
|
+
preferences: {
|
|
36
|
+
theme: 'dark',
|
|
37
|
+
notifications: true,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], CreateDynamicDataDto.prototype, "data", void 0);
|
|
44
|
+
//# sourceMappingURL=create-dynamic-data.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-dynamic-data.dto.js","sourceRoot":"","sources":["../../../../src/components/dynamic-data/dto/create-dynamic-data.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAuD;AAEvD,MAAa,oBAAoB;CAwBhC;AAxBD,oDAwBC;AAjBU;IANR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,SAAS;KACnB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACc;AAgBlB;IAdR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,UAAU;gBAChB,GAAG,EAAE,EAAE;aACR;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,MAAM;gBACb,aAAa,EAAE,IAAI;aACpB;SACF;KACF,CAAC;IACD,IAAA,4BAAU,GAAE;;kDACM"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetDynamicDataDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class GetDynamicDataDto {
|
|
16
|
+
}
|
|
17
|
+
exports.GetDynamicDataDto = GetDynamicDataDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'Path to retrieve specific data using dot notation',
|
|
21
|
+
example: 'profile.name',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.Matches)(/^[a-zA-Z0-9]+([\._][a-zA-Z0-9]+)*$/, {
|
|
27
|
+
message: 'Invalid path format. Use dot notation (e.g., profile.name)',
|
|
28
|
+
}),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], GetDynamicDataDto.prototype, "path", void 0);
|
|
31
|
+
//# sourceMappingURL=get-dynamic-data.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-dynamic-data.dto.js","sourceRoot":"","sources":["../../../../src/components/dynamic-data/dto/get-dynamic-data.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAgE;AAEhE,MAAa,iBAAiB;CAY7B;AAZD,8CAYC;AADU;IAVR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mDAAmD;QAChE,OAAO,EAAE,cAAc;QACvB,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,yBAAO,EAAC,oCAAoC,EAAE;QAC7C,OAAO,EAAE,4DAA4D;KACtE,CAAC;;+CACqB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum ArrayOperationType {
|
|
2
|
+
PUSH = "PUSH",
|
|
3
|
+
POP = "POP",
|
|
4
|
+
INSERT = "INSERT",
|
|
5
|
+
REMOVE = "REMOVE",
|
|
6
|
+
UPDATE = "UPDATE"
|
|
7
|
+
}
|
|
8
|
+
export declare class ArrayOperation {
|
|
9
|
+
type: ArrayOperationType;
|
|
10
|
+
index?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class UpdateDynamicDataDto {
|
|
13
|
+
readonly path: string;
|
|
14
|
+
readonly value: any;
|
|
15
|
+
readonly arrayOperation?: ArrayOperation;
|
|
16
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateDynamicDataDto = exports.ArrayOperation = exports.ArrayOperationType = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
var ArrayOperationType;
|
|
16
|
+
(function (ArrayOperationType) {
|
|
17
|
+
ArrayOperationType["PUSH"] = "PUSH";
|
|
18
|
+
ArrayOperationType["POP"] = "POP";
|
|
19
|
+
ArrayOperationType["INSERT"] = "INSERT";
|
|
20
|
+
ArrayOperationType["REMOVE"] = "REMOVE";
|
|
21
|
+
ArrayOperationType["UPDATE"] = "UPDATE";
|
|
22
|
+
})(ArrayOperationType || (exports.ArrayOperationType = ArrayOperationType = {}));
|
|
23
|
+
class ArrayOperation {
|
|
24
|
+
}
|
|
25
|
+
exports.ArrayOperation = ArrayOperation;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({
|
|
28
|
+
enum: ArrayOperationType,
|
|
29
|
+
description: 'Type of array operation to perform',
|
|
30
|
+
}),
|
|
31
|
+
(0, class_validator_1.IsEnum)(ArrayOperationType),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ArrayOperation.prototype, "type", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)({
|
|
36
|
+
description: 'Index for array operations (required for INSERT and UPDATE)',
|
|
37
|
+
required: false,
|
|
38
|
+
}),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], ArrayOperation.prototype, "index", void 0);
|
|
42
|
+
class UpdateDynamicDataDto {
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateDynamicDataDto = UpdateDynamicDataDto;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({
|
|
47
|
+
description: 'Path to the field to update using dot notation',
|
|
48
|
+
example: 'profile.age',
|
|
49
|
+
}),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
52
|
+
(0, class_validator_1.Matches)(/^[a-zA-Z0-9]+([\._][a-zA-Z0-9]+)*$/, {
|
|
53
|
+
message: 'Invalid path format. Use dot notation (e.g., profile.age)',
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], UpdateDynamicDataDto.prototype, "path", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, swagger_1.ApiProperty)({
|
|
59
|
+
description: 'New value for the field',
|
|
60
|
+
example: 31,
|
|
61
|
+
}),
|
|
62
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], UpdateDynamicDataDto.prototype, "value", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiProperty)({
|
|
67
|
+
description: 'Array operation configuration',
|
|
68
|
+
required: false,
|
|
69
|
+
type: ArrayOperation,
|
|
70
|
+
}),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
__metadata("design:type", ArrayOperation)
|
|
73
|
+
], UpdateDynamicDataDto.prototype, "arrayOperation", void 0);
|
|
74
|
+
//# sourceMappingURL=update-dynamic-data.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-dynamic-data.dto.js","sourceRoot":"","sources":["../../../../src/components/dynamic-data/dto/update-dynamic-data.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAoF;AAEpF,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;AACnB,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,MAAa,cAAc;CAc1B;AAdD,wCAcC;AARC;IALC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,oCAAoC;KAClD,CAAC;IACD,IAAA,wBAAM,EAAC,kBAAkB,CAAC;;4CACF;AAOzB;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6DAA6D;QAC1E,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,4BAAU,GAAE;;6CACE;AAGjB,MAAa,oBAAoB;CA0BhC;AA1BD,oDA0BC;AAhBU;IATR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,aAAa;KACvB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,oCAAoC,EAAE;QAC7C,OAAO,EAAE,2DAA2D;KACrE,CAAC;;kDACoB;AAOb;IALR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,EAAE;KACZ,CAAC;IACD,IAAA,4BAAU,GAAE;;mDACO;AAQX;IANR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,cAAc;KACrB,CAAC;IACD,IAAA,4BAAU,GAAE;8BACa,cAAc;4DAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DynamicDataService } from './dynamic-data.service';
|
|
2
|
+
import { CreateDynamicDataDto } from './dto/create-dynamic-data.dto';
|
|
3
|
+
import { UpdateDynamicDataDto } from './dto/update-dynamic-data.dto';
|
|
4
|
+
import { GetDynamicDataDto } from './dto/get-dynamic-data.dto';
|
|
5
|
+
export declare class DynamicDataController {
|
|
6
|
+
private readonly dynamicDataService;
|
|
7
|
+
constructor(dynamicDataService: DynamicDataService);
|
|
8
|
+
create(createDynamicDataDto: CreateDynamicDataDto): Promise<import("./dynamic-data.schema").DynamicData>;
|
|
9
|
+
findOne(configKey: string, { path }: GetDynamicDataDto): Promise<any>;
|
|
10
|
+
update(configKey: string, updateDynamicDataDto: UpdateDynamicDataDto): Promise<import("./dynamic-data.schema").DynamicData>;
|
|
11
|
+
remove(configKey: string, { path }: GetDynamicDataDto): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.DynamicDataController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
|
+
const dynamic_data_service_1 = require("./dynamic-data.service");
|
|
19
|
+
const create_dynamic_data_dto_1 = require("./dto/create-dynamic-data.dto");
|
|
20
|
+
const update_dynamic_data_dto_1 = require("./dto/update-dynamic-data.dto");
|
|
21
|
+
const get_dynamic_data_dto_1 = require("./dto/get-dynamic-data.dto");
|
|
22
|
+
let DynamicDataController = class DynamicDataController {
|
|
23
|
+
constructor(dynamicDataService) {
|
|
24
|
+
this.dynamicDataService = dynamicDataService;
|
|
25
|
+
}
|
|
26
|
+
async create(createDynamicDataDto) {
|
|
27
|
+
return this.dynamicDataService.create(createDynamicDataDto);
|
|
28
|
+
}
|
|
29
|
+
async findOne(configKey, { path }) {
|
|
30
|
+
return this.dynamicDataService.findOne(configKey, path);
|
|
31
|
+
}
|
|
32
|
+
async update(configKey, updateDynamicDataDto) {
|
|
33
|
+
return this.dynamicDataService.update(configKey, updateDynamicDataDto);
|
|
34
|
+
}
|
|
35
|
+
async remove(configKey, { path }) {
|
|
36
|
+
await this.dynamicDataService.remove(configKey, path);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.DynamicDataController = DynamicDataController;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, common_1.Post)(),
|
|
42
|
+
(0, swagger_1.ApiOperation)({ summary: 'Create a new dynamic data document' }),
|
|
43
|
+
(0, swagger_1.ApiResponse)({
|
|
44
|
+
status: 201,
|
|
45
|
+
description: 'The dynamic data document has been successfully created.',
|
|
46
|
+
}),
|
|
47
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: 'Bad Request' }),
|
|
48
|
+
(0, swagger_1.ApiResponse)({ status: 409, description: 'Conflict - Document already exists' }),
|
|
49
|
+
__param(0, (0, common_1.Body)()),
|
|
50
|
+
__metadata("design:type", Function),
|
|
51
|
+
__metadata("design:paramtypes", [create_dynamic_data_dto_1.CreateDynamicDataDto]),
|
|
52
|
+
__metadata("design:returntype", Promise)
|
|
53
|
+
], DynamicDataController.prototype, "create", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, common_1.Get)(':configKey'),
|
|
56
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get dynamic data by configKey' }),
|
|
57
|
+
(0, swagger_1.ApiParam)({ name: 'configKey', description: 'Unique identifier for the document' }),
|
|
58
|
+
(0, swagger_1.ApiQuery)({
|
|
59
|
+
name: 'path',
|
|
60
|
+
required: false,
|
|
61
|
+
description: 'Optional path to retrieve specific nested data',
|
|
62
|
+
}),
|
|
63
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Returns the requested dynamic data' }),
|
|
64
|
+
(0, swagger_1.ApiResponse)({ status: 404, description: 'Document or path not found' }),
|
|
65
|
+
__param(0, (0, common_1.Param)('configKey')),
|
|
66
|
+
__param(1, (0, common_1.Query)()),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", [String, get_dynamic_data_dto_1.GetDynamicDataDto]),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], DynamicDataController.prototype, "findOne", null);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, common_1.Patch)(':configKey'),
|
|
73
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update dynamic data by configKey' }),
|
|
74
|
+
(0, swagger_1.ApiParam)({ name: 'configKey', description: 'Unique identifier for the document' }),
|
|
75
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'The dynamic data has been successfully updated' }),
|
|
76
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: 'Bad Request' }),
|
|
77
|
+
(0, swagger_1.ApiResponse)({ status: 404, description: 'Document not found' }),
|
|
78
|
+
__param(0, (0, common_1.Param)('configKey')),
|
|
79
|
+
__param(1, (0, common_1.Body)()),
|
|
80
|
+
__metadata("design:type", Function),
|
|
81
|
+
__metadata("design:paramtypes", [String, update_dynamic_data_dto_1.UpdateDynamicDataDto]),
|
|
82
|
+
__metadata("design:returntype", Promise)
|
|
83
|
+
], DynamicDataController.prototype, "update", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, common_1.Delete)(':configKey'),
|
|
86
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
87
|
+
(0, swagger_1.ApiOperation)({ summary: 'Delete dynamic data by configKey' }),
|
|
88
|
+
(0, swagger_1.ApiParam)({ name: 'configKey', description: 'Unique identifier for the document' }),
|
|
89
|
+
(0, swagger_1.ApiQuery)({
|
|
90
|
+
name: 'path',
|
|
91
|
+
required: false,
|
|
92
|
+
description: 'Optional path to delete specific nested data',
|
|
93
|
+
}),
|
|
94
|
+
(0, swagger_1.ApiResponse)({ status: 204, description: 'The dynamic data has been successfully deleted' }),
|
|
95
|
+
(0, swagger_1.ApiResponse)({ status: 404, description: 'Document or path not found' }),
|
|
96
|
+
__param(0, (0, common_1.Param)('configKey')),
|
|
97
|
+
__param(1, (0, common_1.Query)()),
|
|
98
|
+
__metadata("design:type", Function),
|
|
99
|
+
__metadata("design:paramtypes", [String, get_dynamic_data_dto_1.GetDynamicDataDto]),
|
|
100
|
+
__metadata("design:returntype", Promise)
|
|
101
|
+
], DynamicDataController.prototype, "remove", null);
|
|
102
|
+
exports.DynamicDataController = DynamicDataController = __decorate([
|
|
103
|
+
(0, swagger_1.ApiTags)('dynamic-data'),
|
|
104
|
+
(0, common_1.Controller)('dynamic-data'),
|
|
105
|
+
__metadata("design:paramtypes", [dynamic_data_service_1.DynamicDataService])
|
|
106
|
+
], DynamicDataController);
|
|
107
|
+
//# sourceMappingURL=dynamic-data.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-data.controller.js","sourceRoot":"","sources":["../../../src/components/dynamic-data/dynamic-data.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,6CAAyF;AACzF,iEAA4D;AAC5D,2EAAqE;AACrE,2EAAqE;AACrE,qEAA+D;AAIxD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YAA6B,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAG,CAAC;IAUjE,AAAN,KAAK,CAAC,MAAM,CAAS,oBAA0C;QAC7D,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAC9D,CAAC;IAYK,AAAN,KAAK,CAAC,OAAO,CACS,SAAiB,EAC5B,EAAE,IAAI,EAAqB;QAEpC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAQK,AAAN,KAAK,CAAC,MAAM,CACU,SAAiB,EAC7B,oBAA0C;QAElD,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IACzE,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AC,cAAc,CAAC;IACvB,IAAA,mBAAU,EAAC,cAAc,CAAC;qCAEwB,yCAAkB;GADxD,qBAAqB,CA8DjC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DynamicDataModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
12
|
+
const dynamic_data_controller_1 = require("./dynamic-data.controller");
|
|
13
|
+
const dynamic_data_service_1 = require("./dynamic-data.service");
|
|
14
|
+
const dynamic_data_schema_1 = require("./dynamic-data.schema");
|
|
15
|
+
let DynamicDataModule = class DynamicDataModule {
|
|
16
|
+
};
|
|
17
|
+
exports.DynamicDataModule = DynamicDataModule;
|
|
18
|
+
exports.DynamicDataModule = DynamicDataModule = __decorate([
|
|
19
|
+
(0, common_1.Module)({
|
|
20
|
+
imports: [
|
|
21
|
+
mongoose_1.MongooseModule.forFeature([
|
|
22
|
+
{ name: dynamic_data_schema_1.DynamicData.name, schema: dynamic_data_schema_1.DynamicDataSchema },
|
|
23
|
+
]),
|
|
24
|
+
],
|
|
25
|
+
controllers: [dynamic_data_controller_1.DynamicDataController],
|
|
26
|
+
providers: [dynamic_data_service_1.DynamicDataService],
|
|
27
|
+
exports: [dynamic_data_service_1.DynamicDataService],
|
|
28
|
+
})
|
|
29
|
+
], DynamicDataModule);
|
|
30
|
+
//# sourceMappingURL=dynamic-data.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-data.module.js","sourceRoot":"","sources":["../../../src/components/dynamic-data/dynamic-data.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,uEAAkE;AAClE,iEAA4D;AAC5D,+DAAuE;AAYhE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAV7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc,CAAC,UAAU,CAAC;gBACxB,EAAE,IAAI,EAAE,iCAAW,CAAC,IAAI,EAAE,MAAM,EAAE,uCAAiB,EAAE;aACtD,CAAC;SACH;QACD,WAAW,EAAE,CAAC,+CAAqB,CAAC;QACpC,SAAS,EAAE,CAAC,yCAAkB,CAAC;QAC/B,OAAO,EAAE,CAAC,yCAAkB,CAAC;KAC9B,CAAC;GACW,iBAAiB,CAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Document, Schema as MongooseSchema } from 'mongoose';
|
|
2
|
+
export type DynamicDataDocument = DynamicData & Document;
|
|
3
|
+
export declare class DynamicData {
|
|
4
|
+
configKey: string;
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
7
|
+
export declare const DynamicDataSchema: MongooseSchema<DynamicData, import("mongoose").Model<DynamicData, any, any, any, Document<unknown, any, DynamicData, any> & DynamicData & {
|
|
8
|
+
_id: import("mongoose").Types.ObjectId;
|
|
9
|
+
} & {
|
|
10
|
+
__v: number;
|
|
11
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DynamicData, Document<unknown, {}, import("mongoose").FlatRecord<DynamicData>, {}> & import("mongoose").FlatRecord<DynamicData> & {
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
} & {
|
|
14
|
+
__v: number;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DynamicDataSchema = exports.DynamicData = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
let DynamicData = class DynamicData {
|
|
16
|
+
};
|
|
17
|
+
exports.DynamicData = DynamicData;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, mongoose_1.Prop)({ required: true, unique: true, type: String }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], DynamicData.prototype, "configKey", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: true }),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], DynamicData.prototype, "data", void 0);
|
|
26
|
+
exports.DynamicData = DynamicData = __decorate([
|
|
27
|
+
(0, mongoose_1.Schema)({
|
|
28
|
+
collection: 'dynamic_data',
|
|
29
|
+
versionKey: false,
|
|
30
|
+
timestamps: true,
|
|
31
|
+
strict: false,
|
|
32
|
+
toJSON: {
|
|
33
|
+
transform: (_, ret) => {
|
|
34
|
+
delete ret._id;
|
|
35
|
+
return ret;
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
], DynamicData);
|
|
40
|
+
exports.DynamicDataSchema = mongoose_1.SchemaFactory.createForClass(DynamicData);
|
|
41
|
+
exports.DynamicDataSchema.index({ configKey: 1 }, { unique: true });
|
|
42
|
+
//# sourceMappingURL=dynamic-data.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-data.schema.js","sourceRoot":"","sources":["../../../src/components/dynamic-data/dynamic-data.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAA8D;AAgBvD,IAAM,WAAW,GAAjB,MAAM,WAAW;CAMvB,CAAA;AANY,kCAAW;AAEtB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACnC;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAc,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACjD;sBALC,WAAW;IAZvB,IAAA,iBAAM,EAAC;QACN,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,KAAK;QACb,MAAM,EAAE;YACN,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;gBACpB,OAAO,GAAG,CAAC,GAAG,CAAC;gBACf,OAAO,GAAG,CAAC;YACb,CAAC;SACF;KACF,CAAC;GACW,WAAW,CAMvB;AAEY,QAAA,iBAAiB,GAAG,wBAAa,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AAG3E,yBAAiB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Model, ClientSession } from 'mongoose';
|
|
2
|
+
import { DynamicData, DynamicDataDocument } from './dynamic-data.schema';
|
|
3
|
+
import { CreateDynamicDataDto } from './dto/create-dynamic-data.dto';
|
|
4
|
+
import { UpdateDynamicDataDto } from './dto/update-dynamic-data.dto';
|
|
5
|
+
import * as mongoose from 'mongoose';
|
|
6
|
+
export declare class DynamicDataService {
|
|
7
|
+
private dynamicDataModel;
|
|
8
|
+
private readonly connection;
|
|
9
|
+
constructor(dynamicDataModel: Model<DynamicDataDocument>, connection: mongoose.Connection);
|
|
10
|
+
create(createDto: CreateDynamicDataDto): Promise<DynamicData>;
|
|
11
|
+
findOne(configKey: string, path?: string): Promise<any>;
|
|
12
|
+
update(configKey: string, updateDto: UpdateDynamicDataDto, session?: ClientSession): Promise<DynamicData>;
|
|
13
|
+
private handleArrayOperation;
|
|
14
|
+
remove(configKey: string, path?: string): Promise<void>;
|
|
15
|
+
}
|