Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Correct the documented base for a collection's position

Damian Legawiec906956a461d4
diff --git a/packages/admin-sdk/src/params.ts b/packages/admin-sdk/src/params.ts
index 1a63b140f0..5df50e79b3 100644
--- a/packages/admin-sdk/src/params.ts
+++ b/packages/admin-sdk/src/params.ts
@@ -645,8 +645,11 @@ export interface CollectionUpdateParams {
description?: string
permalink?: string
/**
- * 0-based index among the store's collections. Collections are a flat list,
- * so reordering is a plain update — there is no separate reposition action.
+ * 1-based position among the store's collections, written straight to the
+ * `acts_as_list` column — the first collection is `1`, and the server shifts
+ * its siblings. Collections are a flat list, so reordering is a plain update
+ * rather than a separate reposition action (which is where the `new_position`
+ * params, unlike this one, are 0-based indexes).
*/
position?: number
meta_title?: string