@charisol/plexo-sdk 1.4.23 → 1.4.24
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.
|
@@ -14,6 +14,8 @@ type AuthAction = {
|
|
|
14
14
|
email: string;
|
|
15
15
|
password: string;
|
|
16
16
|
name: string;
|
|
17
|
+
companyName: string;
|
|
18
|
+
phone: string;
|
|
17
19
|
} | {
|
|
18
20
|
action: 'login';
|
|
19
21
|
email: string;
|
|
@@ -22,7 +24,6 @@ type AuthAction = {
|
|
|
22
24
|
action: 'verify';
|
|
23
25
|
email: string;
|
|
24
26
|
code: string;
|
|
25
|
-
password: string;
|
|
26
27
|
} | {
|
|
27
28
|
action: 'resend';
|
|
28
29
|
email: string;
|
package/dist/index.js
CHANGED
|
@@ -53198,9 +53198,9 @@ var ZW = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53198
53198
|
})
|
|
53199
53199
|
}) });
|
|
53200
53200
|
}, rG = ({ onMaildripAuth: e, onConnected: t, InlineTextInput: n }) => {
|
|
53201
|
-
let [r, i] = T.useState("login"), [a, o] = T.useState("credentials"), [s, c] = T.useState(""), [l, u] = T.useState(""), [d, f] = T.useState(""), [p, m] = T.useState(""), [h, g] = T.useState(
|
|
53201
|
+
let [r, i] = T.useState("login"), [a, o] = T.useState("credentials"), [s, c] = T.useState(""), [l, u] = T.useState(""), [d, f] = T.useState(""), [p, m] = T.useState(""), [h, g] = T.useState(""), [_, v] = T.useState(!1), [y, b] = T.useState(null), [x, S] = T.useState("idle"), C = (e) => {
|
|
53202
53202
|
if ("error" in e) {
|
|
53203
|
-
|
|
53203
|
+
b(e.error);
|
|
53204
53204
|
return;
|
|
53205
53205
|
}
|
|
53206
53206
|
if (e.status === "connected") {
|
|
@@ -53232,52 +53232,51 @@ var ZW = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53232
53232
|
children: [
|
|
53233
53233
|
/* @__PURE__ */ P(n, {
|
|
53234
53234
|
label: "Verification Code",
|
|
53235
|
-
value:
|
|
53236
|
-
onChange:
|
|
53235
|
+
value: h,
|
|
53236
|
+
onChange: g
|
|
53237
53237
|
}),
|
|
53238
53238
|
/* @__PURE__ */ P("button", {
|
|
53239
53239
|
type: "button",
|
|
53240
|
-
disabled:
|
|
53240
|
+
disabled: _ || !h.trim(),
|
|
53241
53241
|
onClick: async () => {
|
|
53242
|
-
if (
|
|
53243
|
-
|
|
53242
|
+
if (h.trim()) {
|
|
53243
|
+
v(!0), b(null);
|
|
53244
53244
|
try {
|
|
53245
53245
|
let t = await e({
|
|
53246
53246
|
action: "verify",
|
|
53247
53247
|
email: s.trim(),
|
|
53248
|
-
code:
|
|
53249
|
-
password: l
|
|
53248
|
+
code: h.trim()
|
|
53250
53249
|
});
|
|
53251
|
-
|
|
53250
|
+
C(t);
|
|
53252
53251
|
} finally {
|
|
53253
|
-
|
|
53252
|
+
v(!1);
|
|
53254
53253
|
}
|
|
53255
53254
|
}
|
|
53256
53255
|
},
|
|
53257
53256
|
className: "rounded bg-cyan-600 px-2.5 py-1.5 text-[11px] font-bold text-white transition hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50",
|
|
53258
|
-
children:
|
|
53257
|
+
children: _ ? "Verifying…" : "Verify & Connect"
|
|
53259
53258
|
}),
|
|
53260
53259
|
/* @__PURE__ */ P("button", {
|
|
53261
53260
|
type: "button",
|
|
53262
|
-
disabled:
|
|
53261
|
+
disabled: x === "sending",
|
|
53263
53262
|
onClick: async () => {
|
|
53264
|
-
|
|
53263
|
+
S("sending");
|
|
53265
53264
|
try {
|
|
53266
53265
|
let t = await e({
|
|
53267
53266
|
action: "resend",
|
|
53268
53267
|
email: s.trim()
|
|
53269
53268
|
});
|
|
53270
|
-
|
|
53269
|
+
S("error" in t ? "idle" : "sent"), "error" in t && b(t.error);
|
|
53271
53270
|
} catch {
|
|
53272
|
-
|
|
53271
|
+
S("idle");
|
|
53273
53272
|
}
|
|
53274
53273
|
},
|
|
53275
53274
|
className: "text-[9px] text-slate-400 underline hover:text-slate-200 disabled:opacity-50",
|
|
53276
|
-
children:
|
|
53275
|
+
children: x === "sent" ? "Code resent" : x === "sending" ? "Sending…" : "Didn't get it? Resend code"
|
|
53277
53276
|
}),
|
|
53278
|
-
|
|
53277
|
+
y && /* @__PURE__ */ P("span", {
|
|
53279
53278
|
className: "text-[9px] leading-snug text-rose-400",
|
|
53280
|
-
children:
|
|
53279
|
+
children: y
|
|
53281
53280
|
})
|
|
53282
53281
|
]
|
|
53283
53282
|
})
|
|
@@ -53294,7 +53293,7 @@ var ZW = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53294
53293
|
children: ["login", "register"].map((e) => /* @__PURE__ */ P("button", {
|
|
53295
53294
|
type: "button",
|
|
53296
53295
|
onClick: () => {
|
|
53297
|
-
i(e),
|
|
53296
|
+
i(e), b(null);
|
|
53298
53297
|
},
|
|
53299
53298
|
className: `flex-1 rounded px-2 py-1 text-[10px] font-bold transition ${r === e ? "bg-cyan-600 text-white" : "bg-slate-900 text-slate-400 hover:text-white"}`,
|
|
53300
53299
|
children: e === "login" ? "Log In" : "Create Account"
|
|
@@ -53303,11 +53302,15 @@ var ZW = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53303
53302
|
/* @__PURE__ */ F("div", {
|
|
53304
53303
|
className: "mt-1.5 flex flex-col gap-1.5",
|
|
53305
53304
|
children: [
|
|
53306
|
-
r === "register" && /* @__PURE__ */ P(n, {
|
|
53305
|
+
r === "register" && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(n, {
|
|
53307
53306
|
label: "Name",
|
|
53308
53307
|
value: d,
|
|
53309
53308
|
onChange: f
|
|
53310
|
-
}),
|
|
53309
|
+
}), /* @__PURE__ */ P(n, {
|
|
53310
|
+
label: "Phone Number",
|
|
53311
|
+
value: p,
|
|
53312
|
+
onChange: m
|
|
53313
|
+
})] }),
|
|
53311
53314
|
/* @__PURE__ */ P(n, {
|
|
53312
53315
|
label: "Email",
|
|
53313
53316
|
value: s,
|
|
@@ -53322,33 +53325,35 @@ var ZW = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53322
53325
|
}),
|
|
53323
53326
|
/* @__PURE__ */ P("button", {
|
|
53324
53327
|
type: "button",
|
|
53325
|
-
disabled:
|
|
53328
|
+
disabled: _ || !s.trim() || !l || r === "register" && (!d.trim() || !p.trim()),
|
|
53326
53329
|
onClick: async () => {
|
|
53327
|
-
if (!(!s.trim() || !l || r === "register" && !d.trim())) {
|
|
53328
|
-
|
|
53330
|
+
if (!(!s.trim() || !l || r === "register" && (!d.trim() || !p.trim()))) {
|
|
53331
|
+
v(!0), b(null);
|
|
53329
53332
|
try {
|
|
53330
53333
|
let t = await e(r === "register" ? {
|
|
53331
53334
|
action: "register",
|
|
53332
53335
|
email: s.trim(),
|
|
53333
53336
|
password: l,
|
|
53334
|
-
name: d.trim()
|
|
53337
|
+
name: d.trim(),
|
|
53338
|
+
companyName: d.trim(),
|
|
53339
|
+
phone: p.trim()
|
|
53335
53340
|
} : {
|
|
53336
53341
|
action: "login",
|
|
53337
53342
|
email: s.trim(),
|
|
53338
53343
|
password: l
|
|
53339
53344
|
});
|
|
53340
|
-
|
|
53345
|
+
C(t);
|
|
53341
53346
|
} finally {
|
|
53342
|
-
|
|
53347
|
+
v(!1);
|
|
53343
53348
|
}
|
|
53344
53349
|
}
|
|
53345
53350
|
},
|
|
53346
53351
|
className: "rounded bg-cyan-600 px-2.5 py-1.5 text-[11px] font-bold text-white transition hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50",
|
|
53347
|
-
children:
|
|
53352
|
+
children: _ ? "Connecting…" : r === "login" ? "Log In" : "Create Account"
|
|
53348
53353
|
}),
|
|
53349
|
-
|
|
53354
|
+
y && /* @__PURE__ */ P("span", {
|
|
53350
53355
|
className: "text-[9px] leading-snug text-rose-400",
|
|
53351
|
-
children:
|
|
53356
|
+
children: y
|
|
53352
53357
|
}),
|
|
53353
53358
|
/* @__PURE__ */ P("span", {
|
|
53354
53359
|
className: "text-[8.5px] leading-snug text-slate-500",
|
|
@@ -205,9 +205,8 @@ export interface PlexoBuilderProps {
|
|
|
205
205
|
* code, so the real result is always 'verify_required', never immediate.
|
|
206
206
|
* - 'login' -> 'connected' for an already-verified account, 'verify_required' if the
|
|
207
207
|
* account exists but was never finished verifying.
|
|
208
|
-
* - 'verify' ->
|
|
209
|
-
*
|
|
210
|
-
* password past this step.
|
|
208
|
+
* - 'verify' -> MailDrip's own verify endpoint returns a usable session token on success,
|
|
209
|
+
* so the host fetches/stores the API key in this one call — no password resubmission.
|
|
211
210
|
* - 'resend' -> re-sends the verification email.
|
|
212
211
|
*/
|
|
213
212
|
onMaildripAuth?: (input: {
|
|
@@ -215,6 +214,8 @@ export interface PlexoBuilderProps {
|
|
|
215
214
|
email: string;
|
|
216
215
|
password: string;
|
|
217
216
|
name: string;
|
|
217
|
+
companyName: string;
|
|
218
|
+
phone: string;
|
|
218
219
|
} | {
|
|
219
220
|
action: 'login';
|
|
220
221
|
email: string;
|
|
@@ -223,7 +224,6 @@ export interface PlexoBuilderProps {
|
|
|
223
224
|
action: 'verify';
|
|
224
225
|
email: string;
|
|
225
226
|
code: string;
|
|
226
|
-
password: string;
|
|
227
227
|
} | {
|
|
228
228
|
action: 'resend';
|
|
229
229
|
email: string;
|
package/package.json
CHANGED