@lingya-ai/agents-sdk 0.7.0 → 0.7.1

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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ Use HMAC on trusted Node.js servers or single-use tokens in browsers.
8
8
  Installation
9
9
 
10
10
  ```bash
11
- npm install @lingya-ai/agents-sdk@0.7.0
11
+ npm install @lingya-ai/agents-sdk@0.7.1
12
12
  ```
13
13
 
14
14
  Node 入口需要 Node.js 20 或更高版本;浏览器入口使用现代 Web API。
@@ -31,6 +31,10 @@ export interface GeneratePreSignedUrlInput {
31
31
  * 文件 ID / file ID。
32
32
  */
33
33
  fileId?: number | null;
34
+ /**
35
+ * 实际文件大小(字节) / actual file size in bytes。
36
+ */
37
+ sizeBytes?: number | null;
34
38
  }
35
39
  /**
36
40
  * @export
@@ -43,6 +43,7 @@ export function GeneratePreSignedUrlInputFromJSONTyped(json, ignoreDiscriminator
43
43
  'module': json['module'],
44
44
  'contentMd5': json['contentMd5'],
45
45
  'fileId': json['fileId'] === undefined ? undefined : json['fileId'] === null ? null : json['fileId'],
46
+ 'sizeBytes': json['sizeBytes'] === undefined ? undefined : json['sizeBytes'] === null ? null : json['sizeBytes'],
46
47
  };
47
48
  }
48
49
  export function GeneratePreSignedUrlInputToJSON(json) {
@@ -57,5 +58,6 @@ export function GeneratePreSignedUrlInputToJSONTyped(value, ignoreDiscriminator
57
58
  'module': value['module'],
58
59
  'contentMd5': value['contentMd5'],
59
60
  'fileId': value['fileId'],
61
+ 'sizeBytes': value['sizeBytes'],
60
62
  };
61
63
  }
@@ -27,7 +27,29 @@ export interface GeneratePreSignedUrlOutput {
27
27
  * 预签名 URL / presigned URL。
28
28
  */
29
29
  url?: string | null;
30
+ /**
31
+ * 客户端上传方式 / upload method。
32
+ */
33
+ uploadMethod?: GeneratePreSignedUrlOutputUploadMethodEnum;
34
+ /**
35
+ * 表单上传字段 / form fields。
36
+ */
37
+ formFields?: {
38
+ [key: string]: string;
39
+ };
40
+ /**
41
+ * 受限上传允许的最大字节数 / maximum bytes for bounded upload。
42
+ */
43
+ maximumBytes?: number | null;
30
44
  }
45
+ /**
46
+ * @export
47
+ */
48
+ export declare const GeneratePreSignedUrlOutputUploadMethodEnum: {
49
+ readonly Put: "PUT";
50
+ readonly PostForm: "POST_FORM";
51
+ };
52
+ export type GeneratePreSignedUrlOutputUploadMethodEnum = typeof GeneratePreSignedUrlOutputUploadMethodEnum[keyof typeof GeneratePreSignedUrlOutputUploadMethodEnum];
31
53
  /**
32
54
  * Check if a given object implements the GeneratePreSignedUrlOutput interface.
33
55
  */
@@ -11,6 +11,13 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ /**
15
+ * @export
16
+ */
17
+ export const GeneratePreSignedUrlOutputUploadMethodEnum = {
18
+ Put: 'PUT',
19
+ PostForm: 'POST_FORM',
20
+ };
14
21
  /**
15
22
  * Check if a given object implements the GeneratePreSignedUrlOutput interface.
16
23
  */
@@ -30,6 +37,9 @@ export function GeneratePreSignedUrlOutputFromJSONTyped(json, ignoreDiscriminato
30
37
  'support': json['support'],
31
38
  'fileUk': json['fileUk'] === undefined ? undefined : json['fileUk'] === null ? null : json['fileUk'],
32
39
  'url': json['url'] === undefined ? undefined : json['url'] === null ? null : json['url'],
40
+ 'uploadMethod': json['uploadMethod'] === undefined ? undefined : json['uploadMethod'],
41
+ 'formFields': json['formFields'] === undefined ? undefined : json['formFields'],
42
+ 'maximumBytes': json['maximumBytes'] === undefined ? undefined : json['maximumBytes'] === null ? null : json['maximumBytes'],
33
43
  };
34
44
  }
35
45
  export function GeneratePreSignedUrlOutputToJSON(json) {
@@ -43,5 +53,8 @@ export function GeneratePreSignedUrlOutputToJSONTyped(value, ignoreDiscriminator
43
53
  'support': value['support'],
44
54
  'fileUk': value['fileUk'],
45
55
  'url': value['url'],
56
+ 'uploadMethod': value['uploadMethod'],
57
+ 'formFields': value['formFields'],
58
+ 'maximumBytes': value['maximumBytes'],
46
59
  };
47
60
  }
@@ -31,6 +31,10 @@ export interface GeneratePreSignedUrlInput {
31
31
  * 文件 ID / file ID。
32
32
  */
33
33
  fileId?: number | null;
34
+ /**
35
+ * 实际文件大小(字节) / actual file size in bytes。
36
+ */
37
+ sizeBytes?: number | null;
34
38
  }
35
39
  /**
36
40
  * @export
@@ -51,6 +51,7 @@ function GeneratePreSignedUrlInputFromJSONTyped(json, ignoreDiscriminator) {
51
51
  'module': json['module'],
52
52
  'contentMd5': json['contentMd5'],
53
53
  'fileId': json['fileId'] === undefined ? undefined : json['fileId'] === null ? null : json['fileId'],
54
+ 'sizeBytes': json['sizeBytes'] === undefined ? undefined : json['sizeBytes'] === null ? null : json['sizeBytes'],
54
55
  };
55
56
  }
56
57
  function GeneratePreSignedUrlInputToJSON(json) {
@@ -65,5 +66,6 @@ function GeneratePreSignedUrlInputToJSONTyped(value, ignoreDiscriminator = false
65
66
  'module': value['module'],
66
67
  'contentMd5': value['contentMd5'],
67
68
  'fileId': value['fileId'],
69
+ 'sizeBytes': value['sizeBytes'],
68
70
  };
69
71
  }
@@ -27,7 +27,29 @@ export interface GeneratePreSignedUrlOutput {
27
27
  * 预签名 URL / presigned URL。
28
28
  */
29
29
  url?: string | null;
30
+ /**
31
+ * 客户端上传方式 / upload method。
32
+ */
33
+ uploadMethod?: GeneratePreSignedUrlOutputUploadMethodEnum;
34
+ /**
35
+ * 表单上传字段 / form fields。
36
+ */
37
+ formFields?: {
38
+ [key: string]: string;
39
+ };
40
+ /**
41
+ * 受限上传允许的最大字节数 / maximum bytes for bounded upload。
42
+ */
43
+ maximumBytes?: number | null;
30
44
  }
45
+ /**
46
+ * @export
47
+ */
48
+ export declare const GeneratePreSignedUrlOutputUploadMethodEnum: {
49
+ readonly Put: "PUT";
50
+ readonly PostForm: "POST_FORM";
51
+ };
52
+ export type GeneratePreSignedUrlOutputUploadMethodEnum = typeof GeneratePreSignedUrlOutputUploadMethodEnum[keyof typeof GeneratePreSignedUrlOutputUploadMethodEnum];
31
53
  /**
32
54
  * Check if a given object implements the GeneratePreSignedUrlOutput interface.
33
55
  */
@@ -13,11 +13,19 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GeneratePreSignedUrlOutputUploadMethodEnum = void 0;
16
17
  exports.instanceOfGeneratePreSignedUrlOutput = instanceOfGeneratePreSignedUrlOutput;
17
18
  exports.GeneratePreSignedUrlOutputFromJSON = GeneratePreSignedUrlOutputFromJSON;
18
19
  exports.GeneratePreSignedUrlOutputFromJSONTyped = GeneratePreSignedUrlOutputFromJSONTyped;
19
20
  exports.GeneratePreSignedUrlOutputToJSON = GeneratePreSignedUrlOutputToJSON;
20
21
  exports.GeneratePreSignedUrlOutputToJSONTyped = GeneratePreSignedUrlOutputToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.GeneratePreSignedUrlOutputUploadMethodEnum = {
26
+ Put: 'PUT',
27
+ PostForm: 'POST_FORM',
28
+ };
21
29
  /**
22
30
  * Check if a given object implements the GeneratePreSignedUrlOutput interface.
23
31
  */
@@ -37,6 +45,9 @@ function GeneratePreSignedUrlOutputFromJSONTyped(json, ignoreDiscriminator) {
37
45
  'support': json['support'],
38
46
  'fileUk': json['fileUk'] === undefined ? undefined : json['fileUk'] === null ? null : json['fileUk'],
39
47
  'url': json['url'] === undefined ? undefined : json['url'] === null ? null : json['url'],
48
+ 'uploadMethod': json['uploadMethod'] === undefined ? undefined : json['uploadMethod'],
49
+ 'formFields': json['formFields'] === undefined ? undefined : json['formFields'],
50
+ 'maximumBytes': json['maximumBytes'] === undefined ? undefined : json['maximumBytes'] === null ? null : json['maximumBytes'],
40
51
  };
41
52
  }
42
53
  function GeneratePreSignedUrlOutputToJSON(json) {
@@ -50,5 +61,8 @@ function GeneratePreSignedUrlOutputToJSONTyped(value, ignoreDiscriminator = fals
50
61
  'support': value['support'],
51
62
  'fileUk': value['fileUk'],
52
63
  'url': value['url'],
64
+ 'uploadMethod': value['uploadMethod'],
65
+ 'formFields': value['formFields'],
66
+ 'maximumBytes': value['maximumBytes'],
53
67
  };
54
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingya-ai/agents-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Strongly typed TypeScript SDK for Lingya Agents OpenAPI with server HMAC and browser token authentication",
5
5
  "author": "Lingya AI",
6
6
  "license": "MIT",