@quesmed/types 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 = {}));
@@ -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';
@@ -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);
@@ -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
  }
@@ -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 @@
1
+ export {};
@@ -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
  }
@@ -12,6 +12,7 @@ export var ECancelReasons;
12
12
  })(ECancelReasons || (ECancelReasons = {}));
13
13
  export var ESubSource;
14
14
  (function (ESubSource) {
15
- ESubSource[ESubSource["STRIPE"] = 0] = "STRIPE";
16
- ESubSource[ESubSource["REVENUE_CAT"] = 1] = "REVENUE_CAT";
15
+ ESubSource[ESubSource["ALL"] = 0] = "ALL";
16
+ ESubSource[ESubSource["STRIPE"] = 1] = "STRIPE";
17
+ ESubSource[ESubSource["REVENUE_CAT"] = 2] = "REVENUE_CAT";
17
18
  })(ESubSource || (ESubSource = {}));
@@ -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';
@@ -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';
@@ -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;
@@ -19,6 +19,7 @@ export const EARNINGS = gql `
19
19
  $from: Date
20
20
  $to: Date
21
21
  $force: Boolean!
22
+ $source: Int
22
23
  ) {
23
24
  admin {
24
25
  earnings(
@@ -27,6 +28,7 @@ export const EARNINGS = gql `
27
28
  from: $from
28
29
  to: $to
29
30
  force: $force
31
+ source: $source
30
32
  ) {
31
33
  entitlement {
32
34
  id
@@ -34,8 +36,9 @@ export const EARNINGS = gql `
34
36
  }
35
37
  duration
36
38
  name
37
- count
38
- total
39
+ subscriptionCount
40
+ totalEarning
41
+ invoiceCount
39
42
  }
40
43
  }
41
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.117",
3
+ "version": "2.6.119",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",