@quesmed/types-rn 2.6.117 → 2.6.119

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.
@@ -0,0 +1,20 @@
1
+ import { ISubscription } from './Subscription';
2
+ export interface IInvoice {
3
+ id: string;
4
+ amount_due: number;
5
+ amount_paid: number;
6
+ amount_remaining: number;
7
+ status: string;
8
+ subscriptionId: string;
9
+ billing_reason?: string;
10
+ collection_method?: string;
11
+ total?: number;
12
+ tax?: number;
13
+ total_excluding_tax?: number;
14
+ payment_intent?: string;
15
+ metadata?: Record<string, any>;
16
+ createdAt: number | Date;
17
+ updatedAt: number | Date;
18
+ renewed: boolean;
19
+ subscription?: ISubscription;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ import { IInvoice } from './Invoice';
1
2
  import { IProduct } from './Product';
2
3
  import { Id } from './Type';
3
4
  import { IClassYear, IUser } from './User';
@@ -12,8 +13,9 @@ export declare enum ECancelReasons {
12
13
  UNUSED = "unused"
13
14
  }
14
15
  export declare enum ESubSource {
15
- STRIPE = 0,
16
- REVENUE_CAT = 1
16
+ ALL = 0,
17
+ STRIPE = 1,
18
+ REVENUE_CAT = 2
17
19
  }
18
20
  export interface ISubscription {
19
21
  id: Id;
@@ -33,4 +35,5 @@ export interface ISubscription {
33
35
  invoiced: number;
34
36
  feedback: ECancelReasons | null;
35
37
  comment: string;
38
+ invoices?: IInvoice[];
36
39
  }
@@ -15,6 +15,7 @@ var ECancelReasons;
15
15
  })(ECancelReasons = exports.ECancelReasons || (exports.ECancelReasons = {}));
16
16
  var ESubSource;
17
17
  (function (ESubSource) {
18
- ESubSource[ESubSource["STRIPE"] = 0] = "STRIPE";
19
- ESubSource[ESubSource["REVENUE_CAT"] = 1] = "REVENUE_CAT";
18
+ ESubSource[ESubSource["ALL"] = 0] = "ALL";
19
+ ESubSource[ESubSource["STRIPE"] = 1] = "STRIPE";
20
+ ESubSource[ESubSource["REVENUE_CAT"] = 2] = "REVENUE_CAT";
20
21
  })(ESubSource = exports.ESubSource || (exports.ESubSource = {}));
package/models/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './Difficulty';
10
10
  export * from './Feedback';
11
11
  export * from './File';
12
12
  export * from './Highlight';
13
+ export * from './Invoice';
13
14
  export * from './Marksheet';
14
15
  export * from './MockTest';
15
16
  export * from './Note';
package/models/index.js CHANGED
@@ -26,6 +26,7 @@ __exportStar(require("./Difficulty"), exports);
26
26
  __exportStar(require("./Feedback"), exports);
27
27
  __exportStar(require("./File"), exports);
28
28
  __exportStar(require("./Highlight"), exports);
29
+ __exportStar(require("./Invoice"), exports);
29
30
  __exportStar(require("./Marksheet"), exports);
30
31
  __exportStar(require("./MockTest"), exports);
31
32
  __exportStar(require("./Note"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.117",
3
+ "version": "2.6.119",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,4 +1,4 @@
1
- import { EProductDuration, EProductType, IEntitlement, IProductFeedback, IUser } from '../../../models';
1
+ import { EProductDuration, EProductType, ESubSource, IEntitlement, IProductFeedback, IUser } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const IMPORT_STATS: import("@apollo/client").DocumentNode;
4
4
  export interface IImportStats {
@@ -19,8 +19,9 @@ export interface IRevenue {
19
19
  entitlement: IEntitlement;
20
20
  duration: number;
21
21
  name: string;
22
- count: number;
23
- total: number;
22
+ subscriptionCount: number;
23
+ totalEarning: number;
24
+ invoiceCount: number;
24
25
  }
25
26
  export declare enum ESubType {
26
27
  ALL = 0,
@@ -33,6 +34,7 @@ export type IEarningsVar = {
33
34
  to: Date | number | null;
34
35
  force: boolean;
35
36
  subType: ESubType;
37
+ source: ESubSource;
36
38
  };
37
39
  export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
38
40
  export declare const USER_STATUS: import("@apollo/client").DocumentNode;
@@ -22,6 +22,7 @@ exports.EARNINGS = (0, client_1.gql) `
22
22
  $from: Date
23
23
  $to: Date
24
24
  $force: Boolean!
25
+ $source: Int
25
26
  ) {
26
27
  admin {
27
28
  earnings(
@@ -30,6 +31,7 @@ exports.EARNINGS = (0, client_1.gql) `
30
31
  from: $from
31
32
  to: $to
32
33
  force: $force
34
+ source: $source
33
35
  ) {
34
36
  entitlement {
35
37
  id
@@ -37,8 +39,9 @@ exports.EARNINGS = (0, client_1.gql) `
37
39
  }
38
40
  duration
39
41
  name
40
- count
41
- total
42
+ subscriptionCount
43
+ totalEarning
44
+ invoiceCount
42
45
  }
43
46
  }
44
47
  }