@nautical-commerce/graphql-schema 3.11.0 → 3.12.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.
@@ -395,7 +395,12 @@ type Agreement implements Node {
395
395
 
396
396
  """Returns the items in the list that come after the specified cursor."""
397
397
  last: Int = null
398
- ): AgreementEventCountableConnection!
398
+ ): AgreementEventCountableConnection! @deprecated(reason: "Use `Agreement.timeline` instead. The `events` field only returns Agreement-level pghistory rows; `timeline` returns a unified feed across Agreement, AgreementCommission, AgreementFees, and AgreementSellers.")
399
+
400
+ """
401
+ Unified change-history feed for this agreement. Combines events from Agreement, AgreementCommission, AgreementFees, and AgreementSellers, projected into a normalized TimelineEntry shape. Ordered most-recent-first. Optional `kinds` argument filters the included sources server-side.
402
+ """
403
+ timeline(kinds: [TimelineEntryKind!] = null): [TimelineEntry!]!
399
404
  }
400
405
 
401
406
  """Result of agreement bulk delete mutation."""
@@ -6140,6 +6145,35 @@ enum FeeType {
6140
6145
  FIXED
6141
6146
  }
6142
6147
 
6148
+ type FieldChange {
6149
+ """Raw Python field name, e.g. 'default_commission'."""
6150
+ field: String!
6151
+
6152
+ """Humanized label, e.g. 'Default Commission'."""
6153
+ fieldLabel: String!
6154
+
6155
+ """Previous value as JSON. Null for create events."""
6156
+ fromValue: JSONString
6157
+
6158
+ """New value as JSON. Null for delete events."""
6159
+ toValue: JSONString
6160
+
6161
+ """Semantic type hint for client-side formatting."""
6162
+ valueType: FieldValueType!
6163
+ }
6164
+
6165
+ enum FieldValueType {
6166
+ PERCENTAGE
6167
+ MONEY
6168
+ STRING
6169
+ DATE
6170
+ DATETIME
6171
+ ENUM
6172
+ BOOLEAN
6173
+ JSON
6174
+ NUMBER
6175
+ }
6176
+
6143
6177
  """Represents a file."""
6144
6178
  type File {
6145
6179
  """The URL of the file."""
@@ -11150,6 +11184,11 @@ type Order implements Node & ObjectWithMetadata {
11150
11184
  last: Int = null
11151
11185
  ): OrderAuditEventCountableConnection!
11152
11186
 
11187
+ """
11188
+ Unified change-history feed for this order. Combines pghistory events from Order (status/total/shipping changes), OrderLine (line additions/updates/removals), and Fulfillment (status, tracking) into a single TimelineEntry list ordered most-recent-first. Mirrors the Agreement timeline pattern. Optional `kinds` argument filters server-side.
11189
+ """
11190
+ timeline(kinds: [TimelineEntryKind!] = null): [TimelineEntry!]!
11191
+
11153
11192
  """List of fees for this order"""
11154
11193
  fees: [OrderFee!]!
11155
11194
 
@@ -20730,6 +20769,92 @@ type TimeSeriesDataPoint {
20730
20769
  label: String
20731
20770
  }
20732
20771
 
20772
+ type TimelineActor {
20773
+ type: TimelineActorType!
20774
+
20775
+ """
20776
+ Display name for the actor (user email, app name, task name, or 'Anonymous').
20777
+ """
20778
+ label: String!
20779
+
20780
+ """Email when actor is a user."""
20781
+ email: String
20782
+
20783
+ """
20784
+ Global ID for the actor's settings page (user_id or app_id). The dashboard uses this to deep-link from the timeline row.
20785
+ """
20786
+ linkTargetId: String
20787
+ }
20788
+
20789
+ enum TimelineActorType {
20790
+ USER
20791
+ APP
20792
+ TASK
20793
+ ANONYMOUS
20794
+ }
20795
+
20796
+ type TimelineEntry {
20797
+ """
20798
+ Composite ID: '<kind>:<pgh_id>'. Stable per source event but not globally addressable via the Node interface.
20799
+ """
20800
+ id: ID!
20801
+ timestamp: DateTime!
20802
+ kind: TimelineEntryKind!
20803
+ action: TimelineEntryAction!
20804
+
20805
+ """
20806
+ Original pghistory label (e.g. 'commission_added'). Preserved alongside `action` for domain-specific UX.
20807
+ """
20808
+ rawLabel: String!
20809
+
20810
+ """
20811
+ Server-formatted human-readable message, e.g. 'Granular commission for Seller "Acme" updated'. Pre-rendered to keep the frontend generic.
20812
+ """
20813
+ summary: String!
20814
+ actor: TimelineActor!
20815
+
20816
+ """Child object affected. Null when the event IS the primary entity."""
20817
+ target: TimelineTarget
20818
+
20819
+ """
20820
+ Field-level diff. Empty for non-update events or when no fields changed.
20821
+ """
20822
+ changes: [FieldChange!]!
20823
+
20824
+ """Full snapshot at event time. Escape hatch for power users / debugging."""
20825
+ rawSnapshot: JSONString!
20826
+
20827
+ """Full diff dict {field: [old, new]}. Null for create/delete events."""
20828
+ rawDiff: JSONString
20829
+ }
20830
+
20831
+ enum TimelineEntryAction {
20832
+ CREATED
20833
+ UPDATED
20834
+ DELETED
20835
+ }
20836
+
20837
+ enum TimelineEntryKind {
20838
+ AGREEMENT
20839
+ AGREEMENT_COMMISSION
20840
+ AGREEMENT_FEE
20841
+ AGREEMENT_SELLER
20842
+ ORDER
20843
+ ORDER_LINE
20844
+ FULFILLMENT
20845
+ }
20846
+
20847
+ type TimelineTarget {
20848
+ """Lowercase model name, e.g. 'seller', 'product', 'category'."""
20849
+ type: String!
20850
+
20851
+ """Human-readable identifier (name, title, etc)."""
20852
+ label: String!
20853
+
20854
+ """Global ID for navigation. Null when no detail page exists."""
20855
+ linkTargetId: String
20856
+ }
20857
+
20733
20858
  """Result of token create mutation."""
20734
20859
  type TokenCreate {
20735
20860
  """JWT token for authentication."""
@@ -20810,15 +20935,15 @@ type Transaction implements Node {
20810
20935
  """Transaction token."""
20811
20936
  token: String!
20812
20937
 
20813
- """Transaction kind (auth, capture, void, refund)."""
20814
- kind: String!
20815
-
20816
20938
  """Whether the transaction was successful."""
20817
20939
  isSuccess: Boolean!
20818
20940
 
20819
20941
  """Error message if transaction failed."""
20820
20942
  error: String
20821
20943
 
20944
+ """The kind of the transaction."""
20945
+ kind: TransactionKind!
20946
+
20822
20947
  """The payment associated with this transaction."""
20823
20948
  payment: Payment!
20824
20949
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nautical-commerce/graphql-schema",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Traide API GraphQL Schema",
5
5
  "main": "./nautical/schema.graphql",
6
6
  "scripts": {