@puzzlin/models 4.29.1 → 4.31.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/dist/apps/platform/assets/objects/asset.object.d.ts +2 -0
- package/dist/apps/platform/assets/objects/asset.object.d.ts.map +1 -1
- package/dist/apps/platform/assets/objects/asset.object.js +13 -7
- package/dist/apps/platform/assets/objects/asset.object.js.map +1 -1
- package/dist/apps/platform/credits/args/credit-ledger-entries.args.d.ts +10 -0
- package/dist/apps/platform/credits/args/credit-ledger-entries.args.d.ts.map +1 -0
- package/dist/apps/platform/credits/args/credit-ledger-entries.args.js +57 -0
- package/dist/apps/platform/credits/args/credit-ledger-entries.args.js.map +1 -0
- package/dist/apps/platform/credits/args/index.d.ts +1 -0
- package/dist/apps/platform/credits/args/index.d.ts.map +1 -1
- package/dist/apps/platform/credits/args/index.js +1 -0
- package/dist/apps/platform/credits/args/index.js.map +1 -1
- package/dist/apps/platform/credits/connections/credit-ledger-entry.connection.d.ts +6 -0
- package/dist/apps/platform/credits/connections/credit-ledger-entry.connection.d.ts.map +1 -0
- package/dist/apps/platform/credits/connections/credit-ledger-entry.connection.js +19 -0
- package/dist/apps/platform/credits/connections/credit-ledger-entry.connection.js.map +1 -0
- package/dist/apps/platform/credits/connections/index.d.ts +2 -0
- package/dist/apps/platform/credits/connections/index.d.ts.map +1 -0
- package/dist/apps/platform/credits/connections/index.js +18 -0
- package/dist/apps/platform/credits/connections/index.js.map +1 -0
- package/dist/apps/platform/credits/index.d.ts +1 -0
- package/dist/apps/platform/credits/index.d.ts.map +1 -1
- package/dist/apps/platform/credits/index.js +1 -0
- package/dist/apps/platform/credits/index.js.map +1 -1
- package/dist/apps/platform/credits/inputs/create-credit-ledger-entry.input.d.ts +2 -2
- package/dist/apps/platform/credits/inputs/create-credit-ledger-entry.input.d.ts.map +1 -1
- package/dist/apps/platform/credits/inputs/create-credit-ledger-entry.input.js +2 -2
- package/dist/apps/platform/credits/inputs/create-credit-ledger-entry.input.js.map +1 -1
- package/dist/apps/platform/credits/objects/credit-ledger-entry.object.d.ts +5 -2
- package/dist/apps/platform/credits/objects/credit-ledger-entry.object.d.ts.map +1 -1
- package/dist/apps/platform/credits/objects/credit-ledger-entry.object.js +16 -2
- package/dist/apps/platform/credits/objects/credit-ledger-entry.object.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CreditLedgerEntry } from '../../../../apps/platform/credits/objects';
|
|
1
2
|
import { User } from '../../../../apps/platform/users/objects';
|
|
2
3
|
import { Node, Timestamp } from '../../../../shared';
|
|
3
4
|
import { AssetTagEnum, AssetTypeEnum, AssetVisibilityEnum } from '@puzzlin/enums';
|
|
@@ -5,6 +6,7 @@ import { AssetAccess } from './asset-access.object';
|
|
|
5
6
|
declare const Asset_base: import("@nestjs/common").Type<Node & Timestamp>;
|
|
6
7
|
export declare class Asset extends Asset_base {
|
|
7
8
|
accesses?: AssetAccess[];
|
|
9
|
+
creditLedgerEntries?: CreditLedgerEntry[];
|
|
8
10
|
createdBy?: User;
|
|
9
11
|
createdById?: string;
|
|
10
12
|
creditsPrice: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.object.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/assets/objects/asset.object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;;AAEpD,qBAGa,KAAM,SAAQ,UAAiC;IAK1D,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"asset.object.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/assets/objects/asset.object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;;AAEpD,qBAGa,KAAM,SAAQ,UAAiC;IAK1D,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IAIzB,mBAAmB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAO1C,SAAS,CAAC,EAAE,IAAI,CAAC;IAKjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,YAAY,EAAE,MAAM,CAAC;IAKrB,EAAE,EAAE,MAAM,CAAC;IAGX,kBAAkB,EAAE,OAAO,CAAC;IAY5B,KAAK,CAAC,EAAE,IAAI,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAKhB,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;IAGtB,IAAI,EAAE,aAAa,CAAC;IAGpB,UAAU,EAAE,mBAAmB,CAAC;CACjC"}
|
|
@@ -10,7 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Asset = void 0;
|
|
13
|
-
const objects_1 = require("../../../../apps/platform/
|
|
13
|
+
const objects_1 = require("../../../../apps/platform/credits/objects");
|
|
14
|
+
const objects_2 = require("../../../../apps/platform/users/objects");
|
|
14
15
|
const shared_1 = require("../../../../shared");
|
|
15
16
|
const graphql_1 = require("@nestjs/graphql");
|
|
16
17
|
const enums_1 = require("@puzzlin/enums");
|
|
@@ -28,12 +29,17 @@ __decorate([
|
|
|
28
29
|
__metadata("design:type", Array)
|
|
29
30
|
], Asset.prototype, "accesses", void 0);
|
|
30
31
|
__decorate([
|
|
31
|
-
(0, graphql_1.Field)(() => objects_1.
|
|
32
|
+
(0, graphql_1.Field)(() => [objects_1.CreditLedgerEntry]),
|
|
33
|
+
(0, class_transformer_1.Type)(() => objects_1.CreditLedgerEntry),
|
|
34
|
+
__metadata("design:type", Array)
|
|
35
|
+
], Asset.prototype, "creditLedgerEntries", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, graphql_1.Field)(() => objects_2.User, {
|
|
32
38
|
description: 'User who created the asset. Immutable.',
|
|
33
39
|
nullable: true,
|
|
34
40
|
}),
|
|
35
|
-
(0, class_transformer_1.Type)(() =>
|
|
36
|
-
__metadata("design:type",
|
|
41
|
+
(0, class_transformer_1.Type)(() => objects_2.User),
|
|
42
|
+
__metadata("design:type", objects_2.User)
|
|
37
43
|
], Asset.prototype, "createdBy", void 0);
|
|
38
44
|
__decorate([
|
|
39
45
|
(0, graphql_1.Field)(() => graphql_1.ID, {
|
|
@@ -56,11 +62,11 @@ __decorate([
|
|
|
56
62
|
__metadata("design:type", Boolean)
|
|
57
63
|
], Asset.prototype, "isPurchaseRequired", void 0);
|
|
58
64
|
__decorate([
|
|
59
|
-
(0, graphql_1.Field)(() =>
|
|
65
|
+
(0, graphql_1.Field)(() => objects_2.User, {
|
|
60
66
|
description: 'User who owns the asset.',
|
|
61
67
|
}),
|
|
62
|
-
(0, class_transformer_1.Type)(() =>
|
|
63
|
-
__metadata("design:type",
|
|
68
|
+
(0, class_transformer_1.Type)(() => objects_2.User),
|
|
69
|
+
__metadata("design:type", objects_2.User)
|
|
64
70
|
], Asset.prototype, "owner", void 0);
|
|
65
71
|
__decorate([
|
|
66
72
|
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.object.js","sourceRoot":"","sources":["../../../../../src/apps/platform/assets/objects/asset.object.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAqD;AACrD,qCAA2C;AAC3C,6CAA0E;AAC1E,0CAAkF;AAClF,yDAAyC;AACzC,qDAA2D;AAC3D,+DAAoD;AAK7C,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,IAAA,0BAAgB,EAAC,aAAI,EAAE,kBAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"asset.object.js","sourceRoot":"","sources":["../../../../../src/apps/platform/assets/objects/asset.object.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAAoE;AACpE,2DAAqD;AACrD,qCAA2C;AAC3C,6CAA0E;AAC1E,0CAAkF;AAClF,yDAAyC;AACzC,qDAA2D;AAC3D,+DAAoD;AAK7C,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,IAAA,0BAAgB,EAAC,aAAI,EAAE,kBAAS,CAAC;CA2D3D,CAAA;AA3DY,sBAAK;AAKhB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,iCAAW,CAAC,EAAE;QAC1B,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iCAAW,CAAC;;uCACC;AAIzB;IAFC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,2BAAiB,CAAC,CAAC;IAChC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2BAAiB,CAAC;;kDACY;AAO1C;IALC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,cAAI,EAAE;QACjB,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,cAAI,CAAC;8BACL,cAAI;wCAAC;AAKjB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;0CACmB;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,0CAAwB,CAAC;;2CACjB;AAKrB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,WAAW,EAAE,8BAA8B;KAC5C,CAAC;;iCACS;AAGX;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;iDACO;AAY5B;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,cAAI,EAAE;QACjB,WAAW,EAAE,0BAA0B;KACxC,CAAC;IACD,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,cAAI,CAAC;8BACT,cAAI;oCAAC;AAGb;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;sCACA;AAKhB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,oBAAY,CAAC,EAAE;QAC3B,QAAQ,EAAE,IAAI;KACf,CAAC;;mCACoB;AAGtB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,qBAAa,CAAC;;mCACP;AAGpB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;yCACD;gBA1DrB,KAAK;IAHjB,IAAA,oBAAU,EAAC;QACV,UAAU,EAAE,aAAI;KACjB,CAAC;GACW,KAAK,CA2DjB","sourcesContent":["import { CreditLedgerEntry } from '@/apps/platform/credits/objects';\nimport { User } from '@/apps/platform/users/objects';\nimport { Node, Timestamp } from '@/shared';\nimport { Field, ID, IntersectionType, ObjectType } from '@nestjs/graphql';\nimport { AssetTagEnum, AssetTypeEnum, AssetVisibilityEnum } from '@puzzlin/enums';\nimport { Type } from 'class-transformer';\nimport { NonNegativeFloatResolver } from 'graphql-scalars';\nimport { AssetAccess } from './asset-access.object';\n\n@ObjectType({\n implements: Node,\n})\nexport class Asset extends IntersectionType(Node, Timestamp) {\n @Field(() => [AssetAccess], {\n nullable: true,\n })\n @Type(() => AssetAccess)\n accesses?: AssetAccess[];\n\n @Field(() => [CreditLedgerEntry])\n @Type(() => CreditLedgerEntry)\n creditLedgerEntries?: CreditLedgerEntry[];\n\n @Field(() => User, {\n description: 'User who created the asset. Immutable.',\n nullable: true,\n })\n @Type(() => User)\n createdBy?: User;\n\n @Field(() => ID, {\n nullable: true,\n })\n createdById?: string;\n\n @Field(() => NonNegativeFloatResolver)\n creditsPrice: number;\n\n @Field(() => ID, {\n description: 'ID shared with owning asset.',\n })\n id: string;\n\n @Field(() => Boolean)\n isPurchaseRequired: boolean;\n\n // NOTE: AssetPurchase isn't required in an MVP, but it could help reporting/auditing on top of the credit ledger.\n // @Field(() => AssetPurchase, {\n // nullable: true\n // })\n // purchase?: AssetPurchase;\n\n @Field(() => User, {\n description: 'User who owns the asset.',\n })\n @Type(() => User)\n owner?: User;\n\n @Field(() => ID)\n ownerId: string;\n\n @Field(() => [AssetTagEnum], {\n nullable: true,\n })\n tags?: AssetTagEnum[];\n\n @Field(() => AssetTypeEnum)\n type: AssetTypeEnum;\n\n @Field(() => AssetVisibilityEnum)\n visibility: AssetVisibilityEnum;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PaginationArgs } from '../../../../shared';
|
|
2
|
+
import { CreditLedgerEntryReasonEnum, ProductTypeEnum } from '@puzzlin/enums';
|
|
3
|
+
export declare class CreditLedgerEntriesArgs extends PaginationArgs {
|
|
4
|
+
assetId?: string;
|
|
5
|
+
byUser?: string;
|
|
6
|
+
productTypes?: ProductTypeEnum[];
|
|
7
|
+
reasons?: CreditLedgerEntryReasonEnum[];
|
|
8
|
+
user?: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=credit-ledger-entries.args.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-ledger-entries.args.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/args/credit-ledger-entries.args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE9E,qBACa,uBAAwB,SAAQ,cAAc;IAKzD,OAAO,CAAC,EAAE,MAAM,CAAC;IAMjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IAMjC,OAAO,CAAC,EAAE,2BAA2B,EAAE,CAAC;IAMxC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.CreditLedgerEntriesArgs = void 0;
|
|
13
|
+
const shared_1 = require("../../../../shared");
|
|
14
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
15
|
+
const enums_1 = require("@puzzlin/enums");
|
|
16
|
+
let CreditLedgerEntriesArgs = class CreditLedgerEntriesArgs extends shared_1.PaginationArgs {
|
|
17
|
+
};
|
|
18
|
+
exports.CreditLedgerEntriesArgs = CreditLedgerEntriesArgs;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, graphql_1.Field)(() => graphql_1.ID, {
|
|
21
|
+
description: 'Select entries for an asset.',
|
|
22
|
+
nullable: true,
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], CreditLedgerEntriesArgs.prototype, "assetId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, graphql_1.Field)(() => String, {
|
|
28
|
+
description: "Select entries by this search string on the adding user's name.",
|
|
29
|
+
nullable: true,
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreditLedgerEntriesArgs.prototype, "byUser", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, graphql_1.Field)(() => [enums_1.ProductTypeEnum], {
|
|
35
|
+
description: 'Select entries for any of these product types.',
|
|
36
|
+
nullable: true,
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", Array)
|
|
39
|
+
], CreditLedgerEntriesArgs.prototype, "productTypes", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, graphql_1.Field)(() => [enums_1.CreditLedgerEntryReasonEnum], {
|
|
42
|
+
description: 'Select entries with any of these reasons.',
|
|
43
|
+
nullable: true,
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", Array)
|
|
46
|
+
], CreditLedgerEntriesArgs.prototype, "reasons", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, graphql_1.Field)(() => String, {
|
|
49
|
+
description: "Select entries by this search string on the user's name.",
|
|
50
|
+
nullable: true,
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CreditLedgerEntriesArgs.prototype, "user", void 0);
|
|
54
|
+
exports.CreditLedgerEntriesArgs = CreditLedgerEntriesArgs = __decorate([
|
|
55
|
+
(0, graphql_1.ArgsType)()
|
|
56
|
+
], CreditLedgerEntriesArgs);
|
|
57
|
+
//# sourceMappingURL=credit-ledger-entries.args.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-ledger-entries.args.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/args/credit-ledger-entries.args.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0C;AAC1C,6CAAsD;AACtD,0CAA8E;AAGvE,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,uBAAc;CA8B1D,CAAA;AA9BY,0DAAuB;AAKlC;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,IAAI;KACf,CAAC;;wDACe;AAMjB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,iEAAiE;QAC9E,QAAQ,EAAE,IAAI;KACf,CAAC;;uDACc;AAMhB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,uBAAe,CAAC,EAAE;QAC9B,WAAW,EAAE,gDAAgD;QAC7D,QAAQ,EAAE,IAAI;KACf,CAAC;;6DAC+B;AAMjC;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,mCAA2B,CAAC,EAAE;QAC1C,WAAW,EAAE,2CAA2C;QACxD,QAAQ,EAAE,IAAI;KACf,CAAC;;wDACsC;AAMxC;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,0DAA0D;QACvE,QAAQ,EAAE,IAAI;KACf,CAAC;;qDACY;kCA7BH,uBAAuB;IADnC,IAAA,kBAAQ,GAAE;GACE,uBAAuB,CA8BnC","sourcesContent":["import { PaginationArgs } from '@/shared';\nimport { ArgsType, Field, ID } from '@nestjs/graphql';\nimport { CreditLedgerEntryReasonEnum, ProductTypeEnum } from '@puzzlin/enums';\n\n@ArgsType()\nexport class CreditLedgerEntriesArgs extends PaginationArgs {\n @Field(() => ID, {\n description: 'Select entries for an asset.',\n nullable: true,\n })\n assetId?: string;\n\n @Field(() => String, {\n description: \"Select entries by this search string on the adding user's name.\",\n nullable: true,\n })\n byUser?: string;\n\n @Field(() => [ProductTypeEnum], {\n description: 'Select entries for any of these product types.',\n nullable: true,\n })\n productTypes?: ProductTypeEnum[];\n\n @Field(() => [CreditLedgerEntryReasonEnum], {\n description: 'Select entries with any of these reasons.',\n nullable: true,\n })\n reasons?: CreditLedgerEntryReasonEnum[];\n\n @Field(() => String, {\n description: \"Select entries by this search string on the user's name.\",\n nullable: true,\n })\n user?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/args/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/args/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC"}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./credit-balance.args"), exports);
|
|
18
|
+
__exportStar(require("./credit-ledger-entries.args"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/args/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC","sourcesContent":["export * from './credit-balance.args';\
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/args/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,+DAA6C","sourcesContent":["export * from './credit-balance.args';\nexport * from './credit-ledger-entries.args';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CreditLedgerEntry } from '../objects';
|
|
2
|
+
declare const CreditLedgerEntryConnection_base: import("@nestjs/common").Type<import("../../../../shared").IConnectionType<CreditLedgerEntry>>;
|
|
3
|
+
export declare class CreditLedgerEntryConnection extends CreditLedgerEntryConnection_base {
|
|
4
|
+
}
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=credit-ledger-entry.connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-ledger-entry.connection.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/connections/credit-ledger-entry.connection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;;AAE/C,qBACa,2BAA4B,SAAQ,gCAA6B;CAAG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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.CreditLedgerEntryConnection = void 0;
|
|
10
|
+
const shared_1 = require("../../../../shared");
|
|
11
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
12
|
+
const objects_1 = require("../objects");
|
|
13
|
+
let CreditLedgerEntryConnection = class CreditLedgerEntryConnection extends (0, shared_1.Connection)(objects_1.CreditLedgerEntry) {
|
|
14
|
+
};
|
|
15
|
+
exports.CreditLedgerEntryConnection = CreditLedgerEntryConnection;
|
|
16
|
+
exports.CreditLedgerEntryConnection = CreditLedgerEntryConnection = __decorate([
|
|
17
|
+
(0, graphql_1.ObjectType)()
|
|
18
|
+
], CreditLedgerEntryConnection);
|
|
19
|
+
//# sourceMappingURL=credit-ledger-entry.connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credit-ledger-entry.connection.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/connections/credit-ledger-entry.connection.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qCAAsC;AACtC,6CAA6C;AAC7C,wCAA+C;AAGxC,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,IAAA,mBAAU,EAAC,2BAAiB,CAAC;CAAG,CAAA;AAApE,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,oBAAU,GAAE;GACA,2BAA2B,CAAyC","sourcesContent":["import { Connection } from '@/shared';\nimport { ObjectType } from '@nestjs/graphql';\nimport { CreditLedgerEntry } from '../objects';\n\n@ObjectType()\nexport class CreditLedgerEntryConnection extends Connection(CreditLedgerEntry) {}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
|
|
@@ -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("./credit-ledger-entry.connection"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/connections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD","sourcesContent":["export * from './credit-ledger-entry.connection';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apps/platform/credits/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/apps/platform/credits/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./args"), exports);
|
|
18
|
+
__exportStar(require("./connections"), exports);
|
|
18
19
|
__exportStar(require("./inputs"), exports);
|
|
19
20
|
__exportStar(require("./objects"), exports);
|
|
20
21
|
__exportStar(require("./payloads"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apps/platform/credits/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B","sourcesContent":["export * from './args';\
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apps/platform/credits/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B","sourcesContent":["export * from './args';\nexport * from './connections';\nexport * from './inputs';\nexport * from './objects';\nexport * from './payloads';\n"]}
|
|
@@ -2,9 +2,9 @@ import { CreditLedgerEntryReasonEnum, ProductTypeEnum } from '@puzzlin/enums';
|
|
|
2
2
|
export declare class CreateCreditLedgerEntryInput {
|
|
3
3
|
assetId?: string;
|
|
4
4
|
bySystem?: string;
|
|
5
|
-
byUserId?: string;
|
|
5
|
+
byUserId?: string | null;
|
|
6
6
|
notes?: string;
|
|
7
|
-
orderId?: string;
|
|
7
|
+
orderId?: string | null;
|
|
8
8
|
productType: ProductTypeEnum;
|
|
9
9
|
quantity: number;
|
|
10
10
|
reason: CreditLedgerEntryReasonEnum;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-credit-ledger-entry.input.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/inputs/create-credit-ledger-entry.input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE9E,qBACa,4BAA4B;IAIvC,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"create-credit-ledger-entry.input.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/inputs/create-credit-ledger-entry.input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE9E,qBACa,4BAA4B;IAIvC,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKzB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,WAAW,EAAE,eAAe,CAAC;IAG7B,QAAQ,EAAE,MAAM,CAAC;IAGjB,MAAM,EAAE,2BAA2B,CAAC;IAGpC,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -31,7 +31,7 @@ __decorate([
|
|
|
31
31
|
(0, graphql_1.Field)(() => graphql_1.ID, {
|
|
32
32
|
nullable: true,
|
|
33
33
|
}),
|
|
34
|
-
__metadata("design:type",
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
35
|
], CreateCreditLedgerEntryInput.prototype, "byUserId", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
(0, graphql_1.Field)(() => String, {
|
|
@@ -43,7 +43,7 @@ __decorate([
|
|
|
43
43
|
(0, graphql_1.Field)(() => graphql_1.ID, {
|
|
44
44
|
nullable: true,
|
|
45
45
|
}),
|
|
46
|
-
__metadata("design:type",
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
47
|
], CreateCreditLedgerEntryInput.prototype, "orderId", void 0);
|
|
48
48
|
__decorate([
|
|
49
49
|
(0, graphql_1.Field)(() => enums_1.ProductTypeEnum),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-credit-ledger-entry.input.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/inputs/create-credit-ledger-entry.input.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4D;AAC5D,0CAA8E;AAGvE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;CAqCxC,CAAA;AArCY,oEAA4B;AAIvC;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;6DACe;AAKjB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;8DACgB;AAKlB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;
|
|
1
|
+
{"version":3,"file":"create-credit-ledger-entry.input.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/inputs/create-credit-ledger-entry.input.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4D;AAC5D,0CAA8E;AAGvE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;CAqCxC,CAAA;AArCY,oEAA4B;AAIvC;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;6DACe;AAKjB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;8DACgB;AAKlB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;8DACuB;AAKzB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;2DACa;AAKf;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;6DACsB;AAGxB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,uBAAe,CAAC;;iEACA;AAG7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,CAAC;;8DACA;AAGjB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;;4DACL;AAGpC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;4DACD;uCApCJ,4BAA4B;IADxC,IAAA,mBAAS,GAAE;GACC,4BAA4B,CAqCxC","sourcesContent":["import { Field, ID, InputType, Int } from '@nestjs/graphql';\r\nimport { CreditLedgerEntryReasonEnum, ProductTypeEnum } from '@puzzlin/enums';\r\n\r\n@InputType()\r\nexport class CreateCreditLedgerEntryInput {\r\n @Field(() => ID, {\r\n nullable: true,\r\n })\r\n assetId?: string;\r\n\r\n @Field(() => String, {\r\n nullable: true,\r\n })\r\n bySystem?: string;\r\n\r\n @Field(() => ID, {\n nullable: true,\n })\n byUserId?: string | null;\n\r\n @Field(() => String, {\r\n nullable: true,\r\n })\r\n notes?: string;\r\n\r\n @Field(() => ID, {\n nullable: true,\n })\n orderId?: string | null;\n\r\n @Field(() => ProductTypeEnum)\r\n productType: ProductTypeEnum;\r\n\r\n @Field(() => Int)\r\n quantity: number;\r\n\r\n @Field(() => CreditLedgerEntryReasonEnum)\r\n reason: CreditLedgerEntryReasonEnum;\r\n\r\n @Field(() => ID)\r\n userId: string;\r\n}\r\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { User } from '../../../../apps/platform/users/objects';
|
|
1
2
|
import { Node, Timestamp } from '../../../../shared';
|
|
2
3
|
import { CreditLedgerEntryReasonEnum, ProductTypeEnum } from '@puzzlin/enums';
|
|
3
4
|
import { CreateCreditLedgerEntryInput } from '../inputs';
|
|
@@ -5,12 +6,14 @@ declare const CreditLedgerEntry_base: import("@nestjs/common").Type<Node & Times
|
|
|
5
6
|
export declare class CreditLedgerEntry extends CreditLedgerEntry_base implements CreateCreditLedgerEntryInput {
|
|
6
7
|
assetId?: string;
|
|
7
8
|
bySystem?: string;
|
|
8
|
-
|
|
9
|
+
byUser?: User | null;
|
|
10
|
+
byUserId: string | null;
|
|
9
11
|
notes?: string;
|
|
10
|
-
orderId
|
|
12
|
+
orderId: string | null;
|
|
11
13
|
productType: ProductTypeEnum;
|
|
12
14
|
quantity: number;
|
|
13
15
|
reason: CreditLedgerEntryReasonEnum;
|
|
16
|
+
user?: User;
|
|
14
17
|
userId: string;
|
|
15
18
|
}
|
|
16
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-ledger-entry.object.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/objects/credit-ledger-entry.object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"credit-ledger-entry.object.d.ts","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/objects/credit-ledger-entry.object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;;AAEzD,qBAGa,iBAAkB,SAAQ,sBAAkC,YAAW,4BAA4B;IAI9G,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAKrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAKxB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAGvB,WAAW,EAAE,eAAe,CAAC;IAG7B,QAAQ,EAAE,MAAM,CAAC;IAGjB,MAAM,EAAE,2BAA2B,CAAC;IAIpC,IAAI,CAAC,EAAE,IAAI,CAAC;IAGZ,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -10,9 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CreditLedgerEntry = void 0;
|
|
13
|
+
const objects_1 = require("../../../../apps/platform/users/objects");
|
|
13
14
|
const shared_1 = require("../../../../shared");
|
|
14
15
|
const graphql_1 = require("@nestjs/graphql");
|
|
15
16
|
const enums_1 = require("@puzzlin/enums");
|
|
17
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
18
|
let CreditLedgerEntry = class CreditLedgerEntry extends (0, graphql_1.IntersectionType)(shared_1.Node, shared_1.Timestamp) {
|
|
17
19
|
};
|
|
18
20
|
exports.CreditLedgerEntry = CreditLedgerEntry;
|
|
@@ -28,11 +30,18 @@ __decorate([
|
|
|
28
30
|
}),
|
|
29
31
|
__metadata("design:type", String)
|
|
30
32
|
], CreditLedgerEntry.prototype, "bySystem", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, graphql_1.Field)(() => objects_1.User, {
|
|
35
|
+
nullable: true,
|
|
36
|
+
}),
|
|
37
|
+
(0, class_transformer_1.Type)(() => objects_1.User),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], CreditLedgerEntry.prototype, "byUser", void 0);
|
|
31
40
|
__decorate([
|
|
32
41
|
(0, graphql_1.Field)(() => graphql_1.ID, {
|
|
33
42
|
nullable: true,
|
|
34
43
|
}),
|
|
35
|
-
__metadata("design:type",
|
|
44
|
+
__metadata("design:type", Object)
|
|
36
45
|
], CreditLedgerEntry.prototype, "byUserId", void 0);
|
|
37
46
|
__decorate([
|
|
38
47
|
(0, graphql_1.Field)(() => String, {
|
|
@@ -44,7 +53,7 @@ __decorate([
|
|
|
44
53
|
(0, graphql_1.Field)(() => graphql_1.ID, {
|
|
45
54
|
nullable: true,
|
|
46
55
|
}),
|
|
47
|
-
__metadata("design:type",
|
|
56
|
+
__metadata("design:type", Object)
|
|
48
57
|
], CreditLedgerEntry.prototype, "orderId", void 0);
|
|
49
58
|
__decorate([
|
|
50
59
|
(0, graphql_1.Field)(() => enums_1.ProductTypeEnum),
|
|
@@ -58,6 +67,11 @@ __decorate([
|
|
|
58
67
|
(0, graphql_1.Field)(() => enums_1.CreditLedgerEntryReasonEnum),
|
|
59
68
|
__metadata("design:type", String)
|
|
60
69
|
], CreditLedgerEntry.prototype, "reason", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, graphql_1.Field)(() => objects_1.User),
|
|
72
|
+
(0, class_transformer_1.Type)(() => objects_1.User),
|
|
73
|
+
__metadata("design:type", objects_1.User)
|
|
74
|
+
], CreditLedgerEntry.prototype, "user", void 0);
|
|
61
75
|
__decorate([
|
|
62
76
|
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
63
77
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-ledger-entry.object.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/objects/credit-ledger-entry.object.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA2C;AAC3C,6CAAiF;AACjF,0CAA8E;
|
|
1
|
+
{"version":3,"file":"credit-ledger-entry.object.js","sourceRoot":"","sources":["../../../../../src/apps/platform/credits/objects/credit-ledger-entry.object.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAqD;AACrD,qCAA2C;AAC3C,6CAAiF;AACjF,0CAA8E;AAC9E,yDAAyC;AAMlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,IAAA,0BAAgB,EAAC,aAAI,EAAE,kBAAS,CAAC;CA+CvE,CAAA;AA/CY,8CAAiB;AAI5B;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;kDACe;AAKjB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;mDACgB;AAMlB;IAJC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,cAAI,EAAE;QACjB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,cAAI,CAAC;;iDACI;AAKrB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;mDACsB;AAKxB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;gDACa;AAKf;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;kDACqB;AAGvB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,uBAAe,CAAC;;sDACA;AAG7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,eAAK,CAAC;;mDACF;AAGjB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;;iDACL;AAIpC;IAFC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,cAAI,CAAC;IACjB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,cAAI,CAAC;8BACV,cAAI;+CAAC;AAGZ;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;iDACD;4BA9CJ,iBAAiB;IAH7B,IAAA,oBAAU,EAAC;QACV,UAAU,EAAE,aAAI;KACjB,CAAC;GACW,iBAAiB,CA+C7B","sourcesContent":["import { User } from '@/apps/platform/users/objects';\r\nimport { Node, Timestamp } from '@/shared';\r\nimport { Field, Float, ID, IntersectionType, ObjectType } from '@nestjs/graphql';\r\nimport { CreditLedgerEntryReasonEnum, ProductTypeEnum } from '@puzzlin/enums';\r\nimport { Type } from 'class-transformer';\r\nimport { CreateCreditLedgerEntryInput } from '../inputs';\r\n\r\n@ObjectType({\r\n implements: Node,\r\n})\r\nexport class CreditLedgerEntry extends IntersectionType(Node, Timestamp) implements CreateCreditLedgerEntryInput {\r\n @Field(() => ID, {\r\n nullable: true,\r\n })\r\n assetId?: string;\r\n\r\n @Field(() => String, {\r\n nullable: true,\r\n })\r\n bySystem?: string;\r\n\r\n @Field(() => User, {\r\n nullable: true,\r\n })\r\n @Type(() => User)\r\n byUser?: User | null;\r\n\r\n @Field(() => ID, {\r\n nullable: true,\r\n })\r\n byUserId: string | null;\r\n\r\n @Field(() => String, {\r\n nullable: true,\r\n })\r\n notes?: string;\r\n\r\n @Field(() => ID, {\r\n nullable: true,\r\n })\r\n orderId: string | null;\r\n\r\n @Field(() => ProductTypeEnum)\r\n productType: ProductTypeEnum;\r\n\r\n @Field(() => Float)\r\n quantity: number;\r\n\r\n @Field(() => CreditLedgerEntryReasonEnum)\r\n reason: CreditLedgerEntryReasonEnum;\r\n\r\n @Field(() => User)\r\n @Type(() => User)\r\n user?: User;\r\n\r\n @Field(() => ID)\r\n userId: string;\r\n}\r\n"]}
|