@nautical-commerce/graphql-schema 3.11.0 → 3.12.1

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."""
@@ -2590,6 +2595,96 @@ type BulkStockError {
2590
2595
  index: Int
2591
2596
  }
2592
2597
 
2598
+ """Result of the bundleCreate mutation."""
2599
+ type BundleCreate {
2600
+ product: Product
2601
+ productErrors: [ProductError!]!
2602
+ }
2603
+
2604
+ """Fields required to create a product bundle."""
2605
+ input BundleCreateInput {
2606
+ """Bundle display name."""
2607
+ name: String!
2608
+
2609
+ """URL slug. Auto-generated from name when omitted."""
2610
+ slug: String = null
2611
+
2612
+ """
2613
+ Seller that owns this bundle. Defaults to the caller's seller for non-MPO users. MPO must provide this field.
2614
+ """
2615
+ seller: ID = null
2616
+
2617
+ """Fixed bundle price (the customer-facing amount)."""
2618
+ price: PositiveDecimal!
2619
+
2620
+ """Bundle currency. Defaults to the seller's default currency."""
2621
+ currency: String = null
2622
+
2623
+ """SKU for the bundle's sellable variant."""
2624
+ sku: String = null
2625
+
2626
+ """Whether the bundle is immediately published."""
2627
+ isPublished: Boolean! = false
2628
+
2629
+ """
2630
+ List of component variants composing the bundle. Must contain at least 2 components.
2631
+ """
2632
+ components: [BundleItemInput!]!
2633
+ }
2634
+
2635
+ """Result of the bundleDelete mutation."""
2636
+ type BundleDelete {
2637
+ product: Product
2638
+ productErrors: [ProductError!]!
2639
+ }
2640
+
2641
+ """
2642
+ A single component within a product bundle: how many of one ProductVariant are included in the bundle. SPEC-020 Feature 2.
2643
+ """
2644
+ type BundleItem implements Node {
2645
+ """The Globally Unique ID of this object"""
2646
+ id: ID!
2647
+
2648
+ """How many units of this component are included per bundle."""
2649
+ quantity: Int!
2650
+
2651
+ """Display order of this component within the bundle."""
2652
+ sortOrder: Int
2653
+
2654
+ """The component variant this entry refers to."""
2655
+ componentVariant: ProductVariant!
2656
+ }
2657
+
2658
+ """A single component slot within a bundle."""
2659
+ input BundleItemInput {
2660
+ """Global ID of the ProductVariant included as a component."""
2661
+ componentVariantId: ID!
2662
+
2663
+ """How many units of this component are included per bundle. Must be ≥ 1."""
2664
+ quantity: Int! = 1
2665
+
2666
+ """Display order of this component within the bundle."""
2667
+ sortOrder: Int = null
2668
+ }
2669
+
2670
+ """Result of the bundleUpdate mutation."""
2671
+ type BundleUpdate {
2672
+ product: Product
2673
+ productErrors: [ProductError!]!
2674
+ }
2675
+
2676
+ """Fields for updating a product bundle."""
2677
+ input BundleUpdateInput {
2678
+ name: String = null
2679
+ price: PositiveDecimal = null
2680
+ isPublished: Boolean = null
2681
+
2682
+ """
2683
+ Optional replacement set of components. When provided, replaces the current component set entirely (atomic). Omit to keep components unchanged.
2684
+ """
2685
+ components: [BundleItemInput!] = null
2686
+ }
2687
+
2593
2688
  """CSV file metadata extracted during parsing."""
2594
2689
  type CSVMetadata {
2595
2690
  """Column headers from the CSV"""
@@ -6140,6 +6235,35 @@ enum FeeType {
6140
6235
  FIXED
6141
6236
  }
6142
6237
 
6238
+ type FieldChange {
6239
+ """Raw Python field name, e.g. 'default_commission'."""
6240
+ field: String!
6241
+
6242
+ """Humanized label, e.g. 'Default Commission'."""
6243
+ fieldLabel: String!
6244
+
6245
+ """Previous value as JSON. Null for create events."""
6246
+ fromValue: JSONString
6247
+
6248
+ """New value as JSON. Null for delete events."""
6249
+ toValue: JSONString
6250
+
6251
+ """Semantic type hint for client-side formatting."""
6252
+ valueType: FieldValueType!
6253
+ }
6254
+
6255
+ enum FieldValueType {
6256
+ PERCENTAGE
6257
+ MONEY
6258
+ STRING
6259
+ DATE
6260
+ DATETIME
6261
+ ENUM
6262
+ BOOLEAN
6263
+ JSON
6264
+ NUMBER
6265
+ }
6266
+
6143
6267
  """Represents a file."""
6144
6268
  type File {
6145
6269
  """The URL of the file."""
@@ -8460,13 +8584,19 @@ type Mutation {
8460
8584
  """Publish pages."""
8461
8585
  pageBulkPublish(ids: [ID!]!, isPublished: Boolean!): PageBulkPublish!
8462
8586
 
8463
- """Creates a new policy."""
8587
+ """
8588
+ Creates a new policy. MPO staff with MANAGE_STOREFRONTS may create policies for any seller or marketplace-level (seller=null); seller users may create policies only for their own seller.
8589
+ """
8464
8590
  policyCreate(input: PolicyInput!): PolicyCreate!
8465
8591
 
8466
- """Updates an existing policy."""
8592
+ """
8593
+ Updates an existing policy. Seller users may update only their own policies; MPO staff may update any policy. Reassigning ownership (changing seller) requires MANAGE_STOREFRONTS.
8594
+ """
8467
8595
  policyUpdate(id: ID!, input: PolicyInput!): PolicyUpdate!
8468
8596
 
8469
- """Deletes a policy."""
8597
+ """
8598
+ Deletes a policy. Seller users may delete only their own policies; MPO staff may delete any policy.
8599
+ """
8470
8600
  policyDelete(id: ID!): PolicyDelete!
8471
8601
 
8472
8602
  """Deletes policies."""
@@ -9236,6 +9366,17 @@ type Mutation {
9236
9366
  """Creates a download URL for digital content."""
9237
9367
  digitalContentUrlCreate(input: DigitalContentUrlCreateInput!): DigitalContentUrlCreate!
9238
9368
 
9369
+ """
9370
+ Create a product bundle. Builds a Product flagged is_bundle=True + its single sellable ProductVariant + BundleItem rows for each component, all in one transaction.
9371
+ """
9372
+ bundleCreate(input: BundleCreateInput!): BundleCreate!
9373
+
9374
+ """Update an existing bundle (name, price, components, is_published)."""
9375
+ bundleUpdate(id: ID!, input: BundleUpdateInput!): BundleUpdate!
9376
+
9377
+ """Delete a bundle product. Cascades to its variant and BundleItems."""
9378
+ bundleDelete(id: ID!): BundleDelete!
9379
+
9239
9380
  """Register a new user account."""
9240
9381
  accountRegister(input: AccountRegisterInput!): AccountRegister!
9241
9382
 
@@ -11150,6 +11291,11 @@ type Order implements Node & ObjectWithMetadata {
11150
11291
  last: Int = null
11151
11292
  ): OrderAuditEventCountableConnection!
11152
11293
 
11294
+ """
11295
+ 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.
11296
+ """
11297
+ timeline(kinds: [TimelineEntryKind!] = null): [TimelineEntry!]!
11298
+
11153
11299
  """List of fees for this order"""
11154
11300
  fees: [OrderFee!]!
11155
11301
 
@@ -13364,6 +13510,11 @@ type Policy implements Node & ObjectWithMetadata {
13364
13510
 
13365
13511
  """The category of this policy"""
13366
13512
  category: PolicyCategory!
13513
+
13514
+ """
13515
+ The seller that owns this policy, or null for marketplace-level policies.
13516
+ """
13517
+ seller: Seller
13367
13518
  }
13368
13519
 
13369
13520
  """Result of policy bulk delete mutation."""
@@ -13453,12 +13604,14 @@ enum PolicyErrorCode {
13453
13604
  }
13454
13605
 
13455
13606
  """
13456
- Policy(id, publication_date, is_published, created_at, updated_at, content, content_html, tenant, seo_title, seo_description, category, slug, title)
13607
+ Policy(id, publication_date, is_published, created_at, updated_at, content, content_html, tenant, seo_title, seo_description, category, slug, title, seller)
13457
13608
  """
13458
13609
  input PolicyFilterInput {
13459
13610
  search: String
13460
13611
  isPublished: Boolean
13461
13612
  category: String
13613
+ seller: String
13614
+ marketplaceOnly: Boolean
13462
13615
  AND: PolicyFilterInput
13463
13616
  OR: PolicyFilterInput
13464
13617
  NOT: PolicyFilterInput
@@ -13484,6 +13637,11 @@ input PolicyInput {
13484
13637
 
13485
13638
  """Search engine optimization fields."""
13486
13639
  seo: SeoInput = null
13640
+
13641
+ """
13642
+ Seller that owns this policy. If omitted, defaults to the calling seller user's own seller; MPO staff may omit it to create a marketplace-level policy.
13643
+ """
13644
+ seller: ID = null
13487
13645
  }
13488
13646
 
13489
13647
  """Fields available for sorting policies"""
@@ -13613,6 +13771,11 @@ type Product implements Node & ObjectWithMetadata {
13613
13771
  """Whether shipping is required"""
13614
13772
  isShippingRequired: Boolean!
13615
13773
 
13774
+ """
13775
+ Whether this product is a bundle. A bundle has exactly one sellable variant whose availability is derived from its BundleItem components (SPEC-020 Feature 2).
13776
+ """
13777
+ isBundle: Boolean!
13778
+
13616
13779
  """Whether sellers can add variants"""
13617
13780
  allowSellerVariants: Boolean!
13618
13781
 
@@ -14116,6 +14279,11 @@ input ProductDimensionsInput {
14116
14279
  length: PositiveDecimal = null
14117
14280
  width: PositiveDecimal = null
14118
14281
  height: PositiveDecimal = null
14282
+
14283
+ """
14284
+ Unit for length, width, and height. When omitted, the marketplace's configured default length unit is used.
14285
+ """
14286
+ unit: LengthUnitsStrEnum = null
14119
14287
  }
14120
14288
 
14121
14289
  """Represents errors from product operations."""
@@ -14200,7 +14368,7 @@ enum ProductFieldEnum {
14200
14368
  }
14201
14369
 
14202
14370
  """
14203
- Product(id, publication_date, is_published, private_metadata, metadata, description, description_html, deleted_at, deleted_by_user, deleted_by_app, deletion_batch_uuid, external_id, external_source, external_inventory_id, tenant, seller, seo_title, seo_description, product_type, name, slug, search_vector, category, currency, minimal_variant_price_amount, updated_at, created_at, charge_taxes, weight, available_for_purchase, visible_in_listings, default_variant, cumulative_price_amount, override_price, override_currency, status, sub_status, is_price_override_allowed, is_shipping_required, is_digital, warnings, product_source, allow_seller_variants, minimal_variant_price, cumulative_price)
14371
+ Product(id, publication_date, is_published, private_metadata, metadata, description, description_html, deleted_at, deleted_by_user, deleted_by_app, deletion_batch_uuid, external_id, external_source, external_inventory_id, tenant, seller, seo_title, seo_description, product_type, name, slug, search_vector, category, currency, minimal_variant_price_amount, updated_at, created_at, charge_taxes, weight, available_for_purchase, visible_in_listings, default_variant, cumulative_price_amount, override_price, override_currency, status, sub_status, is_price_override_allowed, is_shipping_required, is_digital, is_bundle, warnings, product_source, allow_seller_variants, minimal_variant_price, cumulative_price)
14204
14372
  """
14205
14373
  input ProductFilterInput {
14206
14374
  isPublished: Boolean
@@ -15036,6 +15204,21 @@ type ProductVariant implements Node & ObjectWithMetadata {
15036
15204
  """Quantity of variant available for sale"""
15037
15205
  quantityAvailable(countryCode: CountryCode = null): Int!
15038
15206
 
15207
+ """
15208
+ Whether this variant belongs to a bundle product. Equivalent to `product.isBundle` — exposed here so clients can branch on the variant without an additional product lookup.
15209
+ """
15210
+ isBundle: Boolean!
15211
+
15212
+ """
15213
+ If this variant is a bundle, the list of component variants and their quantities. Empty list for non-bundle variants.
15214
+ """
15215
+ bundleItems: [BundleItem!]!
15216
+
15217
+ """
15218
+ Derived availability for a bundle variant — min over components of floor(component_available / bundle_item.quantity). Returns the standard quantity_available for non-bundle variants so clients can use this field uniformly.
15219
+ """
15220
+ bundleAvailableQuantity(countryCode: CountryCode = null): Int!
15221
+
15039
15222
  """Total quantity ordered."""
15040
15223
  quantityOrdered: Int
15041
15224
 
@@ -16236,7 +16419,9 @@ type Query {
16236
16419
  """Look up a seller by ID, number (PK), or slug"""
16237
16420
  seller(id: ID = null, number: ID = null, taxId: String = null, slug: String = null): Seller
16238
16421
 
16239
- """List sellers (MPO only)"""
16422
+ """
16423
+ List sellers. Requires MANAGE_MARKETPLACE, except for the cross-sell discovery use case (filter.hasCrossSellProducts=true), which is open to any authenticated user so sellers can browse other sellers' cross-sell-enabled catalogs.
16424
+ """
16240
16425
  sellers(
16241
16426
  filter: SellerFilterInput
16242
16427
  sortBy: SellerSortingInput = null
@@ -20730,6 +20915,92 @@ type TimeSeriesDataPoint {
20730
20915
  label: String
20731
20916
  }
20732
20917
 
20918
+ type TimelineActor {
20919
+ type: TimelineActorType!
20920
+
20921
+ """
20922
+ Display name for the actor (user email, app name, task name, or 'Anonymous').
20923
+ """
20924
+ label: String!
20925
+
20926
+ """Email when actor is a user."""
20927
+ email: String
20928
+
20929
+ """
20930
+ Global ID for the actor's settings page (user_id or app_id). The dashboard uses this to deep-link from the timeline row.
20931
+ """
20932
+ linkTargetId: String
20933
+ }
20934
+
20935
+ enum TimelineActorType {
20936
+ USER
20937
+ APP
20938
+ TASK
20939
+ ANONYMOUS
20940
+ }
20941
+
20942
+ type TimelineEntry {
20943
+ """
20944
+ Composite ID: '<kind>:<pgh_id>'. Stable per source event but not globally addressable via the Node interface.
20945
+ """
20946
+ id: ID!
20947
+ timestamp: DateTime!
20948
+ kind: TimelineEntryKind!
20949
+ action: TimelineEntryAction!
20950
+
20951
+ """
20952
+ Original pghistory label (e.g. 'commission_added'). Preserved alongside `action` for domain-specific UX.
20953
+ """
20954
+ rawLabel: String!
20955
+
20956
+ """
20957
+ Server-formatted human-readable message, e.g. 'Granular commission for Seller "Acme" updated'. Pre-rendered to keep the frontend generic.
20958
+ """
20959
+ summary: String!
20960
+ actor: TimelineActor!
20961
+
20962
+ """Child object affected. Null when the event IS the primary entity."""
20963
+ target: TimelineTarget
20964
+
20965
+ """
20966
+ Field-level diff. Empty for non-update events or when no fields changed.
20967
+ """
20968
+ changes: [FieldChange!]!
20969
+
20970
+ """Full snapshot at event time. Escape hatch for power users / debugging."""
20971
+ rawSnapshot: JSONString!
20972
+
20973
+ """Full diff dict {field: [old, new]}. Null for create/delete events."""
20974
+ rawDiff: JSONString
20975
+ }
20976
+
20977
+ enum TimelineEntryAction {
20978
+ CREATED
20979
+ UPDATED
20980
+ DELETED
20981
+ }
20982
+
20983
+ enum TimelineEntryKind {
20984
+ AGREEMENT
20985
+ AGREEMENT_COMMISSION
20986
+ AGREEMENT_FEE
20987
+ AGREEMENT_SELLER
20988
+ ORDER
20989
+ ORDER_LINE
20990
+ FULFILLMENT
20991
+ }
20992
+
20993
+ type TimelineTarget {
20994
+ """Lowercase model name, e.g. 'seller', 'product', 'category'."""
20995
+ type: String!
20996
+
20997
+ """Human-readable identifier (name, title, etc)."""
20998
+ label: String!
20999
+
21000
+ """Global ID for navigation. Null when no detail page exists."""
21001
+ linkTargetId: String
21002
+ }
21003
+
20733
21004
  """Result of token create mutation."""
20734
21005
  type TokenCreate {
20735
21006
  """JWT token for authentication."""
@@ -20810,15 +21081,15 @@ type Transaction implements Node {
20810
21081
  """Transaction token."""
20811
21082
  token: String!
20812
21083
 
20813
- """Transaction kind (auth, capture, void, refund)."""
20814
- kind: String!
20815
-
20816
21084
  """Whether the transaction was successful."""
20817
21085
  isSuccess: Boolean!
20818
21086
 
20819
21087
  """Error message if transaction failed."""
20820
21088
  error: String
20821
21089
 
21090
+ """The kind of the transaction."""
21091
+ kind: TransactionKind!
21092
+
20822
21093
  """The payment associated with this transaction."""
20823
21094
  payment: Payment!
20824
21095
 
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.1",
4
4
  "description": "Traide API GraphQL Schema",
5
5
  "main": "./nautical/schema.graphql",
6
6
  "scripts": {