@growi/sdk-typescript 1.0.0-RC.0 → 1.0.0-RC.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.
package/README.md CHANGED
@@ -45,13 +45,13 @@ pnpm add @growi/sdk-typescript
45
45
  ### Client Initialization
46
46
 
47
47
  ```typescript
48
- import { AXIOS_INSTANCE } from '@growi/sdk-typescript';
48
+ import { AXIOS_DEFAULT } from '@growi/sdk-typescript';
49
49
 
50
50
  // Set the base URL of your GROWI instance
51
- AXIOS_INSTANCE.defaults.baseURL = 'https://your-growi-instance.com';
51
+ AXIOS_DEFAULT.setBaseURL('https://your-growi-instance.com');
52
52
 
53
53
  // Set authentication token (if needed)
54
- AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${your-api-token}`;
54
+ AXIOS_DEFAULT.setAuthorizationHeader('your-api-token');
55
55
  ```
56
56
 
57
57
  ### API v3 Usage Example
@@ -111,7 +111,7 @@ try {
111
111
  ```
112
112
  src/
113
113
  ├── utils/
114
- │ └── axios-instance.ts # Custom axios instance
114
+ │ └── axios-instance.ts # Axios instance factory
115
115
  ├── generated/ # Codes generated by Orval
116
116
  │ ├── v1/ # API v1 client
117
117
  │ │ ├── index.ts
package/README_JP.md CHANGED
@@ -45,13 +45,13 @@ pnpm add @growi/sdk-typescript
45
45
  ### クライアントの初期化
46
46
 
47
47
  ```typescript
48
- import { AXIOS_INSTANCE } from '@growi/sdk-typescript';
48
+ import { AXIOS_DEFAULT } from '@growi/sdk-typescript';
49
49
 
50
50
  // GROWI インスタンスのベース URL を設定
51
- AXIOS_INSTANCE.defaults.baseURL = 'https://your-growi-instance.com';
51
+ AXIOS_DEFAULT.setBaseURL('https://your-growi-instance.com');
52
52
 
53
53
  // 認証トークンを設定(必要に応じて)
54
- AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${your-api-token}`;
54
+ AXIOS_DEFAULT.setAuthorizationHeader('your-api-token');
55
55
  ```
56
56
 
57
57
  ### API v3 の使用例
@@ -111,7 +111,7 @@ try {
111
111
  ```
112
112
  src/
113
113
  ├── utils/
114
- │ └── axios-instance.ts # カスタム axios インスタンス
114
+ │ └── axios-instance.ts # Axios インスタンスファクトリー
115
115
  ├── generated/ # Orval で生成されるソースコード群
116
116
  │ ├── v1/ # API v1 クライアント
117
117
  │ │ ├── index.ts