document-model 2.13.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/browser/cjs/document-model.js +2 -2
  2. package/dist/browser/cjs/document.js +3 -3
  3. package/dist/browser/cjs/index.js +2 -2
  4. package/dist/browser/cjs/internal/{creators-c2maywyy.js → creators-DJg3Kd1P.js} +353 -2
  5. package/dist/browser/cjs/internal/creators-DJg3Kd1P.js.map +1 -0
  6. package/dist/browser/cjs/internal/{index-DeM7OezK.js → index-CGExio27.js} +3 -3
  7. package/dist/browser/cjs/internal/{index-DeM7OezK.js.map → index-CGExio27.js.map} +1 -1
  8. package/dist/browser/cjs/internal/{index-DDUYrJUg.js → index-CQg4iLBq.js} +4 -4
  9. package/dist/browser/cjs/internal/index-CQg4iLBq.js.map +1 -0
  10. package/dist/{node/cjs/internal/index-Cdxqd-qQ.js → browser/cjs/internal/index-DcdJY5J3.js} +2 -2
  11. package/dist/browser/cjs/internal/index-DcdJY5J3.js.map +1 -0
  12. package/dist/browser/cjs/internal/{object-WukT1Feq.js → object-C3OfcOUa.js} +2 -2
  13. package/dist/browser/cjs/internal/{object-WukT1Feq.js.map → object-C3OfcOUa.js.map} +1 -1
  14. package/dist/browser/cjs/utils.js +1 -1
  15. package/dist/browser/es/document-model.js +2 -2
  16. package/dist/browser/es/document.js +3 -3
  17. package/dist/browser/es/index.js +2 -2
  18. package/dist/browser/es/internal/{creators-CkhiX4CP.js → creators-Dir4K_-h.js} +353 -2
  19. package/dist/browser/es/internal/creators-Dir4K_-h.js.map +1 -0
  20. package/dist/browser/es/internal/{index-CHpkSkeZ.js → index-BxCiP58y.js} +2 -2
  21. package/dist/browser/es/internal/index-BxCiP58y.js.map +1 -0
  22. package/dist/browser/es/internal/{index-BRVlDkPn.js → index-HlkIVQZ6.js} +3 -3
  23. package/dist/browser/es/internal/{index-BRVlDkPn.js.map → index-HlkIVQZ6.js.map} +1 -1
  24. package/dist/browser/es/internal/{index-uWY5kwkt.js → index-qYp7hG3r.js} +4 -4
  25. package/dist/browser/es/internal/index-qYp7hG3r.js.map +1 -0
  26. package/dist/browser/es/internal/{object-CJHsId9H.js → object-CzFSgK3q.js} +2 -2
  27. package/dist/browser/es/internal/{object-CJHsId9H.js.map → object-CzFSgK3q.js.map} +1 -1
  28. package/dist/browser/es/utils.js +1 -1
  29. package/dist/browser/src/document/schema/zod.d.ts +9 -27
  30. package/dist/browser/src/document/schema/zod.d.ts.map +1 -1
  31. package/dist/node/cjs/document-model.js +2 -2
  32. package/dist/node/cjs/document.js +3 -3
  33. package/dist/node/cjs/index.js +2 -2
  34. package/dist/node/cjs/internal/{creators-B5g3rJKI.js → creators-ZpkFlacS.js} +353 -2
  35. package/dist/node/cjs/internal/creators-ZpkFlacS.js.map +1 -0
  36. package/dist/{browser/cjs/internal/index-CTDPLYkV.js → node/cjs/internal/index-B9N2GsMZ.js} +2 -2
  37. package/dist/node/cjs/internal/index-B9N2GsMZ.js.map +1 -0
  38. package/dist/node/cjs/internal/{index-DHkzUhZg.js → index-ClITlWIV.js} +4 -4
  39. package/dist/node/cjs/internal/index-ClITlWIV.js.map +1 -0
  40. package/dist/node/cjs/internal/{index-CYhNqyfA.js → index-DVgdtYs7.js} +3 -3
  41. package/dist/node/cjs/internal/{index-CYhNqyfA.js.map → index-DVgdtYs7.js.map} +1 -1
  42. package/dist/node/cjs/internal/{object-CpAsa3Oe.js → object-DVKEoARn.js} +2 -2
  43. package/dist/node/cjs/internal/{object-CpAsa3Oe.js.map → object-DVKEoARn.js.map} +1 -1
  44. package/dist/node/cjs/utils.js +1 -1
  45. package/dist/node/es/document-model.js +2 -2
  46. package/dist/node/es/document.js +3 -3
  47. package/dist/node/es/index.js +2 -2
  48. package/dist/node/es/internal/{creators-B6tCK8Ir.js → creators-0lHfLHX0.js} +353 -2
  49. package/dist/node/es/internal/creators-0lHfLHX0.js.map +1 -0
  50. package/dist/node/es/internal/{index-CJxdcyKO.js → index-BOhJLvSm.js} +2 -2
  51. package/dist/node/es/internal/index-BOhJLvSm.js.map +1 -0
  52. package/dist/node/es/internal/{index-dVqoH-Pd.js → index-CxWihLAA.js} +3 -3
  53. package/dist/node/es/internal/{index-dVqoH-Pd.js.map → index-CxWihLAA.js.map} +1 -1
  54. package/dist/node/es/internal/{index-mUxH6TbI.js → index-bxdb71Hw.js} +4 -4
  55. package/dist/node/es/internal/index-bxdb71Hw.js.map +1 -0
  56. package/dist/node/es/internal/{object-Bj_Xyrvk.js → object-Bl-LmXHF.js} +2 -2
  57. package/dist/node/es/internal/{object-Bj_Xyrvk.js.map → object-Bl-LmXHF.js.map} +1 -1
  58. package/dist/node/es/utils.js +1 -1
  59. package/dist/node/src/document/schema/zod.d.ts +9 -27
  60. package/dist/node/src/document/schema/zod.d.ts.map +1 -1
  61. package/package.json +1 -1
  62. package/dist/browser/cjs/internal/creators-c2maywyy.js.map +0 -1
  63. package/dist/browser/cjs/internal/index-CTDPLYkV.js.map +0 -1
  64. package/dist/browser/cjs/internal/index-DDUYrJUg.js.map +0 -1
  65. package/dist/browser/es/internal/creators-CkhiX4CP.js.map +0 -1
  66. package/dist/browser/es/internal/index-CHpkSkeZ.js.map +0 -1
  67. package/dist/browser/es/internal/index-uWY5kwkt.js.map +0 -1
  68. package/dist/node/cjs/internal/creators-B5g3rJKI.js.map +0 -1
  69. package/dist/node/cjs/internal/index-Cdxqd-qQ.js.map +0 -1
  70. package/dist/node/cjs/internal/index-DHkzUhZg.js.map +0 -1
  71. package/dist/node/es/internal/creators-B6tCK8Ir.js.map +0 -1
  72. package/dist/node/es/internal/index-CJxdcyKO.js.map +0 -1
  73. package/dist/node/es/internal/index-mUxH6TbI.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index-BRVlDkPn.js","sources":["../../../../../../node_modules/.pnpm/change-case@5.4.4/node_modules/change-case/dist/index.js","../../../../src/document-model/custom/utils.ts","../../../../src/document-model/gen/document-model.ts","../../../../src/document-model/gen/schema/zod.ts","../../../../src/document-model/custom/reducers/header.ts","../../../../src/document-model/custom/reducers/versioning.ts","../../../../src/document-model/custom/reducers/module.ts","../../../../src/document-model/custom/reducers/operation-error.ts","../../../../src/document-model/custom/reducers/operation-example.ts","../../../../src/document-model/custom/reducers/operation.ts","../../../../src/document-model/custom/reducers/state.ts","../../../../src/document-model/gen/reducer.ts","../../../../src/document-model/gen/utils.ts","../../../../src/document-model/gen/header/creators.ts","../../../../src/document-model/gen/header/object.ts","../../../../src/document-model/gen/versioning/creators.ts","../../../../src/document-model/gen/versioning/object.ts","../../../../src/document-model/gen/module/creators.ts","../../../../src/document-model/gen/module/object.ts","../../../../src/document-model/gen/operation-error/creators.ts","../../../../src/document-model/gen/operation-error/object.ts","../../../../src/document-model/gen/operation-example/creators.ts","../../../../src/document-model/gen/operation-example/object.ts","../../../../src/document-model/gen/operation/creators.ts","../../../../src/document-model/gen/operation/object.ts","../../../../src/document-model/gen/state/creators.ts","../../../../src/document-model/gen/state/object.ts","../../../../src/document-model/gen/object.ts","../../../../src/document-model/index.ts"],"sourcesContent":["// Regexps involved with splitting words in various case formats.\nconst SPLIT_LOWER_UPPER_RE = /([\\p{Ll}\\d])(\\p{Lu})/gu;\nconst SPLIT_UPPER_UPPER_RE = /(\\p{Lu})([\\p{Lu}][\\p{Ll}])/gu;\n// Used to iterate over the initial split result and separate numbers.\nconst SPLIT_SEPARATE_NUMBER_RE = /(\\d)\\p{Ll}|(\\p{L})\\d/u;\n// Regexp involved with stripping non-word characters from the result.\nconst DEFAULT_STRIP_REGEXP = /[^\\p{L}\\d]+/giu;\n// The replacement value for splits.\nconst SPLIT_REPLACE_VALUE = \"$1\\0$2\";\n// The default characters to keep after transforming case.\nconst DEFAULT_PREFIX_SUFFIX_CHARACTERS = \"\";\n/**\n * Split any cased input strings into an array of words.\n */\nexport function split(value) {\n let result = value.trim();\n result = result\n .replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE)\n .replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);\n result = result.replace(DEFAULT_STRIP_REGEXP, \"\\0\");\n let start = 0;\n let end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n if (start === end)\n return [];\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n return result.slice(start, end).split(/\\0/g);\n}\n/**\n * Split the input string into an array of words, separating numbers.\n */\nexport function splitSeparateNumbers(value) {\n const words = split(value);\n for (let i = 0; i < words.length; i++) {\n const word = words[i];\n const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);\n if (match) {\n const offset = match.index + (match[1] ?? match[2]).length;\n words.splice(i, 1, word.slice(0, offset), word.slice(offset));\n }\n }\n return words;\n}\n/**\n * Convert a string to space separated lower case (`foo bar`).\n */\nexport function noCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to camel case (`fooBar`).\n */\nexport function camelCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return lower(word);\n return transform(word, index);\n })\n .join(options?.delimiter ?? \"\") +\n suffix);\n}\n/**\n * Convert a string to pascal case (`FooBar`).\n */\nexport function pascalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return prefix + words.map(transform).join(options?.delimiter ?? \"\") + suffix;\n}\n/**\n * Convert a string to pascal snake case (`Foo_Bar`).\n */\nexport function pascalSnakeCase(input, options) {\n return capitalCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to capital case (`Foo Bar`).\n */\nexport function capitalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n return (prefix +\n words\n .map(capitalCaseTransformFactory(lower, upper))\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to constant case (`FOO_BAR`).\n */\nexport function constantCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(upperFactory(options?.locale)).join(options?.delimiter ?? \"_\") +\n suffix);\n}\n/**\n * Convert a string to dot case (`foo.bar`).\n */\nexport function dotCase(input, options) {\n return noCase(input, { delimiter: \".\", ...options });\n}\n/**\n * Convert a string to kebab case (`foo-bar`).\n */\nexport function kebabCase(input, options) {\n return noCase(input, { delimiter: \"-\", ...options });\n}\n/**\n * Convert a string to path case (`foo/bar`).\n */\nexport function pathCase(input, options) {\n return noCase(input, { delimiter: \"/\", ...options });\n}\n/**\n * Convert a string to path case (`Foo bar`).\n */\nexport function sentenceCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = capitalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return transform(word);\n return lower(word);\n })\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to snake case (`foo_bar`).\n */\nexport function snakeCase(input, options) {\n return noCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to header case (`Foo-Bar`).\n */\nexport function trainCase(input, options) {\n return capitalCase(input, { delimiter: \"-\", ...options });\n}\nfunction lowerFactory(locale) {\n return locale === false\n ? (input) => input.toLowerCase()\n : (input) => input.toLocaleLowerCase(locale);\n}\nfunction upperFactory(locale) {\n return locale === false\n ? (input) => input.toUpperCase()\n : (input) => input.toLocaleUpperCase(locale);\n}\nfunction capitalCaseTransformFactory(lower, upper) {\n return (word) => `${upper(word[0])}${lower(word.slice(1))}`;\n}\nfunction pascalCaseTransformFactory(lower, upper) {\n return (word, index) => {\n const char0 = word[0];\n const initial = index > 0 && char0 >= \"0\" && char0 <= \"9\" ? \"_\" + char0 : upper(char0);\n return initial + lower(word.slice(1));\n };\n}\nfunction splitPrefixSuffix(input, options = {}) {\n const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);\n const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n let prefixIndex = 0;\n let suffixIndex = input.length;\n while (prefixIndex < input.length) {\n const char = input.charAt(prefixIndex);\n if (!prefixCharacters.includes(char))\n break;\n prefixIndex++;\n }\n while (suffixIndex > prefixIndex) {\n const index = suffixIndex - 1;\n const char = input.charAt(index);\n if (!suffixCharacters.includes(char))\n break;\n suffixIndex = index;\n }\n return [\n input.slice(0, prefixIndex),\n splitFn(input.slice(prefixIndex, suffixIndex)),\n input.slice(suffixIndex),\n ];\n}\n//# sourceMappingURL=index.js.map","import { pascalCase } from \"change-case\";\nimport { ValidationError } from \"../../document\";\nimport { Module, Operation } from \"../gen/schema\";\n\nexport function validateInitialState(\n initialState: string,\n allowEmptyState = false,\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (allowEmptyState && initialState === \"\") return errors;\n\n try {\n const state = JSON.parse(initialState) as object;\n\n if (!allowEmptyState && !Object.keys(state).length) {\n errors.push({\n message: \"Initial state cannot be empty\",\n details: {\n initialState,\n },\n });\n }\n } catch {\n errors.push({\n message: \"Invalid initial state\",\n details: {\n initialState,\n },\n });\n }\n\n return errors;\n}\n\nexport function validateStateSchemaName(\n schema: string,\n documentName: string,\n scope = \"\",\n allowEmptySchema = true,\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (!allowEmptySchema && !schema) {\n errors.push({\n message: \"State schema is required\",\n details: {\n schema,\n },\n });\n\n return errors;\n }\n\n if (allowEmptySchema && !schema) return errors;\n\n const expectedTypeName = `type ${pascalCase(documentName)}${pascalCase(scope)}State`;\n\n if (!schema.includes(expectedTypeName)) {\n errors.push({\n message: `Invalid state schema name. Expected ${expectedTypeName}`,\n details: {\n schema,\n },\n });\n }\n\n return errors;\n}\n\nexport function validateModules(modules: Array<Module>): ValidationError[] {\n const errors: ValidationError[] = [];\n if (!modules.length) {\n errors.push({\n message: \"Modules are required\",\n details: {\n modules,\n },\n });\n }\n\n const modulesError = modules.reduce<ValidationError[]>(\n (acc, mod) => [...acc, ...validateModule(mod)],\n [],\n );\n\n return [...errors, ...modulesError];\n}\n\nexport function validateModule(mod: Module): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (!mod.name) {\n errors.push({\n message: \"Module name is required\",\n details: {\n module: mod,\n },\n });\n }\n\n if (!mod.operations.length) {\n errors.push({\n message: \"Module operations are required\",\n details: {\n module: mod,\n },\n });\n }\n\n const operationErrors = mod.operations.reduce<ValidationError[]>(\n (acc, operation) => [...acc, ...validateModuleOperation(operation)],\n [],\n );\n\n return [...errors, ...operationErrors];\n}\n\nexport function validateModuleOperation(\n operation: Operation,\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (!operation.name) {\n errors.push({\n message: \"Operation name is required\",\n details: {\n operation,\n },\n });\n }\n\n if (!operation.schema) {\n errors.push({\n message: \"Operation schema is required\",\n details: {\n operation,\n },\n });\n }\n\n return errors;\n}\n","import type { DocumentModelState } from \"..\";\n\nexport const documentModel: DocumentModelState = {\n id: \"powerhouse/document-model\",\n name: \"DocumentModel\",\n extension: \"phdm\",\n description:\n \"The Powerhouse Document Model describes the state and operations of a document type.\",\n author: {\n name: \"Powerhouse\",\n website: \"https://www.powerhouse.inc/\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n modules: [\n {\n name: \"header\",\n operations: [\n {\n name: \"SetModelName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModelId\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModelExtension\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModelDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetAuthorName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetAuthorWebsite\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"versioning\",\n operations: [\n {\n name: \"AddChangeLogItem\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"UpdateChangeLogItem\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteChangeLogItem\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderChangeLogItems\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReleaseNewVersion\",\n schema: null,\n id: \"\",\n description: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"module\",\n operations: [\n {\n name: \"AddModule\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModuleName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModuleDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteModule\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderModules\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"operation-error\",\n operations: [\n {\n name: \"AddOperationError\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorCode\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorTemplate\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteOperationError\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderOperationErrors\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"operation-example\",\n operations: [\n {\n name: \"AddOperationExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"UpdateOperationExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteOperationExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderOperationExamples\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"operation\",\n operations: [\n {\n name: \"AddOperation\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationSchema\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationTemplate\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationReducer\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"MoveOperation\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteOperation\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderModuleOperations\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"state\",\n operations: [\n {\n name: \"SetStateSchema\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetInitialState\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"AddStateExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"UpdateStateExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteStateExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderStateExamples\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n ],\n state: {\n global: {\n schema: \"\",\n initialValue:\n '{\\n \"id\": \"\",\\n \"name\": \"\",\\n \"extension\": \"\",\\n \"description\": \"\",\\n \"author\": {\\n \"name\": \"\",\\n \"website\": \"\"\\n },\\n \"specifications\": [\\n {\\n \"version\": 1,\\n \"changeLog\": [],\\n \"state\": {\\n \"schema\": \"\",\\n \"initialValue\": \"\",\\n \"examples\": []\\n },\\n \"modules\": []\\n }\\n ]\\n}',\n examples: [],\n },\n local: {\n schema: \"\",\n initialValue: `{}`,\n examples: [],\n },\n },\n },\n ],\n};\n","import { z } from \"zod\";\nimport {\n AddChangeLogItemInput,\n AddModuleInput,\n AddOperationErrorInput,\n AddOperationExampleInput,\n AddOperationInput,\n AddStateExampleInput,\n Author,\n CodeExample,\n DeleteChangeLogItemInput,\n DeleteModuleInput,\n DeleteOperationErrorInput,\n DeleteOperationExampleInput,\n DeleteOperationInput,\n DeleteStateExampleInput,\n DocumentModelState,\n DocumentSpecification,\n Module,\n MoveOperationInput,\n Operation,\n OperationError,\n ReorderChangeLogItemsInput,\n ReorderModuleOperationsInput,\n ReorderModulesInput,\n ReorderOperationErrorsInput,\n ReorderOperationExamplesInput,\n ReorderStateExamplesInput,\n ScopeState,\n SetAuthorNameInput,\n SetAuthorWebsiteInput,\n SetInitialStateInput,\n SetModelDescriptionInput,\n SetModelExtensionInput,\n SetModelIdInput,\n SetModelNameInput,\n SetModuleDescriptionInput,\n SetModuleNameInput,\n SetOperationDescriptionInput,\n SetOperationErrorCodeInput,\n SetOperationErrorDescriptionInput,\n SetOperationErrorNameInput,\n SetOperationErrorTemplateInput,\n SetOperationNameInput,\n SetOperationReducerInput,\n SetOperationSchemaInput,\n SetOperationScopeInput,\n SetOperationTemplateInput,\n SetStateSchemaInput,\n State,\n UpdateChangeLogItemInput,\n UpdateOperationExampleInput,\n UpdateStateExampleInput,\n} from \".\";\nimport { OperationScope } from \"../../../document\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K], any, T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport function AddChangeLogItemInputSchema(): z.ZodObject<\n Properties<AddChangeLogItemInput>\n> {\n return z.object({\n __typename: z.literal(\"AddChangeLogItemInput\").optional(),\n content: z.string(),\n id: z.string(),\n insertBefore: z.string().nullable(),\n });\n}\n\nexport function AddModuleInputSchema(): z.ZodObject<\n Properties<AddModuleInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n name: z.string(),\n });\n}\n\nexport function AddOperationErrorInputSchema(): z.ZodObject<\n Properties<AddOperationErrorInput>\n> {\n return z.object({\n errorCode: z.string().nullish(),\n errorDescription: z.string().nullish(),\n errorName: z.string().nullish(),\n errorTemplate: z.string().nullish(),\n id: z.string(),\n operationId: z.string(),\n });\n}\n\nexport function AddOperationExampleInputSchema(): z.ZodObject<\n Properties<AddOperationExampleInput>\n> {\n return z.object({\n example: z.string(),\n id: z.string(),\n operationId: z.string(),\n });\n}\n\nexport function AddOperationInputSchema(): z.ZodObject<\n Properties<AddOperationInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n moduleId: z.string(),\n name: z.string(),\n reducer: z.string().nullish(),\n schema: z.string().nullish(),\n template: z.string().nullish(),\n scope: OperationScopeSchema().nullish(),\n });\n}\n\nexport function AddStateExampleInputSchema(): z.ZodObject<\n Properties<AddStateExampleInput>\n> {\n return z.object({\n scope: z.string(),\n example: z.string(),\n id: z.string(),\n insertBefore: z.string().nullish(),\n });\n}\n\nexport function AuthorSchema(): z.ZodObject<Properties<Author>> {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string(),\n website: z.string().nullable(),\n });\n}\n\nexport function CodeExampleSchema(): z.ZodObject<Properties<CodeExample>> {\n return z.object({\n __typename: z.literal(\"CodeExample\").optional(),\n id: z.string(),\n value: z.string(),\n });\n}\n\nexport function DeleteChangeLogItemInputSchema(): z.ZodObject<\n Properties<DeleteChangeLogItemInput>\n> {\n return z.object({\n __typename: z.literal(\"DeleteChangeLogItemInput\").optional(),\n id: z.string(),\n });\n}\n\nexport function DeleteModuleInputSchema(): z.ZodObject<\n Properties<DeleteModuleInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteOperationErrorInputSchema(): z.ZodObject<\n Properties<DeleteOperationErrorInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteOperationExampleInputSchema(): z.ZodObject<\n Properties<DeleteOperationExampleInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteOperationInputSchema(): z.ZodObject<\n Properties<DeleteOperationInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteStateExampleInputSchema(): z.ZodObject<\n Properties<DeleteStateExampleInput>\n> {\n return z.object({\n scope: z.string(),\n id: z.string(),\n });\n}\n\nexport function OperationScopeSchema(): z.ZodType<OperationScope> {\n return z.literal(\"global\").or(z.literal(\"local\"));\n}\n\nexport function DocumentModelInputSchema() {\n return z.union([\n AddChangeLogItemInputSchema(),\n AddModuleInputSchema(),\n AddOperationErrorInputSchema(),\n AddOperationExampleInputSchema(),\n AddOperationInputSchema(),\n AddStateExampleInputSchema(),\n DeleteChangeLogItemInputSchema(),\n DeleteModuleInputSchema(),\n DeleteOperationErrorInputSchema(),\n DeleteOperationExampleInputSchema(),\n DeleteOperationInputSchema(),\n DeleteStateExampleInputSchema(),\n MoveOperationInputSchema(),\n ReorderChangeLogItemsInputSchema(),\n ReorderModuleOperationsInputSchema(),\n ReorderModulesInputSchema(),\n ReorderOperationErrorsInputSchema(),\n ReorderOperationExamplesInputSchema(),\n ReorderStateExamplesInputSchema(),\n SetAuthorNameInputSchema(),\n SetAuthorWebsiteInputSchema(),\n SetInitialStateInputSchema(),\n SetModelDescriptionInputSchema(),\n SetModelExtensionInputSchema(),\n SetModelIdInputSchema(),\n SetModelNameInputSchema(),\n SetModuleDescriptionInputSchema(),\n SetModuleNameInputSchema(),\n SetOperationDescriptionInputSchema(),\n SetOperationErrorCodeInputSchema(),\n SetOperationErrorDescriptionInputSchema(),\n SetOperationErrorNameInputSchema(),\n SetOperationErrorTemplateInputSchema(),\n SetOperationNameInputSchema(),\n SetOperationReducerInputSchema(),\n SetOperationSchemaInputSchema(),\n SetOperationTemplateInputSchema(),\n SetStateSchemaInputSchema(),\n UpdateChangeLogItemInputSchema(),\n UpdateOperationExampleInputSchema(),\n UpdateStateExampleInputSchema(),\n ]);\n}\n\nexport function DocumentModelStateSchema(): z.ZodObject<\n Properties<DocumentModelState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentModelState\").optional(),\n author: AuthorSchema(),\n description: z.string(),\n extension: z.string(),\n id: z.string(),\n name: z.string(),\n specifications: z.array(DocumentSpecificationSchema()),\n });\n}\n\nexport function DocumentSpecificationSchema(): z.ZodObject<\n Properties<DocumentSpecification>\n> {\n return z.object({\n __typename: z.literal(\"DocumentSpecification\").optional(),\n changeLog: z.array(z.string()),\n modules: z.array(ModuleSchema()),\n state: ScopeStateSchema(),\n version: z.number(),\n });\n}\n\nexport function ModuleSchema(): z.ZodObject<Properties<Module>> {\n return z.object({\n __typename: z.literal(\"Module\").optional(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string(),\n operations: z.array(OperationSchema()),\n });\n}\n\nexport function MoveOperationInputSchema(): z.ZodObject<\n Properties<MoveOperationInput>\n> {\n return z.object({\n newModuleId: z.string(),\n operationId: z.string(),\n });\n}\n\nexport function OperationSchema(): z.ZodObject<Properties<Operation>> {\n return z.object({\n __typename: z.literal(\"Operation\").optional(),\n description: z.string().nullable(),\n errors: z.array(OperationErrorSchema()),\n examples: z.array(CodeExampleSchema()),\n id: z.string(),\n name: z.string().nullable(),\n reducer: z.string().nullable(),\n schema: z.string().nullable(),\n template: z.string().nullable(),\n scope: OperationScopeSchema(),\n });\n}\n\nexport function OperationErrorSchema(): z.ZodObject<\n Properties<OperationError>\n> {\n return z.object({\n __typename: z.literal(\"OperationError\").optional(),\n code: z.string().nullable(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string().nullable(),\n template: z.string().nullable(),\n });\n}\n\nexport function ReorderChangeLogItemsInputSchema(): z.ZodObject<\n Properties<ReorderChangeLogItemsInput>\n> {\n return z.object({\n __typename: z.literal(\"ReorderChangeLogItemsInput\").optional(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderModuleOperationsInputSchema(): z.ZodObject<\n Properties<ReorderModuleOperationsInput>\n> {\n return z.object({\n moduleId: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderModulesInputSchema(): z.ZodObject<\n Properties<ReorderModulesInput>\n> {\n return z.object({\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderOperationErrorsInputSchema(): z.ZodObject<\n Properties<ReorderOperationErrorsInput>\n> {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderOperationExamplesInputSchema(): z.ZodObject<\n Properties<ReorderOperationExamplesInput>\n> {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderStateExamplesInputSchema(): z.ZodObject<\n Properties<ReorderStateExamplesInput>\n> {\n return z.object({\n scope: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function SetAuthorNameInputSchema(): z.ZodObject<\n Properties<SetAuthorNameInput>\n> {\n return z.object({\n authorName: z.string(),\n });\n}\n\nexport function SetAuthorWebsiteInputSchema(): z.ZodObject<\n Properties<SetAuthorWebsiteInput>\n> {\n return z.object({\n authorWebsite: z.string(),\n });\n}\n\nexport function SetInitialStateInputSchema(): z.ZodObject<\n Properties<SetInitialStateInput>\n> {\n return z.object({\n scope: z.string(),\n initialValue: z.string(),\n });\n}\n\nexport function SetModelDescriptionInputSchema(): z.ZodObject<\n Properties<SetModelDescriptionInput>\n> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetModelExtensionInputSchema(): z.ZodObject<\n Properties<SetModelExtensionInput>\n> {\n return z.object({\n extension: z.string(),\n });\n}\n\nexport function SetModelIdInputSchema(): z.ZodObject<\n Properties<SetModelIdInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function SetModelNameInputSchema(): z.ZodObject<\n Properties<SetModelNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetModuleDescriptionInputSchema(): z.ZodObject<\n Properties<SetModuleDescriptionInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetModuleNameInputSchema(): z.ZodObject<\n Properties<SetModuleNameInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\n\nexport function SetOperationDescriptionInputSchema(): z.ZodObject<\n Properties<SetOperationDescriptionInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorCodeInputSchema(): z.ZodObject<\n Properties<SetOperationErrorCodeInput>\n> {\n return z.object({\n errorCode: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorDescriptionInputSchema(): z.ZodObject<\n Properties<SetOperationErrorDescriptionInput>\n> {\n return z.object({\n errorDescription: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorNameInputSchema(): z.ZodObject<\n Properties<SetOperationErrorNameInput>\n> {\n return z.object({\n errorName: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorTemplateInputSchema(): z.ZodObject<\n Properties<SetOperationErrorTemplateInput>\n> {\n return z.object({\n errorTemplate: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationNameInputSchema(): z.ZodObject<\n Properties<SetOperationNameInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\n\nexport function SetOperationScopeInputSchema(): z.ZodObject<\n Properties<SetOperationScopeInput>\n> {\n return z.object({\n id: z.string(),\n scope: OperationScopeSchema(),\n });\n}\n\nexport function SetOperationReducerInputSchema(): z.ZodObject<\n Properties<SetOperationReducerInput>\n> {\n return z.object({\n id: z.string(),\n reducer: z.string().nullish(),\n });\n}\n\nexport function SetOperationSchemaInputSchema(): z.ZodObject<\n Properties<SetOperationSchemaInput>\n> {\n return z.object({\n id: z.string(),\n schema: z.string().nullish(),\n });\n}\n\nexport function SetOperationTemplateInputSchema(): z.ZodObject<\n Properties<SetOperationTemplateInput>\n> {\n return z.object({\n id: z.string(),\n template: z.string().nullish(),\n });\n}\n\nexport function SetStateSchemaInputSchema(): z.ZodObject<\n Properties<SetStateSchemaInput>\n> {\n return z.object({\n scope: z.string(),\n schema: z.string(),\n });\n}\n\nexport function StateSchema(): z.ZodObject<Properties<State>> {\n return z.object({\n __typename: z.literal(\"State\").optional(),\n examples: z.array(CodeExampleSchema()),\n initialValue: z.string(),\n schema: z.string(),\n });\n}\n\nexport function ScopeStateSchema(): z.ZodObject<Properties<ScopeState>> {\n return z.object({\n global: StateSchema(),\n local: StateSchema(),\n });\n}\n\nexport function UpdateChangeLogItemInputSchema(): z.ZodObject<\n Properties<UpdateChangeLogItemInput>\n> {\n return z.object({\n __typename: z.literal(\"UpdateChangeLogItemInput\").optional(),\n id: z.string(),\n newContent: z.string(),\n });\n}\n\nexport function UpdateOperationExampleInputSchema(): z.ZodObject<\n Properties<UpdateOperationExampleInput>\n> {\n return z.object({\n example: z.string(),\n id: z.string(),\n });\n}\n\nexport function UpdateStateExampleInputSchema(): z.ZodObject<\n Properties<UpdateStateExampleInput>\n> {\n return z.object({\n scope: z.string(),\n id: z.string(),\n newExample: z.string(),\n });\n}\n","import { DocumentModelHeaderOperations } from \"../../gen/header/operations\";\n\nexport const reducer: DocumentModelHeaderOperations = {\n setModelNameOperation(state, action) {\n state.name = action.input.name;\n },\n\n setModelIdOperation(state, action) {\n state.id = action.input.id;\n },\n\n setModelExtensionOperation(state, action) {\n state.extension = action.input.extension;\n },\n\n setModelDescriptionOperation(state, action) {\n state.description = action.input.description;\n },\n\n setAuthorNameOperation(state, action) {\n state.author = state.author || { name: \"\", website: null };\n state.author.name = action.input.authorName;\n },\n\n setAuthorWebsiteOperation(state, action) {\n state.author = state.author || { name: \"\", website: null };\n state.author.website = action.input.authorWebsite;\n },\n};\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport { DocumentModelVersioningOperations } from \"../../gen/versioning/operations\";\n\nexport const reducer: DocumentModelVersioningOperations = {\n addChangeLogItemOperation(state, action) {\n throw new Error('Reducer \"addChangeLogItemOperation\" not yet implemented');\n },\n\n updateChangeLogItemOperation(state, action) {\n throw new Error(\n 'Reducer \"updateChangeLogItemOperation\" not yet implemented',\n );\n },\n\n deleteChangeLogItemOperation(state, action) {\n throw new Error(\n 'Reducer \"deleteChangeLogItemOperation\" not yet implemented',\n );\n },\n\n reorderChangeLogItemsOperation(state, action) {\n throw new Error(\n 'Reducer \"reorderChangeLogItemsOperation\" not yet implemented',\n );\n },\n\n releaseNewVersionOperation(state, action) {\n throw new Error('Reducer \"releaseNewVersionOperation\" not yet implemented');\n },\n};\n","import { Module } from \"../../gen\";\nimport { DocumentModelModuleOperations } from \"../../gen/module/operations\";\n\nconst moduleSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: Module, b: Module) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelModuleOperations = {\n addModuleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n latestSpec.modules.push({\n id: action.input.id,\n name: action.input.name,\n description: action.input.description || \"\",\n operations: [],\n });\n },\n\n setModuleNameOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id === action.input.id) {\n latestSpec.modules[i].name = action.input.name || \"\";\n }\n }\n },\n\n setModuleDescriptionOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id === action.input.id) {\n latestSpec.modules[i].description = action.input.description || \"\";\n }\n }\n },\n\n deleteModuleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n latestSpec.modules = latestSpec.modules.filter(\n (m) => m.id != action.input.id,\n );\n },\n\n reorderModulesOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n latestSpec.modules.sort(moduleSorter(action.input.order));\n },\n};\n","import { OperationError } from \"../../gen\";\nimport { DocumentModelOperationErrorOperations } from \"../../gen/operation-error/operations\";\n\nconst errorSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: OperationError, b: OperationError) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelOperationErrorOperations = {\n addOperationErrorOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].errors.push({\n id: action.input.id,\n name: action.input.errorName || \"\",\n code: action.input.errorCode || \"\",\n description: action.input.errorDescription || \"\",\n template: action.input.errorTemplate || \"\",\n });\n }\n }\n }\n },\n\n setOperationErrorCodeOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].code =\n action.input.errorCode || \"\";\n }\n }\n }\n }\n },\n\n setOperationErrorNameOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].name =\n action.input.errorName || \"\";\n }\n }\n }\n }\n },\n\n setOperationErrorDescriptionOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].description =\n action.input.errorDescription || \"\";\n }\n }\n }\n }\n },\n\n setOperationErrorTemplateOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].template =\n action.input.errorTemplate || \"\";\n }\n }\n }\n }\n },\n\n deleteOperationErrorOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n latestSpec.modules[i].operations[j].errors = latestSpec.modules[\n i\n ].operations[j].errors.filter((e) => e.id != action.input.id);\n }\n }\n },\n\n reorderOperationErrorsOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].errors.sort(\n errorSorter(action.input.order),\n );\n }\n }\n }\n },\n};\n","import { CodeExample } from \"../../gen\";\nimport { DocumentModelOperationExampleOperations } from \"../../gen/operation-example/operations\";\n\nconst exampleSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: CodeExample, b: CodeExample) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelOperationExampleOperations = {\n addOperationExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].examples.push({\n id: action.input.id,\n value: action.input.example,\n });\n }\n }\n }\n },\n\n updateOperationExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].examples.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].examples[k].id ==\n action.input.id\n ) {\n latestSpec.modules[i].operations[j].examples[k].value =\n action.input.example;\n }\n }\n }\n }\n },\n\n deleteOperationExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n latestSpec.modules[i].operations[j].examples = latestSpec.modules[\n i\n ].operations[j].examples.filter((e) => e.id != action.input.id);\n }\n }\n },\n\n reorderOperationExamplesOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].examples.sort(\n exampleSorter(action.input.order),\n );\n }\n }\n }\n },\n};\n","import { Operation } from \"../../gen\";\nimport { DocumentModelOperationOperations } from \"../../gen/operation/operations\";\n\nconst operationSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: Operation, b: Operation) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelOperationOperations = {\n addOperationOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id == action.input.moduleId) {\n latestSpec.modules[i].operations.push({\n id: action.input.id,\n name: action.input.name,\n description: action.input.description || \"\",\n schema: action.input.schema || \"\",\n template: action.input.template || action.input.description || \"\",\n reducer: action.input.reducer || \"\",\n errors: [],\n examples: [],\n scope: action.input.scope || \"global\",\n });\n }\n }\n },\n\n setOperationNameOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].name = action.input.name || \"\";\n }\n }\n }\n },\n\n setOperationScopeOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].scope =\n action.input.scope || \"global\";\n }\n }\n }\n },\n\n setOperationSchemaOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].schema =\n action.input.schema || \"\";\n }\n }\n }\n },\n\n setOperationDescriptionOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].description =\n action.input.description || \"\";\n }\n }\n }\n },\n\n setOperationTemplateOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].template =\n action.input.template || \"\";\n }\n }\n }\n },\n\n setOperationReducerOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].reducer =\n action.input.reducer || \"\";\n }\n }\n }\n },\n\n moveOperationOperation(state, action) {\n const moveOperations: Operation[] = [];\n const latestSpec = state.specifications[state.specifications.length - 1];\n\n // Filter and collect\n for (let i = 0; i < latestSpec.modules.length; i++) {\n latestSpec.modules[i].operations = latestSpec.modules[\n i\n ].operations.filter((operation) => {\n if (operation.id == action.input.operationId) {\n moveOperations.push(operation);\n return false;\n }\n\n return true;\n });\n }\n\n // Inject in target modules\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id == action.input.newModuleId) {\n latestSpec.modules[i].operations.push(...moveOperations);\n }\n }\n },\n\n deleteOperationOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n latestSpec.modules[i].operations = latestSpec.modules[\n i\n ].operations.filter((operation) => operation.id != action.input.id);\n }\n },\n\n reorderModuleOperationsOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id == action.input.moduleId) {\n latestSpec.modules[i].operations.sort(\n operationSorter(action.input.order),\n );\n }\n }\n },\n};\n","import { CodeExample, ScopeState } from \"../../gen\";\nimport { DocumentModelStateOperations } from \"../../gen/state/operations\";\n\nconst exampleSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: CodeExample, b: CodeExample) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelStateOperations = {\n setStateSchemaOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].schema =\n action.input.schema;\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n setInitialStateOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].initialValue =\n action.input.initialValue;\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n addStateExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].examples.push({\n id: action.input.id,\n value: action.input.example,\n });\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n updateStateExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (!Object.keys(latestSpec.state).includes(action.input.scope)) {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n const examples =\n latestSpec.state[action.input.scope as keyof ScopeState].examples;\n\n for (let i = 0; i < examples.length; i++) {\n if (examples[i].id == action.input.id) {\n examples[i].value = action.input.newExample;\n }\n }\n },\n\n deleteStateExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].examples =\n latestSpec.state[\n action.input.scope as keyof ScopeState\n ].examples.filter((e) => e.id != action.input.id);\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n reorderStateExamplesOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].examples.sort(\n exampleSorter(action.input.order),\n );\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n};\n","import { ImmutableStateReducer } from \"../../document/types\";\nimport { DocumentModelLocalState, DocumentModelState, z } from \"./schema\";\nimport { DocumentModelAction } from \"./actions\";\n\nimport { reducer as HeaderReducer } from \"../custom/reducers/header\";\nimport { reducer as VersioningReducer } from \"../custom/reducers/versioning\";\nimport { reducer as ModuleReducer } from \"../custom/reducers/module\";\nimport { reducer as OperationErrorReducer } from \"../custom/reducers/operation-error\";\nimport { reducer as OperationExampleReducer } from \"../custom/reducers/operation-example\";\nimport { reducer as OperationReducer } from \"../custom/reducers/operation\";\nimport { reducer as StateReducer } from \"../custom/reducers/state\";\nimport { createReducer, isBaseAction } from \"../../document/utils\";\n\nexport const stateReducer: ImmutableStateReducer<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> = (state, action) => {\n if (isBaseAction(action)) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_MODEL_NAME\":\n z.SetModelNameInputSchema().parse(action.input);\n HeaderReducer.setModelNameOperation(state.global, action);\n break;\n\n case \"SET_MODEL_ID\":\n z.SetModelIdInputSchema().parse(action.input);\n HeaderReducer.setModelIdOperation(state.global, action);\n break;\n\n case \"SET_MODEL_EXTENSION\":\n z.SetModelExtensionInputSchema().parse(action.input);\n HeaderReducer.setModelExtensionOperation(state.global, action);\n break;\n\n case \"SET_MODEL_DESCRIPTION\":\n z.SetModelDescriptionInputSchema().parse(action.input);\n HeaderReducer.setModelDescriptionOperation(state.global, action);\n break;\n\n case \"SET_AUTHOR_NAME\":\n z.SetAuthorNameInputSchema().parse(action.input);\n HeaderReducer.setAuthorNameOperation(state.global, action);\n break;\n\n case \"SET_AUTHOR_WEBSITE\":\n z.SetAuthorWebsiteInputSchema().parse(action.input);\n HeaderReducer.setAuthorWebsiteOperation(state.global, action);\n break;\n\n case \"ADD_CHANGE_LOG_ITEM\":\n z.AddChangeLogItemInputSchema().parse(action.input);\n VersioningReducer.addChangeLogItemOperation(state.global, action);\n break;\n\n case \"UPDATE_CHANGE_LOG_ITEM\":\n z.UpdateChangeLogItemInputSchema().parse(action.input);\n VersioningReducer.updateChangeLogItemOperation(state.global, action);\n break;\n\n case \"DELETE_CHANGE_LOG_ITEM\":\n z.DeleteChangeLogItemInputSchema().parse(action.input);\n VersioningReducer.deleteChangeLogItemOperation(state.global, action);\n break;\n\n case \"REORDER_CHANGE_LOG_ITEMS\":\n z.ReorderChangeLogItemsInputSchema().parse(action.input);\n VersioningReducer.reorderChangeLogItemsOperation(state.global, action);\n break;\n\n case \"RELEASE_NEW_VERSION\":\n if (Object.keys(action.input).length > 0)\n throw new Error(\"Expected empty input for action RELEASE_NEW_VERSION\");\n VersioningReducer.releaseNewVersionOperation(state.global, action);\n break;\n\n case \"ADD_MODULE\":\n z.AddModuleInputSchema().parse(action.input);\n ModuleReducer.addModuleOperation(state.global, action);\n break;\n\n case \"SET_MODULE_NAME\":\n z.SetModuleNameInputSchema().parse(action.input);\n ModuleReducer.setModuleNameOperation(state.global, action);\n break;\n\n case \"SET_MODULE_DESCRIPTION\":\n z.SetModuleDescriptionInputSchema().parse(action.input);\n ModuleReducer.setModuleDescriptionOperation(state.global, action);\n break;\n\n case \"DELETE_MODULE\":\n z.DeleteModuleInputSchema().parse(action.input);\n ModuleReducer.deleteModuleOperation(state.global, action);\n break;\n\n case \"REORDER_MODULES\":\n z.ReorderModulesInputSchema().parse(action.input);\n ModuleReducer.reorderModulesOperation(state.global, action);\n break;\n\n case \"ADD_OPERATION_ERROR\":\n z.AddOperationErrorInputSchema().parse(action.input);\n OperationErrorReducer.addOperationErrorOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_ERROR_CODE\":\n z.SetOperationErrorCodeInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorCodeOperation(\n state.global,\n action,\n );\n break;\n\n case \"SET_OPERATION_ERROR_NAME\":\n z.SetOperationErrorNameInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorNameOperation(\n state.global,\n action,\n );\n break;\n\n case \"SET_OPERATION_ERROR_DESCRIPTION\":\n z.SetOperationErrorDescriptionInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorDescriptionOperation(\n state.global,\n action,\n );\n break;\n\n case \"SET_OPERATION_ERROR_TEMPLATE\":\n z.SetOperationErrorTemplateInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorTemplateOperation(\n state.global,\n action,\n );\n break;\n\n case \"DELETE_OPERATION_ERROR\":\n z.DeleteOperationErrorInputSchema().parse(action.input);\n OperationErrorReducer.deleteOperationErrorOperation(state.global, action);\n break;\n\n case \"REORDER_OPERATION_ERRORS\":\n z.ReorderOperationErrorsInputSchema().parse(action.input);\n OperationErrorReducer.reorderOperationErrorsOperation(\n state.global,\n action,\n );\n break;\n\n case \"ADD_OPERATION_EXAMPLE\":\n z.AddOperationExampleInputSchema().parse(action.input);\n OperationExampleReducer.addOperationExampleOperation(\n state.global,\n action,\n );\n break;\n\n case \"UPDATE_OPERATION_EXAMPLE\":\n z.UpdateOperationExampleInputSchema().parse(action.input);\n OperationExampleReducer.updateOperationExampleOperation(\n state.global,\n action,\n );\n break;\n\n case \"DELETE_OPERATION_EXAMPLE\":\n z.DeleteOperationExampleInputSchema().parse(action.input);\n OperationExampleReducer.deleteOperationExampleOperation(\n state.global,\n action,\n );\n break;\n\n case \"REORDER_OPERATION_EXAMPLES\":\n z.ReorderOperationExamplesInputSchema().parse(action.input);\n OperationExampleReducer.reorderOperationExamplesOperation(\n state.global,\n action,\n );\n break;\n\n case \"ADD_OPERATION\":\n z.AddOperationInputSchema().parse(action.input);\n OperationReducer.addOperationOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_NAME\":\n z.SetOperationNameInputSchema().parse(action.input);\n OperationReducer.setOperationNameOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_SCOPE\":\n z.SetOperationScopeInputSchema().parse(action.input);\n OperationReducer.setOperationScopeOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_SCHEMA\":\n z.SetOperationSchemaInputSchema().parse(action.input);\n OperationReducer.setOperationSchemaOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_DESCRIPTION\":\n z.SetOperationDescriptionInputSchema().parse(action.input);\n OperationReducer.setOperationDescriptionOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_TEMPLATE\":\n z.SetOperationTemplateInputSchema().parse(action.input);\n OperationReducer.setOperationTemplateOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_REDUCER\":\n z.SetOperationReducerInputSchema().parse(action.input);\n OperationReducer.setOperationReducerOperation(state.global, action);\n break;\n\n case \"MOVE_OPERATION\":\n z.MoveOperationInputSchema().parse(action.input);\n OperationReducer.moveOperationOperation(state.global, action);\n break;\n\n case \"DELETE_OPERATION\":\n z.DeleteOperationInputSchema().parse(action.input);\n OperationReducer.deleteOperationOperation(state.global, action);\n break;\n\n case \"REORDER_MODULE_OPERATIONS\":\n z.ReorderModuleOperationsInputSchema().parse(action.input);\n OperationReducer.reorderModuleOperationsOperation(state.global, action);\n break;\n\n case \"SET_STATE_SCHEMA\":\n z.SetStateSchemaInputSchema().parse(action.input);\n StateReducer.setStateSchemaOperation(state.global, action);\n break;\n\n case \"SET_INITIAL_STATE\":\n z.SetInitialStateInputSchema().parse(action.input);\n StateReducer.setInitialStateOperation(state.global, action);\n break;\n\n case \"ADD_STATE_EXAMPLE\":\n z.AddStateExampleInputSchema().parse(action.input);\n StateReducer.addStateExampleOperation(state.global, action);\n break;\n\n case \"UPDATE_STATE_EXAMPLE\":\n z.UpdateStateExampleInputSchema().parse(action.input);\n StateReducer.updateStateExampleOperation(state.global, action);\n break;\n\n case \"DELETE_STATE_EXAMPLE\":\n z.DeleteStateExampleInputSchema().parse(action.input);\n StateReducer.deleteStateExampleOperation(state.global, action);\n break;\n\n case \"REORDER_STATE_EXAMPLES\":\n z.ReorderStateExamplesInputSchema().parse(action.input);\n StateReducer.reorderStateExamplesOperation(state.global, action);\n break;\n\n default:\n return state;\n }\n};\n\nexport const reducer = createReducer<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n>(stateReducer);\n","import { DocumentModelUtils, utils as base } from \"../../document\";\nimport {\n DocumentModelAction,\n DocumentModelLocalState,\n DocumentModelState,\n} from \"./types\";\nimport { reducer } from \"./reducer\";\n\nexport const initialGlobalState: DocumentModelState = {\n id: \"\",\n name: \"\",\n extension: \"\",\n description: \"\",\n author: {\n name: \"\",\n website: \"\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n state: {\n global: {\n schema: \"\",\n initialValue: \"\",\n examples: [],\n },\n local: {\n schema: \"\",\n initialValue: \"\",\n examples: [],\n },\n },\n modules: [],\n },\n ],\n};\n\nexport const initialLocalState: DocumentModelLocalState = {};\n\nconst utils: DocumentModelUtils<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> = {\n fileExtension: \"phdm\",\n createState(state) {\n return {\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createExtendedState(extendedState) {\n return base.createExtendedState(\n { ...extendedState, documentType: \"powerhouse/document-model\" },\n utils.createState,\n );\n },\n createDocument(state) {\n return base.createDocument(\n utils.createExtendedState(state),\n utils.createState,\n );\n },\n saveToFile(document, path, name) {\n return base.saveToFile(document, path, \"phdm\", name);\n },\n saveToFileHandle(document, input) {\n return base.saveToFileHandle(document, input);\n },\n loadFromFile(path) {\n return base.loadFromFile(path, reducer);\n },\n loadFromInput(input) {\n return base.loadFromInput(input, reducer);\n },\n};\n\nexport default utils;\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n SetModelNameInput,\n SetModelIdInput,\n SetModelExtensionInput,\n SetModelDescriptionInput,\n SetAuthorNameInput,\n SetAuthorWebsiteInput,\n} from \"../types\";\nimport {\n SetModelNameAction,\n SetModelIdAction,\n SetModelExtensionAction,\n SetModelDescriptionAction,\n SetAuthorNameAction,\n SetAuthorWebsiteAction,\n} from \"./actions\";\n\nexport const setModelName = (input: SetModelNameInput) =>\n createAction<SetModelNameAction>(\"SET_MODEL_NAME\", { ...input });\n\nexport const setModelId = (input: SetModelIdInput) =>\n createAction<SetModelIdAction>(\"SET_MODEL_ID\", { ...input });\n\nexport const setModelExtension = (input: SetModelExtensionInput) =>\n createAction<SetModelExtensionAction>(\"SET_MODEL_EXTENSION\", { ...input });\n\nexport const setModelDescription = (input: SetModelDescriptionInput) =>\n createAction<SetModelDescriptionAction>(\"SET_MODEL_DESCRIPTION\", {\n ...input,\n });\n\nexport const setAuthorName = (input: SetAuthorNameInput) =>\n createAction<SetAuthorNameAction>(\"SET_AUTHOR_NAME\", { ...input });\n\nexport const setAuthorWebsite = (input: SetAuthorWebsiteInput) =>\n createAction<SetAuthorWebsiteAction>(\"SET_AUTHOR_WEBSITE\", { ...input });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n SetModelNameInput,\n SetModelIdInput,\n SetModelExtensionInput,\n SetModelDescriptionInput,\n SetAuthorNameInput,\n SetAuthorWebsiteInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n setModelName,\n setModelId,\n setModelExtension,\n setModelDescription,\n setAuthorName,\n setAuthorWebsite,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Header extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public setModelName(input: SetModelNameInput, options?: ReducerOptions) {\n return this.dispatch(setModelName(input), options);\n }\n\n public setModelId(input: SetModelIdInput, options?: ReducerOptions) {\n return this.dispatch(setModelId(input), options);\n }\n\n public setModelExtension(\n input: SetModelExtensionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setModelExtension(input), options);\n }\n\n public setModelDescription(\n input: SetModelDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setModelDescription(input), options);\n }\n\n public setAuthorName(input: SetAuthorNameInput, options?: ReducerOptions) {\n return this.dispatch(setAuthorName(input), options);\n }\n\n public setAuthorWebsite(\n input: SetAuthorWebsiteInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setAuthorWebsite(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddChangeLogItemInput,\n UpdateChangeLogItemInput,\n DeleteChangeLogItemInput,\n ReorderChangeLogItemsInput,\n} from \"../types\";\nimport {\n AddChangeLogItemAction,\n UpdateChangeLogItemAction,\n DeleteChangeLogItemAction,\n ReorderChangeLogItemsAction,\n ReleaseNewVersionAction,\n} from \"./actions\";\n\nexport const addChangeLogItem = (input: AddChangeLogItemInput) =>\n createAction<AddChangeLogItemAction>(\"ADD_CHANGE_LOG_ITEM\", { ...input });\n\nexport const updateChangeLogItem = (input: UpdateChangeLogItemInput) =>\n createAction<UpdateChangeLogItemAction>(\"UPDATE_CHANGE_LOG_ITEM\", {\n ...input,\n });\n\nexport const deleteChangeLogItem = (input: DeleteChangeLogItemInput) =>\n createAction<DeleteChangeLogItemAction>(\"DELETE_CHANGE_LOG_ITEM\", {\n ...input,\n });\n\nexport const reorderChangeLogItems = (input: ReorderChangeLogItemsInput) =>\n createAction<ReorderChangeLogItemsAction>(\"REORDER_CHANGE_LOG_ITEMS\", {\n ...input,\n });\n\nexport const releaseNewVersion = () =>\n createAction<ReleaseNewVersionAction>(\"RELEASE_NEW_VERSION\");\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddChangeLogItemInput,\n UpdateChangeLogItemInput,\n DeleteChangeLogItemInput,\n ReorderChangeLogItemsInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addChangeLogItem,\n updateChangeLogItem,\n deleteChangeLogItem,\n reorderChangeLogItems,\n releaseNewVersion,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Versioning extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addChangeLogItem(\n input: AddChangeLogItemInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addChangeLogItem(input), options);\n }\n\n public updateChangeLogItem(\n input: UpdateChangeLogItemInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(updateChangeLogItem(input), options);\n }\n\n public deleteChangeLogItem(\n input: DeleteChangeLogItemInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteChangeLogItem(input), options);\n }\n\n public reorderChangeLogItems(\n input: ReorderChangeLogItemsInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderChangeLogItems(input), options);\n }\n\n public releaseNewVersion(options?: ReducerOptions) {\n return this.dispatch(releaseNewVersion(), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddModuleInput,\n SetModuleNameInput,\n SetModuleDescriptionInput,\n DeleteModuleInput,\n ReorderModulesInput,\n} from \"../types\";\nimport {\n AddModuleAction,\n SetModuleNameAction,\n SetModuleDescriptionAction,\n DeleteModuleAction,\n ReorderModulesAction,\n} from \"./actions\";\n\nexport const addModule = (input: AddModuleInput) =>\n createAction<AddModuleAction>(\"ADD_MODULE\", { ...input });\n\nexport const setModuleName = (input: SetModuleNameInput) =>\n createAction<SetModuleNameAction>(\"SET_MODULE_NAME\", { ...input });\n\nexport const setModuleDescription = (input: SetModuleDescriptionInput) =>\n createAction<SetModuleDescriptionAction>(\"SET_MODULE_DESCRIPTION\", {\n ...input,\n });\n\nexport const deleteModule = (input: DeleteModuleInput) =>\n createAction<DeleteModuleAction>(\"DELETE_MODULE\", { ...input });\n\nexport const reorderModules = (input: ReorderModulesInput) =>\n createAction<ReorderModulesAction>(\"REORDER_MODULES\", { ...input });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddModuleInput,\n SetModuleNameInput,\n SetModuleDescriptionInput,\n DeleteModuleInput,\n ReorderModulesInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addModule,\n setModuleName,\n setModuleDescription,\n deleteModule,\n reorderModules,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Module extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addModule(input: AddModuleInput, options?: ReducerOptions) {\n return this.dispatch(addModule(input), options);\n }\n\n public setModuleName(input: SetModuleNameInput, options?: ReducerOptions) {\n return this.dispatch(setModuleName(input), options);\n }\n\n public setModuleDescription(\n input: SetModuleDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setModuleDescription(input), options);\n }\n\n public deleteModule(input: DeleteModuleInput, options?: ReducerOptions) {\n return this.dispatch(deleteModule(input), options);\n }\n\n public reorderModules(input: ReorderModulesInput, options?: ReducerOptions) {\n return this.dispatch(reorderModules(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddOperationErrorInput,\n SetOperationErrorCodeInput,\n SetOperationErrorNameInput,\n SetOperationErrorDescriptionInput,\n SetOperationErrorTemplateInput,\n DeleteOperationErrorInput,\n ReorderOperationErrorsInput,\n} from \"../types\";\nimport {\n AddOperationErrorAction,\n SetOperationErrorCodeAction,\n SetOperationErrorNameAction,\n SetOperationErrorDescriptionAction,\n SetOperationErrorTemplateAction,\n DeleteOperationErrorAction,\n ReorderOperationErrorsAction,\n} from \"./actions\";\n\nexport const addOperationError = (input: AddOperationErrorInput) =>\n createAction<AddOperationErrorAction>(\"ADD_OPERATION_ERROR\", { ...input });\n\nexport const setOperationErrorCode = (input: SetOperationErrorCodeInput) =>\n createAction<SetOperationErrorCodeAction>(\"SET_OPERATION_ERROR_CODE\", {\n ...input,\n });\n\nexport const setOperationErrorName = (input: SetOperationErrorNameInput) =>\n createAction<SetOperationErrorNameAction>(\"SET_OPERATION_ERROR_NAME\", {\n ...input,\n });\n\nexport const setOperationErrorDescription = (\n input: SetOperationErrorDescriptionInput,\n) =>\n createAction<SetOperationErrorDescriptionAction>(\n \"SET_OPERATION_ERROR_DESCRIPTION\",\n { ...input },\n );\n\nexport const setOperationErrorTemplate = (\n input: SetOperationErrorTemplateInput,\n) =>\n createAction<SetOperationErrorTemplateAction>(\n \"SET_OPERATION_ERROR_TEMPLATE\",\n { ...input },\n );\n\nexport const deleteOperationError = (input: DeleteOperationErrorInput) =>\n createAction<DeleteOperationErrorAction>(\"DELETE_OPERATION_ERROR\", {\n ...input,\n });\n\nexport const reorderOperationErrors = (input: ReorderOperationErrorsInput) =>\n createAction<ReorderOperationErrorsAction>(\"REORDER_OPERATION_ERRORS\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddOperationErrorInput,\n SetOperationErrorCodeInput,\n SetOperationErrorNameInput,\n SetOperationErrorDescriptionInput,\n SetOperationErrorTemplateInput,\n DeleteOperationErrorInput,\n ReorderOperationErrorsInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addOperationError,\n setOperationErrorCode,\n setOperationErrorName,\n setOperationErrorDescription,\n setOperationErrorTemplate,\n deleteOperationError,\n reorderOperationErrors,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_OperationError extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addOperationError(\n input: AddOperationErrorInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addOperationError(input), options);\n }\n\n public setOperationErrorCode(\n input: SetOperationErrorCodeInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorCode(input), options);\n }\n\n public setOperationErrorName(\n input: SetOperationErrorNameInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorName(input), options);\n }\n\n public setOperationErrorDescription(\n input: SetOperationErrorDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorDescription(input), options);\n }\n\n public setOperationErrorTemplate(\n input: SetOperationErrorTemplateInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorTemplate(input), options);\n }\n\n public deleteOperationError(\n input: DeleteOperationErrorInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteOperationError(input), options);\n }\n\n public reorderOperationErrors(\n input: ReorderOperationErrorsInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderOperationErrors(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddOperationExampleInput,\n UpdateOperationExampleInput,\n DeleteOperationExampleInput,\n ReorderOperationExamplesInput,\n} from \"../types\";\nimport {\n AddOperationExampleAction,\n UpdateOperationExampleAction,\n DeleteOperationExampleAction,\n ReorderOperationExamplesAction,\n} from \"./actions\";\n\nexport const addOperationExample = (input: AddOperationExampleInput) =>\n createAction<AddOperationExampleAction>(\"ADD_OPERATION_EXAMPLE\", {\n ...input,\n });\n\nexport const updateOperationExample = (input: UpdateOperationExampleInput) =>\n createAction<UpdateOperationExampleAction>(\"UPDATE_OPERATION_EXAMPLE\", {\n ...input,\n });\n\nexport const deleteOperationExample = (input: DeleteOperationExampleInput) =>\n createAction<DeleteOperationExampleAction>(\"DELETE_OPERATION_EXAMPLE\", {\n ...input,\n });\n\nexport const reorderOperationExamples = (\n input: ReorderOperationExamplesInput,\n) =>\n createAction<ReorderOperationExamplesAction>(\"REORDER_OPERATION_EXAMPLES\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddOperationExampleInput,\n UpdateOperationExampleInput,\n DeleteOperationExampleInput,\n ReorderOperationExamplesInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addOperationExample,\n updateOperationExample,\n deleteOperationExample,\n reorderOperationExamples,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_OperationExample extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addOperationExample(\n input: AddOperationExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addOperationExample(input), options);\n }\n\n public updateOperationExample(\n input: UpdateOperationExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(updateOperationExample(input), options);\n }\n\n public deleteOperationExample(\n input: DeleteOperationExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteOperationExample(input), options);\n }\n\n public reorderOperationExamples(\n input: ReorderOperationExamplesInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderOperationExamples(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddOperationInput,\n SetOperationNameInput,\n SetOperationSchemaInput,\n SetOperationDescriptionInput,\n SetOperationTemplateInput,\n SetOperationReducerInput,\n MoveOperationInput,\n DeleteOperationInput,\n ReorderModuleOperationsInput,\n SetOperationScopeInput,\n} from \"../types\";\nimport {\n AddOperationAction,\n SetOperationNameAction,\n SetOperationSchemaAction,\n SetOperationDescriptionAction,\n SetOperationTemplateAction,\n SetOperationReducerAction,\n MoveOperationAction,\n DeleteOperationAction,\n ReorderModuleOperationsAction,\n SetOperationScopeAction,\n} from \"./actions\";\n\nexport const addOperation = (input: AddOperationInput) =>\n createAction<AddOperationAction>(\"ADD_OPERATION\", { ...input });\n\nexport const setOperationName = (input: SetOperationNameInput) =>\n createAction<SetOperationNameAction>(\"SET_OPERATION_NAME\", { ...input });\n\nexport const setOperationScope = (input: SetOperationScopeInput) =>\n createAction<SetOperationScopeAction>(\"SET_OPERATION_SCOPE\", { ...input });\n\nexport const setOperationSchema = (input: SetOperationSchemaInput) =>\n createAction<SetOperationSchemaAction>(\"SET_OPERATION_SCHEMA\", { ...input });\n\nexport const setOperationDescription = (input: SetOperationDescriptionInput) =>\n createAction<SetOperationDescriptionAction>(\"SET_OPERATION_DESCRIPTION\", {\n ...input,\n });\n\nexport const setOperationTemplate = (input: SetOperationTemplateInput) =>\n createAction<SetOperationTemplateAction>(\"SET_OPERATION_TEMPLATE\", {\n ...input,\n });\n\nexport const setOperationReducer = (input: SetOperationReducerInput) =>\n createAction<SetOperationReducerAction>(\"SET_OPERATION_REDUCER\", {\n ...input,\n });\n\nexport const moveOperation = (input: MoveOperationInput) =>\n createAction<MoveOperationAction>(\"MOVE_OPERATION\", { ...input });\n\nexport const deleteOperation = (input: DeleteOperationInput) =>\n createAction<DeleteOperationAction>(\"DELETE_OPERATION\", { ...input });\n\nexport const reorderModuleOperations = (input: ReorderModuleOperationsInput) =>\n createAction<ReorderModuleOperationsAction>(\"REORDER_MODULE_OPERATIONS\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddOperationInput,\n SetOperationNameInput,\n SetOperationSchemaInput,\n SetOperationDescriptionInput,\n SetOperationTemplateInput,\n SetOperationReducerInput,\n MoveOperationInput,\n DeleteOperationInput,\n ReorderModuleOperationsInput,\n DocumentModelState,\n SetOperationScopeInput,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addOperation,\n setOperationName,\n setOperationSchema,\n setOperationDescription,\n setOperationTemplate,\n setOperationReducer,\n moveOperation,\n deleteOperation,\n reorderModuleOperations,\n setOperationScope,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Operation extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addOperation(input: AddOperationInput, options?: ReducerOptions) {\n return this.dispatch(addOperation(input), options);\n }\n\n public setOperationName(\n input: SetOperationNameInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationName(input), options);\n }\n\n public setOperationScope(\n input: SetOperationScopeInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationScope(input), options);\n }\n\n public setOperationSchema(\n input: SetOperationSchemaInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationSchema(input), options);\n }\n\n public setOperationDescription(\n input: SetOperationDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationDescription(input), options);\n }\n\n public setOperationTemplate(\n input: SetOperationTemplateInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationTemplate(input), options);\n }\n\n public setOperationReducer(\n input: SetOperationReducerInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationReducer(input), options);\n }\n\n public moveOperation(input: MoveOperationInput, options?: ReducerOptions) {\n return this.dispatch(moveOperation(input), options);\n }\n\n public deleteOperation(\n input: DeleteOperationInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteOperation(input), options);\n }\n\n public reorderModuleOperations(\n input: ReorderModuleOperationsInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderModuleOperations(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n SetStateSchemaInput,\n SetInitialStateInput,\n AddStateExampleInput,\n UpdateStateExampleInput,\n DeleteStateExampleInput,\n ReorderStateExamplesInput,\n} from \"../types\";\nimport {\n SetStateSchemaAction,\n SetInitialStateAction,\n AddStateExampleAction,\n UpdateStateExampleAction,\n DeleteStateExampleAction,\n ReorderStateExamplesAction,\n} from \"./actions\";\n\nexport const setStateSchema = (input: SetStateSchemaInput) =>\n createAction<SetStateSchemaAction>(\"SET_STATE_SCHEMA\", { ...input });\n\nexport const setInitialState = (input: SetInitialStateInput) =>\n createAction<SetInitialStateAction>(\"SET_INITIAL_STATE\", { ...input });\n\nexport const addStateExample = (input: AddStateExampleInput) =>\n createAction<AddStateExampleAction>(\"ADD_STATE_EXAMPLE\", { ...input });\n\nexport const updateStateExample = (input: UpdateStateExampleInput) =>\n createAction<UpdateStateExampleAction>(\"UPDATE_STATE_EXAMPLE\", { ...input });\n\nexport const deleteStateExample = (input: DeleteStateExampleInput) =>\n createAction<DeleteStateExampleAction>(\"DELETE_STATE_EXAMPLE\", { ...input });\n\nexport const reorderStateExamples = (input: ReorderStateExamplesInput) =>\n createAction<ReorderStateExamplesAction>(\"REORDER_STATE_EXAMPLES\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n SetStateSchemaInput,\n SetInitialStateInput,\n AddStateExampleInput,\n UpdateStateExampleInput,\n DeleteStateExampleInput,\n ReorderStateExamplesInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n setStateSchema,\n setInitialState,\n addStateExample,\n updateStateExample,\n deleteStateExample,\n reorderStateExamples,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_State extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public setStateSchema(input: SetStateSchemaInput, options?: ReducerOptions) {\n return this.dispatch(setStateSchema(input), options);\n }\n\n public setInitialState(\n input: SetInitialStateInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setInitialState(input), options);\n }\n\n public addStateExample(\n input: AddStateExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addStateExample(input), options);\n }\n\n public updateStateExample(\n input: UpdateStateExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(updateStateExample(input), options);\n }\n\n public deleteStateExample(\n input: DeleteStateExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteStateExample(input), options);\n }\n\n public reorderStateExamples(\n input: ReorderStateExamplesInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderStateExamples(input), options);\n }\n}\n","import { DocumentModelLocalState, DocumentModelState } from \"./types\";\nimport { ExtendedState, PartialState, SignalDispatch } from \"../../document\";\nimport { applyMixins, BaseDocument } from \"../../document/object\";\nimport { DocumentModelAction } from \"./actions\";\nimport { reducer } from \"./reducer\";\nimport utils from \"./utils\";\nimport DocumentModel_Header from \"./header/object\";\nimport DocumentModel_Versioning from \"./versioning/object\";\nimport DocumentModel_Module from \"./module/object\";\nimport DocumentModel_OperationError from \"./operation-error/object\";\nimport DocumentModel_OperationExample from \"./operation-example/object\";\nimport DocumentModel_Operation from \"./operation/object\";\nimport DocumentModel_State from \"./state/object\";\n\nexport * from \"./header/object\";\nexport * from \"./versioning/object\";\nexport * from \"./module/object\";\nexport * from \"./operation-error/object\";\nexport * from \"./operation-example/object\";\nexport * from \"./operation/object\";\nexport * from \"./state/object\";\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\ninterface DocumentModel\n extends DocumentModel_Header,\n DocumentModel_Versioning,\n DocumentModel_Module,\n DocumentModel_OperationError,\n DocumentModel_OperationExample,\n DocumentModel_Operation,\n DocumentModel_State {}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nclass DocumentModel extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n static fileExtension = \"phdm\";\n\n constructor(\n initialState?: Partial<\n ExtendedState<\n PartialState<DocumentModelState>,\n PartialState<DocumentModelLocalState>\n >\n >,\n dispatch?: SignalDispatch,\n ) {\n super(reducer, utils.createDocument(initialState), dispatch);\n }\n\n public saveToFile(path: string, name?: string) {\n return super.saveToFile(path, DocumentModel.fileExtension, name);\n }\n\n public loadFromFile(path: string) {\n return super.loadFromFile(path);\n }\n\n static async fromFile(path: string) {\n const document = new this();\n await document.loadFromFile(path);\n return document;\n }\n}\n\napplyMixins(DocumentModel, [\n DocumentModel_Header,\n DocumentModel_Versioning,\n DocumentModel_Module,\n DocumentModel_OperationError,\n DocumentModel_OperationExample,\n DocumentModel_Operation,\n DocumentModel_State,\n]);\n\nexport { DocumentModel };\n","/**\n * This is a scaffold file meant for customization.\n * Delete the file and run the code generator again to have it reset\n */\n\nimport {\n actions as BaseActions,\n DocumentModel as _DocumentModel,\n} from \"../document\";\nimport * as customUtils from \"./custom/utils\";\nimport { actions as DocumentModelActions, DocumentModel } from \"./gen\";\nimport { documentModel } from \"./gen/document-model\";\nimport { reducer } from \"./gen/reducer\";\nimport {\n DocumentModelAction,\n DocumentModelLocalState,\n DocumentModelState,\n} from \"./gen/types\";\nimport genUtils from \"./gen/utils\";\n\nconst Document = DocumentModel;\nconst utils = { ...genUtils, ...customUtils };\nconst actions = { ...BaseActions, ...DocumentModelActions };\n\nexport const module: _DocumentModel<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState,\n DocumentModel\n> = {\n Document,\n reducer,\n actions,\n utils,\n documentModel,\n};\n\nexport * from \"./custom/utils\";\nexport * from \"./gen/types\";\nexport { DocumentModel, Document, reducer, actions, utils, documentModel };\n"],"names":["reducer","exampleSorter","z.SetModelNameInputSchema","HeaderReducer","z.SetModelIdInputSchema","z.SetModelExtensionInputSchema","z.SetModelDescriptionInputSchema","z.SetAuthorNameInputSchema","z.SetAuthorWebsiteInputSchema","z.AddChangeLogItemInputSchema","VersioningReducer","z.UpdateChangeLogItemInputSchema","z.DeleteChangeLogItemInputSchema","z.ReorderChangeLogItemsInputSchema","z.AddModuleInputSchema","ModuleReducer","z.SetModuleNameInputSchema","z.SetModuleDescriptionInputSchema","z.DeleteModuleInputSchema","z.ReorderModulesInputSchema","z.AddOperationErrorInputSchema","OperationErrorReducer","z.SetOperationErrorCodeInputSchema","z.SetOperationErrorNameInputSchema","z.SetOperationErrorDescriptionInputSchema","z.SetOperationErrorTemplateInputSchema","z.DeleteOperationErrorInputSchema","z.ReorderOperationErrorsInputSchema","z.AddOperationExampleInputSchema","OperationExampleReducer","z.UpdateOperationExampleInputSchema","z.DeleteOperationExampleInputSchema","z.ReorderOperationExamplesInputSchema","z.AddOperationInputSchema","OperationReducer","z.SetOperationNameInputSchema","z.SetOperationScopeInputSchema","z.SetOperationSchemaInputSchema","z.SetOperationDescriptionInputSchema","z.SetOperationTemplateInputSchema","z.SetOperationReducerInputSchema","z.MoveOperationInputSchema","z.DeleteOperationInputSchema","z.ReorderModuleOperationsInputSchema","z.SetStateSchemaInputSchema","StateReducer","z.SetInitialStateInputSchema","z.AddStateExampleInputSchema","z.UpdateStateExampleInputSchema","z.DeleteStateExampleInputSchema","z.ReorderStateExamplesInputSchema","utils","base.createExtendedState","base.createDocument","base.saveToFile","base.saveToFileHandle","base.loadFromFile","base.loadFromInput","DocumentModel","genUtils"],"mappings":";;;;;;;;;AACA,MAAM,uBAAuB,WAAwB,2BAAA,IAAA;AACrD,MAAM,uBAAuB,WAA8B,iCAAA,IAAA;AAE3D,MAAM,2BAA2B,WAAuB,4BAAA,GAAA;AAExD,MAAM,uBAAuB;AAE7B,MAAM,sBAAsB;AAE5B,MAAM,mCAAmC;AAIlC,SAAS,MAAM,OAAO;AACzB,MAAI,SAAS,MAAM,KAAM;AACzB,WAAS,OACJ,QAAQ,sBAAsB,mBAAmB,EACjD,QAAQ,sBAAsB,mBAAmB;AACtD,WAAS,OAAO,QAAQ,sBAAsB,IAAI;AAClD,MAAI,QAAQ;AACZ,MAAI,MAAM,OAAO;AAEjB,SAAO,OAAO,OAAO,KAAK,MAAM;AAC5B;AACJ,MAAI,UAAU;AACV,WAAO,CAAE;AACb,SAAO,OAAO,OAAO,MAAM,CAAC,MAAM;AAC9B;AACJ,SAAO,OAAO,MAAM,OAAO,GAAG,EAAE,MAAM,KAAK;AAC/C;AAIO,SAAS,qBAAqB,OAAO;AACxC,QAAM,QAAQ,MAAM,KAAK;AACzB,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,UAAM,OAAO,MAAM,CAAC;AACpB,UAAM,QAAQ,yBAAyB,KAAK,IAAI;AAChD,QAAI,OAAO;AACP,YAAM,SAAS,MAAM,SAAS,MAAM,CAAC,KAAK,MAAM,CAAC,GAAG;AACpD,YAAM,OAAO,GAAG,GAAG,KAAK,MAAM,GAAG,MAAM,GAAG,KAAK,MAAM,MAAM,CAAC;AAAA,IACxE;AAAA,EACA;AACI,SAAO;AACX;AAiCO,SAAS,W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;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-HlkIVQZ6.js","sources":["../../../../../../node_modules/.pnpm/change-case@5.4.4/node_modules/change-case/dist/index.js","../../../../src/document-model/custom/utils.ts","../../../../src/document-model/gen/document-model.ts","../../../../src/document-model/gen/schema/zod.ts","../../../../src/document-model/custom/reducers/header.ts","../../../../src/document-model/custom/reducers/versioning.ts","../../../../src/document-model/custom/reducers/module.ts","../../../../src/document-model/custom/reducers/operation-error.ts","../../../../src/document-model/custom/reducers/operation-example.ts","../../../../src/document-model/custom/reducers/operation.ts","../../../../src/document-model/custom/reducers/state.ts","../../../../src/document-model/gen/reducer.ts","../../../../src/document-model/gen/utils.ts","../../../../src/document-model/gen/header/creators.ts","../../../../src/document-model/gen/header/object.ts","../../../../src/document-model/gen/versioning/creators.ts","../../../../src/document-model/gen/versioning/object.ts","../../../../src/document-model/gen/module/creators.ts","../../../../src/document-model/gen/module/object.ts","../../../../src/document-model/gen/operation-error/creators.ts","../../../../src/document-model/gen/operation-error/object.ts","../../../../src/document-model/gen/operation-example/creators.ts","../../../../src/document-model/gen/operation-example/object.ts","../../../../src/document-model/gen/operation/creators.ts","../../../../src/document-model/gen/operation/object.ts","../../../../src/document-model/gen/state/creators.ts","../../../../src/document-model/gen/state/object.ts","../../../../src/document-model/gen/object.ts","../../../../src/document-model/index.ts"],"sourcesContent":["// Regexps involved with splitting words in various case formats.\nconst SPLIT_LOWER_UPPER_RE = /([\\p{Ll}\\d])(\\p{Lu})/gu;\nconst SPLIT_UPPER_UPPER_RE = /(\\p{Lu})([\\p{Lu}][\\p{Ll}])/gu;\n// Used to iterate over the initial split result and separate numbers.\nconst SPLIT_SEPARATE_NUMBER_RE = /(\\d)\\p{Ll}|(\\p{L})\\d/u;\n// Regexp involved with stripping non-word characters from the result.\nconst DEFAULT_STRIP_REGEXP = /[^\\p{L}\\d]+/giu;\n// The replacement value for splits.\nconst SPLIT_REPLACE_VALUE = \"$1\\0$2\";\n// The default characters to keep after transforming case.\nconst DEFAULT_PREFIX_SUFFIX_CHARACTERS = \"\";\n/**\n * Split any cased input strings into an array of words.\n */\nexport function split(value) {\n let result = value.trim();\n result = result\n .replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE)\n .replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);\n result = result.replace(DEFAULT_STRIP_REGEXP, \"\\0\");\n let start = 0;\n let end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n if (start === end)\n return [];\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n return result.slice(start, end).split(/\\0/g);\n}\n/**\n * Split the input string into an array of words, separating numbers.\n */\nexport function splitSeparateNumbers(value) {\n const words = split(value);\n for (let i = 0; i < words.length; i++) {\n const word = words[i];\n const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);\n if (match) {\n const offset = match.index + (match[1] ?? match[2]).length;\n words.splice(i, 1, word.slice(0, offset), word.slice(offset));\n }\n }\n return words;\n}\n/**\n * Convert a string to space separated lower case (`foo bar`).\n */\nexport function noCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to camel case (`fooBar`).\n */\nexport function camelCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return lower(word);\n return transform(word, index);\n })\n .join(options?.delimiter ?? \"\") +\n suffix);\n}\n/**\n * Convert a string to pascal case (`FooBar`).\n */\nexport function pascalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return prefix + words.map(transform).join(options?.delimiter ?? \"\") + suffix;\n}\n/**\n * Convert a string to pascal snake case (`Foo_Bar`).\n */\nexport function pascalSnakeCase(input, options) {\n return capitalCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to capital case (`Foo Bar`).\n */\nexport function capitalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n return (prefix +\n words\n .map(capitalCaseTransformFactory(lower, upper))\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to constant case (`FOO_BAR`).\n */\nexport function constantCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(upperFactory(options?.locale)).join(options?.delimiter ?? \"_\") +\n suffix);\n}\n/**\n * Convert a string to dot case (`foo.bar`).\n */\nexport function dotCase(input, options) {\n return noCase(input, { delimiter: \".\", ...options });\n}\n/**\n * Convert a string to kebab case (`foo-bar`).\n */\nexport function kebabCase(input, options) {\n return noCase(input, { delimiter: \"-\", ...options });\n}\n/**\n * Convert a string to path case (`foo/bar`).\n */\nexport function pathCase(input, options) {\n return noCase(input, { delimiter: \"/\", ...options });\n}\n/**\n * Convert a string to path case (`Foo bar`).\n */\nexport function sentenceCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = capitalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return transform(word);\n return lower(word);\n })\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to snake case (`foo_bar`).\n */\nexport function snakeCase(input, options) {\n return noCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to header case (`Foo-Bar`).\n */\nexport function trainCase(input, options) {\n return capitalCase(input, { delimiter: \"-\", ...options });\n}\nfunction lowerFactory(locale) {\n return locale === false\n ? (input) => input.toLowerCase()\n : (input) => input.toLocaleLowerCase(locale);\n}\nfunction upperFactory(locale) {\n return locale === false\n ? (input) => input.toUpperCase()\n : (input) => input.toLocaleUpperCase(locale);\n}\nfunction capitalCaseTransformFactory(lower, upper) {\n return (word) => `${upper(word[0])}${lower(word.slice(1))}`;\n}\nfunction pascalCaseTransformFactory(lower, upper) {\n return (word, index) => {\n const char0 = word[0];\n const initial = index > 0 && char0 >= \"0\" && char0 <= \"9\" ? \"_\" + char0 : upper(char0);\n return initial + lower(word.slice(1));\n };\n}\nfunction splitPrefixSuffix(input, options = {}) {\n const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);\n const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n let prefixIndex = 0;\n let suffixIndex = input.length;\n while (prefixIndex < input.length) {\n const char = input.charAt(prefixIndex);\n if (!prefixCharacters.includes(char))\n break;\n prefixIndex++;\n }\n while (suffixIndex > prefixIndex) {\n const index = suffixIndex - 1;\n const char = input.charAt(index);\n if (!suffixCharacters.includes(char))\n break;\n suffixIndex = index;\n }\n return [\n input.slice(0, prefixIndex),\n splitFn(input.slice(prefixIndex, suffixIndex)),\n input.slice(suffixIndex),\n ];\n}\n//# sourceMappingURL=index.js.map","import { pascalCase } from \"change-case\";\nimport { ValidationError } from \"../../document\";\nimport { Module, Operation } from \"../gen/schema\";\n\nexport function validateInitialState(\n initialState: string,\n allowEmptyState = false,\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (allowEmptyState && initialState === \"\") return errors;\n\n try {\n const state = JSON.parse(initialState) as object;\n\n if (!allowEmptyState && !Object.keys(state).length) {\n errors.push({\n message: \"Initial state cannot be empty\",\n details: {\n initialState,\n },\n });\n }\n } catch {\n errors.push({\n message: \"Invalid initial state\",\n details: {\n initialState,\n },\n });\n }\n\n return errors;\n}\n\nexport function validateStateSchemaName(\n schema: string,\n documentName: string,\n scope = \"\",\n allowEmptySchema = true,\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (!allowEmptySchema && !schema) {\n errors.push({\n message: \"State schema is required\",\n details: {\n schema,\n },\n });\n\n return errors;\n }\n\n if (allowEmptySchema && !schema) return errors;\n\n const expectedTypeName = `type ${pascalCase(documentName)}${pascalCase(scope)}State`;\n\n if (!schema.includes(expectedTypeName)) {\n errors.push({\n message: `Invalid state schema name. Expected ${expectedTypeName}`,\n details: {\n schema,\n },\n });\n }\n\n return errors;\n}\n\nexport function validateModules(modules: Array<Module>): ValidationError[] {\n const errors: ValidationError[] = [];\n if (!modules.length) {\n errors.push({\n message: \"Modules are required\",\n details: {\n modules,\n },\n });\n }\n\n const modulesError = modules.reduce<ValidationError[]>(\n (acc, mod) => [...acc, ...validateModule(mod)],\n [],\n );\n\n return [...errors, ...modulesError];\n}\n\nexport function validateModule(mod: Module): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (!mod.name) {\n errors.push({\n message: \"Module name is required\",\n details: {\n module: mod,\n },\n });\n }\n\n if (!mod.operations.length) {\n errors.push({\n message: \"Module operations are required\",\n details: {\n module: mod,\n },\n });\n }\n\n const operationErrors = mod.operations.reduce<ValidationError[]>(\n (acc, operation) => [...acc, ...validateModuleOperation(operation)],\n [],\n );\n\n return [...errors, ...operationErrors];\n}\n\nexport function validateModuleOperation(\n operation: Operation,\n): ValidationError[] {\n const errors: ValidationError[] = [];\n\n if (!operation.name) {\n errors.push({\n message: \"Operation name is required\",\n details: {\n operation,\n },\n });\n }\n\n if (!operation.schema) {\n errors.push({\n message: \"Operation schema is required\",\n details: {\n operation,\n },\n });\n }\n\n return errors;\n}\n","import type { DocumentModelState } from \"..\";\n\nexport const documentModel: DocumentModelState = {\n id: \"powerhouse/document-model\",\n name: \"DocumentModel\",\n extension: \"phdm\",\n description:\n \"The Powerhouse Document Model describes the state and operations of a document type.\",\n author: {\n name: \"Powerhouse\",\n website: \"https://www.powerhouse.inc/\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n modules: [\n {\n name: \"header\",\n operations: [\n {\n name: \"SetModelName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModelId\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModelExtension\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModelDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetAuthorName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetAuthorWebsite\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"versioning\",\n operations: [\n {\n name: \"AddChangeLogItem\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"UpdateChangeLogItem\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteChangeLogItem\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderChangeLogItems\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReleaseNewVersion\",\n schema: null,\n id: \"\",\n description: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"module\",\n operations: [\n {\n name: \"AddModule\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModuleName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetModuleDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteModule\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderModules\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"operation-error\",\n operations: [\n {\n name: \"AddOperationError\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorCode\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationErrorTemplate\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteOperationError\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderOperationErrors\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"operation-example\",\n operations: [\n {\n name: \"AddOperationExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"UpdateOperationExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteOperationExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderOperationExamples\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"operation\",\n operations: [\n {\n name: \"AddOperation\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationName\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationSchema\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationDescription\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationTemplate\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetOperationReducer\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"MoveOperation\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteOperation\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderModuleOperations\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n {\n name: \"state\",\n operations: [\n {\n name: \"SetStateSchema\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"SetInitialState\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"AddStateExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"UpdateStateExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"DeleteStateExample\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n {\n name: \"ReorderStateExamples\",\n id: \"\",\n description: \"\",\n schema: \"\",\n template: \"\",\n reducer: \"\",\n examples: [],\n errors: [],\n scope: \"global\",\n },\n ],\n id: \"\",\n description: \"\",\n },\n ],\n state: {\n global: {\n schema: \"\",\n initialValue:\n '{\\n \"id\": \"\",\\n \"name\": \"\",\\n \"extension\": \"\",\\n \"description\": \"\",\\n \"author\": {\\n \"name\": \"\",\\n \"website\": \"\"\\n },\\n \"specifications\": [\\n {\\n \"version\": 1,\\n \"changeLog\": [],\\n \"state\": {\\n \"schema\": \"\",\\n \"initialValue\": \"\",\\n \"examples\": []\\n },\\n \"modules\": []\\n }\\n ]\\n}',\n examples: [],\n },\n local: {\n schema: \"\",\n initialValue: `{}`,\n examples: [],\n },\n },\n },\n ],\n};\n","import { z } from \"zod\";\nimport {\n AddChangeLogItemInput,\n AddModuleInput,\n AddOperationErrorInput,\n AddOperationExampleInput,\n AddOperationInput,\n AddStateExampleInput,\n Author,\n CodeExample,\n DeleteChangeLogItemInput,\n DeleteModuleInput,\n DeleteOperationErrorInput,\n DeleteOperationExampleInput,\n DeleteOperationInput,\n DeleteStateExampleInput,\n DocumentModelState,\n DocumentSpecification,\n Module,\n MoveOperationInput,\n Operation,\n OperationError,\n ReorderChangeLogItemsInput,\n ReorderModuleOperationsInput,\n ReorderModulesInput,\n ReorderOperationErrorsInput,\n ReorderOperationExamplesInput,\n ReorderStateExamplesInput,\n ScopeState,\n SetAuthorNameInput,\n SetAuthorWebsiteInput,\n SetInitialStateInput,\n SetModelDescriptionInput,\n SetModelExtensionInput,\n SetModelIdInput,\n SetModelNameInput,\n SetModuleDescriptionInput,\n SetModuleNameInput,\n SetOperationDescriptionInput,\n SetOperationErrorCodeInput,\n SetOperationErrorDescriptionInput,\n SetOperationErrorNameInput,\n SetOperationErrorTemplateInput,\n SetOperationNameInput,\n SetOperationReducerInput,\n SetOperationSchemaInput,\n SetOperationScopeInput,\n SetOperationTemplateInput,\n SetStateSchemaInput,\n State,\n UpdateChangeLogItemInput,\n UpdateOperationExampleInput,\n UpdateStateExampleInput,\n} from \".\";\nimport { OperationScope } from \"../../../document\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K], any, T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport function AddChangeLogItemInputSchema(): z.ZodObject<\n Properties<AddChangeLogItemInput>\n> {\n return z.object({\n __typename: z.literal(\"AddChangeLogItemInput\").optional(),\n content: z.string(),\n id: z.string(),\n insertBefore: z.string().nullable(),\n });\n}\n\nexport function AddModuleInputSchema(): z.ZodObject<\n Properties<AddModuleInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n name: z.string(),\n });\n}\n\nexport function AddOperationErrorInputSchema(): z.ZodObject<\n Properties<AddOperationErrorInput>\n> {\n return z.object({\n errorCode: z.string().nullish(),\n errorDescription: z.string().nullish(),\n errorName: z.string().nullish(),\n errorTemplate: z.string().nullish(),\n id: z.string(),\n operationId: z.string(),\n });\n}\n\nexport function AddOperationExampleInputSchema(): z.ZodObject<\n Properties<AddOperationExampleInput>\n> {\n return z.object({\n example: z.string(),\n id: z.string(),\n operationId: z.string(),\n });\n}\n\nexport function AddOperationInputSchema(): z.ZodObject<\n Properties<AddOperationInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n moduleId: z.string(),\n name: z.string(),\n reducer: z.string().nullish(),\n schema: z.string().nullish(),\n template: z.string().nullish(),\n scope: OperationScopeSchema().nullish(),\n });\n}\n\nexport function AddStateExampleInputSchema(): z.ZodObject<\n Properties<AddStateExampleInput>\n> {\n return z.object({\n scope: z.string(),\n example: z.string(),\n id: z.string(),\n insertBefore: z.string().nullish(),\n });\n}\n\nexport function AuthorSchema(): z.ZodObject<Properties<Author>> {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string(),\n website: z.string().nullable(),\n });\n}\n\nexport function CodeExampleSchema(): z.ZodObject<Properties<CodeExample>> {\n return z.object({\n __typename: z.literal(\"CodeExample\").optional(),\n id: z.string(),\n value: z.string(),\n });\n}\n\nexport function DeleteChangeLogItemInputSchema(): z.ZodObject<\n Properties<DeleteChangeLogItemInput>\n> {\n return z.object({\n __typename: z.literal(\"DeleteChangeLogItemInput\").optional(),\n id: z.string(),\n });\n}\n\nexport function DeleteModuleInputSchema(): z.ZodObject<\n Properties<DeleteModuleInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteOperationErrorInputSchema(): z.ZodObject<\n Properties<DeleteOperationErrorInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteOperationExampleInputSchema(): z.ZodObject<\n Properties<DeleteOperationExampleInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteOperationInputSchema(): z.ZodObject<\n Properties<DeleteOperationInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DeleteStateExampleInputSchema(): z.ZodObject<\n Properties<DeleteStateExampleInput>\n> {\n return z.object({\n scope: z.string(),\n id: z.string(),\n });\n}\n\nexport function OperationScopeSchema(): z.ZodType<OperationScope> {\n return z.literal(\"global\").or(z.literal(\"local\"));\n}\n\nexport function DocumentModelInputSchema() {\n return z.union([\n AddChangeLogItemInputSchema(),\n AddModuleInputSchema(),\n AddOperationErrorInputSchema(),\n AddOperationExampleInputSchema(),\n AddOperationInputSchema(),\n AddStateExampleInputSchema(),\n DeleteChangeLogItemInputSchema(),\n DeleteModuleInputSchema(),\n DeleteOperationErrorInputSchema(),\n DeleteOperationExampleInputSchema(),\n DeleteOperationInputSchema(),\n DeleteStateExampleInputSchema(),\n MoveOperationInputSchema(),\n ReorderChangeLogItemsInputSchema(),\n ReorderModuleOperationsInputSchema(),\n ReorderModulesInputSchema(),\n ReorderOperationErrorsInputSchema(),\n ReorderOperationExamplesInputSchema(),\n ReorderStateExamplesInputSchema(),\n SetAuthorNameInputSchema(),\n SetAuthorWebsiteInputSchema(),\n SetInitialStateInputSchema(),\n SetModelDescriptionInputSchema(),\n SetModelExtensionInputSchema(),\n SetModelIdInputSchema(),\n SetModelNameInputSchema(),\n SetModuleDescriptionInputSchema(),\n SetModuleNameInputSchema(),\n SetOperationDescriptionInputSchema(),\n SetOperationErrorCodeInputSchema(),\n SetOperationErrorDescriptionInputSchema(),\n SetOperationErrorNameInputSchema(),\n SetOperationErrorTemplateInputSchema(),\n SetOperationNameInputSchema(),\n SetOperationReducerInputSchema(),\n SetOperationSchemaInputSchema(),\n SetOperationTemplateInputSchema(),\n SetStateSchemaInputSchema(),\n UpdateChangeLogItemInputSchema(),\n UpdateOperationExampleInputSchema(),\n UpdateStateExampleInputSchema(),\n ]);\n}\n\nexport function DocumentModelStateSchema(): z.ZodObject<\n Properties<DocumentModelState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentModelState\").optional(),\n author: AuthorSchema(),\n description: z.string(),\n extension: z.string(),\n id: z.string(),\n name: z.string(),\n specifications: z.array(DocumentSpecificationSchema()),\n });\n}\n\nexport function DocumentSpecificationSchema(): z.ZodObject<\n Properties<DocumentSpecification>\n> {\n return z.object({\n __typename: z.literal(\"DocumentSpecification\").optional(),\n changeLog: z.array(z.string()),\n modules: z.array(ModuleSchema()),\n state: ScopeStateSchema(),\n version: z.number(),\n });\n}\n\nexport function ModuleSchema(): z.ZodObject<Properties<Module>> {\n return z.object({\n __typename: z.literal(\"Module\").optional(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string(),\n operations: z.array(OperationSchema()),\n });\n}\n\nexport function MoveOperationInputSchema(): z.ZodObject<\n Properties<MoveOperationInput>\n> {\n return z.object({\n newModuleId: z.string(),\n operationId: z.string(),\n });\n}\n\nexport function OperationSchema(): z.ZodObject<Properties<Operation>> {\n return z.object({\n __typename: z.literal(\"Operation\").optional(),\n description: z.string().nullable(),\n errors: z.array(OperationErrorSchema()),\n examples: z.array(CodeExampleSchema()),\n id: z.string(),\n name: z.string().nullable(),\n reducer: z.string().nullable(),\n schema: z.string().nullable(),\n template: z.string().nullable(),\n scope: OperationScopeSchema(),\n });\n}\n\nexport function OperationErrorSchema(): z.ZodObject<\n Properties<OperationError>\n> {\n return z.object({\n __typename: z.literal(\"OperationError\").optional(),\n code: z.string().nullable(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string().nullable(),\n template: z.string().nullable(),\n });\n}\n\nexport function ReorderChangeLogItemsInputSchema(): z.ZodObject<\n Properties<ReorderChangeLogItemsInput>\n> {\n return z.object({\n __typename: z.literal(\"ReorderChangeLogItemsInput\").optional(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderModuleOperationsInputSchema(): z.ZodObject<\n Properties<ReorderModuleOperationsInput>\n> {\n return z.object({\n moduleId: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderModulesInputSchema(): z.ZodObject<\n Properties<ReorderModulesInput>\n> {\n return z.object({\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderOperationErrorsInputSchema(): z.ZodObject<\n Properties<ReorderOperationErrorsInput>\n> {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderOperationExamplesInputSchema(): z.ZodObject<\n Properties<ReorderOperationExamplesInput>\n> {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function ReorderStateExamplesInputSchema(): z.ZodObject<\n Properties<ReorderStateExamplesInput>\n> {\n return z.object({\n scope: z.string(),\n order: z.array(z.string()),\n });\n}\n\nexport function SetAuthorNameInputSchema(): z.ZodObject<\n Properties<SetAuthorNameInput>\n> {\n return z.object({\n authorName: z.string(),\n });\n}\n\nexport function SetAuthorWebsiteInputSchema(): z.ZodObject<\n Properties<SetAuthorWebsiteInput>\n> {\n return z.object({\n authorWebsite: z.string(),\n });\n}\n\nexport function SetInitialStateInputSchema(): z.ZodObject<\n Properties<SetInitialStateInput>\n> {\n return z.object({\n scope: z.string(),\n initialValue: z.string(),\n });\n}\n\nexport function SetModelDescriptionInputSchema(): z.ZodObject<\n Properties<SetModelDescriptionInput>\n> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetModelExtensionInputSchema(): z.ZodObject<\n Properties<SetModelExtensionInput>\n> {\n return z.object({\n extension: z.string(),\n });\n}\n\nexport function SetModelIdInputSchema(): z.ZodObject<\n Properties<SetModelIdInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function SetModelNameInputSchema(): z.ZodObject<\n Properties<SetModelNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetModuleDescriptionInputSchema(): z.ZodObject<\n Properties<SetModuleDescriptionInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetModuleNameInputSchema(): z.ZodObject<\n Properties<SetModuleNameInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\n\nexport function SetOperationDescriptionInputSchema(): z.ZodObject<\n Properties<SetOperationDescriptionInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorCodeInputSchema(): z.ZodObject<\n Properties<SetOperationErrorCodeInput>\n> {\n return z.object({\n errorCode: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorDescriptionInputSchema(): z.ZodObject<\n Properties<SetOperationErrorDescriptionInput>\n> {\n return z.object({\n errorDescription: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorNameInputSchema(): z.ZodObject<\n Properties<SetOperationErrorNameInput>\n> {\n return z.object({\n errorName: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationErrorTemplateInputSchema(): z.ZodObject<\n Properties<SetOperationErrorTemplateInput>\n> {\n return z.object({\n errorTemplate: z.string().nullish(),\n id: z.string(),\n });\n}\n\nexport function SetOperationNameInputSchema(): z.ZodObject<\n Properties<SetOperationNameInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\n\nexport function SetOperationScopeInputSchema(): z.ZodObject<\n Properties<SetOperationScopeInput>\n> {\n return z.object({\n id: z.string(),\n scope: OperationScopeSchema(),\n });\n}\n\nexport function SetOperationReducerInputSchema(): z.ZodObject<\n Properties<SetOperationReducerInput>\n> {\n return z.object({\n id: z.string(),\n reducer: z.string().nullish(),\n });\n}\n\nexport function SetOperationSchemaInputSchema(): z.ZodObject<\n Properties<SetOperationSchemaInput>\n> {\n return z.object({\n id: z.string(),\n schema: z.string().nullish(),\n });\n}\n\nexport function SetOperationTemplateInputSchema(): z.ZodObject<\n Properties<SetOperationTemplateInput>\n> {\n return z.object({\n id: z.string(),\n template: z.string().nullish(),\n });\n}\n\nexport function SetStateSchemaInputSchema(): z.ZodObject<\n Properties<SetStateSchemaInput>\n> {\n return z.object({\n scope: z.string(),\n schema: z.string(),\n });\n}\n\nexport function StateSchema(): z.ZodObject<Properties<State>> {\n return z.object({\n __typename: z.literal(\"State\").optional(),\n examples: z.array(CodeExampleSchema()),\n initialValue: z.string(),\n schema: z.string(),\n });\n}\n\nexport function ScopeStateSchema(): z.ZodObject<Properties<ScopeState>> {\n return z.object({\n global: StateSchema(),\n local: StateSchema(),\n });\n}\n\nexport function UpdateChangeLogItemInputSchema(): z.ZodObject<\n Properties<UpdateChangeLogItemInput>\n> {\n return z.object({\n __typename: z.literal(\"UpdateChangeLogItemInput\").optional(),\n id: z.string(),\n newContent: z.string(),\n });\n}\n\nexport function UpdateOperationExampleInputSchema(): z.ZodObject<\n Properties<UpdateOperationExampleInput>\n> {\n return z.object({\n example: z.string(),\n id: z.string(),\n });\n}\n\nexport function UpdateStateExampleInputSchema(): z.ZodObject<\n Properties<UpdateStateExampleInput>\n> {\n return z.object({\n scope: z.string(),\n id: z.string(),\n newExample: z.string(),\n });\n}\n","import { DocumentModelHeaderOperations } from \"../../gen/header/operations\";\n\nexport const reducer: DocumentModelHeaderOperations = {\n setModelNameOperation(state, action) {\n state.name = action.input.name;\n },\n\n setModelIdOperation(state, action) {\n state.id = action.input.id;\n },\n\n setModelExtensionOperation(state, action) {\n state.extension = action.input.extension;\n },\n\n setModelDescriptionOperation(state, action) {\n state.description = action.input.description;\n },\n\n setAuthorNameOperation(state, action) {\n state.author = state.author || { name: \"\", website: null };\n state.author.name = action.input.authorName;\n },\n\n setAuthorWebsiteOperation(state, action) {\n state.author = state.author || { name: \"\", website: null };\n state.author.website = action.input.authorWebsite;\n },\n};\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport { DocumentModelVersioningOperations } from \"../../gen/versioning/operations\";\n\nexport const reducer: DocumentModelVersioningOperations = {\n addChangeLogItemOperation(state, action) {\n throw new Error('Reducer \"addChangeLogItemOperation\" not yet implemented');\n },\n\n updateChangeLogItemOperation(state, action) {\n throw new Error(\n 'Reducer \"updateChangeLogItemOperation\" not yet implemented',\n );\n },\n\n deleteChangeLogItemOperation(state, action) {\n throw new Error(\n 'Reducer \"deleteChangeLogItemOperation\" not yet implemented',\n );\n },\n\n reorderChangeLogItemsOperation(state, action) {\n throw new Error(\n 'Reducer \"reorderChangeLogItemsOperation\" not yet implemented',\n );\n },\n\n releaseNewVersionOperation(state, action) {\n throw new Error('Reducer \"releaseNewVersionOperation\" not yet implemented');\n },\n};\n","import { Module } from \"../../gen\";\nimport { DocumentModelModuleOperations } from \"../../gen/module/operations\";\n\nconst moduleSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: Module, b: Module) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelModuleOperations = {\n addModuleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n latestSpec.modules.push({\n id: action.input.id,\n name: action.input.name,\n description: action.input.description || \"\",\n operations: [],\n });\n },\n\n setModuleNameOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id === action.input.id) {\n latestSpec.modules[i].name = action.input.name || \"\";\n }\n }\n },\n\n setModuleDescriptionOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id === action.input.id) {\n latestSpec.modules[i].description = action.input.description || \"\";\n }\n }\n },\n\n deleteModuleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n latestSpec.modules = latestSpec.modules.filter(\n (m) => m.id != action.input.id,\n );\n },\n\n reorderModulesOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n latestSpec.modules.sort(moduleSorter(action.input.order));\n },\n};\n","import { OperationError } from \"../../gen\";\nimport { DocumentModelOperationErrorOperations } from \"../../gen/operation-error/operations\";\n\nconst errorSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: OperationError, b: OperationError) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelOperationErrorOperations = {\n addOperationErrorOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].errors.push({\n id: action.input.id,\n name: action.input.errorName || \"\",\n code: action.input.errorCode || \"\",\n description: action.input.errorDescription || \"\",\n template: action.input.errorTemplate || \"\",\n });\n }\n }\n }\n },\n\n setOperationErrorCodeOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].code =\n action.input.errorCode || \"\";\n }\n }\n }\n }\n },\n\n setOperationErrorNameOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].name =\n action.input.errorName || \"\";\n }\n }\n }\n }\n },\n\n setOperationErrorDescriptionOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].description =\n action.input.errorDescription || \"\";\n }\n }\n }\n }\n },\n\n setOperationErrorTemplateOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].errors.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].errors[k].id == action.input.id\n ) {\n latestSpec.modules[i].operations[j].errors[k].template =\n action.input.errorTemplate || \"\";\n }\n }\n }\n }\n },\n\n deleteOperationErrorOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n latestSpec.modules[i].operations[j].errors = latestSpec.modules[\n i\n ].operations[j].errors.filter((e) => e.id != action.input.id);\n }\n }\n },\n\n reorderOperationErrorsOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].errors.sort(\n errorSorter(action.input.order),\n );\n }\n }\n }\n },\n};\n","import { CodeExample } from \"../../gen\";\nimport { DocumentModelOperationExampleOperations } from \"../../gen/operation-example/operations\";\n\nconst exampleSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: CodeExample, b: CodeExample) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelOperationExampleOperations = {\n addOperationExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].examples.push({\n id: action.input.id,\n value: action.input.example,\n });\n }\n }\n }\n },\n\n updateOperationExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n for (\n let k = 0;\n k < latestSpec.modules[i].operations[j].examples.length;\n k++\n ) {\n if (\n latestSpec.modules[i].operations[j].examples[k].id ==\n action.input.id\n ) {\n latestSpec.modules[i].operations[j].examples[k].value =\n action.input.example;\n }\n }\n }\n }\n },\n\n deleteOperationExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n latestSpec.modules[i].operations[j].examples = latestSpec.modules[\n i\n ].operations[j].examples.filter((e) => e.id != action.input.id);\n }\n }\n },\n\n reorderOperationExamplesOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (\n latestSpec.modules[i].operations[j].id == action.input.operationId\n ) {\n latestSpec.modules[i].operations[j].examples.sort(\n exampleSorter(action.input.order),\n );\n }\n }\n }\n },\n};\n","import { Operation } from \"../../gen\";\nimport { DocumentModelOperationOperations } from \"../../gen/operation/operations\";\n\nconst operationSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: Operation, b: Operation) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelOperationOperations = {\n addOperationOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id == action.input.moduleId) {\n latestSpec.modules[i].operations.push({\n id: action.input.id,\n name: action.input.name,\n description: action.input.description || \"\",\n schema: action.input.schema || \"\",\n template: action.input.template || action.input.description || \"\",\n reducer: action.input.reducer || \"\",\n errors: [],\n examples: [],\n scope: action.input.scope || \"global\",\n });\n }\n }\n },\n\n setOperationNameOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].name = action.input.name || \"\";\n }\n }\n }\n },\n\n setOperationScopeOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].scope =\n action.input.scope || \"global\";\n }\n }\n }\n },\n\n setOperationSchemaOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].schema =\n action.input.schema || \"\";\n }\n }\n }\n },\n\n setOperationDescriptionOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].description =\n action.input.description || \"\";\n }\n }\n }\n },\n\n setOperationTemplateOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].template =\n action.input.template || \"\";\n }\n }\n }\n },\n\n setOperationReducerOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n for (let j = 0; j < latestSpec.modules[i].operations.length; j++) {\n if (latestSpec.modules[i].operations[j].id == action.input.id) {\n latestSpec.modules[i].operations[j].reducer =\n action.input.reducer || \"\";\n }\n }\n }\n },\n\n moveOperationOperation(state, action) {\n const moveOperations: Operation[] = [];\n const latestSpec = state.specifications[state.specifications.length - 1];\n\n // Filter and collect\n for (let i = 0; i < latestSpec.modules.length; i++) {\n latestSpec.modules[i].operations = latestSpec.modules[\n i\n ].operations.filter((operation) => {\n if (operation.id == action.input.operationId) {\n moveOperations.push(operation);\n return false;\n }\n\n return true;\n });\n }\n\n // Inject in target modules\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id == action.input.newModuleId) {\n latestSpec.modules[i].operations.push(...moveOperations);\n }\n }\n },\n\n deleteOperationOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n latestSpec.modules[i].operations = latestSpec.modules[\n i\n ].operations.filter((operation) => operation.id != action.input.id);\n }\n },\n\n reorderModuleOperationsOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n for (let i = 0; i < latestSpec.modules.length; i++) {\n if (latestSpec.modules[i].id == action.input.moduleId) {\n latestSpec.modules[i].operations.sort(\n operationSorter(action.input.order),\n );\n }\n }\n },\n};\n","import { CodeExample, ScopeState } from \"../../gen\";\nimport { DocumentModelStateOperations } from \"../../gen/state/operations\";\n\nconst exampleSorter = (order: string[]) => {\n const mapping: Record<string, number> = {};\n order.forEach((key, index) => (mapping[key] = index));\n return (a: CodeExample, b: CodeExample) =>\n (mapping[b.id] || 999999) - (mapping[a.id] || 999999);\n};\n\nexport const reducer: DocumentModelStateOperations = {\n setStateSchemaOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].schema =\n action.input.schema;\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n setInitialStateOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].initialValue =\n action.input.initialValue;\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n addStateExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].examples.push({\n id: action.input.id,\n value: action.input.example,\n });\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n updateStateExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (!Object.keys(latestSpec.state).includes(action.input.scope)) {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n const examples =\n latestSpec.state[action.input.scope as keyof ScopeState].examples;\n\n for (let i = 0; i < examples.length; i++) {\n if (examples[i].id == action.input.id) {\n examples[i].value = action.input.newExample;\n }\n }\n },\n\n deleteStateExampleOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].examples =\n latestSpec.state[\n action.input.scope as keyof ScopeState\n ].examples.filter((e) => e.id != action.input.id);\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n\n reorderStateExamplesOperation(state, action) {\n const latestSpec = state.specifications[state.specifications.length - 1];\n if (Object.keys(latestSpec.state).includes(action.input.scope)) {\n latestSpec.state[action.input.scope as keyof ScopeState].examples.sort(\n exampleSorter(action.input.order),\n );\n } else {\n throw new Error(`Invalid scope: ${action.input.scope}`);\n }\n },\n};\n","import { ImmutableStateReducer } from \"../../document/types\";\nimport { DocumentModelLocalState, DocumentModelState, z } from \"./schema\";\nimport { DocumentModelAction } from \"./actions\";\n\nimport { reducer as HeaderReducer } from \"../custom/reducers/header\";\nimport { reducer as VersioningReducer } from \"../custom/reducers/versioning\";\nimport { reducer as ModuleReducer } from \"../custom/reducers/module\";\nimport { reducer as OperationErrorReducer } from \"../custom/reducers/operation-error\";\nimport { reducer as OperationExampleReducer } from \"../custom/reducers/operation-example\";\nimport { reducer as OperationReducer } from \"../custom/reducers/operation\";\nimport { reducer as StateReducer } from \"../custom/reducers/state\";\nimport { createReducer, isBaseAction } from \"../../document/utils\";\n\nexport const stateReducer: ImmutableStateReducer<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> = (state, action) => {\n if (isBaseAction(action)) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_MODEL_NAME\":\n z.SetModelNameInputSchema().parse(action.input);\n HeaderReducer.setModelNameOperation(state.global, action);\n break;\n\n case \"SET_MODEL_ID\":\n z.SetModelIdInputSchema().parse(action.input);\n HeaderReducer.setModelIdOperation(state.global, action);\n break;\n\n case \"SET_MODEL_EXTENSION\":\n z.SetModelExtensionInputSchema().parse(action.input);\n HeaderReducer.setModelExtensionOperation(state.global, action);\n break;\n\n case \"SET_MODEL_DESCRIPTION\":\n z.SetModelDescriptionInputSchema().parse(action.input);\n HeaderReducer.setModelDescriptionOperation(state.global, action);\n break;\n\n case \"SET_AUTHOR_NAME\":\n z.SetAuthorNameInputSchema().parse(action.input);\n HeaderReducer.setAuthorNameOperation(state.global, action);\n break;\n\n case \"SET_AUTHOR_WEBSITE\":\n z.SetAuthorWebsiteInputSchema().parse(action.input);\n HeaderReducer.setAuthorWebsiteOperation(state.global, action);\n break;\n\n case \"ADD_CHANGE_LOG_ITEM\":\n z.AddChangeLogItemInputSchema().parse(action.input);\n VersioningReducer.addChangeLogItemOperation(state.global, action);\n break;\n\n case \"UPDATE_CHANGE_LOG_ITEM\":\n z.UpdateChangeLogItemInputSchema().parse(action.input);\n VersioningReducer.updateChangeLogItemOperation(state.global, action);\n break;\n\n case \"DELETE_CHANGE_LOG_ITEM\":\n z.DeleteChangeLogItemInputSchema().parse(action.input);\n VersioningReducer.deleteChangeLogItemOperation(state.global, action);\n break;\n\n case \"REORDER_CHANGE_LOG_ITEMS\":\n z.ReorderChangeLogItemsInputSchema().parse(action.input);\n VersioningReducer.reorderChangeLogItemsOperation(state.global, action);\n break;\n\n case \"RELEASE_NEW_VERSION\":\n if (Object.keys(action.input).length > 0)\n throw new Error(\"Expected empty input for action RELEASE_NEW_VERSION\");\n VersioningReducer.releaseNewVersionOperation(state.global, action);\n break;\n\n case \"ADD_MODULE\":\n z.AddModuleInputSchema().parse(action.input);\n ModuleReducer.addModuleOperation(state.global, action);\n break;\n\n case \"SET_MODULE_NAME\":\n z.SetModuleNameInputSchema().parse(action.input);\n ModuleReducer.setModuleNameOperation(state.global, action);\n break;\n\n case \"SET_MODULE_DESCRIPTION\":\n z.SetModuleDescriptionInputSchema().parse(action.input);\n ModuleReducer.setModuleDescriptionOperation(state.global, action);\n break;\n\n case \"DELETE_MODULE\":\n z.DeleteModuleInputSchema().parse(action.input);\n ModuleReducer.deleteModuleOperation(state.global, action);\n break;\n\n case \"REORDER_MODULES\":\n z.ReorderModulesInputSchema().parse(action.input);\n ModuleReducer.reorderModulesOperation(state.global, action);\n break;\n\n case \"ADD_OPERATION_ERROR\":\n z.AddOperationErrorInputSchema().parse(action.input);\n OperationErrorReducer.addOperationErrorOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_ERROR_CODE\":\n z.SetOperationErrorCodeInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorCodeOperation(\n state.global,\n action,\n );\n break;\n\n case \"SET_OPERATION_ERROR_NAME\":\n z.SetOperationErrorNameInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorNameOperation(\n state.global,\n action,\n );\n break;\n\n case \"SET_OPERATION_ERROR_DESCRIPTION\":\n z.SetOperationErrorDescriptionInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorDescriptionOperation(\n state.global,\n action,\n );\n break;\n\n case \"SET_OPERATION_ERROR_TEMPLATE\":\n z.SetOperationErrorTemplateInputSchema().parse(action.input);\n OperationErrorReducer.setOperationErrorTemplateOperation(\n state.global,\n action,\n );\n break;\n\n case \"DELETE_OPERATION_ERROR\":\n z.DeleteOperationErrorInputSchema().parse(action.input);\n OperationErrorReducer.deleteOperationErrorOperation(state.global, action);\n break;\n\n case \"REORDER_OPERATION_ERRORS\":\n z.ReorderOperationErrorsInputSchema().parse(action.input);\n OperationErrorReducer.reorderOperationErrorsOperation(\n state.global,\n action,\n );\n break;\n\n case \"ADD_OPERATION_EXAMPLE\":\n z.AddOperationExampleInputSchema().parse(action.input);\n OperationExampleReducer.addOperationExampleOperation(\n state.global,\n action,\n );\n break;\n\n case \"UPDATE_OPERATION_EXAMPLE\":\n z.UpdateOperationExampleInputSchema().parse(action.input);\n OperationExampleReducer.updateOperationExampleOperation(\n state.global,\n action,\n );\n break;\n\n case \"DELETE_OPERATION_EXAMPLE\":\n z.DeleteOperationExampleInputSchema().parse(action.input);\n OperationExampleReducer.deleteOperationExampleOperation(\n state.global,\n action,\n );\n break;\n\n case \"REORDER_OPERATION_EXAMPLES\":\n z.ReorderOperationExamplesInputSchema().parse(action.input);\n OperationExampleReducer.reorderOperationExamplesOperation(\n state.global,\n action,\n );\n break;\n\n case \"ADD_OPERATION\":\n z.AddOperationInputSchema().parse(action.input);\n OperationReducer.addOperationOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_NAME\":\n z.SetOperationNameInputSchema().parse(action.input);\n OperationReducer.setOperationNameOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_SCOPE\":\n z.SetOperationScopeInputSchema().parse(action.input);\n OperationReducer.setOperationScopeOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_SCHEMA\":\n z.SetOperationSchemaInputSchema().parse(action.input);\n OperationReducer.setOperationSchemaOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_DESCRIPTION\":\n z.SetOperationDescriptionInputSchema().parse(action.input);\n OperationReducer.setOperationDescriptionOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_TEMPLATE\":\n z.SetOperationTemplateInputSchema().parse(action.input);\n OperationReducer.setOperationTemplateOperation(state.global, action);\n break;\n\n case \"SET_OPERATION_REDUCER\":\n z.SetOperationReducerInputSchema().parse(action.input);\n OperationReducer.setOperationReducerOperation(state.global, action);\n break;\n\n case \"MOVE_OPERATION\":\n z.MoveOperationInputSchema().parse(action.input);\n OperationReducer.moveOperationOperation(state.global, action);\n break;\n\n case \"DELETE_OPERATION\":\n z.DeleteOperationInputSchema().parse(action.input);\n OperationReducer.deleteOperationOperation(state.global, action);\n break;\n\n case \"REORDER_MODULE_OPERATIONS\":\n z.ReorderModuleOperationsInputSchema().parse(action.input);\n OperationReducer.reorderModuleOperationsOperation(state.global, action);\n break;\n\n case \"SET_STATE_SCHEMA\":\n z.SetStateSchemaInputSchema().parse(action.input);\n StateReducer.setStateSchemaOperation(state.global, action);\n break;\n\n case \"SET_INITIAL_STATE\":\n z.SetInitialStateInputSchema().parse(action.input);\n StateReducer.setInitialStateOperation(state.global, action);\n break;\n\n case \"ADD_STATE_EXAMPLE\":\n z.AddStateExampleInputSchema().parse(action.input);\n StateReducer.addStateExampleOperation(state.global, action);\n break;\n\n case \"UPDATE_STATE_EXAMPLE\":\n z.UpdateStateExampleInputSchema().parse(action.input);\n StateReducer.updateStateExampleOperation(state.global, action);\n break;\n\n case \"DELETE_STATE_EXAMPLE\":\n z.DeleteStateExampleInputSchema().parse(action.input);\n StateReducer.deleteStateExampleOperation(state.global, action);\n break;\n\n case \"REORDER_STATE_EXAMPLES\":\n z.ReorderStateExamplesInputSchema().parse(action.input);\n StateReducer.reorderStateExamplesOperation(state.global, action);\n break;\n\n default:\n return state;\n }\n};\n\nexport const reducer = createReducer<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n>(stateReducer);\n","import { DocumentModelUtils, utils as base } from \"../../document\";\nimport {\n DocumentModelAction,\n DocumentModelLocalState,\n DocumentModelState,\n} from \"./types\";\nimport { reducer } from \"./reducer\";\n\nexport const initialGlobalState: DocumentModelState = {\n id: \"\",\n name: \"\",\n extension: \"\",\n description: \"\",\n author: {\n name: \"\",\n website: \"\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n state: {\n global: {\n schema: \"\",\n initialValue: \"\",\n examples: [],\n },\n local: {\n schema: \"\",\n initialValue: \"\",\n examples: [],\n },\n },\n modules: [],\n },\n ],\n};\n\nexport const initialLocalState: DocumentModelLocalState = {};\n\nconst utils: DocumentModelUtils<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> = {\n fileExtension: \"phdm\",\n createState(state) {\n return {\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createExtendedState(extendedState) {\n return base.createExtendedState(\n { ...extendedState, documentType: \"powerhouse/document-model\" },\n utils.createState,\n );\n },\n createDocument(state) {\n return base.createDocument(\n utils.createExtendedState(state),\n utils.createState,\n );\n },\n saveToFile(document, path, name) {\n return base.saveToFile(document, path, \"phdm\", name);\n },\n saveToFileHandle(document, input) {\n return base.saveToFileHandle(document, input);\n },\n loadFromFile(path) {\n return base.loadFromFile(path, reducer);\n },\n loadFromInput(input) {\n return base.loadFromInput(input, reducer);\n },\n};\n\nexport default utils;\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n SetModelNameInput,\n SetModelIdInput,\n SetModelExtensionInput,\n SetModelDescriptionInput,\n SetAuthorNameInput,\n SetAuthorWebsiteInput,\n} from \"../types\";\nimport {\n SetModelNameAction,\n SetModelIdAction,\n SetModelExtensionAction,\n SetModelDescriptionAction,\n SetAuthorNameAction,\n SetAuthorWebsiteAction,\n} from \"./actions\";\n\nexport const setModelName = (input: SetModelNameInput) =>\n createAction<SetModelNameAction>(\"SET_MODEL_NAME\", { ...input });\n\nexport const setModelId = (input: SetModelIdInput) =>\n createAction<SetModelIdAction>(\"SET_MODEL_ID\", { ...input });\n\nexport const setModelExtension = (input: SetModelExtensionInput) =>\n createAction<SetModelExtensionAction>(\"SET_MODEL_EXTENSION\", { ...input });\n\nexport const setModelDescription = (input: SetModelDescriptionInput) =>\n createAction<SetModelDescriptionAction>(\"SET_MODEL_DESCRIPTION\", {\n ...input,\n });\n\nexport const setAuthorName = (input: SetAuthorNameInput) =>\n createAction<SetAuthorNameAction>(\"SET_AUTHOR_NAME\", { ...input });\n\nexport const setAuthorWebsite = (input: SetAuthorWebsiteInput) =>\n createAction<SetAuthorWebsiteAction>(\"SET_AUTHOR_WEBSITE\", { ...input });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n SetModelNameInput,\n SetModelIdInput,\n SetModelExtensionInput,\n SetModelDescriptionInput,\n SetAuthorNameInput,\n SetAuthorWebsiteInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n setModelName,\n setModelId,\n setModelExtension,\n setModelDescription,\n setAuthorName,\n setAuthorWebsite,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Header extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public setModelName(input: SetModelNameInput, options?: ReducerOptions) {\n return this.dispatch(setModelName(input), options);\n }\n\n public setModelId(input: SetModelIdInput, options?: ReducerOptions) {\n return this.dispatch(setModelId(input), options);\n }\n\n public setModelExtension(\n input: SetModelExtensionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setModelExtension(input), options);\n }\n\n public setModelDescription(\n input: SetModelDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setModelDescription(input), options);\n }\n\n public setAuthorName(input: SetAuthorNameInput, options?: ReducerOptions) {\n return this.dispatch(setAuthorName(input), options);\n }\n\n public setAuthorWebsite(\n input: SetAuthorWebsiteInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setAuthorWebsite(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddChangeLogItemInput,\n UpdateChangeLogItemInput,\n DeleteChangeLogItemInput,\n ReorderChangeLogItemsInput,\n} from \"../types\";\nimport {\n AddChangeLogItemAction,\n UpdateChangeLogItemAction,\n DeleteChangeLogItemAction,\n ReorderChangeLogItemsAction,\n ReleaseNewVersionAction,\n} from \"./actions\";\n\nexport const addChangeLogItem = (input: AddChangeLogItemInput) =>\n createAction<AddChangeLogItemAction>(\"ADD_CHANGE_LOG_ITEM\", { ...input });\n\nexport const updateChangeLogItem = (input: UpdateChangeLogItemInput) =>\n createAction<UpdateChangeLogItemAction>(\"UPDATE_CHANGE_LOG_ITEM\", {\n ...input,\n });\n\nexport const deleteChangeLogItem = (input: DeleteChangeLogItemInput) =>\n createAction<DeleteChangeLogItemAction>(\"DELETE_CHANGE_LOG_ITEM\", {\n ...input,\n });\n\nexport const reorderChangeLogItems = (input: ReorderChangeLogItemsInput) =>\n createAction<ReorderChangeLogItemsAction>(\"REORDER_CHANGE_LOG_ITEMS\", {\n ...input,\n });\n\nexport const releaseNewVersion = () =>\n createAction<ReleaseNewVersionAction>(\"RELEASE_NEW_VERSION\");\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddChangeLogItemInput,\n UpdateChangeLogItemInput,\n DeleteChangeLogItemInput,\n ReorderChangeLogItemsInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addChangeLogItem,\n updateChangeLogItem,\n deleteChangeLogItem,\n reorderChangeLogItems,\n releaseNewVersion,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Versioning extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addChangeLogItem(\n input: AddChangeLogItemInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addChangeLogItem(input), options);\n }\n\n public updateChangeLogItem(\n input: UpdateChangeLogItemInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(updateChangeLogItem(input), options);\n }\n\n public deleteChangeLogItem(\n input: DeleteChangeLogItemInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteChangeLogItem(input), options);\n }\n\n public reorderChangeLogItems(\n input: ReorderChangeLogItemsInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderChangeLogItems(input), options);\n }\n\n public releaseNewVersion(options?: ReducerOptions) {\n return this.dispatch(releaseNewVersion(), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddModuleInput,\n SetModuleNameInput,\n SetModuleDescriptionInput,\n DeleteModuleInput,\n ReorderModulesInput,\n} from \"../types\";\nimport {\n AddModuleAction,\n SetModuleNameAction,\n SetModuleDescriptionAction,\n DeleteModuleAction,\n ReorderModulesAction,\n} from \"./actions\";\n\nexport const addModule = (input: AddModuleInput) =>\n createAction<AddModuleAction>(\"ADD_MODULE\", { ...input });\n\nexport const setModuleName = (input: SetModuleNameInput) =>\n createAction<SetModuleNameAction>(\"SET_MODULE_NAME\", { ...input });\n\nexport const setModuleDescription = (input: SetModuleDescriptionInput) =>\n createAction<SetModuleDescriptionAction>(\"SET_MODULE_DESCRIPTION\", {\n ...input,\n });\n\nexport const deleteModule = (input: DeleteModuleInput) =>\n createAction<DeleteModuleAction>(\"DELETE_MODULE\", { ...input });\n\nexport const reorderModules = (input: ReorderModulesInput) =>\n createAction<ReorderModulesAction>(\"REORDER_MODULES\", { ...input });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddModuleInput,\n SetModuleNameInput,\n SetModuleDescriptionInput,\n DeleteModuleInput,\n ReorderModulesInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addModule,\n setModuleName,\n setModuleDescription,\n deleteModule,\n reorderModules,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Module extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addModule(input: AddModuleInput, options?: ReducerOptions) {\n return this.dispatch(addModule(input), options);\n }\n\n public setModuleName(input: SetModuleNameInput, options?: ReducerOptions) {\n return this.dispatch(setModuleName(input), options);\n }\n\n public setModuleDescription(\n input: SetModuleDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setModuleDescription(input), options);\n }\n\n public deleteModule(input: DeleteModuleInput, options?: ReducerOptions) {\n return this.dispatch(deleteModule(input), options);\n }\n\n public reorderModules(input: ReorderModulesInput, options?: ReducerOptions) {\n return this.dispatch(reorderModules(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddOperationErrorInput,\n SetOperationErrorCodeInput,\n SetOperationErrorNameInput,\n SetOperationErrorDescriptionInput,\n SetOperationErrorTemplateInput,\n DeleteOperationErrorInput,\n ReorderOperationErrorsInput,\n} from \"../types\";\nimport {\n AddOperationErrorAction,\n SetOperationErrorCodeAction,\n SetOperationErrorNameAction,\n SetOperationErrorDescriptionAction,\n SetOperationErrorTemplateAction,\n DeleteOperationErrorAction,\n ReorderOperationErrorsAction,\n} from \"./actions\";\n\nexport const addOperationError = (input: AddOperationErrorInput) =>\n createAction<AddOperationErrorAction>(\"ADD_OPERATION_ERROR\", { ...input });\n\nexport const setOperationErrorCode = (input: SetOperationErrorCodeInput) =>\n createAction<SetOperationErrorCodeAction>(\"SET_OPERATION_ERROR_CODE\", {\n ...input,\n });\n\nexport const setOperationErrorName = (input: SetOperationErrorNameInput) =>\n createAction<SetOperationErrorNameAction>(\"SET_OPERATION_ERROR_NAME\", {\n ...input,\n });\n\nexport const setOperationErrorDescription = (\n input: SetOperationErrorDescriptionInput,\n) =>\n createAction<SetOperationErrorDescriptionAction>(\n \"SET_OPERATION_ERROR_DESCRIPTION\",\n { ...input },\n );\n\nexport const setOperationErrorTemplate = (\n input: SetOperationErrorTemplateInput,\n) =>\n createAction<SetOperationErrorTemplateAction>(\n \"SET_OPERATION_ERROR_TEMPLATE\",\n { ...input },\n );\n\nexport const deleteOperationError = (input: DeleteOperationErrorInput) =>\n createAction<DeleteOperationErrorAction>(\"DELETE_OPERATION_ERROR\", {\n ...input,\n });\n\nexport const reorderOperationErrors = (input: ReorderOperationErrorsInput) =>\n createAction<ReorderOperationErrorsAction>(\"REORDER_OPERATION_ERRORS\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddOperationErrorInput,\n SetOperationErrorCodeInput,\n SetOperationErrorNameInput,\n SetOperationErrorDescriptionInput,\n SetOperationErrorTemplateInput,\n DeleteOperationErrorInput,\n ReorderOperationErrorsInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addOperationError,\n setOperationErrorCode,\n setOperationErrorName,\n setOperationErrorDescription,\n setOperationErrorTemplate,\n deleteOperationError,\n reorderOperationErrors,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_OperationError extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addOperationError(\n input: AddOperationErrorInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addOperationError(input), options);\n }\n\n public setOperationErrorCode(\n input: SetOperationErrorCodeInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorCode(input), options);\n }\n\n public setOperationErrorName(\n input: SetOperationErrorNameInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorName(input), options);\n }\n\n public setOperationErrorDescription(\n input: SetOperationErrorDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorDescription(input), options);\n }\n\n public setOperationErrorTemplate(\n input: SetOperationErrorTemplateInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationErrorTemplate(input), options);\n }\n\n public deleteOperationError(\n input: DeleteOperationErrorInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteOperationError(input), options);\n }\n\n public reorderOperationErrors(\n input: ReorderOperationErrorsInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderOperationErrors(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddOperationExampleInput,\n UpdateOperationExampleInput,\n DeleteOperationExampleInput,\n ReorderOperationExamplesInput,\n} from \"../types\";\nimport {\n AddOperationExampleAction,\n UpdateOperationExampleAction,\n DeleteOperationExampleAction,\n ReorderOperationExamplesAction,\n} from \"./actions\";\n\nexport const addOperationExample = (input: AddOperationExampleInput) =>\n createAction<AddOperationExampleAction>(\"ADD_OPERATION_EXAMPLE\", {\n ...input,\n });\n\nexport const updateOperationExample = (input: UpdateOperationExampleInput) =>\n createAction<UpdateOperationExampleAction>(\"UPDATE_OPERATION_EXAMPLE\", {\n ...input,\n });\n\nexport const deleteOperationExample = (input: DeleteOperationExampleInput) =>\n createAction<DeleteOperationExampleAction>(\"DELETE_OPERATION_EXAMPLE\", {\n ...input,\n });\n\nexport const reorderOperationExamples = (\n input: ReorderOperationExamplesInput,\n) =>\n createAction<ReorderOperationExamplesAction>(\"REORDER_OPERATION_EXAMPLES\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddOperationExampleInput,\n UpdateOperationExampleInput,\n DeleteOperationExampleInput,\n ReorderOperationExamplesInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addOperationExample,\n updateOperationExample,\n deleteOperationExample,\n reorderOperationExamples,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_OperationExample extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addOperationExample(\n input: AddOperationExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addOperationExample(input), options);\n }\n\n public updateOperationExample(\n input: UpdateOperationExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(updateOperationExample(input), options);\n }\n\n public deleteOperationExample(\n input: DeleteOperationExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteOperationExample(input), options);\n }\n\n public reorderOperationExamples(\n input: ReorderOperationExamplesInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderOperationExamples(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n AddOperationInput,\n SetOperationNameInput,\n SetOperationSchemaInput,\n SetOperationDescriptionInput,\n SetOperationTemplateInput,\n SetOperationReducerInput,\n MoveOperationInput,\n DeleteOperationInput,\n ReorderModuleOperationsInput,\n SetOperationScopeInput,\n} from \"../types\";\nimport {\n AddOperationAction,\n SetOperationNameAction,\n SetOperationSchemaAction,\n SetOperationDescriptionAction,\n SetOperationTemplateAction,\n SetOperationReducerAction,\n MoveOperationAction,\n DeleteOperationAction,\n ReorderModuleOperationsAction,\n SetOperationScopeAction,\n} from \"./actions\";\n\nexport const addOperation = (input: AddOperationInput) =>\n createAction<AddOperationAction>(\"ADD_OPERATION\", { ...input });\n\nexport const setOperationName = (input: SetOperationNameInput) =>\n createAction<SetOperationNameAction>(\"SET_OPERATION_NAME\", { ...input });\n\nexport const setOperationScope = (input: SetOperationScopeInput) =>\n createAction<SetOperationScopeAction>(\"SET_OPERATION_SCOPE\", { ...input });\n\nexport const setOperationSchema = (input: SetOperationSchemaInput) =>\n createAction<SetOperationSchemaAction>(\"SET_OPERATION_SCHEMA\", { ...input });\n\nexport const setOperationDescription = (input: SetOperationDescriptionInput) =>\n createAction<SetOperationDescriptionAction>(\"SET_OPERATION_DESCRIPTION\", {\n ...input,\n });\n\nexport const setOperationTemplate = (input: SetOperationTemplateInput) =>\n createAction<SetOperationTemplateAction>(\"SET_OPERATION_TEMPLATE\", {\n ...input,\n });\n\nexport const setOperationReducer = (input: SetOperationReducerInput) =>\n createAction<SetOperationReducerAction>(\"SET_OPERATION_REDUCER\", {\n ...input,\n });\n\nexport const moveOperation = (input: MoveOperationInput) =>\n createAction<MoveOperationAction>(\"MOVE_OPERATION\", { ...input });\n\nexport const deleteOperation = (input: DeleteOperationInput) =>\n createAction<DeleteOperationAction>(\"DELETE_OPERATION\", { ...input });\n\nexport const reorderModuleOperations = (input: ReorderModuleOperationsInput) =>\n createAction<ReorderModuleOperationsAction>(\"REORDER_MODULE_OPERATIONS\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n AddOperationInput,\n SetOperationNameInput,\n SetOperationSchemaInput,\n SetOperationDescriptionInput,\n SetOperationTemplateInput,\n SetOperationReducerInput,\n MoveOperationInput,\n DeleteOperationInput,\n ReorderModuleOperationsInput,\n DocumentModelState,\n SetOperationScopeInput,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n addOperation,\n setOperationName,\n setOperationSchema,\n setOperationDescription,\n setOperationTemplate,\n setOperationReducer,\n moveOperation,\n deleteOperation,\n reorderModuleOperations,\n setOperationScope,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_Operation extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public addOperation(input: AddOperationInput, options?: ReducerOptions) {\n return this.dispatch(addOperation(input), options);\n }\n\n public setOperationName(\n input: SetOperationNameInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationName(input), options);\n }\n\n public setOperationScope(\n input: SetOperationScopeInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationScope(input), options);\n }\n\n public setOperationSchema(\n input: SetOperationSchemaInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationSchema(input), options);\n }\n\n public setOperationDescription(\n input: SetOperationDescriptionInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationDescription(input), options);\n }\n\n public setOperationTemplate(\n input: SetOperationTemplateInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationTemplate(input), options);\n }\n\n public setOperationReducer(\n input: SetOperationReducerInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setOperationReducer(input), options);\n }\n\n public moveOperation(input: MoveOperationInput, options?: ReducerOptions) {\n return this.dispatch(moveOperation(input), options);\n }\n\n public deleteOperation(\n input: DeleteOperationInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteOperation(input), options);\n }\n\n public reorderModuleOperations(\n input: ReorderModuleOperationsInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderModuleOperations(input), options);\n }\n}\n","import { createAction } from \"../../../document/utils\";\n\nimport {\n SetStateSchemaInput,\n SetInitialStateInput,\n AddStateExampleInput,\n UpdateStateExampleInput,\n DeleteStateExampleInput,\n ReorderStateExamplesInput,\n} from \"../types\";\nimport {\n SetStateSchemaAction,\n SetInitialStateAction,\n AddStateExampleAction,\n UpdateStateExampleAction,\n DeleteStateExampleAction,\n ReorderStateExamplesAction,\n} from \"./actions\";\n\nexport const setStateSchema = (input: SetStateSchemaInput) =>\n createAction<SetStateSchemaAction>(\"SET_STATE_SCHEMA\", { ...input });\n\nexport const setInitialState = (input: SetInitialStateInput) =>\n createAction<SetInitialStateAction>(\"SET_INITIAL_STATE\", { ...input });\n\nexport const addStateExample = (input: AddStateExampleInput) =>\n createAction<AddStateExampleAction>(\"ADD_STATE_EXAMPLE\", { ...input });\n\nexport const updateStateExample = (input: UpdateStateExampleInput) =>\n createAction<UpdateStateExampleAction>(\"UPDATE_STATE_EXAMPLE\", { ...input });\n\nexport const deleteStateExample = (input: DeleteStateExampleInput) =>\n createAction<DeleteStateExampleAction>(\"DELETE_STATE_EXAMPLE\", { ...input });\n\nexport const reorderStateExamples = (input: ReorderStateExamplesInput) =>\n createAction<ReorderStateExamplesAction>(\"REORDER_STATE_EXAMPLES\", {\n ...input,\n });\n","import { BaseDocument } from \"../../../document/object\";\n\nimport {\n SetStateSchemaInput,\n SetInitialStateInput,\n AddStateExampleInput,\n UpdateStateExampleInput,\n DeleteStateExampleInput,\n ReorderStateExamplesInput,\n DocumentModelState,\n DocumentModelLocalState,\n} from \"../types\";\nimport {\n setStateSchema,\n setInitialState,\n addStateExample,\n updateStateExample,\n deleteStateExample,\n reorderStateExamples,\n} from \"./creators\";\nimport { DocumentModelAction } from \"../actions\";\nimport { ReducerOptions } from \"../../../document\";\n\nexport default class DocumentModel_State extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n public setStateSchema(input: SetStateSchemaInput, options?: ReducerOptions) {\n return this.dispatch(setStateSchema(input), options);\n }\n\n public setInitialState(\n input: SetInitialStateInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(setInitialState(input), options);\n }\n\n public addStateExample(\n input: AddStateExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(addStateExample(input), options);\n }\n\n public updateStateExample(\n input: UpdateStateExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(updateStateExample(input), options);\n }\n\n public deleteStateExample(\n input: DeleteStateExampleInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(deleteStateExample(input), options);\n }\n\n public reorderStateExamples(\n input: ReorderStateExamplesInput,\n options?: ReducerOptions,\n ) {\n return this.dispatch(reorderStateExamples(input), options);\n }\n}\n","import { DocumentModelLocalState, DocumentModelState } from \"./types\";\nimport { ExtendedState, PartialState, SignalDispatch } from \"../../document\";\nimport { applyMixins, BaseDocument } from \"../../document/object\";\nimport { DocumentModelAction } from \"./actions\";\nimport { reducer } from \"./reducer\";\nimport utils from \"./utils\";\nimport DocumentModel_Header from \"./header/object\";\nimport DocumentModel_Versioning from \"./versioning/object\";\nimport DocumentModel_Module from \"./module/object\";\nimport DocumentModel_OperationError from \"./operation-error/object\";\nimport DocumentModel_OperationExample from \"./operation-example/object\";\nimport DocumentModel_Operation from \"./operation/object\";\nimport DocumentModel_State from \"./state/object\";\n\nexport * from \"./header/object\";\nexport * from \"./versioning/object\";\nexport * from \"./module/object\";\nexport * from \"./operation-error/object\";\nexport * from \"./operation-example/object\";\nexport * from \"./operation/object\";\nexport * from \"./state/object\";\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\ninterface DocumentModel\n extends DocumentModel_Header,\n DocumentModel_Versioning,\n DocumentModel_Module,\n DocumentModel_OperationError,\n DocumentModel_OperationExample,\n DocumentModel_Operation,\n DocumentModel_State {}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nclass DocumentModel extends BaseDocument<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState\n> {\n static fileExtension = \"phdm\";\n\n constructor(\n initialState?: Partial<\n ExtendedState<\n PartialState<DocumentModelState>,\n PartialState<DocumentModelLocalState>\n >\n >,\n dispatch?: SignalDispatch,\n ) {\n super(reducer, utils.createDocument(initialState), dispatch);\n }\n\n public saveToFile(path: string, name?: string) {\n return super.saveToFile(path, DocumentModel.fileExtension, name);\n }\n\n public loadFromFile(path: string) {\n return super.loadFromFile(path);\n }\n\n static async fromFile(path: string) {\n const document = new this();\n await document.loadFromFile(path);\n return document;\n }\n}\n\napplyMixins(DocumentModel, [\n DocumentModel_Header,\n DocumentModel_Versioning,\n DocumentModel_Module,\n DocumentModel_OperationError,\n DocumentModel_OperationExample,\n DocumentModel_Operation,\n DocumentModel_State,\n]);\n\nexport { DocumentModel };\n","/**\n * This is a scaffold file meant for customization.\n * Delete the file and run the code generator again to have it reset\n */\n\nimport {\n actions as BaseActions,\n DocumentModel as _DocumentModel,\n} from \"../document\";\nimport * as customUtils from \"./custom/utils\";\nimport { actions as DocumentModelActions, DocumentModel } from \"./gen\";\nimport { documentModel } from \"./gen/document-model\";\nimport { reducer } from \"./gen/reducer\";\nimport {\n DocumentModelAction,\n DocumentModelLocalState,\n DocumentModelState,\n} from \"./gen/types\";\nimport genUtils from \"./gen/utils\";\n\nconst Document = DocumentModel;\nconst utils = { ...genUtils, ...customUtils };\nconst actions = { ...BaseActions, ...DocumentModelActions };\n\nexport const module: _DocumentModel<\n DocumentModelState,\n DocumentModelAction,\n DocumentModelLocalState,\n DocumentModel\n> = {\n Document,\n reducer,\n actions,\n utils,\n documentModel,\n};\n\nexport * from \"./custom/utils\";\nexport * from \"./gen/types\";\nexport { DocumentModel, Document, reducer, actions, utils, documentModel };\n"],"names":["reducer","exampleSorter","z.SetModelNameInputSchema","HeaderReducer","z.SetModelIdInputSchema","z.SetModelExtensionInputSchema","z.SetModelDescriptionInputSchema","z.SetAuthorNameInputSchema","z.SetAuthorWebsiteInputSchema","z.AddChangeLogItemInputSchema","VersioningReducer","z.UpdateChangeLogItemInputSchema","z.DeleteChangeLogItemInputSchema","z.ReorderChangeLogItemsInputSchema","z.AddModuleInputSchema","ModuleReducer","z.SetModuleNameInputSchema","z.SetModuleDescriptionInputSchema","z.DeleteModuleInputSchema","z.ReorderModulesInputSchema","z.AddOperationErrorInputSchema","OperationErrorReducer","z.SetOperationErrorCodeInputSchema","z.SetOperationErrorNameInputSchema","z.SetOperationErrorDescriptionInputSchema","z.SetOperationErrorTemplateInputSchema","z.DeleteOperationErrorInputSchema","z.ReorderOperationErrorsInputSchema","z.AddOperationExampleInputSchema","OperationExampleReducer","z.UpdateOperationExampleInputSchema","z.DeleteOperationExampleInputSchema","z.ReorderOperationExamplesInputSchema","z.AddOperationInputSchema","OperationReducer","z.SetOperationNameInputSchema","z.SetOperationScopeInputSchema","z.SetOperationSchemaInputSchema","z.SetOperationDescriptionInputSchema","z.SetOperationTemplateInputSchema","z.SetOperationReducerInputSchema","z.MoveOperationInputSchema","z.DeleteOperationInputSchema","z.ReorderModuleOperationsInputSchema","z.SetStateSchemaInputSchema","StateReducer","z.SetInitialStateInputSchema","z.AddStateExampleInputSchema","z.UpdateStateExampleInputSchema","z.DeleteStateExampleInputSchema","z.ReorderStateExamplesInputSchema","utils","base.createExtendedState","base.createDocument","base.saveToFile","base.saveToFileHandle","base.loadFromFile","base.loadFromInput","DocumentModel","genUtils"],"mappings":";;;;;;;;;AACA,MAAM,uBAAuB,WAAwB,2BAAA,IAAA;AACrD,MAAM,uBAAuB,WAA8B,iCAAA,IAAA;AAE3D,MAAM,2BAA2B,WAAuB,4BAAA,GAAA;AAExD,MAAM,uBAAuB;AAE7B,MAAM,sBAAsB;AAE5B,MAAM,mCAAmC;AAIlC,SAAS,MAAM,OAAO;AACzB,MAAI,SAAS,MAAM,KAAM;AACzB,WAAS,OACJ,QAAQ,sBAAsB,mBAAmB,EACjD,QAAQ,sBAAsB,mBAAmB;AACtD,WAAS,OAAO,QAAQ,sBAAsB,IAAI;AAClD,MAAI,QAAQ;AACZ,MAAI,MAAM,OAAO;AAEjB,SAAO,OAAO,OAAO,KAAK,MAAM;AAC5B;AACJ,MAAI,UAAU;AACV,WAAO,CAAE;AACb,SAAO,OAAO,OAAO,MAAM,CAAC,MAAM;AAC9B;AACJ,SAAO,OAAO,MAAM,OAAO,GAAG,EAAE,MAAM,KAAK;AAC/C;AAIO,SAAS,qBAAqB,OAAO;AACxC,QAAM,QAAQ,MAAM,KAAK;AACzB,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACnC,UAAM,OAAO,MAAM,CAAC;AACpB,UAAM,QAAQ,yBAAyB,KAAK,IAAI;AAChD,QAAI,OAAO;AACP,YAAM,SAAS,MAAM,S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