cabloy 5.1.98 → 5.1.100

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 (141) hide show
  1. package/.cabloy-version +1 -1
  2. package/.claude/hooks/contract-loop-gate.ts +151 -44
  3. package/CHANGELOG.md +28 -0
  4. package/CLAUDE.md +2 -0
  5. package/cabloy-docs/.vitepress/config.mjs +4 -0
  6. package/cabloy-docs/backend/controller-aop-guide.md +0 -1
  7. package/cabloy-docs/frontend/a-openapi-under-the-hood.md +1 -1
  8. package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +1 -1
  9. package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +1 -1
  10. package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +1 -1
  11. package/cabloy-docs/frontend/model-resource-owner-pattern.md +1 -1
  12. package/cabloy-docs/frontend/model-state-guide.md +3 -1
  13. package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +2 -2
  14. package/cabloy-docs/frontend/resource-list-page-deep-dive.md +1 -1
  15. package/cabloy-docs/frontend/rest-resource-source-reading-map.md +2 -2
  16. package/cabloy-docs/frontend/rest-resource-under-the-hood.md +4 -4
  17. package/cabloy-docs/frontend/use-state-data-best-practices.md +384 -0
  18. package/package.json +1 -1
  19. package/scripts/upgrade.ts +2 -0
  20. package/vona/packages-cli/cli/package.json +1 -1
  21. package/vona/packages-cli/cli-set-api/package.json +1 -1
  22. package/vona/packages-vona/vona/package.json +1 -1
  23. package/vona/packages-vona/vona-core/package.json +1 -1
  24. package/vona/packages-vona/vona-core/src/lib/bean/beanBase.ts +9 -9
  25. package/vona/packages-vona/vona-mock/package.json +1 -1
  26. package/vona/pnpm-lock.yaml +56 -56
  27. package/vona/pnpm-workspace.yaml +1 -1
  28. package/vona/src/suite/a-training/modules/training-record/src/bean/fileScene.dossierFile.ts +22 -0
  29. package/vona/src/suite/a-training/modules/training-record/src/bean/meta.version.ts +1 -0
  30. package/vona/src/suite/a-training/modules/training-record/src/config/locale/en-us.ts +1 -0
  31. package/vona/src/suite/a-training/modules/training-record/src/config/locale/zh-cn.ts +1 -0
  32. package/vona/src/suite/a-training/modules/training-record/src/dto/recordDossierFileView.ts +47 -0
  33. package/vona/src/suite/a-training/modules/training-record/src/dto/recordSelectResItem.tsx +13 -0
  34. package/vona/src/suite/a-training/modules/training-record/src/dto/recordView.tsx +13 -0
  35. package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +16 -5
  36. package/vona/src/suite/a-training/modules/training-record/src/index.ts +2 -0
  37. package/vona/src/suite/a-training/modules/training-record/src/lib/index.ts +1 -0
  38. package/vona/src/suite/a-training/modules/training-record/src/lib/resolveDossierFiles.ts +34 -0
  39. package/vona/src/suite/a-training/modules/training-record/test/record.test.ts +209 -123
  40. package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +1 -0
  41. package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +1 -0
  42. package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordBase.tsx +18 -1
  43. package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +0 -2
  44. package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +1 -0
  45. package/vona/src/suite-vendor/a-file/modules/a-file/package.json +5 -3
  46. package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileUploadPolicy.ts +28 -0
  47. package/vona/src/suite-vendor/a-file/modules/a-file/src/controller/file.ts +8 -0
  48. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyRequest.ts +15 -0
  49. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyResponse.ts +30 -0
  50. package/vona/src/suite-vendor/a-file/package.json +2 -2
  51. package/vona/src/suite-vendor/a-image/modules/a-image/package.json +1 -1
  52. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageUploadPolicy.ts +27 -0
  53. package/vona/src/suite-vendor/a-image/modules/a-image/src/controller/image.ts +8 -0
  54. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyRequest.ts +15 -0
  55. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyResponse.ts +27 -0
  56. package/vona/src/suite-vendor/a-image/modules/image-native/package.json +1 -1
  57. package/vona/src/suite-vendor/a-image/modules/image-native/src/controller/image.ts +1 -1
  58. package/vona/src/suite-vendor/a-image/package.json +1 -1
  59. package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
  60. package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
  61. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/.metadata/index.ts +24 -9
  62. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +87 -73
  63. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionActionByRoles.ts +27 -0
  64. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionUser.ts +20 -0
  65. package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
  66. package/vona/src/suite-vendor/a-vona/modules/a-startup/src/service/startup.ts +4 -3
  67. package/vona/src/suite-vendor/a-vona/modules/a-upload/package.json +1 -1
  68. package/vona/src/suite-vendor/a-vona/modules/a-upload/src/bean/interceptor.upload.ts +5 -1
  69. package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
  70. package/vona/src/suite-vendor/a-vona/modules/a-user/src/.metadata/index.ts +0 -13
  71. package/vona/src/suite-vendor/a-vona/modules/a-user/src/lib/passport.ts +0 -7
  72. package/vona/src/suite-vendor/a-vona/modules/a-version/package.json +1 -1
  73. package/vona/src/suite-vendor/a-vona/modules/a-version/src/bean/meta.version.ts +2 -24
  74. package/vona/src/suite-vendor/a-vona/package.json +1 -1
  75. package/zova/packages-utils/zova-jsx/package.json +2 -2
  76. package/zova/packages-zova/zova/package.json +3 -3
  77. package/zova/packages-zova/zova-core/package.json +1 -1
  78. package/zova/packages-zova/zova-core/src/bean/beanBase.ts +9 -13
  79. package/zova/pnpm-lock.yaml +24 -9
  80. package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolOne/controller.tsx +2 -2
  81. package/zova/src/suite/a-demo/modules/demo-todo/src/page/todo/controller.tsx +2 -2
  82. package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/controller.tsx +2 -2
  83. package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/controller.tsx +2 -2
  84. package/zova/src/suite/a-home/modules/home-login/src/page/login/controller.tsx +2 -2
  85. package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx +5 -1
  86. package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockTable/controller.tsx +20 -15
  87. package/zova/src/suite/cabloy-basic/modules/basic-details/src/service/detail.tsx +6 -1
  88. package/zova/src/suite/cabloy-basic/modules/basic-file/cli/openapi.config.ts +9 -0
  89. package/zova/src/suite/cabloy-basic/modules/basic-file/package.json +58 -0
  90. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/component/formFieldFile.ts +31 -0
  91. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/index.ts +222 -0
  92. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/locales.ts +7 -0
  93. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/this.ts +2 -0
  94. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/file.ts +121 -0
  95. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/baseURL.ts +5 -0
  96. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/index.ts +3 -0
  97. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +306 -0
  98. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +5718 -0
  99. package/zova/src/suite/cabloy-basic/modules/basic-file/src/apiSchema/file.ts +40 -0
  100. package/zova/src/suite/cabloy-basic/modules/basic-file/src/bean/tableCell.file.tsx +187 -0
  101. package/zova/src/suite/cabloy-basic/modules/basic-file/src/component/formFieldFile/controller.tsx +534 -0
  102. package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/en-us.ts +15 -0
  103. package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/zh-cn.ts +15 -0
  104. package/zova/src/suite/cabloy-basic/modules/basic-file/src/index.ts +4 -0
  105. package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/file.ts +74 -0
  106. package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/index.ts +1 -0
  107. package/zova/src/suite/cabloy-basic/modules/basic-file/src/model/file.ts +23 -0
  108. package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/file.ts +12 -0
  109. package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/index.ts +1 -0
  110. package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.build.json +13 -0
  111. package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.json +5 -0
  112. package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/index.ts +61 -0
  113. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/image.ts +38 -1
  114. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/imageNativeImage.ts +31 -0
  115. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +52 -0
  116. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +614 -1
  117. package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/image.ts +10 -0
  118. package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/imageNativeImage.ts +13 -0
  119. package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +126 -53
  120. package/zova/src/suite/cabloy-basic/modules/basic-image/src/model/image.ts +23 -0
  121. package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx +44 -4
  122. package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockTable/controller.tsx +17 -12
  123. package/zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx +2 -2
  124. package/zova/src/suite/cabloy-basic/modules/basic-resource/src/component/formFieldResourcePicker/controller.tsx +2 -2
  125. package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/controller.tsx +7 -2
  126. package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/render.tsx +34 -33
  127. package/zova/src/suite/cabloy-basic/package.json +1 -0
  128. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
  129. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +5 -3
  130. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/entry/controller.tsx +2 -2
  131. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resource/controller.tsx +2 -2
  132. package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
  133. package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +1 -1
  134. package/zova/src/suite-vendor/a-zova/modules/a-model/src/lib/utils.ts +17 -17
  135. package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
  136. package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/model/sdk.ts +8 -3
  137. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
  138. package/zova/src/suite-vendor/a-zova/package.json +4 -4
  139. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +0 -17
  140. package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/guard.userName.ts +0 -35
  141. /package/vona/patches/{zova-core@5.1.76.patch → zova-core@5.1.77.patch} +0 -0
@@ -0,0 +1,222 @@
1
+ // eslint-disable
2
+ /** model: begin */
3
+ export * from '../model/file.js';
4
+ import { IModelOptionsFile } from '../model/file.js';
5
+ import 'zova-module-a-model';
6
+ declare module 'zova-module-a-model' {
7
+ export interface IModelRecord {
8
+ 'basic-file:file': IModelOptionsFile;
9
+ }
10
+ }
11
+ declare module 'zova-module-basic-file' {
12
+ export interface ModelFile {
13
+ /** @internal */
14
+ get scope(): ScopeModuleBasicFile;
15
+ }
16
+
17
+ export interface ModelFile {
18
+ get $beanFullName(): 'basic-file.model.file';
19
+ get $onionName(): 'basic-file:file';
20
+ get $onionOptions(): IModelOptionsFile;
21
+ }
22
+ }
23
+ /** model: end */
24
+ /** model: begin */
25
+ import { ModelFile } from '../model/file.js';
26
+ import 'zova';
27
+ declare module 'zova' {
28
+ export interface IBeanRecordGeneral {
29
+ 'basic-file.model.file': ModelFile;
30
+ }
31
+ }
32
+ /** model: end */
33
+ /** api: begin */
34
+ export * from '../api/file.js';
35
+
36
+ import 'zova';
37
+ declare module 'zova' {
38
+
39
+
40
+ }
41
+ declare module 'zova-module-basic-file' {
42
+
43
+ export interface ApiFile {
44
+ /** @internal */
45
+ get scope(): ScopeModuleBasicFile;
46
+ }
47
+
48
+ export interface ApiFile {
49
+ get $beanFullName(): 'basic-file.api.file';
50
+ get $onionName(): 'basic-file:file';
51
+
52
+ }
53
+ }
54
+ /** api: end */
55
+ /** api: begin */
56
+ import { ApiFile } from '../api/file.js';
57
+ export interface IModuleApi {
58
+ 'file': ApiFile;
59
+ }
60
+ /** api: end */
61
+ /** api: begin */
62
+
63
+ import 'zova';
64
+ declare module 'zova' {
65
+ export interface IBeanRecordGeneral {
66
+ 'basic-file.api.file': ApiFile;
67
+ }
68
+ }
69
+ /** api: end */
70
+ /** openapi: begin */
71
+ export * from '../api/openapi/index.js';
72
+ /** openapi: end */
73
+ /** apiSchema: begin */
74
+ export * from '../apiSchema/file.js';
75
+
76
+ import 'zova';
77
+ declare module 'zova' {
78
+
79
+
80
+ }
81
+ declare module 'zova-module-basic-file' {
82
+
83
+ export interface ApiSchemaFile {
84
+ /** @internal */
85
+ get scope(): ScopeModuleBasicFile;
86
+ }
87
+
88
+ export interface ApiSchemaFile {
89
+ get $beanFullName(): 'basic-file.apiSchema.file';
90
+ get $onionName(): 'basic-file:file';
91
+
92
+ }
93
+ }
94
+ /** apiSchema: end */
95
+ /** apiSchema: begin */
96
+ import { ApiSchemaFile } from '../apiSchema/file.js';
97
+ export interface IModuleApiSchema {
98
+ 'file': ApiSchemaFile;
99
+ }
100
+ /** apiSchema: end */
101
+ /** apiSchema: begin */
102
+
103
+ import 'zova';
104
+ declare module 'zova' {
105
+ export interface IBeanRecordGeneral {
106
+ 'basic-file.apiSchema.file': ApiSchemaFile;
107
+ }
108
+ }
109
+ /** apiSchema: end */
110
+ /** controller: begin */
111
+ export * from '../component/formFieldFile/controller.jsx';
112
+
113
+ import 'zova';
114
+ declare module 'zova' {
115
+
116
+
117
+ }
118
+ declare module 'zova-module-basic-file' {
119
+
120
+ export interface ControllerFormFieldFile {
121
+ /** @internal */
122
+ get scope(): ScopeModuleBasicFile;
123
+ }
124
+ }
125
+ /** controller: end */
126
+ /** controller: begin */
127
+ import { ControllerFormFieldFile } from '../component/formFieldFile/controller.jsx';
128
+ import 'zova';
129
+ declare module 'zova' {
130
+ export interface IBeanRecordLocal {
131
+ 'basic-file.controller.formFieldFile': ControllerFormFieldFile;
132
+ }
133
+ }
134
+ /** controller: end */
135
+
136
+ /** components: begin */
137
+ export * from './component/formFieldFile.js';
138
+ import { ZFormFieldFile } from './component/formFieldFile.js';
139
+ export const components = {
140
+ 'formFieldFile': ZFormFieldFile,
141
+ };
142
+ import 'zova';
143
+ declare module 'zova' {
144
+ export interface IComponentRecord {
145
+ 'basic-file:formFieldFile': ControllerFormFieldFile;
146
+ }
147
+ export interface IZovaComponentRecord {
148
+ 'basic-file:formFieldFile': typeof ZFormFieldFile;
149
+ }
150
+ }
151
+ /** components: end */
152
+ /** tableCell: begin */
153
+ export * from '../bean/tableCell.file.jsx';
154
+ import { ITableCellOptionsFile } from '../bean/tableCell.file.jsx';
155
+ import 'zova-module-a-table';
156
+ declare module 'zova-module-a-table' {
157
+
158
+ export interface ITableCellRecord {
159
+ 'basic-file:file': ITableCellOptionsFile;
160
+ }
161
+
162
+
163
+ }
164
+ declare module 'zova-module-basic-file' {
165
+
166
+ export interface TableCellFile {
167
+ /** @internal */
168
+ get scope(): ScopeModuleBasicFile;
169
+ }
170
+
171
+ export interface TableCellFile {
172
+ get $beanFullName(): 'basic-file.tableCell.file';
173
+ get $onionName(): 'basic-file:file';
174
+ get $onionOptions(): ITableCellOptionsFile;
175
+ }
176
+ }
177
+ /** tableCell: end */
178
+ /** tableCell: begin */
179
+ import { TableCellFile } from '../bean/tableCell.file.jsx';
180
+ import 'zova';
181
+ declare module 'zova' {
182
+ export interface IBeanRecordGeneral {
183
+ 'basic-file.tableCell.file': TableCellFile;
184
+ }
185
+ }
186
+ /** tableCell: end */
187
+ /** locale: begin */
188
+ import { locales } from './locales.js';
189
+ /** locale: end */
190
+ /** scope: begin */
191
+ import { BeanScopeBase, type BeanScopeUtil, TypeModuleLocales, TypeLocaleBase } from 'zova';
192
+ import { Scope } from 'zova-module-a-bean';
193
+
194
+ @Scope()
195
+ export class ScopeModuleBasicFile extends BeanScopeBase {}
196
+
197
+ export interface ScopeModuleBasicFile {
198
+ util: BeanScopeUtil;
199
+ locale: TypeModuleLocales<(typeof locales)[TypeLocaleBase]>;
200
+ api: IModuleApi;
201
+ apiSchema: IModuleApiSchema;
202
+ }
203
+
204
+ import 'zova';
205
+ declare module 'zova' {
206
+ export interface IBeanScopeRecord {
207
+ 'basic-file': ScopeModuleBasicFile;
208
+ }
209
+
210
+
211
+
212
+ export interface IBeanScopeLocale {
213
+ 'basic-file': (typeof locales)[TypeLocaleBase];
214
+ }
215
+
216
+
217
+ }
218
+
219
+ export function locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `basic-file::${K}` {
220
+ return `basic-file::${key}`;
221
+ }
222
+ /** scope: end */
@@ -0,0 +1,7 @@
1
+ import locale_en_us from '../config/locale/en-us.js';
2
+ import locale_zh_cn from '../config/locale/zh-cn.js';
3
+
4
+ export const locales = {
5
+ 'en-us': locale_en_us,
6
+ 'zh-cn': locale_zh_cn,
7
+ };
@@ -0,0 +1,2 @@
1
+ export const __ThisModule__ = 'basic-file';
2
+ export { ScopeModuleBasicFile as ScopeModule } from './index.js';
@@ -0,0 +1,121 @@
1
+ import type { IApiActionOptions } from 'zova-module-a-api';
2
+
3
+ import { Api, BeanApiBase } from 'zova-module-a-api';
4
+
5
+ import type { components, paths } from './openapi/index.js';
6
+
7
+ import { OpenApiBaseURL } from './openapi/index.js';
8
+
9
+ /** File_getUploadPolicy */
10
+ export const ApiApiFilegetUploadPolicyPath = '/api/file/upload-policy';
11
+ export type ApiApiFilegetUploadPolicyPath = '/api/file/upload-policy';
12
+ export type ApiApiFilegetUploadPolicyMethod = 'post';
13
+ export type ApiApiFilegetUploadPolicyRequestBody =
14
+ components['schemas']['a-file.dto.fileUploadPolicyRequest'];
15
+ export type ApiApiFilegetUploadPolicyResponseBody =
16
+ paths[ApiApiFilegetUploadPolicyPath][ApiApiFilegetUploadPolicyMethod]['responses']['200']['content']['application/json']['data'];
17
+
18
+ /** File_createUploadToken */
19
+ export const ApiApiFilecreateUploadTokenPath = '/api/file/upload-token';
20
+ export type ApiApiFilecreateUploadTokenPath = '/api/file/upload-token';
21
+ export type ApiApiFilecreateUploadTokenMethod = 'post';
22
+ export type ApiApiFilecreateUploadTokenRequestBody =
23
+ components['schemas']['a-file.dto.fileUploadTokenRequest'];
24
+ export type ApiApiFilecreateUploadTokenResponseBody =
25
+ paths[ApiApiFilecreateUploadTokenPath][ApiApiFilecreateUploadTokenMethod]['responses']['200']['content']['application/json']['data'];
26
+
27
+ /** File_upload */
28
+ export const ApiApiFileuploadPath = '/api/file/upload';
29
+ export type ApiApiFileuploadPath = '/api/file/upload';
30
+ export type ApiApiFileuploadMethod = 'post';
31
+ export type ApiApiFileuploadRequestBody = {
32
+ token: string;
33
+ /** Format: binary */
34
+ file: Blob;
35
+ };
36
+ export type ApiApiFileuploadResponseBody =
37
+ paths[ApiApiFileuploadPath][ApiApiFileuploadMethod]['responses']['200']['content']['application/json']['data'];
38
+
39
+ /** File_createDirectUpload */
40
+ export const ApiApiFilecreateDirectUploadPath = '/api/file/direct-upload';
41
+ export type ApiApiFilecreateDirectUploadPath = '/api/file/direct-upload';
42
+ export type ApiApiFilecreateDirectUploadMethod = 'post';
43
+ export type ApiApiFilecreateDirectUploadRequestBody =
44
+ components['schemas']['a-file.dto.fileDirectUploadRequest'];
45
+ export type ApiApiFilecreateDirectUploadResponseBody =
46
+ paths[ApiApiFilecreateDirectUploadPath][ApiApiFilecreateDirectUploadMethod]['responses']['200']['content']['application/json']['data'];
47
+
48
+ /** File_uploadUrl */
49
+ export const ApiApiFileuploadUrlPath = '/api/file/upload-url';
50
+ export type ApiApiFileuploadUrlPath = '/api/file/upload-url';
51
+ export type ApiApiFileuploadUrlMethod = 'post';
52
+ export type ApiApiFileuploadUrlRequestBody =
53
+ components['schemas']['a-file.dto.fileUploadUrlRequest'];
54
+ export type ApiApiFileuploadUrlResponseBody =
55
+ paths[ApiApiFileuploadUrlPath][ApiApiFileuploadUrlMethod]['responses']['200']['content']['application/json']['data'];
56
+
57
+ /** File_download */
58
+ export const ApiApiFiledownloadPath = '/api/file/download/{fileId}';
59
+ export type ApiApiFiledownloadPath = '/api/file/download/{fileId}';
60
+ export type ApiApiFiledownloadMethod = 'get';
61
+ export type ApiApiFiledownloadRequestParams =
62
+ paths[ApiApiFiledownloadPath][ApiApiFiledownloadMethod]['parameters']['path'];
63
+ export type ApiApiFiledownloadRequestQuery =
64
+ paths[ApiApiFiledownloadPath][ApiApiFiledownloadMethod]['parameters']['query'];
65
+ export type ApiApiFiledownloadResponseBody =
66
+ paths[ApiApiFiledownloadPath][ApiApiFiledownloadMethod]['responses']['200']['content']['application/json']['data'];
67
+
68
+ @Api()
69
+ export class ApiFile extends BeanApiBase {
70
+ getUploadPolicy(body: ApiApiFilegetUploadPolicyRequestBody, options?: IApiActionOptions) {
71
+ return this.$fetch.post<any, ApiApiFilegetUploadPolicyResponseBody>(
72
+ ApiApiFilegetUploadPolicyPath,
73
+ body,
74
+ this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
75
+ );
76
+ }
77
+
78
+ createUploadToken(body: ApiApiFilecreateUploadTokenRequestBody, options?: IApiActionOptions) {
79
+ return this.$fetch.post<any, ApiApiFilecreateUploadTokenResponseBody>(
80
+ ApiApiFilecreateUploadTokenPath,
81
+ body,
82
+ this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
83
+ );
84
+ }
85
+
86
+ upload(body: ApiApiFileuploadRequestBody, options?: IApiActionOptions) {
87
+ return this.$fetch.post<any, ApiApiFileuploadResponseBody>(
88
+ ApiApiFileuploadPath,
89
+ this.$formData(body),
90
+ this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
91
+ );
92
+ }
93
+
94
+ createDirectUpload(body: ApiApiFilecreateDirectUploadRequestBody, options?: IApiActionOptions) {
95
+ return this.$fetch.post<any, ApiApiFilecreateDirectUploadResponseBody>(
96
+ ApiApiFilecreateDirectUploadPath,
97
+ body,
98
+ this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
99
+ );
100
+ }
101
+
102
+ uploadUrl(body: ApiApiFileuploadUrlRequestBody, options?: IApiActionOptions) {
103
+ return this.$fetch.post<any, ApiApiFileuploadUrlResponseBody>(
104
+ ApiApiFileuploadUrlPath,
105
+ body,
106
+ this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
107
+ );
108
+ }
109
+
110
+ download(
111
+ options: {
112
+ params: ApiApiFiledownloadRequestParams;
113
+ query?: ApiApiFiledownloadRequestQuery;
114
+ } & IApiActionOptions,
115
+ ) {
116
+ return this.$fetch.get<any, ApiApiFiledownloadResponseBody>(
117
+ this.$pathTranslate(ApiApiFiledownloadPath, options.params),
118
+ this.$configPrepare(OpenApiBaseURL(this.sys), options),
119
+ );
120
+ }
121
+ }
@@ -0,0 +1,5 @@
1
+ import type { ZovaSys } from 'zova';
2
+
3
+ export const OpenApiBaseURL = (sys: ZovaSys) => {
4
+ return sys.util.getOpenApiBaseURL('OPENAPI_BASE_URL_BASIC_FILE');
5
+ };
@@ -0,0 +1,3 @@
1
+ export * from './baseURL.js';
2
+ export * from './schemas.js';
3
+ export * from './types.js';