@hyperscale0/sdk 1.0.125 → 1.0.128
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/README.md +4 -2
- package/client.d.ts +1 -9
- package/client.js +0 -11
- package/package.json +2 -2
- package/platform.d.ts +8 -7
- package/portal.d.ts +0 -758
package/README.md
CHANGED
|
@@ -28,13 +28,15 @@ const available = await client.call("product.objects.actions", {
|
|
|
28
28
|
});
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Choose the intended action by name
|
|
31
|
+
Choose the intended action by name and check `availability.status`. An
|
|
32
|
+
`unavailable` action lists its `blockers`. A `requires_input` action is runnable
|
|
33
|
+
once you supply what it names in `subjectFields` and `actionInputs`: collect its
|
|
32
34
|
`requiredNow` fields and requirements against `fieldsSchema` and `inputSchema`.
|
|
33
35
|
After that review, execute it with the complete context returned by the server:
|
|
34
36
|
|
|
35
37
|
```js
|
|
36
38
|
const action = available.actions.find((item) => item.name === chosenActionName);
|
|
37
|
-
if (!action || action.availability.status
|
|
39
|
+
if (!action || action.availability.status === "unavailable") {
|
|
38
40
|
throw new Error("The selected action is unavailable");
|
|
39
41
|
}
|
|
40
42
|
const result = await client.call(
|
package/client.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
Operations,
|
|
3
|
+
payment_reminder_delivery_retrieveOutput,
|
|
3
4
|
product_objects_discoverOutput,
|
|
4
5
|
product_instruments_listOutput,
|
|
5
6
|
product_actions_listOutput,
|
|
6
7
|
} from "./platform.js";
|
|
7
8
|
export type * from "./platform.js";
|
|
8
9
|
|
|
9
|
-
import type {
|
|
10
|
-
sandbox_rehearsal_createOutput,
|
|
11
|
-
payment_reminder_delivery_retrieveOutput,
|
|
12
|
-
} from "./portal.js";
|
|
13
|
-
|
|
14
10
|
export interface ClientOptions {
|
|
15
11
|
apiKey?: string;
|
|
16
12
|
sessionToken?: string;
|
|
@@ -26,10 +22,6 @@ export interface ActionInput {
|
|
|
26
22
|
input?: Record<string, unknown>;
|
|
27
23
|
}
|
|
28
24
|
export interface Client {
|
|
29
|
-
rehearse(
|
|
30
|
-
name: string,
|
|
31
|
-
options: { idempotencyKey: string },
|
|
32
|
-
): Promise<sandbox_rehearsal_createOutput>;
|
|
33
25
|
reminderDelivery(
|
|
34
26
|
operationId: string,
|
|
35
27
|
): Promise<payment_reminder_delivery_retrieveOutput>;
|
package/client.js
CHANGED
|
@@ -742,17 +742,6 @@ export function createClient({
|
|
|
742
742
|
? `${productPath}/operations`
|
|
743
743
|
: "/v1/operations";
|
|
744
744
|
return {
|
|
745
|
-
rehearse: (name, { idempotencyKey } = {}) => {
|
|
746
|
-
if (!sessionToken || !idempotencyKey)
|
|
747
|
-
throw new Error(
|
|
748
|
-
"rehearse requires a tenant session and idempotency key",
|
|
749
|
-
);
|
|
750
|
-
return request(
|
|
751
|
-
"/v1/sandbox/rehearsals",
|
|
752
|
-
{ productId, name },
|
|
753
|
-
idempotencyKey,
|
|
754
|
-
);
|
|
755
|
-
},
|
|
756
745
|
reminderDelivery: (operationId) =>
|
|
757
746
|
request(
|
|
758
747
|
`${productPath}/payment-reminders/${encodeURIComponent(operationId)}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.128",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "LicenseRef-Hyperscale-Proprietary",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "d22a6727cbbb9fc59ffc1625b2d162711dccbe98"
|
|
26
26
|
}
|