@metrifox/angular-sdk 1.0.2 → 2.0.0
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/README.md +310 -320
- package/dist/LICENSE +21 -0
- package/dist/README.md +477 -0
- package/dist/fesm2022/index.mjs +9653 -0
- package/{lib → dist/lib}/metrifox.module.d.ts +2 -2
- package/{lib → dist/lib}/metrifox.service.d.ts +22 -14
- package/{lib → dist/lib}/types/enum.d.ts +12 -2
- package/{lib → dist/lib}/types/interface.d.ts +390 -103
- package/dist/lib/utils/theme.d.ts +27 -0
- package/dist/modules/customer-portal/components/billing-history.component.d.ts +14 -0
- package/dist/modules/customer-portal/components/credit/credit-balance-section.component.d.ts +76 -0
- package/dist/modules/customer-portal/components/customer-portal.component.d.ts +64 -0
- package/dist/modules/customer-portal/components/entitlements/entitlement-summary.component.d.ts +15 -0
- package/dist/modules/customer-portal/components/entitlements/entitlement-usage.component.d.ts +35 -0
- package/dist/modules/customer-portal/components/entitlements/entitlements-section.component.d.ts +14 -0
- package/dist/modules/customer-portal/components/invoice-preview.component.d.ts +26 -0
- package/dist/modules/customer-portal/components/payment.component.d.ts +12 -0
- package/dist/modules/customer-portal/components/plan/plans-section.component.d.ts +70 -0
- package/dist/modules/customer-portal/components/subscription/subscription-actions.component.d.ts +22 -0
- package/dist/modules/customer-portal/components/subscription/subscription-details.component.d.ts +12 -0
- package/dist/modules/customer-portal/components/subscription/subscription-items.component.d.ts +27 -0
- package/dist/modules/customer-portal/components/subscription/subscription-section.component.d.ts +34 -0
- package/dist/modules/customer-portal/utils/defaults.d.ts +2 -0
- package/dist/modules/customer-portal/utils/helpers.d.ts +20 -0
- package/dist/modules/customer-portal/utils/icon-helpers.d.ts +3 -0
- package/dist/modules/customer-portal/utils/icons.d.ts +18 -0
- package/dist/modules/metrifox-ui/index.d.ts +1 -0
- package/dist/modules/metrifox-ui/themed-popover.component.d.ts +19 -0
- package/dist/modules/pricing-table/components/localization-select.component.d.ts +22 -0
- package/{lib/components/pricing-table → dist/modules/pricing-table/components}/pricing-table.component.d.ts +28 -6
- package/dist/modules/pricing-table/utils/defaults.d.ts +2 -0
- package/dist/public-api.d.ts +22 -0
- package/dist/styles.css +3 -0
- package/dist-storybook/3rdpartylicenses.txt +304 -0
- package/dist-storybook/index.html +12 -0
- package/dist-storybook/main.js +1 -0
- package/dist-storybook/polyfills.js +1 -0
- package/dist-storybook/runtime.js +1 -0
- package/dist-storybook/styles.css +2 -0
- package/package.json +53 -13
- package/vitest.config.ts +10 -0
- package/vitest.setup.ts +5 -0
- package/fesm2022/index.mjs +0 -5898
- package/lib/components/customer-portal/customer-portal.component.d.ts +0 -193
- package/public-api.d.ts +0 -20
- package/styles.css +0 -3
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{lib → dist/lib}/types/index.d.ts +0 -0
|
@@ -3,8 +3,8 @@ import { MetrifoxService } from './metrifox.service';
|
|
|
3
3
|
import { MetrifoxConfig } from './types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "@angular/common";
|
|
6
|
-
import * as i2 from "
|
|
7
|
-
import * as i3 from "
|
|
6
|
+
import * as i2 from "../modules/customer-portal/components/customer-portal.component";
|
|
7
|
+
import * as i3 from "../modules/pricing-table/components/pricing-table.component";
|
|
8
8
|
/**
|
|
9
9
|
* Metrifox Angular Module
|
|
10
10
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { MetrifoxConfig, Theme, CustomerDetails, Product, ProductPlans, BillingHistory, EntitlementUsage, EntitlementSummary, Wallet, CreditAllocation, Invoice,
|
|
3
|
+
import { MetrifoxConfig, Theme, CustomerDetails, Product, ProductPlans, BillingHistory, EntitlementUsage, EntitlementSummary, Wallet, CreditAllocation, Invoice, Localization, LocalizationSettings, WalletSetting, CreateWalletSettings, CreditTransaction, SubscriptionSettings } from './types';
|
|
4
|
+
import { setIfDefined as _setIfDefined, customerPortalThemeToCssVars as _customerPortalThemeToCssVars, pricingTableThemeToCssVars as _pricingTableThemeToCssVars, getGradient as _getGradient, getBackgroundImage as _getBackgroundImage } from './utils/theme';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Error thrown when SDK is not initialized
|
|
@@ -108,7 +109,7 @@ export declare class MetrifoxService {
|
|
|
108
109
|
/**
|
|
109
110
|
* Get credit transactions for an allocation
|
|
110
111
|
*/
|
|
111
|
-
getCreditTransactions(allocationId: string): Observable<
|
|
112
|
+
getCreditTransactions(allocationId: string): Observable<CreditTransaction[]>;
|
|
112
113
|
/**
|
|
113
114
|
* Read wallet settings for customer
|
|
114
115
|
*/
|
|
@@ -116,15 +117,15 @@ export declare class MetrifoxService {
|
|
|
116
117
|
/**
|
|
117
118
|
* Create wallet settings
|
|
118
119
|
*/
|
|
119
|
-
createWalletSettings(payload: CreateWalletSettings): Observable<
|
|
120
|
+
createWalletSettings(payload: CreateWalletSettings): Observable<unknown>;
|
|
120
121
|
/**
|
|
121
122
|
* Edit wallet settings
|
|
122
123
|
*/
|
|
123
|
-
editWalletSettings(id: string, payload: CreateWalletSettings): Observable<
|
|
124
|
+
editWalletSettings(id: string, payload: CreateWalletSettings): Observable<unknown>;
|
|
124
125
|
/**
|
|
125
126
|
* Delete wallet settings
|
|
126
127
|
*/
|
|
127
|
-
deleteWalletSettings(id: string): Observable<
|
|
128
|
+
deleteWalletSettings(id: string): Observable<unknown>;
|
|
128
129
|
/**
|
|
129
130
|
* Cancel subscription (schedule cancellation)
|
|
130
131
|
*/
|
|
@@ -156,7 +157,17 @@ export declare class MetrifoxService {
|
|
|
156
157
|
* Get product plans (published plans for a product)
|
|
157
158
|
* Note: Returns Offering[] directly, not ParentOffering[]
|
|
158
159
|
*/
|
|
159
|
-
getProductPlans(productKey?: string, customerKey?: string): Observable<ProductPlans>;
|
|
160
|
+
getProductPlans(productKey?: string, customerKey?: string, countryCode?: string): Observable<ProductPlans>;
|
|
161
|
+
/**
|
|
162
|
+
* Subscription settings for the tenant (e.g. whether customer can self-cancel)
|
|
163
|
+
*/
|
|
164
|
+
getSubscriptionSettings(): Observable<SubscriptionSettings>;
|
|
165
|
+
/**
|
|
166
|
+
* Cancel a scheduled subscription change (upgrade/downgrade/add-on removal / scheduled cancel)
|
|
167
|
+
*/
|
|
168
|
+
cancelScheduledSubscription(subscriptionId: string): Observable<{
|
|
169
|
+
message?: string;
|
|
170
|
+
}>;
|
|
160
171
|
/**
|
|
161
172
|
* Get checkout URL for an offering
|
|
162
173
|
*/
|
|
@@ -172,14 +183,11 @@ export declare class MetrifoxService {
|
|
|
172
183
|
billingPeriod?: string;
|
|
173
184
|
localization?: string;
|
|
174
185
|
}): string;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
static
|
|
179
|
-
|
|
180
|
-
* Convert PricingTable theme to CSS variables
|
|
181
|
-
*/
|
|
182
|
-
static pricingTableThemeToCssVars(theme: PricingTableTheme): CssVarMap;
|
|
186
|
+
static setIfDefined: typeof _setIfDefined;
|
|
187
|
+
static customerPortalThemeToCssVars: typeof _customerPortalThemeToCssVars;
|
|
188
|
+
static pricingTableThemeToCssVars: typeof _pricingTableThemeToCssVars;
|
|
189
|
+
static getGradient: typeof _getGradient;
|
|
190
|
+
static getBackgroundImage: typeof _getBackgroundImage;
|
|
183
191
|
static ɵfac: i0.ɵɵFactoryDeclaration<MetrifoxService, never>;
|
|
184
192
|
static ɵprov: i0.ɵɵInjectableDeclaration<MetrifoxService>;
|
|
185
193
|
}
|
|
@@ -85,7 +85,8 @@ export declare enum ResetIntervals {
|
|
|
85
85
|
WEEKLY = "weekly",
|
|
86
86
|
DAILY = "daily",
|
|
87
87
|
BILLING_PERIOD = "billing_period",
|
|
88
|
-
NEVER = "never"
|
|
88
|
+
NEVER = "never",
|
|
89
|
+
NONE = "none"
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
92
|
* Enforcement types
|
|
@@ -109,7 +110,8 @@ export declare enum BillingInterval {
|
|
|
109
110
|
*/
|
|
110
111
|
export declare enum BillingTimingTypes {
|
|
111
112
|
IN_ADVANCE = "in_advance",
|
|
112
|
-
IN_ARREARS = "in_arrears"
|
|
113
|
+
IN_ARREARS = "in_arrears",
|
|
114
|
+
PAY_AS_YOU_GO = "pay_as_you_go"
|
|
113
115
|
}
|
|
114
116
|
/**
|
|
115
117
|
* Aggregation methods
|
|
@@ -154,3 +156,11 @@ export declare enum LocalizationSelection {
|
|
|
154
156
|
STRICT_AUTO_DETECT = "strict_auto_detect",
|
|
155
157
|
SMART_PRE_FILL = "smart_pre_fill"
|
|
156
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Scheduled subscription change type (upgrade/downgrade/add-on removal / cancel-at-period-end)
|
|
161
|
+
*/
|
|
162
|
+
export declare enum ScheduledChangeType {
|
|
163
|
+
UPGRADE = "upgrade",
|
|
164
|
+
DOWNGRADE = "downgrade",
|
|
165
|
+
ADDON_REMOVE = "addon_remove"
|
|
166
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
-
import { FeatureType, FeatureStatus, SubscriptionStatus, InvoiceStatusType, PriceTypes, ResetIntervals, EnforcementType, AggregationMethods, BillingTimingTypes, FeatureModel, OneOffType, PoolType } from './enum';
|
|
2
|
+
import { FeatureType, FeatureStatus, SubscriptionStatus, InvoiceStatusType, PriceTypes, ResetIntervals, EnforcementType, AggregationMethods, BillingTimingTypes, FeatureModel, OneOffType, PoolType, ScheduledChangeType } from './enum';
|
|
3
3
|
/**
|
|
4
4
|
* Main theme configuration
|
|
5
5
|
*/
|
|
@@ -8,134 +8,403 @@ export interface Theme {
|
|
|
8
8
|
customerPortal?: CustomerPortalTheme;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Customer Portal theme configuration
|
|
11
|
+
* Customer Portal theme configuration.
|
|
12
|
+
* Matches the React SDK's CustomerPortalTheme structure exactly.
|
|
12
13
|
*/
|
|
13
14
|
export interface CustomerPortalTheme {
|
|
15
|
+
general?: {
|
|
16
|
+
linkColor?: string;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
borderRadius?: string;
|
|
19
|
+
backgroundColor?: string;
|
|
20
|
+
containerPadding?: string;
|
|
21
|
+
};
|
|
14
22
|
tabs?: {
|
|
23
|
+
tabBackground?: string;
|
|
24
|
+
tabBorderColor?: string;
|
|
25
|
+
activeTabBackground?: string;
|
|
26
|
+
activeTabTextColor?: string;
|
|
27
|
+
inactiveTabTextColor?: string;
|
|
28
|
+
};
|
|
29
|
+
/** Themed select (e.g. country localization in plan section) */
|
|
30
|
+
select?: {
|
|
15
31
|
background?: string;
|
|
16
32
|
borderColor?: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
textColor?: string;
|
|
34
|
+
caretColor?: string;
|
|
35
|
+
dropdownBackground?: string;
|
|
36
|
+
dropdownBorderColor?: string;
|
|
37
|
+
optionTextColor?: string;
|
|
38
|
+
optionHoverBackground?: string;
|
|
20
39
|
};
|
|
21
|
-
|
|
40
|
+
sections?: {
|
|
22
41
|
background?: string;
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
padding?: string;
|
|
43
|
+
borderColor?: string;
|
|
44
|
+
borderRadius?: string;
|
|
45
|
+
content?: {
|
|
46
|
+
background?: string;
|
|
47
|
+
padding?: string;
|
|
48
|
+
borderColor?: string;
|
|
49
|
+
borderRadius?: string;
|
|
50
|
+
};
|
|
51
|
+
summaryBalance?: {
|
|
52
|
+
background?: string;
|
|
53
|
+
padding?: string;
|
|
54
|
+
borderColor?: string;
|
|
55
|
+
borderRadius?: string;
|
|
56
|
+
label?: {
|
|
57
|
+
fontSize?: string;
|
|
58
|
+
fontWeight?: string;
|
|
59
|
+
color?: string;
|
|
60
|
+
};
|
|
61
|
+
value?: {
|
|
62
|
+
fontSize?: string;
|
|
63
|
+
fontWeight?: string;
|
|
64
|
+
color?: string;
|
|
65
|
+
};
|
|
66
|
+
unit?: {
|
|
67
|
+
fontSize?: string;
|
|
68
|
+
fontWeight?: string;
|
|
69
|
+
color?: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
header?: {
|
|
73
|
+
fontSize?: string;
|
|
74
|
+
fontWeight?: string;
|
|
75
|
+
color?: string;
|
|
76
|
+
};
|
|
77
|
+
label?: {
|
|
78
|
+
fontSize?: string;
|
|
79
|
+
fontWeight?: string;
|
|
80
|
+
color?: string;
|
|
81
|
+
};
|
|
82
|
+
value?: {
|
|
83
|
+
fontSize?: string;
|
|
84
|
+
fontWeight?: string;
|
|
85
|
+
color?: string;
|
|
86
|
+
};
|
|
25
87
|
iconBackground?: string;
|
|
26
88
|
iconColor?: string;
|
|
27
89
|
emptyTextColor?: string;
|
|
90
|
+
usage?: {
|
|
91
|
+
barColor?: string;
|
|
92
|
+
trackColor?: string;
|
|
93
|
+
};
|
|
28
94
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
95
|
+
buttons?: {
|
|
96
|
+
primary?: {
|
|
97
|
+
backgroundColor?: string;
|
|
98
|
+
border?: {
|
|
99
|
+
color?: string;
|
|
100
|
+
width?: string;
|
|
101
|
+
radius?: string;
|
|
102
|
+
};
|
|
103
|
+
typography?: {
|
|
104
|
+
fontSize?: string;
|
|
105
|
+
fontWeight?: string;
|
|
106
|
+
color?: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
secondary?: {
|
|
110
|
+
backgroundColor?: string;
|
|
111
|
+
border?: {
|
|
112
|
+
color?: string;
|
|
113
|
+
width?: string;
|
|
114
|
+
radius?: string;
|
|
115
|
+
};
|
|
116
|
+
typography?: {
|
|
117
|
+
fontSize?: string;
|
|
118
|
+
fontWeight?: string;
|
|
119
|
+
color?: string;
|
|
120
|
+
};
|
|
36
121
|
};
|
|
37
122
|
};
|
|
38
|
-
|
|
39
|
-
|
|
123
|
+
lineItems?: {
|
|
124
|
+
parentRow?: {
|
|
40
125
|
background?: string;
|
|
41
126
|
borderColor?: string;
|
|
42
|
-
|
|
127
|
+
borderRadius?: string;
|
|
128
|
+
typography?: {
|
|
129
|
+
label?: {
|
|
130
|
+
fontSize?: string;
|
|
131
|
+
fontWeight?: string;
|
|
132
|
+
color?: string;
|
|
133
|
+
};
|
|
134
|
+
quantity?: {
|
|
135
|
+
fontSize?: string;
|
|
136
|
+
color?: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
spacing?: {
|
|
140
|
+
paddingTop?: string;
|
|
141
|
+
paddingRight?: string;
|
|
142
|
+
paddingBottom?: string;
|
|
143
|
+
paddingLeft?: string;
|
|
144
|
+
};
|
|
145
|
+
expandIconColor?: string;
|
|
146
|
+
expandIconSize?: string;
|
|
147
|
+
};
|
|
148
|
+
childRow?: {
|
|
149
|
+
background?: string;
|
|
150
|
+
borderColor?: string;
|
|
151
|
+
borderRadius?: string;
|
|
152
|
+
typography?: {
|
|
153
|
+
label?: {
|
|
154
|
+
fontSize?: string;
|
|
155
|
+
fontWeight?: string;
|
|
156
|
+
color?: string;
|
|
157
|
+
};
|
|
158
|
+
quantity?: {
|
|
159
|
+
fontSize?: string;
|
|
160
|
+
color?: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
spacing?: {
|
|
164
|
+
paddingTop?: string;
|
|
165
|
+
paddingRight?: string;
|
|
166
|
+
paddingBottom?: string;
|
|
167
|
+
paddingLeft?: string;
|
|
168
|
+
};
|
|
43
169
|
};
|
|
44
170
|
};
|
|
45
|
-
|
|
171
|
+
tables?: {
|
|
172
|
+
headerBackground?: string;
|
|
46
173
|
headerTextColor?: string;
|
|
47
|
-
|
|
174
|
+
rowBackgroundOdd?: string;
|
|
175
|
+
rowBackgroundEven?: string;
|
|
176
|
+
rowTextColor?: string;
|
|
177
|
+
borderColor?: string;
|
|
178
|
+
cellPadding?: string;
|
|
179
|
+
expandIconColor?: string;
|
|
180
|
+
typography?: {
|
|
181
|
+
fontSize?: string;
|
|
182
|
+
fontWeight?: string;
|
|
183
|
+
headerFontSize?: string;
|
|
184
|
+
headerFontWeight?: string;
|
|
185
|
+
};
|
|
186
|
+
pagination?: {
|
|
187
|
+
background?: string;
|
|
188
|
+
activeBackground?: string;
|
|
189
|
+
textColor?: string;
|
|
190
|
+
activeTextColor?: string;
|
|
191
|
+
borderColor?: string;
|
|
192
|
+
borderRadius?: string;
|
|
193
|
+
};
|
|
48
194
|
};
|
|
49
|
-
|
|
195
|
+
modals?: {
|
|
196
|
+
overlayColor?: string;
|
|
50
197
|
background?: string;
|
|
51
|
-
|
|
198
|
+
borderColor?: string;
|
|
199
|
+
borderRadius?: string;
|
|
200
|
+
closeButtonColor?: string;
|
|
201
|
+
header?: {
|
|
202
|
+
fontSize?: string;
|
|
203
|
+
fontWeight?: string;
|
|
204
|
+
color?: string;
|
|
205
|
+
};
|
|
206
|
+
title?: {
|
|
207
|
+
fontSize?: string;
|
|
208
|
+
fontWeight?: string;
|
|
209
|
+
color?: string;
|
|
210
|
+
};
|
|
211
|
+
description?: {
|
|
212
|
+
fontSize?: string;
|
|
213
|
+
fontWeight?: string;
|
|
214
|
+
color?: string;
|
|
215
|
+
};
|
|
216
|
+
footer?: {
|
|
217
|
+
primary?: {
|
|
218
|
+
backgroundColor?: string;
|
|
219
|
+
textColor?: string;
|
|
220
|
+
borderColor?: string;
|
|
221
|
+
borderWidth?: string;
|
|
222
|
+
borderRadius?: string;
|
|
223
|
+
};
|
|
224
|
+
secondary?: {
|
|
225
|
+
backgroundColor?: string;
|
|
226
|
+
textColor?: string;
|
|
227
|
+
borderColor?: string;
|
|
228
|
+
borderWidth?: string;
|
|
229
|
+
borderRadius?: string;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
/** Info banners (e.g. scheduled change / undo cancellation) */
|
|
234
|
+
banners?: {
|
|
235
|
+
info?: {
|
|
236
|
+
background?: string;
|
|
237
|
+
textColor?: string;
|
|
238
|
+
borderRadius?: string;
|
|
239
|
+
buttonBorderColor?: string;
|
|
240
|
+
buttonTextColor?: string;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
plans?: {
|
|
244
|
+
currentPlanCard?: {
|
|
245
|
+
header?: {
|
|
246
|
+
background?: string;
|
|
247
|
+
textColor?: string;
|
|
248
|
+
};
|
|
249
|
+
gradientColor?: string;
|
|
250
|
+
borderRadius?: string;
|
|
251
|
+
};
|
|
252
|
+
planCards?: {
|
|
253
|
+
background?: string;
|
|
254
|
+
border?: {
|
|
255
|
+
color?: string;
|
|
256
|
+
width?: string;
|
|
257
|
+
radius?: string;
|
|
258
|
+
};
|
|
259
|
+
header?: {
|
|
260
|
+
background?: string;
|
|
261
|
+
textColor?: string;
|
|
262
|
+
};
|
|
263
|
+
description?: {
|
|
264
|
+
textColor?: string;
|
|
265
|
+
textButtonColor?: string;
|
|
266
|
+
};
|
|
267
|
+
price?: {
|
|
268
|
+
amountColor?: string;
|
|
269
|
+
primaryTextColor?: string;
|
|
270
|
+
secondaryTextColor?: string;
|
|
271
|
+
background?: string;
|
|
272
|
+
borderColor?: string;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
planFeatures?: {
|
|
276
|
+
textColor?: string;
|
|
277
|
+
iconColor?: string;
|
|
278
|
+
};
|
|
279
|
+
planButton?: {
|
|
280
|
+
background?: string;
|
|
281
|
+
textColor?: string;
|
|
282
|
+
secondaryBackground?: string;
|
|
283
|
+
secondaryTextColor?: string;
|
|
284
|
+
textButtonColor?: string;
|
|
285
|
+
};
|
|
286
|
+
planToggle?: {
|
|
287
|
+
background?: string;
|
|
288
|
+
activeBackground?: string;
|
|
289
|
+
activeText?: string;
|
|
290
|
+
inactiveText?: string;
|
|
291
|
+
};
|
|
292
|
+
planTags?: {
|
|
293
|
+
freeTrialBackground?: string;
|
|
294
|
+
freeTrialText?: string;
|
|
295
|
+
};
|
|
52
296
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
297
|
+
popover?: {
|
|
298
|
+
trigger?: {
|
|
299
|
+
background?: string;
|
|
300
|
+
iconColor?: string;
|
|
301
|
+
borderColor?: string;
|
|
302
|
+
borderRadius?: string;
|
|
303
|
+
};
|
|
304
|
+
menu?: {
|
|
305
|
+
background?: string;
|
|
306
|
+
borderColor?: string;
|
|
307
|
+
borderRadius?: string;
|
|
308
|
+
/** @deprecated use itemPadding */
|
|
309
|
+
padding?: string;
|
|
310
|
+
itemPadding?: string;
|
|
311
|
+
itemHoverBackground?: string;
|
|
312
|
+
itemDividerColor?: string;
|
|
313
|
+
typography?: {
|
|
314
|
+
fontSize?: string;
|
|
315
|
+
fontWeight?: string;
|
|
316
|
+
color?: string;
|
|
317
|
+
dangerColor?: string;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
61
320
|
};
|
|
62
|
-
linkColor?: string;
|
|
63
|
-
plan?: PricingTableTheme;
|
|
64
321
|
}
|
|
65
322
|
/**
|
|
66
|
-
* Pricing Table theme configuration
|
|
323
|
+
* Pricing Table theme configuration.
|
|
324
|
+
* Matches the React SDK's PricingTableTheme structure exactly.
|
|
67
325
|
*/
|
|
68
326
|
export interface PricingTableTheme {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
327
|
+
general?: {
|
|
328
|
+
fontFamily?: string;
|
|
329
|
+
};
|
|
330
|
+
plans?: {
|
|
331
|
+
currentPlanCard?: {
|
|
332
|
+
header?: {
|
|
333
|
+
background?: string;
|
|
334
|
+
textColor?: string;
|
|
335
|
+
};
|
|
336
|
+
gradientColor?: string;
|
|
337
|
+
borderRadius?: string;
|
|
338
|
+
};
|
|
339
|
+
planCards?: {
|
|
340
|
+
background?: string;
|
|
341
|
+
border?: {
|
|
342
|
+
color?: string;
|
|
343
|
+
width?: string;
|
|
344
|
+
radius?: string;
|
|
345
|
+
};
|
|
346
|
+
header?: {
|
|
347
|
+
background?: string;
|
|
348
|
+
textColor?: string;
|
|
349
|
+
};
|
|
350
|
+
description?: {
|
|
351
|
+
textColor?: string;
|
|
352
|
+
textButtonColor?: string;
|
|
353
|
+
};
|
|
354
|
+
price?: {
|
|
355
|
+
amountColor?: string;
|
|
356
|
+
primaryTextColor?: string;
|
|
357
|
+
secondaryTextColor?: string;
|
|
358
|
+
background?: string;
|
|
359
|
+
borderColor?: string;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
planFeatures?: {
|
|
363
|
+
textColor?: string;
|
|
364
|
+
iconColor?: string;
|
|
365
|
+
};
|
|
366
|
+
planButton?: {
|
|
367
|
+
background?: string;
|
|
368
|
+
textColor?: string;
|
|
369
|
+
secondaryBackground?: string;
|
|
370
|
+
secondaryTextColor?: string;
|
|
371
|
+
textButtonColor?: string;
|
|
372
|
+
};
|
|
373
|
+
planToggle?: {
|
|
374
|
+
background?: string;
|
|
375
|
+
activeBackground?: string;
|
|
376
|
+
activeText?: string;
|
|
377
|
+
inactiveText?: string;
|
|
378
|
+
};
|
|
379
|
+
planTags?: {
|
|
380
|
+
freeTrialBackground?: string;
|
|
381
|
+
freeTrialText?: string;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
tabs?: {
|
|
385
|
+
inactiveText?: string;
|
|
386
|
+
activeText?: string;
|
|
387
|
+
indicator?: string;
|
|
388
|
+
borderColor?: string;
|
|
389
|
+
};
|
|
390
|
+
select?: {
|
|
391
|
+
background?: string;
|
|
392
|
+
borderColor?: string;
|
|
393
|
+
textColor?: string;
|
|
394
|
+
placeholderColor?: string;
|
|
395
|
+
caretColor?: string;
|
|
396
|
+
dropdownBackground?: string;
|
|
397
|
+
dropdownBorderColor?: string;
|
|
398
|
+
optionTextColor?: string;
|
|
399
|
+
optionHoverBackground?: string;
|
|
400
|
+
};
|
|
401
|
+
checkoutBar?: {
|
|
402
|
+
background?: string;
|
|
403
|
+
borderColor?: string;
|
|
404
|
+
textColor?: string;
|
|
405
|
+
buttonBackground?: string;
|
|
406
|
+
buttonTextColor?: string;
|
|
407
|
+
};
|
|
139
408
|
}
|
|
140
409
|
/**
|
|
141
410
|
* Metrifox SDK initialization configuration
|
|
@@ -231,8 +500,19 @@ export interface SubscriptionDetails {
|
|
|
231
500
|
subscription_items: SubscriptionItem[];
|
|
232
501
|
upcoming_invoice: UpcomingInvoice | null;
|
|
233
502
|
can_update_quantities: boolean;
|
|
503
|
+
scheduled_change?: ScheduledChangeType | string | null;
|
|
504
|
+
}
|
|
505
|
+
/** Tenant subscription settings from `/sdk/subscription-settings` */
|
|
506
|
+
export interface SubscriptionSettings {
|
|
507
|
+
id: string;
|
|
508
|
+
upgrade_strategy: string;
|
|
509
|
+
downgrade_strategy: string;
|
|
510
|
+
apply_qty_downgrade_credit: boolean;
|
|
511
|
+
collection_mode: string;
|
|
512
|
+
customer_can_cancel: boolean;
|
|
234
513
|
}
|
|
235
514
|
export interface SubscriptionItem {
|
|
515
|
+
id?: string;
|
|
236
516
|
price_option_id: string;
|
|
237
517
|
name: string;
|
|
238
518
|
currency_code: string;
|
|
@@ -242,7 +522,9 @@ export interface SubscriptionItem {
|
|
|
242
522
|
billing_period_start: string | null;
|
|
243
523
|
billing_period_end: string | null;
|
|
244
524
|
line_source_type: string;
|
|
525
|
+
source_type?: string;
|
|
245
526
|
is_addon?: boolean;
|
|
527
|
+
offering_key?: string;
|
|
246
528
|
}
|
|
247
529
|
export interface UpcomingInvoice {
|
|
248
530
|
invoice_id: string;
|
|
@@ -412,6 +694,8 @@ export interface CreditTransaction {
|
|
|
412
694
|
type: string;
|
|
413
695
|
created_at: string;
|
|
414
696
|
description?: string;
|
|
697
|
+
event_name?: string;
|
|
698
|
+
quantity?: number;
|
|
415
699
|
}
|
|
416
700
|
export interface WalletSetting {
|
|
417
701
|
id: string;
|
|
@@ -480,6 +764,8 @@ export interface Offering {
|
|
|
480
764
|
base_entitlements_plan_name: string;
|
|
481
765
|
version_id: string;
|
|
482
766
|
is_invoiceable: boolean;
|
|
767
|
+
product_key?: string;
|
|
768
|
+
product_currency_code?: string;
|
|
483
769
|
}
|
|
484
770
|
export interface ParentOffering {
|
|
485
771
|
archived_versions: Offering[];
|
|
@@ -584,6 +870,7 @@ export interface CreditSystem {
|
|
|
584
870
|
topup_enabled: boolean;
|
|
585
871
|
reset_interval: string;
|
|
586
872
|
included_usage: number;
|
|
873
|
+
included_allowance: number;
|
|
587
874
|
carryover_enabled: boolean;
|
|
588
875
|
carryover_action: string;
|
|
589
876
|
expiry_value: number | null;
|