@quesmed/types-rn 2.6.62 → 2.6.64

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.
@@ -1,6 +1,16 @@
1
1
  import { IProduct } from './Product';
2
2
  import { Id } from './Type';
3
3
  import { IClassYear, IUser } from './User';
4
+ export declare enum ECancelReasons {
5
+ CUSTOMER_SERVICE = "customer_service",
6
+ LOW_QUALITY = "low_quality",
7
+ MISSING_FEATURES = "missing_features",
8
+ OTHER = "other",
9
+ SWITCHED_SERVICE = "switched_service",
10
+ TOO_COMPLEX = "too_complex",
11
+ TOO_EXPENSIVE = "too_expensive",
12
+ UNUSED = "unused"
13
+ }
4
14
  export interface ISubscription {
5
15
  id: Id;
6
16
  createdAt: number | Date;
@@ -15,4 +25,6 @@ export interface ISubscription {
15
25
  product?: IProduct;
16
26
  classYear: IClassYear;
17
27
  invoiced: number;
28
+ feedback: ECancelReasons | null;
29
+ comment: string;
18
30
  }
@@ -1,2 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ECancelReasons = void 0;
4
+ // These options are only available for feedback in stripe, we cannot modify them
5
+ var ECancelReasons;
6
+ (function (ECancelReasons) {
7
+ ECancelReasons["CUSTOMER_SERVICE"] = "customer_service";
8
+ ECancelReasons["LOW_QUALITY"] = "low_quality";
9
+ ECancelReasons["MISSING_FEATURES"] = "missing_features";
10
+ ECancelReasons["OTHER"] = "other";
11
+ ECancelReasons["SWITCHED_SERVICE"] = "switched_service";
12
+ ECancelReasons["TOO_COMPLEX"] = "too_complex";
13
+ ECancelReasons["TOO_EXPENSIVE"] = "too_expensive";
14
+ ECancelReasons["UNUSED"] = "unused";
15
+ })(ECancelReasons = exports.ECancelReasons || (exports.ECancelReasons = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.62",
3
+ "version": "2.6.64",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -9,6 +9,7 @@ export declare const UPSERT_CHAPTER_NOTE: import("@apollo/client").DocumentNode;
9
9
  export interface IUpsertChapterNoteVar {
10
10
  chapterId: number;
11
11
  note: string;
12
+ marksheetId?: number;
12
13
  }
13
14
  export type IUpsertChapterNoteData = RestrictedData<graphqlNormalize & Omit<IUserChapterNote, 'chapter'>, 'upsertChapterNote'>;
14
15
  export declare const updateCacheOnUpsertChapterNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertChapterNoteData>, options: ApolloUpdateOptions<IUpsertChapterNoteVar>) => void;
@@ -7,9 +7,9 @@ const fragments_1 = require("../../fragments");
7
7
  * upsertChapterNote
8
8
  */
9
9
  exports.UPSERT_CHAPTER_NOTE = (0, client_1.gql) `
10
- mutation UpsertChapterNote($chapterId: Int!, $note: String!) {
10
+ mutation UpsertChapterNote($chapterId: Int!, $note: String!, $marksheetId: Int) {
11
11
  restricted {
12
- upsertChapterNote(chapterId: $chapterId, note: $note) {
12
+ upsertChapterNote(chapterId: $chapterId, note: $note, marksheetId: $marksheetId) {
13
13
  id
14
14
  chapterId
15
15
  userId
@@ -78,7 +78,7 @@ const updateChapterHighlights = (cache, result, options) => {
78
78
  return;
79
79
  }
80
80
  try {
81
- for (const { chapterId, highlights } of variables.input) {
81
+ for (const { chapterId, highlights } of addChapterHighlight) {
82
82
  cache.writeFragment({
83
83
  id: cache.identify({
84
84
  id: chapterId,
@@ -4,6 +4,8 @@ import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../../apollo'
4
4
  import { RestrictedData, graphqlNormalize } from '../../types';
5
5
  export interface ICancelSubscriptionVar {
6
6
  subscriptionId: number;
7
+ comment?: ISubscription['comment'];
8
+ feedback?: ISubscription['feedback'];
7
9
  }
8
10
  export type ICancelSubscriptionData = RestrictedData<graphqlNormalize & ISubscription, 'cancelSubscription'>;
9
11
  export declare const CANCEL_SUBSCRIPTION: import("@apollo/client").DocumentNode;
@@ -4,9 +4,17 @@ exports.updateSubscriptionOnCancelOrRenew = exports.CANCEL_SUBSCRIPTION = void 0
4
4
  const client_1 = require("@apollo/client");
5
5
  const restricted_1 = require("../../query/restricted");
6
6
  exports.CANCEL_SUBSCRIPTION = (0, client_1.gql) `
7
- mutation CancelSubscription($subscriptionId: Int!) {
7
+ mutation CancelSubscription(
8
+ $subscriptionId: Int!
9
+ $comment: String
10
+ $feedback: String
11
+ ) {
8
12
  restricted {
9
- cancelSubscription(subscriptionId: $subscriptionId) {
13
+ cancelSubscription(
14
+ subscriptionId: $subscriptionId
15
+ comment: $comment
16
+ feedback: $feedback
17
+ ) {
10
18
  id
11
19
  endedAt
12
20
  periodEndAt