@lemoncloud/clipbiz-goods-api 0.25.1028 → 0.25.1125

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.
@@ -14,4 +14,20 @@ export * from '../modules/sites/views';
14
14
  export * from '../modules/goods/views';
15
15
  export * from '../modules/exams/views';
16
16
  export * from '../modules/ai/views';
17
+ export * from '../modules/contracts/views';
17
18
  export * from '../modules/mock/views';
19
+ import { View } from '../cores/types';
20
+ /**
21
+ * type: `PopulateView`
22
+ * - used to populate view w/ parent-child relationship
23
+ */
24
+ export interface PopulateView<T> extends View {
25
+ /**
26
+ * type of populate mode
27
+ */
28
+ mode: 'clone' | 'revision';
29
+ /** (readonly) the parent view */
30
+ readonly $parent?: T;
31
+ /** (readonly) the child view */
32
+ readonly $child?: T;
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemoncloud/clipbiz-goods-api",
3
- "version": "0.25.1028",
3
+ "version": "0.25.1125",
4
4
  "description": "clipbiz-goods management api",
5
5
  "types": "dist/view/types.d.ts",
6
6
  "scripts": {},
@@ -1,143 +0,0 @@
1
- /**
2
- * `openai-types.ts`
3
- * - common types definitions for openai service
4
- *
5
- * @author Steve <steve@lemoncloud.io>
6
- * @date 2025-11-19 initial version.
7
- *
8
- * @copyright (C) lemoncloud.io 2025 - All Rights Reserved.
9
- */
10
- /**
11
- * type: `GenAIParam`
12
- * - parameter for GenAI execution
13
- */
14
- export interface GenAIParam {
15
- /** llm model to use */
16
- model: GenModelType;
17
- /**
18
- * (optional) temperature
19
- * - a number between 0 and 2, where lower values make the output more focused and deterministic,
20
- * while higher values make it more random and creative.
21
- * - default is 1.0
22
- * - if not set, the default value of the model will be used.
23
- */
24
- temperature?: number;
25
- /**
26
- * (internal) flag in mockup mode
27
- * - if input is like `#1`, then it will be in mockup mode.
28
- */
29
- isMocks?: boolean;
30
- }
31
- /**
32
- * type: `GenAIRequest`
33
- * - request for GenAI service
34
- */
35
- export interface GenAIRequest<T extends string = any> {
36
- /** system prompt */
37
- system?: DocumentContent<T>;
38
- /** user prompt w/ template */
39
- user?: DocumentContent<T>;
40
- /** input prompt (or query) */
41
- input?: DocumentContent<T>;
42
- /** (optional) related documents after using RAG search */
43
- documents?: DocumentContent<T>[];
44
- /** (optional) chat histories (order by desc) */
45
- histories?: DocumentContent<T>[];
46
- }
47
- /**
48
- * type: `DocumentInput`
49
- */
50
- export interface DocumentInput {
51
- /** document id */
52
- id?: string;
53
- /** (internal) type of document */
54
- type?: string;
55
- /** content */
56
- content?: string;
57
- /** site id in session */
58
- sid?: string;
59
- /** user id in session */
60
- uid?: string;
61
- /** (internal) id of parent */
62
- pid?: string;
63
- }
64
- /**
65
- * the type of `DocumentInput` without `contents`.
66
- */
67
- export interface DocumentContent<T extends string = any> extends DocumentInput {
68
- /** stereo type for document */
69
- stereo?: T;
70
- }
71
- /**
72
- * type: `GenAIResponse`
73
- * - response for GenAI service
74
- */
75
- export interface GenAIResponse<T extends string = any> {
76
- /** output prompt (or answer) */
77
- output: DocumentContent<T>;
78
- /** usage in detail */
79
- usage?: TokenUsageDetail;
80
- }
81
- /**
82
- * type: `TokenUsageResponse`
83
- */
84
- export interface TokenUsageDetail {
85
- /** prompt token */
86
- promptToken?: number;
87
- /** completion token */
88
- completionToken?: number;
89
- /** total token */
90
- totalToken?: number;
91
- /** image token */
92
- imageToken?: number;
93
- /** embedding token */
94
- embeddingToken?: number;
95
- /** vision token */
96
- visionToken?: number;
97
- /** classification token */
98
- classificationToken?: number;
99
- /** search token */
100
- searchToken?: number;
101
- }
102
- /**
103
- * type: `OPENAI_LUT`
104
- */
105
- export declare const $LUT_OPENAI: {
106
- /** type: EncodingFormat */
107
- EncodingFormat: {
108
- float: string;
109
- base64: string;
110
- };
111
- /** type: GenRoleType */
112
- GenRoleType: {
113
- system: string;
114
- user: string;
115
- assistant: string;
116
- };
117
- /**
118
- * as `GenModelType`
119
- */
120
- GenModelType: {
121
- 'gpt-4o': string;
122
- 'gpt-4o-mini': string;
123
- 'gpt-4-turbo': string;
124
- 'gpt-4': string;
125
- 'gpt-4.1': string;
126
- 'gpt-5': string;
127
- 'gpt-5-mini': string;
128
- 'gpt-5.1': string;
129
- 'gpt-3.5-turbo': string;
130
- };
131
- };
132
- /**
133
- * type: `EncodingFormat`
134
- */
135
- export declare type EncodingFormat = keyof typeof $LUT_OPENAI.EncodingFormat;
136
- /**
137
- * type: `GenRoleType`
138
- */
139
- export declare type GenRoleType = keyof typeof $LUT_OPENAI.GenRoleType;
140
- /**
141
- * type: `GenModelType`
142
- */
143
- export declare type GenModelType = keyof typeof $LUT_OPENAI.GenModelType;