@byted-apaas/server-sdk-node 1.1.18-beta.3 → 1.1.18-beta.4
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.
|
@@ -37,12 +37,12 @@ declare class MetaData<mt> implements IMetaData<mt> {
|
|
|
37
37
|
page(apiName: string, objectApiName: string, type: string): Page;
|
|
38
38
|
}
|
|
39
39
|
declare function metadata<mt>(ctx: any): IMetaData<mt>;
|
|
40
|
-
declare class
|
|
40
|
+
declare class MetaDataV3<mt> implements IMetaData<mt> {
|
|
41
41
|
constructor(ctx: any);
|
|
42
42
|
object<T>(objectApiName: keyof mt): IKObject<T>;
|
|
43
43
|
page(apiName: string, objectApiName: string, type: string): Page;
|
|
44
44
|
}
|
|
45
|
-
declare function
|
|
45
|
+
declare function metadataV3<mt>(ctx: any): IMetaData<mt>;
|
|
46
46
|
declare class Page implements IPage {
|
|
47
47
|
pageApiName: string;
|
|
48
48
|
objectApiName: string;
|
|
@@ -61,4 +61,4 @@ declare class Page implements IPage {
|
|
|
61
61
|
updateMobileList(componentName: string, params: any): Promise<void>;
|
|
62
62
|
}
|
|
63
63
|
declare function metaType(): any;
|
|
64
|
-
export { IMetaData, IKObject, IPage, MetaData, metadata, metaType,
|
|
64
|
+
export { IMetaData, IKObject, IPage, MetaData, metadata, metaType, MetaDataV3, metadataV3, };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 ByteDance Ltd. and/or its affiliates
|
|
3
3
|
// SPDX-License-Identifier: MIT
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.metadataV3 = exports.MetaDataV3 = exports.metaType = exports.metadata = exports.MetaData = void 0;
|
|
6
6
|
const components = require("./components/components");
|
|
7
7
|
const common = require("@byted-apaas/server-common-node");
|
|
8
8
|
const fields = require("./objects/fields");
|
|
@@ -36,7 +36,7 @@ function metadata(ctx) {
|
|
|
36
36
|
return new MetaData(ctx);
|
|
37
37
|
}
|
|
38
38
|
exports.metadata = metadata;
|
|
39
|
-
class
|
|
39
|
+
class MetaDataV3 {
|
|
40
40
|
constructor(ctx) {
|
|
41
41
|
}
|
|
42
42
|
object(objectApiName) {
|
|
@@ -58,11 +58,11 @@ class MetaDataV2 {
|
|
|
58
58
|
return new Page(apiName, objectApiName, type);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
exports.
|
|
62
|
-
function
|
|
61
|
+
exports.MetaDataV3 = MetaDataV3;
|
|
62
|
+
function metadataV3(ctx) {
|
|
63
63
|
return new MetaData(ctx);
|
|
64
64
|
}
|
|
65
|
-
exports.
|
|
65
|
+
exports.metadataV3 = metadataV3;
|
|
66
66
|
class KObject {
|
|
67
67
|
constructor(objectApiName) {
|
|
68
68
|
this.objectApiName = objectApiName;
|
package/global/global.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { _Resources } from '../context/resources/impl/resources';
|
|
|
7
7
|
import { Message } from '../context/msg/msg';
|
|
8
8
|
import { _IIntegration } from '../context/integration/IIntegration';
|
|
9
9
|
import { DBV3 } from '../context/db/impl/dbV3';
|
|
10
|
-
import {
|
|
10
|
+
import { MetaDataV3 } from '../context/metadata/metadata';
|
|
11
11
|
declare global {
|
|
12
12
|
export namespace application {
|
|
13
13
|
/**
|
|
@@ -27,13 +27,13 @@ declare global {
|
|
|
27
27
|
*/
|
|
28
28
|
let operator: IOperator;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* dataV3 接口
|
|
31
31
|
*/
|
|
32
|
-
let
|
|
32
|
+
let dataV3: DBV3<{}>;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* metadataV3 接口
|
|
35
35
|
*/
|
|
36
|
-
let
|
|
36
|
+
let metadataV3: MetaDataV3<{}>;
|
|
37
37
|
/**
|
|
38
38
|
* 常量
|
|
39
39
|
*/
|
package/hooks/hooks.js
CHANGED
|
@@ -74,7 +74,7 @@ function mountApplication(context) {
|
|
|
74
74
|
global.application = {};
|
|
75
75
|
}
|
|
76
76
|
global.application.data = new db_1.DB();
|
|
77
|
-
global.application.
|
|
77
|
+
global.application.dataV3 = new dbV3_1.DBV3();
|
|
78
78
|
// publicAPI
|
|
79
79
|
if (!global.application.publicAPI) {
|
|
80
80
|
global.application.publicAPI = {};
|
|
@@ -86,7 +86,7 @@ function mountApplication(context) {
|
|
|
86
86
|
global.application.msg = new msg_1.Message();
|
|
87
87
|
global.application.resources = new resources_1._Resources();
|
|
88
88
|
global.application.metadata = metadataApi.metadata(context);
|
|
89
|
-
global.application.
|
|
89
|
+
global.application.metadataV3 = metadataApi.metadataV3(context);
|
|
90
90
|
// globalVar
|
|
91
91
|
if (!global.application.globalVar) {
|
|
92
92
|
global.application.globalVar = {};
|