zova-module-a-openapi 5.1.58 → 5.1.59

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 (56) hide show
  1. package/dist/.metadata/index.d.ts +8 -8
  2. package/dist/.metadata/index.d.ts.map +1 -1
  3. package/dist/.metadata/this.d.ts +1 -1
  4. package/dist/bean/sys.sdk.d.ts +1 -1
  5. package/dist/config/config.d.ts +1 -1
  6. package/dist/index.d.ts +3 -3
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/index.d.ts +1 -1
  9. package/dist/lib/schema.d.ts +1 -1
  10. package/dist/model/sdk.d.ts +5 -5
  11. package/dist/types/action.d.ts +2 -2
  12. package/dist/types/detail/detail.d.ts +2 -2
  13. package/dist/types/detail/details.d.ts +2 -2
  14. package/dist/types/detail/detailsActionBulk.d.ts +1 -1
  15. package/dist/types/detail/detailsActionRow.d.ts +1 -1
  16. package/dist/types/detail/index.d.ts +4 -4
  17. package/dist/types/index.d.ts +14 -14
  18. package/dist/types/order.d.ts +1 -1
  19. package/dist/types/permissions.d.ts +5 -5
  20. package/dist/types/resource/formActionRow.d.ts +1 -1
  21. package/dist/types/resource/formLayout.d.ts +1 -1
  22. package/dist/types/resource/index.d.ts +9 -9
  23. package/dist/types/resource/tableAction.d.ts +2 -2
  24. package/dist/types/resource/tableActionBulk.d.ts +1 -1
  25. package/dist/types/resource/tableActionRow.d.ts +1 -1
  26. package/dist/types/rest.d.ts +4 -4
  27. package/dist/types/schema.d.ts +1 -1
  28. package/dist/types/sdk.d.ts +2 -2
  29. package/package.json +2 -2
  30. package/src/.metadata/index.ts +8 -8
  31. package/src/.metadata/this.ts +1 -1
  32. package/src/bean/sys.sdk.ts +2 -2
  33. package/src/config/config.ts +1 -1
  34. package/src/index.ts +3 -3
  35. package/src/lib/index.ts +1 -1
  36. package/src/lib/schema.ts +2 -2
  37. package/src/model/sdk.ts +6 -6
  38. package/src/monkey.ts +1 -1
  39. package/src/types/action.ts +2 -2
  40. package/src/types/detail/detail.ts +2 -2
  41. package/src/types/detail/details.ts +2 -2
  42. package/src/types/detail/detailsActionBulk.ts +1 -1
  43. package/src/types/detail/detailsActionRow.ts +1 -1
  44. package/src/types/detail/index.ts +4 -4
  45. package/src/types/index.ts +14 -14
  46. package/src/types/order.ts +1 -1
  47. package/src/types/permissions.ts +5 -5
  48. package/src/types/resource/formActionRow.ts +1 -1
  49. package/src/types/resource/formLayout.ts +1 -1
  50. package/src/types/resource/index.ts +9 -9
  51. package/src/types/resource/tableAction.ts +2 -2
  52. package/src/types/resource/tableActionBulk.ts +1 -1
  53. package/src/types/resource/tableActionRow.ts +1 -1
  54. package/src/types/rest.ts +4 -4
  55. package/src/types/schema.ts +1 -1
  56. package/src/types/sdk.ts +2 -2
@@ -1,6 +1,6 @@
1
1
  /** model: begin */
2
- export * from '../model/sdk.js';
3
- import { IModelOptionsSdk } from '../model/sdk.js';
2
+ export * from '../model/sdk.ts';
3
+ import { IModelOptionsSdk } from '../model/sdk.ts';
4
4
  import 'zova-module-a-model';
5
5
  declare module 'zova-module-a-model' {
6
6
  interface IModelRecord {
@@ -18,7 +18,7 @@ declare module 'zova-module-a-openapi' {
18
18
  }
19
19
  /** model: end */
20
20
  /** model: begin */
21
- import { ModelSdk } from '../model/sdk.js';
21
+ import type { ModelSdk } from '../model/sdk.ts';
22
22
  import 'zova';
23
23
  declare module 'zova' {
24
24
  interface IBeanRecordGeneral {
@@ -27,7 +27,7 @@ declare module 'zova' {
27
27
  }
28
28
  /** model: end */
29
29
  /** sys: begin */
30
- export * from '../bean/sys.sdk.js';
30
+ export * from '../bean/sys.sdk.ts';
31
31
  import 'zova';
32
32
  declare module 'zova' {
33
33
  }
@@ -41,7 +41,7 @@ declare module 'zova-module-a-openapi' {
41
41
  }
42
42
  /** sys: end */
43
43
  /** sys: begin */
44
- import { SysSdk } from '../bean/sys.sdk.js';
44
+ import type { SysSdk } from '../bean/sys.sdk.ts';
45
45
  import 'zova';
46
46
  declare module 'zova' {
47
47
  interface IBeanRecordGeneral {
@@ -50,11 +50,11 @@ declare module 'zova' {
50
50
  }
51
51
  /** sys: end */
52
52
  /** config: begin */
53
- export * from '../config/config.js';
54
- import { config } from '../config/config.js';
53
+ export * from '../config/config.ts';
54
+ import { config } from '../config/config.ts';
55
55
  /** config: end */
56
56
  /** monkey: begin */
57
- export * from '../monkey.js';
57
+ export * from '../monkey.ts';
58
58
  /** monkey: end */
59
59
  /** scope: begin */
60
60
  import { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/.metadata/index.ts"],"names":[],"mappings":"AACA,mBAAmB;AACnB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,QAAQ,qBAAqB,CAAC;IAEjC,UAAiB,YAAY;QAC3B,eAAe,EAAE,gBAAgB,CAAC;KACnC;CAGJ;AACD,OAAO,QAAQ,uBAAuB,CAAC;IAE/B,UAAiB,QAAQ;KAGxB;IAED,UAAiB,QAAQ;QACvB,IAAI,aAAa,IAAI,qBAAqB,CAAC;QAC3C,IAAI,UAAU,IAAI,eAAe,CAAC;QAClC,IAAI,aAAa,IAAI,gBAAgB,CAAC;KACvC;CACR;AACD,iBAAiB;AACjB,mBAAmB;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,kBAAkB;QACjC,qBAAqB,EAAE,QAAQ,CAAC;KACjC;CACF;AACD,iBAAiB;AACjB,iBAAiB;AACjB,cAAc,oBAAoB,CAAC;AAEnC,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;CAGrB;AACD,OAAO,QAAQ,uBAAuB,CAAC;IAE/B,UAAiB,MAAM;KA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mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC,OAAO,MAAM,CAAC,CAAC;CACvC;AAED,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,gBAAgB;QAC/B,WAAW,EAAE,mBAAmB,CAAC;KAClC;IAED,UAAiB,gBAAgB;QAC/B,WAAW,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;KACxC;CAKF;AAED,iBAAiB"}
@@ -1,3 +1,3 @@
1
1
  export declare const __ThisModule__ = "a-openapi";
2
- export { ScopeModuleAOpenapi as ScopeModule } from './index.js';
2
+ export { ScopeModuleAOpenapi as ScopeModule } from './index.ts';
3
3
  //# sourceMappingURL=this.d.ts.map
@@ -2,7 +2,7 @@ import type { SchemaObject } from 'openapi3-ts/oas31';
2
2
  import { BeanBase, ILocaleRecord } from 'zova';
3
3
  import { IApiSchemaOptions } from 'zova-module-a-api';
4
4
  import { BeanFetch } from 'zova-module-a-fetch';
5
- import { IOpenapiSdkBootstrap, IOpenapiSdkItem, TypeRequestMethod } from '../types/sdk.js';
5
+ import { IOpenapiSdkBootstrap, IOpenapiSdkItem, TypeRequestMethod } from '../types/sdk.ts';
6
6
  export declare class SysSdk extends BeanBase {
7
7
  private locale;
8
8
  bootstraps: Record<string, IOpenapiSdkBootstrap>;
@@ -1,5 +1,5 @@
1
1
  import type { ZovaSys } from 'zova';
2
- import { IFormProvider } from '../types/formProvider.js';
2
+ import { IFormProvider } from '../types/formProvider.ts';
3
3
  export declare const config: (_sys: ZovaSys) => {
4
4
  formProvider: IFormProvider;
5
5
  api: {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './.metadata/index.js';
2
- export * from './lib/index.js';
3
- export * from './types/index.js';
1
+ export * from './.metadata/index.ts';
2
+ export * from './lib/index.ts';
3
+ export * from './types/index.ts';
4
4
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_dec","_dec2","_class","__z_BeanInfo","_dec","_dec2","_class","__z_BeanInfo","__z_BeanInfo"],"sources":["../src/types/database.ts","../src/lib/schema.ts","../src/model/sdk.ts","../src/types/sdk.ts","../src/bean/sys.sdk.ts","../src/config/config.ts","../src/monkey.ts","../src/.metadata/index.ts","../src/types/rest.ts"],"sourcesContent":["export const OrderCoreBase = 100;\nexport const OrderBusinessBase = 1000;\nexport const OrderUnknownBase = 10000;\nexport const OrderMaxBase = 100000;","import jsonSchemaToZod from '@cabloy/json-schema-to-zod';\nimport { evaluateSimple } from '@cabloy/utils';\nimport { toRaw } from 'vue';\nimport { z } from 'zod';\nimport { cast, deepExtend } from 'zova';\nimport { OrderUnknownBase } from '../types/database.js';\nconst __FilterColumnsIgnore = ['columns', 'where', 'orders', 'pageNo', 'pageSize'];\nexport function loadSchemaProperties(schema, onGetSchema, schemaScene) {\n if (!schema) return;\n const properties = schema.properties;\n const result = [];\n // filter\n for (let key in properties) {\n let property = properties[key];\n if (property.$ref) {\n property = onGetSchema(property.$ref);\n }\n if (!property) continue;\n const schemaKey = key;\n const propertyRest = deepExtend({}, property.rest, schemaScene && ['form-view', 'form-create', 'filter'].includes(schemaScene) ? property.rest?.form : undefined, schemaScene ? property.rest?.[schemaScene] : undefined);\n const fieldSource = propertyRest?.fieldSource;\n if (fieldSource) {\n const parts = fieldSource.split('.');\n let propertyParent = parts[0] === schemaKey ? property : properties[parts[0]];\n if (propertyParent?.$ref) {\n propertyParent = onGetSchema(propertyParent.$ref);\n }\n property = propertyParent?.properties?.[parts[1]];\n key = fieldSource;\n }\n if (!property) continue;\n property = deepExtend({\n key\n }, property, schemaScene && ['form-view', 'form-create', 'filter'].includes(schemaScene) ? {\n rest: property.rest?.['form'] ?? {}\n } : undefined, schemaScene ? {\n rest: property.rest?.[schemaScene] ?? {}\n } : undefined);\n if (schemaKey !== key) {\n property.schemaKey = schemaKey;\n }\n const propertyExisting = result.find(item => item.key === key);\n if (propertyExisting) {\n propertyExisting.schemaKeys = [...(propertyExisting.schemaKeys ?? []), schemaKey];\n continue;\n }\n result.push(property);\n }\n // sort\n result.sort((a, b) => {\n return (a.rest?.order ?? OrderUnknownBase) - (b.rest?.order ?? OrderUnknownBase);\n });\n // ok\n return result;\n}\nexport function schemaToZodSchema(schema, onGetSchema) {\n const schemaNormalize = _normalizeSchema(toRaw(schema), onGetSchema);\n const code = jsonSchemaToZod(schemaNormalize);\n return evaluateSimple(code, {\n z\n });\n}\nfunction _normalizeSchema(schema, onGetSchema) {\n if (!schema.properties) return schema;\n const schemaNew = Object.assign({}, schema, {\n properties: {}\n });\n for (const key in schema.properties) {\n let property = schema.properties[key];\n property = _normalizePropertySchema(property, onGetSchema);\n if (!property) continue;\n // items.$ref\n if (property.items?.$ref) {\n const propertyItems = _normalizePropertySchema(property.items, onGetSchema);\n if (!propertyItems) continue;\n property = {\n ...property,\n items: propertyItems\n };\n }\n // _normalizeSchema\n schemaNew.properties[key] = property;\n }\n return schemaNew;\n}\nfunction _normalizePropertySchema(property, onGetSchema) {\n if (property?.$ref) {\n property = onGetSchema(property.$ref);\n }\n if (!property) return;\n return _normalizeSchema(property, onGetSchema);\n}\nexport function getSchemaOfRequestBody(operationObject) {\n return cast(operationObject?.requestBody)?.content?.['application/json']?.schema;\n}\nexport function getSchemaOfResponseBody(operationObject) {\n return operationObject?.responses?.['200']?.content?.['application/json']?.schema;\n}\nexport function getSchemaOfRequestQuery(operationObject) {\n const parameters = operationObject?.parameters;\n if (!parameters) return;\n const schema = {\n type: 'object',\n required: [],\n properties: {}\n };\n for (const _parameter of parameters) {\n const parameter = _parameter;\n if (parameter.in !== 'query') continue;\n const name = parameter.name;\n const fieldSchema = parameter.schema;\n schema.properties[name] = fieldSchema;\n if (parameter.required) schema.required.push(name);\n }\n return schema;\n}\nexport function getSchemaOfRequestQueryFilter(operationObject, options) {\n const parameters = operationObject?.parameters;\n if (!parameters) return;\n const schema = {\n type: 'object',\n required: [],\n properties: {}\n };\n for (const _parameter of parameters) {\n const parameter = _parameter;\n if (parameter.in !== 'query') continue;\n const name = parameter.name;\n if (__FilterColumnsIgnore.includes(name)) continue;\n const fieldSchema = parameter.schema;\n if (options?.where === true && fieldSchema.filter?.capabilities?.where !== false || options?.order === true && fieldSchema.filter?.capabilities?.order !== false) {\n schema.properties[name] = fieldSchema;\n if (parameter.required) schema.required.push(name);\n }\n }\n return schema;\n}","var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2;\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { isNil } from '@cabloy/utils';\nimport { cast, Use, usePrepareArg } from 'zova';\nimport { $QueryEnsureLoaded, BeanModelBase, Model } from 'zova-module-a-model';\nimport { getSchemaOfRequestBody, getSchemaOfRequestQuery, getSchemaOfRequestQueryFilter, getSchemaOfResponseBody, loadSchemaProperties, schemaToZodSchema } from '../lib/schema.js';\nconst __schemaRefPrefix = '#/components/schemas/';\nexport let ModelSdk = (_dec = Model({\n enableSelector: true\n}), _dec2 = __z_BeanInfo({\n module: \"a-openapi\"\n}), _dec3 = Use({\n beanFullName: 'a-openapi.sys.sdk'\n}), _dec4 = Reflect.metadata(\"design:type\", Function), _dec5 = Reflect.metadata(\"design:paramtypes\", []), _dec(_class = _dec2(_class = (_class2 = class ModelSdk extends BeanModelBase {\n constructor(...args) {\n super(...args);\n this._eventSsrHmrReload = void 0;\n }\n get $$sysSdk() {\n return usePrepareArg(this.selector, true);\n }\n async __init__(locale) {\n if (!locale) throw new Error('locale not specified');\n await super.__init__(locale);\n // event\n if (process.env.CLIENT && this.sys.config.ssr.hmr) {\n this._eventSsrHmrReload = this.sys.meta.event.on('a-ssrhmr:reload', async (_data, next) => {\n await this.$refetchQueries({\n queryKey: ['bootstrap']\n });\n await this.$refetchQueries({\n queryKey: ['sdk']\n });\n return next();\n });\n }\n }\n __dispose__() {\n if (this._eventSsrHmrReload) {\n this._eventSsrHmrReload();\n }\n }\n getBootstrap(resource) {\n return this.$useStateData({\n queryKey: ['bootstrap', resource],\n queryFn: async () => {\n const bootstrap = await this.$$sysSdk.loadBootstrap(this.$fetch, resource);\n if (!bootstrap) throw new Error('load bootstrap error');\n if (process.env.SERVER) {\n if (!this.ctx.meta.$ssr.cookieDisabledOnServer) {\n await $QueryEnsureLoaded(() => this.getPermissions(resource));\n }\n } else {\n await this.$refetchQueries({\n queryKey: ['permissions', resource]\n });\n }\n return bootstrap ?? null;\n },\n staleTime: Infinity\n });\n }\n getPermissions(resource) {\n return this.$useStateData({\n queryKey: ['permissions', resource],\n queryFn: async () => {\n const permissions = await this.$fetch.get(this.sys.util.apiActionPathTranslate(this.scope.config.api.permissions, {\n resource\n }), this.sys.util.apiActionConfigPrepare());\n return permissions ?? null;\n },\n staleTime: Infinity\n });\n }\n getSdk(api, apiMethod, apiOptions) {\n if (!api) throw new Error('should specify api');\n const [api2, apiMethod2] = this.$$sysSdk.prepareApiMeta(api, apiMethod);\n return this.$useStateData({\n queryKey: ['sdk', api2, apiMethod2],\n queryFn: async () => {\n const sdk = await this.$$sysSdk.loadSdk(this.$fetch, api, apiMethod, apiOptions);\n if (!sdk) throw new Error('load sdk error');\n for (const schemaName of sdk.schemas) {\n if (process.env.SERVER) {\n await $QueryEnsureLoaded(() => this.getSchema(schemaName));\n } else {\n await this.$refetchQueries({\n queryKey: ['schema', schemaName]\n });\n }\n }\n return sdk;\n },\n staleTime: Infinity\n });\n }\n getSchema(schemaName) {\n if (schemaName.startsWith(__schemaRefPrefix)) {\n schemaName = schemaName.substring(__schemaRefPrefix.length);\n }\n return this.$useStateData({\n queryKey: ['schema', schemaName],\n queryFn: async () => {\n const schema = this.$$sysSdk.getSchema(schemaName);\n return schema ?? null;\n },\n staleTime: Infinity\n });\n }\n getZodSchema(schemaName) {\n return this.$useStateComputed({\n queryKey: ['zodSchema', schemaName],\n queryFn: () => {\n const querySchema = this.getSchema(schemaName);\n if (!querySchema.data) return null;\n const zodSchema = this.schemaToZodSchema(querySchema.data);\n return zodSchema;\n }\n });\n }\n getSchemaDefaultValue(schemaName) {\n return this.$useStateComputed({\n queryKey: ['schemaDefaultValue', schemaName],\n queryFn: () => {\n const querySchema = this.getSchema(schemaName);\n if (!querySchema.data) return null;\n const schema = querySchema.data;\n // const schema = this.$$sysSdk.getSchema(schemaName);\n // if (!schema) return null;\n const defaultValues = {};\n for (const key in schema.properties) {\n const property = schema.properties[key];\n if (!isNil(property.default)) {\n defaultValues[key] = property.default;\n }\n }\n return defaultValues;\n }\n });\n }\n createApiSchemas(api, apiMethod, apiOptions) {\n // eslint-disable-next-line\n const self = this;\n const sdk = this.getSdk(api, apiMethod, apiOptions);\n return {\n get sdk() {\n return sdk;\n },\n get query() {\n const operationObject = sdk.data?.operationObject;\n return getSchemaOfRequestQuery(operationObject);\n },\n get filter() {\n const operationObject = sdk.data?.operationObject;\n return getSchemaOfRequestQueryFilter(operationObject, {\n where: true\n });\n },\n get order() {\n const operationObject = sdk.data?.operationObject;\n return getSchemaOfRequestQueryFilter(operationObject, {\n order: true\n });\n },\n get requestBody() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfRequestBody(operationObject);\n const schemaName = cast(schemaBody)?.$ref;\n if (schemaName) return self.getSchema(schemaName).data;\n return schemaBody;\n },\n get responseBody() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfResponseBody(operationObject);\n const schemaData = schemaBody?.properties?.data;\n const schemaName = cast(schemaData)?.$ref;\n if (schemaName) return self.getSchema(schemaName).data;\n return schemaData;\n },\n get paged() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfResponseBody(operationObject);\n if (!schemaBody) return;\n const schemaName = cast(schemaBody?.properties?.data)?.items?.$ref;\n if (schemaName) return;\n // pages\n return this.responseBody;\n },\n get row() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfResponseBody(operationObject);\n if (!schemaBody) return;\n // schemaData\n let schemaData;\n if (schemaBody?.properties?.data.$ref) {\n schemaData = self.getSchema(schemaBody?.properties?.data.$ref).data;\n } else {\n schemaData = schemaBody?.properties?.data;\n }\n // entry\n const schemaName = cast(schemaData)?.items?.$ref;\n if (schemaName) {\n return self.getSchema(schemaName).data;\n }\n // pages\n const schemaRow = cast(schemaData?.properties?.list)?.items;\n if (schemaRow?.$ref) {\n return self.getSchema(schemaRow?.$ref).data;\n }\n return schemaRow;\n }\n };\n }\n loadSchemaProperties(schema, schemaScene) {\n return loadSchemaProperties(schema, schemaName => this.getSchema(schemaName).data, schemaScene);\n }\n schemaToZodSchema(schema) {\n return schemaToZodSchema(schema, schemaName => this.getSchema(schemaName).data);\n }\n}, _applyDecoratedDescriptor(_class2.prototype, \"$$sysSdk\", [_dec3, _dec4, _dec5], Object.getOwnPropertyDescriptor(_class2.prototype, \"$$sysSdk\"), _class2.prototype), _class2)) || _class) || _class);","export const SymbolOpenapiSchemaName = '__schemaName__';","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { shallowReactive } from 'vue';\nimport { BeanBase } from 'zova';\nimport { Sys } from 'zova-module-a-bean';\nimport { SymbolOpenapiSchemaName } from '../types/sdk.js';\n\n// const PATH_PARAM_RE = /\\{([^{}/]+)\\}/g;\n\nexport let SysSdk = (_dec = Sys(), _dec2 = __z_BeanInfo({\n module: \"a-openapi\"\n}), _dec(_class = _dec2(_class = class SysSdk extends BeanBase {\n constructor(...args) {\n super(...args);\n this.locale = void 0;\n this.bootstraps = void 0;\n this.schemas = void 0;\n this.sdks = void 0;\n this._eventSsrHmrReload = void 0;\n this._fetch = void 0;\n }\n async __init__(locale) {\n this.locale = locale;\n this.bootstraps = shallowReactive({});\n this.schemas = shallowReactive({});\n this.sdks = shallowReactive({});\n // event\n if (this.sys.config.ssr.hmr) {\n this._eventSsrHmrReload = this.sys.meta.event.on('a-ssrhmr:reload', async (_data, next) => {\n await this.reload();\n return next();\n });\n }\n }\n __dispose__() {\n if (this._eventSsrHmrReload) {\n this._eventSsrHmrReload();\n }\n }\n async reload() {\n // server\n if (process.env.SERVER) {\n this.bootstraps = shallowReactive({});\n this.schemas = shallowReactive({});\n this.sdks = shallowReactive({});\n return;\n }\n // client\n // bootstraps\n const bootstraps = this.bootstraps;\n this.bootstraps = shallowReactive({});\n for (const resource in bootstraps) {\n await this.loadBootstrap(this._fetch, resource);\n }\n // sdks\n const sdks = this.sdks;\n this.sdks = shallowReactive({});\n for (const api in sdks) {\n for (const apiMethod in sdks[api]) {\n await this.loadSdk(this._fetch, api, apiMethod, {\n authToken: false\n });\n }\n }\n }\n getBootstrap(resource) {\n return this.bootstraps[resource];\n }\n getSdk(api, apiMethod) {\n if (!api) return;\n const [api2, apiMethod2] = this.prepareApiMeta(api, apiMethod);\n return this.sdks[api2]?.[apiMethod2];\n }\n getSchema(schemaName) {\n return this.schemas[schemaName];\n }\n async loadBootstrap($fetch, resource) {\n if (process.env.CLIENT) {\n this._fetch = $fetch;\n }\n if (!this.bootstraps[resource]) {\n this.bootstraps[resource] = await $fetch.get(this.sys.util.apiActionPathTranslate(this.scope.config.api.bootstrap, {\n resource\n }), this.sys.util.apiActionConfigPrepare(undefined, undefined, false));\n }\n return this.bootstraps[resource];\n }\n async loadSdk($fetch, api, apiMethod, apiOptions) {\n if (process.env.CLIENT) {\n this._fetch = $fetch;\n }\n if (!api) return;\n const [api2, apiMethod2] = this.prepareApiMeta(api, apiMethod);\n if (this.sdks[api2]?.[apiMethod2]) return this.sdks[api2][apiMethod2];\n // params\n const params = [this.sys.util.apiActionPathTranslate(api2)];\n // body\n if (!['get', 'delete'].includes(apiMethod2)) {\n params.push(undefined);\n }\n // options\n const options = {\n authToken: apiOptions?.authToken,\n openapiSchema: true,\n headers: {}\n };\n const localeKey = this.sys.env.APP_LOCALE_HEADER_KEY;\n if (localeKey) {\n options.headers[localeKey] = this.locale;\n }\n params.push(this.sys.util.apiActionConfigPrepare(undefined, options));\n const data = await $fetch[apiMethod2](...params);\n // schemas\n const schemaNames = [];\n const schemas = data.doc.components?.schemas;\n if (schemas) {\n for (const key in schemas) {\n const schema = schemas[key];\n if (!schema[SymbolOpenapiSchemaName]) {\n schema[SymbolOpenapiSchemaName] = key;\n }\n this.schemas[key] = schema;\n schemaNames.push(key);\n }\n }\n // paths\n const paths = data.doc.paths;\n if (paths) {\n for (const key in paths) {\n // const path = key.replace(PATH_PARAM_RE, ':$1');\n if (!this.sdks[api2]) this.sdks[api2] = shallowReactive({});\n for (const method in paths[key]) {\n this.sdks[api2][method] = {\n schemas: schemaNames,\n operationObject: paths[key][method],\n meta: data.meta\n };\n }\n }\n }\n // ok\n return this.sdks[api2][apiMethod2];\n }\n prepareApiMeta(api, apiMethod) {\n return [api, apiMethod ?? 'get'];\n }\n}) || _class) || _class);","export const config = _sys => {\n return {\n formProvider: {},\n api: {\n bootstrap: '/api/openapischema/resource/bootstrap/:resource',\n permissions: '/api/home/base/permission/:resource'\n }\n };\n};","import { ref, watch } from 'vue';\nimport { BeanSimple } from 'zova';\nexport class Monkey extends BeanSimple {\n constructor(...args) {\n super(...args);\n this._modelSdk = ref();\n this._sdkGeneration = 0;\n }\n async beanInit(bean, beanInstance) {\n const self = this;\n // $sdk\n bean.defineProperty(beanInstance, '$sdk', {\n enumerable: false,\n configurable: true,\n get() {\n return self._modelSdk;\n }\n });\n }\n async appInitialize() {\n await this._loadSdk();\n this.ctx.util.instanceScope(() => {\n watch(() => {\n return this.app.meta.locale.current;\n }, async () => {\n await this._loadSdk();\n });\n });\n }\n async _loadSdk() {\n const generation = ++this._sdkGeneration;\n const locale = this.app.meta.locale.current;\n const sdk = await this.app.bean._getBeanSelector('a-openapi.model.sdk', true, locale);\n if (generation === this._sdkGeneration && locale === this.app.meta.locale.current) {\n this._modelSdk.value = sdk;\n }\n }\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/sdk.js';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\nimport { ModelSdk } from '../model/sdk.js';\nimport 'zova';\n/** model: end */\n/** sys: begin */\nexport * from '../bean/sys.sdk.js';\nimport 'zova';\n/** sys: end */\n/** sys: begin */\nimport { SysSdk } from '../bean/sys.sdk.js';\nimport 'zova';\n/** sys: end */\n/** config: begin */\nexport * from '../config/config.js';\n/** config: end */\n/** monkey: begin */\nexport * from '../monkey.js';\n/** monkey: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAOpenapi = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-openapi\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAOpenapi extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */","import 'openapi3-ts/oas30';\nimport 'openapi3-ts/oas31';\nexport const renderFormFieldTopPropsSystem = ['draft', 'order', 'table', 'form', 'form-view', 'form-create', 'filter'];\nexport const renderTableColumnTopPropsSystem = ['order', 'table', 'form', 'form-view', 'form-create', 'filter'];\n\n// | 'text'\n// | 'captcha'\n// | 'currency'\n// | 'date'\n// | 'dateRange'\n// | 'toggle'\n// | 'select'\n// | 'textarea'\n// | 'resourcePicker';\n// | 'checkbox';\n// | 'radio'\n// | 'switch';\n// | 'image'\n// | 'file'\n// | 'color'\n// | 'password'\n// | 'email'\n// | 'url';\n\n// form\n\n// should use input for config.ts of a-openapi\n\n// | 'input'\n// | 'textarea'\n// | 'select';\n\n// table"],"mappings":";;;;;;;;;;AAAA,IAAa,gBAA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AAM,cAAc;EACjC,MAAM,OAAO;EAEb,KAAK,eAAe,cAAc,QAAQ;GACxC,YAAY;GACZ,cAAc;GACd,MAAM;IACJ,OAAO,KAAK;GACd;EACF,CAAC;CACH;CACA,MAAM,gBAAgB;EACpB,MAAM,KAAK,SAAS;EACpB,KAAK,IAAI,KAAK,oBAAoB;GAChC,YAAY;IACV,OAAO,KAAK,IAAI,KAAK,OAAO;GAC9B,GAAG,YAAY;IACb,MAAM,KAAK,SAAS;GACtB,CAAC;EACH,CAAC;CACH;CACA,MAAM,WAAW;EACf,MAAM,aAAa,EAAE,KAAK;EAC1B,MAAM,SAAS,KAAK,IAAI,KAAK,OAAO;EACpC,MAAM,MAAM,MAAM,KAAK,IAAI,KAAK,iBAAiB,uBAAuB,MAAM,MAAM;EACpF,IAAI,eAAe,KAAK,kBAAkB,WAAW,KAAK,IAAI,KAAK,OAAO,SACxE,KAAK,UAAU,QAAQ;CAE3B;AACF;;;ACrCA,IAAI;AAAM,IAAA;AAAO,IAAA;AA4BjB,IAAW,uBAAuB,OAAO,MAAM,GAAG,QAAQE,SAAa,EACrE,QAAQ,YACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,4BAA4B,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK;;;;AC5BnG,IAAa,gCAAgC;CAAC;CAAS;CAAS;CAAS;CAAQ;CAAa;CAAe;AAAQ;AACrH,IAAa,kCAAkC;CAAC;CAAS;CAAS;CAAQ;CAAa;CAAe;AAAQ"}
1
+ {"version":3,"file":"index.js","names":["_dec","_dec2","_class","__z_BeanInfo","_dec","_dec2","_class","__z_BeanInfo","__z_BeanInfo"],"sources":["../src/types/database.ts","../src/lib/schema.ts","../src/model/sdk.ts","../src/types/sdk.ts","../src/bean/sys.sdk.ts","../src/config/config.ts","../src/monkey.ts","../src/.metadata/index.ts","../src/types/rest.ts"],"sourcesContent":["export const OrderCoreBase = 100;\nexport const OrderBusinessBase = 1000;\nexport const OrderUnknownBase = 10000;\nexport const OrderMaxBase = 100000;","import jsonSchemaToZod from '@cabloy/json-schema-to-zod';\nimport { evaluateSimple } from '@cabloy/utils';\nimport { toRaw } from 'vue';\nimport { z } from 'zod';\nimport { cast, deepExtend } from 'zova';\nimport { OrderUnknownBase } from '../types/database.ts';\nconst __FilterColumnsIgnore = ['columns', 'where', 'orders', 'pageNo', 'pageSize'];\nexport function loadSchemaProperties(schema, onGetSchema, schemaScene) {\n if (!schema) return;\n const properties = schema.properties;\n const result = [];\n // filter\n for (let key in properties) {\n let property = properties[key];\n if (property.$ref) {\n property = onGetSchema(property.$ref);\n }\n if (!property) continue;\n const schemaKey = key;\n const propertyRest = deepExtend({}, property.rest, schemaScene && ['form-view', 'form-create', 'filter'].includes(schemaScene) ? property.rest?.form : undefined, schemaScene ? property.rest?.[schemaScene] : undefined);\n const fieldSource = propertyRest?.fieldSource;\n if (fieldSource) {\n const parts = fieldSource.split('.');\n let propertyParent = parts[0] === schemaKey ? property : properties[parts[0]];\n if (propertyParent?.$ref) {\n propertyParent = onGetSchema(propertyParent.$ref);\n }\n property = propertyParent?.properties?.[parts[1]];\n key = fieldSource;\n }\n if (!property) continue;\n property = deepExtend({\n key\n }, property, schemaScene && ['form-view', 'form-create', 'filter'].includes(schemaScene) ? {\n rest: property.rest?.['form'] ?? {}\n } : undefined, schemaScene ? {\n rest: property.rest?.[schemaScene] ?? {}\n } : undefined);\n if (schemaKey !== key) {\n property.schemaKey = schemaKey;\n }\n const propertyExisting = result.find(item => item.key === key);\n if (propertyExisting) {\n propertyExisting.schemaKeys = [...(propertyExisting.schemaKeys ?? []), schemaKey];\n continue;\n }\n result.push(property);\n }\n // sort\n result.sort((a, b) => {\n return (a.rest?.order ?? OrderUnknownBase) - (b.rest?.order ?? OrderUnknownBase);\n });\n // ok\n return result;\n}\nexport function schemaToZodSchema(schema, onGetSchema) {\n const schemaNormalize = _normalizeSchema(toRaw(schema), onGetSchema);\n const code = jsonSchemaToZod(schemaNormalize);\n return evaluateSimple(code, {\n z\n });\n}\nfunction _normalizeSchema(schema, onGetSchema) {\n if (!schema.properties) return schema;\n const schemaNew = Object.assign({}, schema, {\n properties: {}\n });\n for (const key in schema.properties) {\n let property = schema.properties[key];\n property = _normalizePropertySchema(property, onGetSchema);\n if (!property) continue;\n // items.$ref\n if (property.items?.$ref) {\n const propertyItems = _normalizePropertySchema(property.items, onGetSchema);\n if (!propertyItems) continue;\n property = {\n ...property,\n items: propertyItems\n };\n }\n // _normalizeSchema\n schemaNew.properties[key] = property;\n }\n return schemaNew;\n}\nfunction _normalizePropertySchema(property, onGetSchema) {\n if (property?.$ref) {\n property = onGetSchema(property.$ref);\n }\n if (!property) return;\n return _normalizeSchema(property, onGetSchema);\n}\nexport function getSchemaOfRequestBody(operationObject) {\n return cast(operationObject?.requestBody)?.content?.['application/json']?.schema;\n}\nexport function getSchemaOfResponseBody(operationObject) {\n return operationObject?.responses?.['200']?.content?.['application/json']?.schema;\n}\nexport function getSchemaOfRequestQuery(operationObject) {\n const parameters = operationObject?.parameters;\n if (!parameters) return;\n const schema = {\n type: 'object',\n required: [],\n properties: {}\n };\n for (const _parameter of parameters) {\n const parameter = _parameter;\n if (parameter.in !== 'query') continue;\n const name = parameter.name;\n const fieldSchema = parameter.schema;\n schema.properties[name] = fieldSchema;\n if (parameter.required) schema.required.push(name);\n }\n return schema;\n}\nexport function getSchemaOfRequestQueryFilter(operationObject, options) {\n const parameters = operationObject?.parameters;\n if (!parameters) return;\n const schema = {\n type: 'object',\n required: [],\n properties: {}\n };\n for (const _parameter of parameters) {\n const parameter = _parameter;\n if (parameter.in !== 'query') continue;\n const name = parameter.name;\n if (__FilterColumnsIgnore.includes(name)) continue;\n const fieldSchema = parameter.schema;\n if (options?.where === true && fieldSchema.filter?.capabilities?.where !== false || options?.order === true && fieldSchema.filter?.capabilities?.order !== false) {\n schema.properties[name] = fieldSchema;\n if (parameter.required) schema.required.push(name);\n }\n }\n return schema;\n}","var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2;\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { isNil } from '@cabloy/utils';\nimport { cast, Use, usePrepareArg } from 'zova';\nimport { $QueryEnsureLoaded, BeanModelBase, Model } from 'zova-module-a-model';\nimport { getSchemaOfRequestBody, getSchemaOfRequestQuery, getSchemaOfRequestQueryFilter, getSchemaOfResponseBody, loadSchemaProperties, schemaToZodSchema } from '../lib/schema.ts';\nconst __schemaRefPrefix = '#/components/schemas/';\nexport let ModelSdk = (_dec = Model({\n enableSelector: true\n}), _dec2 = __z_BeanInfo({\n module: \"a-openapi\"\n}), _dec3 = Use({\n beanFullName: 'a-openapi.sys.sdk'\n}), _dec4 = Reflect.metadata(\"design:type\", Function), _dec5 = Reflect.metadata(\"design:paramtypes\", []), _dec(_class = _dec2(_class = (_class2 = class ModelSdk extends BeanModelBase {\n constructor(...args) {\n super(...args);\n this._eventSsrHmrReload = void 0;\n }\n get $$sysSdk() {\n return usePrepareArg(this.selector, true);\n }\n async __init__(locale) {\n if (!locale) throw new Error('locale not specified');\n await super.__init__(locale);\n // event\n if (process.env.CLIENT && this.sys.config.ssr.hmr) {\n this._eventSsrHmrReload = this.sys.meta.event.on('a-ssrhmr:reload', async (_data, next) => {\n await this.$refetchQueries({\n queryKey: ['bootstrap']\n });\n await this.$refetchQueries({\n queryKey: ['sdk']\n });\n return next();\n });\n }\n }\n __dispose__() {\n if (this._eventSsrHmrReload) {\n this._eventSsrHmrReload();\n }\n }\n getBootstrap(resource) {\n return this.$useStateData({\n queryKey: ['bootstrap', resource],\n queryFn: async () => {\n const bootstrap = await this.$$sysSdk.loadBootstrap(this.$fetch, resource);\n if (!bootstrap) throw new Error('load bootstrap error');\n if (process.env.SERVER) {\n if (!this.ctx.meta.$ssr.cookieDisabledOnServer) {\n await $QueryEnsureLoaded(() => this.getPermissions(resource));\n }\n } else {\n await this.$refetchQueries({\n queryKey: ['permissions', resource]\n });\n }\n return bootstrap ?? null;\n },\n staleTime: Infinity\n });\n }\n getPermissions(resource) {\n return this.$useStateData({\n queryKey: ['permissions', resource],\n queryFn: async () => {\n const permissions = await this.$fetch.get(this.sys.util.apiActionPathTranslate(this.scope.config.api.permissions, {\n resource\n }), this.sys.util.apiActionConfigPrepare());\n return permissions ?? null;\n },\n staleTime: Infinity\n });\n }\n getSdk(api, apiMethod, apiOptions) {\n if (!api) throw new Error('should specify api');\n const [api2, apiMethod2] = this.$$sysSdk.prepareApiMeta(api, apiMethod);\n return this.$useStateData({\n queryKey: ['sdk', api2, apiMethod2],\n queryFn: async () => {\n const sdk = await this.$$sysSdk.loadSdk(this.$fetch, api, apiMethod, apiOptions);\n if (!sdk) throw new Error('load sdk error');\n for (const schemaName of sdk.schemas) {\n if (process.env.SERVER) {\n await $QueryEnsureLoaded(() => this.getSchema(schemaName));\n } else {\n await this.$refetchQueries({\n queryKey: ['schema', schemaName]\n });\n }\n }\n return sdk;\n },\n staleTime: Infinity\n });\n }\n getSchema(schemaName) {\n if (schemaName.startsWith(__schemaRefPrefix)) {\n schemaName = schemaName.substring(__schemaRefPrefix.length);\n }\n return this.$useStateData({\n queryKey: ['schema', schemaName],\n queryFn: async () => {\n const schema = this.$$sysSdk.getSchema(schemaName);\n return schema ?? null;\n },\n staleTime: Infinity\n });\n }\n getZodSchema(schemaName) {\n return this.$useStateComputed({\n queryKey: ['zodSchema', schemaName],\n queryFn: () => {\n const querySchema = this.getSchema(schemaName);\n if (!querySchema.data) return null;\n const zodSchema = this.schemaToZodSchema(querySchema.data);\n return zodSchema;\n }\n });\n }\n getSchemaDefaultValue(schemaName) {\n return this.$useStateComputed({\n queryKey: ['schemaDefaultValue', schemaName],\n queryFn: () => {\n const querySchema = this.getSchema(schemaName);\n if (!querySchema.data) return null;\n const schema = querySchema.data;\n // const schema = this.$$sysSdk.getSchema(schemaName);\n // if (!schema) return null;\n const defaultValues = {};\n for (const key in schema.properties) {\n const property = schema.properties[key];\n if (!isNil(property.default)) {\n defaultValues[key] = property.default;\n }\n }\n return defaultValues;\n }\n });\n }\n createApiSchemas(api, apiMethod, apiOptions) {\n // eslint-disable-next-line\n const self = this;\n const sdk = this.getSdk(api, apiMethod, apiOptions);\n return {\n get sdk() {\n return sdk;\n },\n get query() {\n const operationObject = sdk.data?.operationObject;\n return getSchemaOfRequestQuery(operationObject);\n },\n get filter() {\n const operationObject = sdk.data?.operationObject;\n return getSchemaOfRequestQueryFilter(operationObject, {\n where: true\n });\n },\n get order() {\n const operationObject = sdk.data?.operationObject;\n return getSchemaOfRequestQueryFilter(operationObject, {\n order: true\n });\n },\n get requestBody() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfRequestBody(operationObject);\n const schemaName = cast(schemaBody)?.$ref;\n if (schemaName) return self.getSchema(schemaName).data;\n return schemaBody;\n },\n get responseBody() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfResponseBody(operationObject);\n const schemaData = schemaBody?.properties?.data;\n const schemaName = cast(schemaData)?.$ref;\n if (schemaName) return self.getSchema(schemaName).data;\n return schemaData;\n },\n get paged() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfResponseBody(operationObject);\n if (!schemaBody) return;\n const schemaName = cast(schemaBody?.properties?.data)?.items?.$ref;\n if (schemaName) return;\n // pages\n return this.responseBody;\n },\n get row() {\n const operationObject = sdk.data?.operationObject;\n const schemaBody = getSchemaOfResponseBody(operationObject);\n if (!schemaBody) return;\n // schemaData\n let schemaData;\n if (schemaBody?.properties?.data.$ref) {\n schemaData = self.getSchema(schemaBody?.properties?.data.$ref).data;\n } else {\n schemaData = schemaBody?.properties?.data;\n }\n // entry\n const schemaName = cast(schemaData)?.items?.$ref;\n if (schemaName) {\n return self.getSchema(schemaName).data;\n }\n // pages\n const schemaRow = cast(schemaData?.properties?.list)?.items;\n if (schemaRow?.$ref) {\n return self.getSchema(schemaRow?.$ref).data;\n }\n return schemaRow;\n }\n };\n }\n loadSchemaProperties(schema, schemaScene) {\n return loadSchemaProperties(schema, schemaName => this.getSchema(schemaName).data, schemaScene);\n }\n schemaToZodSchema(schema) {\n return schemaToZodSchema(schema, schemaName => this.getSchema(schemaName).data);\n }\n}, _applyDecoratedDescriptor(_class2.prototype, \"$$sysSdk\", [_dec3, _dec4, _dec5], Object.getOwnPropertyDescriptor(_class2.prototype, \"$$sysSdk\"), _class2.prototype), _class2)) || _class) || _class);","export const SymbolOpenapiSchemaName = '__schemaName__';","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { shallowReactive } from 'vue';\nimport { BeanBase } from 'zova';\nimport { Sys } from 'zova-module-a-bean';\nimport { SymbolOpenapiSchemaName } from '../types/sdk.ts';\n\n// const PATH_PARAM_RE = /\\{([^{}/]+)\\}/g;\n\nexport let SysSdk = (_dec = Sys(), _dec2 = __z_BeanInfo({\n module: \"a-openapi\"\n}), _dec(_class = _dec2(_class = class SysSdk extends BeanBase {\n constructor(...args) {\n super(...args);\n this.locale = void 0;\n this.bootstraps = void 0;\n this.schemas = void 0;\n this.sdks = void 0;\n this._eventSsrHmrReload = void 0;\n this._fetch = void 0;\n }\n async __init__(locale) {\n this.locale = locale;\n this.bootstraps = shallowReactive({});\n this.schemas = shallowReactive({});\n this.sdks = shallowReactive({});\n // event\n if (this.sys.config.ssr.hmr) {\n this._eventSsrHmrReload = this.sys.meta.event.on('a-ssrhmr:reload', async (_data, next) => {\n await this.reload();\n return next();\n });\n }\n }\n __dispose__() {\n if (this._eventSsrHmrReload) {\n this._eventSsrHmrReload();\n }\n }\n async reload() {\n // server\n if (process.env.SERVER) {\n this.bootstraps = shallowReactive({});\n this.schemas = shallowReactive({});\n this.sdks = shallowReactive({});\n return;\n }\n // client\n // bootstraps\n const bootstraps = this.bootstraps;\n this.bootstraps = shallowReactive({});\n for (const resource in bootstraps) {\n await this.loadBootstrap(this._fetch, resource);\n }\n // sdks\n const sdks = this.sdks;\n this.sdks = shallowReactive({});\n for (const api in sdks) {\n for (const apiMethod in sdks[api]) {\n await this.loadSdk(this._fetch, api, apiMethod, {\n authToken: false\n });\n }\n }\n }\n getBootstrap(resource) {\n return this.bootstraps[resource];\n }\n getSdk(api, apiMethod) {\n if (!api) return;\n const [api2, apiMethod2] = this.prepareApiMeta(api, apiMethod);\n return this.sdks[api2]?.[apiMethod2];\n }\n getSchema(schemaName) {\n return this.schemas[schemaName];\n }\n async loadBootstrap($fetch, resource) {\n if (process.env.CLIENT) {\n this._fetch = $fetch;\n }\n if (!this.bootstraps[resource]) {\n this.bootstraps[resource] = await $fetch.get(this.sys.util.apiActionPathTranslate(this.scope.config.api.bootstrap, {\n resource\n }), this.sys.util.apiActionConfigPrepare(undefined, undefined, false));\n }\n return this.bootstraps[resource];\n }\n async loadSdk($fetch, api, apiMethod, apiOptions) {\n if (process.env.CLIENT) {\n this._fetch = $fetch;\n }\n if (!api) return;\n const [api2, apiMethod2] = this.prepareApiMeta(api, apiMethod);\n if (this.sdks[api2]?.[apiMethod2]) return this.sdks[api2][apiMethod2];\n // params\n const params = [this.sys.util.apiActionPathTranslate(api2)];\n // body\n if (!['get', 'delete'].includes(apiMethod2)) {\n params.push(undefined);\n }\n // options\n const options = {\n authToken: apiOptions?.authToken,\n openapiSchema: true,\n headers: {}\n };\n const localeKey = this.sys.env.APP_LOCALE_HEADER_KEY;\n if (localeKey) {\n options.headers[localeKey] = this.locale;\n }\n params.push(this.sys.util.apiActionConfigPrepare(undefined, options));\n const data = await $fetch[apiMethod2](...params);\n // schemas\n const schemaNames = [];\n const schemas = data.doc.components?.schemas;\n if (schemas) {\n for (const key in schemas) {\n const schema = schemas[key];\n if (!schema[SymbolOpenapiSchemaName]) {\n schema[SymbolOpenapiSchemaName] = key;\n }\n this.schemas[key] = schema;\n schemaNames.push(key);\n }\n }\n // paths\n const paths = data.doc.paths;\n if (paths) {\n for (const key in paths) {\n // const path = key.replace(PATH_PARAM_RE, ':$1');\n if (!this.sdks[api2]) this.sdks[api2] = shallowReactive({});\n for (const method in paths[key]) {\n this.sdks[api2][method] = {\n schemas: schemaNames,\n operationObject: paths[key][method],\n meta: data.meta\n };\n }\n }\n }\n // ok\n return this.sdks[api2][apiMethod2];\n }\n prepareApiMeta(api, apiMethod) {\n return [api, apiMethod ?? 'get'];\n }\n}) || _class) || _class);","export const config = _sys => {\n return {\n formProvider: {},\n api: {\n bootstrap: '/api/openapischema/resource/bootstrap/:resource',\n permissions: '/api/home/base/permission/:resource'\n }\n };\n};","import { ref, watch } from 'vue';\nimport { BeanSimple } from 'zova';\nexport class Monkey extends BeanSimple {\n constructor(...args) {\n super(...args);\n this._modelSdk = ref();\n this._sdkGeneration = 0;\n }\n async beanInit(bean, beanInstance) {\n const self = this;\n // $sdk\n bean.defineProperty(beanInstance, '$sdk', {\n enumerable: false,\n configurable: true,\n get() {\n return self._modelSdk;\n }\n });\n }\n async appInitialize() {\n await this._loadSdk();\n this.ctx.util.instanceScope(() => {\n watch(() => {\n return this.app.meta.locale.current;\n }, async () => {\n await this._loadSdk();\n });\n });\n }\n async _loadSdk() {\n const generation = ++this._sdkGeneration;\n const locale = this.app.meta.locale.current;\n const sdk = await this.app.bean._getBeanSelector('a-openapi.model.sdk', true, locale);\n if (generation === this._sdkGeneration && locale === this.app.meta.locale.current) {\n this._modelSdk.value = sdk;\n }\n }\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/sdk.ts';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\n\nimport 'zova';\n/** model: end */\n/** sys: begin */\nexport * from '../bean/sys.sdk.ts';\nimport 'zova';\n/** sys: end */\n/** sys: begin */\n\nimport 'zova';\n/** sys: end */\n/** config: begin */\nexport * from '../config/config.ts';\n/** config: end */\n/** monkey: begin */\nexport * from '../monkey.ts';\n/** monkey: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAOpenapi = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-openapi\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAOpenapi extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */","import 'openapi3-ts/oas30';\nimport 'openapi3-ts/oas31';\nexport const renderFormFieldTopPropsSystem = ['draft', 'order', 'table', 'form', 'form-view', 'form-create', 'filter'];\nexport const renderTableColumnTopPropsSystem = ['order', 'table', 'form', 'form-view', 'form-create', 'filter'];\n\n// | 'text'\n// | 'captcha'\n// | 'currency'\n// | 'date'\n// | 'dateRange'\n// | 'toggle'\n// | 'select'\n// | 'textarea'\n// | 'resourcePicker';\n// | 'checkbox';\n// | 'radio'\n// | 'switch';\n// | 'image'\n// | 'file'\n// | 'color'\n// | 'password'\n// | 'email'\n// | 'url';\n\n// form\n\n// should use input for config.ts of a-openapi\n\n// | 'input'\n// | 'textarea'\n// | 'select';\n\n// table"],"mappings":";;;;;;;;;;AAAA,IAAa,gBAAgB;AAC7B,IAAa,oBAAoB;AACjC,IAAa,mBAAmB;AAChC,IAAa,eAAe;;;ACG5B,IAAM,wBAAwB;CAAC;CAAW;CAAS;CAAU;CAAU;AAAU;AACjF,SAAgB,qBAAqB,QAAQ,aAAa,aAAa;CACrE,IAAI,CAAC,QAAQ;CACb,MAAM,aAAa,OAAO;CAC1B,MAAM,SAAS,CAAC;CAEhB,KAAK,IAAI,OAAO,YAAY;EAC1B,IAAI,WAAW,WAAW;EAC1B,IAAI,SAAS,MACX,WAAW,YAAY,SAAS,IAAI;EAEtC,IAAI,CAA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EAAE,KAAK;EAC1B,MAAM,SAAS,KAAK,IAAI,KAAK,OAAO;EACpC,MAAM,MAAM,MAAM,KAAK,IAAI,KAAK,iBAAiB,uBAAuB,MAAM,MAAM;EACpF,IAAI,eAAe,KAAK,kBAAkB,WAAW,KAAK,IAAI,KAAK,OAAO,SACxE,KAAK,UAAU,QAAQ;CAE3B;AACF;;;ACrCA,IAAI;AAAM,IAAA;AAAO,IAAA;AA4BjB,IAAW,uBAAuB,OAAO,MAAM,GAAG,QAAQE,SAAa,EACrE,QAAQ,YACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,4BAA4B,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK;;;;AC5BnG,IAAa,gCAAgC;CAAC;CAAS;CAAS;CAAS;CAAQ;CAAa;CAAe;AAAQ;AACrH,IAAa,kCAAkC;CAAC;CAAS;CAAS;CAAQ;CAAa;CAAe;AAAQ"}
@@ -1,2 +1,2 @@
1
- export * from './schema.js';
1
+ export * from './schema.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { OperationObject, SchemaObject } from 'openapi3-ts/oas31';
2
2
  import { z } from 'zod';
3
- import type { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.js';
3
+ import type { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.ts';
4
4
  export declare function loadSchemaProperties(schema: SchemaObject | undefined, onGetSchema: (schemaName: string) => SchemaObject | undefined, schemaScene?: TypeSchemaScene): ISchemaObjectExtensionField[] | undefined;
5
5
  export declare function schemaToZodSchema<T extends z.ZodType = z.ZodType>(schema: SchemaObject, onGetSchema: (schemaName: string) => SchemaObject | undefined): T;
6
6
  export declare function getSchemaOfRequestBody(operationObject?: OperationObject): SchemaObject | undefined;
@@ -3,11 +3,11 @@ import z from 'zod';
3
3
  import { ILocaleRecord } from 'zova';
4
4
  import { IApiSchemaOptions } from 'zova-module-a-api';
5
5
  import { BeanModelBase, IDecoratorModelOptions } from 'zova-module-a-model';
6
- import { SysSdk } from '../bean/sys.sdk.js';
7
- import { TypeOpenapiPermissions } from '../types/permissions.js';
8
- import { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.js';
9
- import { IOpenapiSchemas, TypeOpenapiSchemasSdk } from '../types/schema.js';
10
- import { TypeRequestMethod } from '../types/sdk.js';
6
+ import { SysSdk } from '../bean/sys.sdk.ts';
7
+ import { TypeOpenapiPermissions } from '../types/permissions.ts';
8
+ import { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.ts';
9
+ import { IOpenapiSchemas, TypeOpenapiSchemasSdk } from '../types/schema.ts';
10
+ import { TypeRequestMethod } from '../types/sdk.ts';
11
11
  export interface IModelOptionsSdk extends IDecoratorModelOptions {
12
12
  }
13
13
  export declare class ModelSdk extends BeanModelBase {
@@ -1,8 +1,8 @@
1
1
  import type { BeanBase, ZovaApplication, ZovaContext } from 'zova';
2
2
  import type { ZovaJsx } from 'zova-jsx';
3
3
  import { TableIdentity } from 'table-identity';
4
- import type { IResourceTableSelectionPayload } from './resource/tableActionBulk.js';
5
- import { TypeOpenapiPermissions } from './permissions.js';
4
+ import type { IResourceTableSelectionPayload } from './resource/tableActionBulk.ts';
5
+ import { TypeOpenapiPermissions } from './permissions.ts';
6
6
  export interface IJsxRenderContextBase {
7
7
  app: ZovaApplication;
8
8
  ctx: ZovaContext;
@@ -1,5 +1,5 @@
1
- import { IJsxRenderContextBase } from '../action.js';
2
- import { IFormMeta } from '../formMeta.js';
1
+ import { IJsxRenderContextBase } from '../action.ts';
2
+ import { IFormMeta } from '../formMeta.ts';
3
3
  export interface IDetailScope {
4
4
  formMeta?: IFormMeta;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { IJsxRenderContextBase } from '../action.js';
2
- import { IFormMeta } from '../formMeta.js';
1
+ import { IJsxRenderContextBase } from '../action.ts';
2
+ import { IFormMeta } from '../formMeta.ts';
3
3
  export interface IDetailsScope {
4
4
  formMeta?: IFormMeta;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { types } from 'typestyle';
2
2
  import { TypeRenderComponentJsx } from 'zova-jsx';
3
- import type { IPermissionHintDetailsActionBulk } from '../permissions.js';
3
+ import type { IPermissionHintDetailsActionBulk } from '../permissions.ts';
4
4
  export type IResourceDetailsActionBulkNameRecord = {
5
5
  [KEY in keyof IResourceDetailsActionBulkRecord as KEY extends `${string}:action${infer Name}` ? Uncapitalize<Name> : KEY]: IResourceDetailsActionBulkRecord[KEY];
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { types } from 'typestyle';
2
2
  import { TypeRenderComponentJsx } from 'zova-jsx';
3
- import type { IPermissionHintDetailsActionRow } from '../permissions.js';
3
+ import type { IPermissionHintDetailsActionRow } from '../permissions.ts';
4
4
  export type IResourceDetailsActionRowNameRecord = {
5
5
  [KEY in keyof IResourceDetailsActionRowRecord as KEY extends `${string}:action${infer Name}` ? Uncapitalize<Name> : KEY]: IResourceDetailsActionRowRecord[KEY];
6
6
  };
@@ -1,5 +1,5 @@
1
- export * from './details.js';
2
- export * from './detailsActionBulk.js';
3
- export * from './detailsActionRow.js';
4
- export * from './detail.js';
1
+ export * from './details.ts';
2
+ export * from './detailsActionBulk.ts';
3
+ export * from './detailsActionRow.ts';
4
+ export * from './detail.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,15 @@
1
- export * from './action.js';
2
- export * from './captcha.js';
3
- export * from './image.js';
4
- export * from './database.js';
5
- export * from './formMeta.js';
6
- export * from './formProvider.js';
7
- export * from './order.js';
8
- export * from './permissions.js';
9
- export * from './resource/index.js';
10
- export * from './rest.js';
11
- export * from './schema.js';
12
- export * from './sdk.js';
13
- export * from './table.js';
14
- export * from './detail/index.js';
1
+ export * from './action.ts';
2
+ export * from './captcha.ts';
3
+ export * from './image.ts';
4
+ export * from './database.ts';
5
+ export * from './formMeta.ts';
6
+ export * from './formProvider.ts';
7
+ export * from './order.ts';
8
+ export * from './permissions.ts';
9
+ export * from './resource/index.ts';
10
+ export * from './rest.ts';
11
+ export * from './schema.ts';
12
+ export * from './sdk.ts';
13
+ export * from './table.ts';
14
+ export * from './detail/index.ts';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import { TypeSchemaScene } from './rest.js';
1
+ import { TypeSchemaScene } from './rest.ts';
2
2
  export type TypeSchemaOrderLevel = 'core' | 'business' | 'max';
3
3
  export interface ISchemaOrderParams {
4
4
  order: number;
@@ -1,9 +1,9 @@
1
1
  import type { TableIdentity } from 'table-identity';
2
- import type { TypeFormScene } from './formMeta.js';
3
- import type { IResourceFormActionRowNameRecord } from './resource/formActionRow.js';
4
- import type { IResourceTableActionRecord } from './resource/tableAction.js';
5
- import type { IResourceTableActionBulkNameRecord } from './resource/tableActionBulk.js';
6
- import type { IResourceTableActionRowNameRecord } from './resource/tableActionRow.js';
2
+ import type { TypeFormScene } from './formMeta.ts';
3
+ import type { IResourceFormActionRowNameRecord } from './resource/formActionRow.ts';
4
+ import type { IResourceTableActionRecord } from './resource/tableAction.ts';
5
+ import type { IResourceTableActionBulkNameRecord } from './resource/tableActionBulk.ts';
6
+ import type { IResourceTableActionRowNameRecord } from './resource/tableActionRow.ts';
7
7
  export interface IOpenapiPermissionActionMatcherRule {
8
8
  field: string;
9
9
  values: string[];
@@ -1,7 +1,7 @@
1
1
  import { TableIdentity } from 'table-identity';
2
2
  import { types } from 'typestyle';
3
3
  import { TypeRenderComponentJsx } from 'zova-jsx';
4
- import type { IPermissionHintTableActionRow } from '../permissions.js';
4
+ import type { IPermissionHintTableActionRow } from '../permissions.ts';
5
5
  export type IResourceFormActionRowNameRecord = {
6
6
  [KEY in keyof IResourceFormActionRowRecord as KEY extends `${string}:action${infer Name}` ? Uncapitalize<Name> : KEY]: IResourceFormActionRowRecord[KEY];
7
7
  };
@@ -1,4 +1,4 @@
1
- import type { IResourceRenderBlockOptionsBlock } from './block.js';
1
+ import type { IResourceRenderBlockOptionsBlock } from './block.ts';
2
2
  export interface IFormLayout {
3
3
  children: IFormLayoutNode[];
4
4
  }
@@ -1,10 +1,10 @@
1
- export * from './block.js';
2
- export * from './formActionRow.js';
3
- export * from './formField.js';
4
- export * from './formFieldLayout.js';
5
- export * from './formLayout.js';
6
- export * from './tableAction.js';
7
- export * from './tableActionBulk.js';
8
- export * from './tableActionRow.js';
9
- export * from './tableCell.js';
1
+ export * from './block.ts';
2
+ export * from './formActionRow.ts';
3
+ export * from './formField.ts';
4
+ export * from './formFieldLayout.ts';
5
+ export * from './formLayout.ts';
6
+ export * from './tableAction.ts';
7
+ export * from './tableActionBulk.ts';
8
+ export * from './tableActionRow.ts';
9
+ export * from './tableCell.ts';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import { IResourceTableActionBulkNameRecord, IResourceTableActionBulkRecord } from './tableActionBulk.js';
2
- import { IResourceTableActionRowNameRecord, IResourceTableActionRowRecord } from './tableActionRow.js';
1
+ import { IResourceTableActionBulkNameRecord, IResourceTableActionBulkRecord } from './tableActionBulk.ts';
2
+ import { IResourceTableActionRowNameRecord, IResourceTableActionRowRecord } from './tableActionRow.ts';
3
3
  export type IResourceTableActionNameRecord = IResourceTableActionRowNameRecord & IResourceTableActionBulkNameRecord;
4
4
  export type IResourceTableActionRecord = IResourceTableActionBulkRecord & IResourceTableActionRowRecord;
5
5
  //# sourceMappingURL=tableAction.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { TableIdentity } from 'table-identity';
2
2
  import { types } from 'typestyle';
3
3
  import { TypeRenderComponentJsx } from 'zova-jsx';
4
- import type { IPermissionHintTableActionBulk } from '../permissions.js';
4
+ import type { IPermissionHintTableActionBulk } from '../permissions.ts';
5
5
  export type IResourceTableActionBulkNameRecord = {
6
6
  [KEY in keyof IResourceTableActionBulkRecord as KEY extends `${string}:action${infer Name}` ? Uncapitalize<Name> : KEY]: IResourceTableActionBulkRecord[KEY];
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { TableIdentity } from 'table-identity';
2
2
  import { types } from 'typestyle';
3
3
  import { TypeRenderComponentJsx } from 'zova-jsx';
4
- import type { IPermissionHintTableActionRow } from '../permissions.js';
4
+ import type { IPermissionHintTableActionRow } from '../permissions.ts';
5
5
  export type IResourceTableActionRowNameRecord = {
6
6
  [KEY in keyof IResourceTableActionRowRecord as KEY extends `${string}:action${infer Name}` ? Uncapitalize<Name> : KEY]: IResourceTableActionRowRecord[KEY];
7
7
  };
@@ -4,10 +4,10 @@ import type { TypeRenderComponentJsx } from 'zova-jsx';
4
4
  import 'openapi3-ts/oas30';
5
5
  import 'openapi3-ts/oas31';
6
6
  import { SchemaObject } from 'openapi3-ts/oas31';
7
- import { IResourceDetailsActionRowRecord } from './detail/detailsActionRow.js';
8
- import { IResourceRenderBlockOptionsBlock } from './resource/block.js';
9
- import { IResourceFormFieldRecord } from './resource/formField.js';
10
- import { IResourceTableActionRowRecord } from './resource/tableActionRow.js';
7
+ import { IResourceDetailsActionRowRecord } from './detail/detailsActionRow.ts';
8
+ import { IResourceRenderBlockOptionsBlock } from './resource/block.ts';
9
+ import { IResourceFormFieldRecord } from './resource/formField.ts';
10
+ import { IResourceTableActionRowRecord } from './resource/tableActionRow.ts';
11
11
  export type TypeFormFieldOnEffect = (value: any) => void;
12
12
  export interface ISchemaRenderComponentPresetRecord extends IResourceFormFieldRecord {
13
13
  }
@@ -1,6 +1,6 @@
1
1
  import type { OpenAPIObject, SchemaObject } from 'openapi3-ts/oas31';
2
2
  import type { ModelUseQueryReturnType } from 'zova-module-a-model';
3
- import type { IOpenapiSdkItem } from './sdk.js';
3
+ import type { IOpenapiSdkItem } from './sdk.ts';
4
4
  export interface IOpenapiSchema {
5
5
  doc: OpenAPIObject;
6
6
  meta?: IOpenapiSchemaMeta;
@@ -1,6 +1,6 @@
1
1
  import type { OperationObject } from 'openapi3-ts/oas31';
2
- import type { ModelSdk } from '../model/sdk.js';
3
- import type { IOpenapiSchemaMeta } from './schema.js';
2
+ import type { ModelSdk } from '../model/sdk.ts';
3
+ import type { IOpenapiSchemaMeta } from './schema.ts';
4
4
  export declare const SymbolOpenapiSchemaName = "__schemaName__";
5
5
  export interface IOpenapiSdkBootstrap {
6
6
  apiPath: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-module-a-openapi",
3
- "version": "5.1.58",
4
- "gitHead": "adfc560c7fbe18fe6aa24a768172c21cf89d7b04",
3
+ "version": "5.1.59",
4
+ "gitHead": "c27fb3b5f3566b676b7d635e2e26545c6d389ad7",
5
5
  "description": "",
6
6
  "keywords": [
7
7
  "Zova Module"
@@ -1,7 +1,7 @@
1
1
  // eslint-disable
2
2
  /** model: begin */
3
- export * from '../model/sdk.js';
4
- import { IModelOptionsSdk } from '../model/sdk.js';
3
+ export * from '../model/sdk.ts';
4
+ import { IModelOptionsSdk } from '../model/sdk.ts';
5
5
  import 'zova-module-a-model';
6
6
  declare module 'zova-module-a-model' {
7
7
 
@@ -26,7 +26,7 @@ declare module 'zova-module-a-openapi' {
26
26
  }
27
27
  /** model: end */
28
28
  /** model: begin */
29
- import { ModelSdk } from '../model/sdk.js';
29
+ import type { ModelSdk } from '../model/sdk.ts';
30
30
  import 'zova';
31
31
  declare module 'zova' {
32
32
  export interface IBeanRecordGeneral {
@@ -35,7 +35,7 @@ declare module 'zova' {
35
35
  }
36
36
  /** model: end */
37
37
  /** sys: begin */
38
- export * from '../bean/sys.sdk.js';
38
+ export * from '../bean/sys.sdk.ts';
39
39
 
40
40
  import 'zova';
41
41
  declare module 'zova' {
@@ -57,7 +57,7 @@ declare module 'zova-module-a-openapi' {
57
57
  }
58
58
  /** sys: end */
59
59
  /** sys: begin */
60
- import { SysSdk } from '../bean/sys.sdk.js';
60
+ import type { SysSdk } from '../bean/sys.sdk.ts';
61
61
  import 'zova';
62
62
  declare module 'zova' {
63
63
  export interface IBeanRecordGeneral {
@@ -66,11 +66,11 @@ declare module 'zova' {
66
66
  }
67
67
  /** sys: end */
68
68
  /** config: begin */
69
- export * from '../config/config.js';
70
- import { config } from '../config/config.js';
69
+ export * from '../config/config.ts';
70
+ import { config } from '../config/config.ts';
71
71
  /** config: end */
72
72
  /** monkey: begin */
73
- export * from '../monkey.js';
73
+ export * from '../monkey.ts';
74
74
  /** monkey: end */
75
75
  /** scope: begin */
76
76
  import { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';
@@ -1,2 +1,2 @@
1
1
  export const __ThisModule__ = 'a-openapi';
2
- export { ScopeModuleAOpenapi as ScopeModule } from './index.js';
2
+ export { ScopeModuleAOpenapi as ScopeModule } from './index.ts';
@@ -6,13 +6,13 @@ import { IApiSchemaOptions } from 'zova-module-a-api';
6
6
  import { Sys } from 'zova-module-a-bean';
7
7
  import { BeanFetch } from 'zova-module-a-fetch';
8
8
 
9
- import { IOpenapiSchema } from '../types/schema.js';
9
+ import { IOpenapiSchema } from '../types/schema.ts';
10
10
  import {
11
11
  IOpenapiSdkBootstrap,
12
12
  IOpenapiSdkItem,
13
13
  SymbolOpenapiSchemaName,
14
14
  TypeRequestMethod,
15
- } from '../types/sdk.js';
15
+ } from '../types/sdk.ts';
16
16
 
17
17
  // const PATH_PARAM_RE = /\{([^{}/]+)\}/g;
18
18
 
@@ -1,6 +1,6 @@
1
1
  import type { ZovaSys } from 'zova';
2
2
 
3
- import { IFormProvider } from '../types/formProvider.js';
3
+ import { IFormProvider } from '../types/formProvider.ts';
4
4
 
5
5
  export const config = (_sys: ZovaSys) => {
6
6
  return {
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './.metadata/index.js';
2
- export * from './lib/index.js';
3
- export * from './types/index.js';
1
+ export * from './.metadata/index.ts';
2
+ export * from './lib/index.ts';
3
+ export * from './types/index.ts';
package/src/lib/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './schema.js';
1
+ export * from './schema.ts';
package/src/lib/schema.ts CHANGED
@@ -11,9 +11,9 @@ import { toRaw } from 'vue';
11
11
  import { z } from 'zod';
12
12
  import { cast, deepExtend } from 'zova';
13
13
 
14
- import type { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.js';
14
+ import type { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.ts';
15
15
 
16
- import { OrderUnknownBase } from '../types/database.js';
16
+ import { OrderUnknownBase } from '../types/database.ts';
17
17
 
18
18
  const __FilterColumnsIgnore = ['columns', 'where', 'orders', 'pageNo', 'pageSize'];
19
19
 
package/src/model/sdk.ts CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  Model,
11
11
  } from 'zova-module-a-model';
12
12
 
13
- import { SysSdk } from '../bean/sys.sdk.js';
13
+ import { SysSdk } from '../bean/sys.sdk.ts';
14
14
  import {
15
15
  getSchemaOfRequestBody,
16
16
  getSchemaOfRequestQuery,
@@ -18,11 +18,11 @@ import {
18
18
  getSchemaOfResponseBody,
19
19
  loadSchemaProperties,
20
20
  schemaToZodSchema,
21
- } from '../lib/schema.js';
22
- import { TypeOpenapiPermissions } from '../types/permissions.js';
23
- import { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.js';
24
- import { IOpenapiSchemas, TypeOpenapiSchemasSdk } from '../types/schema.js';
25
- import { TypeRequestMethod } from '../types/sdk.js';
21
+ } from '../lib/schema.ts';
22
+ import { TypeOpenapiPermissions } from '../types/permissions.ts';
23
+ import { ISchemaObjectExtensionField, TypeSchemaScene } from '../types/rest.ts';
24
+ import { IOpenapiSchemas, TypeOpenapiSchemasSdk } from '../types/schema.ts';
25
+ import { TypeRequestMethod } from '../types/sdk.ts';
26
26
 
27
27
  const __schemaRefPrefix = '#/components/schemas/';
28
28
 
package/src/monkey.ts CHANGED
@@ -4,7 +4,7 @@ import type { BeanBase, BeanContainer, IMonkeyAppInitialize, IMonkeyBeanInit } f
4
4
  import { ref, watch } from 'vue';
5
5
  import { BeanSimple } from 'zova';
6
6
 
7
- import type { ModelSdk } from './model/sdk.js';
7
+ import type { ModelSdk } from './model/sdk.ts';
8
8
 
9
9
  export class Monkey extends BeanSimple implements IMonkeyBeanInit, IMonkeyAppInitialize {
10
10
  private _modelSdk: Ref<ModelSdk | undefined> = ref();
@@ -3,9 +3,9 @@ import type { ZovaJsx } from 'zova-jsx';
3
3
 
4
4
  import { TableIdentity } from 'table-identity';
5
5
 
6
- import type { IResourceTableSelectionPayload } from './resource/tableActionBulk.js';
6
+ import type { IResourceTableSelectionPayload } from './resource/tableActionBulk.ts';
7
7
 
8
- import { TypeOpenapiPermissions } from './permissions.js';
8
+ import { TypeOpenapiPermissions } from './permissions.ts';
9
9
 
10
10
  export interface IJsxRenderContextBase {
11
11
  app: ZovaApplication;
@@ -1,5 +1,5 @@
1
- import { IJsxRenderContextBase } from '../action.js';
2
- import { IFormMeta } from '../formMeta.js';
1
+ import { IJsxRenderContextBase } from '../action.ts';
2
+ import { IFormMeta } from '../formMeta.ts';
3
3
 
4
4
  export interface IDetailScope {
5
5
  formMeta?: IFormMeta;
@@ -1,5 +1,5 @@
1
- import { IJsxRenderContextBase } from '../action.js';
2
- import { IFormMeta } from '../formMeta.js';
1
+ import { IJsxRenderContextBase } from '../action.ts';
2
+ import { IFormMeta } from '../formMeta.ts';
3
3
 
4
4
  export interface IDetailsScope {
5
5
  formMeta?: IFormMeta;
@@ -1,7 +1,7 @@
1
1
  import { types } from 'typestyle';
2
2
  import { TypeRenderComponentJsx } from 'zova-jsx';
3
3
 
4
- import type { IPermissionHintDetailsActionBulk } from '../permissions.js';
4
+ import type { IPermissionHintDetailsActionBulk } from '../permissions.ts';
5
5
 
6
6
  export type IResourceDetailsActionBulkNameRecord = {
7
7
  [
@@ -1,7 +1,7 @@
1
1
  import { types } from 'typestyle';
2
2
  import { TypeRenderComponentJsx } from 'zova-jsx';
3
3
 
4
- import type { IPermissionHintDetailsActionRow } from '../permissions.js';
4
+ import type { IPermissionHintDetailsActionRow } from '../permissions.ts';
5
5
 
6
6
  export type IResourceDetailsActionRowNameRecord = {
7
7
  [
@@ -1,4 +1,4 @@
1
- export * from './details.js';
2
- export * from './detailsActionBulk.js';
3
- export * from './detailsActionRow.js';
4
- export * from './detail.js';
1
+ export * from './details.ts';
2
+ export * from './detailsActionBulk.ts';
3
+ export * from './detailsActionRow.ts';
4
+ export * from './detail.ts';
@@ -1,14 +1,14 @@
1
- export * from './action.js';
2
- export * from './captcha.js';
3
- export * from './image.js';
4
- export * from './database.js';
5
- export * from './formMeta.js';
6
- export * from './formProvider.js';
7
- export * from './order.js';
8
- export * from './permissions.js';
9
- export * from './resource/index.js';
10
- export * from './rest.js';
11
- export * from './schema.js';
12
- export * from './sdk.js';
13
- export * from './table.js';
14
- export * from './detail/index.js';
1
+ export * from './action.ts';
2
+ export * from './captcha.ts';
3
+ export * from './image.ts';
4
+ export * from './database.ts';
5
+ export * from './formMeta.ts';
6
+ export * from './formProvider.ts';
7
+ export * from './order.ts';
8
+ export * from './permissions.ts';
9
+ export * from './resource/index.ts';
10
+ export * from './rest.ts';
11
+ export * from './schema.ts';
12
+ export * from './sdk.ts';
13
+ export * from './table.ts';
14
+ export * from './detail/index.ts';
@@ -1,4 +1,4 @@
1
- import { TypeSchemaScene } from './rest.js';
1
+ import { TypeSchemaScene } from './rest.ts';
2
2
 
3
3
  export type TypeSchemaOrderLevel = 'core' | 'business' | 'max';
4
4
 
@@ -1,10 +1,10 @@
1
1
  import type { TableIdentity } from 'table-identity';
2
2
 
3
- import type { TypeFormScene } from './formMeta.js';
4
- import type { IResourceFormActionRowNameRecord } from './resource/formActionRow.js';
5
- import type { IResourceTableActionRecord } from './resource/tableAction.js';
6
- import type { IResourceTableActionBulkNameRecord } from './resource/tableActionBulk.js';
7
- import type { IResourceTableActionRowNameRecord } from './resource/tableActionRow.js';
3
+ import type { TypeFormScene } from './formMeta.ts';
4
+ import type { IResourceFormActionRowNameRecord } from './resource/formActionRow.ts';
5
+ import type { IResourceTableActionRecord } from './resource/tableAction.ts';
6
+ import type { IResourceTableActionBulkNameRecord } from './resource/tableActionBulk.ts';
7
+ import type { IResourceTableActionRowNameRecord } from './resource/tableActionRow.ts';
8
8
 
9
9
  export interface IOpenapiPermissionActionMatcherRule {
10
10
  field: string;
@@ -2,7 +2,7 @@ import { TableIdentity } from 'table-identity';
2
2
  import { types } from 'typestyle';
3
3
  import { TypeRenderComponentJsx } from 'zova-jsx';
4
4
 
5
- import type { IPermissionHintTableActionRow } from '../permissions.js';
5
+ import type { IPermissionHintTableActionRow } from '../permissions.ts';
6
6
 
7
7
  export type IResourceFormActionRowNameRecord = {
8
8
  [
@@ -1,4 +1,4 @@
1
- import type { IResourceRenderBlockOptionsBlock } from './block.js';
1
+ import type { IResourceRenderBlockOptionsBlock } from './block.ts';
2
2
 
3
3
  export interface IFormLayout {
4
4
  children: IFormLayoutNode[];
@@ -1,9 +1,9 @@
1
- export * from './block.js';
2
- export * from './formActionRow.js';
3
- export * from './formField.js';
4
- export * from './formFieldLayout.js';
5
- export * from './formLayout.js';
6
- export * from './tableAction.js';
7
- export * from './tableActionBulk.js';
8
- export * from './tableActionRow.js';
9
- export * from './tableCell.js';
1
+ export * from './block.ts';
2
+ export * from './formActionRow.ts';
3
+ export * from './formField.ts';
4
+ export * from './formFieldLayout.ts';
5
+ export * from './formLayout.ts';
6
+ export * from './tableAction.ts';
7
+ export * from './tableActionBulk.ts';
8
+ export * from './tableActionRow.ts';
9
+ export * from './tableCell.ts';
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  IResourceTableActionBulkNameRecord,
3
3
  IResourceTableActionBulkRecord,
4
- } from './tableActionBulk.js';
4
+ } from './tableActionBulk.ts';
5
5
  import {
6
6
  IResourceTableActionRowNameRecord,
7
7
  IResourceTableActionRowRecord,
8
- } from './tableActionRow.js';
8
+ } from './tableActionRow.ts';
9
9
 
10
10
  export type IResourceTableActionNameRecord = IResourceTableActionRowNameRecord &
11
11
  IResourceTableActionBulkNameRecord;
@@ -3,7 +3,7 @@ import type { TableIdentity } from 'table-identity';
3
3
  import { types } from 'typestyle';
4
4
  import { TypeRenderComponentJsx } from 'zova-jsx';
5
5
 
6
- import type { IPermissionHintTableActionBulk } from '../permissions.js';
6
+ import type { IPermissionHintTableActionBulk } from '../permissions.ts';
7
7
 
8
8
  export type IResourceTableActionBulkNameRecord = {
9
9
  [
@@ -2,7 +2,7 @@ import { TableIdentity } from 'table-identity';
2
2
  import { types } from 'typestyle';
3
3
  import { TypeRenderComponentJsx } from 'zova-jsx';
4
4
 
5
- import type { IPermissionHintTableActionRow } from '../permissions.js';
5
+ import type { IPermissionHintTableActionRow } from '../permissions.ts';
6
6
 
7
7
  export type IResourceTableActionRowNameRecord = {
8
8
  [
package/src/types/rest.ts CHANGED
@@ -6,10 +6,10 @@ import 'openapi3-ts/oas30';
6
6
  import 'openapi3-ts/oas31';
7
7
  import { SchemaObject } from 'openapi3-ts/oas31';
8
8
 
9
- import { IResourceDetailsActionRowRecord } from './detail/detailsActionRow.js';
10
- import { IResourceRenderBlockOptionsBlock } from './resource/block.js';
11
- import { IResourceFormFieldRecord } from './resource/formField.js';
12
- import { IResourceTableActionRowRecord } from './resource/tableActionRow.js';
9
+ import { IResourceDetailsActionRowRecord } from './detail/detailsActionRow.ts';
10
+ import { IResourceRenderBlockOptionsBlock } from './resource/block.ts';
11
+ import { IResourceFormFieldRecord } from './resource/formField.ts';
12
+ import { IResourceTableActionRowRecord } from './resource/tableActionRow.ts';
13
13
 
14
14
  export type TypeFormFieldOnEffect = (value: any) => void;
15
15
 
@@ -1,7 +1,7 @@
1
1
  import type { OpenAPIObject, SchemaObject } from 'openapi3-ts/oas31';
2
2
  import type { ModelUseQueryReturnType } from 'zova-module-a-model';
3
3
 
4
- import type { IOpenapiSdkItem } from './sdk.js';
4
+ import type { IOpenapiSdkItem } from './sdk.ts';
5
5
 
6
6
  export interface IOpenapiSchema {
7
7
  doc: OpenAPIObject;
package/src/types/sdk.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { OperationObject } from 'openapi3-ts/oas31';
2
2
 
3
- import type { ModelSdk } from '../model/sdk.js';
4
- import type { IOpenapiSchemaMeta } from './schema.js';
3
+ import type { ModelSdk } from '../model/sdk.ts';
4
+ import type { IOpenapiSchemaMeta } from './schema.ts';
5
5
 
6
6
  export const SymbolOpenapiSchemaName = '__schemaName__';
7
7