@umapi/contracts 1.0.13 → 1.0.15

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.
@@ -1,7 +1,9 @@
1
1
  export { AppInfoResponseDto } from './app-info-response.dto';
2
2
  export { HealthResponseDto } from './health-response.dto';
3
3
  export { OtpRequestDto } from './otp-request.dto';
4
+ export { OtpResponseDto } from './otp-response.dto';
4
5
  export { OtpVerifyRequestDto } from './otp-verify-request.dto';
6
+ export { ServiceResponse, ServiceResponseErrorDto, ServiceResponseSuccessDto } from './service-response.dto';
5
7
  export { TokensResponseDto } from './tokens-response.dto';
6
8
  export { UserRequestDto } from './user-request.dto';
7
9
  export { UserResponseDto } from './user-response.dto';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
package/dist/dto/index.js CHANGED
@@ -1,14 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserResponseDto = exports.UserRequestDto = exports.TokensResponseDto = exports.OtpVerifyRequestDto = exports.OtpRequestDto = exports.HealthResponseDto = exports.AppInfoResponseDto = void 0;
3
+ exports.UserResponseDto = exports.UserRequestDto = exports.TokensResponseDto = exports.ServiceResponseSuccessDto = exports.ServiceResponseErrorDto = exports.OtpVerifyRequestDto = exports.OtpResponseDto = exports.OtpRequestDto = exports.HealthResponseDto = exports.AppInfoResponseDto = void 0;
4
4
  var app_info_response_dto_1 = require("./app-info-response.dto");
5
5
  Object.defineProperty(exports, "AppInfoResponseDto", { enumerable: true, get: function () { return app_info_response_dto_1.AppInfoResponseDto; } });
6
6
  var health_response_dto_1 = require("./health-response.dto");
7
7
  Object.defineProperty(exports, "HealthResponseDto", { enumerable: true, get: function () { return health_response_dto_1.HealthResponseDto; } });
8
8
  var otp_request_dto_1 = require("./otp-request.dto");
9
9
  Object.defineProperty(exports, "OtpRequestDto", { enumerable: true, get: function () { return otp_request_dto_1.OtpRequestDto; } });
10
+ var otp_response_dto_1 = require("./otp-response.dto");
11
+ Object.defineProperty(exports, "OtpResponseDto", { enumerable: true, get: function () { return otp_response_dto_1.OtpResponseDto; } });
10
12
  var otp_verify_request_dto_1 = require("./otp-verify-request.dto");
11
13
  Object.defineProperty(exports, "OtpVerifyRequestDto", { enumerable: true, get: function () { return otp_verify_request_dto_1.OtpVerifyRequestDto; } });
14
+ var service_response_dto_1 = require("./service-response.dto");
15
+ Object.defineProperty(exports, "ServiceResponseErrorDto", { enumerable: true, get: function () { return service_response_dto_1.ServiceResponseErrorDto; } });
16
+ Object.defineProperty(exports, "ServiceResponseSuccessDto", { enumerable: true, get: function () { return service_response_dto_1.ServiceResponseSuccessDto; } });
12
17
  var tokens_response_dto_1 = require("./tokens-response.dto");
13
18
  Object.defineProperty(exports, "TokensResponseDto", { enumerable: true, get: function () { return tokens_response_dto_1.TokensResponseDto; } });
14
19
  var user_request_dto_1 = require("./user-request.dto");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAC5B,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,yDAAsD;AAA7C,oHAAA,eAAe,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAC5B,+DAA6G;AAAnF,+HAAA,uBAAuB,OAAA;AAAE,iIAAA,yBAAyB,OAAA;AAC5E,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,yDAAsD;AAA7C,oHAAA,eAAe,OAAA"}
@@ -0,0 +1,4 @@
1
+ export declare class OtpResponseDto {
2
+ status: "ok";
3
+ }
4
+ //# sourceMappingURL=otp-response.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp-response.dto.d.ts","sourceRoot":"","sources":["../../src/dto/otp-response.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,cAAc;IAGvB,MAAM,EAAG,IAAI,CAAC;CACjB"}
@@ -0,0 +1,23 @@
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.OtpResponseDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class OtpResponseDto {
16
+ }
17
+ exports.OtpResponseDto = OtpResponseDto;
18
+ __decorate([
19
+ (0, swagger_1.ApiProperty)({ description: 'Статус запроса OTP' }),
20
+ (0, class_validator_1.IsString)(),
21
+ __metadata("design:type", String)
22
+ ], OtpResponseDto.prototype, "status", void 0);
23
+ //# sourceMappingURL=otp-response.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otp-response.dto.js","sourceRoot":"","sources":["../../src/dto/otp-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAA2C;AAE3C,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADG;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAClD,IAAA,0BAAQ,GAAE;;8CACG"}
@@ -0,0 +1,20 @@
1
+ import { ServiceError } from '../interfaces';
2
+ /**
3
+ * DTO для успешного ответа сервиса
4
+ */
5
+ export declare class ServiceResponseSuccessDto<T = any> {
6
+ success: true;
7
+ data: T;
8
+ }
9
+ /**
10
+ * DTO для ответа с ошибкой сервиса
11
+ */
12
+ export declare class ServiceResponseErrorDto {
13
+ success: false;
14
+ error: ServiceError;
15
+ }
16
+ /**
17
+ * Общий тип ответа сервиса
18
+ */
19
+ export type ServiceResponse<T = any> = ServiceResponseSuccessDto<T> | ServiceResponseErrorDto;
20
+ //# sourceMappingURL=service-response.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-response.dto.d.ts","sourceRoot":"","sources":["../../src/dto/service-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;GAEG;AACH,qBAAa,yBAAyB,CAAC,CAAC,GAAG,GAAG;IAE1C,OAAO,EAAG,IAAI,CAAC;IAGf,IAAI,EAAG,CAAC,CAAC;CACZ;AAED;;GAEG;AACH,qBAAa,uBAAuB;IAEhC,OAAO,EAAG,KAAK,CAAC;IAGhB,KAAK,EAAG,YAAY,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,GAAG,IAAI,yBAAyB,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC"}
@@ -0,0 +1,43 @@
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.ServiceResponseErrorDto = exports.ServiceResponseSuccessDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ /**
15
+ * DTO для успешного ответа сервиса
16
+ */
17
+ class ServiceResponseSuccessDto {
18
+ }
19
+ exports.ServiceResponseSuccessDto = ServiceResponseSuccessDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)({ example: true }),
22
+ __metadata("design:type", Boolean)
23
+ ], ServiceResponseSuccessDto.prototype, "success", void 0);
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)(),
26
+ __metadata("design:type", Object)
27
+ ], ServiceResponseSuccessDto.prototype, "data", void 0);
28
+ /**
29
+ * DTO для ответа с ошибкой сервиса
30
+ */
31
+ class ServiceResponseErrorDto {
32
+ }
33
+ exports.ServiceResponseErrorDto = ServiceResponseErrorDto;
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ example: false }),
36
+ __metadata("design:type", Boolean)
37
+ ], ServiceResponseErrorDto.prototype, "success", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiProperty)({ type: () => Object }) // Since ServiceError is interface
40
+ ,
41
+ __metadata("design:type", Object)
42
+ ], ServiceResponseErrorDto.prototype, "error", void 0);
43
+ //# sourceMappingURL=service-response.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-response.dto.js","sourceRoot":"","sources":["../../src/dto/service-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAG9C;;GAEG;AACH,MAAa,yBAAyB;CAMrC;AAND,8DAMC;AAJG;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;0DAChB;AAGf;IADC,IAAA,qBAAW,GAAE;;uDACL;AAGb;;GAEG;AACH,MAAa,uBAAuB;CAMnC;AAND,0DAMC;AAJG;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wDAChB;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,kCAAkC;;;sDAClD"}
package/dist/index.d.ts CHANGED
@@ -1,13 +1,3 @@
1
1
  export * from './dto';
2
2
  export * from './interfaces';
3
- /**
4
- * Ответ сервиса
5
- */
6
- export type ServiceResponse<T> = {
7
- success: true;
8
- data: T;
9
- } | {
10
- success: false;
11
- error: import('./interfaces').ServiceError;
12
- };
13
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,cAAc,EAAE,YAAY,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umapi/contracts",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Shared contracts for UMAPI microservices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",