@leaflow/sdk 0.0.0-dev.11.g7f2d603
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 +24 -0
- package/dist/account/v1/index.d.ts +42 -0
- package/dist/account/v1/index.js +5 -0
- package/dist/account/v1/schema.d.ts +866 -0
- package/dist/account/v1/schema.js +5 -0
- package/dist/assistant/v1/index.d.ts +80 -0
- package/dist/assistant/v1/index.js +5 -0
- package/dist/assistant/v1/schema.d.ts +1888 -0
- package/dist/assistant/v1/schema.js +5 -0
- package/dist/canopy/v1/index.d.ts +48 -0
- package/dist/canopy/v1/index.js +5 -0
- package/dist/canopy/v1/schema.d.ts +1100 -0
- package/dist/canopy/v1/schema.js +5 -0
- package/dist/compute/v1/index.d.ts +224 -0
- package/dist/compute/v1/index.js +5 -0
- package/dist/compute/v1/schema.d.ts +4442 -0
- package/dist/compute/v1/schema.js +5 -0
- package/dist/iam/v1/index.d.ts +62 -0
- package/dist/iam/v1/index.js +5 -0
- package/dist/iam/v1/schema.d.ts +1230 -0
- package/dist/iam/v1/schema.js +5 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +6 -0
- package/dist/monitoring/v1/index.d.ts +96 -0
- package/dist/monitoring/v1/index.js +5 -0
- package/dist/monitoring/v1/schema.d.ts +2292 -0
- package/dist/monitoring/v1/schema.js +5 -0
- package/dist/tunnel/v1/index.d.ts +38 -0
- package/dist/tunnel/v1/index.js +5 -0
- package/dist/tunnel/v1/schema.d.ts +845 -0
- package/dist/tunnel/v1/schema.js +5 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# leaflow-ts
|
|
2
|
+
|
|
3
|
+
Leaflow 平台的 TypeScript SDK(`@leaflow/sdk`)。
|
|
4
|
+
`gen/` 下全是产物,源在 `LeaflowNET/leaflowapis`。
|
|
5
|
+
|
|
6
|
+
## 为什么和 Go 分开在两个仓库
|
|
7
|
+
|
|
8
|
+
**它们在同一个仓库里会抢同一个 tag 空间。** Go 的子目录模块要 `go/v1.2.3` 这种带前缀的 tag,
|
|
9
|
+
npm 要 `v1.2.3`——上一版两者挤在一个仓库里,结果是 Go 那半从来没被正确发布过,而没有任何东西
|
|
10
|
+
会报错(`go get` 只是拿不到)。
|
|
11
|
+
|
|
12
|
+
## 契约是一个 submodule
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
leaflowapis/ 钉在某一个 commit 上——那个指针就是「这版 SDK 出自哪版契约」的答案
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
git submodule update --remote leaflowapis # 要跟进新契约时才做
|
|
20
|
+
npm run generate
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
产物由人在本地跑完提交,CI 只验证不写回:一个会 commit 回来的流水线,在两次推送挨得近时只能靠
|
|
24
|
+
重试或者强推——前者会打架,后者会丢东西。
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type { paths, components, operations, webhooks } from "./schema.js";
|
|
2
|
+
import type { operations } from "./schema.js";
|
|
3
|
+
/** `GET /account/v1/agreements` 成功时的响应体。 */
|
|
4
|
+
export type ListAgreementsResult = operations["list-agreements"]["responses"][200]["content"]["application/json"];
|
|
5
|
+
/** `GET /account/v1/me/consents` 成功时的响应体。 */
|
|
6
|
+
export type ListConsentsResult = operations["list-consents"]["responses"][200]["content"]["application/json"];
|
|
7
|
+
/** `POST /account/v1/me/consents` 成功时的响应体。 */
|
|
8
|
+
export type AcceptAgreementsResult = operations["accept-agreements"]["responses"][200]["content"]["application/json"];
|
|
9
|
+
/** `POST /account/v1/me/consents` 的请求体。 */
|
|
10
|
+
export type AcceptAgreementsBody = NonNullable<operations["accept-agreements"]["requestBody"]>["content"]["application/json"];
|
|
11
|
+
/** `POST /account/v1/register` 成功时的响应体。 */
|
|
12
|
+
export type RegisterResult = operations["register"]["responses"][201]["content"]["application/json"];
|
|
13
|
+
/** `POST /account/v1/register` 的请求体。 */
|
|
14
|
+
export type RegisterBody = NonNullable<operations["register"]["requestBody"]>["content"]["application/json"];
|
|
15
|
+
/** `GET /account/v1/me` 成功时的响应体。 */
|
|
16
|
+
export type GetAccountResult = operations["get-account"]["responses"][200]["content"]["application/json"];
|
|
17
|
+
/** `GET /account/v1/me/identity-verification` 成功时的响应体。 */
|
|
18
|
+
export type GetIdentityVerificationResult = operations["get-identity-verification"]["responses"][200]["content"]["application/json"];
|
|
19
|
+
/** `POST /account/v1/me/identity-verification` 成功时的响应体。 */
|
|
20
|
+
export type SubmitIdentityVerificationResult = operations["submit-identity-verification"]["responses"][202]["content"]["application/json"];
|
|
21
|
+
/** `POST /account/v1/me/identity-verification` 的请求体。 */
|
|
22
|
+
export type SubmitIdentityVerificationBody = NonNullable<operations["submit-identity-verification"]["requestBody"]>["content"]["application/json"];
|
|
23
|
+
/** `GET /account/v1/me/invitations` 成功时的响应体。 */
|
|
24
|
+
export type ListMyInvitationsResult = operations["list-my-invitations"]["responses"][200]["content"]["application/json"];
|
|
25
|
+
/** `GET /account/v1/me/invitations` 的查询参数。 */
|
|
26
|
+
export type ListMyInvitationsQuery = operations["list-my-invitations"]["parameters"]["query"];
|
|
27
|
+
/** `POST /account/v1/me/invitations/accept` 成功时的响应体。 */
|
|
28
|
+
export type AcceptInvitationByTokenResult = operations["accept-invitation-by-token"]["responses"][200]["content"]["application/json"];
|
|
29
|
+
/** `POST /account/v1/me/invitations/accept` 的请求体。 */
|
|
30
|
+
export type AcceptInvitationByTokenBody = NonNullable<operations["accept-invitation-by-token"]["requestBody"]>["content"]["application/json"];
|
|
31
|
+
/** `POST /account/v1/me/invitations/{invitationId}/accept` 成功时的响应体。 */
|
|
32
|
+
export type AcceptInvitationResult = operations["accept-invitation"]["responses"][200]["content"]["application/json"];
|
|
33
|
+
/** `GET /account/v1/projects` 成功时的响应体。 */
|
|
34
|
+
export type ListProjectsResult = operations["list-projects"]["responses"][200]["content"]["application/json"];
|
|
35
|
+
/** `GET /account/v1/projects` 的查询参数。 */
|
|
36
|
+
export type ListProjectsQuery = operations["list-projects"]["parameters"]["query"];
|
|
37
|
+
/** `POST /account/v1/projects` 成功时的响应体。 */
|
|
38
|
+
export type CreateProjectResult = operations["create-project"]["responses"][201]["content"]["application/json"];
|
|
39
|
+
/** `POST /account/v1/projects` 的请求体。 */
|
|
40
|
+
export type CreateProjectBody = NonNullable<operations["create-project"]["requestBody"]>["content"]["application/json"];
|
|
41
|
+
/** `POST /account/v1/projects/{projectId}/token` 成功时的响应体。 */
|
|
42
|
+
export type ExchangeProjectTokenResult = operations["exchange-project-token"]["responses"][201]["content"]["application/json"];
|