@growi/sdk-typescript 1.0.0-RC.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 +11 -0
- package/LICENSE +21 -0
- package/README.md +210 -0
- package/README_JP.md +211 -0
- package/dist/apiv1/index.d.ts +22 -0
- package/dist/apiv1/index.d.ts.map +1 -0
- package/dist/apiv1/index.js +3 -0
- package/dist/apiv1/index.js.map +1 -0
- package/dist/apiv3/index.d.ts +245 -0
- package/dist/apiv3/index.d.ts.map +1 -0
- package/dist/apiv3/index.js +3 -0
- package/dist/apiv3/index.js.map +1 -0
- package/dist/generated/v1/index.d.ts +47 -0
- package/dist/generated/v1/index.d.ts.map +1 -0
- package/dist/generated/v1/index.js +131 -0
- package/dist/generated/v1/index.js.map +1 -0
- package/dist/generated/v1/index.schemas.d.ts +491 -0
- package/dist/generated/v1/index.schemas.d.ts.map +1 -0
- package/dist/generated/v1/index.schemas.js +12 -0
- package/dist/generated/v1/index.schemas.js.map +1 -0
- package/dist/generated/v3/index.d.ts +493 -0
- package/dist/generated/v3/index.d.ts.map +1 -0
- package/dist/generated/v3/index.js +1981 -0
- package/dist/generated/v3/index.js.map +1 -0
- package/dist/generated/v3/index.schemas.d.ts +3548 -0
- package/dist/generated/v3/index.schemas.d.ts.map +1 -0
- package/dist/generated/v3/index.schemas.js +30 -0
- package/dist/generated/v3/index.schemas.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/axios-instance.d.ts +5 -0
- package/dist/utils/axios-instance.d.ts.map +1 -0
- package/dist/utils/axios-instance.js +19 -0
- package/dist/utils/axios-instance.js.map +1 -0
- package/package.json +53 -0
- package/src/apiv1/index.ts +7 -0
- package/src/apiv3/index.ts +7 -0
- package/src/generated/v1/index.schemas.ts +554 -0
- package/src/generated/v1/index.ts +231 -0
- package/src/generated/v3/index.schemas.ts +3891 -0
- package/src/generated/v3/index.ts +3362 -0
- package/src/index.ts +8 -0
- package/src/utils/axios-instance.ts +23 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 GROWI Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
- [日本語 🇯🇵](./README_JP.md)
|
|
2
|
+
|
|
3
|
+
# @growi/sdk-typescript
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/%40growilabs%2Fgrowi-sdk-typescript)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
`@growi/sdk-typescript` is a TypeScript SDK automatically generated from the official [GROWI](https://growi.org/) OpenAPI specifications using [orval](https://orval.dev/). It supports both GROWI API v1 and v3, enabling type-safe API operations.
|
|
9
|
+
|
|
10
|
+
### Key Features
|
|
11
|
+
|
|
12
|
+
- 🏢 **Official SDK by the GROWI Development Team**
|
|
13
|
+
- 🔄 **Automatic code generation from OpenAPI specifications**
|
|
14
|
+
- 🛡️ **Type-safe API operations with TypeScript**
|
|
15
|
+
- 🚀 **axios-based HTTP client**
|
|
16
|
+
- 🔗 **Support for GROWI API v1 and v3**
|
|
17
|
+
- 🎯 **Node.js 18+ support**
|
|
18
|
+
|
|
19
|
+
## Supported GROWI Versions
|
|
20
|
+
|
|
21
|
+
This SDK is generated from GROWI's official OpenAPI specifications and supports the specifications obtained from the following endpoints:
|
|
22
|
+
|
|
23
|
+
- **API v1**: https://docs.growi.org/openapi-spec-apiv1.json
|
|
24
|
+
- **API v3**: https://docs.growi.org/openapi-spec-apiv3.json
|
|
25
|
+
|
|
26
|
+
The SDK's compatibility depends on the compatibility of GROWI's API specifications. When new API versions are released, the SDK will be automatically updated.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
You can install it using npm, yarn, or pnpm:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# npm
|
|
34
|
+
npm install @growi/sdk-typescript
|
|
35
|
+
|
|
36
|
+
# yarn
|
|
37
|
+
yarn add @growi/sdk-typescript
|
|
38
|
+
|
|
39
|
+
# pnpm
|
|
40
|
+
pnpm add @growi/sdk-typescript
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Basic Usage
|
|
44
|
+
|
|
45
|
+
### Client Initialization
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { AXIOS_INSTANCE } from '@growi/sdk-typescript';
|
|
49
|
+
|
|
50
|
+
// Set the base URL of your GROWI instance
|
|
51
|
+
AXIOS_INSTANCE.defaults.baseURL = 'https://your-growi-instance.com';
|
|
52
|
+
|
|
53
|
+
// Set authentication token (if needed)
|
|
54
|
+
AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${your-api-token}`;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### API v3 Usage Example
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import apiv3 from '@growi/sdk-typescript/v3';
|
|
61
|
+
|
|
62
|
+
// Get page list
|
|
63
|
+
try {
|
|
64
|
+
const pages = await apiv3.getPagesList();
|
|
65
|
+
console.log(pages);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.error('Failed to fetch pages:', error);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Get recent pages
|
|
71
|
+
try {
|
|
72
|
+
const recentPages = await apiv3.getPagesRecent();
|
|
73
|
+
console.log(recentPages);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error('Failed to fetch recent pages:', error);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Using with parameters
|
|
79
|
+
const pagesWithParams = await apiv3.getPagesList({
|
|
80
|
+
limit: 20,
|
|
81
|
+
offset: 0
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### API v1 Usage Example
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import apiv1 from '@growi/sdk-typescript/v1';
|
|
89
|
+
|
|
90
|
+
// Search pages
|
|
91
|
+
try {
|
|
92
|
+
const searchResult = await apiv1.searchPages({ q: 'search term' });
|
|
93
|
+
console.log(searchResult);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
console.error('Failed to search pages:', error);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Get comments
|
|
99
|
+
try {
|
|
100
|
+
const comments = await apiv1.getComments({ page_id: 'your-page-id' });
|
|
101
|
+
console.log(comments);
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.error('Failed to fetch comments:', error);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## API Client Details
|
|
108
|
+
|
|
109
|
+
### Directory Structure
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
src/
|
|
113
|
+
├── utils/
|
|
114
|
+
│ └── axios-instance.ts # Custom axios instance
|
|
115
|
+
├── generated/ # Codes generated by Orval
|
|
116
|
+
│ ├── v1/ # API v1 client
|
|
117
|
+
│ │ ├── index.ts
|
|
118
|
+
│ │ └── index.schemas.ts
|
|
119
|
+
│ └── v3/ # API v3 client
|
|
120
|
+
│ ├── index.ts
|
|
121
|
+
│ └── index.schemas.ts
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### API Version Selection
|
|
125
|
+
|
|
126
|
+
- **API v3**: Contains new features and improved API endpoints. We recommend using v3 whenever possible.
|
|
127
|
+
- **API v1**: Use when you need features not available in v3 or for legacy compatibility.
|
|
128
|
+
|
|
129
|
+
## Type Definition
|
|
130
|
+
|
|
131
|
+
All API requests and responses are type-safe:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
// Utilize auto-generated type definitions
|
|
135
|
+
import type {
|
|
136
|
+
Page,
|
|
137
|
+
PageInfo,
|
|
138
|
+
Comment,
|
|
139
|
+
SyncStatus
|
|
140
|
+
} from '@growi/sdk-typescript/v3';
|
|
141
|
+
|
|
142
|
+
// TypeScript's type checking detects errors at compile time
|
|
143
|
+
const pageInfo: PageInfo = {
|
|
144
|
+
path: '/test',
|
|
145
|
+
// Other required properties...
|
|
146
|
+
};
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Code Generation and Supported GROWI Versions
|
|
150
|
+
|
|
151
|
+
This project automatically generates code from GROWI's official OpenAPI specifications:
|
|
152
|
+
|
|
153
|
+
- **Code generation command**: `pnpm run generate:api`
|
|
154
|
+
- **Configuration file**: `orval.config.ts`
|
|
155
|
+
- **Automatic updates**: GitHub Actions periodically checks for specification updates
|
|
156
|
+
|
|
157
|
+
## Contributing to Development
|
|
158
|
+
|
|
159
|
+
### Development Environment Setup
|
|
160
|
+
|
|
161
|
+
1. Clone the repository:
|
|
162
|
+
```bash
|
|
163
|
+
git clone https://github.com/weseek/growi-sdk-typescript.git
|
|
164
|
+
cd growi-sdk-typescript
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
2. Install dependencies:
|
|
168
|
+
```bash
|
|
169
|
+
pnpm install
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
3. Generate API client:
|
|
173
|
+
```bash
|
|
174
|
+
pnpm run generate:api
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Development Workflow
|
|
178
|
+
|
|
179
|
+
The following workflows are automatically executed by GitHub Actions:
|
|
180
|
+
|
|
181
|
+
1. **Specification update detection**: GitHub Actions periodically checks for changes in OpenAPI specifications
|
|
182
|
+
2. **Automatic code generation**: When changes are detected, new client code is automatically generated
|
|
183
|
+
3. **Diff review**: Review the generated code differences and check for breaking changes
|
|
184
|
+
4. **Pull request creation**: Automatically create pull requests when changes are found
|
|
185
|
+
|
|
186
|
+
### Development Guidelines
|
|
187
|
+
|
|
188
|
+
- **Coding standards**: Uses [Biome](https://biomejs.dev/)
|
|
189
|
+
- **Linting**: `pnpm run lint`
|
|
190
|
+
- **Build**: `pnpm run build`
|
|
191
|
+
|
|
192
|
+
### How to Contribute
|
|
193
|
+
|
|
194
|
+
1. **Report Issues**: Report bugs and feature requests on [GitHub Issues](https://github.com/weseek/growi-sdk-typescript/issues)
|
|
195
|
+
2. **Pull Requests**:
|
|
196
|
+
- Fork and create a branch
|
|
197
|
+
- Implement changes
|
|
198
|
+
- Add tests (if applicable)
|
|
199
|
+
- Create a pull request
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
This project is released under the [MIT License](./LICENSE).
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## **Notice**
|
|
208
|
+
|
|
209
|
+
This SDK is under development. APIs may change without notice. Please thoroughly test before using in production environments.
|
|
210
|
+
|
package/README_JP.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
- [English 🇺🇸](./README.md)
|
|
2
|
+
|
|
3
|
+
# @growi/sdk-typescript
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/%40growilabs%2Fgrowi-sdk-typescript)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
`@growi/sdk-typescript` は、[GROWI](https://growi.org/) の公式 OpenAPI 仕様書から [orval](https://orval.dev/) を使用して自動生成された TypeScript SDK です。GROWI API v1 および v3 の両方をサポートし、型安全な API 操作を可能にします。
|
|
9
|
+
|
|
10
|
+
### 主な特徴
|
|
11
|
+
|
|
12
|
+
- 🏢 **GROWI 開発チームによるオフィシャル SDK**
|
|
13
|
+
- 🔄 **OpenAPI 仕様書からの自動コード生成**
|
|
14
|
+
- 🛡️ **TypeScript による型安全な API 操作**
|
|
15
|
+
- 🚀 **axios ベースの HTTP クライアント**
|
|
16
|
+
- 🔗 **GROWI API v1 および v3 のサポート**
|
|
17
|
+
- 🎯 **Node.js 18+ サポート**
|
|
18
|
+
|
|
19
|
+
## 対応 GROWI バージョン
|
|
20
|
+
|
|
21
|
+
この SDK は GROWI の公式 OpenAPI 仕様書から生成されており、以下のエンドポイントから取得される仕様に対応しています:
|
|
22
|
+
|
|
23
|
+
- **API v1**: https://docs.growi.org/openapi-spec-apiv1.json
|
|
24
|
+
- **API v3**: https://docs.growi.org/openapi-spec-apiv3.json
|
|
25
|
+
|
|
26
|
+
SDK の対応状況は GROWI の API 仕様の互換性に依存します。新しい API バージョンがリリースされると、SDK も自動的に更新されます。
|
|
27
|
+
|
|
28
|
+
## インストール
|
|
29
|
+
|
|
30
|
+
npm、yarn、または pnpm を使用してインストールできます:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# npm
|
|
34
|
+
npm install @growi/sdk-typescript
|
|
35
|
+
|
|
36
|
+
# yarn
|
|
37
|
+
yarn add @growi/sdk-typescript
|
|
38
|
+
|
|
39
|
+
# pnpm
|
|
40
|
+
pnpm add @growi/sdk-typescript
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 基本的な使用方法
|
|
44
|
+
|
|
45
|
+
### クライアントの初期化
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { AXIOS_INSTANCE } from '@growi/sdk-typescript';
|
|
49
|
+
|
|
50
|
+
// GROWI インスタンスのベース URL を設定
|
|
51
|
+
AXIOS_INSTANCE.defaults.baseURL = 'https://your-growi-instance.com';
|
|
52
|
+
|
|
53
|
+
// 認証トークンを設定(必要に応じて)
|
|
54
|
+
AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${your-api-token}`;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### API v3 の使用例
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import apiv3 from '@growi/sdk-typescript/v3';
|
|
61
|
+
|
|
62
|
+
// ページ一覧を取得
|
|
63
|
+
try {
|
|
64
|
+
const pages = await apiv3.getPagesList();
|
|
65
|
+
console.log(pages);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.error('ページ一覧の取得に失敗しました:', error);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 最近更新されたページの取得
|
|
71
|
+
try {
|
|
72
|
+
const recentPages = await apiv3.getPagesRecent();
|
|
73
|
+
console.log(recentPages);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error('最近更新されたページの取得に失敗しました:', error);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// パラメーターの指定
|
|
79
|
+
const pagesWithParams = await apiv3.getPagesList({
|
|
80
|
+
limit: 20,
|
|
81
|
+
offset: 0
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### API v1 の使用例
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import apiv1 from '@growi/sdk-typescript/v1';
|
|
89
|
+
|
|
90
|
+
// ページの検索
|
|
91
|
+
try {
|
|
92
|
+
const searchResult = await apiv1.searchPages({ q: 'search term' });
|
|
93
|
+
console.log(searchResult);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
console.error('ページの検索に失敗しました:', error);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// コメントの取得
|
|
99
|
+
try {
|
|
100
|
+
const comments = await apiv1.getComments({ page_id: 'your-page-id' });
|
|
101
|
+
console.log(comments);
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.error('コメントの取得に失敗しました:', error);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## API クライアント詳細
|
|
108
|
+
|
|
109
|
+
### ディレクトリ構成
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
src/
|
|
113
|
+
├── utils/
|
|
114
|
+
│ └── axios-instance.ts # カスタム axios インスタンス
|
|
115
|
+
├── generated/ # Orval で生成されるソースコード群
|
|
116
|
+
│ ├── v1/ # API v1 クライアント
|
|
117
|
+
│ │ ├── index.ts
|
|
118
|
+
│ │ └── index.schemas.ts
|
|
119
|
+
│ └── v3/ # API v3 クライアント
|
|
120
|
+
│ ├── index.ts
|
|
121
|
+
│ └── index.schemas.ts
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### API バージョンの使い分け
|
|
125
|
+
|
|
126
|
+
- **API v3**: 新機能や改良された API エンドポイントが含まれています。可能な限り v3 の使用を推奨します。
|
|
127
|
+
- **API v1**: v3 で提供されていない機能や、レガシー対応が必要な場合に使用してください。
|
|
128
|
+
|
|
129
|
+
## 型定義
|
|
130
|
+
|
|
131
|
+
すべての API リクエスト・レスポンスは型安全です:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
// 自動生成された型定義を利用
|
|
135
|
+
import type {
|
|
136
|
+
Page,
|
|
137
|
+
PageInfo,
|
|
138
|
+
Comment,
|
|
139
|
+
SyncStatus
|
|
140
|
+
} from '@growi/sdk-typescript/v3';
|
|
141
|
+
|
|
142
|
+
// TypeScript の型チェックにより、コンパイル時にエラーを検出
|
|
143
|
+
const pageInfo: PageInfo = {
|
|
144
|
+
path: '/test',
|
|
145
|
+
// 他の必要なプロパティ...
|
|
146
|
+
};
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## コード生成、対応する GROWI バージョンについて
|
|
150
|
+
|
|
151
|
+
このプロジェクトは、GROWI の公式 OpenAPI 仕様書から自動的にコードを生成します:
|
|
152
|
+
|
|
153
|
+
- **コード生成コマンド**: `pnpm run generate:api`
|
|
154
|
+
- **設定ファイル**: `orval.config.ts`
|
|
155
|
+
- **自動更新**: GitHub Actions により定期的に仕様書の更新をチェック
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
## 開発への貢献
|
|
160
|
+
|
|
161
|
+
### 開発環境のセットアップ
|
|
162
|
+
|
|
163
|
+
1. リポジトリをクローン:
|
|
164
|
+
```bash
|
|
165
|
+
git clone https://github.com/weseek/growi-sdk-typescript.git
|
|
166
|
+
cd growi-sdk-typescript
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
2. 依存関係をインストール:
|
|
170
|
+
```bash
|
|
171
|
+
pnpm install
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
3. API クライアントを生成:
|
|
175
|
+
```bash
|
|
176
|
+
pnpm run generate:api
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 開発ワークフロー
|
|
180
|
+
|
|
181
|
+
GitHub Actions により、以下のワークフローが定期実行される
|
|
182
|
+
|
|
183
|
+
1. **仕様書の更新検知**: GitHub Actions が定期的に OpenAPI 仕様書の変更をチェック
|
|
184
|
+
2. **自動コード生成**: 変更が検知されると、新しいクライアントコードを自動生成
|
|
185
|
+
3. **差分確認**: 生成されたコードの差分を確認し、破壊的変更がないかチェック
|
|
186
|
+
4. **プルリクエスト作成**: 変更があった場合、自動的にプルリクエストを作成
|
|
187
|
+
|
|
188
|
+
### 開発ガイドライン
|
|
189
|
+
|
|
190
|
+
- **コーディング規約**: [Biome](https://biomejs.dev/) を使用
|
|
191
|
+
- **リント**: `pnpm run lint`
|
|
192
|
+
- **ビルド**: `pnpm run build`
|
|
193
|
+
|
|
194
|
+
### 貢献方法
|
|
195
|
+
|
|
196
|
+
1. **Issue の報告**: バグや機能要求は [GitHub Issues](https://github.com/weseek/growi-sdk-typescript/issues) で報告してください
|
|
197
|
+
2. **プルリクエスト**:
|
|
198
|
+
- フォークしてブランチを作成
|
|
199
|
+
- 変更を実装
|
|
200
|
+
- テストを追加(該当する場合)
|
|
201
|
+
- プルリクエストを作成
|
|
202
|
+
|
|
203
|
+
## ライセンス
|
|
204
|
+
|
|
205
|
+
このプロジェクトは [MIT License](./LICENSE) の下で公開されています。
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## **注意**
|
|
210
|
+
|
|
211
|
+
このSDKは開発中です。API は予告なく変更される可能性があります。本番環境での使用前に十分なテストを行ってください。
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type * from '../generated/v1/index.js';
|
|
2
|
+
export type * from '../generated/v1/index.schemas.js';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
getComments: (params?: import("../generated/v1/index.schemas.js").GetCommentsParams, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").GetComments200>;
|
|
5
|
+
addComment: (addCommentBody: import("../generated/v1/index.schemas.js").AddCommentBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").AddComment200>;
|
|
6
|
+
updateComment: (updateCommentBody: import("../generated/v1/index.schemas.js").UpdateCommentBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").UpdateComment200>;
|
|
7
|
+
removeComment: (removeCommentBody: import("../generated/v1/index.schemas.js").RemoveCommentBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").RemoveComment200>;
|
|
8
|
+
postLogin: (postLoginBody: import("../generated/v1/index.schemas.js").PostLoginBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").PostLogin200>;
|
|
9
|
+
postRegister: (postRegisterBody: import("../generated/v1/index.schemas.js").PostRegisterBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").PostRegister200>;
|
|
10
|
+
getPageTag: (params?: import("../generated/v1/index.schemas.js").GetPageTagParams, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").GetPageTag200>;
|
|
11
|
+
getUpdatePostPage: (params?: import("../generated/v1/index.schemas.js").GetUpdatePostPageParams, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").GetUpdatePostPage200>;
|
|
12
|
+
searchPages: (params: import("../generated/v1/index.schemas.js").SearchPagesParams, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").SearchPages200>;
|
|
13
|
+
searchTags: (params?: import("../generated/v1/index.schemas.js").SearchTagsParams, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").SearchTags200>;
|
|
14
|
+
updateTag: (updateTagBody: import("../generated/v1/index.schemas.js").UpdateTagBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").UpdateTag200>;
|
|
15
|
+
listTags: (params?: import("../generated/v1/index.schemas.js").ListTagsParams, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").ListTags200>;
|
|
16
|
+
getUserActivationToken: (token: string, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<string>;
|
|
17
|
+
uploadProfileImage: (uploadProfileImageBody: import("../generated/v1/index.schemas.js").UploadProfileImageBodyOne | import("../generated/v1/index.schemas.js").UploadProfileImageBodyTwo, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").UploadProfileImage200>;
|
|
18
|
+
removeAttachment: (removeAttachmentBody: import("../generated/v1/index.schemas.js").RemoveAttachmentBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").RemoveAttachment200>;
|
|
19
|
+
removeProfileImage: (removeProfileImageBody: import("../generated/v1/index.schemas.js").RemoveProfileImageBody, options?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("../generated/v1/index.schemas.js").RemoveProfileImage200>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/apiv1/index.ts"],"names":[],"mappings":"AACA,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,kCAAkC,CAAC;;;;;;;;;;;;;;;;;;;AAItD,wBAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apiv1/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,eAAe,iBAAiB,EAAE,CAAC"}
|