-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
177 changed files
with
10,688 additions
and
2,716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit $1 | ||
# npx --no-install commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm run test | ||
pnpm run lint-staged | ||
# pnpm run test | ||
# pnpm run lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,97 @@ | ||
<p align="center"> | ||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a> | ||
</p> | ||
```mermaid | ||
classDiagram | ||
class User { | ||
+String id | ||
+String nickname | ||
+String phone | ||
+String countryCode | ||
+DateTime createdAt | ||
+DateTime updatedAt | ||
+DateTime? deletedAt | ||
+Account account | ||
+UserSnapshot[] snapshots | ||
} | ||
class Account { | ||
+String id | ||
+String account | ||
+String password | ||
+DateTime createdAt | ||
+DateTime updatedAt | ||
+DateTime? deletedAt | ||
+User? user | ||
+OAuth[] oAuths | ||
} | ||
class OAuth { | ||
+String id | ||
+String accountId | ||
+OAUT_PROVIDER provider | ||
+String providerId | ||
+DateTime createdAt | ||
+DateTime updatedAt | ||
+Account account | ||
} | ||
class Certification { | ||
+String id | ||
+String certificationCodeId | ||
+String userId | ||
+CERTIFICATION_TARGET_TYPE targetType | ||
+CERTIFICATION_TYPE type | ||
+DateTime createdAt | ||
+DateTime updatedAt | ||
+User user | ||
+CertificationCode certificationCode | ||
} | ||
class CertificationCode { | ||
+String id | ||
+CERTIFICATION_TARGET_TYPE targetType | ||
+CERTIFICATION_TYPE type | ||
+CERTIFICATION_STATUS status | ||
+String code | ||
+String target | ||
+DateTime createdAt | ||
+DateTime updatedAt | ||
+DateTime expiredAt | ||
+Certification? certifications | ||
} | ||
class TermsAgreements { | ||
+String id | ||
+String userId | ||
+TERMS_TYPE type | ||
+Boolean agree | ||
+DateTime createdAt | ||
+DateTime updatedAt | ||
+User user | ||
} | ||
class UserSnapshot { | ||
+String id | ||
+String userId | ||
+String nickname | ||
+String phone | ||
+String countryCode | ||
+DateTime createdAt | ||
+User user | ||
} | ||
%% Domains | ||
%% Auth Domain | ||
Account --|> User : contains | ||
Account --|> OAuth : contains | ||
%% User Domain | ||
User --|> UserSnapshot : contains | ||
%% Certification Domain | ||
User --|> Certification : contains | ||
Certification --|> CertificationCode : contains | ||
%% TermsAgreements Domain | ||
User --|> TermsAgreements : contains | ||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 | ||
[circleci-url]: https://circleci.com/gh/nestjs/nest | ||
|
||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a> | ||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a> | ||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a> | ||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a> | ||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a> | ||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a> | ||
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a> | ||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a> | ||
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a> | ||
</p> | ||
<!--[](https://opencollective.com/nest#backer) | ||
[](https://opencollective.com/nest#sponsor)--> | ||
|
||
## Description | ||
|
||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. | ||
|
||
## Installation | ||
|
||
```bash | ||
$ pnpm install | ||
``` | ||
|
||
## Running the app | ||
|
||
```bash | ||
# development | ||
$ pnpm run start | ||
|
||
# watch mode | ||
$ pnpm run start:dev | ||
|
||
# production mode | ||
$ pnpm run start:prod | ||
``` | ||
|
||
## Test | ||
|
||
```bash | ||
# unit tests | ||
$ pnpm run test | ||
|
||
# e2e tests | ||
$ pnpm run test:e2e | ||
|
||
# test coverage | ||
$ pnpm run test:cov | ||
``` | ||
|
||
## Support | ||
|
||
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). | ||
|
||
## Stay in touch | ||
|
||
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) | ||
- Website - [https://nestjs.com](https://nestjs.com/) | ||
- Twitter - [@nestframework](https://twitter.com/nestframework) | ||
|
||
## License | ||
|
||
Nest is [MIT licensed](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
meta { | ||
name: islogin | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: {{local}}/api/auth | ||
body: none | ||
auth: none | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
meta { | ||
name: local | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{local}}/api/login | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
x-app: app | ||
} | ||
|
||
body:json { | ||
{ | ||
"account": "[email protected]", | ||
"password": "test1234", | ||
"type": "LOCAL" | ||
} | ||
} | ||
|
||
script:post-response { | ||
const body = res.getBody(); | ||
|
||
// let token = bru.setEnvVar("access_token", body.data.login.token); | ||
|
||
console.log(req.headers) | ||
if(req.headers['x-app']==='app'){ | ||
|
||
bru.setEnvVar("access_token", body.data.login.token); | ||
} | ||
|
||
console.log(body.result.accessToken) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
meta { | ||
name: local | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: {{local}}/api/auth | ||
body: none | ||
auth: none | ||
} | ||
|
||
headers { | ||
Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI5Y2I5YjA1My1mODg0LTQxZDgtOWQ0MS0wZGM4ZGQ0NWRhOTMiLCJhY2NvdW50Ijoidm8wdjAwMDBAbmF2ZXIuY29tIiwiaWF0IjoxNzE2OTAzNTI4LCJleHAiOjE3MTgxOTk1Mjh9.NiOU2wk6TqjdjF0d7Lavx84GrTMMd-KC2b9iK121UME | ||
~x-app: app | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
meta { | ||
name: http | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{local}}/api/car | ||
body: json | ||
auth: bearer | ||
} | ||
|
||
auth:bearer { | ||
token: {{access_token}} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
meta { | ||
name: RequestRental | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{local}}/api/car/{{carId}}/rental | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"startDate": new Date().toString(), | ||
"endDate": new Date().toString() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
meta { | ||
name: local | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
patch { | ||
url: {{local}}/api/certification/ | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"type": "SIGN_UP", | ||
"targetType": "PHONE", | ||
"target": "+8201073616616", | ||
"code": "950864" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
meta { | ||
name: server | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
patch { | ||
url: {{server}}/api/certification/ | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"type": "SIGN_UP", | ||
"targetType": "PHONE", | ||
"target": "+8201073616616", | ||
"code": "636841" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
meta { | ||
name: local | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{local}}/api/certification | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"type": "SIGN_UP", | ||
"targetType":"PHONE", | ||
"target":"+8201073616616" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
meta { | ||
name: server | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
post { | ||
url: {{server}}/api/certification | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
Content-Type: application/json; charset=utf-8 | ||
} | ||
|
||
body:json { | ||
{ | ||
"type": "SIGN_UP", | ||
"targetType":"PHONE", | ||
"target":"" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
meta { | ||
name: start | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{local}}/api/car/{{carId}}/driving | ||
body: none | ||
auth: bearer | ||
} | ||
|
||
auth:bearer { | ||
token: {{access_token}} | ||
} |
Oops, something went wrong.