@cakemail-org/ui-components-v2 2.2.68 → 2.2.70
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/dist/cjs/index.js +25 -1
- package/dist/cjs/models/account/index.d.ts +4 -0
- package/dist/cjs/models/customer/index.d.ts +3 -2
- package/dist/cjs/models/customer/types.d.ts +17 -0
- package/dist/cjs/services/accounts/index.d.ts +4 -0
- package/dist/esm/index.js +25 -2
- package/dist/esm/models/account/index.d.ts +4 -0
- package/dist/esm/models/customer/index.d.ts +3 -2
- package/dist/esm/models/customer/types.d.ts +17 -0
- package/dist/esm/services/accounts/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9607,11 +9607,12 @@ var emptyAccountAddress = {
|
|
|
9607
9607
|
|
|
9608
9608
|
var CustomerModel = /** @class */ (function () {
|
|
9609
9609
|
function CustomerModel(_a) {
|
|
9610
|
-
var id = _a.id, language = _a.language, profile = _a.profile, subscriptions = _a.subscriptions;
|
|
9610
|
+
var id = _a.id, language = _a.language, profile = _a.profile, subscriptions = _a.subscriptions, contract = _a.contract;
|
|
9611
9611
|
this.id = id;
|
|
9612
9612
|
this.language = language;
|
|
9613
9613
|
this.profile = profile;
|
|
9614
9614
|
this.subscriptions = subscriptions;
|
|
9615
|
+
this.contract = contract;
|
|
9615
9616
|
}
|
|
9616
9617
|
CustomerModel.prototype.toJson = function () {
|
|
9617
9618
|
return modelToJson(this);
|
|
@@ -9784,6 +9785,15 @@ function unSuspendAccount(_a) {
|
|
|
9784
9785
|
}
|
|
9785
9786
|
});
|
|
9786
9787
|
}
|
|
9788
|
+
function getAccountMetadata(_a) {
|
|
9789
|
+
var id = _a.id, name = _a.name;
|
|
9790
|
+
return callApi({
|
|
9791
|
+
url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id + "/metadata/" + name,
|
|
9792
|
+
fetchOptions: {
|
|
9793
|
+
method: exports.EMethods.get
|
|
9794
|
+
}
|
|
9795
|
+
});
|
|
9796
|
+
}
|
|
9787
9797
|
|
|
9788
9798
|
function getDomainsService(_a) {
|
|
9789
9799
|
var id = _a.id;
|
|
@@ -9967,6 +9977,19 @@ var AccountModel = /** @class */ (function () {
|
|
|
9967
9977
|
});
|
|
9968
9978
|
});
|
|
9969
9979
|
};
|
|
9980
|
+
AccountModel.prototype.getMetadata = function (_a) {
|
|
9981
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
9982
|
+
var name = _b.name;
|
|
9983
|
+
return __generator(this, function (_c) {
|
|
9984
|
+
if (!this.id) {
|
|
9985
|
+
throw new Error("Account was not initialized");
|
|
9986
|
+
}
|
|
9987
|
+
return [2 /*return*/, getAccountMetadata({ id: this.id, name: name }).then(function (data) {
|
|
9988
|
+
return data.data;
|
|
9989
|
+
})];
|
|
9990
|
+
});
|
|
9991
|
+
});
|
|
9992
|
+
};
|
|
9970
9993
|
AccountModel.prototype.isPartnerOrOrganization = function () {
|
|
9971
9994
|
return this.partner || this.organization;
|
|
9972
9995
|
};
|
|
@@ -19948,6 +19971,7 @@ exports.fetchRoute = fetchRoute;
|
|
|
19948
19971
|
exports.findNestedProperty = findNestedProperty;
|
|
19949
19972
|
exports.formatNumber = formatNumber;
|
|
19950
19973
|
exports.getAccount = getAccount;
|
|
19974
|
+
exports.getAccountMetadata = getAccountMetadata;
|
|
19951
19975
|
exports.getAccountReport = getAccountReport;
|
|
19952
19976
|
exports.getAdjustedBillingCycle = getAdjustedBillingCycle;
|
|
19953
19977
|
exports.getAllAutomationStats = getAllAutomationStats;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TBrand } from "../../factories";
|
|
2
|
+
import { TGenericReturn } from "../../types";
|
|
2
3
|
import { CustomerModel } from "../customer";
|
|
3
4
|
import { TAccountAddress, TAccountDomains, TAccountLimits, TAccountModel, TAccountOwner, TAccountReport, TDeleteAccountResponse, TGetAccountReport } from "./types";
|
|
4
5
|
export declare class AccountModel {
|
|
@@ -40,6 +41,9 @@ export declare class AccountModel {
|
|
|
40
41
|
delete(): Promise<TDeleteAccountResponse>;
|
|
41
42
|
suspend(): Promise<AccountModel>;
|
|
42
43
|
unsuspend(): Promise<AccountModel>;
|
|
44
|
+
getMetadata({ name }: {
|
|
45
|
+
name: string;
|
|
46
|
+
}): Promise<TGenericReturn<any>>;
|
|
43
47
|
isPartnerOrOrganization(): boolean;
|
|
44
48
|
hasAccessTo({ feature, partnerBrand, userCount }: {
|
|
45
49
|
feature: keyof TAccountLimits;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { TStripeSubscription } from "./types";
|
|
1
|
+
import { TContract, TStripeSubscription } from "./types";
|
|
2
2
|
export declare class CustomerModel {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly language: string;
|
|
5
5
|
readonly profile: any;
|
|
6
6
|
readonly subscriptions: TStripeSubscription[];
|
|
7
|
-
|
|
7
|
+
readonly contract: TContract;
|
|
8
|
+
constructor({ id, language, profile, subscriptions, contract }: CustomerModel);
|
|
8
9
|
toJson(): any;
|
|
9
10
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
10
11
|
}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { TAccountLimits } from "../account/types";
|
|
2
|
+
export type TContract = {
|
|
3
|
+
active: boolean;
|
|
4
|
+
currency: string;
|
|
5
|
+
metadata: {
|
|
6
|
+
active: boolean;
|
|
7
|
+
added: string;
|
|
8
|
+
category: "growth" | "free" | "premium";
|
|
9
|
+
id: string;
|
|
10
|
+
type: string;
|
|
11
|
+
updated: string;
|
|
12
|
+
usage_limits: TAccountLimits;
|
|
13
|
+
uuid: string;
|
|
14
|
+
};
|
|
15
|
+
name: string;
|
|
16
|
+
product: string;
|
|
17
|
+
unit_amount: number;
|
|
18
|
+
};
|
|
2
19
|
export type TStripeSubscription = {
|
|
3
20
|
currentPeriodEnd: number;
|
|
4
21
|
id: string;
|
|
@@ -28,4 +28,8 @@ export declare function suspendAccount({ id }: {
|
|
|
28
28
|
export declare function unSuspendAccount({ id }: {
|
|
29
29
|
id: TNumStr;
|
|
30
30
|
}): Promise<any>;
|
|
31
|
+
export declare function getAccountMetadata({ id, name }: {
|
|
32
|
+
id: TNumStr;
|
|
33
|
+
name: string;
|
|
34
|
+
}): Promise<any>;
|
|
31
35
|
export * from "./types";
|
package/dist/esm/index.js
CHANGED
|
@@ -9587,11 +9587,12 @@ var emptyAccountAddress = {
|
|
|
9587
9587
|
|
|
9588
9588
|
var CustomerModel = /** @class */ (function () {
|
|
9589
9589
|
function CustomerModel(_a) {
|
|
9590
|
-
var id = _a.id, language = _a.language, profile = _a.profile, subscriptions = _a.subscriptions;
|
|
9590
|
+
var id = _a.id, language = _a.language, profile = _a.profile, subscriptions = _a.subscriptions, contract = _a.contract;
|
|
9591
9591
|
this.id = id;
|
|
9592
9592
|
this.language = language;
|
|
9593
9593
|
this.profile = profile;
|
|
9594
9594
|
this.subscriptions = subscriptions;
|
|
9595
|
+
this.contract = contract;
|
|
9595
9596
|
}
|
|
9596
9597
|
CustomerModel.prototype.toJson = function () {
|
|
9597
9598
|
return modelToJson(this);
|
|
@@ -9764,6 +9765,15 @@ function unSuspendAccount(_a) {
|
|
|
9764
9765
|
}
|
|
9765
9766
|
});
|
|
9766
9767
|
}
|
|
9768
|
+
function getAccountMetadata(_a) {
|
|
9769
|
+
var id = _a.id, name = _a.name;
|
|
9770
|
+
return callApi({
|
|
9771
|
+
url: uiKitConfig.GATEWAY_PROXY + "/accounts/" + id + "/metadata/" + name,
|
|
9772
|
+
fetchOptions: {
|
|
9773
|
+
method: EMethods.get
|
|
9774
|
+
}
|
|
9775
|
+
});
|
|
9776
|
+
}
|
|
9767
9777
|
|
|
9768
9778
|
function getDomainsService(_a) {
|
|
9769
9779
|
var id = _a.id;
|
|
@@ -9947,6 +9957,19 @@ var AccountModel = /** @class */ (function () {
|
|
|
9947
9957
|
});
|
|
9948
9958
|
});
|
|
9949
9959
|
};
|
|
9960
|
+
AccountModel.prototype.getMetadata = function (_a) {
|
|
9961
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
9962
|
+
var name = _b.name;
|
|
9963
|
+
return __generator(this, function (_c) {
|
|
9964
|
+
if (!this.id) {
|
|
9965
|
+
throw new Error("Account was not initialized");
|
|
9966
|
+
}
|
|
9967
|
+
return [2 /*return*/, getAccountMetadata({ id: this.id, name: name }).then(function (data) {
|
|
9968
|
+
return data.data;
|
|
9969
|
+
})];
|
|
9970
|
+
});
|
|
9971
|
+
});
|
|
9972
|
+
};
|
|
9950
9973
|
AccountModel.prototype.isPartnerOrOrganization = function () {
|
|
9951
9974
|
return this.partner || this.organization;
|
|
9952
9975
|
};
|
|
@@ -19744,4 +19767,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
19744
19767
|
return UsersFactory;
|
|
19745
19768
|
}());
|
|
19746
19769
|
|
|
19747
|
-
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addInterestsToContactsOfList, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createContactsExport, createForm, createPage, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteContact, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteSender, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getContactsExport, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPages, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeInterestsFromContactsOfList, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendEmail, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, tagContact, tagsContactsOfList, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, unsubscribeContact, untagContact, untagContactsOfList, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
|
|
19770
|
+
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addInterestsToContactsOfList, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createContactsExport, createForm, createPage, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteContact, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteSender, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountMetadata, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getContactsExport, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPages, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeInterestsFromContactsOfList, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendEmail, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, tagContact, tagsContactsOfList, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, unsubscribeContact, untagContact, untagContactsOfList, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TBrand } from "../../factories";
|
|
2
|
+
import { TGenericReturn } from "../../types";
|
|
2
3
|
import { CustomerModel } from "../customer";
|
|
3
4
|
import { TAccountAddress, TAccountDomains, TAccountLimits, TAccountModel, TAccountOwner, TAccountReport, TDeleteAccountResponse, TGetAccountReport } from "./types";
|
|
4
5
|
export declare class AccountModel {
|
|
@@ -40,6 +41,9 @@ export declare class AccountModel {
|
|
|
40
41
|
delete(): Promise<TDeleteAccountResponse>;
|
|
41
42
|
suspend(): Promise<AccountModel>;
|
|
42
43
|
unsuspend(): Promise<AccountModel>;
|
|
44
|
+
getMetadata({ name }: {
|
|
45
|
+
name: string;
|
|
46
|
+
}): Promise<TGenericReturn<any>>;
|
|
43
47
|
isPartnerOrOrganization(): boolean;
|
|
44
48
|
hasAccessTo({ feature, partnerBrand, userCount }: {
|
|
45
49
|
feature: keyof TAccountLimits;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { TStripeSubscription } from "./types";
|
|
1
|
+
import { TContract, TStripeSubscription } from "./types";
|
|
2
2
|
export declare class CustomerModel {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly language: string;
|
|
5
5
|
readonly profile: any;
|
|
6
6
|
readonly subscriptions: TStripeSubscription[];
|
|
7
|
-
|
|
7
|
+
readonly contract: TContract;
|
|
8
|
+
constructor({ id, language, profile, subscriptions, contract }: CustomerModel);
|
|
8
9
|
toJson(): any;
|
|
9
10
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
10
11
|
}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { TAccountLimits } from "../account/types";
|
|
2
|
+
export type TContract = {
|
|
3
|
+
active: boolean;
|
|
4
|
+
currency: string;
|
|
5
|
+
metadata: {
|
|
6
|
+
active: boolean;
|
|
7
|
+
added: string;
|
|
8
|
+
category: "growth" | "free" | "premium";
|
|
9
|
+
id: string;
|
|
10
|
+
type: string;
|
|
11
|
+
updated: string;
|
|
12
|
+
usage_limits: TAccountLimits;
|
|
13
|
+
uuid: string;
|
|
14
|
+
};
|
|
15
|
+
name: string;
|
|
16
|
+
product: string;
|
|
17
|
+
unit_amount: number;
|
|
18
|
+
};
|
|
2
19
|
export type TStripeSubscription = {
|
|
3
20
|
currentPeriodEnd: number;
|
|
4
21
|
id: string;
|
|
@@ -28,4 +28,8 @@ export declare function suspendAccount({ id }: {
|
|
|
28
28
|
export declare function unSuspendAccount({ id }: {
|
|
29
29
|
id: TNumStr;
|
|
30
30
|
}): Promise<any>;
|
|
31
|
+
export declare function getAccountMetadata({ id, name }: {
|
|
32
|
+
id: TNumStr;
|
|
33
|
+
name: string;
|
|
34
|
+
}): Promise<any>;
|
|
31
35
|
export * from "./types";
|