zova-module-rest-resource 5.1.2 → 5.1.6

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.
@@ -0,0 +1,126 @@
1
+ /** model: begin */
2
+ export * from '../model/resource.js';
3
+ import { IModelOptionsResource } from '../model/resource.js';
4
+ import 'zova-module-a-model';
5
+ declare module 'zova-module-a-model' {
6
+ interface IModelRecord {
7
+ 'rest-resource:resource': IModelOptionsResource;
8
+ }
9
+ }
10
+ declare module 'zova-module-rest-resource' {
11
+ interface ModelResource {
12
+ }
13
+ interface ModelResource {
14
+ get $beanFullName(): 'rest-resource.model.resource';
15
+ get $onionName(): 'rest-resource:resource';
16
+ get $onionOptions(): IModelOptionsResource;
17
+ }
18
+ }
19
+ /** model: end */
20
+ /** model: begin */
21
+ import { ModelResource } from '../model/resource.js';
22
+ import 'zova';
23
+ declare module 'zova' {
24
+ interface IBeanRecordGeneral {
25
+ 'rest-resource.model.resource': ModelResource;
26
+ }
27
+ }
28
+ /** model: end */
29
+ /** controller: begin */
30
+ export * from '../page/entry/controller.jsx';
31
+ export * from '../page/entryCreate/controller.jsx';
32
+ export * from '../page/resource/controller.jsx';
33
+ import 'zova';
34
+ declare module 'zova' {
35
+ }
36
+ declare module 'zova-module-rest-resource' {
37
+ interface ControllerPageEntry {
38
+ }
39
+ interface ControllerPageResource {
40
+ }
41
+ }
42
+ /** controller: end */
43
+ /** controller: begin */
44
+ import { ControllerPageEntry } from '../page/entry/controller.jsx';
45
+ import { ControllerPageEntryCreate } from '../page/entryCreate/controller.jsx';
46
+ import { ControllerPageResource } from '../page/resource/controller.jsx';
47
+ import 'zova';
48
+ declare module 'zova' {
49
+ interface IBeanRecordLocal {
50
+ 'rest-resource.controller.pageEntry': ControllerPageEntry;
51
+ 'rest-resource.controller.pageEntryCreate': ControllerPageEntryCreate;
52
+ 'rest-resource.controller.pageResource': ControllerPageResource;
53
+ }
54
+ }
55
+ /** controller: end */
56
+ /** pages: begin */
57
+ export * from './page/entry.js';
58
+ import { NSControllerPageEntry } from './page/entry.js';
59
+ export * from './page/entryCreate.js';
60
+ import { NSControllerPageEntryCreate } from './page/entryCreate.js';
61
+ export * from './page/resource.js';
62
+ import { NSControllerPageResource } from './page/resource.js';
63
+ export * from '../routes.js';
64
+ import { TypePagePathSchema } from 'zova-module-a-router';
65
+ import 'zova';
66
+ declare module 'zova-module-a-router' {
67
+ interface IPagePathRecord {
68
+ '/rest/resource/:resource/:id/:formScene?': TypePagePathSchema<NSControllerPageEntry.ParamsInput, undefined>;
69
+ '/rest/resource/:resource/create': TypePagePathSchema<NSControllerPageEntryCreate.ParamsInput, undefined>;
70
+ '/rest/resource/:resource': TypePagePathSchema<NSControllerPageResource.ParamsInput, undefined>;
71
+ }
72
+ interface IPageNameRecord {
73
+ 'rest-resource:entry': undefined;
74
+ 'rest-resource:entryCreate': undefined;
75
+ 'rest-resource:resource': undefined;
76
+ }
77
+ }
78
+ export declare const pagePathSchemas: {};
79
+ export declare const pageNameSchemas: {
80
+ 'rest-resource:entry': {
81
+ params: import("zod").ZodObject<{
82
+ resource: import("zod").ZodString;
83
+ id: import("zod").ZodOptional<import("zod").ZodString>;
84
+ formScene: import("zod").ZodOptional<import("zod").ZodString>;
85
+ }, import("zod/v4/core").$strip>;
86
+ };
87
+ 'rest-resource:entryCreate': {
88
+ params: import("zod").ZodObject<{
89
+ resource: import("zod").ZodString;
90
+ id: import("zod").ZodOptional<import("zod").ZodString>;
91
+ formScene: import("zod").ZodOptional<import("zod").ZodString>;
92
+ }, import("zod/v4/core").$strip>;
93
+ };
94
+ 'rest-resource:resource': {
95
+ params: import("zod").ZodObject<{
96
+ resource: import("zod").ZodString;
97
+ }, import("zod/v4/core").$strip>;
98
+ };
99
+ };
100
+ declare module 'zova-module-rest-resource' {
101
+ interface ControllerPageEntry {
102
+ $params: NSControllerPageEntry.ParamsOutput;
103
+ }
104
+ interface ControllerPageEntryCreate {
105
+ $params: NSControllerPageEntryCreate.ParamsOutput;
106
+ }
107
+ interface ControllerPageResource {
108
+ $params: NSControllerPageResource.ParamsOutput;
109
+ }
110
+ }
111
+ /** pages: end */
112
+ /** scope: begin */
113
+ import { BeanScopeBase, type BeanScopeUtil } from 'zova';
114
+ export declare class ScopeModuleRestResource extends BeanScopeBase {
115
+ }
116
+ export interface ScopeModuleRestResource {
117
+ util: BeanScopeUtil;
118
+ }
119
+ import 'zova';
120
+ declare module 'zova' {
121
+ interface IBeanScopeRecord {
122
+ 'rest-resource': ScopeModuleRestResource;
123
+ }
124
+ }
125
+ /** scope: end */
126
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/.metadata/index.ts"],"names":[],"mappings":"AACA,mBAAmB;AACnB,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,qBAAqB,CAAC;AAC7B,OAAO,QAAQ,qBAAqB,CAAC;IAEjC,UAAiB,YAAY;QAC3B,wBAAwB,EAAE,qBAAqB,CAAC;KACjD;CAGJ;AACD,OAAO,QAAQ,2BAA2B,CAAC;IAEnC,UAAiB,aAAa;KAG7B;IAED,UAAiB,aAAa;QAC5B,IAAI,aAAa,IAAI,8BAA8B,CAAC;QACpD,IAAI,UAAU,IAAI,wBAAwB,CAAC;QAC3C,IAAI,aAAa,IAAI,qBAAqB,CAAC;KAC5C;CACR;AACD,iBAAiB;AACjB,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,kBAAkB;QACjC,8BAA8B,EAAE,aAAa,CAAC;KAC/C;CACF;AACD,iBAAiB;AACjB,wBAAwB;AACxB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAEhD,OAAO,MAAM,C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AS,CAAC;QACnC,2BAA2B,EAAE,SAAS,CAAC;QACvC,wBAAwB,EAAE,SAAS,CAAC;KACnC;CACA;AACD,eAAO,MAAM,eAAe,IAE3B,CAAC;AACF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;CAa3B,CAAC;AACF,OAAO,QAAQ,2BAA2B,CAAC;IACzC,UAAiB,mBAAmB;QAC9B,OAAO,EAAE,qBAAqB,CAAC,YAAY,CAAC;KAC7C;IACP,UAAiB,yBAAyB;QAClC,OAAO,EAAE,2BAA2B,CAAC,YAAY,CAAC;KACnD;IACP,UAAiB,sBAAsB;QAC/B,OAAO,EAAE,wBAAwB,CAAC,YAAY,CAAC;KAChD;CACN;AACD,iBAAiB;AAEjB,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAGzD,qBACa,uBAAwB,SAAQ,aAAa;CAAG;AAE7D,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,gBAAgB;QAC/B,eAAe,EAAE,uBAAuB,CAAC;KAC1C;CAOF;AAED,iBAAiB"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { ControllerPageEntrySchemaParams } from '../../page/entry/controller.jsx';
3
+ export declare namespace NSControllerPageEntry {
4
+ const paramsSchema: z.ZodObject<{
5
+ resource: z.ZodString;
6
+ id: z.ZodOptional<z.ZodString>;
7
+ formScene: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ type ParamsInput = z.input<typeof ControllerPageEntrySchemaParams>;
10
+ type ParamsOutput = z.output<typeof ControllerPageEntrySchemaParams>;
11
+ }
12
+ export declare const ZPageEntry: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
13
+ //# sourceMappingURL=entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,YAAY;;;;qBAAkC,CAAC;IAC5D,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;IAC1E,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,+BAA+B,CAAC,CAAC;CAC7E;AAED,eAAO,MAAM,UAAU,wHAAqE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.jsx';
3
+ export declare namespace NSControllerPageEntryCreate {
4
+ const paramsSchema: z.ZodObject<{
5
+ resource: z.ZodString;
6
+ id: z.ZodOptional<z.ZodString>;
7
+ formScene: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ type ParamsInput = z.input<typeof ControllerPageEntryCreateSchemaParams>;
10
+ type ParamsOutput = z.output<typeof ControllerPageEntryCreateSchemaParams>;
11
+ }
12
+ export declare const ZPageEntryCreate: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
13
+ //# sourceMappingURL=entryCreate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entryCreate.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/entryCreate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,yBAAiB,2BAA2B,CAAC;IACpC,MAAM,YAAY;;;;qBAAwC,CAAC;IAClE,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;IAChF,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qCAAqC,CAAC,CAAC;CACnF;AAED,eAAO,MAAM,gBAAgB,wHAA2E,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { ControllerPageResourceSchemaParams } from '../../page/resource/controller.jsx';
3
+ export declare namespace NSControllerPageResource {
4
+ const paramsSchema: z.ZodObject<{
5
+ resource: z.ZodString;
6
+ }, z.core.$strip>;
7
+ type ParamsInput = z.input<typeof ControllerPageResourceSchemaParams>;
8
+ type ParamsOutput = z.output<typeof ControllerPageResourceSchemaParams>;
9
+ }
10
+ export declare const ZPageResource: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
11
+ //# sourceMappingURL=resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,yBAAiB,wBAAwB,CAAC;IACjC,MAAM,YAAY;;qBAAqC,CAAC;IAC/D,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;IAC7E,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAC;CAChF;AAED,eAAO,MAAM,aAAa,wHAAwE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const __ThisModule__ = "rest-resource";
2
+ export { ScopeModuleRestResource as ScopeModule } from './index.js';
3
+ //# sourceMappingURL=this.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"this.d.ts","sourceRoot":"","sources":["../../src/.metadata/this.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './.metadata/index.js';
2
+ export * from './types/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { TableIdentity } from 'table-identity';
2
+ import type { DataMutation, IDecoratorModelOptions } from 'zova-module-a-model';
3
+ import type { IOpenapiOptionsResourceMeta, ITableQuery, ITableRes, ScopeModuleAOpenapi, TypeOpenapiPermissions } from 'zova-module-a-openapi';
4
+ import { SchemaObject } from 'openapi3-ts/oas31';
5
+ import { IFormMeta, IFormProvider } from 'zova-module-a-form';
6
+ import { BeanModelBase } from 'zova-module-a-model';
7
+ import { ITableProvider } from 'zova-module-a-table';
8
+ export interface IModelOptionsResource extends IDecoratorModelOptions {
9
+ }
10
+ export declare class ModelResource<Entity = any, EntityCreate = Partial<Entity>, EntityUpdate = Partial<Entity>> extends BeanModelBase {
11
+ resource: string;
12
+ resourceApi: string;
13
+ resourceMeta: IOpenapiOptionsResourceMeta;
14
+ permissions?: TypeOpenapiPermissions;
15
+ formProvider: IFormProvider;
16
+ tableProvider: ITableProvider;
17
+ schemaView?: SchemaObject;
18
+ schemaCreate?: SchemaObject;
19
+ schemaUpdate?: SchemaObject;
20
+ schemaFilter?: SchemaObject;
21
+ schemaRow?: SchemaObject;
22
+ schemaPages?: SchemaObject;
23
+ $$scopeModuleAOpenapi: ScopeModuleAOpenapi;
24
+ protected __init__(resource: string): Promise<void>;
25
+ selectGeneral(actionPath?: string, query?: ITableQuery): import("vue").UnwrapNestedRefs<import("@tanstack/vue-query").UseQueryReturnType<ITableRes<Entity>, Error>>;
26
+ select(query?: ITableQuery): import("vue").UnwrapNestedRefs<import("@tanstack/vue-query").UseQueryReturnType<ITableRes<Entity>, Error>>;
27
+ view(id: TableIdentity): import("vue").UnwrapNestedRefs<import("@tanstack/vue-query").UseQueryReturnType<NonNullable<Awaited<Entity>> | null, Error>>;
28
+ create(): import("vue").UnwrapNestedRefs<import("@tanstack/vue-query").UseMutationReturnType<void, Error, EntityCreate, unknown>>;
29
+ update(id: TableIdentity): import("vue").UnwrapNestedRefs<import("@tanstack/vue-query").UseMutationReturnType<void, Error, EntityUpdate, unknown>>;
30
+ delete(id: TableIdentity): import("vue").UnwrapNestedRefs<import("@tanstack/vue-query").UseMutationReturnType<void, Error, void, unknown>>;
31
+ get apiSchemasSelect(): import("zova-module-a-openapi").IOpenapiSchemas;
32
+ get apiSchemasView(): import("zova-module-a-openapi").IOpenapiSchemas;
33
+ get apiSchemasCreate(): import("zova-module-a-openapi").IOpenapiSchemas;
34
+ get apiSchemasUpdate(): import("zova-module-a-openapi").IOpenapiSchemas;
35
+ get componentRestPage(): "basic-restpage:restPage";
36
+ get componentRestPageEntry(): "basic-restpage:restPageEntry";
37
+ get componentTable(): import("zova-core").TypeComponentRecordSelectorKeysStrict<"table">;
38
+ get componentForm(): "a-form:form";
39
+ getFormSchema(formMeta: IFormMeta): SchemaObject | undefined;
40
+ getFormApiSchemas(formMeta: IFormMeta): import("zova-module-a-openapi").IOpenapiSchemas;
41
+ getFormMutationSubmit(formMeta: IFormMeta, id?: TableIdentity): DataMutation | undefined;
42
+ getFormData(formMeta: IFormMeta, id?: TableIdentity): Entity | EntityCreate | EntityUpdate | undefined;
43
+ getQueryDataDefaultValue(schemaName?: SchemaObject | string): EntityCreate | undefined;
44
+ private _bootstrap;
45
+ }
46
+ //# sourceMappingURL=resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO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;IActB,MAAM;IAgBN,MAAM,CAAC,EAAE,EAAE,aAAa;IAiBxB,MAAM,CAAC,EAAE,EAAE,aAAa;IAgBxB,IAAW,gBAAgB,oDAE1B;IAED,IAAW,cAAc,oDAExB;IAED,IAAW,gBAAgB,oDAE1B;IAED,IAAW,gBAAgB,oDAE1B;IAED,IAAW,iBAAiB,8BAE3B;IAED,IAAW,sBAAsB,mCAEhC;IAED,IAAW,cAAc,uEAExB;IAED,IAAW,aAAa,kBAEvB;IAEM,aAAa,CAAC,QAAQ,EAAE,SAAS;IAOjC,iBAAiB,CAAC,QAAQ,EAAE,SAAS;IAQrC,qBAAqB,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,aAAa,GAAG,YAAY,GAAG,SAAS;IASxF,WAAW,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS;IAQtG,wBAAwB,CAAC,UAAU,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS;YAQ/E,UAAU;CAOzB"}
@@ -0,0 +1,32 @@
1
+ import { celEnvBase } from '@cabloy/utils';
2
+ import { z } from 'zod';
3
+ import { BeanControllerPageBase } from 'zova';
4
+ import { ZovaJsx } from 'zova-jsx';
5
+ import { IFormMeta, IFormProvider, TypeFormScene } from 'zova-module-a-form';
6
+ import { TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';
7
+ import type { ModelResource } from '../../model/resource.js';
8
+ import { IJsxRenderContextPageEntryWrapper, IPageEntryWrapperScope } from '../../types/pageEntryWrapper.js';
9
+ export declare const ControllerPageEntrySchemaParams: z.ZodObject<{
10
+ resource: z.ZodString;
11
+ id: z.ZodOptional<z.ZodString>;
12
+ formScene: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>;
14
+ export declare class ControllerPageEntry extends BeanControllerPageBase {
15
+ formMeta: IFormMeta;
16
+ formProvider: IFormProvider;
17
+ pageEntryWrapperScope: IPageEntryWrapperScope;
18
+ zovaJsx: ZovaJsx;
19
+ pageEntryWrapperCelEnv: typeof celEnvBase;
20
+ get $$modelResource(): ModelResource;
21
+ get resource(): string;
22
+ get entryId(): string | undefined;
23
+ get formScene(): TypeFormScene;
24
+ protected __init__(): Promise<void>;
25
+ onActionTable(_action: keyof TypeResourceActionTableRecord): Promise<void>;
26
+ onActionRow(action: keyof TypeResourceActionRowRecord): Promise<void>;
27
+ private _getPageEntryWrapperScope;
28
+ private _getPageEntryWrapperCelEnv;
29
+ getJsxRenderContextPageEntryWrapper(celScope: IPageEntryWrapperScope): IJsxRenderContextPageEntryWrapper;
30
+ protected render(): import("vue/jsx-runtime").JSX.Element;
31
+ }
32
+ //# sourceMappingURL=controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/entry/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAS,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAoC,MAAM,MAAM,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAyB,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAGnG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,iCAAiC,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE5G,eAAO,MAAM,+BAA+B;;;;iBAI1C,CAAC;AAEH,qBACa,mBAAoB,SAAQ,sBAAsB;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,EAAE,aAAa,CAAC;IAC5B,qBAAqB,EAAE,sBAAsB,CAAC;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB,EAAE,OAAO,UAAU,CAAC;IAE1C,IACI,eAAe,IAAI,aAAa,CAEnC;IAED,IAAI,QAAQ,WAEX;IAED,IAAI,OAAO,uBAEV;IAED,IAAI,SAAS,kBAEZ;cAEe,QAAQ;IAelB,aAAa,CAAC,OAAO,EAAE,MAAM,6BAA6B;IAE1D,WAAW,CAAC,MAAM,EAAE,MAAM,2BAA2B;IAQ3D,OAAO,CAAC,yBAAyB;IAuBjC,OAAO,CAAC,0BAA0B;IAK3B,mCAAmC,CAAC,QAAQ,EAAE,sBAAsB,GAAG,iCAAiC;IAY/G,SAAS,CAAC,MAAM;CAMjB"}
@@ -0,0 +1,9 @@
1
+ import { ControllerPageEntry } from '../entry/controller.jsx';
2
+ export declare const ControllerPageEntryCreateSchemaParams: import("zod").ZodObject<{
3
+ resource: import("zod").ZodString;
4
+ id: import("zod").ZodOptional<import("zod").ZodString>;
5
+ formScene: import("zod").ZodOptional<import("zod").ZodString>;
6
+ }, import("zod/v4/core").$strip>;
7
+ export declare class ControllerPageEntryCreate extends ControllerPageEntry {
8
+ }
9
+ //# sourceMappingURL=controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/entryCreate/controller.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAmC,MAAM,yBAAyB,CAAC;AAE/F,eAAO,MAAM,qCAAqC;;;;gCAAkC,CAAC;AAErF,qBAEa,yBAA0B,SAAQ,mBAAmB;CAAG"}
@@ -0,0 +1,27 @@
1
+ import { celEnvBase } from '@cabloy/utils';
2
+ import { z } from 'zod';
3
+ import { BeanControllerPageBase } from 'zova';
4
+ import { ZovaJsx } from 'zova-jsx';
5
+ import { TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';
6
+ import { ITableProvider } from 'zova-module-a-table';
7
+ import type { ModelResource } from '../../model/resource.js';
8
+ import { IJsxRenderContextPageWrapper, IPageWrapperScope } from '../../types/pageWrapper.js';
9
+ export declare const ControllerPageResourceSchemaParams: z.ZodObject<{
10
+ resource: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export declare class ControllerPageResource extends BeanControllerPageBase {
13
+ tableProvider: ITableProvider;
14
+ pageWrapperScope: IPageWrapperScope;
15
+ zovaJsx: ZovaJsx;
16
+ pageWrapperCelEnv: typeof celEnvBase;
17
+ get $$modelResource(): ModelResource;
18
+ protected __init__(): Promise<void>;
19
+ get resource(): string;
20
+ onActionTable(_action: keyof TypeResourceActionTableRecord): Promise<void>;
21
+ onActionRow(action: keyof TypeResourceActionRowRecord, id: string): Promise<void>;
22
+ private _getPageWrapperScope;
23
+ private _getPageWrapperCelEnv;
24
+ getJsxRenderContextPageWrapper(celScope: IPageWrapperScope): IJsxRenderContextPageWrapper;
25
+ render(): import("vue/jsx-runtime").JSX.Element;
26
+ }
27
+ //# sourceMappingURL=controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/resource/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAoC,MAAM,MAAM,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,qBACa,sBAAuB,SAAQ,sBAAsB;IAChE,aAAa,EAAE,cAAc,CAAC;IAC9B,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,UAAU,CAAC;IAErC,IACI,eAAe,IAAI,aAAa,CAEnC;cAEe,QAAQ;IAWxB,IAAI,QAAQ,WAEX;IAEK,aAAa,CAAC,OAAO,EAAE,MAAM,6BAA6B;IAE1D,WAAW,CAAC,MAAM,EAAE,MAAM,2BAA2B,EAAE,EAAE,EAAE,MAAM;IAOvE,OAAO,CAAC,oBAAoB;IAsB5B,OAAO,CAAC,qBAAqB;IAKtB,8BAA8B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,4BAA4B;IAYzF,MAAM;CAMd"}
@@ -0,0 +1,3 @@
1
+ import type { IModuleRoute } from 'zova-module-a-router';
2
+ export declare const routes: IModuleRoute[];
3
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMzD,eAAO,MAAM,MAAM,EAAE,YAAY,EAyBhC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './pageEntryWrapper.js';
2
+ export * from './pageWrapper.js';
3
+ export * from './resource.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { TableIdentity } from 'table-identity';
2
+ import type { IJsxRenderContextBase, TypeOpenapiPermissions, TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';
3
+ import type { ControllerPageEntry } from '../page/entry/controller.jsx';
4
+ export interface IPageEntryWrapperScope {
5
+ resource?: string;
6
+ id?: TableIdentity;
7
+ permissions?: TypeOpenapiPermissions;
8
+ onActionTable?: (action: keyof TypeResourceActionTableRecord) => Promise<any> | any;
9
+ onActionRow?: (action: keyof TypeResourceActionRowRecord) => Promise<any> | any;
10
+ }
11
+ export interface IJsxRenderContextPageEntryWrapper extends IJsxRenderContextBase {
12
+ $celScope: IPageEntryWrapperScope;
13
+ $$pageEntryWrapper: ControllerPageEntry;
14
+ }
15
+ //# sourceMappingURL=pageEntryWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageEntryWrapper.d.ts","sourceRoot":"","sources":["../../src/types/pageEntryWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,6BAA6B,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACpF,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,2BAA2B,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACjF;AAED,MAAM,WAAW,iCAAkC,SAAQ,qBAAqB;IAC9E,SAAS,EAAE,sBAAsB,CAAC;IAClC,kBAAkB,EAAE,mBAAmB,CAAC;CACzC"}
@@ -0,0 +1,13 @@
1
+ import type { IJsxRenderContextBase, TypeOpenapiPermissions, TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';
2
+ import type { ControllerPageResource } from '../page/resource/controller.jsx';
3
+ export interface IPageWrapperScope {
4
+ resource?: string;
5
+ permissions?: TypeOpenapiPermissions;
6
+ onActionTable?: (action: keyof TypeResourceActionTableRecord) => Promise<any> | any;
7
+ onActionRow?: (action: keyof TypeResourceActionRowRecord, id: string) => Promise<any> | any;
8
+ }
9
+ export interface IJsxRenderContextPageWrapper extends IJsxRenderContextBase {
10
+ $celScope: IPageWrapperScope;
11
+ $$pageWrapper: ControllerPageResource;
12
+ }
13
+ //# sourceMappingURL=pageWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageWrapper.d.ts","sourceRoot":"","sources":["../../src/types/pageWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,6BAA6B,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACpF,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,2BAA2B,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CAC7F;AAED,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE,SAAS,EAAE,iBAAiB,CAAC;IAC7B,aAAa,EAAE,sBAAsB,CAAC;CACvC"}
@@ -0,0 +1,8 @@
1
+ import type { ParameterObject, ReferenceObject, SchemaObject } from 'openapi3-ts/oas31';
2
+ export interface IRestResourceSchemaBootstrap {
3
+ parameters?: (ReferenceObject | ParameterObject)[];
4
+ paged: boolean;
5
+ schemaPaged?: SchemaObject;
6
+ schemaRow?: SchemaObject;
7
+ }
8
+ //# sourceMappingURL=resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/types/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAExF,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,CAAC,eAAe,GAAG,eAAe,CAAC,EAAE,CAAC;IACnD,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "zova-module-rest-resource",
3
- "version": "5.1.2",
3
+ "version": "5.1.6",
4
+ "gitHead": "fa2b2ad94fb521534a1312c30256c1e155926bd3",
4
5
  "description": "",
5
6
  "keywords": [
6
7
  "Zova Module"
@@ -27,11 +28,10 @@
27
28
  },
28
29
  "scripts": {
29
30
  "clean": "rimraf dist tsconfig.build.tsbuildinfo",
30
- "tsc:publish": "npm run clean && zova :bin:buildModule --sourcemap",
31
+ "tsc:publish": "npm run clean && zova :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
31
32
  "prepublishOnly": "npm run tsc:publish",
32
33
  "prepack": "clean-package",
33
34
  "postpack": "clean-package restore && npm run clean"
34
35
  },
35
- "title": "rest-resource",
36
- "gitHead": "5517baba5865ac348af5be8e3a0f7506b0a67f9c"
36
+ "title": "rest-resource"
37
37
  }