@odla-ai/chapter 0.8.0 → 0.9.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 +25 -9
- package/dist/chunk-YO6DY5DL.js +281 -0
- package/dist/chunk-YO6DY5DL.js.map +1 -0
- package/dist/chunk-ZCZK6QLC.js +537 -0
- package/dist/chunk-ZCZK6QLC.js.map +1 -0
- package/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -14
- package/dist/index.d.ts +23 -14
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +71 -0
- package/dist/ui/admin/index.js +9 -0
- package/dist/ui/admin/index.js.map +1 -0
- package/dist/ui/index.d.ts +4 -219
- package/dist/ui/index.js +20 -795
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/member/index.d.ts +152 -0
- package/dist/ui/member/index.js +33 -0
- package/dist/ui/member/index.js.map +1 -0
- package/dist/worker/index.cjs +7 -4
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.js +7 -4
- package/dist/worker/index.js.map +1 -1
- package/package.json +9 -1
package/dist/index.cjs
CHANGED
|
@@ -848,13 +848,15 @@ async function projectApplicant(deps, applicant) {
|
|
|
848
848
|
}
|
|
849
849
|
|
|
850
850
|
// src/clerk.ts
|
|
851
|
+
var heal = (status) => status === 422 ? { ok: true, status, existed: true } : { ok: false, status };
|
|
851
852
|
function clerkInviteRequest(input) {
|
|
852
853
|
return {
|
|
853
854
|
path: "/v1/invitations",
|
|
854
855
|
body: {
|
|
855
856
|
email_address: input.email,
|
|
856
857
|
notify: true,
|
|
857
|
-
...input.redirectUrl ? { redirect_url: input.redirectUrl } : {}
|
|
858
|
+
...input.redirectUrl ? { redirect_url: input.redirectUrl } : {},
|
|
859
|
+
...input.publicMetadata ? { public_metadata: input.publicMetadata } : {}
|
|
858
860
|
}
|
|
859
861
|
};
|
|
860
862
|
}
|
|
@@ -865,7 +867,7 @@ async function createClerkInvitation(secretKey, input, fetchImpl = fetch) {
|
|
|
865
867
|
headers: { authorization: `Bearer ${secretKey}`, "content-type": "application/json" },
|
|
866
868
|
body: JSON.stringify(body)
|
|
867
869
|
});
|
|
868
|
-
return { ok:
|
|
870
|
+
return res.ok ? { ok: true, status: res.status } : heal(res.status);
|
|
869
871
|
}
|
|
870
872
|
function clerkUserRequest(input) {
|
|
871
873
|
return {
|
|
@@ -874,7 +876,8 @@ function clerkUserRequest(input) {
|
|
|
874
876
|
email_address: [input.email],
|
|
875
877
|
skip_password_requirement: true,
|
|
876
878
|
...input.firstName ? { first_name: input.firstName } : {},
|
|
877
|
-
...input.lastName ? { last_name: input.lastName } : {}
|
|
879
|
+
...input.lastName ? { last_name: input.lastName } : {},
|
|
880
|
+
...input.publicMetadata ? { public_metadata: input.publicMetadata } : {}
|
|
878
881
|
}
|
|
879
882
|
};
|
|
880
883
|
}
|
|
@@ -885,7 +888,7 @@ async function createClerkUser(secretKey, input, fetchImpl = fetch) {
|
|
|
885
888
|
headers: { authorization: `Bearer ${secretKey}`, "content-type": "application/json" },
|
|
886
889
|
body: JSON.stringify(body)
|
|
887
890
|
});
|
|
888
|
-
return { ok:
|
|
891
|
+
return res.ok ? { ok: true, status: res.status } : heal(res.status);
|
|
889
892
|
}
|
|
890
893
|
|
|
891
894
|
// src/session.ts
|