@memberstack/dom 2.0.2-beta.0 → 2.0.3
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/lib/index.d.mts +76 -61
- package/lib/index.d.ts +76 -61
- package/lib/index.js +840 -61
- package/lib/index.mjs +840 -61
- package/lib/{models-CTRKogoR.d.ts → models-CFT_ABd5.d.ts} +2 -2
- package/lib/testing/index.d.mts +25 -2
- package/lib/testing/index.d.ts +25 -2
- package/lib/testing/index.js +28 -6
- package/lib/testing/index.mjs +26 -5
- package/package.json +1 -1
- package/lib/auth/index.d.mts +0 -63
- package/lib/auth/index.d.ts +0 -63
- package/lib/auth/index.global.js +0 -244
- package/lib/auth/index.js +0 -161
- package/lib/auth/index.mjs +0 -123
- package/lib/constants/endpoints.d.mts +0 -5
- package/lib/constants/endpoints.d.ts +0 -5
- package/lib/constants/endpoints.global.js +0 -29
- package/lib/constants/endpoints.js +0 -32
- package/lib/constants/endpoints.mjs +0 -7
- package/lib/methods/dom/index.d.mts +0 -2
- package/lib/methods/dom/index.d.ts +0 -2
- package/lib/methods/dom/index.global.js +0 -2
- package/lib/methods/dom/index.js +0 -1
- package/lib/methods/dom/index.mjs +0 -0
- package/lib/methods/dom/main-dom.d.mts +0 -2
- package/lib/methods/dom/main-dom.d.ts +0 -2
- package/lib/methods/dom/main-dom.global.js +0 -30620
- package/lib/methods/dom/main-dom.js +0 -15611
- package/lib/methods/dom/main-dom.mjs +0 -15593
- package/lib/methods/dom/methods.d.mts +0 -100
- package/lib/methods/dom/methods.d.ts +0 -100
- package/lib/methods/dom/methods.global.js +0 -30827
- package/lib/methods/dom/methods.js +0 -335
- package/lib/methods/dom/methods.mjs +0 -302
- package/lib/methods/index.d.mts +0 -185
- package/lib/methods/index.d.ts +0 -185
- package/lib/methods/index.global.js +0 -46361
- package/lib/methods/index.js +0 -2530
- package/lib/methods/index.mjs +0 -2500
- package/lib/methods/requests/index.d.mts +0 -912
- package/lib/methods/requests/index.d.ts +0 -912
- package/lib/methods/requests/index.global.js +0 -15553
- package/lib/methods/requests/index.js +0 -2145
- package/lib/methods/requests/index.mjs +0 -2110
- package/lib/methods/requests/requests.d.mts +0 -43
- package/lib/methods/requests/requests.d.ts +0 -43
- package/lib/methods/requests/requests.global.js +0 -14528
- package/lib/methods/requests/requests.js +0 -244
- package/lib/methods/requests/requests.mjs +0 -210
- package/lib/models-BmZS-mc4.d.ts +0 -193
- package/lib/models-le7xaT4H.d.ts +0 -193
- package/lib/types/index.d.mts +0 -5
- package/lib/types/index.d.ts +0 -5
- package/lib/types/index.global.js +0 -19
- package/lib/types/index.js +0 -18
- package/lib/types/index.mjs +0 -0
- package/lib/types/params.d.mts +0 -946
- package/lib/types/params.d.ts +0 -946
- package/lib/types/params.global.js +0 -19
- package/lib/types/params.js +0 -18
- package/lib/types/params.mjs +0 -0
- package/lib/types/payloads.d.mts +0 -342
- package/lib/types/payloads.d.ts +0 -342
- package/lib/types/payloads.global.js +0 -19
- package/lib/types/payloads.js +0 -18
- package/lib/types/payloads.mjs +0 -0
- package/lib/types/translations.d.mts +0 -101
- package/lib/types/translations.d.ts +0 -101
- package/lib/types/translations.global.js +0 -19
- package/lib/types/translations.js +0 -18
- package/lib/types/translations.mjs +0 -0
- package/lib/types/utils/payloads.d.mts +0 -297
- package/lib/types/utils/payloads.d.ts +0 -297
- package/lib/types/utils/payloads.global.js +0 -19
- package/lib/types/utils/payloads.js +0 -18
- package/lib/types/utils/payloads.mjs +0 -0
- package/lib/utils/cookies.d.mts +0 -13
- package/lib/utils/cookies.d.ts +0 -13
- package/lib/utils/cookies.global.js +0 -261
- package/lib/utils/cookies.js +0 -190
- package/lib/utils/cookies.mjs +0 -148
- package/lib/utils/defaultMessageBox.d.mts +0 -5
- package/lib/utils/defaultMessageBox.d.ts +0 -5
- package/lib/utils/defaultMessageBox.global.js +0 -125
- package/lib/utils/defaultMessageBox.js +0 -130
- package/lib/utils/defaultMessageBox.mjs +0 -103
package/lib/index.d.mts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { P as Payload } from './models-
|
|
2
|
-
export { A as App, d as AuthProvider, f as AuthTokens, B as Branding, j as CheckoutTotal, C as ContentGroup, k as CustomField, E as ExtractData,
|
|
1
|
+
import { P as Payload, M as Member } from './models-CFT_ABd5.js';
|
|
2
|
+
export { A as App, d as AuthProvider, f as AuthTokens, B as Branding, j as CheckoutTotal, C as ContentGroup, k as CustomField, E as ExtractData, e as MemberAuth, g as MemberCard, n as MemberDisplayInfo, h as MemberInvoice, i as MemberReceipt, m as PaginatedData, a as Plan, c as PlanConnection, l as Post, b as Price, S as SecureContent, T as Thread } from './models-CFT_ABd5.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Supported OAuth providers for social login.
|
|
6
|
+
* Use lowercase when calling loginWithProvider(), signupWithProvider(),
|
|
7
|
+
* connectProvider(), and disconnectProvider().
|
|
8
|
+
*
|
|
9
|
+
* These providers have pre-configured settings and work with just a client ID/secret.
|
|
10
|
+
* Custom OIDC providers configured in the dashboard are also accepted via the `string` fallback.
|
|
11
|
+
*/
|
|
12
|
+
type OAuthProvider = 'google' | 'facebook' | 'microsoft' | 'github' | 'linkedin' | 'spotify' | 'dribbble' | (string & {});
|
|
4
13
|
/**
|
|
5
14
|
* Parameters for signing up a new member with email and password.
|
|
6
15
|
*
|
|
@@ -159,17 +168,24 @@ type DeleteThreadParams = {
|
|
|
159
168
|
/**
|
|
160
169
|
* Parameters for updating a member's profile image.
|
|
161
170
|
*
|
|
162
|
-
* @example
|
|
171
|
+
* @example Upload a new image
|
|
163
172
|
* ```typescript
|
|
164
173
|
* const fileInput = document.querySelector('input[type="file"]');
|
|
165
174
|
* await memberstack.updateMemberProfileImage({
|
|
166
175
|
* profileImage: fileInput.files[0]
|
|
167
176
|
* });
|
|
168
177
|
* ```
|
|
178
|
+
*
|
|
179
|
+
* @example Remove the profile image
|
|
180
|
+
* ```typescript
|
|
181
|
+
* await memberstack.updateMemberProfileImage({
|
|
182
|
+
* profileImage: null
|
|
183
|
+
* });
|
|
184
|
+
* ```
|
|
169
185
|
*/
|
|
170
186
|
type UpdateMemberProfileImageParams = {
|
|
171
|
-
/** The image file to upload
|
|
172
|
-
profileImage: File;
|
|
187
|
+
/** The image file to upload, or null to remove the current profile image */
|
|
188
|
+
profileImage: File | null;
|
|
173
189
|
};
|
|
174
190
|
/**
|
|
175
191
|
* Parameters for retrieving secure/gated content.
|
|
@@ -213,8 +229,8 @@ type SetPasswordParams = {
|
|
|
213
229
|
* ```
|
|
214
230
|
*/
|
|
215
231
|
type SignupWithProviderParams = {
|
|
216
|
-
/** OAuth provider
|
|
217
|
-
provider:
|
|
232
|
+
/** OAuth provider to sign up with */
|
|
233
|
+
provider: OAuthProvider;
|
|
218
234
|
/** Custom field values to set during signup */
|
|
219
235
|
customFields?: Record<string, any>;
|
|
220
236
|
/** Array of plans to assign on signup */
|
|
@@ -238,8 +254,8 @@ type SignupWithProviderParams = {
|
|
|
238
254
|
* ```
|
|
239
255
|
*/
|
|
240
256
|
type LoginWithProviderParams = {
|
|
241
|
-
/** OAuth provider
|
|
242
|
-
provider:
|
|
257
|
+
/** OAuth provider to log in with */
|
|
258
|
+
provider: OAuthProvider;
|
|
243
259
|
/** If true, creates new account if one doesn't exist (default: false) */
|
|
244
260
|
allowSignup?: boolean;
|
|
245
261
|
};
|
|
@@ -274,8 +290,8 @@ type SendMemberLoginPasswordlessEmailParams = {
|
|
|
274
290
|
type SignupMemberAuthProviderParams = {
|
|
275
291
|
/** The authorization code from OAuth flow */
|
|
276
292
|
code: string;
|
|
277
|
-
/** The OAuth provider */
|
|
278
|
-
provider:
|
|
293
|
+
/** The OAuth provider (uppercase, e.g. 'GOOGLE') */
|
|
294
|
+
provider: string;
|
|
279
295
|
/** Plan ID to assign (deprecated, use plans array) */
|
|
280
296
|
planId?: string;
|
|
281
297
|
/** Custom field values to set during signup */
|
|
@@ -411,8 +427,8 @@ type PurchasePlansWithCheckoutParams = {
|
|
|
411
427
|
successUrl?: string;
|
|
412
428
|
/** Auto-redirect to Stripe Checkout (default: true) */
|
|
413
429
|
autoRedirect?: boolean;
|
|
414
|
-
/** Custom metadata to attach to the Stripe checkout session */
|
|
415
|
-
metadataForCheckout?:
|
|
430
|
+
/** Custom metadata to attach to the Stripe checkout session (Stripe accepts string key-value pairs) */
|
|
431
|
+
metadataForCheckout?: Record<string, string>;
|
|
416
432
|
};
|
|
417
433
|
/**
|
|
418
434
|
* Parameters for launching Stripe Customer Portal.
|
|
@@ -428,7 +444,7 @@ type LaunchStripeCustomerPortalParams = {
|
|
|
428
444
|
/** Price IDs to show update options for */
|
|
429
445
|
priceIds?: string[];
|
|
430
446
|
/** Stripe portal configuration object */
|
|
431
|
-
configuration?:
|
|
447
|
+
configuration?: Record<string, unknown>;
|
|
432
448
|
/** URL to return to after leaving the portal */
|
|
433
449
|
returnUrl?: string;
|
|
434
450
|
/** Auto-redirect to Stripe portal (default: true) */
|
|
@@ -439,7 +455,7 @@ type LaunchStripeCustomerPortalParams = {
|
|
|
439
455
|
*/
|
|
440
456
|
type OpenStripeCustomerPortalParams = {
|
|
441
457
|
/** Stripe portal configuration object */
|
|
442
|
-
configuration?:
|
|
458
|
+
configuration?: Record<string, unknown>;
|
|
443
459
|
/** URL to return to after leaving the portal */
|
|
444
460
|
returnUrl?: string;
|
|
445
461
|
/** Auto-redirect to Stripe portal (default: true) */
|
|
@@ -525,7 +541,7 @@ type GetMemberInvoicesParams = {
|
|
|
525
541
|
*/
|
|
526
542
|
type UpdateMemberJSONParams = {
|
|
527
543
|
/** JSON object to store (completely replaces existing JSON) */
|
|
528
|
-
json:
|
|
544
|
+
json: Record<string, unknown>;
|
|
529
545
|
};
|
|
530
546
|
/**
|
|
531
547
|
* Parameters for retrieving member purchases with optional expansions.
|
|
@@ -634,14 +650,16 @@ type GetTotalCheckoutAmountParams = {
|
|
|
634
650
|
type GetDataRecordsParams = {
|
|
635
651
|
/** The table key/identifier */
|
|
636
652
|
table: string;
|
|
653
|
+
/** @deprecated Use `table` instead */
|
|
654
|
+
tableKey?: string;
|
|
637
655
|
/** ISO date string - only return records created after this date */
|
|
638
656
|
createdAfter?: string;
|
|
639
657
|
/** ISO date string - only return records created before this date */
|
|
640
658
|
createdBefore?: string;
|
|
641
659
|
/** Field name to sort by */
|
|
642
660
|
sortBy?: string;
|
|
643
|
-
/** Sort direction */
|
|
644
|
-
sortDirection?: 'ASC' | 'DESC';
|
|
661
|
+
/** Sort direction (case-insensitive) */
|
|
662
|
+
sortDirection?: 'asc' | 'desc' | 'ASC' | 'DESC';
|
|
645
663
|
/** Maximum number of records to return (1-100) */
|
|
646
664
|
limit?: number;
|
|
647
665
|
/** Cursor for pagination (internalOrder value from previous response) */
|
|
@@ -754,6 +772,8 @@ type DeleteDataRecordParams = {
|
|
|
754
772
|
type GetDataTableParams = {
|
|
755
773
|
/** The table key/identifier */
|
|
756
774
|
table: string;
|
|
775
|
+
/** @deprecated Use `table` instead */
|
|
776
|
+
tableKey?: string;
|
|
757
777
|
};
|
|
758
778
|
/**
|
|
759
779
|
* Filter operators for query where clauses.
|
|
@@ -942,6 +962,8 @@ type DataRecordsQuery = {
|
|
|
942
962
|
type QueryDataRecordsParams = {
|
|
943
963
|
/** The table key/identifier */
|
|
944
964
|
table: string;
|
|
965
|
+
/** @deprecated Use `table` instead */
|
|
966
|
+
tableKey?: string;
|
|
945
967
|
/** Query configuration */
|
|
946
968
|
query: DataRecordsQuery;
|
|
947
969
|
};
|
|
@@ -989,6 +1011,10 @@ type GetMemberReceiptsPayload = PaginatedResponse<Payload.Transforms["MemberRece
|
|
|
989
1011
|
type UpdateMemberProfileImagePayload = Response<{
|
|
990
1012
|
profileImage: string;
|
|
991
1013
|
}>;
|
|
1014
|
+
/** Response from deleteMemberProfileImage() - confirms profile image was removed */
|
|
1015
|
+
type DeleteMemberProfileImagePayload = Response<{
|
|
1016
|
+
profileImage: null;
|
|
1017
|
+
}>;
|
|
992
1018
|
/** Response from getSecureContent() - contains the gated content HTML */
|
|
993
1019
|
type GetSecureContentPayload = Response<Payload.Transforms["SecureContent"]>;
|
|
994
1020
|
/** Response from setPassword() - contains updated member data */
|
|
@@ -1068,7 +1094,9 @@ type GetAuthenticationClientSecretPayload = Response<Payload.Transforms["Authent
|
|
|
1068
1094
|
/** Response from sendMemberVerificationEmail() - success indicator */
|
|
1069
1095
|
type SendMemberVerificationEmailPayload = Response<Payload.Transforms["SendMemberVerificationEmail"]>;
|
|
1070
1096
|
/** Response from resetMemberPassword() - success indicator */
|
|
1071
|
-
type
|
|
1097
|
+
type ResetMemberPasswordPayload = Response<Payload.Transforms["ResetMemberPassword"]>;
|
|
1098
|
+
/** @deprecated Use `ResetMemberPasswordPayload` instead (typo fix) */
|
|
1099
|
+
type ResetMemberPassworPayload = ResetMemberPasswordPayload;
|
|
1072
1100
|
/** Response from getPosts() - contains posts array */
|
|
1073
1101
|
type GetPostsPayload = Response<Payload.Transforms["Posts"]>;
|
|
1074
1102
|
/** Response from getThreads() - contains threads array */
|
|
@@ -1293,10 +1321,13 @@ interface MemberstackOptions {
|
|
|
1293
1321
|
isWebflow?: boolean;
|
|
1294
1322
|
}
|
|
1295
1323
|
interface GetCurrentMemberParams {
|
|
1296
|
-
useCache?:
|
|
1324
|
+
useCache?: boolean;
|
|
1297
1325
|
}
|
|
1298
1326
|
type BearerToken = string;
|
|
1299
1327
|
|
|
1328
|
+
/** Callback type for auth state changes */
|
|
1329
|
+
type AuthCallback = (member: Member | null) => void;
|
|
1330
|
+
|
|
1300
1331
|
/**
|
|
1301
1332
|
* Memberstack UI Translation Keys
|
|
1302
1333
|
*
|
|
@@ -1397,6 +1428,16 @@ declare global {
|
|
|
1397
1428
|
}
|
|
1398
1429
|
}
|
|
1399
1430
|
|
|
1431
|
+
/** Result returned when a pre-built modal closes */
|
|
1432
|
+
type OpenModalResult = {
|
|
1433
|
+
type?: string;
|
|
1434
|
+
data?: {
|
|
1435
|
+
member?: Record<string, unknown>;
|
|
1436
|
+
[key: string]: unknown;
|
|
1437
|
+
};
|
|
1438
|
+
[key: string]: unknown;
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1400
1441
|
/**
|
|
1401
1442
|
* Configuration options for initializing the Memberstack SDK.
|
|
1402
1443
|
*/
|
|
@@ -1789,47 +1830,14 @@ declare const _default: {
|
|
|
1789
1830
|
openModal: (type: "LOGIN" | "SIGNUP" | "FORGOT_PASSWORD" | "RESET_PASSWORD" | "PROFILE", params?: {
|
|
1790
1831
|
[key: string]: unknown;
|
|
1791
1832
|
translations?: MemberstackTranslations | undefined;
|
|
1792
|
-
}) => Promise<
|
|
1833
|
+
}) => Promise<OpenModalResult>;
|
|
1793
1834
|
hideModal: () => void;
|
|
1794
1835
|
preloadModals: () => Promise<void>;
|
|
1795
1836
|
_hideLoader: (element?: HTMLElement | undefined) => void;
|
|
1796
1837
|
_showLoader: (element?: HTMLElement | undefined) => void;
|
|
1797
1838
|
_showMessage: (msg: string, isError?: boolean | undefined) => Promise<void>;
|
|
1798
1839
|
getMemberCookie: () => any;
|
|
1799
|
-
onAuthChange: (cb:
|
|
1800
|
-
id: string;
|
|
1801
|
-
verified: boolean;
|
|
1802
|
-
profileImage: string;
|
|
1803
|
-
auth: {
|
|
1804
|
-
email: string;
|
|
1805
|
-
hasPassword: boolean;
|
|
1806
|
-
providers: {
|
|
1807
|
-
provider: string;
|
|
1808
|
-
}[];
|
|
1809
|
-
};
|
|
1810
|
-
loginRedirect: string;
|
|
1811
|
-
stripeCustomerId: string;
|
|
1812
|
-
createdAt: string;
|
|
1813
|
-
metaData: object;
|
|
1814
|
-
customFields: object;
|
|
1815
|
-
permissions: [] | string[];
|
|
1816
|
-
planConnections: {
|
|
1817
|
-
id: string;
|
|
1818
|
-
active: boolean;
|
|
1819
|
-
status: string;
|
|
1820
|
-
planId: string;
|
|
1821
|
-
type: string;
|
|
1822
|
-
payment: {
|
|
1823
|
-
amount: number;
|
|
1824
|
-
currency: string;
|
|
1825
|
-
status: string;
|
|
1826
|
-
lastBillingDate: number | null;
|
|
1827
|
-
nextBillingDate: number | null;
|
|
1828
|
-
cancelAtDate: number | null;
|
|
1829
|
-
priceId: string;
|
|
1830
|
-
} | null;
|
|
1831
|
-
}[];
|
|
1832
|
-
} | null) => void) => {
|
|
1840
|
+
onAuthChange: (cb: AuthCallback) => {
|
|
1833
1841
|
unsubscribe: () => boolean;
|
|
1834
1842
|
};
|
|
1835
1843
|
_captchaReady: Promise<unknown>;
|
|
@@ -1843,7 +1851,9 @@ declare const _default: {
|
|
|
1843
1851
|
}): Promise<void>;
|
|
1844
1852
|
getChannelInfo(params: {
|
|
1845
1853
|
channelKey: string;
|
|
1846
|
-
}): Promise<
|
|
1854
|
+
}): Promise<{
|
|
1855
|
+
data: Record<string, unknown>;
|
|
1856
|
+
}>;
|
|
1847
1857
|
subscribeToChannel(params: {
|
|
1848
1858
|
channelKey: string;
|
|
1849
1859
|
action: "NONE" | "THREADS_ONLY";
|
|
@@ -1859,8 +1869,8 @@ declare const _default: {
|
|
|
1859
1869
|
threadVote(params: ThreadVoteParams): Promise<void>;
|
|
1860
1870
|
deleteThread(params: DeleteThreadParams): Promise<void>;
|
|
1861
1871
|
getSecureContent(params: GetSecureContentParams): Promise<GetSecureContentPayload>;
|
|
1862
|
-
signupWithProvider(params: SignupWithProviderParams): Promise<
|
|
1863
|
-
loginWithProvider(params: LoginWithProviderParams): Promise<
|
|
1872
|
+
signupWithProvider(params: SignupWithProviderParams): Promise<SignupMemberAuthProviderPayload>;
|
|
1873
|
+
loginWithProvider(params: LoginWithProviderParams): Promise<LoginMemberEmailPasswordPayload>;
|
|
1864
1874
|
connectProvider(params: LoginWithProviderParams): Promise<ConnectProviderPayload>;
|
|
1865
1875
|
disconnectProvider(params: LoginWithProviderParams): Promise<ConnectProviderPayload>;
|
|
1866
1876
|
getAppAndMember(params?: {
|
|
@@ -1892,10 +1902,13 @@ declare const _default: {
|
|
|
1892
1902
|
getTeam(params: GetTeamParams, options?: MemberstackOptions | undefined): Promise<void>;
|
|
1893
1903
|
removeMemberFromTeam(params: RemoveMemberFromTeamParams, options?: MemberstackOptions | undefined): Promise<void>;
|
|
1894
1904
|
generateInviteToken(params: GenerateInviteTokenParams, options?: MemberstackOptions | undefined): Promise<void>;
|
|
1895
|
-
updateMemberProfileImage(params:
|
|
1905
|
+
updateMemberProfileImage<T extends File | null>(params: {
|
|
1906
|
+
profileImage: T;
|
|
1907
|
+
}): Promise<T extends File ? UpdateMemberProfileImagePayload : DeleteMemberProfileImagePayload>;
|
|
1908
|
+
deleteMemberProfileImage(): Promise<DeleteMemberProfileImagePayload>;
|
|
1896
1909
|
sendMemberVerificationEmail(): Promise<SendMemberVerificationEmailPayload>;
|
|
1897
1910
|
sendMemberResetPasswordEmail(params: SendMemberResetPasswordEmailParams): Promise<SendMemberResetPasswordEmailPayload>;
|
|
1898
|
-
resetMemberPassword(params: ResetMemberPasswordParams): Promise<
|
|
1911
|
+
resetMemberPassword(params: ResetMemberPasswordParams): Promise<ResetMemberPasswordPayload>;
|
|
1899
1912
|
logout(options?: MemberstackOptions | undefined): Promise<LogoutMemberPayload>;
|
|
1900
1913
|
getDataTables(options?: MemberstackOptions | undefined): Promise<GetDataTablesPayload>;
|
|
1901
1914
|
getDataTable(params: GetDataTableParams, options?: MemberstackOptions | undefined): Promise<GetDataTablePayload>;
|
|
@@ -1905,7 +1918,9 @@ declare const _default: {
|
|
|
1905
1918
|
updateDataRecord(params: UpdateDataRecordParams, options?: MemberstackOptions | undefined): Promise<UpdateDataRecordPayload>;
|
|
1906
1919
|
deleteDataRecord(params: DeleteDataRecordParams, options?: MemberstackOptions | undefined): Promise<DeleteDataRecordPayload>;
|
|
1907
1920
|
queryDataRecords(params: QueryDataRecordsParams, options?: MemberstackOptions | undefined): Promise<QueryDataRecordsPayload>;
|
|
1921
|
+
} & {
|
|
1922
|
+
destroy: () => void;
|
|
1908
1923
|
};
|
|
1909
1924
|
};
|
|
1910
1925
|
|
|
1911
|
-
export { type AddMemberCardParams, type AddMemberCardPayload, type AddPlanParams, type AddPlanPayload, type AppPayload, type CancelPlanParams, type CancelPlanPayload, type ConnectProviderPayload, type CountClause, type CreateDataRecordParams, type CreateDataRecordPayload, type CreatePostParams, type CreatePostPayload, type CreateThreadParams, type CreateThreadPayload, type DataRecordsQuery, type DeleteDataRecordParams, type DeleteDataRecordPayload, type DeleteMemberPayload, type DeletePostParams, type DeleteThreadParams, type ErrorCategory, type ErrorCode, ErrorCodes, type GenerateInviteTokenParams, type GetAppAndMemberPayload, type GetAuthProvidersPayload, type GetAuthenticationClientSecretParams, type GetAuthenticationClientSecretPayload, type GetCurrentMemberPayload, type GetDataRecordParams, type GetDataRecordPayload, type GetDataRecordsParams, type GetDataRecordsPayload, type GetDataTableParams, type GetDataTablePayload, type GetDataTablesPayload, type GetMemberCardsPayload, type GetMemberInvoicesParams, type GetMemberInvoicesPayload, type GetMemberJSONPayload, type GetMemberPurchasesParams, type GetMemberReceiptsParams, type GetMemberReceiptsPayload, type GetPlanParams, type GetPlanPayload, type GetPlansParams, type GetPlansPayload, type GetPostsParams, type GetPostsPayload, type GetRestrictedUrlGroupsPayload, type GetSecureContentParams, type GetSecureContentPayload, type GetTeamParams, type GetThreadsParams, type GetThreadsPayload, type GetTotalCheckoutAmountParams, type GetTotalCheckoutAmountPayload, type IncludeClause, type JoinTeamParams, type LaunchStripeCustomerPortalParams, type LaunchStripeCustomerPortalPayload, type LoginMemberEmailPasswordParams, type LoginMemberEmailPasswordPayload, type LoginMemberPasswordlessParams, type LoginWithProviderParams, type LogoutMemberPayload, type MemberReferenceFieldResult, type MemberReferenceOperation, type MemberReferenceSelector, type MemberstackErrorShape, type MemberstackTranslations, type OpenStripeCustomerPortalParams, type OpenStripeCustomerPortalPayload, type OrderByClause, type PostVoteParams, type PurchasePlansParams, type PurchasePlansPayload, type PurchasePlansWithCheckoutParams, type PurchasePlansWithCheckoutPayload, type QueryDataRecordsParams, type QueryDataRecordsPayload, type ReferenceFieldResult, type ReferenceOperation, type ReferenceSelector, type RefreshMemberTokensPayload, type RemoveMemberFromTeamParams, type RemovePlanParams, type RemovePlanPayload, type ReplacePlanParams, type ReplacePlanPayload, type ResetMemberPassworPayload, type ResetMemberPasswordParams, type SelectClause, type SendMemberLoginPasswordlessEmailParams, type SendMemberLoginPasswordlessEmailPayload, type SendMemberResetPasswordEmailParams, type SendMemberResetPasswordEmailPayload, type SendMemberVerificationEmailPayload, type SetPasswordParams, type SetPasswordPayload, type SignupMemberAuthProviderParams, type SignupMemberAuthProviderPayload, type SignupMemberEmailPasswordParams, type SignupMemberEmailPasswordPayload, type SignupWithProviderParams, type ThreadVoteParams, type UpdateDataRecordParams, type UpdateDataRecordPayload, type UpdateDefaultCardParams, type UpdateDefaultCardPayload, type UpdateMemberAuthParams, type UpdateMemberAuthPayload, type UpdateMemberJSONParams, type UpdateMemberParams, type UpdateMemberPayload, type UpdateMemberProfileImageParams, type UpdateMemberProfileImagePayload, type UpdatePlanPaymentParams, type UpdatePlanPaymentPayload, type UpdatePostParams, type UpdatePostPayload, type UpdateThreadParams, type UpdateThreadPayload, type WhereClause, type WhereOperators, _default as default, formatErrorForUser, getErrorCategory, getErrorCode, getErrorDocsUrl, getErrorMessage, getErrorReport, getErrorSuggestions, isErrorCode, isMemberstackError };
|
|
1926
|
+
export { type AddMemberCardParams, type AddMemberCardPayload, type AddPlanParams, type AddPlanPayload, type AppPayload, type AuthCallback, type CancelPlanParams, type CancelPlanPayload, type ConnectProviderPayload, type CountClause, type CreateDataRecordParams, type CreateDataRecordPayload, type CreatePostParams, type CreatePostPayload, type CreateThreadParams, type CreateThreadPayload, type DataRecordsQuery, type DeleteDataRecordParams, type DeleteDataRecordPayload, type DeleteMemberPayload, type DeleteMemberProfileImagePayload, type DeletePostParams, type DeleteThreadParams, type ErrorCategory, type ErrorCode, ErrorCodes, type GenerateInviteTokenParams, type GetAppAndMemberPayload, type GetAuthProvidersPayload, type GetAuthenticationClientSecretParams, type GetAuthenticationClientSecretPayload, type GetCurrentMemberPayload, type GetDataRecordParams, type GetDataRecordPayload, type GetDataRecordsParams, type GetDataRecordsPayload, type GetDataTableParams, type GetDataTablePayload, type GetDataTablesPayload, type GetMemberCardsPayload, type GetMemberInvoicesParams, type GetMemberInvoicesPayload, type GetMemberJSONPayload, type GetMemberPurchasesParams, type GetMemberReceiptsParams, type GetMemberReceiptsPayload, type GetPlanParams, type GetPlanPayload, type GetPlansParams, type GetPlansPayload, type GetPostsParams, type GetPostsPayload, type GetRestrictedUrlGroupsPayload, type GetSecureContentParams, type GetSecureContentPayload, type GetTeamParams, type GetThreadsParams, type GetThreadsPayload, type GetTotalCheckoutAmountParams, type GetTotalCheckoutAmountPayload, type IncludeClause, type JoinTeamParams, type LaunchStripeCustomerPortalParams, type LaunchStripeCustomerPortalPayload, type LoginMemberEmailPasswordParams, type LoginMemberEmailPasswordPayload, type LoginMemberPasswordlessParams, type LoginWithProviderParams, type LogoutMemberPayload, Member, type MemberReferenceFieldResult, type MemberReferenceOperation, type MemberReferenceSelector, type MemberstackErrorShape, type MemberstackTranslations, type OAuthProvider, type OpenStripeCustomerPortalParams, type OpenStripeCustomerPortalPayload, type OrderByClause, type PostVoteParams, type PurchasePlansParams, type PurchasePlansPayload, type PurchasePlansWithCheckoutParams, type PurchasePlansWithCheckoutPayload, type QueryDataRecordsParams, type QueryDataRecordsPayload, type ReferenceFieldResult, type ReferenceOperation, type ReferenceSelector, type RefreshMemberTokensPayload, type RemoveMemberFromTeamParams, type RemovePlanParams, type RemovePlanPayload, type ReplacePlanParams, type ReplacePlanPayload, type ResetMemberPassworPayload, type ResetMemberPasswordParams, type ResetMemberPasswordPayload, type SelectClause, type SendMemberLoginPasswordlessEmailParams, type SendMemberLoginPasswordlessEmailPayload, type SendMemberResetPasswordEmailParams, type SendMemberResetPasswordEmailPayload, type SendMemberVerificationEmailPayload, type SetPasswordParams, type SetPasswordPayload, type SignupMemberAuthProviderParams, type SignupMemberAuthProviderPayload, type SignupMemberEmailPasswordParams, type SignupMemberEmailPasswordPayload, type SignupWithProviderParams, type ThreadVoteParams, type UpdateDataRecordParams, type UpdateDataRecordPayload, type UpdateDefaultCardParams, type UpdateDefaultCardPayload, type UpdateMemberAuthParams, type UpdateMemberAuthPayload, type UpdateMemberJSONParams, type UpdateMemberParams, type UpdateMemberPayload, type UpdateMemberProfileImageParams, type UpdateMemberProfileImagePayload, type UpdatePlanPaymentParams, type UpdatePlanPaymentPayload, type UpdatePostParams, type UpdatePostPayload, type UpdateThreadParams, type UpdateThreadPayload, type WhereClause, type WhereOperators, _default as default, formatErrorForUser, getErrorCategory, getErrorCode, getErrorDocsUrl, getErrorMessage, getErrorReport, getErrorSuggestions, isErrorCode, isMemberstackError };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { P as Payload } from './models-
|
|
2
|
-
export { A as App, d as AuthProvider, f as AuthTokens, B as Branding, j as CheckoutTotal, C as ContentGroup, k as CustomField, E as ExtractData,
|
|
1
|
+
import { P as Payload, M as Member } from './models-CFT_ABd5.js';
|
|
2
|
+
export { A as App, d as AuthProvider, f as AuthTokens, B as Branding, j as CheckoutTotal, C as ContentGroup, k as CustomField, E as ExtractData, e as MemberAuth, g as MemberCard, n as MemberDisplayInfo, h as MemberInvoice, i as MemberReceipt, m as PaginatedData, a as Plan, c as PlanConnection, l as Post, b as Price, S as SecureContent, T as Thread } from './models-CFT_ABd5.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Supported OAuth providers for social login.
|
|
6
|
+
* Use lowercase when calling loginWithProvider(), signupWithProvider(),
|
|
7
|
+
* connectProvider(), and disconnectProvider().
|
|
8
|
+
*
|
|
9
|
+
* These providers have pre-configured settings and work with just a client ID/secret.
|
|
10
|
+
* Custom OIDC providers configured in the dashboard are also accepted via the `string` fallback.
|
|
11
|
+
*/
|
|
12
|
+
type OAuthProvider = 'google' | 'facebook' | 'microsoft' | 'github' | 'linkedin' | 'spotify' | 'dribbble' | (string & {});
|
|
4
13
|
/**
|
|
5
14
|
* Parameters for signing up a new member with email and password.
|
|
6
15
|
*
|
|
@@ -159,17 +168,24 @@ type DeleteThreadParams = {
|
|
|
159
168
|
/**
|
|
160
169
|
* Parameters for updating a member's profile image.
|
|
161
170
|
*
|
|
162
|
-
* @example
|
|
171
|
+
* @example Upload a new image
|
|
163
172
|
* ```typescript
|
|
164
173
|
* const fileInput = document.querySelector('input[type="file"]');
|
|
165
174
|
* await memberstack.updateMemberProfileImage({
|
|
166
175
|
* profileImage: fileInput.files[0]
|
|
167
176
|
* });
|
|
168
177
|
* ```
|
|
178
|
+
*
|
|
179
|
+
* @example Remove the profile image
|
|
180
|
+
* ```typescript
|
|
181
|
+
* await memberstack.updateMemberProfileImage({
|
|
182
|
+
* profileImage: null
|
|
183
|
+
* });
|
|
184
|
+
* ```
|
|
169
185
|
*/
|
|
170
186
|
type UpdateMemberProfileImageParams = {
|
|
171
|
-
/** The image file to upload
|
|
172
|
-
profileImage: File;
|
|
187
|
+
/** The image file to upload, or null to remove the current profile image */
|
|
188
|
+
profileImage: File | null;
|
|
173
189
|
};
|
|
174
190
|
/**
|
|
175
191
|
* Parameters for retrieving secure/gated content.
|
|
@@ -213,8 +229,8 @@ type SetPasswordParams = {
|
|
|
213
229
|
* ```
|
|
214
230
|
*/
|
|
215
231
|
type SignupWithProviderParams = {
|
|
216
|
-
/** OAuth provider
|
|
217
|
-
provider:
|
|
232
|
+
/** OAuth provider to sign up with */
|
|
233
|
+
provider: OAuthProvider;
|
|
218
234
|
/** Custom field values to set during signup */
|
|
219
235
|
customFields?: Record<string, any>;
|
|
220
236
|
/** Array of plans to assign on signup */
|
|
@@ -238,8 +254,8 @@ type SignupWithProviderParams = {
|
|
|
238
254
|
* ```
|
|
239
255
|
*/
|
|
240
256
|
type LoginWithProviderParams = {
|
|
241
|
-
/** OAuth provider
|
|
242
|
-
provider:
|
|
257
|
+
/** OAuth provider to log in with */
|
|
258
|
+
provider: OAuthProvider;
|
|
243
259
|
/** If true, creates new account if one doesn't exist (default: false) */
|
|
244
260
|
allowSignup?: boolean;
|
|
245
261
|
};
|
|
@@ -274,8 +290,8 @@ type SendMemberLoginPasswordlessEmailParams = {
|
|
|
274
290
|
type SignupMemberAuthProviderParams = {
|
|
275
291
|
/** The authorization code from OAuth flow */
|
|
276
292
|
code: string;
|
|
277
|
-
/** The OAuth provider */
|
|
278
|
-
provider:
|
|
293
|
+
/** The OAuth provider (uppercase, e.g. 'GOOGLE') */
|
|
294
|
+
provider: string;
|
|
279
295
|
/** Plan ID to assign (deprecated, use plans array) */
|
|
280
296
|
planId?: string;
|
|
281
297
|
/** Custom field values to set during signup */
|
|
@@ -411,8 +427,8 @@ type PurchasePlansWithCheckoutParams = {
|
|
|
411
427
|
successUrl?: string;
|
|
412
428
|
/** Auto-redirect to Stripe Checkout (default: true) */
|
|
413
429
|
autoRedirect?: boolean;
|
|
414
|
-
/** Custom metadata to attach to the Stripe checkout session */
|
|
415
|
-
metadataForCheckout?:
|
|
430
|
+
/** Custom metadata to attach to the Stripe checkout session (Stripe accepts string key-value pairs) */
|
|
431
|
+
metadataForCheckout?: Record<string, string>;
|
|
416
432
|
};
|
|
417
433
|
/**
|
|
418
434
|
* Parameters for launching Stripe Customer Portal.
|
|
@@ -428,7 +444,7 @@ type LaunchStripeCustomerPortalParams = {
|
|
|
428
444
|
/** Price IDs to show update options for */
|
|
429
445
|
priceIds?: string[];
|
|
430
446
|
/** Stripe portal configuration object */
|
|
431
|
-
configuration?:
|
|
447
|
+
configuration?: Record<string, unknown>;
|
|
432
448
|
/** URL to return to after leaving the portal */
|
|
433
449
|
returnUrl?: string;
|
|
434
450
|
/** Auto-redirect to Stripe portal (default: true) */
|
|
@@ -439,7 +455,7 @@ type LaunchStripeCustomerPortalParams = {
|
|
|
439
455
|
*/
|
|
440
456
|
type OpenStripeCustomerPortalParams = {
|
|
441
457
|
/** Stripe portal configuration object */
|
|
442
|
-
configuration?:
|
|
458
|
+
configuration?: Record<string, unknown>;
|
|
443
459
|
/** URL to return to after leaving the portal */
|
|
444
460
|
returnUrl?: string;
|
|
445
461
|
/** Auto-redirect to Stripe portal (default: true) */
|
|
@@ -525,7 +541,7 @@ type GetMemberInvoicesParams = {
|
|
|
525
541
|
*/
|
|
526
542
|
type UpdateMemberJSONParams = {
|
|
527
543
|
/** JSON object to store (completely replaces existing JSON) */
|
|
528
|
-
json:
|
|
544
|
+
json: Record<string, unknown>;
|
|
529
545
|
};
|
|
530
546
|
/**
|
|
531
547
|
* Parameters for retrieving member purchases with optional expansions.
|
|
@@ -634,14 +650,16 @@ type GetTotalCheckoutAmountParams = {
|
|
|
634
650
|
type GetDataRecordsParams = {
|
|
635
651
|
/** The table key/identifier */
|
|
636
652
|
table: string;
|
|
653
|
+
/** @deprecated Use `table` instead */
|
|
654
|
+
tableKey?: string;
|
|
637
655
|
/** ISO date string - only return records created after this date */
|
|
638
656
|
createdAfter?: string;
|
|
639
657
|
/** ISO date string - only return records created before this date */
|
|
640
658
|
createdBefore?: string;
|
|
641
659
|
/** Field name to sort by */
|
|
642
660
|
sortBy?: string;
|
|
643
|
-
/** Sort direction */
|
|
644
|
-
sortDirection?: 'ASC' | 'DESC';
|
|
661
|
+
/** Sort direction (case-insensitive) */
|
|
662
|
+
sortDirection?: 'asc' | 'desc' | 'ASC' | 'DESC';
|
|
645
663
|
/** Maximum number of records to return (1-100) */
|
|
646
664
|
limit?: number;
|
|
647
665
|
/** Cursor for pagination (internalOrder value from previous response) */
|
|
@@ -754,6 +772,8 @@ type DeleteDataRecordParams = {
|
|
|
754
772
|
type GetDataTableParams = {
|
|
755
773
|
/** The table key/identifier */
|
|
756
774
|
table: string;
|
|
775
|
+
/** @deprecated Use `table` instead */
|
|
776
|
+
tableKey?: string;
|
|
757
777
|
};
|
|
758
778
|
/**
|
|
759
779
|
* Filter operators for query where clauses.
|
|
@@ -942,6 +962,8 @@ type DataRecordsQuery = {
|
|
|
942
962
|
type QueryDataRecordsParams = {
|
|
943
963
|
/** The table key/identifier */
|
|
944
964
|
table: string;
|
|
965
|
+
/** @deprecated Use `table` instead */
|
|
966
|
+
tableKey?: string;
|
|
945
967
|
/** Query configuration */
|
|
946
968
|
query: DataRecordsQuery;
|
|
947
969
|
};
|
|
@@ -989,6 +1011,10 @@ type GetMemberReceiptsPayload = PaginatedResponse<Payload.Transforms["MemberRece
|
|
|
989
1011
|
type UpdateMemberProfileImagePayload = Response<{
|
|
990
1012
|
profileImage: string;
|
|
991
1013
|
}>;
|
|
1014
|
+
/** Response from deleteMemberProfileImage() - confirms profile image was removed */
|
|
1015
|
+
type DeleteMemberProfileImagePayload = Response<{
|
|
1016
|
+
profileImage: null;
|
|
1017
|
+
}>;
|
|
992
1018
|
/** Response from getSecureContent() - contains the gated content HTML */
|
|
993
1019
|
type GetSecureContentPayload = Response<Payload.Transforms["SecureContent"]>;
|
|
994
1020
|
/** Response from setPassword() - contains updated member data */
|
|
@@ -1068,7 +1094,9 @@ type GetAuthenticationClientSecretPayload = Response<Payload.Transforms["Authent
|
|
|
1068
1094
|
/** Response from sendMemberVerificationEmail() - success indicator */
|
|
1069
1095
|
type SendMemberVerificationEmailPayload = Response<Payload.Transforms["SendMemberVerificationEmail"]>;
|
|
1070
1096
|
/** Response from resetMemberPassword() - success indicator */
|
|
1071
|
-
type
|
|
1097
|
+
type ResetMemberPasswordPayload = Response<Payload.Transforms["ResetMemberPassword"]>;
|
|
1098
|
+
/** @deprecated Use `ResetMemberPasswordPayload` instead (typo fix) */
|
|
1099
|
+
type ResetMemberPassworPayload = ResetMemberPasswordPayload;
|
|
1072
1100
|
/** Response from getPosts() - contains posts array */
|
|
1073
1101
|
type GetPostsPayload = Response<Payload.Transforms["Posts"]>;
|
|
1074
1102
|
/** Response from getThreads() - contains threads array */
|
|
@@ -1293,10 +1321,13 @@ interface MemberstackOptions {
|
|
|
1293
1321
|
isWebflow?: boolean;
|
|
1294
1322
|
}
|
|
1295
1323
|
interface GetCurrentMemberParams {
|
|
1296
|
-
useCache?:
|
|
1324
|
+
useCache?: boolean;
|
|
1297
1325
|
}
|
|
1298
1326
|
type BearerToken = string;
|
|
1299
1327
|
|
|
1328
|
+
/** Callback type for auth state changes */
|
|
1329
|
+
type AuthCallback = (member: Member | null) => void;
|
|
1330
|
+
|
|
1300
1331
|
/**
|
|
1301
1332
|
* Memberstack UI Translation Keys
|
|
1302
1333
|
*
|
|
@@ -1397,6 +1428,16 @@ declare global {
|
|
|
1397
1428
|
}
|
|
1398
1429
|
}
|
|
1399
1430
|
|
|
1431
|
+
/** Result returned when a pre-built modal closes */
|
|
1432
|
+
type OpenModalResult = {
|
|
1433
|
+
type?: string;
|
|
1434
|
+
data?: {
|
|
1435
|
+
member?: Record<string, unknown>;
|
|
1436
|
+
[key: string]: unknown;
|
|
1437
|
+
};
|
|
1438
|
+
[key: string]: unknown;
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1400
1441
|
/**
|
|
1401
1442
|
* Configuration options for initializing the Memberstack SDK.
|
|
1402
1443
|
*/
|
|
@@ -1789,47 +1830,14 @@ declare const _default: {
|
|
|
1789
1830
|
openModal: (type: "LOGIN" | "SIGNUP" | "FORGOT_PASSWORD" | "RESET_PASSWORD" | "PROFILE", params?: {
|
|
1790
1831
|
[key: string]: unknown;
|
|
1791
1832
|
translations?: MemberstackTranslations | undefined;
|
|
1792
|
-
}) => Promise<
|
|
1833
|
+
}) => Promise<OpenModalResult>;
|
|
1793
1834
|
hideModal: () => void;
|
|
1794
1835
|
preloadModals: () => Promise<void>;
|
|
1795
1836
|
_hideLoader: (element?: HTMLElement | undefined) => void;
|
|
1796
1837
|
_showLoader: (element?: HTMLElement | undefined) => void;
|
|
1797
1838
|
_showMessage: (msg: string, isError?: boolean | undefined) => Promise<void>;
|
|
1798
1839
|
getMemberCookie: () => any;
|
|
1799
|
-
onAuthChange: (cb:
|
|
1800
|
-
id: string;
|
|
1801
|
-
verified: boolean;
|
|
1802
|
-
profileImage: string;
|
|
1803
|
-
auth: {
|
|
1804
|
-
email: string;
|
|
1805
|
-
hasPassword: boolean;
|
|
1806
|
-
providers: {
|
|
1807
|
-
provider: string;
|
|
1808
|
-
}[];
|
|
1809
|
-
};
|
|
1810
|
-
loginRedirect: string;
|
|
1811
|
-
stripeCustomerId: string;
|
|
1812
|
-
createdAt: string;
|
|
1813
|
-
metaData: object;
|
|
1814
|
-
customFields: object;
|
|
1815
|
-
permissions: [] | string[];
|
|
1816
|
-
planConnections: {
|
|
1817
|
-
id: string;
|
|
1818
|
-
active: boolean;
|
|
1819
|
-
status: string;
|
|
1820
|
-
planId: string;
|
|
1821
|
-
type: string;
|
|
1822
|
-
payment: {
|
|
1823
|
-
amount: number;
|
|
1824
|
-
currency: string;
|
|
1825
|
-
status: string;
|
|
1826
|
-
lastBillingDate: number | null;
|
|
1827
|
-
nextBillingDate: number | null;
|
|
1828
|
-
cancelAtDate: number | null;
|
|
1829
|
-
priceId: string;
|
|
1830
|
-
} | null;
|
|
1831
|
-
}[];
|
|
1832
|
-
} | null) => void) => {
|
|
1840
|
+
onAuthChange: (cb: AuthCallback) => {
|
|
1833
1841
|
unsubscribe: () => boolean;
|
|
1834
1842
|
};
|
|
1835
1843
|
_captchaReady: Promise<unknown>;
|
|
@@ -1843,7 +1851,9 @@ declare const _default: {
|
|
|
1843
1851
|
}): Promise<void>;
|
|
1844
1852
|
getChannelInfo(params: {
|
|
1845
1853
|
channelKey: string;
|
|
1846
|
-
}): Promise<
|
|
1854
|
+
}): Promise<{
|
|
1855
|
+
data: Record<string, unknown>;
|
|
1856
|
+
}>;
|
|
1847
1857
|
subscribeToChannel(params: {
|
|
1848
1858
|
channelKey: string;
|
|
1849
1859
|
action: "NONE" | "THREADS_ONLY";
|
|
@@ -1859,8 +1869,8 @@ declare const _default: {
|
|
|
1859
1869
|
threadVote(params: ThreadVoteParams): Promise<void>;
|
|
1860
1870
|
deleteThread(params: DeleteThreadParams): Promise<void>;
|
|
1861
1871
|
getSecureContent(params: GetSecureContentParams): Promise<GetSecureContentPayload>;
|
|
1862
|
-
signupWithProvider(params: SignupWithProviderParams): Promise<
|
|
1863
|
-
loginWithProvider(params: LoginWithProviderParams): Promise<
|
|
1872
|
+
signupWithProvider(params: SignupWithProviderParams): Promise<SignupMemberAuthProviderPayload>;
|
|
1873
|
+
loginWithProvider(params: LoginWithProviderParams): Promise<LoginMemberEmailPasswordPayload>;
|
|
1864
1874
|
connectProvider(params: LoginWithProviderParams): Promise<ConnectProviderPayload>;
|
|
1865
1875
|
disconnectProvider(params: LoginWithProviderParams): Promise<ConnectProviderPayload>;
|
|
1866
1876
|
getAppAndMember(params?: {
|
|
@@ -1892,10 +1902,13 @@ declare const _default: {
|
|
|
1892
1902
|
getTeam(params: GetTeamParams, options?: MemberstackOptions | undefined): Promise<void>;
|
|
1893
1903
|
removeMemberFromTeam(params: RemoveMemberFromTeamParams, options?: MemberstackOptions | undefined): Promise<void>;
|
|
1894
1904
|
generateInviteToken(params: GenerateInviteTokenParams, options?: MemberstackOptions | undefined): Promise<void>;
|
|
1895
|
-
updateMemberProfileImage(params:
|
|
1905
|
+
updateMemberProfileImage<T extends File | null>(params: {
|
|
1906
|
+
profileImage: T;
|
|
1907
|
+
}): Promise<T extends File ? UpdateMemberProfileImagePayload : DeleteMemberProfileImagePayload>;
|
|
1908
|
+
deleteMemberProfileImage(): Promise<DeleteMemberProfileImagePayload>;
|
|
1896
1909
|
sendMemberVerificationEmail(): Promise<SendMemberVerificationEmailPayload>;
|
|
1897
1910
|
sendMemberResetPasswordEmail(params: SendMemberResetPasswordEmailParams): Promise<SendMemberResetPasswordEmailPayload>;
|
|
1898
|
-
resetMemberPassword(params: ResetMemberPasswordParams): Promise<
|
|
1911
|
+
resetMemberPassword(params: ResetMemberPasswordParams): Promise<ResetMemberPasswordPayload>;
|
|
1899
1912
|
logout(options?: MemberstackOptions | undefined): Promise<LogoutMemberPayload>;
|
|
1900
1913
|
getDataTables(options?: MemberstackOptions | undefined): Promise<GetDataTablesPayload>;
|
|
1901
1914
|
getDataTable(params: GetDataTableParams, options?: MemberstackOptions | undefined): Promise<GetDataTablePayload>;
|
|
@@ -1905,7 +1918,9 @@ declare const _default: {
|
|
|
1905
1918
|
updateDataRecord(params: UpdateDataRecordParams, options?: MemberstackOptions | undefined): Promise<UpdateDataRecordPayload>;
|
|
1906
1919
|
deleteDataRecord(params: DeleteDataRecordParams, options?: MemberstackOptions | undefined): Promise<DeleteDataRecordPayload>;
|
|
1907
1920
|
queryDataRecords(params: QueryDataRecordsParams, options?: MemberstackOptions | undefined): Promise<QueryDataRecordsPayload>;
|
|
1921
|
+
} & {
|
|
1922
|
+
destroy: () => void;
|
|
1908
1923
|
};
|
|
1909
1924
|
};
|
|
1910
1925
|
|
|
1911
|
-
export { type AddMemberCardParams, type AddMemberCardPayload, type AddPlanParams, type AddPlanPayload, type AppPayload, type CancelPlanParams, type CancelPlanPayload, type ConnectProviderPayload, type CountClause, type CreateDataRecordParams, type CreateDataRecordPayload, type CreatePostParams, type CreatePostPayload, type CreateThreadParams, type CreateThreadPayload, type DataRecordsQuery, type DeleteDataRecordParams, type DeleteDataRecordPayload, type DeleteMemberPayload, type DeletePostParams, type DeleteThreadParams, type ErrorCategory, type ErrorCode, ErrorCodes, type GenerateInviteTokenParams, type GetAppAndMemberPayload, type GetAuthProvidersPayload, type GetAuthenticationClientSecretParams, type GetAuthenticationClientSecretPayload, type GetCurrentMemberPayload, type GetDataRecordParams, type GetDataRecordPayload, type GetDataRecordsParams, type GetDataRecordsPayload, type GetDataTableParams, type GetDataTablePayload, type GetDataTablesPayload, type GetMemberCardsPayload, type GetMemberInvoicesParams, type GetMemberInvoicesPayload, type GetMemberJSONPayload, type GetMemberPurchasesParams, type GetMemberReceiptsParams, type GetMemberReceiptsPayload, type GetPlanParams, type GetPlanPayload, type GetPlansParams, type GetPlansPayload, type GetPostsParams, type GetPostsPayload, type GetRestrictedUrlGroupsPayload, type GetSecureContentParams, type GetSecureContentPayload, type GetTeamParams, type GetThreadsParams, type GetThreadsPayload, type GetTotalCheckoutAmountParams, type GetTotalCheckoutAmountPayload, type IncludeClause, type JoinTeamParams, type LaunchStripeCustomerPortalParams, type LaunchStripeCustomerPortalPayload, type LoginMemberEmailPasswordParams, type LoginMemberEmailPasswordPayload, type LoginMemberPasswordlessParams, type LoginWithProviderParams, type LogoutMemberPayload, type MemberReferenceFieldResult, type MemberReferenceOperation, type MemberReferenceSelector, type MemberstackErrorShape, type MemberstackTranslations, type OpenStripeCustomerPortalParams, type OpenStripeCustomerPortalPayload, type OrderByClause, type PostVoteParams, type PurchasePlansParams, type PurchasePlansPayload, type PurchasePlansWithCheckoutParams, type PurchasePlansWithCheckoutPayload, type QueryDataRecordsParams, type QueryDataRecordsPayload, type ReferenceFieldResult, type ReferenceOperation, type ReferenceSelector, type RefreshMemberTokensPayload, type RemoveMemberFromTeamParams, type RemovePlanParams, type RemovePlanPayload, type ReplacePlanParams, type ReplacePlanPayload, type ResetMemberPassworPayload, type ResetMemberPasswordParams, type SelectClause, type SendMemberLoginPasswordlessEmailParams, type SendMemberLoginPasswordlessEmailPayload, type SendMemberResetPasswordEmailParams, type SendMemberResetPasswordEmailPayload, type SendMemberVerificationEmailPayload, type SetPasswordParams, type SetPasswordPayload, type SignupMemberAuthProviderParams, type SignupMemberAuthProviderPayload, type SignupMemberEmailPasswordParams, type SignupMemberEmailPasswordPayload, type SignupWithProviderParams, type ThreadVoteParams, type UpdateDataRecordParams, type UpdateDataRecordPayload, type UpdateDefaultCardParams, type UpdateDefaultCardPayload, type UpdateMemberAuthParams, type UpdateMemberAuthPayload, type UpdateMemberJSONParams, type UpdateMemberParams, type UpdateMemberPayload, type UpdateMemberProfileImageParams, type UpdateMemberProfileImagePayload, type UpdatePlanPaymentParams, type UpdatePlanPaymentPayload, type UpdatePostParams, type UpdatePostPayload, type UpdateThreadParams, type UpdateThreadPayload, type WhereClause, type WhereOperators, _default as default, formatErrorForUser, getErrorCategory, getErrorCode, getErrorDocsUrl, getErrorMessage, getErrorReport, getErrorSuggestions, isErrorCode, isMemberstackError };
|
|
1926
|
+
export { type AddMemberCardParams, type AddMemberCardPayload, type AddPlanParams, type AddPlanPayload, type AppPayload, type AuthCallback, type CancelPlanParams, type CancelPlanPayload, type ConnectProviderPayload, type CountClause, type CreateDataRecordParams, type CreateDataRecordPayload, type CreatePostParams, type CreatePostPayload, type CreateThreadParams, type CreateThreadPayload, type DataRecordsQuery, type DeleteDataRecordParams, type DeleteDataRecordPayload, type DeleteMemberPayload, type DeleteMemberProfileImagePayload, type DeletePostParams, type DeleteThreadParams, type ErrorCategory, type ErrorCode, ErrorCodes, type GenerateInviteTokenParams, type GetAppAndMemberPayload, type GetAuthProvidersPayload, type GetAuthenticationClientSecretParams, type GetAuthenticationClientSecretPayload, type GetCurrentMemberPayload, type GetDataRecordParams, type GetDataRecordPayload, type GetDataRecordsParams, type GetDataRecordsPayload, type GetDataTableParams, type GetDataTablePayload, type GetDataTablesPayload, type GetMemberCardsPayload, type GetMemberInvoicesParams, type GetMemberInvoicesPayload, type GetMemberJSONPayload, type GetMemberPurchasesParams, type GetMemberReceiptsParams, type GetMemberReceiptsPayload, type GetPlanParams, type GetPlanPayload, type GetPlansParams, type GetPlansPayload, type GetPostsParams, type GetPostsPayload, type GetRestrictedUrlGroupsPayload, type GetSecureContentParams, type GetSecureContentPayload, type GetTeamParams, type GetThreadsParams, type GetThreadsPayload, type GetTotalCheckoutAmountParams, type GetTotalCheckoutAmountPayload, type IncludeClause, type JoinTeamParams, type LaunchStripeCustomerPortalParams, type LaunchStripeCustomerPortalPayload, type LoginMemberEmailPasswordParams, type LoginMemberEmailPasswordPayload, type LoginMemberPasswordlessParams, type LoginWithProviderParams, type LogoutMemberPayload, Member, type MemberReferenceFieldResult, type MemberReferenceOperation, type MemberReferenceSelector, type MemberstackErrorShape, type MemberstackTranslations, type OAuthProvider, type OpenStripeCustomerPortalParams, type OpenStripeCustomerPortalPayload, type OrderByClause, type PostVoteParams, type PurchasePlansParams, type PurchasePlansPayload, type PurchasePlansWithCheckoutParams, type PurchasePlansWithCheckoutPayload, type QueryDataRecordsParams, type QueryDataRecordsPayload, type ReferenceFieldResult, type ReferenceOperation, type ReferenceSelector, type RefreshMemberTokensPayload, type RemoveMemberFromTeamParams, type RemovePlanParams, type RemovePlanPayload, type ReplacePlanParams, type ReplacePlanPayload, type ResetMemberPassworPayload, type ResetMemberPasswordParams, type ResetMemberPasswordPayload, type SelectClause, type SendMemberLoginPasswordlessEmailParams, type SendMemberLoginPasswordlessEmailPayload, type SendMemberResetPasswordEmailParams, type SendMemberResetPasswordEmailPayload, type SendMemberVerificationEmailPayload, type SetPasswordParams, type SetPasswordPayload, type SignupMemberAuthProviderParams, type SignupMemberAuthProviderPayload, type SignupMemberEmailPasswordParams, type SignupMemberEmailPasswordPayload, type SignupWithProviderParams, type ThreadVoteParams, type UpdateDataRecordParams, type UpdateDataRecordPayload, type UpdateDefaultCardParams, type UpdateDefaultCardPayload, type UpdateMemberAuthParams, type UpdateMemberAuthPayload, type UpdateMemberJSONParams, type UpdateMemberParams, type UpdateMemberPayload, type UpdateMemberProfileImageParams, type UpdateMemberProfileImagePayload, type UpdatePlanPaymentParams, type UpdatePlanPaymentPayload, type UpdatePostParams, type UpdatePostPayload, type UpdateThreadParams, type UpdateThreadPayload, type WhereClause, type WhereOperators, _default as default, formatErrorForUser, getErrorCategory, getErrorCode, getErrorDocsUrl, getErrorMessage, getErrorReport, getErrorSuggestions, isErrorCode, isMemberstackError };
|