@odla-ai/chapter 0.13.0 → 0.14.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/dist/index.cjs +67 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -1
- package/dist/index.d.ts +69 -1
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -859,6 +859,74 @@ declare function clerkListUsers(secretKey: string, fetchImpl?: typeof fetch): Pr
|
|
|
859
859
|
* it leaves a separately-written `profile` untouched. Returns whether it stuck. */
|
|
860
860
|
declare function clerkSetRole(secretKey: string, id: string, role: string, fetchImpl?: typeof fetch): Promise<boolean>;
|
|
861
861
|
|
|
862
|
+
/** Which auth mode a secret is required for: `"client"` (publishable key only) or
|
|
863
|
+
* `"full"` (server-side profile/role reads + writes, needing the vault secret). */
|
|
864
|
+
type SecretMode = "client" | "full";
|
|
865
|
+
/** A configuration value the capability needs (e.g. the publishable key). */
|
|
866
|
+
interface IntegrationSetting {
|
|
867
|
+
key: string;
|
|
868
|
+
description: string;
|
|
869
|
+
/** Safe to ship to the browser? (publishable keys are; secrets are not). */
|
|
870
|
+
public: boolean;
|
|
871
|
+
/** Expected value shape, e.g. a "pk_" prefix. */
|
|
872
|
+
pattern?: string;
|
|
873
|
+
/** Stored per environment (dev/prod)? */
|
|
874
|
+
perEnv: boolean;
|
|
875
|
+
/** Where the value is stored and read from. */
|
|
876
|
+
source: string;
|
|
877
|
+
}
|
|
878
|
+
/** A secret the capability needs, held in the tenant vault. */
|
|
879
|
+
interface IntegrationSecret {
|
|
880
|
+
key: string;
|
|
881
|
+
description: string;
|
|
882
|
+
pattern?: string;
|
|
883
|
+
/** Auth mode that requires this secret ("full" pulls user profiles). */
|
|
884
|
+
mode: SecretMode;
|
|
885
|
+
/** Stored in the tenant vault (never in graph rows or wrangler vars)? */
|
|
886
|
+
vault: boolean;
|
|
887
|
+
}
|
|
888
|
+
/** One data-sync contract. A capability may declare several (e.g. an inbound
|
|
889
|
+
* webhook mirror AND an outbound write), so {@link IntegrationDescriptor.syncs}
|
|
890
|
+
* is a list. The mechanism is declared, not reimplemented here. */
|
|
891
|
+
interface IntegrationSync {
|
|
892
|
+
engine: string;
|
|
893
|
+
direction: "provider->odla" | "odla->provider" | "bidirectional";
|
|
894
|
+
entity: string;
|
|
895
|
+
fields: string[];
|
|
896
|
+
webhook?: string;
|
|
897
|
+
onDelete?: string;
|
|
898
|
+
}
|
|
899
|
+
/** The provisioning split: human, CLI, and doctor-assertable steps. */
|
|
900
|
+
interface IntegrationProvision {
|
|
901
|
+
/** Steps a human performs (out-of-band, e.g. in the Clerk dashboard). */
|
|
902
|
+
human: string[];
|
|
903
|
+
/** Steps the odla CLI automates. */
|
|
904
|
+
cli: string[];
|
|
905
|
+
/** Checks `odla doctor` should assert. */
|
|
906
|
+
doctor: string[];
|
|
907
|
+
}
|
|
908
|
+
/** Documentation-as-data for a provider capability, consumed by the odla CLI,
|
|
909
|
+
* `odla doctor`, and the docs. */
|
|
910
|
+
interface IntegrationDescriptor {
|
|
911
|
+
id: string;
|
|
912
|
+
title: string;
|
|
913
|
+
npm: string;
|
|
914
|
+
settings: IntegrationSetting[];
|
|
915
|
+
secrets: IntegrationSecret[];
|
|
916
|
+
/** Every data-sync contract the capability declares, each with its direction. */
|
|
917
|
+
syncs: IntegrationSync[];
|
|
918
|
+
provision: IntegrationProvision;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* The concrete {@link IntegrationDescriptor} for the Clerk capability. Declares
|
|
922
|
+
* the one public `setting` (the `pk_*` publishable key, served to the SPA), the
|
|
923
|
+
* `secrets` auth mode `"full"` needs in the tenant vault, BOTH sync directions —
|
|
924
|
+
* the inbound `$users` webhook mirror (`provider->odla`) and the outbound
|
|
925
|
+
* role/profile write via `clerk_secret_key` (`odla->provider`, chapter's
|
|
926
|
+
* `clerk.ts`) — and the `provision` split. Data only; it performs none of it.
|
|
927
|
+
*/
|
|
928
|
+
declare const clerkIntegration: IntegrationDescriptor;
|
|
929
|
+
|
|
862
930
|
/** An application row, as far as the session cares about it. */
|
|
863
931
|
interface ApplicationRecord {
|
|
864
932
|
id: string;
|
|
@@ -1097,4 +1165,4 @@ type ApplicationBookingPatch = {
|
|
|
1097
1165
|
* already there (never backward). */
|
|
1098
1166
|
declare function applicationBookingUpdate(currentStatus: string, startAt: number, htmlLink?: string | null): ApplicationBookingPatch;
|
|
1099
1167
|
|
|
1100
|
-
export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterScheduling, type ChapterSends, type ClerkInviteInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type JoinConfigGroup, type LiveEvent, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretStore, type SessionUser, type SharedPerson, type StripeEvent, type SubmitResult, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, bookingDecision, brandTokens, buildGroupSeed, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, firstPaymentPatch, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, normalizeWebhookEvent, paymentsReady, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolvePipeline, resolveScheduling, roleFromClaim, sendTemplated, sharedPersonInput, slotWindow, stageIndex, stripeForm, submitApplication, subscriptionIdempotencyKey, validateScheduling, verifyStripeSignature, webhookMutationId };
|
|
1168
|
+
export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterScheduling, type ChapterSends, type ClerkInviteInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type IntegrationDescriptor, type IntegrationProvision, type IntegrationSecret, type IntegrationSetting, type IntegrationSync, type JoinConfigGroup, type LiveEvent, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretMode, type SecretStore, type SessionUser, type SharedPerson, type StripeEvent, type SubmitResult, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, bookingDecision, brandTokens, buildGroupSeed, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkIntegration, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, firstPaymentPatch, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, normalizeWebhookEvent, paymentsReady, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolvePipeline, resolveScheduling, roleFromClaim, sendTemplated, sharedPersonInput, slotWindow, stageIndex, stripeForm, submitApplication, subscriptionIdempotencyKey, validateScheduling, verifyStripeSignature, webhookMutationId };
|
package/dist/index.d.ts
CHANGED
|
@@ -859,6 +859,74 @@ declare function clerkListUsers(secretKey: string, fetchImpl?: typeof fetch): Pr
|
|
|
859
859
|
* it leaves a separately-written `profile` untouched. Returns whether it stuck. */
|
|
860
860
|
declare function clerkSetRole(secretKey: string, id: string, role: string, fetchImpl?: typeof fetch): Promise<boolean>;
|
|
861
861
|
|
|
862
|
+
/** Which auth mode a secret is required for: `"client"` (publishable key only) or
|
|
863
|
+
* `"full"` (server-side profile/role reads + writes, needing the vault secret). */
|
|
864
|
+
type SecretMode = "client" | "full";
|
|
865
|
+
/** A configuration value the capability needs (e.g. the publishable key). */
|
|
866
|
+
interface IntegrationSetting {
|
|
867
|
+
key: string;
|
|
868
|
+
description: string;
|
|
869
|
+
/** Safe to ship to the browser? (publishable keys are; secrets are not). */
|
|
870
|
+
public: boolean;
|
|
871
|
+
/** Expected value shape, e.g. a "pk_" prefix. */
|
|
872
|
+
pattern?: string;
|
|
873
|
+
/** Stored per environment (dev/prod)? */
|
|
874
|
+
perEnv: boolean;
|
|
875
|
+
/** Where the value is stored and read from. */
|
|
876
|
+
source: string;
|
|
877
|
+
}
|
|
878
|
+
/** A secret the capability needs, held in the tenant vault. */
|
|
879
|
+
interface IntegrationSecret {
|
|
880
|
+
key: string;
|
|
881
|
+
description: string;
|
|
882
|
+
pattern?: string;
|
|
883
|
+
/** Auth mode that requires this secret ("full" pulls user profiles). */
|
|
884
|
+
mode: SecretMode;
|
|
885
|
+
/** Stored in the tenant vault (never in graph rows or wrangler vars)? */
|
|
886
|
+
vault: boolean;
|
|
887
|
+
}
|
|
888
|
+
/** One data-sync contract. A capability may declare several (e.g. an inbound
|
|
889
|
+
* webhook mirror AND an outbound write), so {@link IntegrationDescriptor.syncs}
|
|
890
|
+
* is a list. The mechanism is declared, not reimplemented here. */
|
|
891
|
+
interface IntegrationSync {
|
|
892
|
+
engine: string;
|
|
893
|
+
direction: "provider->odla" | "odla->provider" | "bidirectional";
|
|
894
|
+
entity: string;
|
|
895
|
+
fields: string[];
|
|
896
|
+
webhook?: string;
|
|
897
|
+
onDelete?: string;
|
|
898
|
+
}
|
|
899
|
+
/** The provisioning split: human, CLI, and doctor-assertable steps. */
|
|
900
|
+
interface IntegrationProvision {
|
|
901
|
+
/** Steps a human performs (out-of-band, e.g. in the Clerk dashboard). */
|
|
902
|
+
human: string[];
|
|
903
|
+
/** Steps the odla CLI automates. */
|
|
904
|
+
cli: string[];
|
|
905
|
+
/** Checks `odla doctor` should assert. */
|
|
906
|
+
doctor: string[];
|
|
907
|
+
}
|
|
908
|
+
/** Documentation-as-data for a provider capability, consumed by the odla CLI,
|
|
909
|
+
* `odla doctor`, and the docs. */
|
|
910
|
+
interface IntegrationDescriptor {
|
|
911
|
+
id: string;
|
|
912
|
+
title: string;
|
|
913
|
+
npm: string;
|
|
914
|
+
settings: IntegrationSetting[];
|
|
915
|
+
secrets: IntegrationSecret[];
|
|
916
|
+
/** Every data-sync contract the capability declares, each with its direction. */
|
|
917
|
+
syncs: IntegrationSync[];
|
|
918
|
+
provision: IntegrationProvision;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* The concrete {@link IntegrationDescriptor} for the Clerk capability. Declares
|
|
922
|
+
* the one public `setting` (the `pk_*` publishable key, served to the SPA), the
|
|
923
|
+
* `secrets` auth mode `"full"` needs in the tenant vault, BOTH sync directions —
|
|
924
|
+
* the inbound `$users` webhook mirror (`provider->odla`) and the outbound
|
|
925
|
+
* role/profile write via `clerk_secret_key` (`odla->provider`, chapter's
|
|
926
|
+
* `clerk.ts`) — and the `provision` split. Data only; it performs none of it.
|
|
927
|
+
*/
|
|
928
|
+
declare const clerkIntegration: IntegrationDescriptor;
|
|
929
|
+
|
|
862
930
|
/** An application row, as far as the session cares about it. */
|
|
863
931
|
interface ApplicationRecord {
|
|
864
932
|
id: string;
|
|
@@ -1097,4 +1165,4 @@ type ApplicationBookingPatch = {
|
|
|
1097
1165
|
* already there (never backward). */
|
|
1098
1166
|
declare function applicationBookingUpdate(currentStatus: string, startAt: number, htmlLink?: string | null): ApplicationBookingPatch;
|
|
1099
1167
|
|
|
1100
|
-
export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterScheduling, type ChapterSends, type ClerkInviteInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type JoinConfigGroup, type LiveEvent, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretStore, type SessionUser, type SharedPerson, type StripeEvent, type SubmitResult, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, bookingDecision, brandTokens, buildGroupSeed, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, firstPaymentPatch, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, normalizeWebhookEvent, paymentsReady, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolvePipeline, resolveScheduling, roleFromClaim, sendTemplated, sharedPersonInput, slotWindow, stageIndex, stripeForm, submitApplication, subscriptionIdempotencyKey, validateScheduling, verifyStripeSignature, webhookMutationId };
|
|
1168
|
+
export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterScheduling, type ChapterSends, type ClerkInviteInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type IntegrationDescriptor, type IntegrationProvision, type IntegrationSecret, type IntegrationSetting, type IntegrationSync, type JoinConfigGroup, type LiveEvent, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretMode, type SecretStore, type SessionUser, type SharedPerson, type StripeEvent, type SubmitResult, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, bookingDecision, brandTokens, buildGroupSeed, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkIntegration, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, firstPaymentPatch, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, normalizeWebhookEvent, paymentsReady, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolvePipeline, resolveScheduling, roleFromClaim, sendTemplated, sharedPersonInput, slotWindow, stageIndex, stripeForm, submitApplication, subscriptionIdempotencyKey, validateScheduling, verifyStripeSignature, webhookMutationId };
|
package/dist/index.js
CHANGED
|
@@ -930,6 +930,72 @@ async function clerkSetRole(secretKey, id2, role, fetchImpl = fetch) {
|
|
|
930
930
|
return res.ok;
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
+
// src/clerk-integration.ts
|
|
934
|
+
var clerkIntegration = {
|
|
935
|
+
id: "clerk",
|
|
936
|
+
title: "Clerk end-user auth",
|
|
937
|
+
npm: "@odla-ai/chapter",
|
|
938
|
+
settings: [
|
|
939
|
+
{
|
|
940
|
+
key: "publishableKey",
|
|
941
|
+
description: "Clerk publishable key (pk_*). Public by design; served to the SPA (loads clerk-js from Clerk's CDN via @odla-ai/auth-clerk).",
|
|
942
|
+
public: true,
|
|
943
|
+
pattern: "pk_",
|
|
944
|
+
perEnv: true,
|
|
945
|
+
source: "apps-registry auth[env].publishableKey (from odla.config.mjs auth.clerk.<env>)"
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
secrets: [
|
|
949
|
+
{
|
|
950
|
+
key: "CLERK_WEBHOOK_SECRET",
|
|
951
|
+
description: "Svix signing secret for Clerk user webhooks \u2014 verifies $users sync events.",
|
|
952
|
+
pattern: "whsec_",
|
|
953
|
+
mode: "full",
|
|
954
|
+
vault: true
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
key: "clerk_secret_key",
|
|
958
|
+
description: "Clerk backend key (sk_*) \u2014 powers the odla->Clerk writes (account create, role + profile via public_metadata) and lets odla-db resolve user email/name via the Clerk API.",
|
|
959
|
+
pattern: "sk_",
|
|
960
|
+
mode: "full",
|
|
961
|
+
vault: true
|
|
962
|
+
}
|
|
963
|
+
],
|
|
964
|
+
syncs: [
|
|
965
|
+
{
|
|
966
|
+
engine: "@odla-ai/db $users (Clerk webhook -> tenant graph)",
|
|
967
|
+
direction: "provider->odla",
|
|
968
|
+
entity: "$users",
|
|
969
|
+
// Matches the webhook mapper: the mirror carries id + primary email + name + avatar.
|
|
970
|
+
fields: ["id", "email", "name", "imageUrl"],
|
|
971
|
+
webhook: "whsec_ (svix-signed)",
|
|
972
|
+
onDelete: "tombstone (never row-delete)"
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
engine: "@odla-ai/chapter clerk.ts (Clerk Backend API via vault clerk_secret_key)",
|
|
976
|
+
direction: "odla->provider",
|
|
977
|
+
entity: "clerk user",
|
|
978
|
+
// Separate merge-PATCHes so a role write never clobbers a profile write.
|
|
979
|
+
fields: ["public_metadata.role", "public_metadata.profile"],
|
|
980
|
+
onDelete: "n/a (writes only)"
|
|
981
|
+
}
|
|
982
|
+
],
|
|
983
|
+
provision: {
|
|
984
|
+
human: [
|
|
985
|
+
"Run `npx clerk auth login` \u2014 the one interactive step; the agent then creates + configures the Clerk app with the Clerk CLI (no pk_ to hand-paste).",
|
|
986
|
+
'For auth mode "full": create the Clerk user-sync webhook and store its whsec_, plus the sk_ as clerk_secret_key, in the tenant vault (Studio, write-only).'
|
|
987
|
+
],
|
|
988
|
+
cli: [
|
|
989
|
+
"Clerk CLI (`npx clerk apps create/link/config patch`) creates + configures the instance and pulls the pk_.",
|
|
990
|
+
"odla `provision` records it: setAuth(env, publishableKey) -> apps-registry (issuer/JWKS derived from the key)."
|
|
991
|
+
],
|
|
992
|
+
doctor: [
|
|
993
|
+
"registry auth[env] present when the app mounts <SignIn>?",
|
|
994
|
+
'auth mode "full" => whsec_ and clerk_secret_key present in the tenant vault?'
|
|
995
|
+
]
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
|
|
933
999
|
// src/session.ts
|
|
934
1000
|
function applicationSummary(app) {
|
|
935
1001
|
return {
|
|
@@ -1149,6 +1215,7 @@ export {
|
|
|
1149
1215
|
clampArray,
|
|
1150
1216
|
clerkGetUser,
|
|
1151
1217
|
clerkGetUserByEmail,
|
|
1218
|
+
clerkIntegration,
|
|
1152
1219
|
clerkInviteRequest,
|
|
1153
1220
|
clerkListUsers,
|
|
1154
1221
|
clerkSetRole,
|