@daocloud-proto/leopard 0.12.0 → 0.13.0-dev1
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/operation.pb.ts +44 -0
- package/v1alpha1/product.pb.ts +27 -3
package/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
export type ListAccountsRequest = {
|
|
9
|
+
search?: string
|
|
10
|
+
page?: number
|
|
11
|
+
pageSize?: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ListAccountsResponse = {
|
|
15
|
+
items?: Account[]
|
|
16
|
+
pagination?: Pagination
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type Account = {
|
|
20
|
+
id?: string
|
|
21
|
+
name?: string
|
|
22
|
+
email?: string
|
|
23
|
+
description?: string
|
|
24
|
+
firstname?: string
|
|
25
|
+
lastname?: string
|
|
26
|
+
source?: string
|
|
27
|
+
enabled?: boolean
|
|
28
|
+
createdAt?: string
|
|
29
|
+
updatedAt?: string
|
|
30
|
+
lastLoginAt?: string
|
|
31
|
+
canAuthorize?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type Pagination = {
|
|
35
|
+
total?: number
|
|
36
|
+
page?: number
|
|
37
|
+
pageSize?: number
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class Operations {
|
|
41
|
+
static ListAccounts(req: ListAccountsRequest, initReq?: fm.InitReq): Promise<ListAccountsResponse> {
|
|
42
|
+
return fm.fetchReq<ListAccountsRequest, ListAccountsResponse>(`/apis/leopard.io/v1alpha1/operations/accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
43
|
+
}
|
|
44
|
+
}
|
package/v1alpha1/product.pb.ts
CHANGED
|
@@ -98,6 +98,9 @@ export type SkuItem = {
|
|
|
98
98
|
inventory?: number
|
|
99
99
|
meteringAmountsDiscounts?: MeteringAmountsDiscount[]
|
|
100
100
|
canTransferPayAsYouGo?: boolean
|
|
101
|
+
available?: boolean
|
|
102
|
+
displayOrder?: number
|
|
103
|
+
transferSkuId?: string
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
export type ListProductSKUsResponse = {
|
|
@@ -147,6 +150,7 @@ export type GetSKUResponse = {
|
|
|
147
150
|
inventory?: number
|
|
148
151
|
meteringAmountsDiscounts?: MeteringAmountsDiscount[]
|
|
149
152
|
canTransferPayAsYouGo?: boolean
|
|
153
|
+
transferSkuId?: string
|
|
150
154
|
}
|
|
151
155
|
|
|
152
156
|
export type MeteringAmountsDiscount = {
|
|
@@ -287,8 +291,7 @@ export type ListProductSpecFieldKeyResponse = {
|
|
|
287
291
|
|
|
288
292
|
export type ListSKUInfosRequest = {
|
|
289
293
|
product?: string
|
|
290
|
-
|
|
291
|
-
filter?: {[key: string]: FilterStringArr}
|
|
294
|
+
region?: string
|
|
292
295
|
page?: number
|
|
293
296
|
pageSize?: number
|
|
294
297
|
}
|
|
@@ -376,6 +379,24 @@ export type ListRegionsDomainsResponse = {
|
|
|
376
379
|
items?: RegionDomain[]
|
|
377
380
|
}
|
|
378
381
|
|
|
382
|
+
export type ListBillingPoliciesRequest = {
|
|
383
|
+
product?: string
|
|
384
|
+
page?: number
|
|
385
|
+
pageSize?: number
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export type BillingPolicy = {
|
|
389
|
+
id?: string
|
|
390
|
+
product?: string
|
|
391
|
+
billingType?: BillingType
|
|
392
|
+
meteringType?: string
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export type ListBillingPoliciesResponse = {
|
|
396
|
+
items?: BillingPolicy[]
|
|
397
|
+
pagination?: Pagination
|
|
398
|
+
}
|
|
399
|
+
|
|
379
400
|
export class Product {
|
|
380
401
|
static ListProductSKUs(req: ListProductSKUsRequest, initReq?: fm.InitReq): Promise<ListProductSKUsResponse> {
|
|
381
402
|
return fm.fetchReq<ListProductSKUsRequest, ListProductSKUsResponse>(`/apis/leopard.io/v1alpha1/products/skus`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -416,7 +437,7 @@ export class Product {
|
|
|
416
437
|
static ListProductSpecFieldKey(req: ListProductSpecFieldKeyRequest, initReq?: fm.InitReq): Promise<ListProductSpecFieldKeyResponse> {
|
|
417
438
|
return fm.fetchReq<ListProductSpecFieldKeyRequest, ListProductSpecFieldKeyResponse>(`/apis/leopard.io/v1alpha1/products/spec-field-keys?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
418
439
|
}
|
|
419
|
-
static
|
|
440
|
+
static ListSKUInfos(req: ListSKUInfosRequest, initReq?: fm.InitReq): Promise<ListSKUInfosResponse> {
|
|
420
441
|
return fm.fetchReq<ListSKUInfosRequest, ListSKUInfosResponse>(`/apis/leopard.io/v1alpha1/products/sku-infos?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
421
442
|
}
|
|
422
443
|
static GetSKUInfo(req: GetSKUInfoRequest, initReq?: fm.InitReq): Promise<GetSKUInfoResponse> {
|
|
@@ -446,4 +467,7 @@ export class Product {
|
|
|
446
467
|
static ListRegionsDomains(req: ListRegionsDomainsRequest, initReq?: fm.InitReq): Promise<ListRegionsDomainsResponse> {
|
|
447
468
|
return fm.fetchReq<ListRegionsDomainsRequest, ListRegionsDomainsResponse>(`/apis/leopard.io/v1alpha1/products/region-domain?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
448
469
|
}
|
|
470
|
+
static ListBillingPolicies(req: ListBillingPoliciesRequest, initReq?: fm.InitReq): Promise<ListBillingPoliciesResponse> {
|
|
471
|
+
return fm.fetchReq<ListBillingPoliciesRequest, ListBillingPoliciesResponse>(`/apis/leopard.io/v1alpha1/products/billing-policies?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
472
|
+
}
|
|
449
473
|
}
|