@daocloud-proto/leopard 0.1.0-dev4 → 0.1.0-dev6
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/package.json +1 -1
- package/v1alpha1/billing.pb.ts +9 -9
- package/v1alpha1/order.pb.ts +16 -16
- package/v1alpha1/product.pb.ts +80 -0
- package/v1alpha1/wallet.pb.ts +4 -4
package/package.json
CHANGED
package/v1alpha1/billing.pb.ts
CHANGED
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
|
|
9
9
|
export enum BillingType {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
PAY_AS_YOU_GO = "PAY_AS_YOU_GO",
|
|
11
|
+
SUBSCRIPTION_DAILY = "SUBSCRIPTION_DAILY",
|
|
12
|
+
SUBSCRIPTION_WEEKLY = "SUBSCRIPTION_WEEKLY",
|
|
13
|
+
SUBSCRIPTION_MONTHLY = "SUBSCRIPTION_MONTHLY",
|
|
14
|
+
SUBSCRIPTION_YEARLY = "SUBSCRIPTION_YEARLY",
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export enum UnitType {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
HOUR = "HOUR",
|
|
19
|
+
THOUSAND_TOKENS = "THOUSAND_TOKENS",
|
|
20
|
+
GB_DAY = "GB_DAY",
|
|
21
|
+
COMPUTE_UNIT = "COMPUTE_UNIT",
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export type ListBillingsRequest = {
|
package/v1alpha1/order.pb.ts
CHANGED
|
@@ -7,31 +7,31 @@
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
|
|
9
9
|
export enum OrderType {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
PURCHASE = "PURCHASE",
|
|
11
|
+
REFUND = "REFUND",
|
|
12
|
+
UPGRADE = "UPGRADE",
|
|
13
|
+
DOWNGRADE = "DOWNGRADE",
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export enum BillingType {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
PAY_AS_YOU_GO = "PAY_AS_YOU_GO",
|
|
18
|
+
SUBSCRIPTION_DAILY = "SUBSCRIPTION_DAILY",
|
|
19
|
+
SUBSCRIPTION_WEEKLY = "SUBSCRIPTION_WEEKLY",
|
|
20
|
+
SUBSCRIPTION_MONTHLY = "SUBSCRIPTION_MONTHLY",
|
|
21
|
+
SUBSCRIPTION_YEARLY = "SUBSCRIPTION_YEARLY",
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export enum OrderStatus {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
PAID = "PAID",
|
|
26
|
+
PARTIAL = "PARTIAL",
|
|
27
|
+
REFUNDED = "REFUNDED",
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export enum UnitType {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
HOUR = "HOUR",
|
|
32
|
+
THOUSAND_TOKENS = "THOUSAND_TOKENS",
|
|
33
|
+
GB_DAY = "GB_DAY",
|
|
34
|
+
COMPUTE_UNIT = "COMPUTE_UNIT",
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export type Pagination = {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../fetch.pb"
|
|
8
|
+
|
|
9
|
+
export enum BillingType {
|
|
10
|
+
PAY_AS_YOU_GO = "PAY_AS_YOU_GO",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum UnitType {
|
|
14
|
+
HOUR = "HOUR",
|
|
15
|
+
THOUSAND_TOKENS = "THOUSAND_TOKENS",
|
|
16
|
+
GB_DAY = "GB_DAY",
|
|
17
|
+
COMPUTE_UNIT = "COMPUTE_UNIT",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum Currency {
|
|
21
|
+
CNY = "CNY",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type Pagination = {
|
|
25
|
+
total?: number
|
|
26
|
+
page?: number
|
|
27
|
+
pageSize?: number
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type ListProductSkusRequest = {
|
|
31
|
+
product?: string
|
|
32
|
+
regionId?: string
|
|
33
|
+
filter?: {[key: string]: string}
|
|
34
|
+
page?: number
|
|
35
|
+
pageSize?: number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type SkuItem = {
|
|
39
|
+
id?: string
|
|
40
|
+
saleable?: boolean
|
|
41
|
+
billingType?: BillingType
|
|
42
|
+
unit?: UnitType
|
|
43
|
+
price?: number
|
|
44
|
+
region?: string
|
|
45
|
+
specId?: string
|
|
46
|
+
specName?: string
|
|
47
|
+
specDetails?: {[key: string]: string}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type ListProductSkusResponse = {
|
|
51
|
+
skus?: SkuItem[]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type ListProductSpecDetailValuesRequest = {
|
|
55
|
+
regionId?: string
|
|
56
|
+
resourceKey?: string
|
|
57
|
+
product?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type ProductSpecDetailValueItem = {
|
|
61
|
+
id?: string
|
|
62
|
+
name?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type ProductSpecDetailValuesArr = {
|
|
66
|
+
items?: ProductSpecDetailValueItem[]
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type ListProductSpecDetailValuesResponse = {
|
|
70
|
+
valuesMap?: {[key: string]: ProductSpecDetailValuesArr}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export class Product {
|
|
74
|
+
static ListProductSkus(req: ListProductSkusRequest, initReq?: fm.InitReq): Promise<ListProductSkusResponse> {
|
|
75
|
+
return fm.fetchReq<ListProductSkusRequest, ListProductSkusResponse>(`/apis/leopard.io/v1alpha1/product/${req["product"]}/skus?${fm.renderURLSearchParams(req, ["product"])}`, {...initReq, method: "GET"})
|
|
76
|
+
}
|
|
77
|
+
static ListProductSpecDetailValues(req: ListProductSpecDetailValuesRequest, initReq?: fm.InitReq): Promise<ListProductSpecDetailValuesResponse> {
|
|
78
|
+
return fm.fetchReq<ListProductSpecDetailValuesRequest, ListProductSpecDetailValuesResponse>(`/apis/leopard.io/v1alpha1/products/${req["product"]}/values?${fm.renderURLSearchParams(req, ["product"])}`, {...initReq, method: "GET"})
|
|
79
|
+
}
|
|
80
|
+
}
|
package/v1alpha1/wallet.pb.ts
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
|
|
9
9
|
export enum PaymentChannel {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
ALIPAY = "ALIPAY",
|
|
11
|
+
WECHAR = "WECHAR",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export enum PaymentType {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
QR_CODE = "QR_CODE",
|
|
16
|
+
REDIRECT = "REDIRECT",
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export type BalanceRequest = {
|