@cogover/sdk 0.1.1 → 0.1.2

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 (2) hide show
  1. package/README.md +16 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,20 +1,20 @@
1
1
  # `@cogover/sdk`
2
2
 
3
- TypeScript SDK dành cho code khách hàng chạy trên Cogover. Package có sẵn type
4
- declaration để IDE cung cấp autocomplete, documentation và type checking.
3
+ The TypeScript SDK for customer code running on Cogover. The package includes
4
+ type declarations for IDE autocomplete, inline documentation, and type checking.
5
5
 
6
- ## Yêu cầu
6
+ ## Requirements
7
7
 
8
- - Node.js 18 trở lên.
9
- - Project TypeScript sử dụng ECMAScript Modules (ESM).
8
+ - Node.js 18 or later.
9
+ - A TypeScript project using ECMAScript Modules (ESM).
10
10
 
11
- ## Cài đặt
11
+ ## Installation
12
12
 
13
13
  ```bash
14
14
  npm install @cogover/sdk
15
15
  ```
16
16
 
17
- ## Sử dụng nhanh
17
+ ## Quick start
18
18
 
19
19
  ```typescript
20
20
  import { createGreeting } from "@cogover/sdk";
@@ -23,9 +23,9 @@ const greeting = createGreeting("Cogover");
23
23
  console.log(greeting); // Hello Cogover
24
24
  ```
25
25
 
26
- SDK sử dụng named exports và hiện không có default export.
26
+ The SDK uses named exports and currently has no default export.
27
27
 
28
- ## Sử dụng trong Cogover handler
28
+ ## Use in a Cogover handler
29
29
 
30
30
  ```typescript
31
31
  import { createGreeting } from "@cogover/sdk";
@@ -43,20 +43,20 @@ export default function handler(inputJson: string): string {
43
43
  }
44
44
  ```
45
45
 
46
- Handler phải default-export một synchronous function nhận `inputJson: string` và trả
47
- về JSON string hoặc `null`.
46
+ A handler must default-export a synchronous function that accepts
47
+ `inputJson: string` and returns a JSON string or `null`.
48
48
 
49
49
  ## API
50
50
 
51
51
  ### `createGreeting(name)`
52
52
 
53
- Tạo lời chào bằng cách thêm tiền tố `Hello ` trước tên.
53
+ Creates a greeting by adding the `Hello ` prefix to a name.
54
54
 
55
55
  ```typescript
56
56
  function createGreeting(name: string): string;
57
57
  ```
58
58
 
59
- Ví dụ:
59
+ Example:
60
60
 
61
61
  ```typescript
62
62
  createGreeting("Cogover"); // "Hello Cogover"
@@ -64,10 +64,10 @@ createGreeting("Cogover"); // "Hello Cogover"
64
64
 
65
65
  ## TypeScript
66
66
 
67
- Package đã bao gồm file khai báo type. Sau khi chạy `npm install`, IDE có thể
68
- resolve trực tiếp `@cogover/sdk` mà không cần cài thêm package type.
67
+ Type declarations are included in the package. After installation, IDEs can
68
+ resolve `@cogover/sdk` without a separate type package.
69
69
 
70
- Cấu hình `tsconfig.json` khuyến nghị:
70
+ Recommended `tsconfig.json` options:
71
71
 
72
72
  ```json
73
73
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogover/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "TypeScript SDK for customer code running on Cogover",
5
5
  "type": "module",
6
6
  "sideEffects": false,