@things-factory/biz-base 10.1.122 → 10.1.134

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.
Files changed (45) hide show
  1. package/dist-server/service/counterparty/counterparty-mutation.d.ts +8 -0
  2. package/dist-server/service/counterparty/counterparty-mutation.js +75 -0
  3. package/dist-server/service/counterparty/counterparty-mutation.js.map +1 -0
  4. package/dist-server/service/counterparty/counterparty-names.d.ts +80 -0
  5. package/dist-server/service/counterparty/counterparty-names.js +206 -0
  6. package/dist-server/service/counterparty/counterparty-names.js.map +1 -0
  7. package/dist-server/service/counterparty/counterparty-query.d.ts +11 -0
  8. package/dist-server/service/counterparty/counterparty-query.js +79 -0
  9. package/dist-server/service/counterparty/counterparty-query.js.map +1 -0
  10. package/dist-server/service/counterparty/counterparty-service.d.ts +22 -0
  11. package/dist-server/service/counterparty/counterparty-service.js +85 -0
  12. package/dist-server/service/counterparty/counterparty-service.js.map +1 -0
  13. package/dist-server/service/counterparty/counterparty-type.d.ts +37 -0
  14. package/dist-server/service/counterparty/counterparty-type.js +145 -0
  15. package/dist-server/service/counterparty/counterparty-type.js.map +1 -0
  16. package/dist-server/service/counterparty/counterparty.d.ts +40 -0
  17. package/dist-server/service/counterparty/counterparty.js +148 -0
  18. package/dist-server/service/counterparty/counterparty.js.map +1 -0
  19. package/dist-server/service/counterparty/index.d.ts +5 -0
  20. package/dist-server/service/counterparty/index.js +9 -0
  21. package/dist-server/service/counterparty/index.js.map +1 -0
  22. package/dist-server/service/index.d.ts +6 -4
  23. package/dist-server/service/index.js +7 -5
  24. package/dist-server/service/index.js.map +1 -1
  25. package/dist-server/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +5 -4
  27. package/tests/counterparty-names.test.mjs +27 -0
  28. package/tests/counterparty.test.mjs +69 -0
  29. package/translations/en.json +6 -1
  30. package/translations/ko.json +6 -1
  31. package/dist-server/service/contact-point/contact-point-mutation.d.ts +0 -13
  32. package/dist-server/service/contact-point/contact-point-mutation.js +0 -164
  33. package/dist-server/service/contact-point/contact-point-mutation.js.map +0 -1
  34. package/dist-server/service/contact-point/contact-point-query.d.ts +0 -7
  35. package/dist-server/service/contact-point/contact-point-query.js +0 -56
  36. package/dist-server/service/contact-point/contact-point-query.js.map +0 -1
  37. package/dist-server/service/contact-point/contact-point-types.d.ts +0 -58
  38. package/dist-server/service/contact-point/contact-point-types.js +0 -226
  39. package/dist-server/service/contact-point/contact-point-types.js.map +0 -1
  40. package/dist-server/service/contact-point/contact-point.d.ts +0 -34
  41. package/dist-server/service/contact-point/contact-point.js +0 -171
  42. package/dist-server/service/contact-point/contact-point.js.map +0 -1
  43. package/dist-server/service/contact-point/index.d.ts +0 -5
  44. package/dist-server/service/contact-point/index.js +0 -9
  45. package/dist-server/service/contact-point/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"counterparty-service.js","sourceRoot":"","sources":["../../../server/service/counterparty/counterparty-service.ts"],"names":[],"mappings":";;AAmBA,sDAEC;AAuCD,gDA0BC;AAtFD,qCAA2C;AAE3C,iDAA+C;AAE/C,iDAA+D;AAE/D,6DAAyE;AAUzE,MAAM,SAAS,GAAY,EAAE,CAAA;AAE7B,uEAAuE;AACvE,SAAgB,qBAAqB,CAAC,QAAe;IACnD,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC1B,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,GAAuC;IACrD,CAAC,+BAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;IAChE,CAAC,+BAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;CAC5C,CAAA;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;IACvC,IAAI,CAAC,IAAI;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MAAM,IAAI,eAAO,CAAC,wBAAwB,EAAE,EAAE,EAAE,qDAAqD,CAAC,CAAA;QAC3I,MAAM,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAA,YAAE,EAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,KAAK,GAAmB,EAAE,CAAA;IAChC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;QACxF,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,eAAO,CAAC,wBAAwB,EAAE,EAAE,EAAE,qDAAqD,CAAC,CAAA;QACpH,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACpE,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAkB,CAAC,CAAC,CAAA;IAExH,KAAK,MAAM,QAAQ,IAAI,SAAS;QAAE,MAAM,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;IACnE,OAAO,KAAK,CAAA;AACd,CAAC","sourcesContent":["import { EntityManager, In } from 'typeorm'\n\nimport { Refusal } from '@things-factory/shell'\n\nimport { Counterparty, CounterpartyKind } from './counterparty'\nimport { CounterpartyPatch } from './counterparty-type'\nimport { nameClash, normalizeBusinessNumber } from './counterparty-names'\n\n/**\n * Saving the counterparty list of a domain, and what an app does once it is saved.\n *\n * A module whose documents keep a counterparty's name (a contract, a bank line) links the rows that carry a newly\n * registered name — that is its rule, not this one's — by listening here (§`onCounterpartiesSaved`).\n */\n\ntype Saved = (tx: EntityManager, domain: { id: string }, saved: Counterparty[]) => Promise<void>\nconst listeners: Saved[] = []\n\n/** Run after every save of counterparties, in the same transaction. */\nexport function onCounterpartiesSaved(listener: Saved): void {\n listeners.push(listener)\n}\n\n/** The words people write for the kind, as well as the values themselves. */\nconst KIND_WORDS: Record<CounterpartyKind, string[]> = {\n [CounterpartyKind.COMPANY]: ['COMPANY', '회사', '법인', '사업자', '기업'],\n [CounterpartyKind.PERSON]: ['PERSON', '개인']\n}\n\nfunction kindOf(value: unknown): CounterpartyKind | undefined {\n const text = String(value ?? '').trim()\n if (!text) return undefined\n const found = (Object.keys(KIND_WORDS) as CounterpartyKind[]).find(kind => KIND_WORDS[kind].some(word => word.toLowerCase() === text.toLowerCase()))\n if (!found) throw new Refusal('counterparty-kind-invalid', { text }, `'${text}' is neither a company nor a person`)\n return found\n}\n\nconst TEXT = ['aliases', 'branchNumber', 'representative', 'address', 'billingAddress', 'businessType', 'businessItem', 'notes'] as const\n\n/** A patch as the row it writes: names trimmed, the kind and the business number in their stored form. */\nfunction rowOf(patch: Partial<CounterpartyPatch>, isNew: boolean): Partial<Counterparty> {\n const row: Record<string, any> = {}\n if (patch.name !== undefined || isNew) {\n const name = String(patch.name ?? '').trim()\n if (!name) throw new Refusal('counterparty-name-required', {}, 'a counterparty needs a name')\n row.name = name\n }\n for (const field of TEXT) if (patch[field] !== undefined) row[field] = String(patch[field] ?? '').trim() || null\n if (patch.kind !== undefined) row.kind = kindOf(patch.kind) ?? CounterpartyKind.COMPANY\n else if (isNew) row.kind = CounterpartyKind.COMPANY\n if (patch.businessNumber !== undefined) row.businessNumber = normalizeBusinessNumber(patch.businessNumber)\n if (patch.zeroRated !== undefined) row.zeroRated = !!patch.zeroRated\n if (patch.active !== undefined) row.active = patch.active !== false\n return row\n}\n\n/**\n * Apply grid rows to a domain's counterparties: `+` (or no id) registers, `M` changes, `-` deletes (softly — the rows\n * that name it keep the name). Two counterparties whose names mean the same party are refused (§`nameClash`).\n */\nexport async function saveCounterparties(tx: EntityManager, domain: { id: string }, user: any, patches: CounterpartyPatch[]): Promise<Counterparty[]> {\n const repo = tx.getRepository(Counterparty)\n const deletes = patches.filter(one => one.cuFlag === '-' && one.id).map(one => one.id!)\n const updates = patches.filter(one => one.id && one.cuFlag !== '-' && one.cuFlag !== '+').map(one => ({ id: one.id!, ...rowOf(one, false) }))\n const creates = patches.filter(one => !one.id || one.cuFlag === '+').filter(one => one.cuFlag !== '-').map(one => rowOf(one, true))\n\n const existing = await repo.find({ where: { domain: { id: domain.id } }, select: ['id', 'name'] })\n const clash = nameClash(existing, [...updates, ...creates], deletes)\n if (clash) throw new Refusal('counterparty-name-clash', { name: clash[1], existing: clash[0] }, `'${clash[1]}' is the same counterparty as '${clash[0]}' - edit that one instead`)\n\n if (deletes.length) {\n const owned = await repo.find({ where: { domain: { id: domain.id }, id: In(deletes) }, select: ['id'] })\n if (owned.length !== deletes.length) throw new Refusal('counterparty-not-found', {}, 'a counterparty was not found - reload and try again')\n await repo.softDelete({ id: In(deletes) })\n }\n\n const saved: Counterparty[] = []\n for (const row of updates) {\n const current = await repo.findOne({ where: { domain: { id: domain.id }, id: row.id } })\n if (!current) throw new Refusal('counterparty-not-found', {}, 'a counterparty was not found - reload and try again')\n saved.push(await repo.save({ ...current, ...row, updater: user }))\n }\n for (const row of creates) saved.push(await repo.save({ ...row, domain, creator: user, updater: user } as Counterparty))\n\n for (const listener of listeners) await listener(tx, domain, saved)\n return saved\n}\n"]}
@@ -0,0 +1,37 @@
1
+ import { Counterparty, CounterpartyKind } from './counterparty';
2
+ export declare class NewCounterparty {
3
+ name: string;
4
+ aliases?: string;
5
+ kind?: CounterpartyKind;
6
+ businessNumber?: string;
7
+ branchNumber?: string;
8
+ representative?: string;
9
+ address?: string;
10
+ billingAddress?: string;
11
+ businessType?: string;
12
+ businessItem?: string;
13
+ zeroRated?: boolean;
14
+ notes?: string;
15
+ active?: boolean;
16
+ }
17
+ export declare class CounterpartyPatch {
18
+ id?: string;
19
+ cuFlag?: string;
20
+ name?: string;
21
+ aliases?: string;
22
+ kind?: string;
23
+ businessNumber?: string;
24
+ branchNumber?: string;
25
+ representative?: string;
26
+ address?: string;
27
+ billingAddress?: string;
28
+ businessType?: string;
29
+ businessItem?: string;
30
+ zeroRated?: boolean;
31
+ notes?: string;
32
+ active?: boolean;
33
+ }
34
+ export declare class CounterpartyList {
35
+ items: Counterparty[];
36
+ total: number;
37
+ }
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CounterpartyList = exports.CounterpartyPatch = exports.NewCounterparty = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const counterparty_1 = require("./counterparty");
7
+ let NewCounterparty = class NewCounterparty {
8
+ };
9
+ exports.NewCounterparty = NewCounterparty;
10
+ tslib_1.__decorate([
11
+ (0, type_graphql_1.Field)({ description: 'The name the business knows it by' }),
12
+ tslib_1.__metadata("design:type", String)
13
+ ], NewCounterparty.prototype, "name", void 0);
14
+ tslib_1.__decorate([
15
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Other names it appears under' }),
16
+ tslib_1.__metadata("design:type", String)
17
+ ], NewCounterparty.prototype, "aliases", void 0);
18
+ tslib_1.__decorate([
19
+ (0, type_graphql_1.Field)(type => counterparty_1.CounterpartyKind, { nullable: true, description: 'A company or a person' }),
20
+ tslib_1.__metadata("design:type", String)
21
+ ], NewCounterparty.prototype, "kind", void 0);
22
+ tslib_1.__decorate([
23
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business registration number' }),
24
+ tslib_1.__metadata("design:type", String)
25
+ ], NewCounterparty.prototype, "businessNumber", void 0);
26
+ tslib_1.__decorate([
27
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Sub-business place number' }),
28
+ tslib_1.__metadata("design:type", String)
29
+ ], NewCounterparty.prototype, "branchNumber", void 0);
30
+ tslib_1.__decorate([
31
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Representative' }),
32
+ tslib_1.__metadata("design:type", String)
33
+ ], NewCounterparty.prototype, "representative", void 0);
34
+ tslib_1.__decorate([
35
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Address' }),
36
+ tslib_1.__metadata("design:type", String)
37
+ ], NewCounterparty.prototype, "address", void 0);
38
+ tslib_1.__decorate([
39
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Billing address' }),
40
+ tslib_1.__metadata("design:type", String)
41
+ ], NewCounterparty.prototype, "billingAddress", void 0);
42
+ tslib_1.__decorate([
43
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business type (업태)' }),
44
+ tslib_1.__metadata("design:type", String)
45
+ ], NewCounterparty.prototype, "businessType", void 0);
46
+ tslib_1.__decorate([
47
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business item (종목)' }),
48
+ tslib_1.__metadata("design:type", String)
49
+ ], NewCounterparty.prototype, "businessItem", void 0);
50
+ tslib_1.__decorate([
51
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Whether sales to it are zero-rated' }),
52
+ tslib_1.__metadata("design:type", Boolean)
53
+ ], NewCounterparty.prototype, "zeroRated", void 0);
54
+ tslib_1.__decorate([
55
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
56
+ tslib_1.__metadata("design:type", String)
57
+ ], NewCounterparty.prototype, "notes", void 0);
58
+ tslib_1.__decorate([
59
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Whether it is still offered for new rows' }),
60
+ tslib_1.__metadata("design:type", Boolean)
61
+ ], NewCounterparty.prototype, "active", void 0);
62
+ exports.NewCounterparty = NewCounterparty = tslib_1.__decorate([
63
+ (0, type_graphql_1.InputType)({ description: 'A counterparty to register' })
64
+ ], NewCounterparty);
65
+ let CounterpartyPatch = class CounterpartyPatch {
66
+ };
67
+ exports.CounterpartyPatch = CounterpartyPatch;
68
+ tslib_1.__decorate([
69
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true, description: 'The counterparty; empty for a new one' }),
70
+ tslib_1.__metadata("design:type", String)
71
+ ], CounterpartyPatch.prototype, "id", void 0);
72
+ tslib_1.__decorate([
73
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }),
74
+ tslib_1.__metadata("design:type", String)
75
+ ], CounterpartyPatch.prototype, "cuFlag", void 0);
76
+ tslib_1.__decorate([
77
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Name' }),
78
+ tslib_1.__metadata("design:type", String)
79
+ ], CounterpartyPatch.prototype, "name", void 0);
80
+ tslib_1.__decorate([
81
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Other names it appears under' }),
82
+ tslib_1.__metadata("design:type", String)
83
+ ], CounterpartyPatch.prototype, "aliases", void 0);
84
+ tslib_1.__decorate([
85
+ (0, type_graphql_1.Field)({ nullable: true, description: 'COMPANY or PERSON, or the words people write for them' }),
86
+ tslib_1.__metadata("design:type", String)
87
+ ], CounterpartyPatch.prototype, "kind", void 0);
88
+ tslib_1.__decorate([
89
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business registration number' }),
90
+ tslib_1.__metadata("design:type", String)
91
+ ], CounterpartyPatch.prototype, "businessNumber", void 0);
92
+ tslib_1.__decorate([
93
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Sub-business place number' }),
94
+ tslib_1.__metadata("design:type", String)
95
+ ], CounterpartyPatch.prototype, "branchNumber", void 0);
96
+ tslib_1.__decorate([
97
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Representative' }),
98
+ tslib_1.__metadata("design:type", String)
99
+ ], CounterpartyPatch.prototype, "representative", void 0);
100
+ tslib_1.__decorate([
101
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Address' }),
102
+ tslib_1.__metadata("design:type", String)
103
+ ], CounterpartyPatch.prototype, "address", void 0);
104
+ tslib_1.__decorate([
105
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Billing address' }),
106
+ tslib_1.__metadata("design:type", String)
107
+ ], CounterpartyPatch.prototype, "billingAddress", void 0);
108
+ tslib_1.__decorate([
109
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business type (업태)' }),
110
+ tslib_1.__metadata("design:type", String)
111
+ ], CounterpartyPatch.prototype, "businessType", void 0);
112
+ tslib_1.__decorate([
113
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business item (종목)' }),
114
+ tslib_1.__metadata("design:type", String)
115
+ ], CounterpartyPatch.prototype, "businessItem", void 0);
116
+ tslib_1.__decorate([
117
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Whether sales to it are zero-rated' }),
118
+ tslib_1.__metadata("design:type", Boolean)
119
+ ], CounterpartyPatch.prototype, "zeroRated", void 0);
120
+ tslib_1.__decorate([
121
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
122
+ tslib_1.__metadata("design:type", String)
123
+ ], CounterpartyPatch.prototype, "notes", void 0);
124
+ tslib_1.__decorate([
125
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Whether it is still offered for new rows' }),
126
+ tslib_1.__metadata("design:type", Boolean)
127
+ ], CounterpartyPatch.prototype, "active", void 0);
128
+ exports.CounterpartyPatch = CounterpartyPatch = tslib_1.__decorate([
129
+ (0, type_graphql_1.InputType)({ description: 'A change to a counterparty, or a row of the counterparty grid (cuFlag + for new, M for changed, - for deleted)' })
130
+ ], CounterpartyPatch);
131
+ let CounterpartyList = class CounterpartyList {
132
+ };
133
+ exports.CounterpartyList = CounterpartyList;
134
+ tslib_1.__decorate([
135
+ (0, type_graphql_1.Field)(type => [counterparty_1.Counterparty], { description: 'Counterparties on the page' }),
136
+ tslib_1.__metadata("design:type", Array)
137
+ ], CounterpartyList.prototype, "items", void 0);
138
+ tslib_1.__decorate([
139
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'How many match' }),
140
+ tslib_1.__metadata("design:type", Number)
141
+ ], CounterpartyList.prototype, "total", void 0);
142
+ exports.CounterpartyList = CounterpartyList = tslib_1.__decorate([
143
+ (0, type_graphql_1.ObjectType)({ description: 'A page of counterparties' })
144
+ ], CounterpartyList);
145
+ //# sourceMappingURL=counterparty-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"counterparty-type.js","sourceRoot":"","sources":["../../../server/service/counterparty/counterparty-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAA+D;AAGxD,IAAM,eAAe,GAArB,MAAM,eAAe;CAc3B,CAAA;AAdY,0CAAe;AACmC;IAA5D,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;;6CAAa;AACD;IAAvE,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;;gDAAiB;AACG;IAA1F,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,+BAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;6CAAwB;AAC1C;IAAvE,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;;uDAAwB;AAC1B;IAApE,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;;qDAAsB;AAChC;IAAzD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;;uDAAwB;AAC9B;IAAlD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;;gDAAiB;AACR;IAA1D,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE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B;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAG5B,CAAA;AAHY,4CAAgB;AACmD;IAA7E,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,2BAAY,CAAC,EAAE,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;;+CAAsB;AAC5C;IAAtD,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;;+CAAc;2BAFzD,gBAAgB;IAD5B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;GAC3C,gBAAgB,CAG5B","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Counterparty, CounterpartyKind } from './counterparty'\n\n@InputType({ description: 'A counterparty to register' })\nexport class NewCounterparty {\n @Field({ description: 'The name the business knows it by' }) name: string\n @Field({ nullable: true, description: 'Other names it appears under' }) aliases?: string\n @Field(type => CounterpartyKind, { nullable: true, description: 'A company or a person' }) kind?: CounterpartyKind\n @Field({ nullable: true, description: 'Business registration number' }) businessNumber?: string\n @Field({ nullable: true, description: 'Sub-business place number' }) branchNumber?: string\n @Field({ nullable: true, description: 'Representative' }) representative?: string\n @Field({ nullable: true, description: 'Address' }) address?: string\n @Field({ nullable: true, description: 'Billing address' }) billingAddress?: string\n @Field({ nullable: true, description: 'Business type (업태)' }) businessType?: string\n @Field({ nullable: true, description: 'Business item (종목)' }) businessItem?: string\n @Field({ nullable: true, description: 'Whether sales to it are zero-rated' }) zeroRated?: boolean\n @Field({ nullable: true, description: 'Notes' }) notes?: string\n @Field({ nullable: true, description: 'Whether it is still offered for new rows' }) active?: boolean\n}\n\n@InputType({ description: 'A change to a counterparty, or a row of the counterparty grid (cuFlag + for new, M for changed, - for deleted)' })\nexport class CounterpartyPatch {\n @Field(type => ID, { nullable: true, description: 'The counterparty; empty for a new one' }) id?: string\n @Field({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }) cuFlag?: string\n @Field({ nullable: true, description: 'Name' }) name?: string\n @Field({ nullable: true, description: 'Other names it appears under' }) aliases?: string\n @Field({ nullable: true, description: 'COMPANY or PERSON, or the words people write for them' }) kind?: string\n @Field({ nullable: true, description: 'Business registration number' }) businessNumber?: string\n @Field({ nullable: true, description: 'Sub-business place number' }) branchNumber?: string\n @Field({ nullable: true, description: 'Representative' }) representative?: string\n @Field({ nullable: true, description: 'Address' }) address?: string\n @Field({ nullable: true, description: 'Billing address' }) billingAddress?: string\n @Field({ nullable: true, description: 'Business type (업태)' }) businessType?: string\n @Field({ nullable: true, description: 'Business item (종목)' }) businessItem?: string\n @Field({ nullable: true, description: 'Whether sales to it are zero-rated' }) zeroRated?: boolean\n @Field({ nullable: true, description: 'Notes' }) notes?: string\n @Field({ nullable: true, description: 'Whether it is still offered for new rows' }) active?: boolean\n}\n\n@ObjectType({ description: 'A page of counterparties' })\nexport class CounterpartyList {\n @Field(type => [Counterparty], { description: 'Counterparties on the page' }) items: Counterparty[]\n @Field(type => Int, { description: 'How many match' }) total: number\n}\n"]}
@@ -0,0 +1,40 @@
1
+ import { User } from '@things-factory/auth-base';
2
+ import { Domain } from '@things-factory/shell';
3
+ export declare enum CounterpartyKind {
4
+ COMPANY = "COMPANY",
5
+ PERSON = "PERSON"
6
+ }
7
+ /**
8
+ * A company or person a domain signs with, bills, is billed by, or pays — its own list of them.
9
+ *
10
+ * Each domain keeps its counterparties itself: who they are to this business, the names it calls them by, whether
11
+ * it still deals with them. Another domain's list is not shared or seen. The people to talk to there are contacts
12
+ * (`@things-factory/contact`), which point at the counterparty.
13
+ *
14
+ * For a person nothing beyond what identifies them to the business is kept — no resident registration number.
15
+ */
16
+ export declare class Counterparty {
17
+ readonly id: string;
18
+ domain?: Domain;
19
+ domainId?: string;
20
+ name: string;
21
+ aliases?: string;
22
+ kind: CounterpartyKind;
23
+ businessNumber?: string;
24
+ branchNumber?: string;
25
+ representative?: string;
26
+ address?: string;
27
+ billingAddress?: string;
28
+ businessType?: string;
29
+ businessItem?: string;
30
+ zeroRated: boolean;
31
+ notes?: string;
32
+ active: boolean;
33
+ createdAt?: Date;
34
+ updatedAt?: Date;
35
+ deletedAt?: Date;
36
+ creator?: User;
37
+ creatorId?: string;
38
+ updater?: User;
39
+ updaterId?: string;
40
+ }
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Counterparty = exports.CounterpartyKind = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const shell_1 = require("@things-factory/shell");
9
+ var CounterpartyKind;
10
+ (function (CounterpartyKind) {
11
+ CounterpartyKind["COMPANY"] = "COMPANY";
12
+ CounterpartyKind["PERSON"] = "PERSON";
13
+ })(CounterpartyKind || (exports.CounterpartyKind = CounterpartyKind = {}));
14
+ (0, type_graphql_1.registerEnumType)(CounterpartyKind, {
15
+ name: 'CounterpartyKind',
16
+ description: 'Whether a counterparty is a company or a person'
17
+ });
18
+ /**
19
+ * A company or person a domain signs with, bills, is billed by, or pays — its own list of them.
20
+ *
21
+ * Each domain keeps its counterparties itself: who they are to this business, the names it calls them by, whether
22
+ * it still deals with them. Another domain's list is not shared or seen. The people to talk to there are contacts
23
+ * (`@things-factory/contact`), which point at the counterparty.
24
+ *
25
+ * For a person nothing beyond what identifies them to the business is kept — no resident registration number.
26
+ */
27
+ let Counterparty = class Counterparty {
28
+ };
29
+ exports.Counterparty = Counterparty;
30
+ tslib_1.__decorate([
31
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
32
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier' }),
33
+ tslib_1.__metadata("design:type", String)
34
+ ], Counterparty.prototype, "id", void 0);
35
+ tslib_1.__decorate([
36
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
37
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain whose counterparty this is' }),
38
+ tslib_1.__metadata("design:type", shell_1.Domain)
39
+ ], Counterparty.prototype, "domain", void 0);
40
+ tslib_1.__decorate([
41
+ (0, typeorm_1.RelationId)((counterparty) => counterparty.domain),
42
+ tslib_1.__metadata("design:type", String)
43
+ ], Counterparty.prototype, "domainId", void 0);
44
+ tslib_1.__decorate([
45
+ (0, typeorm_1.Column)(),
46
+ (0, type_graphql_1.Field)({ description: 'The name the business knows it by, unique in the domain' }),
47
+ tslib_1.__metadata("design:type", String)
48
+ ], Counterparty.prototype, "name", void 0);
49
+ tslib_1.__decorate([
50
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
51
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Other names it appears under — in bank lines, old ledgers — one per line or comma' }),
52
+ tslib_1.__metadata("design:type", String)
53
+ ], Counterparty.prototype, "aliases", void 0);
54
+ tslib_1.__decorate([
55
+ (0, typeorm_1.Column)({ default: CounterpartyKind.COMPANY }),
56
+ (0, type_graphql_1.Field)(type => CounterpartyKind, { description: 'A company or a person' }),
57
+ tslib_1.__metadata("design:type", String)
58
+ ], Counterparty.prototype, "kind", void 0);
59
+ tslib_1.__decorate([
60
+ (0, typeorm_1.Column)({ nullable: true }),
61
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business registration number, 123-45-67890' }),
62
+ tslib_1.__metadata("design:type", String)
63
+ ], Counterparty.prototype, "businessNumber", void 0);
64
+ tslib_1.__decorate([
65
+ (0, typeorm_1.Column)({ nullable: true }),
66
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Sub-business place number, when tax invoices go to a branch' }),
67
+ tslib_1.__metadata("design:type", String)
68
+ ], Counterparty.prototype, "branchNumber", void 0);
69
+ tslib_1.__decorate([
70
+ (0, typeorm_1.Column)({ nullable: true }),
71
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Representative' }),
72
+ tslib_1.__metadata("design:type", String)
73
+ ], Counterparty.prototype, "representative", void 0);
74
+ tslib_1.__decorate([
75
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
76
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Address' }),
77
+ tslib_1.__metadata("design:type", String)
78
+ ], Counterparty.prototype, "address", void 0);
79
+ tslib_1.__decorate([
80
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
81
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Address bills are sent to, when not the address' }),
82
+ tslib_1.__metadata("design:type", String)
83
+ ], Counterparty.prototype, "billingAddress", void 0);
84
+ tslib_1.__decorate([
85
+ (0, typeorm_1.Column)({ nullable: true }),
86
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business type (업태)' }),
87
+ tslib_1.__metadata("design:type", String)
88
+ ], Counterparty.prototype, "businessType", void 0);
89
+ tslib_1.__decorate([
90
+ (0, typeorm_1.Column)({ nullable: true }),
91
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Business item (종목)' }),
92
+ tslib_1.__metadata("design:type", String)
93
+ ], Counterparty.prototype, "businessItem", void 0);
94
+ tslib_1.__decorate([
95
+ (0, typeorm_1.Column)({ default: false }),
96
+ (0, type_graphql_1.Field)({ description: 'Whether its sales to it are zero-rated for VAT' }),
97
+ tslib_1.__metadata("design:type", Boolean)
98
+ ], Counterparty.prototype, "zeroRated", void 0);
99
+ tslib_1.__decorate([
100
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
101
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
102
+ tslib_1.__metadata("design:type", String)
103
+ ], Counterparty.prototype, "notes", void 0);
104
+ tslib_1.__decorate([
105
+ (0, typeorm_1.Column)({ default: true }),
106
+ (0, type_graphql_1.Field)({ description: 'An inactive counterparty stays on old rows but is not offered for new ones' }),
107
+ tslib_1.__metadata("design:type", Boolean)
108
+ ], Counterparty.prototype, "active", void 0);
109
+ tslib_1.__decorate([
110
+ (0, typeorm_1.CreateDateColumn)(),
111
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it was registered' }),
112
+ tslib_1.__metadata("design:type", Date)
113
+ ], Counterparty.prototype, "createdAt", void 0);
114
+ tslib_1.__decorate([
115
+ (0, typeorm_1.UpdateDateColumn)(),
116
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it last changed' }),
117
+ tslib_1.__metadata("design:type", Date)
118
+ ], Counterparty.prototype, "updatedAt", void 0);
119
+ tslib_1.__decorate([
120
+ (0, typeorm_1.DeleteDateColumn)(),
121
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it was deleted — the rows that name it are kept' }),
122
+ tslib_1.__metadata("design:type", Date)
123
+ ], Counterparty.prototype, "deletedAt", void 0);
124
+ tslib_1.__decorate([
125
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
126
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who registered it' }),
127
+ tslib_1.__metadata("design:type", auth_base_1.User)
128
+ ], Counterparty.prototype, "creator", void 0);
129
+ tslib_1.__decorate([
130
+ (0, typeorm_1.RelationId)((counterparty) => counterparty.creator),
131
+ tslib_1.__metadata("design:type", String)
132
+ ], Counterparty.prototype, "creatorId", void 0);
133
+ tslib_1.__decorate([
134
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
135
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who last changed it' }),
136
+ tslib_1.__metadata("design:type", auth_base_1.User)
137
+ ], Counterparty.prototype, "updater", void 0);
138
+ tslib_1.__decorate([
139
+ (0, typeorm_1.RelationId)((counterparty) => counterparty.updater),
140
+ tslib_1.__metadata("design:type", String)
141
+ ], Counterparty.prototype, "updaterId", void 0);
142
+ exports.Counterparty = Counterparty = tslib_1.__decorate([
143
+ (0, typeorm_1.Entity)(),
144
+ (0, typeorm_1.Index)('ix_counterparty_0', (counterparty) => [counterparty.domain, counterparty.name], { unique: true, where: '"deleted_at" IS NULL' }),
145
+ (0, typeorm_1.Index)('ix_counterparty_1', (counterparty) => [counterparty.domain, counterparty.businessNumber]),
146
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for Counterparty — a company or person a domain deals with' })
147
+ ], Counterparty);
148
+ //# sourceMappingURL=counterparty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"counterparty.js","sourceRoot":"","sources":["../../../server/service/counterparty/counterparty.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAAoJ;AAEpJ,yDAAgD;AAChD,iDAA8C;AAE9C,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAA,+BAAgB,EAAC,gBAAgB,EAAE;IACjC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,iDAAiD;CAC/D,CAAC,CAAA;AAEF;;;;;;;;GAQG;AAKI,IAAM,YAAY,GAAlB,MAAM,YAAY;CAyFxB,CAAA;AAzFY,oCAAY;AAGd;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;;wCACrC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;sCACvF,cAAM;4CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC;;8CAC/C;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,yDAAyD,EAAE,CAAC;;0CACtE;AAI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graphql'\nimport { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nexport enum CounterpartyKind {\n COMPANY = 'COMPANY',\n PERSON = 'PERSON'\n}\n\nregisterEnumType(CounterpartyKind, {\n name: 'CounterpartyKind',\n description: 'Whether a counterparty is a company or a person'\n})\n\n/**\n * A company or person a domain signs with, bills, is billed by, or pays — its own list of them.\n *\n * Each domain keeps its counterparties itself: who they are to this business, the names it calls them by, whether\n * it still deals with them. Another domain's list is not shared or seen. The people to talk to there are contacts\n * (`@things-factory/contact`), which point at the counterparty.\n *\n * For a person nothing beyond what identifies them to the business is kept — no resident registration number.\n */\n@Entity()\n@Index('ix_counterparty_0', (counterparty: Counterparty) => [counterparty.domain, counterparty.name], { unique: true, where: '\"deleted_at\" IS NULL' })\n@Index('ix_counterparty_1', (counterparty: Counterparty) => [counterparty.domain, counterparty.businessNumber])\n@ObjectType({ description: 'Entity for Counterparty — a company or person a domain deals with' })\nexport class Counterparty {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain whose counterparty this is' })\n domain?: Domain\n\n @RelationId((counterparty: Counterparty) => counterparty.domain)\n domainId?: string\n\n @Column()\n @Field({ description: 'The name the business knows it by, unique in the domain' })\n name: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'Other names it appears under — in bank lines, old ledgers — one per line or comma' })\n aliases?: string\n\n @Column({ default: CounterpartyKind.COMPANY })\n @Field(type => CounterpartyKind, { description: 'A company or a person' })\n kind: CounterpartyKind\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Business registration number, 123-45-67890' })\n businessNumber?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Sub-business place number, when tax invoices go to a branch' })\n branchNumber?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Representative' })\n representative?: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'Address' })\n address?: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'Address bills are sent to, when not the address' })\n billingAddress?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Business type (업태)' })\n businessType?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Business item (종목)' })\n businessItem?: string\n\n @Column({ default: false })\n @Field({ description: 'Whether its sales to it are zero-rated for VAT' })\n zeroRated: boolean\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'Notes' })\n notes?: string\n\n @Column({ default: true })\n @Field({ description: 'An inactive counterparty stays on old rows but is not offered for new ones' })\n active: boolean\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was registered' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When it last changed' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When it was deleted — the rows that name it are kept' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who registered it' })\n creator?: User\n\n @RelationId((counterparty: Counterparty) => counterparty.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who last changed it' })\n updater?: User\n\n @RelationId((counterparty: Counterparty) => counterparty.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { Counterparty } from './counterparty';
2
+ import { CounterpartyMutation } from './counterparty-mutation';
3
+ import { CounterpartyQuery } from './counterparty-query';
4
+ export declare const entities: (typeof Counterparty)[];
5
+ export declare const resolvers: (typeof CounterpartyMutation | typeof CounterpartyQuery)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const counterparty_1 = require("./counterparty");
5
+ const counterparty_mutation_1 = require("./counterparty-mutation");
6
+ const counterparty_query_1 = require("./counterparty-query");
7
+ exports.entities = [counterparty_1.Counterparty];
8
+ exports.resolvers = [counterparty_query_1.CounterpartyQuery, counterparty_mutation_1.CounterpartyMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/counterparty/index.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,mEAA8D;AAC9D,6DAAwD;AAE3C,QAAA,QAAQ,GAAG,CAAC,2BAAY,CAAC,CAAA;AACzB,QAAA,SAAS,GAAG,CAAC,sCAAiB,EAAE,4CAAoB,CAAC,CAAA","sourcesContent":["import { Counterparty } from './counterparty'\nimport { CounterpartyMutation } from './counterparty-mutation'\nimport { CounterpartyQuery } from './counterparty-query'\n\nexport const entities = [Counterparty]\nexport const resolvers = [CounterpartyQuery, CounterpartyMutation]\n"]}
@@ -2,17 +2,19 @@ export * from './company/company';
2
2
  export * from './bizplace/bizplace';
3
3
  export * from './biz-option/biz-option';
4
4
  export * from './biz-option-detail/biz-option-detail';
5
- export * from './contact-point/contact-point';
5
+ export * from './counterparty/counterparty';
6
+ export * from './counterparty/counterparty-names';
7
+ export * from './counterparty/counterparty-service';
6
8
  export * from './worker/worker';
7
9
  export * from './company/company-types';
8
10
  export * from './bizplace/bizplace-types';
9
11
  export * from './biz-option/biz-option-types';
10
12
  export * from './biz-option-detail/biz-option-detail-types';
11
- export * from './contact-point/contact-point-types';
13
+ export * from './counterparty/counterparty-type';
12
14
  export * from './worker/worker-types';
13
- export declare const entities: (typeof import("./biz-option-detail/biz-option-detail").BizOptionDetail | typeof import("./biz-option/biz-option").BizOption | typeof import("./company/company").Company | typeof import("./bizplace/bizplace").Bizplace | typeof import("./worker/worker").Worker)[];
15
+ export declare const entities: (typeof import("./biz-option-detail/biz-option-detail").BizOptionDetail | typeof import("./biz-option/biz-option").BizOption | typeof import("./company/company").Company | typeof import("./bizplace/bizplace").Bizplace | typeof import("./counterparty/counterparty").Counterparty | typeof import("./worker/worker").Worker)[];
14
16
  export declare const schema: {
15
- resolverClasses: (typeof import("./biz-option/biz-option-mutation").BizOptionMutation | typeof import("./biz-option/biz-option-query").BizOptionQuery | typeof import("./biz-option-detail/biz-option-detail-mutation").BizOptionDetailMutation | typeof import("./biz-option-detail/biz-option-detail-query").BizOptionDetailQuery | typeof import("./bizplace/bizplace-mutation").BizplaceMutation | typeof import("./bizplace/bizplace-query").BizplaceQuery | typeof import("./company/company-mutation").CompanyMutation | typeof import("./company/company-query").CompanyQuery | typeof import("./contact-point/contact-point-mutation").ContactPointMutation | typeof import("./contact-point/contact-point-query").ContactPointQuery | typeof import("./worker/worker-mutation").WorkerMutation | typeof import("./worker/worker-query").WorkerQuery)[];
17
+ resolverClasses: (typeof import("./biz-option/biz-option-mutation").BizOptionMutation | typeof import("./biz-option/biz-option-query").BizOptionQuery | typeof import("./biz-option-detail/biz-option-detail-mutation").BizOptionDetailMutation | typeof import("./biz-option-detail/biz-option-detail-query").BizOptionDetailQuery | typeof import("./bizplace/bizplace-mutation").BizplaceMutation | typeof import("./bizplace/bizplace-query").BizplaceQuery | typeof import("./company/company-mutation").CompanyMutation | typeof import("./company/company-query").CompanyQuery | typeof import("./counterparty/counterparty-mutation").CounterpartyMutation | typeof import("./counterparty/counterparty-query").CounterpartyQuery | typeof import("./worker/worker-mutation").WorkerMutation | typeof import("./worker/worker-query").WorkerQuery)[];
16
18
  };
17
19
  export { createCompany, deleteCompanies, deleteCompany, updateCompany } from './company/company-mutation';
18
20
  export { createWorker, deleteWorker, deleteWorkers, updateWorker } from './worker/worker-mutation';
@@ -7,28 +7,30 @@ const biz_option_1 = require("./biz-option");
7
7
  const biz_option_detail_1 = require("./biz-option-detail");
8
8
  const bizplace_1 = require("./bizplace");
9
9
  const company_1 = require("./company");
10
- const contact_point_1 = require("./contact-point");
10
+ const counterparty_1 = require("./counterparty");
11
11
  const worker_1 = require("./worker");
12
12
  /* EXPORT ENTITY TYPES */
13
13
  tslib_1.__exportStar(require("./company/company"), exports);
14
14
  tslib_1.__exportStar(require("./bizplace/bizplace"), exports);
15
15
  tslib_1.__exportStar(require("./biz-option/biz-option"), exports);
16
16
  tslib_1.__exportStar(require("./biz-option-detail/biz-option-detail"), exports);
17
- tslib_1.__exportStar(require("./contact-point/contact-point"), exports);
17
+ tslib_1.__exportStar(require("./counterparty/counterparty"), exports);
18
+ tslib_1.__exportStar(require("./counterparty/counterparty-names"), exports);
19
+ tslib_1.__exportStar(require("./counterparty/counterparty-service"), exports);
18
20
  tslib_1.__exportStar(require("./worker/worker"), exports);
19
21
  /* EXPORT TYPES */
20
22
  tslib_1.__exportStar(require("./company/company-types"), exports);
21
23
  tslib_1.__exportStar(require("./bizplace/bizplace-types"), exports);
22
24
  tslib_1.__exportStar(require("./biz-option/biz-option-types"), exports);
23
25
  tslib_1.__exportStar(require("./biz-option-detail/biz-option-detail-types"), exports);
24
- tslib_1.__exportStar(require("./contact-point/contact-point-types"), exports);
26
+ tslib_1.__exportStar(require("./counterparty/counterparty-type"), exports);
25
27
  tslib_1.__exportStar(require("./worker/worker-types"), exports);
26
28
  exports.entities = [
27
29
  ...company_1.entities,
28
30
  ...bizplace_1.entities,
29
31
  ...biz_option_1.entities,
30
32
  ...biz_option_detail_1.entities,
31
- ...contact_point_1.entities,
33
+ ...counterparty_1.entities,
32
34
  ...worker_1.entities
33
35
  ];
34
36
  exports.schema = {
@@ -37,7 +39,7 @@ exports.schema = {
37
39
  ...bizplace_1.resolvers,
38
40
  ...biz_option_1.resolvers,
39
41
  ...biz_option_detail_1.resolvers,
40
- ...contact_point_1.resolvers,
42
+ ...counterparty_1.resolvers,
41
43
  ...worker_1.resolvers
42
44
  ]
43
45
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,mCAAmC;AACnC,6CAA6F;AAC7F,2DAAgH;AAChH,yCAAyF;AACzF,uCAAsF;AACtF,mDAAsG;AACtG,qCAAmF;AAEnF,yBAAyB;AACzB,4DAAiC;AACjC,8DAAmC;AACnC,kEAAuC;AACvC,gFAAqD;AACrD,wEAA6C;AAC7C,0DAA+B;AAE/B,kBAAkB;AAClB,kEAAuC;AACvC,oEAAyC;AACzC,wEAA6C;AAC7C,sFAA2D;AAC3D,8EAAmD;AACnD,gEAAqC;AAExB,QAAA,QAAQ,GAAG;IACtB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,qBAAiB;IACpB,GAAG,4BAAuB;IAC1B,GAAG,wBAAoB;IACvB,GAAG,iBAAc;CAClB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,GAAG,mBAAgB;QACnB,GAAG,oBAAiB;QACpB,GAAG,sBAAkB;QACrB,GAAG,6BAAwB;QAC3B,GAAG,yBAAqB;QACxB,GAAG,kBAAe;KACnB;CACF,CAAA;AAED,+DAAyG;AAAhG,iHAAA,aAAa,OAAA;AAAE,mHAAA,eAAe,OAAA;AAAE,iHAAA,aAAa,OAAA;AAAE,iHAAA,aAAa,OAAA;AACrE,4DAAkG;AAAzF,+GAAA,YAAY,OAAA;AAAE,+GAAA,YAAY,OAAA;AAAE,gHAAA,aAAa,OAAA;AAAE,+GAAA,YAAY,OAAA","sourcesContent":["/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as BizOptionEntities, resolvers as BizOptionResolvers } from './biz-option'\nimport { entities as BizOptionDetailEntities, resolvers as BizOptionDetailResolvers } from './biz-option-detail'\nimport { entities as BizplaceEntities, resolvers as BizplaceResolvers } from './bizplace'\nimport { entities as CompanyEntities, resolvers as CompanyResolvers } from './company'\nimport { entities as ContactPointEntities, resolvers as ContactPointResolvers } from './contact-point'\nimport { entities as WorkerEntities, resolvers as WorkerResolvers } from './worker'\n\n/* EXPORT ENTITY TYPES */\nexport * from './company/company'\nexport * from './bizplace/bizplace'\nexport * from './biz-option/biz-option'\nexport * from './biz-option-detail/biz-option-detail'\nexport * from './contact-point/contact-point'\nexport * from './worker/worker'\n\n/* EXPORT TYPES */\nexport * from './company/company-types'\nexport * from './bizplace/bizplace-types'\nexport * from './biz-option/biz-option-types'\nexport * from './biz-option-detail/biz-option-detail-types'\nexport * from './contact-point/contact-point-types'\nexport * from './worker/worker-types'\n\nexport const entities = [\n ...CompanyEntities,\n ...BizplaceEntities,\n ...BizOptionEntities,\n ...BizOptionDetailEntities,\n ...ContactPointEntities,\n ...WorkerEntities\n]\n\nexport const schema = {\n resolverClasses: [\n ...CompanyResolvers,\n ...BizplaceResolvers,\n ...BizOptionResolvers,\n ...BizOptionDetailResolvers,\n ...ContactPointResolvers,\n ...WorkerResolvers\n ]\n}\n\nexport { createCompany, deleteCompanies, deleteCompany, updateCompany } from './company/company-mutation'\nexport { createWorker, deleteWorker, deleteWorkers, updateWorker } from './worker/worker-mutation'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,mCAAmC;AACnC,6CAA6F;AAC7F,2DAAgH;AAChH,yCAAyF;AACzF,uCAAsF;AACtF,iDAAqG;AACrG,qCAAmF;AAEnF,yBAAyB;AACzB,4DAAiC;AACjC,8DAAmC;AACnC,kEAAuC;AACvC,gFAAqD;AACrD,sEAA2C;AAC3C,4EAAiD;AACjD,8EAAmD;AACnD,0DAA+B;AAE/B,kBAAkB;AAClB,kEAAuC;AACvC,oEAAyC;AACzC,wEAA6C;AAC7C,sFAA2D;AAC3D,2EAAgD;AAChD,gEAAqC;AAExB,QAAA,QAAQ,GAAG;IACtB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,qBAAiB;IACpB,GAAG,4BAAuB;IAC1B,GAAG,uBAAoB;IACvB,GAAG,iBAAc;CAClB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,GAAG,mBAAgB;QACnB,GAAG,oBAAiB;QACpB,GAAG,sBAAkB;QACrB,GAAG,6BAAwB;QAC3B,GAAG,wBAAqB;QACxB,GAAG,kBAAe;KACnB;CACF,CAAA;AAED,+DAAyG;AAAhG,iHAAA,aAAa,OAAA;AAAE,mHAAA,eAAe,OAAA;AAAE,iHAAA,aAAa,OAAA;AAAE,iHAAA,aAAa,OAAA;AACrE,4DAAkG;AAAzF,+GAAA,YAAY,OAAA;AAAE,+GAAA,YAAY,OAAA;AAAE,gHAAA,aAAa,OAAA;AAAE,+GAAA,YAAY,OAAA","sourcesContent":["/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as BizOptionEntities, resolvers as BizOptionResolvers } from './biz-option'\nimport { entities as BizOptionDetailEntities, resolvers as BizOptionDetailResolvers } from './biz-option-detail'\nimport { entities as BizplaceEntities, resolvers as BizplaceResolvers } from './bizplace'\nimport { entities as CompanyEntities, resolvers as CompanyResolvers } from './company'\nimport { entities as CounterpartyEntities, resolvers as CounterpartyResolvers } from './counterparty'\nimport { entities as WorkerEntities, resolvers as WorkerResolvers } from './worker'\n\n/* EXPORT ENTITY TYPES */\nexport * from './company/company'\nexport * from './bizplace/bizplace'\nexport * from './biz-option/biz-option'\nexport * from './biz-option-detail/biz-option-detail'\nexport * from './counterparty/counterparty'\nexport * from './counterparty/counterparty-names'\nexport * from './counterparty/counterparty-service'\nexport * from './worker/worker'\n\n/* EXPORT TYPES */\nexport * from './company/company-types'\nexport * from './bizplace/bizplace-types'\nexport * from './biz-option/biz-option-types'\nexport * from './biz-option-detail/biz-option-detail-types'\nexport * from './counterparty/counterparty-type'\nexport * from './worker/worker-types'\n\nexport const entities = [\n ...CompanyEntities,\n ...BizplaceEntities,\n ...BizOptionEntities,\n ...BizOptionDetailEntities,\n ...CounterpartyEntities,\n ...WorkerEntities\n]\n\nexport const schema = {\n resolverClasses: [\n ...CompanyResolvers,\n ...BizplaceResolvers,\n ...BizOptionResolvers,\n ...BizOptionDetailResolvers,\n ...CounterpartyResolvers,\n ...WorkerResolvers\n ]\n}\n\nexport { createCompany, deleteCompanies, deleteCompany, updateCompany } from './company/company-mutation'\nexport { createWorker, deleteWorker, deleteWorkers, updateWorker } from './worker/worker-mutation'\n"]}