@daocloud-proto/leopard 0.1.0-rc9 → 0.2.0-rc1

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-rc9",
3
+ "version":"0.2.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -18,7 +18,7 @@ export enum UnitType {
18
18
  HOUR = "HOUR",
19
19
  THOUSAND_TOKENS = "THOUSAND_TOKENS",
20
20
  GB_DAY = "GB_DAY",
21
- COMPUTE_UNIT = "COMPUTE_UNIT",
21
+ INSTANCE_NUMBER = "INSTANCE_NUMBER",
22
22
  }
23
23
 
24
24
  export type ListBillsRequest = {
@@ -58,6 +58,8 @@ export type bill = {
58
58
  orderPrice?: string
59
59
  couponPayment?: string
60
60
  amountDue?: string
61
+ billingItem?: string
62
+ voucherPayment?: string
61
63
  }
62
64
 
63
65
  export type BillingCycle = {
@@ -33,8 +33,31 @@ export type resource = {
33
33
  export type UpdateInventoryResponse = {
34
34
  }
35
35
 
36
+ export type ListInventoriesRequest = {
37
+ region?: string
38
+ node?: string
39
+ }
40
+
41
+ export type ListInventoriesResponse = {
42
+ resources?: resource[]
43
+ }
44
+
45
+ export type DeleteInventoryRequest = {
46
+ region?: string
47
+ node?: string
48
+ }
49
+
50
+ export type DeleteInventoryResponse = {
51
+ }
52
+
36
53
  export class Inventory {
37
54
  static UpdateInventory(req: UpdateInventoryRequest, initReq?: fm.InitReq): Promise<UpdateInventoryResponse> {
38
55
  return fm.fetchReq<UpdateInventoryRequest, UpdateInventoryResponse>(`/v1alpha1.inventory.Inventory/UpdateInventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
39
56
  }
57
+ static ListInventories(req: ListInventoriesRequest, initReq?: fm.InitReq): Promise<ListInventoriesResponse> {
58
+ return fm.fetchReq<ListInventoriesRequest, ListInventoriesResponse>(`/v1alpha1.inventory.Inventory/ListInventories`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
59
+ }
60
+ static DeleteInventory(req: DeleteInventoryRequest, initReq?: fm.InitReq): Promise<DeleteInventoryResponse> {
61
+ return fm.fetchReq<DeleteInventoryRequest, DeleteInventoryResponse>(`/v1alpha1.inventory.Inventory/DeleteInventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
62
+ }
40
63
  }
@@ -31,7 +31,7 @@ export enum UnitType {
31
31
  HOUR = "HOUR",
32
32
  THOUSAND_TOKENS = "THOUSAND_TOKENS",
33
33
  GB_DAY = "GB_DAY",
34
- COMPUTE_UNIT = "COMPUTE_UNIT",
34
+ INSTANCE_NUMBER = "INSTANCE_NUMBER",
35
35
  }
36
36
 
37
37
  export enum CreateOrderStatus {
@@ -14,13 +14,18 @@ export enum UnitType {
14
14
  HOUR = "HOUR",
15
15
  THOUSAND_TOKENS = "THOUSAND_TOKENS",
16
16
  GB_DAY = "GB_DAY",
17
- COMPUTE_UNIT = "COMPUTE_UNIT",
17
+ INSTANCE_NUMBER = "INSTANCE_NUMBER",
18
18
  }
19
19
 
20
20
  export enum QuantityUnit {
21
21
  EMPTY = "EMPTY",
22
22
  }
23
23
 
24
+ export enum SortOrder {
25
+ ASC = "ASC",
26
+ DESC = "DESC",
27
+ }
28
+
24
29
  export type Pagination = {
25
30
  total?: number
26
31
  page?: number
@@ -38,6 +43,8 @@ export type ListProductSKUsRequest = {
38
43
  page?: number
39
44
  pageSize?: number
40
45
  filterByAnd?: boolean
46
+ sortType?: string
47
+ sortOrder?: SortOrder
41
48
  }
42
49
 
43
50
  export type SkuItem = {
@@ -68,6 +75,7 @@ export type SpecField = {
68
75
  key?: string
69
76
  value?: string
70
77
  keyName?: string
78
+ valueName?: string
71
79
  }
72
80
 
73
81
  export type ListRegionsRequest = {
@@ -0,0 +1,94 @@
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 VoucherStatus {
10
+ Active = "Active",
11
+ UsedUp = "UsedUp",
12
+ Expired = "Expired",
13
+ }
14
+
15
+ export type BatchCreateVouchersRequest = {
16
+ description?: string
17
+ totalAmount?: string
18
+ effectiveDays?: number
19
+ quantity?: number
20
+ }
21
+
22
+ export type BatchCreateVouchersResponse = {
23
+ voucherIds?: string[]
24
+ }
25
+
26
+ export type ListActiveVouchersByCurrentUserRequest = {
27
+ voucherId?: string
28
+ page?: number
29
+ pageSize?: number
30
+ }
31
+
32
+ export type ListExpiredVouchersByCurrentUserRequest = {
33
+ voucherId?: string
34
+ status?: string
35
+ page?: number
36
+ pageSize?: number
37
+ }
38
+
39
+ export type ListVouchersResponse = {
40
+ items?: VoucherInfo[]
41
+ pagination?: Pagination
42
+ }
43
+
44
+ export type Pagination = {
45
+ total?: number
46
+ page?: number
47
+ pageSize?: number
48
+ }
49
+
50
+ export type VoucherInfo = {
51
+ voucherId?: string
52
+ description?: string
53
+ status?: VoucherStatus
54
+ totalAmount?: string
55
+ remainingAmount?: string
56
+ regions?: string[]
57
+ products?: string[]
58
+ orderTypes?: string[]
59
+ effectTimestamp?: string
60
+ expireTimestamp?: string
61
+ }
62
+
63
+ export type ActivateVoucherRequest = {
64
+ voucherId?: string
65
+ }
66
+
67
+ export type ActivateVoucherResponse = {
68
+ }
69
+
70
+ export type GetVoucherStatByCurrentUserRequest = {
71
+ }
72
+
73
+ export type GetVoucherStatByCurrentUserResponse = {
74
+ amount?: string
75
+ count?: number
76
+ }
77
+
78
+ export class Voucher {
79
+ static BatchCreateVouchers(req: BatchCreateVouchersRequest, initReq?: fm.InitReq): Promise<BatchCreateVouchersResponse> {
80
+ return fm.fetchReq<BatchCreateVouchersRequest, BatchCreateVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/batch-create`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
81
+ }
82
+ static ActivateVoucher(req: ActivateVoucherRequest, initReq?: fm.InitReq): Promise<ActivateVoucherResponse> {
83
+ return fm.fetchReq<ActivateVoucherRequest, ActivateVoucherResponse>(`/apis/leopard.io/v1alpha1/vouchers/activate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
84
+ }
85
+ static ListActiveVouchersByCurrentUser(req: ListActiveVouchersByCurrentUserRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
86
+ return fm.fetchReq<ListActiveVouchersByCurrentUserRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/active?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
87
+ }
88
+ static ListExpiredVouchersByCurrentUser(req: ListExpiredVouchersByCurrentUserRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
89
+ return fm.fetchReq<ListExpiredVouchersByCurrentUserRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/expired?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
90
+ }
91
+ static GetVoucherStatByCurrentUser(req: GetVoucherStatByCurrentUserRequest, initReq?: fm.InitReq): Promise<GetVoucherStatByCurrentUserResponse> {
92
+ return fm.fetchReq<GetVoucherStatByCurrentUserRequest, GetVoucherStatByCurrentUserResponse>(`/apis/leopard.io/v1alpha1/vouchers/stat?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
93
+ }
94
+ }