@semiont/backend 0.5.0 → 0.5.2

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
@@ -11978,7 +11978,7 @@ var openapi_default = {
11978
11978
  },
11979
11979
  EntityTypeAddedPayload: {
11980
11980
  type: "object",
11981
- description: "Payload for mark:entity-type-added domain event",
11981
+ description: "Payload for frame:entity-type-added domain event (system-level, no resourceId \u2014 fan-out is global)",
11982
11982
  properties: {
11983
11983
  entityType: {
11984
11984
  type: "string"
@@ -15006,9 +15006,9 @@ var openapi_default = {
15006
15006
  "byCategory"
15007
15007
  ]
15008
15008
  },
15009
- MarkAddEntityTypeCommand: {
15009
+ FrameAddEntityTypeCommand: {
15010
15010
  type: "object",
15011
- description: "Bus command to add a new entity type tag.",
15011
+ description: "Bus command to add a new entity type to the KB's vocabulary. Carried on the `frame:add-entity-type` channel \u2014 Frame is the schema-layer flow that owns vocabulary writes.",
15012
15012
  properties: {
15013
15013
  tag: {
15014
15014
  type: "string"
@@ -15565,6 +15565,10 @@ var openapi_default = {
15565
15565
  correlationId: {
15566
15566
  type: "string"
15567
15567
  },
15568
+ _userId: {
15569
+ type: "string",
15570
+ description: "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
15571
+ },
15568
15572
  token: {
15569
15573
  type: "string"
15570
15574
  },
@@ -15574,9 +15578,6 @@ var openapi_default = {
15574
15578
  content: {
15575
15579
  type: "string"
15576
15580
  },
15577
- userId: {
15578
- type: "string"
15579
- },
15580
15581
  archiveOriginal: {
15581
15582
  type: "boolean"
15582
15583
  }
@@ -15585,8 +15586,7 @@ var openapi_default = {
15585
15586
  "correlationId",
15586
15587
  "token",
15587
15588
  "name",
15588
- "content",
15589
- "userId"
15589
+ "content"
15590
15590
  ]
15591
15591
  },
15592
15592
  YieldCloneCreated: {
@@ -17582,7 +17582,18 @@ var securityHeaders = () => {
17582
17582
  "max-age=31536000; includeSubDomains"
17583
17583
  );
17584
17584
  }
17585
- const csp = [
17585
+ const isSwaggerUi = c.req.path === "/api/docs" || c.req.path === "/api/swagger";
17586
+ const csp = isSwaggerUi ? [
17587
+ "default-src 'none'",
17588
+ "script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
17589
+ "style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
17590
+ "img-src 'self' data: https://cdn.jsdelivr.net",
17591
+ "font-src 'self' https://cdn.jsdelivr.net",
17592
+ "connect-src 'self'",
17593
+ "frame-ancestors 'none'",
17594
+ "base-uri 'self'",
17595
+ "form-action 'none'"
17596
+ ].join("; ") : [
17586
17597
  "default-src 'none'",
17587
17598
  // Block everything by default
17588
17599
  "frame-ancestors 'none'",