@things-factory/biz-base 10.1.254 → 10.1.256
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-server/index.d.ts +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/company-seal/company-seal-rules.js +6 -1
- package/dist-server/service/company-seal/company-seal-rules.js.map +1 -1
- package/dist-server/service/company-seal/company-seal.d.ts +5 -1
- package/dist-server/service/company-seal/company-seal.js +5 -1
- package/dist-server/service/company-seal/company-seal.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/work-doors.d.ts +1 -0
- package/dist-server/work-doors.js +12 -0
- package/dist-server/work-doors.js.map +1 -0
- package/package.json +4 -4
- package/translations/en.json +4 -1
- package/translations/es.json +4 -1
- package/translations/ja.json +4 -1
- package/translations/ko.json +12 -9
- package/translations/ms.json +4 -1
- package/translations/zh.json +4 -1
package/dist-server/index.d.ts
CHANGED
package/dist-server/index.js
CHANGED
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,uDAA4B;AAC5B,kDAAuB;AAEvB,gEAA6D;AAC7D,sDAAmD;AAEnD,yDAA4D;AAC5D,6CAAyC;AAEzC,KAAK,MAAM,IAAI,IAAI,uBAAU;IAAE,IAAA,4BAAgB,EAAC,IAAI,CAAC,CAAA","sourcesContent":["export * from './service'\nexport * from './migrations'\nexport * from './utils'\n\nimport './service/counterparty/counterparty-document-readers'\nimport './service/company-seal/company-seal-reader'\n\nimport { registerRoleTask } from '@things-factory/auth-base'\nimport { ROLE_TASKS } from './role-tasks'\n\nfor (const task of ROLE_TASKS) registerRoleTask(task)\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,uDAA4B;AAC5B,kDAAuB;AAEvB,gEAA6D;AAC7D,sDAAmD;AAEnD,yDAA4D;AAC5D,6CAAyC;AAEzC,KAAK,MAAM,IAAI,IAAI,uBAAU;IAAE,IAAA,4BAAgB,EAAC,IAAI,CAAC,CAAA;AACrD,wBAAqB","sourcesContent":["export * from './service'\nexport * from './migrations'\nexport * from './utils'\n\nimport './service/counterparty/counterparty-document-readers'\nimport './service/company-seal/company-seal-reader'\n\nimport { registerRoleTask } from '@things-factory/auth-base'\nimport { ROLE_TASKS } from './role-tasks'\n\nfor (const task of ROLE_TASKS) registerRoleTask(task)\nimport './work-doors'\n"]}
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.inUse = void 0;
|
|
4
4
|
exports.sealRefusal = sealRefusal;
|
|
5
5
|
const shell_1 = require("@things-factory/shell");
|
|
6
|
-
const KINDS = ['CORPORATE', 'USE', 'OFFICIAL'];
|
|
6
|
+
const KINDS = ['CORPORATE', 'USE', 'OFFICIAL', 'NAMEPLATE', 'CONFIDENTIAL'];
|
|
7
|
+
/** Rubber stamps kept in the register for who holds them - not seals, so a document never prints one. */
|
|
8
|
+
const STAMPS = ['NAMEPLATE', 'CONFIDENTIAL'];
|
|
7
9
|
const DAY = /^\d{4}-\d{2}-\d{2}$/;
|
|
8
10
|
/** A seal not disposed of. */
|
|
9
11
|
const inUse = (row) => !row.disposedOn;
|
|
@@ -26,6 +28,9 @@ function sealRefusal(rows) {
|
|
|
26
28
|
return new shell_1.Refusal('company-seal-disposed-before-registered', { name }, `seal ${name}: disposed of before it was filed`);
|
|
27
29
|
if (row.printed && row.kind === 'CORPORATE')
|
|
28
30
|
return new shell_1.Refusal('company-seal-corporate-not-printed', { name }, 'the corporate seal is stamped on paper, never printed');
|
|
31
|
+
/* A document already prints the company's name, representative and address as words; a stamp would say it again and seals nothing. */
|
|
32
|
+
if (row.printed && STAMPS.includes(row.kind ?? ''))
|
|
33
|
+
return new shell_1.Refusal('company-seal-stamp-not-printed', { name }, `${name} is a rubber stamp for paper - documents print a seal`);
|
|
29
34
|
if (row.printed && !(0, exports.inUse)(row))
|
|
30
35
|
return new shell_1.Refusal('company-seal-disposed-printed', { name }, `seal ${name} is disposed of - documents cannot print it`);
|
|
31
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-seal-rules.js","sourceRoot":"","sources":["../../../server/service/company-seal/company-seal-rules.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"company-seal-rules.js","sourceRoot":"","sources":["../../../server/service/company-seal/company-seal-rules.ts"],"names":[],"mappings":";;;AAyBA,kCAkBC;AA3CD,iDAA+C;AAgB/C,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,CAAC,CAAA;AAC3E,yGAAyG;AACzG,MAAM,MAAM,GAAG,CAAC,WAAW,EAAE,cAAc,CAAC,CAAA;AAC5C,MAAM,GAAG,GAAG,qBAAqB,CAAA;AAEjC,8BAA8B;AACvB,MAAM,KAAK,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAA;AAAzC,QAAA,KAAK,SAAoC;AAEtD,uDAAuD;AACvD,SAAgB,WAAW,CAAC,IAAwB;IAClD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;QACnC,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,eAAO,CAAC,4BAA4B,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAA;QACtF,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;YAAE,OAAO,IAAI,eAAO,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,IAAI,iBAAiB,CAAC,C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AG,CAAC,OAAO,IAAI,CAAC,IAAA,aAAK,EAAC,GAAG,CAAC;YAAE,OAAO,IAAI,eAAO,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,IAAI,6CAA6C,CAAC,CAAA;IAC1J,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,aAAK,CAAC,CAAA;IAC/B,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,eAAO,CAAC,4BAA4B,EAAE,EAAE,EAAE,qEAAqE,CAAC,CAAA;IACxL,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,eAAO,CAAC,0BAA0B,EAAE,EAAE,EAAE,6CAA6C,CAAC,CAAA;IACjJ,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import { Refusal } from '@things-factory/shell'\n\n/*\n * What the seal register holds to (ADR-0188 decision 1), on its rows as they would stand after a save. Pure.\n */\n\nexport interface SealRow {\n id?: string\n kind?: string | null\n name?: string | null\n registeredOn?: string | null\n printed?: boolean | null\n disposedOn?: string | null\n disposeReason?: string | null\n}\n\nconst KINDS = ['CORPORATE', 'USE', 'OFFICIAL', 'NAMEPLATE', 'CONFIDENTIAL']\n/** Rubber stamps kept in the register for who holds them - not seals, so a document never prints one. */\nconst STAMPS = ['NAMEPLATE', 'CONFIDENTIAL']\nconst DAY = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/** A seal not disposed of. */\nexport const inUse = (row: SealRow) => !row.disposedOn\n\n/** The first thing wrong with the rows, or nothing. */\nexport function sealRefusal(rows: readonly SealRow[]): Refusal | null {\n for (const row of rows) {\n const name = row.name?.trim() ?? ''\n if (!name) return new Refusal('company-seal-name-required', {}, 'a seal needs a name')\n if (!KINDS.includes(row.kind ?? '')) return new Refusal('company-seal-kind-required', { name }, `seal ${name}: pick its kind`)\n if (row.registeredOn && !DAY.test(row.registeredOn)) return new Refusal('company-seal-day-invalid', { name, value: row.registeredOn }, `seal ${name}: a day is YYYY-MM-DD`)\n if (row.disposedOn && !DAY.test(row.disposedOn)) return new Refusal('company-seal-day-invalid', { name, value: row.disposedOn }, `seal ${name}: a day is YYYY-MM-DD`)\n if (row.disposedOn && !row.disposeReason?.trim()) return new Refusal('company-seal-dispose-reason-required', { name }, `seal ${name}: say why it was disposed of`)\n if (row.disposedOn && row.registeredOn && row.disposedOn < row.registeredOn) return new Refusal('company-seal-disposed-before-registered', { name }, `seal ${name}: disposed of before it was filed`)\n if (row.printed && row.kind === 'CORPORATE') return new Refusal('company-seal-corporate-not-printed', { name }, 'the corporate seal is stamped on paper, never printed')\n /* A document already prints the company's name, representative and address as words; a stamp would say it again and seals nothing. */\n if (row.printed && STAMPS.includes(row.kind ?? '')) return new Refusal('company-seal-stamp-not-printed', { name }, `${name} is a rubber stamp for paper - documents print a seal`)\n if (row.printed && !inUse(row)) return new Refusal('company-seal-disposed-printed', { name }, `seal ${name} is disposed of - documents cannot print it`)\n }\n const used = rows.filter(inUse)\n if (used.filter(row => row.kind === 'CORPORATE').length > 1) return new Refusal('company-seal-two-corporate', {}, 'only one corporate seal is filed at a time - dispose of the old one')\n if (used.filter(row => row.printed).length > 1) return new Refusal('company-seal-two-printed', {}, 'documents print one seal - unmark the other')\n return null\n}\n"]}
|
|
@@ -7,7 +7,11 @@ export declare enum CompanySealKind {
|
|
|
7
7
|
/** 사용인감 - used in the corporate seal's place, declared by a 사용인감계. */
|
|
8
8
|
USE = "USE",
|
|
9
9
|
/** 직인 - the company's stamp on its own papers. */
|
|
10
|
-
OFFICIAL = "OFFICIAL"
|
|
10
|
+
OFFICIAL = "OFFICIAL",
|
|
11
|
+
/** 명판 - the rubber stamp of the company's name, representative and address, put beside a seal on paper; never a seal itself. */
|
|
12
|
+
NAMEPLATE = "NAMEPLATE",
|
|
13
|
+
/** 대외비 명판 - the rubber stamp that marks a paper as not to leave the company; never a seal itself. */
|
|
14
|
+
CONFIDENTIAL = "CONFIDENTIAL"
|
|
11
15
|
}
|
|
12
16
|
/**
|
|
13
17
|
* 인감 대장 (ADR-0188 decision 1) - each seal of 「우리 회사」: what kind, since when, who keeps it and where, and its
|
|
@@ -15,8 +15,12 @@ var CompanySealKind;
|
|
|
15
15
|
CompanySealKind["USE"] = "USE";
|
|
16
16
|
/** 직인 - the company's stamp on its own papers. */
|
|
17
17
|
CompanySealKind["OFFICIAL"] = "OFFICIAL";
|
|
18
|
+
/** 명판 - the rubber stamp of the company's name, representative and address, put beside a seal on paper; never a seal itself. */
|
|
19
|
+
CompanySealKind["NAMEPLATE"] = "NAMEPLATE";
|
|
20
|
+
/** 대외비 명판 - the rubber stamp that marks a paper as not to leave the company; never a seal itself. */
|
|
21
|
+
CompanySealKind["CONFIDENTIAL"] = "CONFIDENTIAL";
|
|
18
22
|
})(CompanySealKind || (exports.CompanySealKind = CompanySealKind = {}));
|
|
19
|
-
(0, type_graphql_1.registerEnumType)(CompanySealKind, { name: 'CompanySealKind', description: '법인인감 · 사용인감 · 직인' });
|
|
23
|
+
(0, type_graphql_1.registerEnumType)(CompanySealKind, { name: 'CompanySealKind', description: '법인인감 · 사용인감 · 직인 · 명판 · 대외비 명판' });
|
|
20
24
|
/**
|
|
21
25
|
* 인감 대장 (ADR-0188 decision 1) - each seal of 「우리 회사」: what kind, since when, who keeps it and where, and its
|
|
22
26
|
* impression - an attachment of the row (`COMPANY_SEAL_REF_TYPE`). The seal official documents print is the one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-seal.js","sourceRoot":"","sources":["../../../server/service/company-seal/company-seal.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAAkI;AAElI,yDAAgD;AAChD,iDAA8C;AAE9C,4GAA4G;AAC5G,IAAY,
|
|
1
|
+
{"version":3,"file":"company-seal.js","sourceRoot":"","sources":["../../../server/service/company-seal/company-seal.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAAkI;AAElI,yDAAgD;AAChD,iDAA8C;AAE9C,4GAA4G;AAC5G,IAAY,eAWX;AAXD,WAAY,eAAe;IACzB,iEAAiE;IACjE,0CAAuB,CAAA;IACvB,sEAAsE;IACtE,8BAAW,CAAA;IACX,kDAAkD;IAClD,wCAAqB,CAAA;IACrB,gIAAgI;IAChI,0CAAuB,CAAA;IACvB,qGAAqG;IACrG,gDAA6B,CAAA;AAC/B,CAAC,EAXW,eAAe,+BAAf,eAAe,QAW1B;AAED,IAAA,+BAAgB,EAAC,eAAe,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC,CAAA;AAE7G;;;;GAIG;AAII,IAAM,WAAW,GAAjB,MAAM,WAAW;CA6EvB,CAAA;AA7EY,kCAAW;AAGb;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;uCACC;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,CAAC;sCACjC,cAAM;2CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,IAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;;6CAC9B;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC;;yCACV;AAIrB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;;yCAClD;AAIZ;IAFC,IAAA,gBAAM,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CAAC,IAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5E,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,6DAA6D,EAAE,CAAC;GAC9E,WAAW,CA6EvB","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\n/** What a seal is: the one filed with the registry, one used in its place, or the stamp documents carry. */\nexport enum CompanySealKind {\n /** 법인인감 - filed with the registry; matched against the 인감증명서. */\n CORPORATE = 'CORPORATE',\n /** 사용인감 - used in the corporate seal's place, declared by a 사용인감계. */\n USE = 'USE',\n /** 직인 - the company's stamp on its own papers. */\n OFFICIAL = 'OFFICIAL',\n /** 명판 - the rubber stamp of the company's name, representative and address, put beside a seal on paper; never a seal itself. */\n NAMEPLATE = 'NAMEPLATE',\n /** 대외비 명판 - the rubber stamp that marks a paper as not to leave the company; never a seal itself. */\n CONFIDENTIAL = 'CONFIDENTIAL'\n}\n\nregisterEnumType(CompanySealKind, { name: 'CompanySealKind', description: '법인인감 · 사용인감 · 직인 · 명판 · 대외비 명판' })\n\n/**\n * 인감 대장 (ADR-0188 decision 1) - each seal of 「우리 회사」: what kind, since when, who keeps it and where, and its\n * impression - an attachment of the row (`COMPANY_SEAL_REF_TYPE`). The seal official documents print is the one\n * `printed` (ADR-0176 decision 4). Rows are never deleted: a seal no longer used is closed by its disposal.\n */\n@Entity()\n@Index('ix_company_seals_0', (seal: CompanySeal) => [seal.domain, seal.kind])\n@ObjectType({ description: 'Entity for CompanySeal - a seal of 「우리 회사」 and who keeps it' })\nexport class CompanySeal {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((seal: CompanySeal) => seal.domain)\n domainId?: string\n\n @Column()\n @Field(type => CompanySealKind)\n kind: CompanySealKind\n\n @Column()\n @Field({ description: 'What people call it - 법인인감, 사용인감 1호' })\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD filed with the registry (법인인감), or first used' })\n registeredOn?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who keeps it' })\n custodian?: User\n\n @RelationId((seal: CompanySeal) => seal.custodian)\n @Field({ nullable: true })\n custodianId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Where it is kept' })\n keptAt?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'What it is used for - a 사용인감 for bids, contracts, public offices' })\n usage?: string\n\n @Column({ default: false })\n @Field({ description: 'The impression official documents print - one seal of a domain, never the corporate seal' })\n printed: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD it was disposed of, lost or replaced' })\n disposedOn?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n disposeReason?: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true })\n notes?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((seal: CompanySeal) => seal.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((seal: CompanySeal) => seal.updater)\n updaterId?: string\n}\n"]}
|