@anthusai/papyrus 5.136.0-next.6 → 5.136.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.
@@ -786,7 +786,7 @@ def save_item_draft_action(arguments: dict, actor: str, approved_by: str | None
786
786
  },
787
787
  }
788
788
  if record["status"] == "published" and projection_configured():
789
- published = publish_item(client, record["id"], actor=actor, approved_by=approved_by)
789
+ published = publish_item(client, record["id"], actor=actor, approved_by=approved_by, by_person=approved_by)
790
790
  response["item"]["versionNumber"] = published.version_number
791
791
  response.update(project_item_action(client, record["id"], unpublished=False))
792
792
  return response
@@ -881,7 +881,7 @@ def drain_publish_queue_action() -> dict:
881
881
  return {"ok": True, "scheduled": bool(schedule_projection_task({"task": "drain"}, "batch publish"))}
882
882
 
883
883
 
884
- def publish_item_action(arguments: dict, actor: str, approved_by: str | None = None) -> dict:
884
+ def publish_item_action(arguments: dict, actor: str, approved_by: str | None = None, by_person: str | None = None) -> dict:
885
885
  if arguments.get("jobStatus"):
886
886
  return projection_status_action(arguments)
887
887
  if arguments.get("drain") is True:
@@ -890,7 +890,7 @@ def publish_item_action(arguments: dict, actor: str, approved_by: str | None = N
890
890
  candidate = client.get_record("Item", arguments["id"]) or {}
891
891
  live = client.get_record("PublishedItem", published_item_id_for(candidate.get("lineageId") or arguments["id"]))
892
892
  render_preflight(client, arguments["id"]) # a page the site cannot render is refused before any published data is written
893
- result = publish_item(client, arguments["id"], actor=actor, approved_by=approved_by)
893
+ result = publish_item(client, arguments["id"], actor=actor, approved_by=approved_by, by_person=by_person)
894
894
  response = {
895
895
  "ok": True,
896
896
  "changed": result.changed,
@@ -1168,7 +1168,8 @@ def _handle_field(event):
1168
1168
  if field == "saveItemDraft":
1169
1169
  return save_item_draft_action(arguments, actor, person_from_event(event))
1170
1170
  if field == "publishItem":
1171
- return publish_item_action(arguments, actor, person_from_event(event))
1171
+ person = person_from_event(event)
1172
+ return publish_item_action(arguments, actor, person, person)
1172
1173
  if field == "createStoryFromReference":
1173
1174
  return create_story_from_reference_action(arguments, actor)
1174
1175
  if field == "moveStoryStage":
@@ -882,12 +882,15 @@ export type GuidelinesResolveInput = {
882
882
  section?: string;
883
883
  /** The language of the text the guidelines are for: its overlays (a variant's base language first) are laid over the shared guidelines. Leave it out for the guidelines every language shares. */
884
884
  language?: string;
885
+ /** The channel the text is for (x, linkedin, email): a rule file scoped to channel/<name> is in the answer only for that channel. */
886
+ channel?: string;
885
887
  };
886
888
 
887
889
  export type GuidelinesResolveResult = {
888
890
  kind: string;
889
891
  section?: string;
890
892
  language?: string;
893
+ channel?: string;
891
894
  /** False when the publication has no guidelines of this kind yet. */
892
895
  found: boolean;
893
896
  /** A guideline document of that kind: schemaVersion and the fields the kind allows. */
package/package.json CHANGED
@@ -650,7 +650,7 @@
650
650
  "optional": true
651
651
  }
652
652
  },
653
- "version": "5.136.0-next.6",
653
+ "version": "5.136.0",
654
654
  "dependencies": {
655
655
  "@aws-amplify/adapter-nextjs": "^1.7.3",
656
656
  "@aws-crypto/sha256-js": "5.2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.136.0-next.6",
2
+ "version": "5.136.0",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",