@lucern/events 0.3.0-alpha.15 → 0.3.0-alpha.16

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.js CHANGED
@@ -893,6 +893,7 @@ defineTable({
893
893
  shape: z.object({
894
894
  "tenantId": idOf("tenants"),
895
895
  "workspaceId": idOf("workspaces").optional(),
896
+ "environment": z.enum(["dev", "staging", "prod"]).optional(),
896
897
  "keyPrefix": z.enum(["luc", "stk"]),
897
898
  "keyHash": z.string(),
898
899
  "keyHint": z.string(),
@@ -7049,7 +7050,7 @@ function compactRecord2(input) {
7049
7050
  Object.entries(input).filter(([, value]) => value !== void 0)
7050
7051
  );
7051
7052
  }
7052
- var listBeliefsProjection = defineProjection({
7053
+ defineProjection({
7053
7054
  contractName: "list_beliefs",
7054
7055
  inputSchema: listBeliefsInputSchema,
7055
7056
  project: (input) => compactRecord2({
@@ -12353,11 +12354,8 @@ var identityContracts = [
12353
12354
  sdkNamespace: "identity",
12354
12355
  sdkMethod: "whoami",
12355
12356
  summary: "Describe the current gateway principal.",
12356
- convex: {
12357
- module: "identity",
12358
- functionName: "whoami",
12359
- kind: "query",
12360
- inputProjection: withPrincipal
12357
+ gateway: {
12358
+ handler: "identity.whoami"
12361
12359
  }
12362
12360
  }),
12363
12361
  surfaceContract({
@@ -12377,7 +12375,7 @@ var identityContracts = [
12377
12375
  providerProjectId: z.string().min(1).optional()
12378
12376
  }),
12379
12377
  convex: {
12380
- module: "identity",
12378
+ module: "platform",
12381
12379
  functionName: "resolveInteractivePrincipal",
12382
12380
  kind: "query"
12383
12381
  }
@@ -12461,15 +12459,6 @@ var beliefLookupInput = (input) => compactRecord4({
12461
12459
  var beliefNodeInput = (input) => compactRecord4({
12462
12460
  nodeId: input.nodeId ?? input.id ?? input.beliefId
12463
12461
  });
12464
- var beliefTopicInput = (input) => {
12465
- const parsed = listBeliefsProjection.inputSchema.safeParse(input);
12466
- if (!parsed.success) {
12467
- throw new Error(
12468
- `list_beliefs projection input rejected: ${parsed.error.message}`
12469
- );
12470
- }
12471
- return compactRecord4(listBeliefsProjection.project(parsed.data));
12472
- };
12473
12462
  var createBeliefInput = (input, context) => {
12474
12463
  return withUserId(
12475
12464
  compactRecord4({
@@ -12558,11 +12547,8 @@ var beliefsContracts = [
12558
12547
  sdkNamespace: "beliefs",
12559
12548
  sdkMethod: "listBeliefs",
12560
12549
  summary: "List beliefs for a topic.",
12561
- convex: {
12562
- module: "beliefs",
12563
- functionName: "getByTopic",
12564
- kind: "query",
12565
- inputProjection: beliefTopicInput
12550
+ gateway: {
12551
+ handler: "beliefs.list"
12566
12552
  },
12567
12553
  args: listBeliefsInputSchema
12568
12554
  }),
@@ -12747,12 +12733,6 @@ var evidenceIdInput = (input) => compactRecord4({
12747
12733
  insightId: input.insightId,
12748
12734
  nodeId: input.nodeId ?? input.id ?? input.evidenceId
12749
12735
  });
12750
- var evidenceTopicInput = (input) => compactRecord4({
12751
- topicId: input.topicId,
12752
- status: input.status,
12753
- userId: input.userId,
12754
- limit: input.limit
12755
- });
12756
12736
  var createEvidenceInput = (input, context) => {
12757
12737
  const parsed = createEvidenceProjection.inputSchema.safeParse(input);
12758
12738
  if (!parsed.success) {
@@ -12883,11 +12863,8 @@ var evidenceContracts = [
12883
12863
  sdkNamespace: "evidence",
12884
12864
  sdkMethod: "listEvidence",
12885
12865
  summary: "List evidence for a topic.",
12886
- convex: {
12887
- module: "evidence",
12888
- functionName: "getByTopic",
12889
- kind: "query",
12890
- inputProjection: evidenceTopicInput
12866
+ gateway: {
12867
+ handler: "evidence.list"
12891
12868
  }
12892
12869
  }),
12893
12870
  surfaceContract({
@@ -13122,11 +13099,8 @@ var questionsContracts = [
13122
13099
  sdkNamespace: "questions",
13123
13100
  sdkMethod: "listQuestions",
13124
13101
  summary: "List questions for a topic.",
13125
- convex: {
13126
- module: "questions",
13127
- functionName: "getByTopic",
13128
- kind: "query",
13129
- inputProjection: questionTopicInput
13102
+ gateway: {
13103
+ handler: "questions.list"
13130
13104
  }
13131
13105
  }),
13132
13106
  surfaceContract({