@daocloud-proto/leopard 0.17.0-dev1 → 0.17.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.17.0-dev1",
3
+ "version":"0.17.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -6,6 +6,15 @@
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
10
+ type OneOf<T> =
11
+ | { [k in keyof T]?: undefined }
12
+ | (
13
+ keyof T extends infer K ?
14
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
15
+ : never)
16
+ : never);
17
+
9
18
  export enum BillingType {
10
19
  PAY_AS_YOU_GO = "PAY_AS_YOU_GO",
11
20
  SUBSCRIPTION_DAILY = "SUBSCRIPTION_DAILY",
@@ -43,6 +52,11 @@ export enum SkuDiscountScheduleType {
43
52
  SKU_DISCOUNT_SCHEDULE_TYPE_DAILY = "SKU_DISCOUNT_SCHEDULE_TYPE_DAILY",
44
53
  }
45
54
 
55
+ export enum SkuPaymentPolicy {
56
+ SKU_PAYMENT_POLICY_UNSPECIFIED = "SKU_PAYMENT_POLICY_UNSPECIFIED",
57
+ SKU_PAYMENT_POLICY_BALANCE_ONLY = "SKU_PAYMENT_POLICY_BALANCE_ONLY",
58
+ }
59
+
46
60
  export type CreateDiscountRuleRequest = {
47
61
  name?: string
48
62
  meteringAmountsDiscounts?: string
@@ -142,6 +156,7 @@ export type SkuItem = {
142
156
  displayOrder?: number
143
157
  transferSkuId?: string
144
158
  discountInfo?: SkuDiscountInfo
159
+ paymentPolicy?: SkuPaymentPolicy
145
160
  }
146
161
 
147
162
  export type ListProductSKUsResponse = {
@@ -193,6 +208,7 @@ export type GetSKUResponse = {
193
208
  canTransferPayAsYouGo?: boolean
194
209
  transferSkuId?: string
195
210
  discountInfo?: SkuDiscountInfo
211
+ paymentPolicy?: SkuPaymentPolicy
196
212
  }
197
213
 
198
214
  export type MeteringAmountsDiscount = {
@@ -369,6 +385,7 @@ export type GetSKUInfoResponse = {
369
385
  description?: string
370
386
  available?: number
371
387
  discountInfo?: SkuDiscountInfo
388
+ paymentPolicy?: SkuPaymentPolicy
372
389
  }
373
390
 
374
391
  export type CreateSKUInfoRequest = {
@@ -388,7 +405,8 @@ export type CreateSKUInfoResponse = {
388
405
  id?: string
389
406
  }
390
407
 
391
- export type UpdateSKUInfoRequest = {
408
+
409
+ type BaseUpdateSKUInfoRequest = {
392
410
  id?: string
393
411
  specId?: number
394
412
  productName?: string
@@ -402,6 +420,9 @@ export type UpdateSKUInfoRequest = {
402
420
  discountRuleId?: string
403
421
  }
404
422
 
423
+ export type UpdateSKUInfoRequest = BaseUpdateSKUInfoRequest
424
+ & OneOf<{ paymentPolicy: SkuPaymentPolicy }>
425
+
405
426
  export type UpdateSKUInfoResponse = {
406
427
  }
407
428