@quesmed/types 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 = {}));
@@ -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
@@ -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 +1,12 @@
1
- export {};
1
+ // These options are only available for feedback in stripe, we cannot modify them
2
+ export var ECancelReasons;
3
+ (function (ECancelReasons) {
4
+ ECancelReasons["CUSTOMER_SERVICE"] = "customer_service";
5
+ ECancelReasons["LOW_QUALITY"] = "low_quality";
6
+ ECancelReasons["MISSING_FEATURES"] = "missing_features";
7
+ ECancelReasons["OTHER"] = "other";
8
+ ECancelReasons["SWITCHED_SERVICE"] = "switched_service";
9
+ ECancelReasons["TOO_COMPLEX"] = "too_complex";
10
+ ECancelReasons["TOO_EXPENSIVE"] = "too_expensive";
11
+ ECancelReasons["UNUSED"] = "unused";
12
+ })(ECancelReasons || (ECancelReasons = {}));
@@ -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;
@@ -4,9 +4,9 @@ import { CHAPTER_WITH_HIGHLIGHT_FIELDS, HIGHLIGHT_FIELDS, UPSERT_CHAPTER_NOTE_FR
4
4
  * upsertChapterNote
5
5
  */
6
6
  export const UPSERT_CHAPTER_NOTE = gql `
7
- mutation UpsertChapterNote($chapterId: Int!, $note: String!) {
7
+ mutation UpsertChapterNote($chapterId: Int!, $note: String!, $marksheetId: Int) {
8
8
  restricted {
9
- upsertChapterNote(chapterId: $chapterId, note: $note) {
9
+ upsertChapterNote(chapterId: $chapterId, note: $note, marksheetId: $marksheetId) {
10
10
  id
11
11
  chapterId
12
12
  userId
@@ -73,7 +73,7 @@ export const updateChapterHighlights = (cache, result, options) => {
73
73
  return;
74
74
  }
75
75
  try {
76
- for (const { chapterId, highlights } of variables.input) {
76
+ for (const { chapterId, highlights } of addChapterHighlight) {
77
77
  cache.writeFragment({
78
78
  id: cache.identify({
79
79
  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;
@@ -1,9 +1,17 @@
1
1
  import { gql } from '@apollo/client';
2
2
  import { USER } from '../../query/restricted';
3
3
  export const CANCEL_SUBSCRIPTION = gql `
4
- mutation CancelSubscription($subscriptionId: Int!) {
4
+ mutation CancelSubscription(
5
+ $subscriptionId: Int!
6
+ $comment: String
7
+ $feedback: String
8
+ ) {
5
9
  restricted {
6
- cancelSubscription(subscriptionId: $subscriptionId) {
10
+ cancelSubscription(
11
+ subscriptionId: $subscriptionId
12
+ comment: $comment
13
+ feedback: $feedback
14
+ ) {
7
15
  id
8
16
  endedAt
9
17
  periodEndAt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.62",
3
+ "version": "2.6.64",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",