@odla-ai/chapter 0.25.1 → 0.25.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/README.md +41 -8
- package/dist/{chunk-ZPAJL7KG.js → chunk-AWBRQH7E.js} +7 -1
- package/dist/chunk-AWBRQH7E.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 +3 -0
- 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 +54 -23
- package/runbooks/greenfield.md +62 -15
- package/dist/chunk-GMGTJIY3.js.map +0 -1
- package/dist/chunk-ZPAJL7KG.js.map +0 -1
package/dist/ui/admin/index.d.ts
CHANGED
|
@@ -168,6 +168,8 @@ interface CollectionSectionOptions {
|
|
|
168
168
|
lifecycle?: boolean;
|
|
169
169
|
roles?: readonly string[];
|
|
170
170
|
networkSharing?: boolean;
|
|
171
|
+
/** Give the collection list the full workspace width until a record opens. */
|
|
172
|
+
collapseClosedDetail?: boolean;
|
|
171
173
|
lifecycleAdapter?: (CrmLifecycleAdapter | ((ctx: AdminSectionContext) => CrmLifecycleAdapter));
|
|
172
174
|
requireLifecycleAdapter?: boolean;
|
|
173
175
|
renderSummary?: (context: CrmWorkspaceMasterContext, ctx: AdminSectionContext) => ComponentChildren;
|
|
@@ -183,6 +185,7 @@ declare function collectionSection(options: CollectionSectionOptions): AdminSect
|
|
|
183
185
|
declare function peopleSection(options: PeopleSectionOptions & {
|
|
184
186
|
roles?: readonly string[];
|
|
185
187
|
networkSharing?: boolean;
|
|
188
|
+
collapseClosedDetail?: boolean;
|
|
186
189
|
lifecycleAdapter?: CollectionSectionOptions["lifecycleAdapter"];
|
|
187
190
|
requireLifecycleAdapter?: boolean;
|
|
188
191
|
renderSummary?: CollectionSectionOptions["renderSummary"];
|
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-AWBRQH7E.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();
|