@daocloud-proto/leopard 0.1.0-dev5 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/leopard",
3
- "version":"0.1.0-dev5",
3
+ "version":"0.1.0-dev6",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -7,18 +7,18 @@
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
9
  export enum BillingType {
10
- PayAsYouGo = "PayAsYouGo",
11
- SubscriptionDaily = "SubscriptionDaily",
12
- SubscriptionWeekly = "SubscriptionWeekly",
13
- SubscriptionMonthly = "SubscriptionMonthly",
14
- SubscriptionYearly = "SubscriptionYearly",
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
- Hour = "Hour",
19
- ThousandTokens = "ThousandTokens",
20
- GBDay = "GBDay",
21
- ComputeUnit = "ComputeUnit",
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 = {
@@ -7,31 +7,31 @@
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
9
  export enum OrderType {
10
- Purchase = "Purchase",
11
- Refund = "Refund",
12
- Upgrade = "Upgrade",
13
- Downgrade = "Downgrade",
10
+ PURCHASE = "PURCHASE",
11
+ REFUND = "REFUND",
12
+ UPGRADE = "UPGRADE",
13
+ DOWNGRADE = "DOWNGRADE",
14
14
  }
15
15
 
16
16
  export enum BillingType {
17
- PayAsYouGo = "PayAsYouGo",
18
- SubscriptionDaily = "SubscriptionDaily",
19
- SubscriptionWeekly = "SubscriptionWeekly",
20
- SubscriptionMonthly = "SubscriptionMonthly",
21
- SubscriptionYearly = "SubscriptionYearly",
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
- Paid = "Paid",
26
- Partial = "Partial",
27
- Refunded = "Refunded",
25
+ PAID = "PAID",
26
+ PARTIAL = "PARTIAL",
27
+ REFUNDED = "REFUNDED",
28
28
  }
29
29
 
30
30
  export enum UnitType {
31
- Hour = "Hour",
32
- ThousandTokens = "ThousandTokens",
33
- GBDay = "GBDay",
34
- ComputeUnit = "ComputeUnit",
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
+ }
@@ -7,13 +7,13 @@
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
9
  export enum PaymentChannel {
10
- Alipay = "Alipay",
11
- Wechat = "Wechat",
10
+ ALIPAY = "ALIPAY",
11
+ WECHAR = "WECHAR",
12
12
  }
13
13
 
14
14
  export enum PaymentType {
15
- QrCode = "QrCode",
16
- Redirect = "Redirect",
15
+ QR_CODE = "QR_CODE",
16
+ REDIRECT = "REDIRECT",
17
17
  }
18
18
 
19
19
  export type BalanceRequest = {