@growi/sdk-typescript 1.7.0 → 1.10.0
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/CHANGELOG.md +25 -0
- package/README.md +81 -29
- package/README_JP.md +81 -29
- package/dist/apiv1/index.d.ts +19 -19
- package/dist/apiv3/index.d.ts +239 -235
- package/dist/apiv3/index.d.ts.map +1 -1
- package/dist/generated/v1/index.d.ts +1 -1
- package/dist/generated/v1/index.schemas.d.ts +47 -2
- package/dist/generated/v1/index.schemas.d.ts.map +1 -1
- package/dist/generated/v1/index.schemas.js.map +1 -1
- package/dist/generated/v3/index.d.ts +21 -13
- package/dist/generated/v3/index.d.ts.map +1 -1
- package/dist/generated/v3/index.js +65 -35
- package/dist/generated/v3/index.js.map +1 -1
- package/dist/generated/v3/index.schemas.d.ts +217 -105
- package/dist/generated/v3/index.schemas.d.ts.map +1 -1
- package/dist/generated/v3/index.schemas.js +11 -0
- package/dist/generated/v3/index.schemas.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/axios-instance-manager.d.ts +33 -0
- package/dist/utils/axios-instance-manager.d.ts.map +1 -0
- package/dist/utils/axios-instance-manager.js +59 -0
- package/dist/utils/axios-instance-manager.js.map +1 -0
- package/dist/utils/types/custom-instance.d.ts +6 -0
- package/dist/utils/types/custom-instance.d.ts.map +1 -0
- package/dist/utils/types/custom-instance.js +2 -0
- package/dist/utils/types/custom-instance.js.map +1 -0
- package/dist/utils/v1/axios-instance.d.ts +2 -1
- package/dist/utils/v1/axios-instance.d.ts.map +1 -1
- package/dist/utils/v1/axios-instance.js +9 -5
- package/dist/utils/v1/axios-instance.js.map +1 -1
- package/dist/utils/v3/axios-instance.d.ts +2 -1
- package/dist/utils/v3/axios-instance.d.ts.map +1 -1
- package/dist/utils/v3/axios-instance.js +9 -5
- package/dist/utils/v3/axios-instance.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/v1/index.schemas.ts +49 -2
- package/src/generated/v1/index.ts +1 -1
- package/src/generated/v3/index.schemas.ts +238 -112
- package/src/generated/v3/index.ts +106 -54
- package/src/index.ts +1 -1
- package/src/utils/axios-instance-manager.test.ts +185 -0
- package/src/utils/axios-instance-manager.ts +61 -0
- package/src/utils/types/custom-instance.ts +6 -0
- package/src/utils/v1/axios-instance.test.ts +26 -15
- package/src/utils/v1/axios-instance.ts +13 -6
- package/src/utils/v3/axios-instance.test.ts +43 -25
- package/src/utils/v3/axios-instance.ts +13 -6
- package/dist/utils/axios-default-instance.d.ts +0 -14
- package/dist/utils/axios-default-instance.d.ts.map +0 -1
- package/dist/utils/axios-default-instance.js +0 -22
- package/dist/utils/axios-default-instance.js.map +0 -1
- package/src/utils/axios-default-instance.test.ts +0 -108
- package/src/utils/axios-default-instance.ts +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
## [2025-06-02] - SDK Update
|
|
2
2
|
|
|
3
|
+
## 1.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#24](https://github.com/growilabs/growi-sdk-typescript/pull/24) [`81957fd`](https://github.com/growilabs/growi-sdk-typescript/commit/81957fdc17c1d81c65cd731d6e5ba3b6d95c1d48) Thanks [@github-actions](https://github.com/apps/github-actions)! - SDK generated from OpenAPI spec update.
|
|
8
|
+
|
|
9
|
+
## 1.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#25](https://github.com/growilabs/growi-sdk-typescript/pull/25) [`933bb27`](https://github.com/growilabs/growi-sdk-typescript/commit/933bb2795c24ed391715347c765aceef8bc5103c) Thanks [@ryu-sato](https://github.com/ryu-sato)! - Add authorization header override functionality
|
|
14
|
+
|
|
15
|
+
- Add `authorizationHeader` option to `AxiosInstanceManager.addAxiosInstance()`
|
|
16
|
+
- Allow custom authorization headers instead of default Bearer token authentication
|
|
17
|
+
- When `authorizationHeader` is specified, GROWI access token is sent via `X-GROWI-ACCESS-TOKEN` header
|
|
18
|
+
- Support for Digest authentication, Basic authentication, and custom proxy authentication
|
|
19
|
+
- Add detailed usage examples and documentation to README
|
|
20
|
+
- Add comprehensive test cases covering error handling and edge cases
|
|
21
|
+
|
|
22
|
+
## 1.8.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- [#19](https://github.com/growilabs/growi-sdk-typescript/pull/19) [`eea6b5b`](https://github.com/growilabs/growi-sdk-typescript/commit/eea6b5b4f743335beb8e93f4773256c25200d031) Thanks [@github-actions](https://github.com/apps/github-actions)! - SDK generated from OpenAPI spec update.
|
|
27
|
+
|
|
3
28
|
## 1.7.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -45,13 +45,28 @@ pnpm add @growi/sdk-typescript
|
|
|
45
45
|
### Client Initialization
|
|
46
46
|
|
|
47
47
|
```typescript
|
|
48
|
-
import {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
|
|
48
|
+
import { axiosInstanceManager } from '@growi/sdk-typescript';
|
|
49
|
+
|
|
50
|
+
axiosInstanceManager.addAxiosInstance({
|
|
51
|
+
appName: 'app-1', // Identifier name
|
|
52
|
+
baseURL: 'https://your-growi-instance-1.com', // GROWI instance URL
|
|
53
|
+
token: 'your-api-token-1', // Authentication token (optional)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
// Example of adding a second instance
|
|
57
|
+
axiosInstanceManager.addAxiosInstance({
|
|
58
|
+
appName: 'app-2',
|
|
59
|
+
baseURL: 'https://your-growi-instance-2.com',
|
|
60
|
+
token: 'your-api-token-2',
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
// Example with Digest authentication when GROWI is behind Digest auth protection
|
|
64
|
+
axiosInstanceManager.addAxiosInstance({
|
|
65
|
+
appName: 'app-3',
|
|
66
|
+
baseURL: 'https://your-growi-instance-3.com',
|
|
67
|
+
token: 'your-growi-access-token',
|
|
68
|
+
authorizationHeader: 'Digest username="user", realm="Protected Area", nonce="abc123", uri="/", response="xyz789"', // Digest auth header
|
|
69
|
+
})
|
|
55
70
|
```
|
|
56
71
|
|
|
57
72
|
### API v3 Usage Example
|
|
@@ -59,27 +74,21 @@ AXIOS_DEFAULT.setAuthorizationHeader('your-api-token');
|
|
|
59
74
|
```typescript
|
|
60
75
|
import apiv3 from '@growi/sdk-typescript/v3';
|
|
61
76
|
|
|
62
|
-
// Get page
|
|
77
|
+
// Get page content
|
|
63
78
|
try {
|
|
64
|
-
const
|
|
65
|
-
console.log(
|
|
79
|
+
const page = await apiv3.getPage({ pageId: "your-page-id" }, { appName: 'app-1' });
|
|
80
|
+
console.log(page);
|
|
66
81
|
} catch (error) {
|
|
67
|
-
console.error('Failed to fetch
|
|
82
|
+
console.error('Failed to fetch page:', error);
|
|
68
83
|
}
|
|
69
84
|
|
|
70
|
-
//
|
|
85
|
+
// Create a page
|
|
71
86
|
try {
|
|
72
|
-
const
|
|
73
|
-
console.log(
|
|
87
|
+
const createdPage = await apiv3.postPage({ path: 'your-page-path', body: "# New Page" }, { appName: 'app-2' });
|
|
88
|
+
console.log(createdPage);
|
|
74
89
|
} catch (error) {
|
|
75
|
-
console.error('Failed to
|
|
90
|
+
console.error('Failed to create page:', error);
|
|
76
91
|
}
|
|
77
|
-
|
|
78
|
-
// Using with parameters
|
|
79
|
-
const pagesWithParams = await apiv3.getPagesList({
|
|
80
|
-
limit: 20,
|
|
81
|
-
offset: 0
|
|
82
|
-
});
|
|
83
92
|
```
|
|
84
93
|
|
|
85
94
|
### API v1 Usage Example
|
|
@@ -89,7 +98,7 @@ import apiv1 from '@growi/sdk-typescript/v1';
|
|
|
89
98
|
|
|
90
99
|
// Search pages
|
|
91
100
|
try {
|
|
92
|
-
const searchResult = await apiv1.searchPages({ q: 'search term' });
|
|
101
|
+
const searchResult = await apiv1.searchPages({ q: 'search term' }, { appName: 'app-1' });
|
|
93
102
|
console.log(searchResult);
|
|
94
103
|
} catch (error) {
|
|
95
104
|
console.error('Failed to search pages:', error);
|
|
@@ -97,7 +106,7 @@ try {
|
|
|
97
106
|
|
|
98
107
|
// Get comments
|
|
99
108
|
try {
|
|
100
|
-
const comments = await apiv1.getComments({ page_id: 'your-page-id' });
|
|
109
|
+
const comments = await apiv1.getComments({ page_id: 'your-page-id' }, { appName: 'app-2' });
|
|
101
110
|
console.log(comments);
|
|
102
111
|
} catch (error) {
|
|
103
112
|
console.error('Failed to fetch comments:', error);
|
|
@@ -111,12 +120,12 @@ try {
|
|
|
111
120
|
```
|
|
112
121
|
src/
|
|
113
122
|
├── utils/
|
|
114
|
-
│ └── axios-instance.ts
|
|
115
|
-
├── generated/
|
|
116
|
-
│ ├── v1/
|
|
123
|
+
│ └── axios-instance-manager.ts # Axios instance management
|
|
124
|
+
├── generated/ # Codes generated by Orval
|
|
125
|
+
│ ├── v1/ # API v1 client
|
|
117
126
|
│ │ ├── index.ts
|
|
118
127
|
│ │ └── index.schemas.ts
|
|
119
|
-
│ └── v3/
|
|
128
|
+
│ └── v3/ # API v3 client
|
|
120
129
|
│ ├── index.ts
|
|
121
130
|
│ └── index.schemas.ts
|
|
122
131
|
```
|
|
@@ -126,6 +135,49 @@ src/
|
|
|
126
135
|
- **API v3**: Contains new features and improved API endpoints. We recommend using v3 whenever possible.
|
|
127
136
|
- **API v1**: Use when you need features not available in v3 or for legacy compatibility.
|
|
128
137
|
|
|
138
|
+
### Authentication Header Override
|
|
139
|
+
|
|
140
|
+
The SDK now supports overriding the default Bearer token authorization method. When the `authorizationHeader` option is provided:
|
|
141
|
+
|
|
142
|
+
- The `Authorization` header will be set to the provided custom value
|
|
143
|
+
- The GROWI access token will be sent via the `X-GROWI-ACCESS-TOKEN` header
|
|
144
|
+
|
|
145
|
+
This feature is particularly useful when GROWI is behind authentication systems such as Digest authentication, Basic authentication, or custom proxy authentication that require specific authorization header formats.
|
|
146
|
+
|
|
147
|
+
**Default behavior (Bearer token):**
|
|
148
|
+
```typescript
|
|
149
|
+
axiosInstanceManager.addAxiosInstance({
|
|
150
|
+
appName: 'default-auth',
|
|
151
|
+
baseURL: 'https://growi.example.com',
|
|
152
|
+
token: 'your-growi-api-token',
|
|
153
|
+
// Authorization header will be: "Bearer your-growi-api-token"
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Digest authentication example:**
|
|
158
|
+
```typescript
|
|
159
|
+
axiosInstanceManager.addAxiosInstance({
|
|
160
|
+
appName: 'digest-auth',
|
|
161
|
+
baseURL: 'https://growi.example.com',
|
|
162
|
+
token: 'growi-api-token',
|
|
163
|
+
authorizationHeader: 'Digest username="admin", realm="GROWI Protected", nonce="abc123def456", uri="/", response="calculated-response-hash"',
|
|
164
|
+
// Authorization header will be set to the Digest auth string
|
|
165
|
+
// X-GROWI-ACCESS-TOKEN header will be: "growi-api-token"
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Basic authentication example:**
|
|
170
|
+
```typescript
|
|
171
|
+
axiosInstanceManager.addAxiosInstance({
|
|
172
|
+
appName: 'basic-auth',
|
|
173
|
+
baseURL: 'https://growi.example.com',
|
|
174
|
+
token: 'growi-api-token',
|
|
175
|
+
authorizationHeader: 'Basic ' + btoa('username:password'),
|
|
176
|
+
// Authorization header will be: "Basic base64-encoded-credentials"
|
|
177
|
+
// X-GROWI-ACCESS-TOKEN header will be: "growi-api-token"
|
|
178
|
+
});
|
|
179
|
+
```
|
|
180
|
+
|
|
129
181
|
## Type Definition
|
|
130
182
|
|
|
131
183
|
All API requests and responses are type-safe:
|
|
@@ -160,7 +212,7 @@ This project automatically generates code from GROWI's official OpenAPI specific
|
|
|
160
212
|
|
|
161
213
|
1. Clone the repository:
|
|
162
214
|
```bash
|
|
163
|
-
git clone https://github.com/
|
|
215
|
+
git clone https://github.com/growilabs/growi-sdk-typescript.git
|
|
164
216
|
cd growi-sdk-typescript
|
|
165
217
|
```
|
|
166
218
|
|
|
@@ -191,7 +243,7 @@ The following workflows are automatically executed by GitHub Actions:
|
|
|
191
243
|
|
|
192
244
|
### How to Contribute
|
|
193
245
|
|
|
194
|
-
1. **Report Issues**: Report bugs and feature requests on [GitHub Issues](https://github.com/
|
|
246
|
+
1. **Report Issues**: Report bugs and feature requests on [GitHub Issues](https://github.com/growilabs/growi-sdk-typescript/issues)
|
|
195
247
|
2. **Pull Requests**:
|
|
196
248
|
- Fork and create a branch
|
|
197
249
|
- Implement changes
|
package/README_JP.md
CHANGED
|
@@ -45,13 +45,28 @@ pnpm add @growi/sdk-typescript
|
|
|
45
45
|
### クライアントの初期化
|
|
46
46
|
|
|
47
47
|
```typescript
|
|
48
|
-
import {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
|
|
48
|
+
import { axiosInstanceManager } from '@growi/sdk-typescript';
|
|
49
|
+
|
|
50
|
+
axiosInstanceManager.addAxiosInstance({
|
|
51
|
+
appName: 'app-1', // 識別用の名前
|
|
52
|
+
baseURL: 'https://your-growi-instance-1.com', // GROWI インスタンスの URL
|
|
53
|
+
token: 'your-api-token-1', // 認証トークン(必要に応じて)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
// 2つ目のインスタンスを追加する例
|
|
57
|
+
axiosInstanceManager.addAxiosInstance({
|
|
58
|
+
appName: 'app-2',
|
|
59
|
+
baseURL: 'https://your-growi-instance-2.com',
|
|
60
|
+
token: 'your-api-token-2',
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
// GROWIがDigest認証で保護されている場合の例
|
|
64
|
+
axiosInstanceManager.addAxiosInstance({
|
|
65
|
+
appName: 'app-3',
|
|
66
|
+
baseURL: 'https://your-growi-instance-3.com',
|
|
67
|
+
token: 'your-growi-access-token',
|
|
68
|
+
authorizationHeader: 'Digest username="user", realm="Protected Area", nonce="abc123", uri="/", response="xyz789"', // Digest認証ヘッダー
|
|
69
|
+
})
|
|
55
70
|
```
|
|
56
71
|
|
|
57
72
|
### API v3 の使用例
|
|
@@ -59,27 +74,21 @@ AXIOS_DEFAULT.setAuthorizationHeader('your-api-token');
|
|
|
59
74
|
```typescript
|
|
60
75
|
import apiv3 from '@growi/sdk-typescript/v3';
|
|
61
76
|
|
|
62
|
-
//
|
|
77
|
+
// ページの内容を取得
|
|
63
78
|
try {
|
|
64
|
-
const
|
|
65
|
-
console.log(
|
|
79
|
+
const page = await apiv3.getPage({ pageId: "your-page-id" }, { appName: 'app-1' });
|
|
80
|
+
console.log(page);
|
|
66
81
|
} catch (error) {
|
|
67
|
-
console.error('
|
|
82
|
+
console.error('ページの取得に失敗しました:', error);
|
|
68
83
|
}
|
|
69
84
|
|
|
70
|
-
//
|
|
85
|
+
// ページの作成
|
|
71
86
|
try {
|
|
72
|
-
const
|
|
73
|
-
console.log(
|
|
87
|
+
const createdPage = await apiv3.postPage({ path: 'your-page-path', body: "# 新しいページ" }, { appName: 'app-2' });
|
|
88
|
+
console.log(createdPage);
|
|
74
89
|
} catch (error) {
|
|
75
|
-
console.error('
|
|
90
|
+
console.error('ページの作成に失敗しました:', error);
|
|
76
91
|
}
|
|
77
|
-
|
|
78
|
-
// パラメーターの指定
|
|
79
|
-
const pagesWithParams = await apiv3.getPagesList({
|
|
80
|
-
limit: 20,
|
|
81
|
-
offset: 0
|
|
82
|
-
});
|
|
83
92
|
```
|
|
84
93
|
|
|
85
94
|
### API v1 の使用例
|
|
@@ -89,7 +98,7 @@ import apiv1 from '@growi/sdk-typescript/v1';
|
|
|
89
98
|
|
|
90
99
|
// ページの検索
|
|
91
100
|
try {
|
|
92
|
-
const searchResult = await apiv1.searchPages({ q: 'search term' });
|
|
101
|
+
const searchResult = await apiv1.searchPages({ q: 'search term' }, { appName: 'app-1' });
|
|
93
102
|
console.log(searchResult);
|
|
94
103
|
} catch (error) {
|
|
95
104
|
console.error('ページの検索に失敗しました:', error);
|
|
@@ -97,7 +106,7 @@ try {
|
|
|
97
106
|
|
|
98
107
|
// コメントの取得
|
|
99
108
|
try {
|
|
100
|
-
const comments = await apiv1.getComments({ page_id: 'your-page-id' });
|
|
109
|
+
const comments = await apiv1.getComments({ page_id: 'your-page-id' }, { appName: 'app-2' });
|
|
101
110
|
console.log(comments);
|
|
102
111
|
} catch (error) {
|
|
103
112
|
console.error('コメントの取得に失敗しました:', error);
|
|
@@ -111,12 +120,12 @@ try {
|
|
|
111
120
|
```
|
|
112
121
|
src/
|
|
113
122
|
├── utils/
|
|
114
|
-
│ └── axios-instance.ts
|
|
115
|
-
├── generated/
|
|
116
|
-
│ ├── v1/
|
|
123
|
+
│ └── axios-instance-manager.ts # Axios インスタンス管理
|
|
124
|
+
├── generated/ # Orval で生成されるソースコード群
|
|
125
|
+
│ ├── v1/ # API v1 クライアント
|
|
117
126
|
│ │ ├── index.ts
|
|
118
127
|
│ │ └── index.schemas.ts
|
|
119
|
-
│ └── v3/
|
|
128
|
+
│ └── v3/ # API v3 クライアント
|
|
120
129
|
│ ├── index.ts
|
|
121
130
|
│ └── index.schemas.ts
|
|
122
131
|
```
|
|
@@ -126,6 +135,49 @@ src/
|
|
|
126
135
|
- **API v3**: 新機能や改良された API エンドポイントが含まれています。可能な限り v3 の使用を推奨します。
|
|
127
136
|
- **API v1**: v3 で提供されていない機能や、レガシー対応が必要な場合に使用してください。
|
|
128
137
|
|
|
138
|
+
### 認証ヘッダーの上書き
|
|
139
|
+
|
|
140
|
+
SDK は、デフォルトの Bearer トークン認証方法を上書きする機能をサポートしています。`authorizationHeader` オプションが提供された場合:
|
|
141
|
+
|
|
142
|
+
- `Authorization` ヘッダーは提供されたカスタム値に設定されます
|
|
143
|
+
- GROWI アクセストークンは `X-GROWI-ACCESS-TOKEN` ヘッダー経由で送信されます
|
|
144
|
+
|
|
145
|
+
この機能は、特に GROWI が Digest認証、Basic認証、またはカスタムプロキシ認証などの認証システムの背後にある場合に、特定の認証ヘッダー形式が必要な時に便利です。
|
|
146
|
+
|
|
147
|
+
**デフォルトの動作(Bearer トークン):**
|
|
148
|
+
```typescript
|
|
149
|
+
axiosInstanceManager.addAxiosInstance({
|
|
150
|
+
appName: 'default-auth',
|
|
151
|
+
baseURL: 'https://growi.example.com',
|
|
152
|
+
token: 'your-growi-api-token',
|
|
153
|
+
// Authorization ヘッダーは: "Bearer your-growi-api-token" に設定されます
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Digest認証の例:**
|
|
158
|
+
```typescript
|
|
159
|
+
axiosInstanceManager.addAxiosInstance({
|
|
160
|
+
appName: 'digest-auth',
|
|
161
|
+
baseURL: 'https://growi.example.com',
|
|
162
|
+
token: 'growi-api-token',
|
|
163
|
+
authorizationHeader: 'Digest username="admin", realm="GROWI Protected", nonce="abc123def456", uri="/", response="calculated-response-hash"',
|
|
164
|
+
// Authorization ヘッダーは Digest認証文字列に設定されます
|
|
165
|
+
// X-GROWI-ACCESS-TOKEN ヘッダーは: "growi-api-token" に設定されます
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Basic認証の例:**
|
|
170
|
+
```typescript
|
|
171
|
+
axiosInstanceManager.addAxiosInstance({
|
|
172
|
+
appName: 'basic-auth',
|
|
173
|
+
baseURL: 'https://growi.example.com',
|
|
174
|
+
token: 'growi-api-token',
|
|
175
|
+
authorizationHeader: 'Basic ' + btoa('username:password'),
|
|
176
|
+
// Authorization ヘッダーは: "Basic base64エンコードされた認証情報" に設定されます
|
|
177
|
+
// X-GROWI-ACCESS-TOKEN ヘッダーは: "growi-api-token" に設定されます
|
|
178
|
+
});
|
|
179
|
+
```
|
|
180
|
+
|
|
129
181
|
## 型定義
|
|
130
182
|
|
|
131
183
|
すべての API リクエスト・レスポンスは型安全です:
|
|
@@ -162,7 +214,7 @@ const pageInfo: PageInfo = {
|
|
|
162
214
|
|
|
163
215
|
1. リポジトリをクローン:
|
|
164
216
|
```bash
|
|
165
|
-
git clone https://github.com/
|
|
217
|
+
git clone https://github.com/growilabs/growi-sdk-typescript.git
|
|
166
218
|
cd growi-sdk-typescript
|
|
167
219
|
```
|
|
168
220
|
|
|
@@ -193,7 +245,7 @@ GitHub Actions により、以下のワークフローが定期実行される
|
|
|
193
245
|
|
|
194
246
|
### 貢献方法
|
|
195
247
|
|
|
196
|
-
1. **Issue の報告**: バグや機能要求は [GitHub Issues](https://github.com/
|
|
248
|
+
1. **Issue の報告**: バグや機能要求は [GitHub Issues](https://github.com/growilabs/growi-sdk-typescript/issues) で報告してください
|
|
197
249
|
2. **プルリクエスト**:
|
|
198
250
|
- フォークしてブランチを作成
|
|
199
251
|
- 変更を実装
|
package/dist/apiv1/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export type * from '../generated/v1/index.js';
|
|
2
2
|
export type * from '../generated/v1/index.schemas.js';
|
|
3
3
|
declare const _default: {
|
|
4
|
-
getComments: (params?: import("../generated/v1/index.schemas.js").GetCommentsParams, options?: import("
|
|
5
|
-
addComment: (addCommentBody: import("../generated/v1/index.schemas.js").AddCommentBody, options?: import("
|
|
6
|
-
updateComment: (updateCommentBody: import("../generated/v1/index.schemas.js").UpdateCommentBody, options?: import("
|
|
7
|
-
removeComment: (removeCommentBody: import("../generated/v1/index.schemas.js").RemoveCommentBody, options?: import("
|
|
8
|
-
postLogin: (postLoginBody: import("../generated/v1/index.schemas.js").PostLoginBody, options?: import("
|
|
9
|
-
postRegister: (postRegisterBody: import("../generated/v1/index.schemas.js").PostRegisterBody, options?: import("
|
|
10
|
-
getPageTag: (params: import("../generated/v1/index.schemas.js").GetPageTagParams, options?: import("
|
|
11
|
-
getUpdatePost: (params: import("../generated/v1/index.schemas.js").GetUpdatePostParams, options?: import("
|
|
12
|
-
removePage: (removePageBody: import("../generated/v1/index.schemas.js").RemovePageBody, options?: import("
|
|
13
|
-
revertRemovePage: (revertRemovePageBody: import("../generated/v1/index.schemas.js").RevertRemovePageBody, options?: import("
|
|
14
|
-
unlinkPage: (unlinkPageBody: import("../generated/v1/index.schemas.js").UnlinkPageBody, options?: import("
|
|
15
|
-
searchPages: (params: import("../generated/v1/index.schemas.js").SearchPagesParams, options?: import("
|
|
16
|
-
searchTags: (params?: import("../generated/v1/index.schemas.js").SearchTagsParams, options?: import("
|
|
17
|
-
updateTag: (updateTagBody: import("../generated/v1/index.schemas.js").UpdateTagBody, options?: import("
|
|
18
|
-
listTags: (params?: import("../generated/v1/index.schemas.js").ListTagsParams, options?: import("
|
|
19
|
-
getUserActivationToken: (token: string, options?: import("
|
|
20
|
-
uploadProfileImage: (uploadProfileImageBody: import("../generated/v1/index.schemas.js").UploadProfileImageBodyOne | import("../generated/v1/index.schemas.js").UploadProfileImageBodyTwo, options?: import("
|
|
21
|
-
removeAttachment: (removeAttachmentBody: import("../generated/v1/index.schemas.js").RemoveAttachmentBody, options?: import("
|
|
22
|
-
removeProfileImage: (removeProfileImageBody: import("../generated/v1/index.schemas.js").RemoveProfileImageBody, options?: import("
|
|
4
|
+
getComments: (params?: import("../generated/v1/index.schemas.js").GetCommentsParams, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").GetComments200>;
|
|
5
|
+
addComment: (addCommentBody: import("../generated/v1/index.schemas.js").AddCommentBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").AddComment200>;
|
|
6
|
+
updateComment: (updateCommentBody: import("../generated/v1/index.schemas.js").UpdateCommentBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").UpdateComment200>;
|
|
7
|
+
removeComment: (removeCommentBody: import("../generated/v1/index.schemas.js").RemoveCommentBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").ApiResponseSuccess>;
|
|
8
|
+
postLogin: (postLoginBody: import("../generated/v1/index.schemas.js").PostLoginBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").PostLogin200>;
|
|
9
|
+
postRegister: (postRegisterBody: import("../generated/v1/index.schemas.js").PostRegisterBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").PostRegister200>;
|
|
10
|
+
getPageTag: (params: import("../generated/v1/index.schemas.js").GetPageTagParams, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").PageTagsSuccessResponse>;
|
|
11
|
+
getUpdatePost: (params: import("../generated/v1/index.schemas.js").GetUpdatePostParams, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").UpdatePostSuccessResponse>;
|
|
12
|
+
removePage: (removePageBody: import("../generated/v1/index.schemas.js").RemovePageBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").PageRemoveSuccessResponse>;
|
|
13
|
+
revertRemovePage: (revertRemovePageBody: import("../generated/v1/index.schemas.js").RevertRemovePageBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").PageRevertSuccessResponse>;
|
|
14
|
+
unlinkPage: (unlinkPageBody: import("../generated/v1/index.schemas.js").UnlinkPageBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").PageUnlinkSuccessResponse>;
|
|
15
|
+
searchPages: (params: import("../generated/v1/index.schemas.js").SearchPagesParams, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").SearchPages200>;
|
|
16
|
+
searchTags: (params?: import("../generated/v1/index.schemas.js").SearchTagsParams, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").SearchTags200>;
|
|
17
|
+
updateTag: (updateTagBody: import("../generated/v1/index.schemas.js").UpdateTagBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").UpdateTag200>;
|
|
18
|
+
listTags: (params?: import("../generated/v1/index.schemas.js").ListTagsParams, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").ListTags200>;
|
|
19
|
+
getUserActivationToken: (token: string, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<string>;
|
|
20
|
+
uploadProfileImage: (uploadProfileImageBody: import("../generated/v1/index.schemas.js").UploadProfileImageBodyOne | import("../generated/v1/index.schemas.js").UploadProfileImageBodyTwo, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").UploadProfileImage200>;
|
|
21
|
+
removeAttachment: (removeAttachmentBody: import("../generated/v1/index.schemas.js").RemoveAttachmentBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").ApiResponseSuccess>;
|
|
22
|
+
removeProfileImage: (removeProfileImageBody: import("../generated/v1/index.schemas.js").RemoveProfileImageBody, options?: import("../utils/types/custom-instance.js").CustomInstanceOptions | undefined) => Promise<import("../generated/v1/index.schemas.js").ApiResponseSuccess>;
|
|
23
23
|
};
|
|
24
24
|
export default _default;
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|