@ones-open/node-sdk 0.0.3 → 0.0.4-10001.152

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.
@@ -9,7 +9,7 @@ export type * from './types';
9
9
  /**
10
10
  * @constant entity
11
11
  * @function EntityFactory
12
- * @description 实体
12
+ * @description Entity
13
13
  * @member Sort
14
14
  * @member EntityErrorCode
15
15
  * @member WhereConditions
@@ -7,147 +7,147 @@ import type { BaseEntityStruct, BaseIndexesStruct, BaseIndexesStructValue } from
7
7
  import type { defaultEntityQueryCursor, defaultEntityQueryLimit, defaultEntityQuerySort, defaultEntityQueryIndex, defaultEntityQueryWhere } from './consts';
8
8
  export type LimitNumber = IntClosedRange<1, 998> | 999 | 1000;
9
9
  /**
10
- * @description 实体查询对象
11
- * @typedef EntityStruct 实体数据结构体
12
- * @typedef IndexesStruct 实体索引结构体
10
+ * @description Entity query object
11
+ * @typedef EntityStruct Entity data structure
12
+ * @typedef IndexesStruct Entity index structure
13
13
  */
14
14
  export interface BaseEntityQuery<EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>> {
15
15
  /**
16
- * @description 设置实体查询游标
17
- * @param cursor 游标
16
+ * @description Set entity query cursor
17
+ * @param cursor Cursor
18
18
  * @returns EntityQuery
19
19
  */
20
20
  cursor(cursor: string | typeof defaultEntityQueryCursor): BaseEntityQuery<EntityStruct, IndexesStruct>;
21
21
  /**
22
- * @description 设置实体查询长度
22
+ * @description Set entity query limit
23
23
  * @satisfies [1, 1000]
24
- * @param limit 长度
24
+ * @param limit Limit
25
25
  * @returns EntityQuery
26
26
  */
27
27
  limit(limit: LimitNumber | typeof defaultEntityQueryLimit): BaseEntityQuery<EntityStruct, IndexesStruct>;
28
28
  /**
29
- * @description 设置实体查询排序
30
- * @param sort 排序
29
+ * @description Set entity query sort order
30
+ * @param sort Sort order
31
31
  * @returns EntityQuery
32
32
  */
33
33
  sort(sort: EntitySortEnum | typeof defaultEntityQuerySort): BaseEntityQuery<EntityStruct, IndexesStruct>;
34
34
  /**
35
- * @description 获取一条实体数据
36
- * @returns 实体数据 value
35
+ * @description Get one entity record
36
+ * @returns Entity data value
37
37
  */
38
38
  getOne(): Promise<EntityResultData<EntityStruct> | undefined>;
39
39
  /**
40
- * @description 获取实体数据数组
41
- * @returns 实体数据分页查询结果对象
40
+ * @description Get entity data array
41
+ * @returns Entity data paginated query result object
42
42
  */
43
43
  getMany(): Promise<EntityListResultData<EntityStruct>>;
44
44
  /**
45
- * @description 获取实体数据总数
46
- * @returns 实体数据总数
45
+ * @description Get total count of entity data
46
+ * @returns Total count
47
47
  */
48
48
  count(): Promise<number>;
49
49
  }
50
50
  /**
51
- * @description 实体查询对象
52
- * @typedef EntityStruct 实体数据结构体
53
- * @typedef IndexesStruct 实体索引结构体
51
+ * @description Entity query object
52
+ * @typedef EntityStruct Entity data structure
53
+ * @typedef IndexesStruct Entity index structure
54
54
  */
55
55
  export interface InferIndexEntityQuery<EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>> extends BaseEntityQuery<EntityStruct, IndexesStruct> {
56
56
  cursor: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['cursor'], InferIndexEntityQuery<EntityStruct, IndexesStruct>>;
57
57
  limit: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['limit'], InferIndexEntityQuery<EntityStruct, IndexesStruct>>;
58
58
  sort: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['sort'], InferIndexEntityQuery<EntityStruct, IndexesStruct>>;
59
59
  /**
60
- * @description 设置实体查询索引
61
- * @param index 索引
62
- * @param partitions 索引分区的属性值
60
+ * @description Set entity query index
61
+ * @param index Index
62
+ * @param partitions Partition attribute values of the index
63
63
  * @returns EntityQuery
64
64
  */
65
65
  index<IndexKey extends keyof ConditionalExcept<IndexesStruct, null>>(index: IndexKey, partitions: IndexesStruct[IndexKey]): InferWhereEntityQuery<EntityStruct, IndexesStruct>;
66
66
  /**
67
- * @description 设置实体查询索引
68
- * @param index 索引
67
+ * @description Set entity query index
68
+ * @param index Index
69
69
  * @returns EntityQuery
70
70
  */
71
71
  index<IndexKey extends keyof ConditionalPick<IndexesStruct, null>>(index: IndexKey): InferWhereEntityQuery<EntityStruct, IndexesStruct>;
72
72
  /**
73
- * @description 设置实体查询索引
74
- * @param index 索引
73
+ * @description Set entity query index
74
+ * @param index Index
75
75
  * @returns EntityQuery
76
76
  */
77
77
  index(index: typeof defaultEntityQueryIndex): InferWhereEntityQuery<EntityStruct, IndexesStruct>;
78
78
  }
79
79
  /**
80
- * @description 实体查询对象
81
- * @typedef EntityStruct 实体数据结构体
82
- * @typedef IndexesStruct 实体索引结构体
80
+ * @description Entity query object
81
+ * @typedef EntityStruct Entity data structure
82
+ * @typedef IndexesStruct Entity index structure
83
83
  */
84
84
  export interface InputIndexEntityQuery<EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>> extends BaseEntityQuery<EntityStruct, IndexesStruct> {
85
85
  cursor: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['cursor'], InputIndexEntityQuery<EntityStruct, IndexesStruct>>;
86
86
  limit: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['limit'], InputIndexEntityQuery<EntityStruct, IndexesStruct>>;
87
87
  sort: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['sort'], InputIndexEntityQuery<EntityStruct, IndexesStruct>>;
88
88
  /**
89
- * @description 设置实体查询索引
90
- * @typedef Partitions 索引分区的属性值类型
91
- * @param index 索引
92
- * @param partitions 索引分区的属性值
89
+ * @description Set entity query index
90
+ * @typedef Partitions Partition attribute value type of index
91
+ * @param index Index
92
+ * @param partitions Partition attribute values of the index
93
93
  * @returns EntityQuery
94
94
  */
95
95
  index<Partitions extends BaseIndexesStructValue>(index: string, partitions: Partitions): InputWhereEntityQuery<EntityStruct, IndexesStruct>;
96
96
  /**
97
- * @description 设置实体查询索引
98
- * @param index 索引
97
+ * @description Set entity query index
98
+ * @param index Index
99
99
  * @returns EntityQuery
100
100
  */
101
101
  index(index: string): InputWhereEntityQuery<EntityStruct, IndexesStruct>;
102
102
  /**
103
- * @description 设置实体查询索引
104
- * @param index 索引
103
+ * @description Set entity query index
104
+ * @param index Index
105
105
  * @returns EntityQuery
106
106
  */
107
107
  index(index: typeof defaultEntityQueryIndex): InputWhereEntityQuery<EntityStruct, IndexesStruct>;
108
108
  }
109
109
  /**
110
- * @description 实体查询对象
111
- * @typedef EntityStruct 实体数据结构体
112
- * @typedef IndexesStruct 实体索引结构体
110
+ * @description Entity query object
111
+ * @typedef EntityStruct Entity data structure
112
+ * @typedef IndexesStruct Entity index structure
113
113
  */
114
114
  export interface InferWhereEntityQuery<EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>> extends InferIndexEntityQuery<EntityStruct, IndexesStruct> {
115
115
  cursor: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['cursor'], InferWhereEntityQuery<EntityStruct, IndexesStruct>>;
116
116
  limit: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['limit'], InferWhereEntityQuery<EntityStruct, IndexesStruct>>;
117
117
  sort: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['sort'], InferWhereEntityQuery<EntityStruct, IndexesStruct>>;
118
118
  /**
119
- * @description 设置实体查询条件
120
- * @param condition 条件
119
+ * @description Set entity query condition
120
+ * @param condition Condition
121
121
  * @returns EntityQuery
122
122
  */
123
123
  where(condition: EntityWhereCondition | typeof defaultEntityQueryWhere): InferWhereEntityQuery<EntityStruct, IndexesStruct>;
124
124
  }
125
125
  /**
126
- * @description 实体查询对象
127
- * @typedef EntityStruct 实体数据结构体
128
- * @typedef IndexesStruct 实体索引结构体
126
+ * @description Entity query object
127
+ * @typedef EntityStruct Entity data structure
128
+ * @typedef IndexesStruct Entity index structure
129
129
  */
130
130
  export interface InputWhereEntityQuery<EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>> extends InputIndexEntityQuery<EntityStruct, IndexesStruct> {
131
131
  cursor: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['cursor'], InputWhereEntityQuery<EntityStruct, IndexesStruct>>;
132
132
  limit: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['limit'], InputWhereEntityQuery<EntityStruct, IndexesStruct>>;
133
133
  sort: SetReturnType<BaseEntityQuery<EntityStruct, IndexesStruct>['sort'], InputWhereEntityQuery<EntityStruct, IndexesStruct>>;
134
134
  /**
135
- * @description 设置实体查询条件
136
- * @param condition 条件
135
+ * @description Set entity query condition
136
+ * @param condition Condition
137
137
  * @returns EntityQuery
138
138
  */
139
139
  where(condition: EntityWhereCondition | typeof defaultEntityQueryWhere): InputWhereEntityQuery<EntityStruct, IndexesStruct>;
140
140
  }
141
141
  /**
142
- * @description 实体查询对象
143
- * @typedef EntityStruct 实体数据结构体
144
- * @typedef IndexesStruct 实体索引结构体
142
+ * @description Entity query object
143
+ * @typedef EntityStruct Entity data structure
144
+ * @typedef IndexesStruct Entity index structure
145
145
  */
146
146
  export type UnionEntityQuery<EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>> = BaseEntityQuery<EntityStruct, IndexesStruct> | InferIndexEntityQuery<EntityStruct, IndexesStruct> | InputIndexEntityQuery<EntityStruct, IndexesStruct> | InferWhereEntityQuery<EntityStruct, IndexesStruct> | InputWhereEntityQuery<EntityStruct, IndexesStruct>;
147
147
  /**
148
- * @description 实体查询对象
149
- * @typedef EntityStruct 实体数据结构体
150
- * @typedef IndexesStruct 实体索引结构体
148
+ * @description Entity query object
149
+ * @typedef EntityStruct Entity data structure
150
+ * @typedef IndexesStruct Entity index structure
151
151
  */
152
152
  export type EntityQuery<EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>> = UnionToIntersection<UnionEntityQuery<EntityStruct, IndexesStruct>>;
153
153
  export interface DefaultEntityQuery {
@@ -6,48 +6,48 @@ export type EntityCountResult = EntityResult<{
6
6
  }>;
7
7
  export type EntityListResult<EntityStruct> = EntityResult<EntityListResultData<EntityStruct>>;
8
8
  /**
9
- * @description 实体数据查询结果对象
10
- * @typedef EntityStruct 实体数据结构体
9
+ * @description Entity data query result object
10
+ * @typedef EntityStruct Entity data structure
11
11
  */
12
12
  export interface EntityResultData<EntityStruct> {
13
13
  /**
14
- * @description 数据 key
14
+ * @description Data key
15
15
  */
16
16
  key: string;
17
17
  /**
18
- * @description 数据 value
18
+ * @description Data value
19
19
  */
20
20
  value: EntityStruct;
21
21
  }
22
22
  /**
23
- * @description 实体数据分页查询结果对象
24
- * @typedef EntityStruct 实体数据结构体
23
+ * @description Entity data paginated query result object
24
+ * @typedef EntityStruct Entity data structure
25
25
  */
26
26
  export interface EntityListResultData<EntityStruct> {
27
27
  /**
28
- * @description 分页信息
28
+ * @description Pagination info
29
29
  */
30
30
  page_info: {
31
31
  /**
32
- * @description 当前分页数据总数
32
+ * @description Total count of current page
33
33
  */
34
34
  count: number;
35
35
  /**
36
- * @description 是否有更多数据
36
+ * @description Whether there is more data
37
37
  */
38
38
  has_more: boolean;
39
39
  /**
40
- * @description 当前分页末尾数据游标
40
+ * @description Cursor at end of current page
41
41
  */
42
42
  end_cursor: string;
43
43
  };
44
44
  /**
45
- * @description 分页数据数组
45
+ * @description Paginated data array
46
46
  */
47
47
  data: EntityResultData<EntityStruct>[];
48
48
  }
49
49
  /**
50
- * @description 实体查询或者操作错误对象
50
+ * @description Entity query or operation error object
51
51
  */
52
52
  export type EntityError = ErrorResult<never, EntityErrorCode>;
53
53
  //# sourceMappingURL=types.d.ts.map
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * @enum EntitySortEnum
3
- * @description 实体排序枚举
3
+ * @description Entity sort order enum
4
4
  */
5
5
  export declare enum EntitySortEnum {
6
6
  /**
7
- * @description 正序
7
+ * @description Ascending
8
8
  */
9
9
  ASC = "ASC",
10
10
  /**
11
- * @description 倒序
11
+ * @description Descending
12
12
  */
13
13
  DESC = "DESC"
14
14
  }
@@ -6,40 +6,40 @@ import type { Entity, BaseEntityStruct, BaseIndexesStruct } from './entity';
6
6
  import type { defaultEntityQueryCursor, defaultEntityQueryIndex, defaultEntityQueryLimit, defaultEntityQuerySort, defaultEntityQueryWhere } from './query';
7
7
  export interface EntityStatic {
8
8
  /**
9
- * @description 实体排序枚举
9
+ * @description Entity sort order enum
10
10
  */
11
11
  Sort: typeof EntitySortEnum;
12
12
  /**
13
- * @description 实体错误码枚举
13
+ * @description Entity error code enum
14
14
  */
15
15
  EntityErrorCode: typeof EntityErrorCode;
16
16
  /**
17
- * @description 实体查询条件方法枚举
17
+ * @description Entity query condition method enum
18
18
  */
19
19
  WhereConditions: typeof WhereConditions;
20
20
  /**
21
- * @description 实体查询游标默认值
21
+ * @description Default entity query cursor
22
22
  */
23
23
  defaultEntityQueryCursor: typeof defaultEntityQueryCursor;
24
24
  /**
25
- * @description 实体查询索引默认值
25
+ * @description Default entity query index
26
26
  */
27
27
  defaultEntityQueryIndex: typeof defaultEntityQueryIndex;
28
28
  /**
29
- * @description 实体查询长度默认值
29
+ * @description Default entity query limit
30
30
  */
31
31
  defaultEntityQueryLimit: typeof defaultEntityQueryLimit;
32
32
  /**
33
- * @description 实体查询排序默认值
33
+ * @description Default entity query sort
34
34
  */
35
35
  defaultEntityQuerySort: typeof defaultEntityQuerySort;
36
36
  /**
37
- * @description 实体查询条件默认值
37
+ * @description Default entity query condition
38
38
  */
39
39
  defaultEntityQueryWhere: typeof defaultEntityQueryWhere;
40
40
  }
41
41
  /**
42
- * @description 编译时自动生成
42
+ * @description Auto-generated at compile time
43
43
  * @example
44
44
  * declare global {
45
45
  * var ONESEntities: {
@@ -61,19 +61,19 @@ type PluginEntities = FindGlobalType<'ONESEntities'>;
61
61
  export interface BaseEntityFactory {
62
62
  /**
63
63
  * @function EntityFactory
64
- * @description 创建实体操作对象
65
- * @typedef EntityStruct 实体数据结构体
66
- * @typedef IndexesStruct 实体索引结构体
67
- * @param entityName 实体名称
64
+ * @description Create entity operation object
65
+ * @typedef EntityStruct Entity data structure
66
+ * @typedef IndexesStruct Entity index structure
67
+ * @param entityName Entity name
68
68
  * @returns Entity
69
69
  */
70
70
  <EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>>(entityName: string): Entity<EntityStruct, IndexesStruct>;
71
71
  /**
72
72
  * @function EntityFactory
73
- * @description 创建实体操作对象
74
- * @typedef EntityStruct 实体数据结构体
75
- * @typedef IndexesStruct 实体索引结构体
76
- * @param entityName 实体名称
73
+ * @description Create entity operation object
74
+ * @typedef EntityStruct Entity data structure
75
+ * @typedef IndexesStruct Entity index structure
76
+ * @param entityName Entity name
77
77
  * @returns Entity
78
78
  */
79
79
  <EntityStruct extends BaseEntityStruct<EntityStruct>>(entityName: string): Entity<EntityStruct, EmptyObject>;
@@ -81,28 +81,28 @@ export interface BaseEntityFactory {
81
81
  export interface PluginEntityFactory {
82
82
  /**
83
83
  * @function EntityFactory
84
- * @description 创建实体操作对象
85
- * @typedef EntityStruct 实体数据结构体
86
- * @typedef IndexesStruct 实体索引结构体
87
- * @param entityName 实体名称
84
+ * @description Create entity operation object
85
+ * @typedef EntityStruct Entity data structure
86
+ * @typedef IndexesStruct Entity index structure
87
+ * @param entityName Entity name
88
88
  * @returns Entity
89
89
  */
90
90
  <EntityName extends keyof PluginEntities>(entityName: EntityName): Entity<Get<PluginEntities, Exclude<EntityName, number | symbol>>['attributes'], Get<PluginEntities, Exclude<EntityName, number | symbol>>['indexes']>;
91
91
  /**
92
92
  * @function EntityFactory
93
- * @description 创建实体操作对象
94
- * @typedef EntityStruct 实体数据结构体
95
- * @typedef IndexesStruct 实体索引结构体
96
- * @param entityName 实体名称
93
+ * @description Create entity operation object
94
+ * @typedef EntityStruct Entity data structure
95
+ * @typedef IndexesStruct Entity index structure
96
+ * @param entityName Entity name
97
97
  * @returns Entity
98
98
  */
99
99
  <EntityStruct extends BaseEntityStruct<EntityStruct>, IndexesStruct extends BaseIndexesStruct<IndexesStruct>>(entityName: string): Entity<EntityStruct, IndexesStruct>;
100
100
  /**
101
101
  * @function EntityFactory
102
- * @description 创建实体操作对象
103
- * @typedef EntityStruct 实体数据结构体
104
- * @typedef IndexesStruct 实体索引结构体
105
- * @param entityName 实体名称
102
+ * @description Create entity operation object
103
+ * @typedef EntityStruct Entity data structure
104
+ * @typedef IndexesStruct Entity index structure
105
+ * @param entityName Entity name
106
106
  * @returns Entity
107
107
  */
108
108
  <EntityStruct extends BaseEntityStruct<EntityStruct>>(entityName: string): Entity<EntityStruct, EmptyObject>;
@@ -3,7 +3,7 @@ export * from './consts';
3
3
  export * from './types';
4
4
  /**
5
5
  * @constant WhereConditions
6
- * @description 实体查询条件方法枚举
6
+ * @description Entity query condition method enum
7
7
  */
8
8
  export declare const WhereConditions: {
9
9
  /**
@@ -1,19 +1,19 @@
1
1
  /**
2
2
  * @enum ObjectErrorCode
3
- * @description 对象存储错误码枚举
3
+ * @description Object storage error code enum
4
4
  */
5
5
  export declare enum ObjectErrorCode {
6
6
  /**
7
- * @description 对象存储 key 为空/包含非法字符/超出最大长度限制
7
+ * @description Object storage key is empty / contains invalid characters / exceeds max length
8
8
  * @satisfies /^[0-9a-zA-Z!_.*'()-]{1,128}$/
9
9
  */
10
10
  ObjectKeyInvalid = "ObjectKeyInvalid",
11
11
  /**
12
- * @description 对象存储 key 不存在
12
+ * @description Object storage key does not exist
13
13
  */
14
14
  ObjectKeyNotfound = "ObjectKeyNotfound",
15
15
  /**
16
- * @description 请求超时
16
+ * @description Request timeout
17
17
  */
18
18
  RequestTimeOut = "RequestTimeOut"
19
19
  }
@@ -2,19 +2,19 @@ import type { ObjectErrorResult } from './types';
2
2
  export * from './consts';
3
3
  export * from './types';
4
4
  /**
5
- * @description 对象存储操作错误对象
5
+ * @description Object storage operation error object
6
6
  */
7
7
  export declare class ObjectError implements ObjectErrorResult {
8
8
  /**
9
- * @description 错误码枚举
9
+ * @description Error code enum
10
10
  */
11
11
  code: import("../../..").ErrorCode | import("./consts").ObjectErrorCode;
12
12
  /**
13
- * @description 错误文案
13
+ * @description Error message
14
14
  */
15
15
  err_msg: string;
16
16
  /**
17
- * @description 错误载荷
17
+ * @description Error payload
18
18
  */
19
19
  err_values: Record<string, any> | undefined;
20
20
  constructor(result: ObjectErrorResult);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/packages/node/storage/object/fetch/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAGV,qBAAqB,EAErB,uBAAuB,EAEvB,qBAAqB,EAErB,uBAAuB,EAExB,MAAM,SAAS,CAAA;AAEhB,cAAc,SAAS,CAAA;AAyCvB,eAAO,MAAM,WAAW,EAAE,qBAKzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,uBAK3B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,qBAKzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,uBAK3B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/packages/node/storage/object/fetch/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAGV,qBAAqB,EAErB,uBAAuB,EAEvB,qBAAqB,EAErB,uBAAuB,EAExB,MAAM,SAAS,CAAA;AAEhB,cAAc,SAAS,CAAA;AAwDvB,eAAO,MAAM,WAAW,EAAE,qBAKzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,uBAK3B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,qBAEzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,uBAE3B,CAAA"}
@@ -5,7 +5,7 @@ export type * from './result';
5
5
  export type * from './types';
6
6
  /**
7
7
  * @constant object
8
- * @description 对象存储
8
+ * @description Object storage
9
9
  * @member ObjectError
10
10
  * @member ObjectErrorCode
11
11
  * @member upload
@@ -15,15 +15,15 @@ export type ObjectDownloadResult = ObjectResult<{
15
15
  }>;
16
16
  export type ObjectDeleteResult = ObjectResult<never>;
17
17
  /**
18
- * @description 对象的元信息的结果对象
18
+ * @description Result object for object metadata
19
19
  */
20
20
  export interface ObjectMetadataResultData {
21
21
  /**
22
- * @description 对象存储 key
22
+ * @description Object storage key
23
23
  */
24
24
  object_key: string;
25
25
  /**
26
- * @description 文件大小,字节
26
+ * @description File size in bytes
27
27
  */
28
28
  size: number;
29
29
  }
@@ -1,64 +1,64 @@
1
1
  import type { ObjectError, ObjectErrorCode } from './error';
2
2
  import type { ObjectResultDataFields, ObjectMetadataResultData } from './result';
3
3
  /**
4
- * @description 获取上传信息的操作对象
4
+ * @description Operation object for getting upload info
5
5
  */
6
6
  export interface ObjectStoreUploadResult {
7
7
  /**
8
- * @description 获取上传地址(需要在插件后端请求)
8
+ * @description Get upload URL (must be requested from plugin backend)
9
9
  */
10
10
  getUrl(): string;
11
11
  /**
12
- * @description 获取上传地址(适合在浏览器中请求)
12
+ * @description Get upload URL (suitable for browser requests)
13
13
  */
14
14
  getWebUrl(): string;
15
15
  /**
16
- * @description 获取请求的 FormData 参数
16
+ * @description Get FormData parameters for the request
17
17
  */
18
18
  getFields(): ObjectResultDataFields;
19
19
  }
20
20
  /**
21
- * @description 获取下载信息的操作对象
21
+ * @description Operation object for getting download info
22
22
  */
23
23
  export interface ObjectStoreDownloadResult {
24
24
  /**
25
- * @description 获取下载地址(需要在插件后端请求)
25
+ * @description Get download URL (must be requested from plugin backend)
26
26
  */
27
27
  getUrl(): string;
28
28
  /**
29
- * @description 获取下载地址(适合在浏览器中请求)
29
+ * @description Get download URL (suitable for browser requests)
30
30
  */
31
31
  getWebUrl(): string;
32
32
  }
33
33
  export interface ObjectStore {
34
34
  /**
35
- * @description 对象存储操作错误对象
35
+ * @description Object storage operation error object
36
36
  */
37
37
  ObjectError: typeof ObjectError;
38
38
  /**
39
- * @description 对象存储错误码枚举
39
+ * @description Object storage error code enum
40
40
  */
41
41
  ObjectErrorCode: typeof ObjectErrorCode;
42
42
  /**
43
- * @description 上传一个对象
44
- * @param key 对象存储 key
43
+ * @description Upload an object
44
+ * @param key Object storage key
45
45
  * @returns ObjectStoreUploadResult
46
46
  */
47
47
  upload(key: string): Promise<ObjectStoreUploadResult | ObjectError>;
48
48
  /**
49
- * @description 下载一个对象
50
- * @param key 对象存储 key
49
+ * @description Download an object
50
+ * @param key Object storage key
51
51
  * @returns ObjectStoreDownloadResult
52
52
  */
53
53
  download(key: string): Promise<ObjectStoreDownloadResult | ObjectError>;
54
54
  /**
55
- * @description 删除一个对象
56
- * @param key 对象存储 key
55
+ * @description Delete an object
56
+ * @param key Object storage key
57
57
  */
58
58
  delete(key: string): Promise<void | ObjectError>;
59
59
  /**
60
- * @description 获取一个对象的元信息
61
- * @param key 对象存储 key
60
+ * @description Get metadata of an object
61
+ * @param key Object storage key
62
62
  * @returns ObjectMetadataResultData
63
63
  */
64
64
  metadata(key: string): Promise<ObjectMetadataResultData | ObjectError>;
@@ -1,35 +1,19 @@
1
1
  /**
2
- * @description 获取开放平台 host
3
- * @alias getPlatformApiHost
4
- * @alias getPlatformAPIHost
5
- * @returns platformApiHost
2
+ * @description Get the open platform base URL
3
+ * @alias getONESHostedBaseUrl
4
+ * @returns ONES_HOSTED_BASE_URL
6
5
  */
7
- export declare const getPlatformApiHost: () => string;
6
+ export declare const getONESHostedBaseUrl: () => string | undefined;
8
7
  /**
9
- * @description 获取开放平台 host
10
- * @alias getPlatformApiHost
11
- * @alias getPlatformAPIHost
12
- * @returns platformApiHost
8
+ * @description Get the app instance ID
9
+ * @alias getONESHostedAppID
10
+ * @returns ONES_HOSTED_APP_ID
13
11
  */
14
- export declare const getPlatformAPIHost: () => string;
12
+ export declare const getONESHostedAppID: () => string | undefined;
15
13
  /**
16
- * @description 获取插件实例 ID
17
- * @alias getInstanceId
18
- * @returns instanceId
14
+ * @description Get the app hosted token
15
+ * @alias getONESHostedToken
16
+ * @returns ONES_HOSTED_TOKEN
19
17
  */
20
- export declare const getInstanceId: () => string;
21
- /**
22
- * @description 获取插件 ID
23
- * @alias getApplicationId
24
- * @alias getAppId
25
- * @returns applicationId
26
- */
27
- export declare const getApplicationId: () => string;
28
- /**
29
- * @description 获取插件 ID
30
- * @alias getApplicationId
31
- * @alias getAppId
32
- * @returns applicationId
33
- */
34
- export declare const getAppId: () => string;
18
+ export declare const getONESHostedToken: () => string | undefined;
35
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/strict/env/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,cAE9B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,cAAqB,CAAA;AAEpD;;;;GAIG;AACH,eAAO,MAAM,aAAa,cAEzB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,cAE5B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,cAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/strict/env/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,0BAEhC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,0BAE9B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,0BAE9B,CAAA"}