@pulsar.money/atlas-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/README.md +5 -0
- package/dist/config/api-config.service.d.ts +5 -0
- package/dist/config/api-config.service.js +29 -0
- package/dist/config/api-config.service.js.map +1 -0
- package/dist/decorator/wallet-address.decorator.d.ts +1 -0
- package/dist/decorator/wallet-address.decorator.js +28 -0
- package/dist/decorator/wallet-address.decorator.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +18 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/profiles/dto/index.d.ts +0 -0
- package/dist/modules/profiles/dto/index.js +1 -0
- package/dist/modules/profiles/dto/index.js.map +1 -0
- package/dist/modules/profiles/dto/link-address.dto.d.ts +3 -0
- package/dist/modules/profiles/dto/link-address.dto.js +24 -0
- package/dist/modules/profiles/dto/link-address.dto.js.map +1 -0
- package/dist/modules/profiles/dto/resend-verification.dto.d.ts +3 -0
- package/dist/modules/profiles/dto/resend-verification.dto.js +24 -0
- package/dist/modules/profiles/dto/resend-verification.dto.js.map +1 -0
- package/dist/modules/profiles/dto/update-profile.dto.d.ts +7 -0
- package/dist/modules/profiles/dto/update-profile.dto.js +46 -0
- package/dist/modules/profiles/dto/update-profile.dto.js.map +1 -0
- package/dist/modules/profiles/dto/verify-email.dto.d.ts +3 -0
- package/dist/modules/profiles/dto/verify-email.dto.js +24 -0
- package/dist/modules/profiles/dto/verify-email.dto.js.map +1 -0
- package/dist/modules/profiles/index.d.ts +3 -0
- package/dist/modules/profiles/index.js +20 -0
- package/dist/modules/profiles/index.js.map +1 -0
- package/dist/modules/profiles/profiles.controller.d.ts +17 -0
- package/dist/modules/profiles/profiles.controller.js +139 -0
- package/dist/modules/profiles/profiles.controller.js.map +1 -0
- package/dist/modules/profiles/profiles.service.d.ts +15 -0
- package/dist/modules/profiles/profiles.service.js +134 -0
- package/dist/modules/profiles/profiles.service.js.map +1 -0
- package/dist/modules/profiles/profiles.types.d.ts +19 -0
- package/dist/modules/profiles/profiles.types.js +3 -0
- package/dist/modules/profiles/profiles.types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiConfigService = void 0;
|
|
4
|
+
class ApiConfigService {
|
|
5
|
+
static getAtlasBaseUrl() {
|
|
6
|
+
if (!process.env.ATLAS_BASE_URL) {
|
|
7
|
+
throw new Error("ATLAS_BASE_URL is not set");
|
|
8
|
+
}
|
|
9
|
+
return process.env.ATLAS_BASE_URL;
|
|
10
|
+
}
|
|
11
|
+
static getAtlasJwtSecret() {
|
|
12
|
+
if (!process.env.ATLAS_JWT_SECRET) {
|
|
13
|
+
throw new Error("ATLAS_JWT_SECRET is not set");
|
|
14
|
+
}
|
|
15
|
+
return process.env.ATLAS_JWT_SECRET;
|
|
16
|
+
}
|
|
17
|
+
static getServiceType() {
|
|
18
|
+
if (!process.env.SERVICE_TYPE) {
|
|
19
|
+
throw new Error("SERVICE_TYPE is not set");
|
|
20
|
+
}
|
|
21
|
+
const validServiceTypes = ["multiversx", "starknet", "evm"];
|
|
22
|
+
if (!validServiceTypes.includes(process.env.SERVICE_TYPE)) {
|
|
23
|
+
throw new Error("SERVICE_TYPE is not valid");
|
|
24
|
+
}
|
|
25
|
+
return process.env.SERVICE_TYPE;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.ApiConfigService = ApiConfigService;
|
|
29
|
+
//# sourceMappingURL=api-config.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-config.service.js","sourceRoot":"","sources":["../../src/config/api-config.service.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;IAC3B,MAAM,CAAC,eAAe;QACpB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,iBAAiB;QACtB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC5C;QAED,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAC5D,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;YACzD,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QAED,OAAO,OAAO,CAAC,GAAG,CAAC,YAAiD,CAAC;IACvE,CAAC;CACF;AA3BD,4CA2BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WalletAddress: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletAddress = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const api_config_service_1 = require("../config/api-config.service");
|
|
6
|
+
exports.WalletAddress = (0, common_1.createParamDecorator)((_, ctx) => {
|
|
7
|
+
const request = ctx.switchToHttp().getRequest();
|
|
8
|
+
const serviceType = api_config_service_1.ApiConfigService.getServiceType();
|
|
9
|
+
let address = undefined;
|
|
10
|
+
switch (serviceType) {
|
|
11
|
+
case "multiversx":
|
|
12
|
+
address = request.session.siwe.address;
|
|
13
|
+
break;
|
|
14
|
+
case "starknet":
|
|
15
|
+
address = request.session.address;
|
|
16
|
+
break;
|
|
17
|
+
case "evm":
|
|
18
|
+
address = request.session.siwe.address;
|
|
19
|
+
break;
|
|
20
|
+
default:
|
|
21
|
+
throw new Error("Invalid service type");
|
|
22
|
+
}
|
|
23
|
+
if (!address) {
|
|
24
|
+
throw new common_1.UnauthorizedException("You are not authenticated");
|
|
25
|
+
}
|
|
26
|
+
return address;
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=wallet-address.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-address.decorator.js","sourceRoot":"","sources":["../../src/decorator/wallet-address.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAIwB;AACxB,qEAAgE;AAEnD,QAAA,aAAa,GAAG,IAAA,6BAAoB,EAC/C,CAAC,CAAU,EAAE,GAAqB,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;IAChD,MAAM,WAAW,GAAG,qCAAgB,CAAC,cAAc,EAAE,CAAC;IAEtD,IAAI,OAAO,GAAW,SAAS,CAAC;IAChC,QAAQ,WAAW,EAAE;QACnB,KAAK,YAAY;YACf,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;YACvC,MAAM;QACR,KAAK,UAAU;YACb,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;YAClC,MAAM;QACR,KAAK,KAAK;YACR,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;YACvC,MAAM;QACR;YACE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;KAC3C;IAED,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,8BAAqB,CAAC,2BAA2B,CAAC,CAAC;KAC9D;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CACF,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./modules";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./modules"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./profiles";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./profiles"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/profiles/dto/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.LinkAddressDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class LinkAddressDto {
|
|
16
|
+
}
|
|
17
|
+
exports.LinkAddressDto = LinkAddressDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ description: 'The email address to link' }),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], LinkAddressDto.prototype, "email", void 0);
|
|
24
|
+
//# sourceMappingURL=link-address.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-address.dto.js","sourceRoot":"","sources":["../../../../src/modules/profiles/dto/link-address.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AACvD,6CAA8C;AAE9C,MAAa,cAAc;CAK1B;AALD,wCAKC;AADC;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACzD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6CACE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.ResendVerificationDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class ResendVerificationDto {
|
|
16
|
+
}
|
|
17
|
+
exports.ResendVerificationDto = ResendVerificationDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ description: 'The email address to resend verification to' }),
|
|
20
|
+
(0, class_validator_1.IsEmail)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ResendVerificationDto.prototype, "email", void 0);
|
|
24
|
+
//# sourceMappingURL=resend-verification.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend-verification.dto.js","sourceRoot":"","sources":["../../../../src/modules/profiles/dto/resend-verification.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsD;AACtD,6CAA8C;AAE9C,MAAa,qBAAqB;CAKjC;AALD,sDAKC;AADC;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;IAC3E,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;oDACE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.UpdateProfileDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class UpdateProfileDto {
|
|
16
|
+
}
|
|
17
|
+
exports.UpdateProfileDto = UpdateProfileDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiPropertyOptional)({ description: "The user's first name" }),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], UpdateProfileDto.prototype, "firstName", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiPropertyOptional)({ description: "The user's surname" }),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], UpdateProfileDto.prototype, "lastName", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiPropertyOptional)({ description: "The user's username" }),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], UpdateProfileDto.prototype, "username", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)({ type: 'string', format: 'binary', description: "The user's profile image" }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], UpdateProfileDto.prototype, "profileImage", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiPropertyOptional)({ description: "The user's bio" }),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], UpdateProfileDto.prototype, "bio", void 0);
|
|
46
|
+
//# sourceMappingURL=update-profile.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-profile.dto.js","sourceRoot":"","sources":["../../../../src/modules/profiles/dto/update-profile.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AACvD,6CAAsD;AAEtD,MAAa,gBAAgB;CAuB5B;AAvBD,4CAuBC;AAnBC;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;IAC7D,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACM;AAKnB;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAC1D,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACK;AAKlB;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IAC3D,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACK;AAGlB;IADC,IAAA,6BAAmB,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;;sDAChF;AAKnB;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;IACtD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6CACA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.VerifyEmailDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class VerifyEmailDto {
|
|
16
|
+
}
|
|
17
|
+
exports.VerifyEmailDto = VerifyEmailDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ description: 'Verification code' }),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], VerifyEmailDto.prototype, "code", void 0);
|
|
24
|
+
//# sourceMappingURL=verify-email.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-email.dto.js","sourceRoot":"","sources":["../../../../src/modules/profiles/dto/verify-email.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AACvD,6CAA8C;AAE9C,MAAa,cAAc;CAK1B;AALD,wCAKC;AADC;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACjD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4CACC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./profiles.service"), exports);
|
|
18
|
+
__exportStar(require("./profiles.controller"), exports);
|
|
19
|
+
__exportStar(require("./profiles.types"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/profiles/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,wDAAsC;AACtC,mDAAiC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="multer" />
|
|
2
|
+
import { ProfilesService } from "./profiles.service";
|
|
3
|
+
import { LinkAddressDto } from "./dto/link-address.dto";
|
|
4
|
+
import { UpdateProfileDto } from "./dto/update-profile.dto";
|
|
5
|
+
import { VerifyEmailDto } from "./dto/verify-email.dto";
|
|
6
|
+
import { ResendVerificationDto } from "./dto/resend-verification.dto";
|
|
7
|
+
export declare class ProfilesController {
|
|
8
|
+
private readonly profilesService;
|
|
9
|
+
constructor(profilesService: ProfilesService);
|
|
10
|
+
linkAddress(input: LinkAddressDto, address: string): Promise<void>;
|
|
11
|
+
verifyEmail(input: VerifyEmailDto, address: string): Promise<void>;
|
|
12
|
+
resendVerificationCode(address: string, input: ResendVerificationDto): Promise<void>;
|
|
13
|
+
getUserProfile(address: string): Promise<import("./profiles.types").UserProfile>;
|
|
14
|
+
updateUserProfile(updateData: UpdateProfileDto, profileImage: Express.Multer.File, address: string): Promise<import("./profiles.types").UserProfile>;
|
|
15
|
+
checkUsername(username: string): Promise<boolean>;
|
|
16
|
+
unlinkAddress(address: string): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
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.ProfilesController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const platform_express_1 = require("@nestjs/platform-express");
|
|
18
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
19
|
+
const profiles_service_1 = require("./profiles.service");
|
|
20
|
+
const link_address_dto_1 = require("./dto/link-address.dto");
|
|
21
|
+
const update_profile_dto_1 = require("./dto/update-profile.dto");
|
|
22
|
+
const verify_email_dto_1 = require("./dto/verify-email.dto");
|
|
23
|
+
const resend_verification_dto_1 = require("./dto/resend-verification.dto");
|
|
24
|
+
const wallet_address_decorator_1 = require("../../decorator/wallet-address.decorator");
|
|
25
|
+
let ProfilesController = class ProfilesController {
|
|
26
|
+
constructor(profilesService) {
|
|
27
|
+
this.profilesService = profilesService;
|
|
28
|
+
}
|
|
29
|
+
async linkAddress(input, address) {
|
|
30
|
+
return await this.profilesService.linkAddress(input.email, address);
|
|
31
|
+
}
|
|
32
|
+
async verifyEmail(input, address) {
|
|
33
|
+
return await this.profilesService.verifyEmail(address, input.code);
|
|
34
|
+
}
|
|
35
|
+
async resendVerificationCode(address, input) {
|
|
36
|
+
return await this.profilesService.resendVerificationCode(address, input.email);
|
|
37
|
+
}
|
|
38
|
+
async getUserProfile(address) {
|
|
39
|
+
return await this.profilesService.getUserProfile(address);
|
|
40
|
+
}
|
|
41
|
+
async updateUserProfile(updateData, profileImage, address) {
|
|
42
|
+
return await this.profilesService.updateUserProfile(address, updateData, profileImage);
|
|
43
|
+
}
|
|
44
|
+
async checkUsername(username) {
|
|
45
|
+
return await this.profilesService.checkUsername(username);
|
|
46
|
+
}
|
|
47
|
+
async unlinkAddress(address) {
|
|
48
|
+
return await this.profilesService.unlinkAddress(address);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.ProfilesController = ProfilesController;
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, common_1.Post)("link-email"),
|
|
54
|
+
(0, swagger_1.ApiOperation)({ summary: "Link an address to a user" }),
|
|
55
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: "Address linked successfully" }),
|
|
56
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: "Bad request" }),
|
|
57
|
+
__param(0, (0, common_1.Body)()),
|
|
58
|
+
__param(1, (0, wallet_address_decorator_1.WalletAddress)()),
|
|
59
|
+
__metadata("design:type", Function),
|
|
60
|
+
__metadata("design:paramtypes", [link_address_dto_1.LinkAddressDto, String]),
|
|
61
|
+
__metadata("design:returntype", Promise)
|
|
62
|
+
], ProfilesController.prototype, "linkAddress", null);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, common_1.Post)("verify-email"),
|
|
65
|
+
(0, swagger_1.ApiOperation)({ summary: "Verify email" }),
|
|
66
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: "Email verified successfully" }),
|
|
67
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: "Bad request" }),
|
|
68
|
+
__param(0, (0, common_1.Body)()),
|
|
69
|
+
__param(1, (0, wallet_address_decorator_1.WalletAddress)()),
|
|
70
|
+
__metadata("design:type", Function),
|
|
71
|
+
__metadata("design:paramtypes", [verify_email_dto_1.VerifyEmailDto, String]),
|
|
72
|
+
__metadata("design:returntype", Promise)
|
|
73
|
+
], ProfilesController.prototype, "verifyEmail", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, common_1.Post)("resend-verification"),
|
|
76
|
+
(0, swagger_1.ApiOperation)({ summary: "Resend verification code" }),
|
|
77
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: "Verification code sent" }),
|
|
78
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: "Bad request" }),
|
|
79
|
+
__param(0, (0, wallet_address_decorator_1.WalletAddress)()),
|
|
80
|
+
__param(1, (0, common_1.Body)()),
|
|
81
|
+
__metadata("design:type", Function),
|
|
82
|
+
__metadata("design:paramtypes", [String, resend_verification_dto_1.ResendVerificationDto]),
|
|
83
|
+
__metadata("design:returntype", Promise)
|
|
84
|
+
], ProfilesController.prototype, "resendVerificationCode", null);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, common_1.Get)(),
|
|
87
|
+
(0, swagger_1.ApiOperation)({ summary: "Get user profile" }),
|
|
88
|
+
(0, swagger_1.ApiResponse)({
|
|
89
|
+
status: 200,
|
|
90
|
+
description: "User profile retrieved successfully",
|
|
91
|
+
}),
|
|
92
|
+
(0, swagger_1.ApiResponse)({ status: 404, description: "User not found" }),
|
|
93
|
+
__param(0, (0, wallet_address_decorator_1.WalletAddress)()),
|
|
94
|
+
__metadata("design:type", Function),
|
|
95
|
+
__metadata("design:paramtypes", [String]),
|
|
96
|
+
__metadata("design:returntype", Promise)
|
|
97
|
+
], ProfilesController.prototype, "getUserProfile", null);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, common_1.Put)(""),
|
|
100
|
+
(0, swagger_1.ApiOperation)({ summary: "Update user profile" }),
|
|
101
|
+
(0, swagger_1.ApiConsumes)("multipart/form-data"),
|
|
102
|
+
(0, swagger_1.ApiResponse)({
|
|
103
|
+
status: 200,
|
|
104
|
+
description: "User profile updated successfully",
|
|
105
|
+
}),
|
|
106
|
+
(0, common_1.UseInterceptors)((0, platform_express_1.FileInterceptor)("profileImage")),
|
|
107
|
+
__param(0, (0, common_1.Body)()),
|
|
108
|
+
__param(1, (0, common_1.UploadedFile)()),
|
|
109
|
+
__param(2, (0, wallet_address_decorator_1.WalletAddress)()),
|
|
110
|
+
__metadata("design:type", Function),
|
|
111
|
+
__metadata("design:paramtypes", [update_profile_dto_1.UpdateProfileDto, Object, String]),
|
|
112
|
+
__metadata("design:returntype", Promise)
|
|
113
|
+
], ProfilesController.prototype, "updateUserProfile", null);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, common_1.Get)("/valid-username/:username"),
|
|
116
|
+
(0, swagger_1.ApiOperation)({ summary: "Check if a username is valid" }),
|
|
117
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: "Username is valid" }),
|
|
118
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: "Username is invalid" }),
|
|
119
|
+
__param(0, (0, common_1.Param)("username")),
|
|
120
|
+
__metadata("design:type", Function),
|
|
121
|
+
__metadata("design:paramtypes", [String]),
|
|
122
|
+
__metadata("design:returntype", Promise)
|
|
123
|
+
], ProfilesController.prototype, "checkUsername", null);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, common_1.Post)("/unlink-address"),
|
|
126
|
+
(0, swagger_1.ApiOperation)({ summary: "Unlink an address from a user" }),
|
|
127
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: "Address unlinked successfully" }),
|
|
128
|
+
(0, swagger_1.ApiResponse)({ status: 400, description: "Bad request" }),
|
|
129
|
+
__param(0, (0, wallet_address_decorator_1.WalletAddress)()),
|
|
130
|
+
__metadata("design:type", Function),
|
|
131
|
+
__metadata("design:paramtypes", [String]),
|
|
132
|
+
__metadata("design:returntype", Promise)
|
|
133
|
+
], ProfilesController.prototype, "unlinkAddress", null);
|
|
134
|
+
exports.ProfilesController = ProfilesController = __decorate([
|
|
135
|
+
(0, swagger_1.ApiTags)("Users"),
|
|
136
|
+
(0, common_1.Controller)("users"),
|
|
137
|
+
__metadata("design:paramtypes", [profiles_service_1.ProfilesService])
|
|
138
|
+
], ProfilesController);
|
|
139
|
+
//# sourceMappingURL=profiles.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.controller.js","sourceRoot":"","sources":["../../../src/modules/profiles/profiles.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,+DAA2D;AAC3D,6CAKyB;AACzB,yDAAqD;AACrD,6DAAwD;AACxD,iEAA4D;AAC5D,6DAAwD;AACxD,2EAAsE;AACtE,uFAAyE;AAIlE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAM3D,AAAN,KAAK,CAAC,WAAW,CACP,KAAqB,EACZ,OAAe;QAEhC,OAAO,MAAM,IAAI,CAAC,e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0 +1,15 @@
|
|
|
1
|
+
/// <reference types="multer" />
|
|
2
|
+
import { UserProfile, UpdateUserProfileInput } from "./profiles.types";
|
|
3
|
+
export declare class ProfilesService {
|
|
4
|
+
private readonly axiosInstance;
|
|
5
|
+
constructor();
|
|
6
|
+
private createJwt;
|
|
7
|
+
linkAddress(email: string, address: string): Promise<void>;
|
|
8
|
+
verifyEmail(address: string, code: string): Promise<void>;
|
|
9
|
+
resendVerificationCode(address: string, email: string): Promise<void>;
|
|
10
|
+
getUserProfile(address: string): Promise<UserProfile>;
|
|
11
|
+
checkUsername(username: string): Promise<boolean>;
|
|
12
|
+
updateUserProfile(address: string, updateData: UpdateUserProfileInput, profileImage: Express.Multer.File | null): Promise<UserProfile>;
|
|
13
|
+
unlinkAddress(address: string): Promise<void>;
|
|
14
|
+
private handleAxiosError;
|
|
15
|
+
}
|