@nautical-commerce/graphql-schema 4.20.2 → 4.21.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.
@@ -10033,6 +10033,16 @@ type Mutation {
10033
10033
  """Remove a user from a seller. Only for marketplace operators."""
10034
10034
  sellerUserMappingDelete(input: SellerUserInput!): SellerUserMappingDelete!
10035
10035
 
10036
+ """
10037
+ Delete a seller, with what belongs only to it. Refused with CANNOT_DELETE while anything deleting it must not destroy remains, such as products, orders or a staff user on no other seller; Seller.deletionPlan says what. NOT_FOUND when another request deletes it while this one runs. Requires MANAGE_MARKETPLACE.
10038
+ """
10039
+ sellerDelete(id: ID!): SellerDelete!
10040
+
10041
+ """
10042
+ Delete sellers, all of them or none. A seller that cannot be deleted stops the batch, and each such seller gets a CANNOT_DELETE error naming it in `sellers`; one another request deletes while this one runs stops it too, with NOT_FOUND. The batch is judged as a whole: a staff user whose only sellers are all in it blocks it. Requires MANAGE_MARKETPLACE.
10043
+ """
10044
+ sellerBulkDelete(ids: [ID!]!): SellerBulkDelete!
10045
+
10036
10046
  """Create an address for a seller. Requires seller access."""
10037
10047
  sellerAddressCreate(sellerId: ID!, input: AddressInput!): SellerAddressCreate!
10038
10048
 
@@ -20847,6 +20857,11 @@ type Seller implements Node & ObjectWithMetadata {
20847
20857
  """Whether payouts are enabled for this seller"""
20848
20858
  externalPayoutStatus: Boolean
20849
20859
 
20860
+ """
20861
+ Whether sellerDelete would delete this seller now, what stops it, and what deleting it deletes or unlinks along with it. Requires MANAGE_MARKETPLACE.
20862
+ """
20863
+ deletionPlan: SellerDeletionPlan
20864
+
20850
20865
  """Seller onboarding checklists"""
20851
20866
  checklists: [SellerOnboardingChecklist!]!
20852
20867
 
@@ -21301,6 +21316,15 @@ type SellerBannerUpdate {
21301
21316
  sellerErrors: [SellerError!]!
21302
21317
  }
21303
21318
 
21319
+ """Result of seller bulk delete mutation."""
21320
+ type SellerBulkDelete {
21321
+ """Number of sellers deleted."""
21322
+ count: Int!
21323
+
21324
+ """List of errors that occurred executing the mutation."""
21325
+ sellerErrors: [SellerError!]!
21326
+ }
21327
+
21304
21328
  """Events that can trigger checklist item completion"""
21305
21329
  enum SellerChecklistCompletionTriggersEnum {
21306
21330
  PAYOUT_ACCOUNT_CREATED
@@ -21368,6 +21392,85 @@ type SellerDataUpdate {
21368
21392
  sellerErrors: [SellerError!]!
21369
21393
  }
21370
21394
 
21395
+ """Result of seller delete mutation."""
21396
+ type SellerDelete {
21397
+ """
21398
+ The deleted seller, as it was immediately before deletion. Refetching it by ID returns null.
21399
+ """
21400
+ seller: Seller
21401
+
21402
+ """List of errors that occurred executing the mutation."""
21403
+ sellerErrors: [SellerError!]!
21404
+ }
21405
+
21406
+ """Something that stops a seller from being deleted."""
21407
+ type SellerDeletionBlocker {
21408
+ """The rule that blocks the deletion."""
21409
+ code: SellerDeletionBlockerCode!
21410
+
21411
+ """How many records the rule found."""
21412
+ count: Int!
21413
+
21414
+ """What blocks the deletion, for a person deciding what to do about it."""
21415
+ message: String!
21416
+ }
21417
+
21418
+ """Why a seller cannot be deleted yet."""
21419
+ enum SellerDeletionBlockerCode {
21420
+ MARKETPLACE_SELLER
21421
+ SOLE_SELLER_OF_STAFF
21422
+ PRODUCTS
21423
+ PRODUCT_VARIANTS
21424
+ DELETED_VARIANTS_ON_ORDERS
21425
+ DELETED_VARIANTS_PURCHASED
21426
+ DELETED_VARIANTS_IN_BUNDLES
21427
+ DELETED_PRODUCTS_IN_MENUS
21428
+ ORDERS
21429
+ VENDOR_PAYOUTS
21430
+ LEDGER_ENTRIES
21431
+ ENTITLEMENTS
21432
+ LICENSE_KEY_POOLS
21433
+ CAPACITY_POOLS
21434
+ WEBHOOK_TRANSACTIONS
21435
+ WAREHOUSE_STOCK
21436
+ ATTRIBUTE_VALUES_IN_USE
21437
+ CREATED_ATTRIBUTES
21438
+ CREATED_PRODUCT_TYPES
21439
+ PRODUCT_MEDIA
21440
+ NESTED_MENU_ITEMS
21441
+ REFERENCED_RECORDS
21442
+ }
21443
+
21444
+ """Records that deleting a seller deletes, or keeps and unlinks."""
21445
+ type SellerDeletionImpact {
21446
+ """The records and their count, e.g. "2 warehouses"."""
21447
+ label: String!
21448
+
21449
+ """How many records."""
21450
+ count: Int!
21451
+
21452
+ """Whether the records are deleted, or kept and unlinked from the seller."""
21453
+ action: SellerDeletionImpactAction!
21454
+ }
21455
+
21456
+ """What deleting a seller does to records that reference it."""
21457
+ enum SellerDeletionImpactAction {
21458
+ DELETE
21459
+ UNLINK
21460
+ }
21461
+
21462
+ """Whether a seller can be deleted now, and what deleting it does."""
21463
+ type SellerDeletionPlan {
21464
+ """Whether sellerDelete would delete this seller now."""
21465
+ canDelete: Boolean!
21466
+
21467
+ """What stops the deletion. Empty when canDelete is true."""
21468
+ blockers: [SellerDeletionBlocker!]!
21469
+
21470
+ """What deleting the seller deletes, or keeps and unlinks, along with it."""
21471
+ impacts: [SellerDeletionImpact!]!
21472
+ }
21473
+
21371
21474
  """
21372
21475
  Whether a seller may sell digital-kind products (SPEC-029). SUSPENDED unpublishes the seller's digital products with a stamped warning.
21373
21476
  """
@@ -21386,10 +21489,14 @@ type SellerError {
21386
21489
 
21387
21490
  """The error code."""
21388
21491
  code: SellerErrorCode!
21492
+
21493
+ """IDs of the sellers that caused the error."""
21494
+ sellers: [ID!]
21389
21495
  }
21390
21496
 
21391
21497
  """An enumeration of possible error codes for seller operations."""
21392
21498
  enum SellerErrorCode {
21499
+ CANNOT_DELETE
21393
21500
  GRAPHQL_ERROR
21394
21501
  INVALID
21395
21502
  INVALID_PHONE
@@ -25376,6 +25483,7 @@ enum WebhookEventTypeEnum {
25376
25483
  REFUND_UPDATED
25377
25484
  SELLER_CREATED
25378
25485
  SELLER_UPDATED
25486
+ SELLER_DELETED
25379
25487
  SELLER_AGREEMENT_ACKNOWLEDGED
25380
25488
  SELLER_AGREEMENT_DECLINED
25381
25489
  VARIANT_CREATED
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nautical-commerce/graphql-schema",
3
- "version": "4.20.2",
3
+ "version": "4.21.0",
4
4
  "description": "Traide API GraphQL Schema",
5
5
  "main": "./nautical/schema.graphql",
6
6
  "scripts": {