@lifeready/core 1.1.21 → 1.1.23
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/bundles/lifeready-core.umd.js +50 -11
- package/bundles/lifeready-core.umd.js.map +1 -1
- package/bundles/lifeready-core.umd.min.js +1 -1
- package/bundles/lifeready-core.umd.min.js.map +1 -1
- package/esm2015/lib/api/types/lr-graphql.types.js +1 -1
- package/esm2015/lib/life-ready.config.js +2 -1
- package/esm2015/lib/plan2/plan2.gql.js +53 -4
- package/esm2015/lib/plan2/plan2.service.js +38 -3
- package/esm2015/lib/plan2/plan2.types.js +1 -1
- package/fesm2015/lifeready-core.js +89 -4
- package/fesm2015/lifeready-core.js.map +1 -1
- package/lib/api/types/lr-graphql.types.d.ts +15 -9
- package/lib/plan2/plan2.gql.d.ts +20 -5
- package/lib/plan2/plan2.service.d.ts +25 -2
- package/lib/plan2/plan2.types.d.ts +4 -0
- package/lifeready-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Connection, DateTime, GenericScalar, ID, JSONObject, JSONString, LrEmail, Node, TimeStamped } from './graphql.types';
|
|
2
2
|
export declare function mapEdges<T>(connection: Connection<T>): T[];
|
|
3
3
|
export interface FeaturesNode {
|
|
4
|
-
myVault
|
|
5
|
-
tpVault
|
|
6
|
-
shareVault
|
|
4
|
+
myVault?: string[];
|
|
5
|
+
tpVault?: string[];
|
|
6
|
+
shareVault?: string[];
|
|
7
7
|
}
|
|
8
8
|
export declare enum UserDeleteState {
|
|
9
9
|
REQUESTED = "REQUESTED"
|
|
@@ -210,6 +210,7 @@ export interface ContactCardSharedCipherData {
|
|
|
210
210
|
}
|
|
211
211
|
/**
|
|
212
212
|
* The contents of the one-time key cipher
|
|
213
|
+
* These fields are not optional because they are not within the user's control to select in a gql query.
|
|
213
214
|
*/
|
|
214
215
|
export interface OtKeyCipherClearJson2 {
|
|
215
216
|
nonce: string;
|
|
@@ -571,7 +572,7 @@ export interface SharedScenarioClaimNode extends Node, TimeStamped {
|
|
|
571
572
|
sharedScenario?: SharedScenarioNode;
|
|
572
573
|
isClaimant?: boolean;
|
|
573
574
|
asClaimReceiver?: SharedScenarioClaimReceiverNode;
|
|
574
|
-
claim
|
|
575
|
+
claim?: SharedTpClaimNode;
|
|
575
576
|
}
|
|
576
577
|
export interface SharedScenarioClaimApproverNode extends Node, TimeStamped {
|
|
577
578
|
receivers?: Connection<SharedScenarioReceiverNode>;
|
|
@@ -666,12 +667,17 @@ export interface PromotionalCodeField {
|
|
|
666
667
|
percentOff?: number;
|
|
667
668
|
name?: string;
|
|
668
669
|
}
|
|
670
|
+
export interface PeriodField {
|
|
671
|
+
start?: DateTime;
|
|
672
|
+
end?: DateTime;
|
|
673
|
+
}
|
|
669
674
|
export interface IssuedPlanNode extends Node, TimeStamped {
|
|
670
|
-
name
|
|
671
|
-
description
|
|
672
|
-
currentStates
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
name?: string;
|
|
676
|
+
description?: string;
|
|
677
|
+
currentStates?: IssuedPlanStateNode[];
|
|
678
|
+
currentPeriod?: PeriodField;
|
|
679
|
+
currentPriceOption?: PriceOptionField;
|
|
680
|
+
alternativePriceOptions?: PriceOptionField[];
|
|
675
681
|
}
|
|
676
682
|
export interface IssuedPlanStateNode extends Node, TimeStamped {
|
|
677
683
|
periodStart?: DateTime;
|
package/lib/plan2/plan2.gql.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { ID, IssuedPlanNode, PaymentCaptureField, PaymentCardField, PaymentMethodNode } from '../api/types';
|
|
1
|
+
import { ID, IssuedPlanNode, IssuedPlanStateNode, PaymentCaptureField, PaymentCardField, PaymentMethodNode, PriceOptionField } from '../api/types';
|
|
2
|
+
export declare type PlanFieldsResult = Required<IssuedPlanNode> & {
|
|
3
|
+
currentStates: Required<IssuedPlanStateNode>[];
|
|
4
|
+
currentPriceOption: Required<PriceOptionField>;
|
|
5
|
+
alternativePriceOptions: Required<PriceOptionField>;
|
|
6
|
+
};
|
|
2
7
|
export interface InitiateStripePaymentMethodCaptureMutationResult {
|
|
3
8
|
initiateStripePaymentMethodCapture: {
|
|
4
9
|
paymentCapture: Required<PaymentCaptureField>;
|
|
@@ -37,15 +42,25 @@ export interface RemoveDefaultPaymentMethodMutationResult {
|
|
|
37
42
|
export declare const RemoveDefaultPaymentMethodMutation: import("../_common/ast").TypedDocumentNode<RemoveDefaultPaymentMethodMutationResult>;
|
|
38
43
|
export interface IssuePlanMutationResult {
|
|
39
44
|
issuePlan: {
|
|
40
|
-
plan:
|
|
41
|
-
id: ID;
|
|
42
|
-
};
|
|
45
|
+
plan: PlanFieldsResult;
|
|
43
46
|
};
|
|
44
47
|
}
|
|
45
48
|
export declare const IssuePlanMutation: import("../_common/ast").TypedDocumentNode<IssuePlanMutationResult>;
|
|
46
49
|
export interface CancelPlanMutationResult {
|
|
47
50
|
cancelPlan: {
|
|
48
|
-
plan:
|
|
51
|
+
plan: PlanFieldsResult;
|
|
49
52
|
};
|
|
50
53
|
}
|
|
51
54
|
export declare const CancelPlanMutation: import("../_common/ast").TypedDocumentNode<CancelPlanMutationResult>;
|
|
55
|
+
export interface ChangePriceOptionMutationResult {
|
|
56
|
+
changePriceOption: {
|
|
57
|
+
plan: PlanFieldsResult;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export declare const ChangePriceOptionMutation: import("../_common/ast").TypedDocumentNode<ChangePriceOptionMutationResult>;
|
|
61
|
+
export interface ReactivatePlanMutationResult {
|
|
62
|
+
reactivatePlan: {
|
|
63
|
+
plan: PlanFieldsResult;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export declare const ReactivatePlanMutation: import("../_common/ast").TypedDocumentNode<ReactivatePlanMutationResult>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Injector, NgZone } from '@angular/core';
|
|
2
2
|
import { LrMutation, LrService } from '../api/lr-graphql';
|
|
3
3
|
import { LrRelayIdInput } from '../api/types';
|
|
4
|
-
import { CancelPlanOptions, IssuePlanOptions } from './plan2.types';
|
|
4
|
+
import { CancelPlanOptions, ChangePriceOptionOptions, IssuePlanOptions } from './plan2.types';
|
|
5
5
|
export declare class Plan2Service extends LrService {
|
|
6
6
|
private ngZone;
|
|
7
7
|
private injector;
|
|
@@ -55,7 +55,7 @@ export declare class Plan2Service extends LrService {
|
|
|
55
55
|
*
|
|
56
56
|
* @param options.issuerUid The same issuerUid that is in the AvailablePlanField returned by queries such as availablePublicPlans
|
|
57
57
|
* @param options.planUid The same planUid that is in the AvailablePlanField returned by queries such as availablePublicPlans
|
|
58
|
-
* @param options.priceId The priceId from PriceOptionField
|
|
58
|
+
* @param options.priceId The priceId from PriceOptionField (eg. inside AvailablePlanField)
|
|
59
59
|
* @param options.promotionalCode promotion code where applicable
|
|
60
60
|
* @returns Promise that resolves to a mutation
|
|
61
61
|
*/
|
|
@@ -85,4 +85,27 @@ export declare class Plan2Service extends LrService {
|
|
|
85
85
|
cancelPlanMutation(options: CancelPlanOptions): LrMutation<import("./plan2.gql").CancelPlanMutationResult, {
|
|
86
86
|
input: CancelPlanOptions;
|
|
87
87
|
}>;
|
|
88
|
+
changePriceOption(options: ChangePriceOptionOptions): Promise<import("./plan2.gql").ChangePriceOptionMutationResult>;
|
|
89
|
+
/**
|
|
90
|
+
* Change the price option for a plan.
|
|
91
|
+
*
|
|
92
|
+
* @param options.planId The id from IssuedPlanNode
|
|
93
|
+
* @param options.priceId The priceId from PriceOptionField (eg. inside AvailablePlanField)
|
|
94
|
+
* @returns Promise that resolves to a mutation
|
|
95
|
+
*/
|
|
96
|
+
changePriceOptionMutation(options: ChangePriceOptionOptions): LrMutation<import("./plan2.gql").ChangePriceOptionMutationResult, {
|
|
97
|
+
input: ChangePriceOptionOptions;
|
|
98
|
+
}>;
|
|
99
|
+
reactivatePlan(planId: LrRelayIdInput): Promise<import("./plan2.gql").ReactivatePlanMutationResult>;
|
|
100
|
+
/**
|
|
101
|
+
* Reactivate a cancelled plan with a specified price option.
|
|
102
|
+
*
|
|
103
|
+
* @param options.planId The id from IssuedPlanNode
|
|
104
|
+
* @returns Promise that resolves to a mutation
|
|
105
|
+
*/
|
|
106
|
+
reactivatePlanMutation(planId: LrRelayIdInput): LrMutation<import("./plan2.gql").ReactivatePlanMutationResult, {
|
|
107
|
+
input: {
|
|
108
|
+
planId: string;
|
|
109
|
+
};
|
|
110
|
+
}>;
|
|
88
111
|
}
|