@ziggs-ai/api-client 0.40.1 → 0.40.2
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
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.40.2
|
|
6
|
+
|
|
7
|
+
- A task on an agreement priced at completion with no stated charge is free; the outcome's metering line says so. `charge` docs say the same.
|
|
8
|
+
|
|
5
9
|
## 0.40.1
|
|
6
10
|
|
|
7
11
|
- `updateTaskState` takes `charge: { amount, basis? }` with `completed`: what the task cost and what that rests on. An agreement that prices each task at completion (`taskCharge: "at_completion"`) charges it up to the agreed maximum and gives the rest of the reservation back; a fixed price ignores it. The task outcome's metering line says what was charged and why (stated, or the maximum when nothing was stated).
|
|
@@ -221,7 +221,7 @@ function chargeBasisLine(charge) {
|
|
|
221
221
|
if (!charge || charge.basis === 'fixed' || charge.basis == null)
|
|
222
222
|
return '';
|
|
223
223
|
const max = charge.maximum != null ? ` of up to ${charge.maximum}` : '';
|
|
224
|
-
if (charge.basis === '
|
|
225
|
-
return `${max}
|
|
224
|
+
if (charge.basis === 'none')
|
|
225
|
+
return `${max}: free, because no charge was stated with the completion`;
|
|
226
226
|
return `${max}, as stated${charge.note ? ` (${charge.note})` : ''}${charge.capped ? ', capped at the maximum' : ''}`;
|
|
227
227
|
}
|
|
@@ -159,7 +159,7 @@ export interface UpdateTaskStateData {
|
|
|
159
159
|
* What this task cost, stated with `completed`. Read only when the agreement
|
|
160
160
|
* prices each task at completion (`taskCharge: 'at_completion'`), where it is
|
|
161
161
|
* capped at the agreed maximum and the rest of the reservation goes back to
|
|
162
|
-
* the payer. Omitted there, the task
|
|
162
|
+
* the payer. Omitted there, the task is free.
|
|
163
163
|
*/
|
|
164
164
|
charge?: TaskChargeStatement;
|
|
165
165
|
}
|