Skip to content

Commit

Permalink
replace product obj with hash link (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivienfan authored Aug 8, 2022
1 parent 5e669bf commit 44cd859
Show file tree
Hide file tree
Showing 85 changed files with 2,001 additions and 1,861 deletions.
12 changes: 6 additions & 6 deletions lib/analytics/dto/analytics.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ const swagger_1 = require("@nestjs/swagger");
class AnalyticsDTO {
}
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsNumber(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsNumber)(),
__metadata("design:type", Number)
], AnalyticsDTO.prototype, "currentMillis", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsUUID(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], AnalyticsDTO.prototype, "productId", void 0);
exports.AnalyticsDTO = AnalyticsDTO;
6 changes: 5 additions & 1 deletion lib/analytics/dto/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
6 changes: 5 additions & 1 deletion lib/analytics/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
6 changes: 5 additions & 1 deletion lib/auth/dto/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
6 changes: 5 additions & 1 deletion lib/auth/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
6 changes: 5 additions & 1 deletion lib/contracts/constants/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
32 changes: 16 additions & 16 deletions lib/contracts/dto/confirmContract.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,34 @@ const swagger_1 = require("@nestjs/swagger");
class ConfirmContractDTO {
}
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsNumber(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsNumber)(),
__metadata("design:type", Number)
], ConfirmContractDTO.prototype, "contractId", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsString(),
class_validator_1.Matches(/^did:/),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.Matches)(/^did:/),
__metadata("design:type", String)
], ConfirmContractDTO.prototype, "receiver", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsBoolean(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], ConfirmContractDTO.prototype, "status", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsString(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], ConfirmContractDTO.prototype, "destination", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsOptional(),
class_validator_1.IsString(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], ConfirmContractDTO.prototype, "comment", void 0);
exports.ConfirmContractDTO = ConfirmContractDTO;
34 changes: 17 additions & 17 deletions lib/contracts/dto/createContract.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@ const swagger_1 = require("@nestjs/swagger");
class CreateContractDTO {
}
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsString(),
class_validator_1.Matches(/^did:/),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.Matches)(/^did:/),
__metadata("design:type", String)
], CreateContractDTO.prototype, "sender", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsString(),
class_validator_1.Matches(/^did:/),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.Matches)(/^did:/),
__metadata("design:type", String)
], CreateContractDTO.prototype, "receiver", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsString(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateContractDTO.prototype, "destination", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.Matches(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.Matches)(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/),
__metadata("design:type", String)
], CreateContractDTO.prototype, "startDate", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.Matches(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.Matches)(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/),
__metadata("design:type", String)
], CreateContractDTO.prototype, "endDate", void 0);
exports.CreateContractDTO = CreateContractDTO;
6 changes: 3 additions & 3 deletions lib/contracts/dto/deleteContract.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const swagger_1 = require("@nestjs/swagger");
class DeleteContractsDTO {
}
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsArray(),
class_validator_1.ArrayMinSize(1),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.ArrayMinSize)(1),
__metadata("design:type", Array)
], DeleteContractsDTO.prototype, "contractIds", void 0);
exports.DeleteContractsDTO = DeleteContractsDTO;
6 changes: 5 additions & 1 deletion lib/contracts/dto/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
18 changes: 9 additions & 9 deletions lib/contracts/dto/updateContract.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ const swagger_1 = require("@nestjs/swagger");
class UpdateContractDTO {
}
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsNumber(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsNumber)(),
__metadata("design:type", Number)
], UpdateContractDTO.prototype, "contractId", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.Matches(/^\d{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])$/),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.Matches)(/^\d{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])$/),
__metadata("design:type", String)
], UpdateContractDTO.prototype, "startDate", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.Matches(/^\d{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])$/),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.Matches)(/^\d{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])$/),
__metadata("design:type", String)
], UpdateContractDTO.prototype, "endDate", void 0);
exports.UpdateContractDTO = UpdateContractDTO;
6 changes: 5 additions & 1 deletion lib/contracts/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
26 changes: 13 additions & 13 deletions lib/credentials/dto/addCredential.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ const general_1 = require("../../general");
class AddCredentialDTO {
}
__decorate([
class_validator_1.IsNotEmpty(),
class_validator_1.IsString(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], AddCredentialDTO.prototype, "id", void 0);
__decorate([
class_validator_1.IsUrl({}, { each: true }),
class_validator_1.Validate((o) => o['@context'].includes('https://www.w3.org/2018/credentials/v1')),
class_validator_1.ArrayNotEmpty(),
(0, class_validator_1.IsUrl)({}, { each: true }),
(0, class_validator_1.Validate)((o) => o['@context'].includes('https://www.w3.org/2018/credentials/v1')),
(0, class_validator_1.ArrayNotEmpty)(),
__metadata("design:type", Array)
], AddCredentialDTO.prototype, "@context", void 0);
__decorate([
class_validator_1.IsNotEmpty(),
class_validator_1.IsString({ each: true }),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)({ each: true }),
__metadata("design:type", Array)
], AddCredentialDTO.prototype, "type", void 0);
__decorate([
class_validator_1.IsNotEmpty(),
class_validator_1.IsString(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], AddCredentialDTO.prototype, "issuer", void 0);
__decorate([
class_validator_1.IsNotEmpty(),
class_validator_1.ValidateNested(),
class_transformer_1.Type(() => general_1.ProofDTO),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.ValidateNested)(),
(0, class_transformer_1.Type)(() => general_1.ProofDTO),
__metadata("design:type", general_1.ProofDTO)
], AddCredentialDTO.prototype, "proof", void 0);
__decorate([
class_validator_1.IsNotEmpty(),
(0, class_validator_1.IsNotEmpty)(),
__metadata("design:type", Object)
], AddCredentialDTO.prototype, "credentialSubject", void 0);
exports.AddCredentialDTO = AddCredentialDTO;
48 changes: 24 additions & 24 deletions lib/credentials/dto/credential.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,51 @@ const _1 = require("./");
class CredentialDTO {
}
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsArray(),
class_validator_1.ArrayMinSize(1),
class_validator_1.IsUrl({}, { each: true }),
class_validator_1.Validate((o) => o['@context'].includes('https://www.w3.org/2018/credentials/v1')),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.ArrayMinSize)(1),
(0, class_validator_1.IsUrl)({}, { each: true }),
(0, class_validator_1.Validate)((o) => o['@context'].includes('https://www.w3.org/2018/credentials/v1')),
__metadata("design:type", Array)
], CredentialDTO.prototype, "@context", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
__metadata("design:type", String)
], CredentialDTO.prototype, "id", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsArray(),
class_validator_1.ArrayMinSize(1),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.ArrayMinSize)(1),
__metadata("design:type", Array)
], CredentialDTO.prototype, "type", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
__metadata("design:type", Object)
], CredentialDTO.prototype, "issuer", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
class_validator_1.IsDateString(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
(0, class_validator_1.IsDateString)(),
__metadata("design:type", Object)
], CredentialDTO.prototype, "issuanceDate", void 0);
__decorate([
swagger_1.ApiPropertyOptional(),
class_validator_1.IsOptional(),
class_validator_1.IsDateString(),
(0, swagger_1.ApiPropertyOptional)(),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsDateString)(),
__metadata("design:type", String)
], CredentialDTO.prototype, "expirationDate", void 0);
__decorate([
swagger_1.ApiProperty(),
class_validator_1.IsNotEmpty(),
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsNotEmpty)(),
__metadata("design:type", Object)
], CredentialDTO.prototype, "credentialSubject", void 0);
__decorate([
swagger_1.ApiPropertyOptional({ type: () => _1.CredentialStatusDTO }),
class_validator_1.IsOptional(),
class_validator_1.ValidateNested(),
class_transformer_1.Type(() => _1.CredentialStatusDTO),
(0, swagger_1.ApiPropertyOptional)({ type: () => _1.CredentialStatusDTO }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.ValidateNested)(),
(0, class_transformer_1.Type)(() => _1.CredentialStatusDTO),
__metadata("design:type", _1.CredentialStatusDTO)
], CredentialDTO.prototype, "credentialStatus", void 0);
exports.CredentialDTO = CredentialDTO;
Loading

0 comments on commit 44cd859

Please sign in to comment.