@odla-ai/chapter 0.25.2 → 0.25.4
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 +35 -6
- package/dist/{chunk-AWBRQH7E.js → chunk-5SWVMJZN.js} +1 -1
- package/dist/chunk-5SWVMJZN.js.map +1 -0
- package/dist/{chunk-GMGTJIY3.js → chunk-WHA3MUDQ.js} +4 -3
- package/dist/chunk-WHA3MUDQ.js.map +1 -0
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +5 -1
- package/dist/ui/admin/index.js +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/ui/member/index.d.ts +2 -1
- package/dist/ui/member/index.js +1 -1
- package/dist/worker/index.cjs +12 -1
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.js +12 -1
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
- package/runbooks/adopt-existing.md +19 -3
- package/runbooks/greenfield.md +6 -6
- package/dist/chunk-AWBRQH7E.js.map +0 -1
- package/dist/chunk-GMGTJIY3.js.map +0 -1
package/dist/ui/admin/index.d.ts
CHANGED
|
@@ -122,7 +122,11 @@ interface AdminShellProps {
|
|
|
122
122
|
/** Configuration for the Clerk-gated, brand-scoped Chapter admin console. */
|
|
123
123
|
interface ChapterAdminProps {
|
|
124
124
|
chapter?: Chapter;
|
|
125
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Replace or transform the standard workspace set. During existing-site
|
|
127
|
+
* adoption, use the transform to preserve a validated host workspace until
|
|
128
|
+
* feature-level parity is proven; matching ids or labels are not parity.
|
|
129
|
+
*/
|
|
126
130
|
workspaces?: AdminWorkspace[] | ((defaults: readonly AdminWorkspace[]) => AdminWorkspace[]);
|
|
127
131
|
/** @deprecated Use workspaces. */
|
|
128
132
|
sections?: AdminSection[];
|
package/dist/ui/admin/index.js
CHANGED
package/dist/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
loadJoinResume,
|
|
14
14
|
timeLabel,
|
|
15
15
|
tzShort
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-WHA3MUDQ.js";
|
|
17
17
|
import {
|
|
18
18
|
AdminNote,
|
|
19
19
|
AdminPage,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
meetingsSection,
|
|
41
41
|
peopleSection,
|
|
42
42
|
useAdminResource
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-5SWVMJZN.js";
|
|
44
44
|
import {
|
|
45
45
|
BrandStyle,
|
|
46
46
|
ChapterCopyProvider,
|
|
@@ -206,7 +206,8 @@ interface JoinIslandProps {
|
|
|
206
206
|
children?: ComponentChildren;
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
/** The signup island. Renders the site's form,
|
|
209
|
+
/** The signup island. Renders the site's form, keeps one application
|
|
210
|
+
* `submissionId` across ambiguous retries, then drives payment (when the
|
|
210
211
|
* chapter charges) and booking (when a calendar is connected) to confirmation. */
|
|
211
212
|
declare function JoinIsland(props: JoinIslandProps): JSX.Element;
|
|
212
213
|
|
package/dist/ui/member/index.js
CHANGED
package/dist/worker/index.cjs
CHANGED
|
@@ -138,6 +138,17 @@ function createWorkerContext(options) {
|
|
|
138
138
|
// src/worker-routes.ts
|
|
139
139
|
var import_crm2 = require("@odla-ai/crm");
|
|
140
140
|
|
|
141
|
+
// src/application-id.ts
|
|
142
|
+
var APPLICATION_ID_DOMAIN = "odla-ai/chapter/application/v1:";
|
|
143
|
+
async function applicationIdForSubmission(submissionId) {
|
|
144
|
+
const input = new TextEncoder().encode(`${APPLICATION_ID_DOMAIN}${submissionId}`);
|
|
145
|
+
const bytes = new Uint8Array(await crypto.subtle.digest("SHA-256", input)).slice(0, 16);
|
|
146
|
+
bytes[6] = bytes[6] & 15 | 128;
|
|
147
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
148
|
+
const hex = [...bytes].map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
149
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
150
|
+
}
|
|
151
|
+
|
|
141
152
|
// src/member.ts
|
|
142
153
|
var EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
143
154
|
function isValidEmail(value) {
|
|
@@ -181,7 +192,7 @@ async function submitApplication(db, chapter, fields, opts) {
|
|
|
181
192
|
if (app.requireDisclaimerAck && !acked) {
|
|
182
193
|
return { ok: false, error: "disclaimerAck is required" };
|
|
183
194
|
}
|
|
184
|
-
const id = opts.newId();
|
|
195
|
+
const id = opts.submissionId ? await applicationIdForSubmission(opts.submissionId) : opts.newId();
|
|
185
196
|
const row = { id, status: chapter.pipeline.initial, createdAt: opts.now };
|
|
186
197
|
for (const f of [...app.required, ...app.optional]) {
|
|
187
198
|
if (typeof fields[f] === "string") row[f] = fields[f].trim();
|