Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions ts/.changeset/commerce-exchangeable-items.md

This file was deleted.

15 changes: 0 additions & 15 deletions ts/.changeset/commerce-order-fields.md

This file was deleted.

29 changes: 0 additions & 29 deletions ts/.changeset/commerce-required-presence.md

This file was deleted.

12 changes: 0 additions & 12 deletions ts/.changeset/commerce-value-type-aliases.md

This file was deleted.

7 changes: 0 additions & 7 deletions ts/.changeset/messaging-send-result-error-code.md

This file was deleted.

12 changes: 12 additions & 0 deletions ts/examples/basic/apps/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @basic-example/server

## 0.0.16

### Patch Changes

- Updated dependencies [494c902]
- Updated dependencies [3e4e4b1]
- Updated dependencies [65d4196]
- Updated dependencies [0ff5a85]
- Updated dependencies [2862b3d]
- @channel.io/app-sdk-core@0.24.0
- @channel.io/app-sdk-server@0.24.0

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/examples/basic/apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basic-example/server",
"version": "0.0.15",
"version": "0.0.16",
"private": true,
"type": "module",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions ts/examples/basic/apps/wam/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @basic-example/wam

## 0.0.16

### Patch Changes

- @channel.io/app-sdk-wam@0.24.0

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/examples/basic/apps/wam/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basic-example/wam",
"version": "0.0.15",
"version": "0.0.16",
"private": true,
"type": "module",
"scripts": {
Expand Down
12 changes: 12 additions & 0 deletions ts/examples/calendar/apps/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @calendar-example/server

## 0.0.16

### Patch Changes

- Updated dependencies [494c902]
- Updated dependencies [3e4e4b1]
- Updated dependencies [65d4196]
- Updated dependencies [0ff5a85]
- Updated dependencies [2862b3d]
- @channel.io/app-sdk-core@0.24.0
- @channel.io/app-sdk-server@0.24.0

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/examples/calendar/apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calendar-example/server",
"version": "0.0.15",
"version": "0.0.16",
"private": true,
"type": "module",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions ts/examples/calendar/apps/wam/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @calendar-example/wam

## 0.0.16

### Patch Changes

- @channel.io/app-sdk-wam@0.24.0

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/examples/calendar/apps/wam/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calendar-example/wam",
"version": "0.0.15",
"version": "0.0.16",
"private": true,
"type": "module",
"scripts": {
Expand Down
12 changes: 12 additions & 0 deletions ts/examples/tutorial/apps/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @tutorial-example/server

## 0.0.14

### Patch Changes

- Updated dependencies [494c902]
- Updated dependencies [3e4e4b1]
- Updated dependencies [65d4196]
- Updated dependencies [0ff5a85]
- Updated dependencies [2862b3d]
- @channel.io/app-sdk-core@0.24.0
- @channel.io/app-sdk-server@0.24.0

## 0.0.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/examples/tutorial/apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tutorial-example/server",
"version": "0.0.13",
"version": "0.0.14",
"private": true,
"type": "module",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions ts/examples/tutorial/apps/wam/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @tutorial-example/wam

## 0.0.14

### Patch Changes

- @channel.io/app-sdk-wam@0.24.0

## 0.0.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/examples/tutorial/apps/wam/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tutorial-example/wam",
"version": "0.0.13",
"version": "0.0.14",
"private": true,
"type": "module",
"scripts": {
Expand Down
13 changes: 13 additions & 0 deletions ts/packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @channel.io/app-sdk

## 0.24.0

### Patch Changes

- Updated dependencies [494c902]
- Updated dependencies [3e4e4b1]
- Updated dependencies [65d4196]
- Updated dependencies [0ff5a85]
- Updated dependencies [2862b3d]
- @channel.io/app-sdk-core@0.24.0
- @channel.io/app-sdk-server@0.24.0
- @channel.io/app-sdk-wam@0.24.0

## 0.23.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@channel.io/app-sdk",
"version": "0.23.1",
"version": "0.24.0",
"description": "CLI and main entry for Channel.io App SDK",
"type": "module",
"main": "./dist/index.js",
Expand Down
73 changes: 73 additions & 0 deletions ts/packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,78 @@
# @channel.io/app-sdk-core

## 0.24.0

### Minor Changes

- 494c902: Replace the `getExchangeableItems` output with `exchangeableItems`, which carries the variants an
order item can be exchanged for. The previous `items` only listed which order items were
exchangeable, so there was no way to learn the `variantId` that `requestExchangeOrder`'s
`afterExchangeItems` requires — the exchange flow could not be implemented from the contract alone.
Each variant carries its `additionalAmount`, human-readable `options`, and stock: `stockQuantity` is
left unset when a variant does not track inventory, so `0` (sold out) stays distinguishable from
unlimited, with `useInventory` telling the two apart.

`items` is removed rather than kept alongside: no app implements commerce `getExchangeableItems` in
either production or exp, and no task calls it, so nothing consumes the field today.

`OrderClaimability` gains four reason fields — `nonCancelableReason`, `nonReturnableReason`,
`nonExchangeableReason`, `nonShippingAddressChangeableReason`. The booleans alone cannot explain
_why_ a claim is unavailable, which malls do report and tasks need in order to tell the customer.
Commerce and order extensions share the type, so both `getOrders` outputs carry them.

- 3e4e4b1: Widen the commerce order contract with fields malls already return but the contract could not
carry — `payment.taxAmount`, item `sku`/`taxLines`/`unfulfilledQuantity`/`requiresShipping`/selling
plan, and order `adminUrl`/`note`/display statuses/`billingAddress`/`shippingLines`/`transactions`/
`metafields`/`customAttributes`. `OrderTransaction` exists so cash-on-delivery and deferred payment
can be told apart, which `payment.methods` alone cannot express.

`OrderClaimability`'s four booleans now carry explicit presence. A proto3 plain bool cannot tell
`false` from unset, so JSON serialization dropped every `false` and an item that allowed no claim
at all was emitted as `claimability: {}`, contradicting the schema that advertises those fields as
required. Generated field types change from `bool` to an optional boolean, so code that builds
`OrderClaimability` through struct literals needs updating; accessors are unchanged.

- 65d4196: Stop dropping order-contract fields whose zero value is a real value. protojson omits a field
without presence when it holds the zero value, so fields the contract declares as required went
missing in common situations — `claims` on an order with no claims, `shippingAmount` on free
shipping, `success: false` on a failed action. The declaration and the wire format disagreed, and
consumers read `undefined` where the contract promised a value.

**Given presence so the value is emitted** (still required) — zero and `false` are real values here:

- `CommerceResultBody.success`
- `OrderPayment.totalAmount` / `itemsAmount` / `shippingAmount` / `discountAmount` /
`requireRefundBankAccount`
- `CommerceOrderItem.amount`
- `CommerceExchangeableVariant.additionalAmount`

The Go types change from `float64`/`bool` to `*float64`/`*bool`, so an app that fills these must
set them through a pointer. Leaving one unset omits the key exactly as before.

**Dropped from required** — these are repeated fields, and protobuf does not allow `optional` on
them, so an empty list is indistinguishable from an absent one:

- `Order.claims` / `Order.fulfillments`
- `OrderPayment.methods`
- `OperationOptions.required` / `OperationOptions.optional`

The last two are shared by the `order` and `commerce` extensions, so both contracts change.

### Patch Changes

- 0ff5a85: Export Go aliases for the commerce order value types added alongside the widened order contract —
`TaxLine`, `Attribute`, `ShippingLine`, `Transaction`, and `Metafield`. Their generated code lives
under an internal package, so without an alias an app could see the fields in the schema but had no
way to construct the values.

A test walks the proto descriptors reachable from the order contract and fails when one of those
messages has no alias in the commerce package, so adding a message without exporting it is caught
rather than discovered by the first app that needs the value.

- 2862b3d: Add the optional numeric `errorCode` field to `MessagingSendResult` so messaging apps can return a
stable failure reason from `onMediumMessageCreated`. The runtime can persist the code on the failed
Channel message and pass it to `getMediumMessageErrorReason` for a safe user-facing explanation.

## 0.23.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@channel.io/app-sdk-core",
"version": "0.23.1",
"version": "0.24.0",
"description": "Core types and utilities for Channel.io App SDK",
"type": "module",
"main": "./dist/index.js",
Expand Down
11 changes: 11 additions & 0 deletions ts/packages/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @channel.io/app-sdk-server

## 0.24.0

### Patch Changes

- Updated dependencies [494c902]
- Updated dependencies [3e4e4b1]
- Updated dependencies [65d4196]
- Updated dependencies [0ff5a85]
- Updated dependencies [2862b3d]
- @channel.io/app-sdk-core@0.24.0

## 0.23.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@channel.io/app-sdk-server",
"version": "0.23.1",
"version": "0.24.0",
"description": "NestJS server SDK for Channel.io apps",
"type": "module",
"main": "./dist/index.js",
Expand Down
11 changes: 11 additions & 0 deletions ts/packages/wam/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @channel.io/app-sdk-wam

## 0.24.0

### Patch Changes

- Updated dependencies [494c902]
- Updated dependencies [3e4e4b1]
- Updated dependencies [65d4196]
- Updated dependencies [0ff5a85]
- Updated dependencies [2862b3d]
- @channel.io/app-sdk-core@0.24.0

## 0.23.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion ts/packages/wam/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@channel.io/app-sdk-wam",
"version": "0.23.1",
"version": "0.24.0",
"description": "React SDK for Channel.io WAM (Web App Module)",
"type": "module",
"main": "./dist/index.js",
Expand Down