@01.software/sdk 0.73.1 → 0.74.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.
- package/CHANGELOG.md +39 -0
- package/README.md +30 -3
- package/dist/client.cjs +12 -9
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +12 -9
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-BH4dIZ6c.d.cts → collection-client-Bb1Wa6T6.d.cts} +4 -4
- package/dist/{collection-client-lLAl3xCZ.d.ts → collection-client-DBrLM9RR.d.ts} +4 -4
- package/dist/{const-CCvoknRY.d.ts → const-CkY2zB6J.d.ts} +1 -1
- package/dist/{const-BS2EaIp4.d.cts → const-DWTSgCkn.d.cts} +1 -1
- package/dist/{index-DVqNpmsc.d.ts → index-Daoh-98A.d.ts} +3 -3
- package/dist/{index-CHdrzJ8-.d.cts → index-Di5AybQN.d.cts} +3 -3
- package/dist/index.cjs +12 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-PXkmefhZ.d.cts → payload-types-zukuL1s_.d.cts} +345 -1755
- package/dist/{payload-types-PXkmefhZ.d.ts → payload-types-zukuL1s_.d.ts} +345 -1755
- package/dist/query.cjs +4 -0
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +4 -0
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +12 -9
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +12 -9
- package/dist/server.js.map +1 -1
- package/dist/{types-CyMz0Kzc.d.cts → types-BI7aowdu.d.cts} +4 -4
- package/dist/{types-lbzbJSZh.d.ts → types-BsJokT6P.d.ts} +59 -16
- package/dist/{types-CQRsG6sA.d.ts → types-SsS04wGw.d.ts} +4 -4
- package/dist/{types-Chwgg4CQ.d.cts → types-evAvqRBj.d.cts} +59 -16
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +5 -5
- package/dist/webhook.d.ts +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @01.software/sdk
|
|
2
2
|
|
|
3
|
+
## 0.74.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a5ac520: **Additive response arm (0.x minor).** `cancelOrder()` already returned this body for an order paid entirely with customer credit; `CancelOrderResponse` now types it as `CancelOrderCreditOnlyCommittedResponse` (exported from `@01.software/sdk`): `cancelCommitted: true`, the restored purchase total as `refundedAmount`, `providerRefunded: false`, and no `transactionId` or `refundPending`. There is no PG refund to run. Runtime behavior is unchanged. Code that assumed a committed response without `transactionId` has `refundedAmount: 0`, or an exhaustive check over `CancelOrderResponse`, needs the new arm.
|
|
8
|
+
- b01549e: Feature progress now supports `customers` and `community` in addition to `ecommerce`. `createServerClient().tenant.featureProgress({ feature })` returns the response for the requested feature (`TenantFeatureProgressResponseFor<F>`): the `ecommerce` response keeps `config.fulfillmentMode`, while `customers` and `community` responses have no `config`. `TenantFeatureProgressResponse` still names the ecommerce response and `TenantFeatureProgressInput` still defaults to `feature: 'ecommerce'`, so existing wrappers keep their types; use `TenantFeatureProgressInput<TenantFeatureProgressFeature>` and `TenantFeatureProgressResponseUnion` to handle every supported feature. `01 feature check customers|community` reports hosted customer sign-in and first public comment setup. Manual items still require an end-to-end check in the app.
|
|
9
|
+
|
|
10
|
+
BREAKING (0.x minor): `TenantFeatureProgressFeature` now also includes `'customers'` and `'community'`, so exhaustive handling of that type needs the new cases, and a hand-written `TenantIntrospectionClient` implementation must type `featureProgress` as generic over the requested feature.
|
|
11
|
+
|
|
12
|
+
- 6b8a188: Feature progress now supports `events`. `createServerClient().tenant.featureProgress({ feature: 'events' })` and `01 feature check events` report whether the workspace event calendar is public and whether a scheduled, not-yet-ended occurrence accepts a free RSVP, plus a manual register, lookup, and cancel check. The check is read-only and does not evaluate remaining capacity or paid admission. The response has no `config`.
|
|
13
|
+
|
|
14
|
+
BREAKING (0.x minor): `TenantFeatureProgressFeature` now also includes `'events'`, so exhaustive handling of that type needs the new case.
|
|
15
|
+
|
|
16
|
+
- f433dee: Feature progress now supports `membership`. `createServerClient().tenant.featureProgress({ feature: 'membership' })` and `01 feature check membership` report whether an active plan has an active price for new sign-ups, plus a manual sign-up, charge, renewal, and cancellation check. Apps that only read or cancel existing memberships can treat the sellable-plan item as optional. The response has no `config`, like `customers` and `community`.
|
|
17
|
+
|
|
18
|
+
BREAKING (0.x minor): `TenantFeatureProgressFeature` now also includes `'membership'`, so exhaustive handling of that type needs the new case.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 6814052: Clarify generated Event location JSDoc about the public read visibility of stored online URLs and notes and the privacy of internal notes. Persisted location paths and public read behavior remain unchanged.
|
|
23
|
+
- 65ed375: `Tenant` 생성 타입의 `defaultContentLocale` 설명 주석에 고객 메일도 이 언어로 발송한다는 내용이 추가됩니다. 타입 구조는 변경하지 않습니다.
|
|
24
|
+
- eb457be: Regenerate Payload type documentation after clarifying guest-link expiry guidance in the Console Admin Panel. Only JSDoc changes; field types and API response shapes are unchanged.
|
|
25
|
+
- e1c8158: Order variants by their fractional-indexing `_order` key (code-unit order, keyed before unkeyed; equal to the Admin Panel order for current-format `[0-9a-z]` keys) instead of a `Number()` conversion that turned every key into `NaN`, so listing-group representative variants and `fillDefaults` selections follow the Admin Panel variant order.
|
|
26
|
+
- e0fcb45: Type `createServerClient().video` as non-optional so the documented `createServerClient(...).video.playback(id)` compiles under strict TypeScript without `?.` or `!`. The server client always sets `video` at runtime; `RootServerClient.video` stays optional for structural mocks. A hand-written mock typed as `RootServerClientWithEvents` (or a `withMarket()` stub returning it) now needs a `video` member.
|
|
27
|
+
- 58f915b: `Customer`·`Product` 생성 타입에서 `customData` 속성의 선언 순서만 바뀝니다. 타입 구조는 변경하지 않습니다.
|
|
28
|
+
- 0e826e1: Remove collection-level descriptions from the generated payload types; Console list screens no longer show collection descriptions.
|
|
29
|
+
- 6dea486: Shorten or remove commerce field descriptions in the generated payload types to match the trimmed Console copy.
|
|
30
|
+
- 8530c76: Align event and registration descriptions in the generated payload types with the Console public read terminology and clarify guest-token PII visibility under retention policies. Types and response shapes are unchanged.
|
|
31
|
+
- 9c0c1d5: Point the generated `users.tenants` description at the renamed Settings > Workspace > Project destination.
|
|
32
|
+
- 16b3229: Shorten or remove shared field descriptions (SEO, subtitle, summary, taxonomy, videos) in the generated payload types to match the trimmed Console copy.
|
|
33
|
+
- a26270c: Keep internal profile record creation evidence out of public profile and profile-statistics types while synchronizing the generated storage schema. Ordinary API and GraphQL surfaces do not expose `recordCreatedAt`.
|
|
34
|
+
- 1d52b00: Shorten or remove customer and membership field descriptions in the generated payload types to match the trimmed Console copy.
|
|
35
|
+
- a16f609: Shorten or remove content, community and event field descriptions in the generated payload types to match the trimmed Console copy.
|
|
36
|
+
- 4165ada: Add `voided` to the generated `MembershipUnappliedPaidEvidence.reason` values for late paid evidence on expired setup charges.
|
|
37
|
+
- 27f0891: Shorten or remove workspace, settings and system field descriptions in the generated payload types to match the trimmed Console copy.
|
|
38
|
+
- 5376b13: Fix product listing-page search requests to query title and slug only, avoiding HTTP 400 errors caused by querying the nonexistent Products handle field.
|
|
39
|
+
- fb854bc: 생성 타입에서 입장 유형 `priceReference` 필드 설명 주석을 갱신한다. 런타임과 타입 시그니처 변경은 없다.
|
|
40
|
+
- 809b7db: Clarify the generated Video viewCount documentation to reflect that views are not currently collected automatically. The type structure is unchanged.
|
|
41
|
+
|
|
3
42
|
## 0.73.1
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -472,6 +472,8 @@ addendum in `docs/decisions/0012-sdk-public-commerce-contract.md`.
|
|
|
472
472
|
|
|
473
473
|
### Product Listing Pages (PLP) — join-safe queries
|
|
474
474
|
|
|
475
|
+
`search` trims surrounding whitespace and matches product `title` or `slug`.
|
|
476
|
+
|
|
475
477
|
**Recommended path:** Use `commerce.product.listingPage()` (or
|
|
476
478
|
`createQueryHooks(client).useProductListingPage()`) for greenfield storefront
|
|
477
479
|
PLPs. It wraps the cacheable listing-groups query endpoint, keeps the raw
|
|
@@ -1660,9 +1662,24 @@ customer already owns returns `resolution: 'unchanged'` and writes nothing, so
|
|
|
1660
1662
|
the revision you last observed stays valid for the next mutation. Because it
|
|
1661
1663
|
writes nothing, such a merge does not count as Cart activity for stale-Cart
|
|
1662
1664
|
cleanup.
|
|
1665
|
+
`carts.merge` rejects an unknown or wrong `guestCartToken`, or a Cart belonging to another
|
|
1666
|
+
customer or tenant, with the same `404/not_found` envelope without writes.
|
|
1667
|
+
The response does not reveal which case occurred. Branch on
|
|
1668
|
+
`reason`, and use `requestId` for support correlation rather than comparing error text.
|
|
1663
1669
|
Treat a replayed Cart result as an operation receipt: never replace a newer
|
|
1664
1670
|
cached Cart with a lower `revision`; retrieve when response ordering is unclear.
|
|
1665
1671
|
|
|
1672
|
+
A customer can have more than one active Cart, because `carts.create` always
|
|
1673
|
+
creates a new Cart. `carts.mine` returns the active Cart with the latest
|
|
1674
|
+
`createdAt`, and `carts.merge` merges a guest Cart into that same Cart. When
|
|
1675
|
+
`createdAt` is equal, the Cart with the higher `id` is chosen. Merging an active
|
|
1676
|
+
Cart the customer already owns returns that Cart `unchanged`, even when it is an
|
|
1677
|
+
older Cart.
|
|
1678
|
+
|
|
1679
|
+
If the guest Cart's market differs from that chosen Cart, `carts.merge` returns
|
|
1680
|
+
`409 cart_market_mismatch`. It does not merge into an older Cart in the guest
|
|
1681
|
+
Cart's market instead.
|
|
1682
|
+
|
|
1666
1683
|
Shipping Checkout creation requires a request `shippingAddress` or a valid
|
|
1667
1684
|
stored Cart address whenever any line has `requiresShipping !== false`.
|
|
1668
1685
|
`recipientName`, `phone`, `postalCode`, `address`, and `detailAddress` must be nonblank after trimming. Otherwise,
|
|
@@ -1957,9 +1974,12 @@ Customer order reads remain available through
|
|
|
1957
1974
|
The SDK root no longer exports raw generated `Order`, `Transaction`, `Cart`, or
|
|
1958
1975
|
`CartItem` Payload documents. Use the canonical `PublicOrder` / `PublicCart`
|
|
1959
1976
|
DTOs for storefront code and explicit server collection types only inside
|
|
1960
|
-
trusted operational code.
|
|
1961
|
-
|
|
1962
|
-
|
|
1977
|
+
trusted operational code. SDK types no longer include the retired inline
|
|
1978
|
+
provider-refund flow. An order whose cancellation started through that flow can
|
|
1979
|
+
still return `providerRefunded: true` with `refundSeq`, or an uncommitted body
|
|
1980
|
+
with `reconciliationRequired: true`. These bounded legacy bodies remain outside
|
|
1981
|
+
`CancelOrderResponse`. `refundPending` is a local financial marker, not authority
|
|
1982
|
+
for caller provider I/O:
|
|
1963
1983
|
|
|
1964
1984
|
| Captured payment lane | Provider refund owner | `resolveCancelRefund` |
|
|
1965
1985
|
| ------------------------------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------- |
|
|
@@ -1982,6 +2002,13 @@ as a committed cancellation and never start a provider refund from your
|
|
|
1982
2002
|
storefront or BFF. A retry reads or resumes the same Console refund. Registered
|
|
1983
2003
|
PortOne and credit-funded managed orders still return the pending marker.
|
|
1984
2004
|
|
|
2005
|
+
For an order paid entirely with customer credit, `cancelOrder()` restores credit
|
|
2006
|
+
inside the cancel commit and returns `CancelOrderCreditOnlyCommittedResponse`:
|
|
2007
|
+
`cancelCommitted: true`, the positive restored purchase total as
|
|
2008
|
+
`refundedAmount`, and `providerRefunded: false`, with neither `transactionId`
|
|
2009
|
+
nor `refundPending`. There is no PG refund to run. A later domain retry uses the
|
|
2010
|
+
ordinary `alreadyCanceled` arm with the same `refundedAmount`.
|
|
2011
|
+
|
|
1985
2012
|
Managed ownership follows the captured Transaction's exact tenant-bound
|
|
1986
2013
|
PaymentSession and historical registered account. Order/provider/environment
|
|
1987
2014
|
drift remains Console-owned corruption. Unresolved or cross-tenant identity
|
package/dist/client.cjs
CHANGED
|
@@ -1386,6 +1386,10 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
|
1386
1386
|
configure: operation("tenants", "patch", "/embedded-admin-app"),
|
|
1387
1387
|
disable: operation("tenants", "delete", "/embedded-admin-app")
|
|
1388
1388
|
};
|
|
1389
|
+
var FIELD_CONFIG_ENDPOINT_OPERATIONS = {
|
|
1390
|
+
list: operation("field-configs", "get", "/list"),
|
|
1391
|
+
save: operation("field-configs", "post", "/save")
|
|
1392
|
+
};
|
|
1389
1393
|
var EVENTS_ENDPOINT_OPERATIONS = {
|
|
1390
1394
|
registrations: {
|
|
1391
1395
|
register: operation("event-registrations", "post", "/register"),
|
|
@@ -6223,10 +6227,13 @@ function buildProductHref(product, group, options = {}) {
|
|
|
6223
6227
|
return params.size > 0 ? `${path}?${params.toString()}` : path;
|
|
6224
6228
|
}
|
|
6225
6229
|
function compareVariantOrder(a, b) {
|
|
6226
|
-
const aOrder =
|
|
6227
|
-
const bOrder =
|
|
6228
|
-
if (
|
|
6229
|
-
|
|
6230
|
+
const aOrder = a._order || null;
|
|
6231
|
+
const bOrder = b._order || null;
|
|
6232
|
+
if (aOrder !== bOrder) {
|
|
6233
|
+
if (aOrder === null) return 1;
|
|
6234
|
+
if (bOrder === null) return -1;
|
|
6235
|
+
const byOrder = compareOrdinal(aOrder, bOrder);
|
|
6236
|
+
if (byOrder !== 0) return byOrder;
|
|
6230
6237
|
}
|
|
6231
6238
|
const aId = String(getRelationID(a.id) ?? "");
|
|
6232
6239
|
const bId = String(getRelationID(b.id) ?? "");
|
|
@@ -6477,11 +6484,7 @@ function buildProductListingPageWhere(params) {
|
|
|
6477
6484
|
const search = params.search?.trim();
|
|
6478
6485
|
if (search) {
|
|
6479
6486
|
clauses.push({
|
|
6480
|
-
or: [
|
|
6481
|
-
{ title: { like: search } },
|
|
6482
|
-
{ slug: { like: search } },
|
|
6483
|
-
{ handle: { like: search } }
|
|
6484
|
-
]
|
|
6487
|
+
or: [{ title: { like: search } }, { slug: { like: search } }]
|
|
6485
6488
|
});
|
|
6486
6489
|
}
|
|
6487
6490
|
const filters = params.filters;
|