glitch-javascript-sdk 3.8.5 → 3.8.6
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 +16 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Users.d.ts +39 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +39 -0
- package/package.json +2 -2
- package/src/api/Users.ts +50 -0
- package/src/routes/UserRoutes.ts +2 -0
package/dist/esm/api/Users.d.ts
CHANGED
|
@@ -44,6 +44,35 @@ export interface InfluencerPayoutQuery {
|
|
|
44
44
|
orderBy?: "created_at" | "amount";
|
|
45
45
|
orderDirection?: "asc" | "desc";
|
|
46
46
|
}
|
|
47
|
+
/** Delivery state for the authenticated user's registered email address. */
|
|
48
|
+
export type EmailDeliveryState = "healthy" | "suppressed";
|
|
49
|
+
/** Recovery action selected by the API for the current suppression category. */
|
|
50
|
+
export type EmailDeliveryRecoveryAction = "none" | "self_service" | "change_email" | "contact_support";
|
|
51
|
+
/** Self-service and fallback actions available for an email-delivery state. */
|
|
52
|
+
export interface EmailDeliveryRecovery {
|
|
53
|
+
allowed: boolean;
|
|
54
|
+
action: EmailDeliveryRecoveryAction;
|
|
55
|
+
requires_acknowledgement: boolean;
|
|
56
|
+
account_verified?: boolean;
|
|
57
|
+
change_email_path?: string;
|
|
58
|
+
support_path?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Current delivery state for the authenticated user's registered email. */
|
|
61
|
+
export interface EmailDeliveryStatus {
|
|
62
|
+
state: EmailDeliveryState;
|
|
63
|
+
action_required: boolean;
|
|
64
|
+
email: string | null;
|
|
65
|
+
category: string | null;
|
|
66
|
+
provider: string | null;
|
|
67
|
+
suppressed_at: string | null;
|
|
68
|
+
display_reason: string | null;
|
|
69
|
+
recovery: EmailDeliveryRecovery;
|
|
70
|
+
restored_now?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** Explicit confirmation required to remove an eligible active suppression. */
|
|
73
|
+
export interface RestoreEmailDeliveryRequest {
|
|
74
|
+
acknowledged: true;
|
|
75
|
+
}
|
|
47
76
|
declare class Users {
|
|
48
77
|
/**
|
|
49
78
|
* List all the users.
|
|
@@ -74,6 +103,16 @@ declare class Users {
|
|
|
74
103
|
* @returns promise
|
|
75
104
|
*/
|
|
76
105
|
static me<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
106
|
+
/**
|
|
107
|
+
* Gets the delivery and suppression state for the authenticated user's
|
|
108
|
+
* current registered email address.
|
|
109
|
+
*/
|
|
110
|
+
static emailDeliveryStatus(): AxiosPromise<Response<EmailDeliveryStatus>>;
|
|
111
|
+
/**
|
|
112
|
+
* Removes an eligible active suppression for the authenticated user's
|
|
113
|
+
* current verified email address.
|
|
114
|
+
*/
|
|
115
|
+
static restoreEmailDelivery(data: RestoreEmailDeliveryRequest): AxiosPromise<Response<EmailDeliveryStatus>>;
|
|
77
116
|
/**
|
|
78
117
|
* Gets the campaigns the users has been invited too.
|
|
79
118
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -8935,6 +8935,8 @@ var UserRoutes = /** @class */ (function () {
|
|
|
8935
8935
|
follow: { url: '/users/{user_id}/follow', method: HTTP_METHODS.POST },
|
|
8936
8936
|
profile: { url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
|
|
8937
8937
|
me: { url: '/users/me', method: HTTP_METHODS.GET },
|
|
8938
|
+
emailDeliveryStatus: { url: '/users/me/email-delivery', method: HTTP_METHODS.GET },
|
|
8939
|
+
restoreEmailDelivery: { url: '/users/me/email-delivery/restore', method: HTTP_METHODS.POST },
|
|
8938
8940
|
syncInfluencer: { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
|
|
8939
8941
|
generateInfluencerProfile: { url: '/users/generateInfluencerProfile', method: HTTP_METHODS.POST },
|
|
8940
8942
|
oneTimeToken: { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
|
|
@@ -9031,6 +9033,20 @@ var Users = /** @class */ (function () {
|
|
|
9031
9033
|
Users.me = function (params) {
|
|
9032
9034
|
return Requests.processRoute(UserRoutes.routes.me, {}, undefined, params);
|
|
9033
9035
|
};
|
|
9036
|
+
/**
|
|
9037
|
+
* Gets the delivery and suppression state for the authenticated user's
|
|
9038
|
+
* current registered email address.
|
|
9039
|
+
*/
|
|
9040
|
+
Users.emailDeliveryStatus = function () {
|
|
9041
|
+
return Requests.processRoute(UserRoutes.routes.emailDeliveryStatus);
|
|
9042
|
+
};
|
|
9043
|
+
/**
|
|
9044
|
+
* Removes an eligible active suppression for the authenticated user's
|
|
9045
|
+
* current verified email address.
|
|
9046
|
+
*/
|
|
9047
|
+
Users.restoreEmailDelivery = function (data) {
|
|
9048
|
+
return Requests.processRoute(UserRoutes.routes.restoreEmailDelivery, data);
|
|
9049
|
+
};
|
|
9034
9050
|
/**
|
|
9035
9051
|
* Gets the campaigns the users has been invited too.
|
|
9036
9052
|
*
|