@quesmed/types-rn 2.6.62 → 2.6.63
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/models/Subscription.d.ts
CHANGED
|
@@ -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
|
}
|
package/models/Subscription.js
CHANGED
|
@@ -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
|
@@ -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(
|
|
7
|
+
mutation CancelSubscription(
|
|
8
|
+
$subscriptionId: Int!
|
|
9
|
+
$comment: String
|
|
10
|
+
$feedback: String
|
|
11
|
+
) {
|
|
8
12
|
restricted {
|
|
9
|
-
cancelSubscription(
|
|
13
|
+
cancelSubscription(
|
|
14
|
+
subscriptionId: $subscriptionId
|
|
15
|
+
comment: $comment
|
|
16
|
+
feedback: $feedback
|
|
17
|
+
) {
|
|
10
18
|
id
|
|
11
19
|
endedAt
|
|
12
20
|
periodEndAt
|