@things-factory/organization 10.1.105 → 10.1.107

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.
@@ -72,8 +72,7 @@ const DEPARTMENT_FIELDS = [
72
72
  /* DepartmentPatch has no `extension` - the update changes only what the patch can carry. */
73
73
  const DEPARTMENT_UPDATE_FIELDS = ['controlNo', 'name', 'description', 'active', 'parent'];
74
74
  /*
75
- * Never taken: `manager` (the mutation looks the employee up without the domain - a separate security fix is
76
- * pending) and `picture` (a file upload).
75
+ * Never taken: `manager` (a person, picked on the screen) and `picture` (a file upload).
77
76
  */
78
77
  const DEPARTMENT_CREATE_FIELDS = DEPARTMENT_FIELDS.map(field => field.name);
79
78
  function departmentEntryTarget() {
@@ -183,9 +182,8 @@ function departmentEntryTarget() {
183
182
  * Kept to the fields a roster needs. Never taken: user, bankAccount, bankName, emergencyContact,
184
183
  * emergencyContactPhone, contact, photo, supervisor. No update this round.
185
184
  *
186
- * The department is passed as an id the assistant resolved through the domain-scoped `departments` query.
187
- * createEmployee itself looks the department (and the supervisor) up by id without the domain - that is the
188
- * server's to fix, separately.
185
+ * The department is passed as an id the assistant resolved through the domain-scoped `departments` query, and
186
+ * createEmployee looks it up again inside the caller's domain.
189
187
  */
190
188
  exports.EMPLOYEE_FORBIDDEN_FIELDS = ['user', 'bankAccount', 'bankName', 'emergencyContact', 'emergencyContactPhone', 'contact', 'photo', 'supervisor'];
191
189
  const EMPLOYEE_FIELDS = [
@@ -1 +1 @@
1
- {"version":3,"file":"organization-entry-targets.js","sourceRoot":"","sources":["../../server/ai-entry/organization-entry-targets.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,sDAiGC;AA4BD,kDAmBC;AAOD,4DAEC;AArND,yEAWmC;AAEtB,QAAA,uBAAuB,GAAG,yBAAyB,CAAA;AACnD,QAAA,qBAAqB,GAAG,uBAAuB,CAAA;AAE5D,4HAA4H;AAC5H,M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AAA;YAC7J,OAAO,IAAA,yCAAc,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACvC,CAAC;KACF,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB;IACtC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAA;AAClC,CAAC","sourcesContent":["/*\n * AI 입력 targets of the organization - what an application may hand its assistant so that departments\n * (and, only by an explicit product decision, employees) are entered from material\n * (operato-application/design/ai/data-entry.md).\n *\n * Plain declarations: this package does not depend on @things-factory/ai-assistant. An application that runs\n * the assistant passes them to `registerEntryTarget` and names their keys in its modes. Every row is entered\n * through the organization's own mutation, run as the person - the same `@privilege` and checks as the screens.\n *\n * The checks read through the repository of the request's domain only, and import it when they run, so that\n * reading these declarations stays light.\n */\nimport type { EntryField, EntryRow, EntryTargetDeclaration } from './entry-target-shape'\nimport {\n changedParentId,\n codeAndName,\n departmentChangeIssues,\n departmentIssues,\n departmentsNamed,\n employeeIssues,\n inputOf,\n matching,\n parentVerdictOf,\n type ParentVerdict\n} from './organization-entry-rules'\n\nexport const ORGANIZATION_DEPARTMENT = 'organization.department'\nexport const ORGANIZATION_EMPLOYEE = 'organization.employee'\n\n/** Departments of the person's domain whose name or 관리번호 holds the text - `search` filters are OR'd by the list builder. */\nconst DEPARTMENTS_BY_TEXT =\n 'query ($filters: [Filter!], $pagination: Pagination) { departments(filters: $filters, pagination: $pagination) { items { id controlNo name } } }'\n\nconst DEPARTMENTS =\n 'query ($filters: [Filter!], $pagination: Pagination) { departments(filters: $filters, pagination: $pagination) { items { id controlNo name description active extension parent { id controlNo name } } } }'\n\n/** A department the model names in words, found as the person through `departments` - the id is what the mutation takes. */\nconst departmentReference = {\n query: DEPARTMENTS_BY_TEXT,\n variables: (said: string) => ({\n filters: [\n { name: 'name', operator: 'search', value: said },\n { name: 'controlNo', operator: 'search', value: said }\n ],\n pagination: { page: 1, limit: 200 }\n }),\n recordsOf: (data: any, said: string) => departmentsNamed(data?.departments?.items ?? [], said)\n}\n\nconst DEPARTMENT_FIELDS: EntryField[] = [\n { name: 'controlNo', type: 'string', required: true, labelKey: 'field.control-no', description: \"the department's code (관리번호) as the material writes it\" },\n { name: 'name', type: 'string', required: true, labelKey: 'field.name', description: 'the department name' },\n { name: 'description', type: 'string', labelKey: 'field.description' },\n { name: 'active', type: 'boolean', labelKey: 'field.active', description: 'false only when the material says the department is closed or not in use' },\n { name: 'extension', type: 'string', labelKey: 'field.extension', description: \"the department's phone extension (내선 번호)\" },\n {\n name: 'parent',\n type: 'reference',\n labelKey: 'field.parent-department',\n description: 'the department it belongs under, by its name or 관리번호. Leave it out for a top-level department.',\n reference: departmentReference\n }\n]\n\n/* DepartmentPatch has no `extension` - the update changes only what the patch can carry. */\nconst DEPARTMENT_UPDATE_FIELDS = ['controlNo', 'name', 'description', 'active', 'parent']\n\n/*\n * Never taken: `manager` (the mutation looks the employee up without the domain - a separate security fix is\n * pending) and `picture` (a file upload).\n */\nconst DEPARTMENT_CREATE_FIELDS = DEPARTMENT_FIELDS.map(field => field.name)\n\nexport function departmentEntryTarget(): EntryTargetDeclaration {\n return {\n key: ORGANIZATION_DEPARTMENT,\n labelKey: 'label.organization-entry-department',\n description:\n 'one department of the organization: its code (관리번호), its name, a description, its phone extension, whether it is active, and the department it belongs under.',\n mutation: 'mutation ($department: NewDepartment!) { createDepartment(department: $department) { id controlNo name } }',\n fields: DEPARTMENT_FIELDS,\n maxRows: 200,\n variables: (row: EntryRow) => ({ department: inputOf(row.values, DEPARTMENT_CREATE_FIELDS, ['parent']) }),\n appliedOf: (data, row) => ({ id: data?.createDepartment?.id, label: codeAndName(data?.createDepartment ?? row.values) }),\n\n check: async (rows, { state }) => {\n const domainId = state?.domain?.id\n const names = [...new Set(rows.map(row => row.values.name).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n const codes = [...new Set(rows.map(row => row.values.controlNo).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n if (!domainId || (!names.length && !codes.length)) return departmentIssues(rows, [])\n const [{ getRepository }, { Department }, { In }] = await Promise.all([import('@things-factory/shell'), import('../service/department/department'), import('typeorm')])\n const existing = await getRepository(Department).find({\n where: [\n ...(names.length ? [{ domain: { id: domainId }, name: In(names) }] : []),\n ...(codes.length ? [{ domain: { id: domainId }, controlNo: In(codes) }] : [])\n ] as any,\n select: ['id', 'name', 'controlNo'] as any\n })\n return departmentIssues(rows, existing)\n },\n\n update: {\n read: {\n query: DEPARTMENTS,\n variables: ids => ({ filters: [{ name: 'id', operator: 'in', value: ids }], pagination: { page: 1, limit: ids.length } }),\n recordsOf: data => data?.departments?.items ?? []\n },\n find: {\n query: DEPARTMENTS,\n variables: criteria => ({\n filters: ['name', 'controlNo'].filter(name => typeof criteria?.[name] === 'string' && criteria[name]).map(name => ({ name, operator: 'search', value: criteria[name] })),\n pagination: { page: 1, limit: 200 }\n }),\n recordsOf: (data, criteria) => matching(data?.departments?.items ?? [], criteria),\n criteria: [\n { name: 'name', type: 'string', description: 'a piece of the department name' },\n { name: 'controlNo', type: 'string', description: \"a piece of the department's 관리번호\" }\n ]\n },\n mutation: 'mutation ($id: String!, $patch: DepartmentPatch!) { updateDepartment(id: $id, patch: $patch) { id } }',\n variables: ({ id, values }) => ({ id, patch: inputOf(values, DEPARTMENT_UPDATE_FIELDS, ['parent']) }),\n labelOf: record => codeAndName(record),\n fields: DEPARTMENT_UPDATE_FIELDS,\n\n /*\n * A new name or 관리번호 another department has, and a parent the department's own rule refuses - asked through\n * `checkedParent` itself, which only reads: it walks up from the parent within the domain and throws.\n */\n check: async (rows, { state }) => {\n const domain = state?.domain\n if (!domain?.id) return departmentChangeIssues(rows, [])\n const given = (name: string) => [...new Set(rows.filter(row => name in row.values).map(row => row.values[name]).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n const [names, codes] = [given('name'), given('controlNo')]\n const [{ getRepository }, { Department }, { checkedParent }, { In }] = await Promise.all([\n import('@things-factory/shell'),\n import('../service/department/department'),\n import('../service/department/department-parent'),\n import('typeorm')\n ])\n const repository = getRepository(Department)\n const existing =\n names.length || codes.length\n ? await repository.find({\n where: [\n ...(names.length ? [{ domain: { id: domain.id }, name: In(names) }] : []),\n ...(codes.length ? [{ domain: { id: domain.id }, controlNo: In(codes) }] : [])\n ] as any,\n select: ['id', 'name', 'controlNo'] as any\n })\n : []\n const parents: ParentVerdict[] = []\n for (const row of rows) {\n const parentId = changedParentId(row.values)\n if (!parentId) {\n parents.push(undefined)\n continue\n }\n try {\n await checkedParent(row.id, { parent: { id: parentId } }, repository, domain)\n parents.push(undefined)\n } catch (error: any) {\n const verdict = parentVerdictOf(error)\n if (!verdict) throw error\n parents.push(verdict)\n }\n }\n return departmentChangeIssues(rows, existing as any, parents)\n }\n }\n }\n}\n\n/*\n * ── 직원 (employee) ──────────────────────────────────────────────────────────────────────────────────\n *\n * PERSONAL DATA. A row of this target is a person's name, position and hire day, and proposing it sends that\n * material to an external model. It is declared here so the shape is settled, and **no application opens it**:\n * a mode may name `organization.employee` only by an explicit product decision.\n *\n * Kept to the fields a roster needs. Never taken: user, bankAccount, bankName, emergencyContact,\n * emergencyContactPhone, contact, photo, supervisor. No update this round.\n *\n * The department is passed as an id the assistant resolved through the domain-scoped `departments` query.\n * createEmployee itself looks the department (and the supervisor) up by id without the domain - that is the\n * server's to fix, separately.\n */\nexport const EMPLOYEE_FORBIDDEN_FIELDS = ['user', 'bankAccount', 'bankName', 'emergencyContact', 'emergencyContactPhone', 'contact', 'photo', 'supervisor']\n\nconst EMPLOYEE_FIELDS: EntryField[] = [\n { name: 'controlNo', type: 'string', required: true, labelKey: 'field.control-no', description: 'the employee number (사번) as the material writes it' },\n { name: 'name', type: 'string', required: true, labelKey: 'field.name', description: \"the person's name\" },\n { name: 'jobPosition', type: 'string', labelKey: 'label.job-position', description: 'the rank (직급) - 사원, 대리, 과장...' },\n { name: 'jobResponsibility', type: 'string', labelKey: 'label.job-responsibility', description: 'the role (직책) - 팀장, 파트장...' },\n { name: 'type', type: 'enum', values: ['FULLTIME', 'PARTTIME', 'TEMPORARY'], labelKey: 'field.type', valueKeyPrefix: 'text.employee-type-' },\n { name: 'hiredOn', type: 'date', labelKey: 'field.hired-on', description: 'the day the person was hired' },\n { name: 'department', type: 'reference', labelKey: 'field.department', description: 'the department, by its name or 관리번호', reference: departmentReference }\n]\n\nexport function employeeEntryTarget(): EntryTargetDeclaration {\n return {\n key: ORGANIZATION_EMPLOYEE,\n labelKey: 'label.organization-entry-employee',\n description: 'one employee: the employee number (사번), the name, the rank and the role, the kind of employment, the day hired, and the department.',\n mutation: 'mutation ($employee: NewEmployee!) { createEmployee(employee: $employee) { id controlNo name } }',\n fields: EMPLOYEE_FIELDS,\n maxRows: 200,\n variables: (row: EntryRow) => ({ employee: inputOf(row.values, EMPLOYEE_FIELDS.map(field => field.name), ['department']) }),\n appliedOf: (data, row) => ({ id: data?.createEmployee?.id, label: codeAndName(data?.createEmployee ?? row.values) }),\n check: async (rows, { state }) => {\n const domainId = state?.domain?.id\n const codes = [...new Set(rows.map(row => row.values.controlNo).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n if (!domainId || !codes.length) return employeeIssues(rows, [])\n const [{ getRepository }, { Employee }, { In }] = await Promise.all([import('@things-factory/shell'), import('../service/employee/employee'), import('typeorm')])\n const existing = await getRepository(Employee).find({ where: { domain: { id: domainId }, controlNo: In(codes) } as any, select: ['id', 'controlNo'] as any })\n return employeeIssues(rows, existing)\n }\n }\n}\n\n/**\n * The organization's AI 입력 targets an application may register as a whole - the department. The employee is\n * left out on purpose: it is taken only by name, `employeeEntryTarget()`, after a product decision (see the note\n * above `EMPLOYEE_FORBIDDEN_FIELDS`), so registering this list never brings it along.\n */\nexport function organizationEntryTargets(): EntryTargetDeclaration[] {\n return [departmentEntryTarget()]\n}\n"]}
1
+ {"version":3,"file":"organization-entry-targets.js","sourceRoot":"","sources":["../../server/ai-entry/organization-entry-targets.ts"],"names":[],"mappings":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AQ,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,EAAS,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,CAAQ,EAAE,CAAC,CAAA;YAC7J,OAAO,IAAA,yCAAc,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACvC,CAAC;KACF,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB;IACtC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAA;AAClC,CAAC","sourcesContent":["/*\n * AI 입력 targets of the organization - what an application may hand its assistant so that departments\n * (and, only by an explicit product decision, employees) are entered from material\n * (operato-application/design/ai/data-entry.md).\n *\n * Plain declarations: this package does not depend on @things-factory/ai-assistant. An application that runs\n * the assistant passes them to `registerEntryTarget` and names their keys in its modes. Every row is entered\n * through the organization's own mutation, run as the person - the same `@privilege` and checks as the screens.\n *\n * The checks read through the repository of the request's domain only, and import it when they run, so that\n * reading these declarations stays light.\n */\nimport type { EntryField, EntryRow, EntryTargetDeclaration } from './entry-target-shape'\nimport {\n changedParentId,\n codeAndName,\n departmentChangeIssues,\n departmentIssues,\n departmentsNamed,\n employeeIssues,\n inputOf,\n matching,\n parentVerdictOf,\n type ParentVerdict\n} from './organization-entry-rules'\n\nexport const ORGANIZATION_DEPARTMENT = 'organization.department'\nexport const ORGANIZATION_EMPLOYEE = 'organization.employee'\n\n/** Departments of the person's domain whose name or 관리번호 holds the text - `search` filters are OR'd by the list builder. */\nconst DEPARTMENTS_BY_TEXT =\n 'query ($filters: [Filter!], $pagination: Pagination) { departments(filters: $filters, pagination: $pagination) { items { id controlNo name } } }'\n\nconst DEPARTMENTS =\n 'query ($filters: [Filter!], $pagination: Pagination) { departments(filters: $filters, pagination: $pagination) { items { id controlNo name description active extension parent { id controlNo name } } } }'\n\n/** A department the model names in words, found as the person through `departments` - the id is what the mutation takes. */\nconst departmentReference = {\n query: DEPARTMENTS_BY_TEXT,\n variables: (said: string) => ({\n filters: [\n { name: 'name', operator: 'search', value: said },\n { name: 'controlNo', operator: 'search', value: said }\n ],\n pagination: { page: 1, limit: 200 }\n }),\n recordsOf: (data: any, said: string) => departmentsNamed(data?.departments?.items ?? [], said)\n}\n\nconst DEPARTMENT_FIELDS: EntryField[] = [\n { name: 'controlNo', type: 'string', required: true, labelKey: 'field.control-no', description: \"the department's code (관리번호) as the material writes it\" },\n { name: 'name', type: 'string', required: true, labelKey: 'field.name', description: 'the department name' },\n { name: 'description', type: 'string', labelKey: 'field.description' },\n { name: 'active', type: 'boolean', labelKey: 'field.active', description: 'false only when the material says the department is closed or not in use' },\n { name: 'extension', type: 'string', labelKey: 'field.extension', description: \"the department's phone extension (내선 번호)\" },\n {\n name: 'parent',\n type: 'reference',\n labelKey: 'field.parent-department',\n description: 'the department it belongs under, by its name or 관리번호. Leave it out for a top-level department.',\n reference: departmentReference\n }\n]\n\n/* DepartmentPatch has no `extension` - the update changes only what the patch can carry. */\nconst DEPARTMENT_UPDATE_FIELDS = ['controlNo', 'name', 'description', 'active', 'parent']\n\n/*\n * Never taken: `manager` (a person, picked on the screen) and `picture` (a file upload).\n */\nconst DEPARTMENT_CREATE_FIELDS = DEPARTMENT_FIELDS.map(field => field.name)\n\nexport function departmentEntryTarget(): EntryTargetDeclaration {\n return {\n key: ORGANIZATION_DEPARTMENT,\n labelKey: 'label.organization-entry-department',\n description:\n 'one department of the organization: its code (관리번호), its name, a description, its phone extension, whether it is active, and the department it belongs under.',\n mutation: 'mutation ($department: NewDepartment!) { createDepartment(department: $department) { id controlNo name } }',\n fields: DEPARTMENT_FIELDS,\n maxRows: 200,\n variables: (row: EntryRow) => ({ department: inputOf(row.values, DEPARTMENT_CREATE_FIELDS, ['parent']) }),\n appliedOf: (data, row) => ({ id: data?.createDepartment?.id, label: codeAndName(data?.createDepartment ?? row.values) }),\n\n check: async (rows, { state }) => {\n const domainId = state?.domain?.id\n const names = [...new Set(rows.map(row => row.values.name).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n const codes = [...new Set(rows.map(row => row.values.controlNo).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n if (!domainId || (!names.length && !codes.length)) return departmentIssues(rows, [])\n const [{ getRepository }, { Department }, { In }] = await Promise.all([import('@things-factory/shell'), import('../service/department/department'), import('typeorm')])\n const existing = await getRepository(Department).find({\n where: [\n ...(names.length ? [{ domain: { id: domainId }, name: In(names) }] : []),\n ...(codes.length ? [{ domain: { id: domainId }, controlNo: In(codes) }] : [])\n ] as any,\n select: ['id', 'name', 'controlNo'] as any\n })\n return departmentIssues(rows, existing)\n },\n\n update: {\n read: {\n query: DEPARTMENTS,\n variables: ids => ({ filters: [{ name: 'id', operator: 'in', value: ids }], pagination: { page: 1, limit: ids.length } }),\n recordsOf: data => data?.departments?.items ?? []\n },\n find: {\n query: DEPARTMENTS,\n variables: criteria => ({\n filters: ['name', 'controlNo'].filter(name => typeof criteria?.[name] === 'string' && criteria[name]).map(name => ({ name, operator: 'search', value: criteria[name] })),\n pagination: { page: 1, limit: 200 }\n }),\n recordsOf: (data, criteria) => matching(data?.departments?.items ?? [], criteria),\n criteria: [\n { name: 'name', type: 'string', description: 'a piece of the department name' },\n { name: 'controlNo', type: 'string', description: \"a piece of the department's 관리번호\" }\n ]\n },\n mutation: 'mutation ($id: String!, $patch: DepartmentPatch!) { updateDepartment(id: $id, patch: $patch) { id } }',\n variables: ({ id, values }) => ({ id, patch: inputOf(values, DEPARTMENT_UPDATE_FIELDS, ['parent']) }),\n labelOf: record => codeAndName(record),\n fields: DEPARTMENT_UPDATE_FIELDS,\n\n /*\n * A new name or 관리번호 another department has, and a parent the department's own rule refuses - asked through\n * `checkedParent` itself, which only reads: it walks up from the parent within the domain and throws.\n */\n check: async (rows, { state }) => {\n const domain = state?.domain\n if (!domain?.id) return departmentChangeIssues(rows, [])\n const given = (name: string) => [...new Set(rows.filter(row => name in row.values).map(row => row.values[name]).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n const [names, codes] = [given('name'), given('controlNo')]\n const [{ getRepository }, { Department }, { checkedParent }, { In }] = await Promise.all([\n import('@things-factory/shell'),\n import('../service/department/department'),\n import('../service/department/department-parent'),\n import('typeorm')\n ])\n const repository = getRepository(Department)\n const existing =\n names.length || codes.length\n ? await repository.find({\n where: [\n ...(names.length ? [{ domain: { id: domain.id }, name: In(names) }] : []),\n ...(codes.length ? [{ domain: { id: domain.id }, controlNo: In(codes) }] : [])\n ] as any,\n select: ['id', 'name', 'controlNo'] as any\n })\n : []\n const parents: ParentVerdict[] = []\n for (const row of rows) {\n const parentId = changedParentId(row.values)\n if (!parentId) {\n parents.push(undefined)\n continue\n }\n try {\n await checkedParent(row.id, { parent: { id: parentId } }, repository, domain)\n parents.push(undefined)\n } catch (error: any) {\n const verdict = parentVerdictOf(error)\n if (!verdict) throw error\n parents.push(verdict)\n }\n }\n return departmentChangeIssues(rows, existing as any, parents)\n }\n }\n }\n}\n\n/*\n * ── 직원 (employee) ──────────────────────────────────────────────────────────────────────────────────\n *\n * PERSONAL DATA. A row of this target is a person's name, position and hire day, and proposing it sends that\n * material to an external model. It is declared here so the shape is settled, and **no application opens it**:\n * a mode may name `organization.employee` only by an explicit product decision.\n *\n * Kept to the fields a roster needs. Never taken: user, bankAccount, bankName, emergencyContact,\n * emergencyContactPhone, contact, photo, supervisor. No update this round.\n *\n * The department is passed as an id the assistant resolved through the domain-scoped `departments` query, and\n * createEmployee looks it up again inside the caller's domain.\n */\nexport const EMPLOYEE_FORBIDDEN_FIELDS = ['user', 'bankAccount', 'bankName', 'emergencyContact', 'emergencyContactPhone', 'contact', 'photo', 'supervisor']\n\nconst EMPLOYEE_FIELDS: EntryField[] = [\n { name: 'controlNo', type: 'string', required: true, labelKey: 'field.control-no', description: 'the employee number (사번) as the material writes it' },\n { name: 'name', type: 'string', required: true, labelKey: 'field.name', description: \"the person's name\" },\n { name: 'jobPosition', type: 'string', labelKey: 'label.job-position', description: 'the rank (직급) - 사원, 대리, 과장...' },\n { name: 'jobResponsibility', type: 'string', labelKey: 'label.job-responsibility', description: 'the role (직책) - 팀장, 파트장...' },\n { name: 'type', type: 'enum', values: ['FULLTIME', 'PARTTIME', 'TEMPORARY'], labelKey: 'field.type', valueKeyPrefix: 'text.employee-type-' },\n { name: 'hiredOn', type: 'date', labelKey: 'field.hired-on', description: 'the day the person was hired' },\n { name: 'department', type: 'reference', labelKey: 'field.department', description: 'the department, by its name or 관리번호', reference: departmentReference }\n]\n\nexport function employeeEntryTarget(): EntryTargetDeclaration {\n return {\n key: ORGANIZATION_EMPLOYEE,\n labelKey: 'label.organization-entry-employee',\n description: 'one employee: the employee number (사번), the name, the rank and the role, the kind of employment, the day hired, and the department.',\n mutation: 'mutation ($employee: NewEmployee!) { createEmployee(employee: $employee) { id controlNo name } }',\n fields: EMPLOYEE_FIELDS,\n maxRows: 200,\n variables: (row: EntryRow) => ({ employee: inputOf(row.values, EMPLOYEE_FIELDS.map(field => field.name), ['department']) }),\n appliedOf: (data, row) => ({ id: data?.createEmployee?.id, label: codeAndName(data?.createEmployee ?? row.values) }),\n check: async (rows, { state }) => {\n const domainId = state?.domain?.id\n const codes = [...new Set(rows.map(row => row.values.controlNo).filter((v): v is string => typeof v === 'string' && !!v.trim()).map(v => v.trim()))]\n if (!domainId || !codes.length) return employeeIssues(rows, [])\n const [{ getRepository }, { Employee }, { In }] = await Promise.all([import('@things-factory/shell'), import('../service/employee/employee'), import('typeorm')])\n const existing = await getRepository(Employee).find({ where: { domain: { id: domainId }, controlNo: In(codes) } as any, select: ['id', 'controlNo'] as any })\n return employeeIssues(rows, existing)\n }\n }\n}\n\n/**\n * The organization's AI 입력 targets an application may register as a whole - the department. The employee is\n * left out on purpose: it is taken only by name, `employeeEntryTarget()`, after a product decision (see the note\n * above `EMPLOYEE_FORBIDDEN_FIELDS`), so registering this list never brings it along.\n */\nexport function organizationEntryTargets(): EntryTargetDeclaration[] {\n return [departmentEntryTarget()]\n}\n"]}
@@ -3,6 +3,6 @@ import { DepartmentHistory } from './department-history';
3
3
  import { DepartmentQuery } from './department-query';
4
4
  import { DepartmentMutation } from './department-mutation';
5
5
  import { DepartmentHistoryEntitySubscriber } from './event-subscriber';
6
- export declare const entities: (typeof Department | typeof DepartmentHistory)[];
7
- export declare const resolvers: (typeof DepartmentMutation | typeof DepartmentQuery)[];
6
+ export declare const entities: (typeof DepartmentHistory | typeof Department)[];
7
+ export declare const resolvers: (typeof DepartmentQuery | typeof DepartmentMutation)[];
8
8
  export declare const subscribers: (typeof DepartmentHistoryEntitySubscriber)[];
@@ -3,7 +3,7 @@ import { EmployeeHistory } from './employee-history';
3
3
  import { EmployeeQuery } from './employee-query';
4
4
  import { EmployeeMutation } from './employee-mutation';
5
5
  import { EmployeeHistoryEntitySubscriber } from './event-subscriber';
6
- export declare const entities: (typeof Employee | typeof EmployeeHistory)[];
6
+ export declare const entities: (typeof EmployeeHistory | typeof Employee)[];
7
7
  export declare const resolvers: (typeof EmployeeMutation | typeof EmployeeQuery)[];
8
8
  export declare const subscribers: (typeof EmployeeHistoryEntitySubscriber)[];
9
9
  export * from './my-employee.js';
@@ -1,8 +1,8 @@
1
1
  export * from './approval-line/approval-line';
2
2
  export * from './department/department';
3
3
  export * from './employee/employee';
4
- export declare const entities: (typeof import("./employee/employee").Employee | typeof import("./department/department").Department | typeof import("./department/department-history").DepartmentHistory | typeof import("./employee/employee-history").EmployeeHistory | typeof import("./approval-line/approval-line").ApprovalLine)[];
4
+ export declare const entities: (typeof import("./employee/employee-history").EmployeeHistory | typeof import("./department/department-history").DepartmentHistory | typeof import("./approval-line/approval-line").ApprovalLine | typeof import("./employee/employee").Employee | typeof import("./department/department").Department)[];
5
5
  export declare const subscribers: (typeof import("./department/event-subscriber").DepartmentHistoryEntitySubscriber | typeof import("./employee/event-subscriber").EmployeeHistoryEntitySubscriber)[];
6
6
  export declare const schema: {
7
- resolverClasses: (typeof import("./employee/employee-mutation").EmployeeMutation | typeof import("./department/department-mutation").DepartmentMutation | typeof import("./department/department-query").DepartmentQuery | typeof import("./employee/employee-query").EmployeeQuery | typeof import("./approval-line/approval-line-query").ApprovalLineQuery | typeof import("./approval-line/approval-line-mutation").ApprovalLineMutation)[];
7
+ resolverClasses: (typeof import("./employee/employee-mutation").EmployeeMutation | typeof import("./employee/employee-query").EmployeeQuery | typeof import("./department/department-query").DepartmentQuery | typeof import("./approval-line/approval-line-query").ApprovalLineQuery | typeof import("./approval-line/approval-line-mutation").ApprovalLineMutation | typeof import("./department/department-mutation").DepartmentMutation)[];
8
8
  };