xytara 3.0.1 → 3.1.1
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/.env.example +3 -1
- package/README.md +76 -7
- package/REAL_PAYMENT_SETUP.md +17 -12
- package/RELEASE_NOTES.md +13 -11
- package/SERVICE_CONTRACT.md +17 -1
- package/START_HERE.md +27 -24
- package/examples/_demo_env.js +40 -0
- package/examples/adapter_review_walkthrough.js +1 -0
- package/examples/export_carried_handoff.js +1 -0
- package/examples/funded_runtime_walkthrough.js +2 -1
- package/examples/partner_launch_walkthrough.js +1 -0
- package/examples/quickstart.js +1341 -1340
- package/fixtures/catalog.js +64 -0
- package/index.js +76 -0
- package/integrations/dispatch.js +3 -1
- package/lib/acp_lane_contract.js +54 -0
- package/lib/adapter_certification_contract.js +130 -0
- package/lib/adapter_depth_contract.js +1 -1
- package/lib/authority_binding_lifecycle_contract.js +182 -0
- package/lib/business_cockpit.js +378 -0
- package/lib/capability_execution_truth.js +4 -1
- package/lib/catalog_family_model.js +3 -0
- package/lib/commerce_client.js +14 -3
- package/lib/commerce_economics.js +2 -1
- package/lib/crypto_agility_matrix.js +125 -0
- package/lib/http_transport.js +3 -2
- package/lib/integration_matrix_contract.js +3 -0
- package/lib/machine_identity_registry_contract.js +199 -0
- package/lib/mcp_lane_contract.js +27 -0
- package/lib/offline_verifiability_recovery_contract.js +155 -0
- package/lib/operational_receipt_contract.js +165 -0
- package/lib/payment_config.js +3 -1
- package/lib/protocol_lane_contract.js +3 -0
- package/lib/public_surface_policy_contract.js +111 -0
- package/lib/signed_audit_provenance_contract.js +83 -0
- package/lib/trust_portability_boundary_contract.js +72 -0
- package/package.json +103 -101
- package/scripts/verify_control_plane_contracts.js +34 -0
- package/scripts/verify_control_plane_routes.js +70 -0
- package/scripts/verify_service.js +222 -24
- package/server.js +370 -15
package/examples/quickstart.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const assert = require("assert");
|
|
4
|
+
const demoEnv = require("./_demo_env");
|
|
4
5
|
const { createServer } = require("../server");
|
|
5
6
|
const {
|
|
6
7
|
createClient,
|
|
7
8
|
exportIntegrationSubmissionBundleSet
|
|
8
9
|
} = require("../index.js");
|
|
9
|
-
|
|
10
|
-
async function main() {
|
|
11
|
-
const server = createServer();
|
|
12
|
-
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
|
13
|
-
const address = server.address();
|
|
14
|
-
const baseUrl = `http://127.0.0.1:${address.port}`;
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
const client = createClient({
|
|
18
|
-
baseUrl,
|
|
19
|
-
apiKey: "demo-api-key",
|
|
20
|
-
walletId: "demo-wallet",
|
|
21
|
-
walletSecret: "demo-wallet-secret",
|
|
22
|
-
accountId: "acct_demo"
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const health = await client.getHealth();
|
|
26
|
-
assert.strictEqual(health.status, "ok", "health missing");
|
|
27
|
-
const healthSummary = await client.getHealthSummary();
|
|
28
|
-
assert.strictEqual(healthSummary.status, "ok", "health summary missing");
|
|
29
|
-
const ready = await client.waitForHealth({
|
|
30
|
-
timeoutMs: 1000,
|
|
31
|
-
pollIntervalMs: 50
|
|
32
|
-
});
|
|
33
|
-
assert.strictEqual(ready.readiness, "ready", "health readiness missing");
|
|
34
|
-
const readySummary = await client.waitForHealthSummary({
|
|
35
|
-
timeoutMs: 1000,
|
|
36
|
-
pollIntervalMs: 50
|
|
37
|
-
});
|
|
38
|
-
assert.strictEqual(readySummary.readiness, "ready", "health summary missing");
|
|
39
|
-
|
|
10
|
+
|
|
11
|
+
async function main() {
|
|
12
|
+
const server = createServer();
|
|
13
|
+
await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));
|
|
14
|
+
const address = server.address();
|
|
15
|
+
const baseUrl = `http://127.0.0.1:${address.port}`;
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
const client = createClient({
|
|
19
|
+
baseUrl,
|
|
20
|
+
apiKey: "demo-api-key",
|
|
21
|
+
walletId: "demo-wallet",
|
|
22
|
+
walletSecret: "demo-wallet-secret",
|
|
23
|
+
accountId: "acct_demo"
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const health = await client.getHealth();
|
|
27
|
+
assert.strictEqual(health.status, "ok", "health missing");
|
|
28
|
+
const healthSummary = await client.getHealthSummary();
|
|
29
|
+
assert.strictEqual(healthSummary.status, "ok", "health summary missing");
|
|
30
|
+
const ready = await client.waitForHealth({
|
|
31
|
+
timeoutMs: 1000,
|
|
32
|
+
pollIntervalMs: 50
|
|
33
|
+
});
|
|
34
|
+
assert.strictEqual(ready.readiness, "ready", "health readiness missing");
|
|
35
|
+
const readySummary = await client.waitForHealthSummary({
|
|
36
|
+
timeoutMs: 1000,
|
|
37
|
+
pollIntervalMs: 50
|
|
38
|
+
});
|
|
39
|
+
assert.strictEqual(readySummary.readiness, "ready", "health summary missing");
|
|
40
|
+
|
|
40
41
|
const summary = await client.fetchCatalogSummary(true);
|
|
41
42
|
assert.strictEqual(typeof summary.task_count, "number", "catalog summary missing");
|
|
42
43
|
assert.strictEqual(Array.isArray(summary.task_refs), true, "catalog summary task refs missing");
|
|
@@ -1051,9 +1052,9 @@ async function main() {
|
|
|
1051
1052
|
assert.strictEqual(settlementProfilesByRequiredInput.length >= 1, true, "settlement required input filter missing");
|
|
1052
1053
|
const settlementProfileSummaries = await client.findSettlementProfileSummaries({ mode: "evm_payment", query: "USDC" }, true);
|
|
1053
1054
|
assert.strictEqual(settlementProfileSummaries.settlement_profile_count >= 1, true, "filtered settlement summaries missing");
|
|
1054
|
-
|
|
1055
|
-
const workflowCatalog = await client.fetchWorkflowCatalog(true);
|
|
1056
|
-
assert.strictEqual(Array.isArray(workflowCatalog.workflows), true, "workflow catalog missing");
|
|
1055
|
+
|
|
1056
|
+
const workflowCatalog = await client.fetchWorkflowCatalog(true);
|
|
1057
|
+
assert.strictEqual(Array.isArray(workflowCatalog.workflows), true, "workflow catalog missing");
|
|
1057
1058
|
const workflowCatalogSummary = await client.fetchWorkflowCatalogSummary(true);
|
|
1058
1059
|
assert.strictEqual(workflowCatalogSummary.workflow_count >= 1, true, "workflow catalog summary missing");
|
|
1059
1060
|
assert.strictEqual(Array.isArray(workflowCatalogSummary.workflow_refs), true, "workflow catalog summary refs missing");
|
|
@@ -1064,10 +1065,10 @@ async function main() {
|
|
|
1064
1065
|
assert.strictEqual(governedWorkflows.length >= 1, true, "filtered workflow discovery missing");
|
|
1065
1066
|
const governedWorkflowSummaries = await client.findWorkflowSummaries({ latency_class: "governed_async", task_ref: "settlement.submit" }, true);
|
|
1066
1067
|
assert.strictEqual(governedWorkflowSummaries.workflow_count >= 1, true, "filtered workflow summaries missing");
|
|
1067
|
-
const workflows = await client.getWorkflows(["policy.transaction.flow", "trust.flow"], true);
|
|
1068
|
-
assert.strictEqual(workflows.length, 2, "workflow batch lookup missing");
|
|
1069
|
-
const workflowSummary = await client.getWorkflowSummary("policy.transaction.flow", true);
|
|
1070
|
-
assert.strictEqual(workflowSummary.workflow_ref, "policy.transaction.flow", "workflow summary missing");
|
|
1068
|
+
const workflows = await client.getWorkflows(["policy.transaction.flow", "trust.flow"], true);
|
|
1069
|
+
assert.strictEqual(workflows.length, 2, "workflow batch lookup missing");
|
|
1070
|
+
const workflowSummary = await client.getWorkflowSummary("policy.transaction.flow", true);
|
|
1071
|
+
assert.strictEqual(workflowSummary.workflow_ref, "policy.transaction.flow", "workflow summary missing");
|
|
1071
1072
|
const workflowSummaries = await client.getWorkflowSummaries(["policy.transaction.flow", "trust.flow"], true);
|
|
1072
1073
|
assert.strictEqual(workflowSummaries.workflow_count, 2, "workflow summaries missing");
|
|
1073
1074
|
const normalizedWorkflowSummaries = await client.getWorkflowSummaries([" policy.transaction.flow ", "", "trust.flow "], true);
|
|
@@ -1138,12 +1139,12 @@ async function main() {
|
|
|
1138
1139
|
const taskSchemaSummaries = await client.getTaskSchemaSummaries(["trust.verify", "settlement.submit"], true);
|
|
1139
1140
|
assert.strictEqual(taskSchemaSummaries.task_count, 2, "task schema summaries missing");
|
|
1140
1141
|
assert.strictEqual(Array.isArray(taskSchemaSummaries.task_refs), true, "task schema summary refs missing");
|
|
1141
|
-
const workflowSchema = await client.getWorkflowSchema("policy.transaction.flow", true);
|
|
1142
|
-
assert.strictEqual(workflowSchema.task_count, 2, "workflow schema missing");
|
|
1143
|
-
const workflowSchemaSummary = await client.getWorkflowSchemaSummary("policy.transaction.flow", true);
|
|
1144
|
-
assert.strictEqual(workflowSchemaSummary.task_count, 2, "workflow schema summary missing");
|
|
1145
|
-
const workflowSchemas = await client.getWorkflowSchemas(["policy.transaction.flow", "trust.flow"], true);
|
|
1146
|
-
assert.strictEqual(workflowSchemas.workflow_count, 2, "workflow schemas missing");
|
|
1142
|
+
const workflowSchema = await client.getWorkflowSchema("policy.transaction.flow", true);
|
|
1143
|
+
assert.strictEqual(workflowSchema.task_count, 2, "workflow schema missing");
|
|
1144
|
+
const workflowSchemaSummary = await client.getWorkflowSchemaSummary("policy.transaction.flow", true);
|
|
1145
|
+
assert.strictEqual(workflowSchemaSummary.task_count, 2, "workflow schema summary missing");
|
|
1146
|
+
const workflowSchemas = await client.getWorkflowSchemas(["policy.transaction.flow", "trust.flow"], true);
|
|
1147
|
+
assert.strictEqual(workflowSchemas.workflow_count, 2, "workflow schemas missing");
|
|
1147
1148
|
const workflowSchemaSummaries = await client.getWorkflowSchemaSummaries(["policy.transaction.flow", "trust.flow"], true);
|
|
1148
1149
|
assert.strictEqual(workflowSchemaSummaries.workflow_count, 2, "workflow schema summaries missing");
|
|
1149
1150
|
assert.strictEqual(Array.isArray(workflowSchemaSummaries.workflow_refs), true, "workflow schema summary refs missing");
|
|
@@ -1154,24 +1155,24 @@ async function main() {
|
|
|
1154
1155
|
const taskTemplateSummaries = await client.getTaskTemplateSummaries(["trust.verify", "settlement.submit"], true);
|
|
1155
1156
|
assert.strictEqual(taskTemplateSummaries.task_count, 2, "task template summaries missing");
|
|
1156
1157
|
assert.strictEqual(Array.isArray(taskTemplateSummaries.task_refs), true, "task template summary refs missing");
|
|
1157
|
-
const workflowTemplate = await client.getWorkflowTemplate("policy.transaction.flow", true);
|
|
1158
|
-
assert.strictEqual(workflowTemplate.task_count, 2, "workflow template missing");
|
|
1159
|
-
assert.strictEqual(Array.isArray(workflowTemplate.tasks), true, "workflow template tasks missing");
|
|
1160
|
-
const workflowTemplateSummary = await client.getWorkflowTemplateSummary("policy.transaction.flow", true);
|
|
1161
|
-
assert.strictEqual(workflowTemplateSummary.task_count, 2, "workflow template summary missing");
|
|
1162
|
-
const workflowTemplates = await client.getWorkflowTemplates(["policy.transaction.flow", "trust.flow"], true);
|
|
1163
|
-
assert.strictEqual(workflowTemplates.length, 2, "workflow templates missing");
|
|
1158
|
+
const workflowTemplate = await client.getWorkflowTemplate("policy.transaction.flow", true);
|
|
1159
|
+
assert.strictEqual(workflowTemplate.task_count, 2, "workflow template missing");
|
|
1160
|
+
assert.strictEqual(Array.isArray(workflowTemplate.tasks), true, "workflow template tasks missing");
|
|
1161
|
+
const workflowTemplateSummary = await client.getWorkflowTemplateSummary("policy.transaction.flow", true);
|
|
1162
|
+
assert.strictEqual(workflowTemplateSummary.task_count, 2, "workflow template summary missing");
|
|
1163
|
+
const workflowTemplates = await client.getWorkflowTemplates(["policy.transaction.flow", "trust.flow"], true);
|
|
1164
|
+
assert.strictEqual(workflowTemplates.length, 2, "workflow templates missing");
|
|
1164
1165
|
const workflowTemplateSummaries = await client.getWorkflowTemplateSummaries(["policy.transaction.flow", "trust.flow"], true);
|
|
1165
1166
|
assert.strictEqual(workflowTemplateSummaries.workflow_count, 2, "workflow template summaries missing");
|
|
1166
1167
|
assert.strictEqual(Array.isArray(workflowTemplateSummaries.workflow_refs), true, "workflow template summary refs missing");
|
|
1167
|
-
const taskBodyValidationSummary = await client.validateTaskBodySummary("trust.verify", { subject_id: "subject-valid" }, true);
|
|
1168
|
-
assert.strictEqual(taskBodyValidationSummary.ok, true, "task body validation summary missing");
|
|
1169
|
-
const taskSetValidationSummary = await client.validateTaskSetSummary([
|
|
1170
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-valid" } },
|
|
1171
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-valid" } }
|
|
1172
|
-
], true);
|
|
1173
|
-
assert.strictEqual(taskSetValidationSummary.ok, true, "task set validation summary missing");
|
|
1174
|
-
const taskSetValidationSummaries = await client.validateTaskSetSummaries([
|
|
1168
|
+
const taskBodyValidationSummary = await client.validateTaskBodySummary("trust.verify", { subject_id: "subject-valid" }, true);
|
|
1169
|
+
assert.strictEqual(taskBodyValidationSummary.ok, true, "task body validation summary missing");
|
|
1170
|
+
const taskSetValidationSummary = await client.validateTaskSetSummary([
|
|
1171
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-valid" } },
|
|
1172
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-valid" } }
|
|
1173
|
+
], true);
|
|
1174
|
+
assert.strictEqual(taskSetValidationSummary.ok, true, "task set validation summary missing");
|
|
1175
|
+
const taskSetValidationSummaries = await client.validateTaskSetSummaries([
|
|
1175
1176
|
{
|
|
1176
1177
|
task_set_id: "trust_validation_batch",
|
|
1177
1178
|
tasks: [
|
|
@@ -1193,13 +1194,13 @@ async function main() {
|
|
|
1193
1194
|
}
|
|
1194
1195
|
}
|
|
1195
1196
|
], { forceRefreshCatalog: true });
|
|
1196
|
-
assert.strictEqual(taskSetValidationSummaries.task_set_count, 2, "task set validation summaries missing");
|
|
1197
|
-
const workflowValidationSummary = await client.validateWorkflowTaskSetSummary("policy.transaction.flow", {
|
|
1198
|
-
"policy.simulate": { policy: "policy-valid" },
|
|
1199
|
-
"settlement.submit": { intent_id: "intent-valid" }
|
|
1200
|
-
}, { forceRefreshCatalog: true });
|
|
1201
|
-
assert.strictEqual(workflowValidationSummary.ok, true, "workflow task-set validation summary missing");
|
|
1202
|
-
const workflowValidationSummaries = await client.validateWorkflowTaskSetsSummaries([
|
|
1197
|
+
assert.strictEqual(taskSetValidationSummaries.task_set_count, 2, "task set validation summaries missing");
|
|
1198
|
+
const workflowValidationSummary = await client.validateWorkflowTaskSetSummary("policy.transaction.flow", {
|
|
1199
|
+
"policy.simulate": { policy: "policy-valid" },
|
|
1200
|
+
"settlement.submit": { intent_id: "intent-valid" }
|
|
1201
|
+
}, { forceRefreshCatalog: true });
|
|
1202
|
+
assert.strictEqual(workflowValidationSummary.ok, true, "workflow task-set validation summary missing");
|
|
1203
|
+
const workflowValidationSummaries = await client.validateWorkflowTaskSetsSummaries([
|
|
1203
1204
|
{
|
|
1204
1205
|
workflow_ref: "policy.transaction.flow",
|
|
1205
1206
|
task_bodies_by_ref: {
|
|
@@ -1221,30 +1222,30 @@ async function main() {
|
|
|
1221
1222
|
}
|
|
1222
1223
|
}
|
|
1223
1224
|
], { forceRefreshCatalog: true });
|
|
1224
|
-
assert.strictEqual(workflowValidationSummaries.workflow_count, 2, "workflow task-set validation summaries missing");
|
|
1225
|
-
const ensuredWorkflowTaskSet = await client.ensureWorkflowTaskSetValid("policy.transaction.flow", {
|
|
1226
|
-
"policy.simulate": { policy: "policy-valid" },
|
|
1227
|
-
"settlement.submit": { intent_id: "intent-valid" }
|
|
1228
|
-
}, { forceRefreshCatalog: true });
|
|
1229
|
-
assert.strictEqual(ensuredWorkflowTaskSet.length, 2, "workflow task-set ensure missing");
|
|
1230
|
-
const ensuredWorkflowTaskSets = await client.ensureWorkflowTaskSetsValid([
|
|
1231
|
-
{
|
|
1232
|
-
workflow_ref: "policy.transaction.flow",
|
|
1233
|
-
task_bodies_by_ref: {
|
|
1234
|
-
"policy.simulate": { policy: "policy-valid-batch-ensure" },
|
|
1235
|
-
"settlement.submit": { intent_id: "intent-valid-batch-ensure" }
|
|
1236
|
-
}
|
|
1237
|
-
},
|
|
1238
|
-
{
|
|
1239
|
-
workflow_ref: "trust.flow",
|
|
1240
|
-
task_bodies_by_ref: {
|
|
1241
|
-
"trust.verify": { subject_id: "subject-valid-batch-ensure" },
|
|
1242
|
-
"receipt.validate": { receipt_id: "rcpt-valid-batch-ensure" }
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
], { forceRefreshCatalog: true });
|
|
1246
|
-
assert.strictEqual(ensuredWorkflowTaskSets.length, 2, "workflow task-set batch ensure missing");
|
|
1247
|
-
const ensuredTaskSets = await client.ensureTaskSetsValid([
|
|
1225
|
+
assert.strictEqual(workflowValidationSummaries.workflow_count, 2, "workflow task-set validation summaries missing");
|
|
1226
|
+
const ensuredWorkflowTaskSet = await client.ensureWorkflowTaskSetValid("policy.transaction.flow", {
|
|
1227
|
+
"policy.simulate": { policy: "policy-valid" },
|
|
1228
|
+
"settlement.submit": { intent_id: "intent-valid" }
|
|
1229
|
+
}, { forceRefreshCatalog: true });
|
|
1230
|
+
assert.strictEqual(ensuredWorkflowTaskSet.length, 2, "workflow task-set ensure missing");
|
|
1231
|
+
const ensuredWorkflowTaskSets = await client.ensureWorkflowTaskSetsValid([
|
|
1232
|
+
{
|
|
1233
|
+
workflow_ref: "policy.transaction.flow",
|
|
1234
|
+
task_bodies_by_ref: {
|
|
1235
|
+
"policy.simulate": { policy: "policy-valid-batch-ensure" },
|
|
1236
|
+
"settlement.submit": { intent_id: "intent-valid-batch-ensure" }
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
workflow_ref: "trust.flow",
|
|
1241
|
+
task_bodies_by_ref: {
|
|
1242
|
+
"trust.verify": { subject_id: "subject-valid-batch-ensure" },
|
|
1243
|
+
"receipt.validate": { receipt_id: "rcpt-valid-batch-ensure" }
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
], { forceRefreshCatalog: true });
|
|
1247
|
+
assert.strictEqual(ensuredWorkflowTaskSets.length, 2, "workflow task-set batch ensure missing");
|
|
1248
|
+
const ensuredTaskSets = await client.ensureTaskSetsValid([
|
|
1248
1249
|
{
|
|
1249
1250
|
task_set_id: "trust_validation_ensure_batch",
|
|
1250
1251
|
tasks: [
|
|
@@ -1266,27 +1267,27 @@ async function main() {
|
|
|
1266
1267
|
}
|
|
1267
1268
|
}
|
|
1268
1269
|
], { forceRefreshCatalog: true });
|
|
1269
|
-
assert.strictEqual(ensuredTaskSets.length, 2, "task-set batch ensure missing");
|
|
1270
|
-
const executionValidationSummary = await client.validateExecutionPayloadSummary({
|
|
1271
|
-
command: "quickstart-validate",
|
|
1272
|
-
task_ref: "trust.verify",
|
|
1273
|
-
body: { subject_id: "subject-valid" }
|
|
1274
|
-
}, true);
|
|
1275
|
-
assert.strictEqual(executionValidationSummary.ok, true, "execution validation summary missing");
|
|
1276
|
-
const workflowPreview = await client.previewWorkflowQuote("policy.transaction.flow", {
|
|
1277
|
-
"policy.simulate": { policy: "policy-preview" },
|
|
1278
|
-
"settlement.submit": { intent_id: "intent-preview" }
|
|
1279
|
-
}, {
|
|
1280
|
-
command: "quickstart-workflow-preview"
|
|
1281
|
-
});
|
|
1282
|
-
assert.strictEqual(client.summarizeQuotePreview(workflowPreview).quote.task_count, 2, "workflow preview missing");
|
|
1283
|
-
const workflowPreviewSummary = await client.previewWorkflowQuoteSummary("policy.transaction.flow", {
|
|
1284
|
-
"policy.simulate": { policy: "policy-preview" },
|
|
1285
|
-
"settlement.submit": { intent_id: "intent-preview" }
|
|
1286
|
-
}, {
|
|
1287
|
-
command: "quickstart-workflow-preview"
|
|
1288
|
-
});
|
|
1289
|
-
assert.strictEqual(workflowPreviewSummary.quote.task_count, 2, "workflow preview summary missing");
|
|
1270
|
+
assert.strictEqual(ensuredTaskSets.length, 2, "task-set batch ensure missing");
|
|
1271
|
+
const executionValidationSummary = await client.validateExecutionPayloadSummary({
|
|
1272
|
+
command: "quickstart-validate",
|
|
1273
|
+
task_ref: "trust.verify",
|
|
1274
|
+
body: { subject_id: "subject-valid" }
|
|
1275
|
+
}, true);
|
|
1276
|
+
assert.strictEqual(executionValidationSummary.ok, true, "execution validation summary missing");
|
|
1277
|
+
const workflowPreview = await client.previewWorkflowQuote("policy.transaction.flow", {
|
|
1278
|
+
"policy.simulate": { policy: "policy-preview" },
|
|
1279
|
+
"settlement.submit": { intent_id: "intent-preview" }
|
|
1280
|
+
}, {
|
|
1281
|
+
command: "quickstart-workflow-preview"
|
|
1282
|
+
});
|
|
1283
|
+
assert.strictEqual(client.summarizeQuotePreview(workflowPreview).quote.task_count, 2, "workflow preview missing");
|
|
1284
|
+
const workflowPreviewSummary = await client.previewWorkflowQuoteSummary("policy.transaction.flow", {
|
|
1285
|
+
"policy.simulate": { policy: "policy-preview" },
|
|
1286
|
+
"settlement.submit": { intent_id: "intent-preview" }
|
|
1287
|
+
}, {
|
|
1288
|
+
command: "quickstart-workflow-preview"
|
|
1289
|
+
});
|
|
1290
|
+
assert.strictEqual(workflowPreviewSummary.quote.task_count, 2, "workflow preview summary missing");
|
|
1290
1291
|
const workflowPreviewSummaries = await client.previewWorkflowQuoteSummaries([
|
|
1291
1292
|
{
|
|
1292
1293
|
workflow_ref: "policy.transaction.flow",
|
|
@@ -1336,40 +1337,40 @@ async function main() {
|
|
|
1336
1337
|
]);
|
|
1337
1338
|
assert.strictEqual(workflowPreviewBatch.length, 2, "workflow preview batch missing");
|
|
1338
1339
|
assert.strictEqual(workflowPreviewBatch[0].preview.quote.task_count >= 1, true, "workflow preview batch preview missing");
|
|
1339
|
-
const taskSetPreview = await client.previewTaskSetQuote([
|
|
1340
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-preview" } },
|
|
1341
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-preview" } }
|
|
1342
|
-
], {
|
|
1343
|
-
command: "quickstart-task-set-preview"
|
|
1344
|
-
});
|
|
1345
|
-
assert.strictEqual(client.summarizeQuotePreview(taskSetPreview).quote.task_count, 2, "task-set preview missing");
|
|
1346
|
-
const taskSetPreviewSummary = await client.previewTaskSetQuoteSummary([
|
|
1347
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-preview-summary" } },
|
|
1348
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-preview-summary" } }
|
|
1349
|
-
], {
|
|
1350
|
-
command: "quickstart-task-set-preview-summary"
|
|
1351
|
-
});
|
|
1352
|
-
assert.strictEqual(taskSetPreviewSummary.quote.task_count, 2, "task-set preview summary missing");
|
|
1340
|
+
const taskSetPreview = await client.previewTaskSetQuote([
|
|
1341
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-preview" } },
|
|
1342
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-preview" } }
|
|
1343
|
+
], {
|
|
1344
|
+
command: "quickstart-task-set-preview"
|
|
1345
|
+
});
|
|
1346
|
+
assert.strictEqual(client.summarizeQuotePreview(taskSetPreview).quote.task_count, 2, "task-set preview missing");
|
|
1347
|
+
const taskSetPreviewSummary = await client.previewTaskSetQuoteSummary([
|
|
1348
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-preview-summary" } },
|
|
1349
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-preview-summary" } }
|
|
1350
|
+
], {
|
|
1351
|
+
command: "quickstart-task-set-preview-summary"
|
|
1352
|
+
});
|
|
1353
|
+
assert.strictEqual(taskSetPreviewSummary.quote.task_count, 2, "task-set preview summary missing");
|
|
1353
1354
|
const taskSetPreviewSummaries = await client.previewTaskSetQuoteSummaries([
|
|
1354
1355
|
{
|
|
1355
1356
|
task_set_id: "policy_set_preview_batch",
|
|
1356
1357
|
tasks: [
|
|
1357
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-preview-batch" } },
|
|
1358
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-preview-batch" } }
|
|
1359
|
-
],
|
|
1360
|
-
options: {
|
|
1361
|
-
command: "quickstart-task-set-preview-batch"
|
|
1362
|
-
}
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
task_set_id: "trust_set_preview_batch",
|
|
1366
|
-
tasks: [
|
|
1367
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-preview-batch" } },
|
|
1368
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-preview-batch" } }
|
|
1369
|
-
],
|
|
1370
|
-
options: {
|
|
1371
|
-
command: "quickstart-task-set-preview-batch-trust"
|
|
1372
|
-
}
|
|
1358
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-preview-batch" } },
|
|
1359
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-preview-batch" } }
|
|
1360
|
+
],
|
|
1361
|
+
options: {
|
|
1362
|
+
command: "quickstart-task-set-preview-batch"
|
|
1363
|
+
}
|
|
1364
|
+
},
|
|
1365
|
+
{
|
|
1366
|
+
task_set_id: "trust_set_preview_batch",
|
|
1367
|
+
tasks: [
|
|
1368
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-preview-batch" } },
|
|
1369
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-preview-batch" } }
|
|
1370
|
+
],
|
|
1371
|
+
options: {
|
|
1372
|
+
command: "quickstart-task-set-preview-batch-trust"
|
|
1373
|
+
}
|
|
1373
1374
|
}
|
|
1374
1375
|
]);
|
|
1375
1376
|
assert.strictEqual(taskSetPreviewSummaries.task_set_count, 2, "task-set preview summaries missing");
|
|
@@ -1391,20 +1392,20 @@ async function main() {
|
|
|
1391
1392
|
]);
|
|
1392
1393
|
assert.strictEqual(taskSetPreviewBatch.length, 2, "task-set preview batch missing");
|
|
1393
1394
|
assert.strictEqual(taskSetPreviewBatch[0].preview.quote.task_count >= 1, true, "task-set preview batch preview missing");
|
|
1394
|
-
const workflowQuote = await client.createWorkflowQuote("policy.transaction.flow", {
|
|
1395
|
-
"policy.simulate": { policy: "policy-workflow-quote" },
|
|
1396
|
-
"settlement.submit": { intent_id: "intent-workflow-quote" }
|
|
1397
|
-
}, {
|
|
1398
|
-
command: "quickstart-workflow-quote"
|
|
1399
|
-
});
|
|
1400
|
-
assert.strictEqual(workflowQuote.quote.task_count, 2, "workflow quote missing");
|
|
1401
|
-
const workflowQuoteSummary = await client.createWorkflowQuoteSummary("policy.transaction.flow", {
|
|
1402
|
-
"policy.simulate": { policy: "policy-workflow-quote-summary" },
|
|
1403
|
-
"settlement.submit": { intent_id: "intent-workflow-quote-summary" }
|
|
1404
|
-
}, {
|
|
1405
|
-
command: "quickstart-workflow-quote-summary"
|
|
1406
|
-
});
|
|
1407
|
-
assert.strictEqual(workflowQuoteSummary.task_count, 2, "workflow quote summary missing");
|
|
1395
|
+
const workflowQuote = await client.createWorkflowQuote("policy.transaction.flow", {
|
|
1396
|
+
"policy.simulate": { policy: "policy-workflow-quote" },
|
|
1397
|
+
"settlement.submit": { intent_id: "intent-workflow-quote" }
|
|
1398
|
+
}, {
|
|
1399
|
+
command: "quickstart-workflow-quote"
|
|
1400
|
+
});
|
|
1401
|
+
assert.strictEqual(workflowQuote.quote.task_count, 2, "workflow quote missing");
|
|
1402
|
+
const workflowQuoteSummary = await client.createWorkflowQuoteSummary("policy.transaction.flow", {
|
|
1403
|
+
"policy.simulate": { policy: "policy-workflow-quote-summary" },
|
|
1404
|
+
"settlement.submit": { intent_id: "intent-workflow-quote-summary" }
|
|
1405
|
+
}, {
|
|
1406
|
+
command: "quickstart-workflow-quote-summary"
|
|
1407
|
+
});
|
|
1408
|
+
assert.strictEqual(workflowQuoteSummary.task_count, 2, "workflow quote summary missing");
|
|
1408
1409
|
const workflowQuoteSummaries = await client.createWorkflowQuoteSummaries([
|
|
1409
1410
|
{
|
|
1410
1411
|
workflow_ref: "policy.transaction.flow",
|
|
@@ -1454,40 +1455,40 @@ async function main() {
|
|
|
1454
1455
|
]);
|
|
1455
1456
|
assert.strictEqual(workflowQuoteBatch.length, 2, "workflow quote batch missing");
|
|
1456
1457
|
assert.strictEqual(workflowQuoteBatch[0].quote.quote.task_count >= 1, true, "workflow quote batch quote missing");
|
|
1457
|
-
const taskSetQuote = await client.createTaskSetQuote([
|
|
1458
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-quote" } },
|
|
1459
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-quote" } }
|
|
1460
|
-
], {
|
|
1461
|
-
command: "quickstart-task-set-quote"
|
|
1462
|
-
});
|
|
1463
|
-
assert.strictEqual(taskSetQuote.quote.task_count, 2, "task-set quote missing");
|
|
1464
|
-
const taskSetQuoteSummary = await client.createTaskSetQuoteSummary([
|
|
1465
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-quote-summary" } },
|
|
1466
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-quote-summary" } }
|
|
1467
|
-
], {
|
|
1468
|
-
command: "quickstart-task-set-quote-summary"
|
|
1469
|
-
});
|
|
1470
|
-
assert.strictEqual(taskSetQuoteSummary.task_count, 2, "task-set quote summary missing");
|
|
1458
|
+
const taskSetQuote = await client.createTaskSetQuote([
|
|
1459
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-quote" } },
|
|
1460
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-quote" } }
|
|
1461
|
+
], {
|
|
1462
|
+
command: "quickstart-task-set-quote"
|
|
1463
|
+
});
|
|
1464
|
+
assert.strictEqual(taskSetQuote.quote.task_count, 2, "task-set quote missing");
|
|
1465
|
+
const taskSetQuoteSummary = await client.createTaskSetQuoteSummary([
|
|
1466
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-quote-summary" } },
|
|
1467
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-quote-summary" } }
|
|
1468
|
+
], {
|
|
1469
|
+
command: "quickstart-task-set-quote-summary"
|
|
1470
|
+
});
|
|
1471
|
+
assert.strictEqual(taskSetQuoteSummary.task_count, 2, "task-set quote summary missing");
|
|
1471
1472
|
const taskSetQuoteSummaries = await client.createTaskSetQuoteSummaries([
|
|
1472
1473
|
{
|
|
1473
1474
|
task_set_id: "policy_set_quote_batch",
|
|
1474
1475
|
tasks: [
|
|
1475
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-quote-batch" } },
|
|
1476
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-quote-batch" } }
|
|
1477
|
-
],
|
|
1478
|
-
options: {
|
|
1479
|
-
command: "quickstart-task-set-quote-batch"
|
|
1480
|
-
}
|
|
1481
|
-
},
|
|
1482
|
-
{
|
|
1483
|
-
task_set_id: "trust_set_quote_batch",
|
|
1484
|
-
tasks: [
|
|
1485
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-quote-batch" } },
|
|
1486
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-quote-batch" } }
|
|
1487
|
-
],
|
|
1488
|
-
options: {
|
|
1489
|
-
command: "quickstart-task-set-quote-batch-trust"
|
|
1490
|
-
}
|
|
1476
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-quote-batch" } },
|
|
1477
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-quote-batch" } }
|
|
1478
|
+
],
|
|
1479
|
+
options: {
|
|
1480
|
+
command: "quickstart-task-set-quote-batch"
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
task_set_id: "trust_set_quote_batch",
|
|
1485
|
+
tasks: [
|
|
1486
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-quote-batch" } },
|
|
1487
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-quote-batch" } }
|
|
1488
|
+
],
|
|
1489
|
+
options: {
|
|
1490
|
+
command: "quickstart-task-set-quote-batch-trust"
|
|
1491
|
+
}
|
|
1491
1492
|
}
|
|
1492
1493
|
]);
|
|
1493
1494
|
assert.strictEqual(taskSetQuoteSummaries.task_set_count, 2, "task-set quote summaries missing");
|
|
@@ -1509,14 +1510,14 @@ async function main() {
|
|
|
1509
1510
|
]);
|
|
1510
1511
|
assert.strictEqual(taskSetQuoteBatch.length, 2, "task-set quote batch missing");
|
|
1511
1512
|
assert.strictEqual(taskSetQuoteBatch[0].quote.quote.task_count >= 1, true, "task-set quote batch quote missing");
|
|
1512
|
-
const workflowExecutionSummary = await client.executeWorkflowSummary("policy.transaction.flow", {
|
|
1513
|
-
"policy.simulate": { policy: "policy-summary" },
|
|
1514
|
-
"settlement.submit": { intent_id: "intent-summary" }
|
|
1515
|
-
}, {
|
|
1516
|
-
command: "quickstart-workflow-summary"
|
|
1517
|
-
});
|
|
1518
|
-
assert.strictEqual(workflowExecutionSummary.transaction.task_count >= 1, true, "workflow execution summary missing");
|
|
1519
|
-
const workflowExecutionSummaries = await client.executeWorkflowSummaries([
|
|
1513
|
+
const workflowExecutionSummary = await client.executeWorkflowSummary("policy.transaction.flow", {
|
|
1514
|
+
"policy.simulate": { policy: "policy-summary" },
|
|
1515
|
+
"settlement.submit": { intent_id: "intent-summary" }
|
|
1516
|
+
}, {
|
|
1517
|
+
command: "quickstart-workflow-summary"
|
|
1518
|
+
});
|
|
1519
|
+
assert.strictEqual(workflowExecutionSummary.transaction.task_count >= 1, true, "workflow execution summary missing");
|
|
1520
|
+
const workflowExecutionSummaries = await client.executeWorkflowSummaries([
|
|
1520
1521
|
{
|
|
1521
1522
|
workflow_ref: "policy.transaction.flow",
|
|
1522
1523
|
task_bodies_by_ref: {
|
|
@@ -1539,9 +1540,9 @@ async function main() {
|
|
|
1539
1540
|
}
|
|
1540
1541
|
], {
|
|
1541
1542
|
command: "quickstart-workflow-summary-batch"
|
|
1542
|
-
});
|
|
1543
|
-
assert.strictEqual(workflowExecutionSummaries.workflow_count, 2, "workflow execution summaries missing");
|
|
1544
|
-
|
|
1543
|
+
});
|
|
1544
|
+
assert.strictEqual(workflowExecutionSummaries.workflow_count, 2, "workflow execution summaries missing");
|
|
1545
|
+
|
|
1545
1546
|
const quote = await client.createExecutionQuote({
|
|
1546
1547
|
command: "quickstart",
|
|
1547
1548
|
task_ref: "trust.verify",
|
|
@@ -1553,56 +1554,56 @@ async function main() {
|
|
|
1553
1554
|
assert.strictEqual(quote.quote.treasury.status, "pending_payment", "quote treasury status missing");
|
|
1554
1555
|
assert.strictEqual(typeof quote.quote.default_path.path_kind, "string", "quote default path kind missing");
|
|
1555
1556
|
assert.strictEqual(typeof quote.quote.default_path.treasury_destination_id, "string", "quote default path treasury destination missing");
|
|
1556
|
-
const genericQuoteSummary = await client.createPaymentQuoteSummary({
|
|
1557
|
-
command: "quickstart-generic-quote-summary",
|
|
1558
|
-
task_ref: "trust.verify",
|
|
1559
|
-
body: { subject_id: "subject-generic-quote-summary" }
|
|
1560
|
-
});
|
|
1561
|
-
assert.strictEqual(genericQuoteSummary.task_count >= 1, true, "generic quote summary missing");
|
|
1562
|
-
const quoteSummary = await client.createExecutionQuoteSummary({
|
|
1563
|
-
command: "quickstart-summary-quote",
|
|
1564
|
-
task_ref: "trust.verify",
|
|
1565
|
-
body: { subject_id: "subject-quote-summary" }
|
|
1566
|
-
});
|
|
1567
|
-
assert.strictEqual(quoteSummary.task_count >= 1, true, "execution quote summary missing");
|
|
1568
|
-
const quoteDetail = await client.getPaymentQuote(quote.quote.quote_id);
|
|
1569
|
-
assert.strictEqual(quoteDetail.quote.status, "quoted", "quote detail missing");
|
|
1570
|
-
const nativePreview = await client.previewExecutionQuote({
|
|
1571
|
-
command: "quickstart-preview",
|
|
1572
|
-
task_ref: "trust.verify",
|
|
1573
|
-
body: { subject_id: "subject-preview-1" }
|
|
1574
|
-
});
|
|
1575
|
-
assert.strictEqual(client.summarizeQuotePreview(nativePreview).quote.task_count >= 1, true, "native preview missing");
|
|
1576
|
-
const nativePreviewSummary = await client.previewExecutionQuoteSummary({
|
|
1577
|
-
command: "quickstart-preview",
|
|
1578
|
-
task_ref: "trust.verify",
|
|
1579
|
-
body: { subject_id: "subject-preview-1" }
|
|
1580
|
-
});
|
|
1581
|
-
assert.strictEqual(nativePreviewSummary.quote.task_count >= 1, true, "native preview summary missing");
|
|
1582
|
-
const executionSummary = await client.executeSummary({
|
|
1583
|
-
command: "quickstart-summary",
|
|
1584
|
-
task_ref: "trust.verify",
|
|
1585
|
-
body: { subject_id: "subject-summary" }
|
|
1586
|
-
});
|
|
1587
|
-
assert.strictEqual(executionSummary.transaction.transaction_id !== null, true, "execution summary missing");
|
|
1588
|
-
const settledExecutionSummary = await client.executeAndWaitSummary({
|
|
1589
|
-
command: "quickstart-summary-wait",
|
|
1590
|
-
task_ref: "trust.verify",
|
|
1591
|
-
body: { subject_id: "subject-summary-wait" }
|
|
1592
|
-
}, {
|
|
1593
|
-
defer_completion: true,
|
|
1594
|
-
timeoutMs: 5000,
|
|
1595
|
-
pollIntervalMs: 100
|
|
1596
|
-
});
|
|
1597
|
-
assert.strictEqual(settledExecutionSummary.delivery_status, "delivered", "execution wait summary missing");
|
|
1557
|
+
const genericQuoteSummary = await client.createPaymentQuoteSummary({
|
|
1558
|
+
command: "quickstart-generic-quote-summary",
|
|
1559
|
+
task_ref: "trust.verify",
|
|
1560
|
+
body: { subject_id: "subject-generic-quote-summary" }
|
|
1561
|
+
});
|
|
1562
|
+
assert.strictEqual(genericQuoteSummary.task_count >= 1, true, "generic quote summary missing");
|
|
1563
|
+
const quoteSummary = await client.createExecutionQuoteSummary({
|
|
1564
|
+
command: "quickstart-summary-quote",
|
|
1565
|
+
task_ref: "trust.verify",
|
|
1566
|
+
body: { subject_id: "subject-quote-summary" }
|
|
1567
|
+
});
|
|
1568
|
+
assert.strictEqual(quoteSummary.task_count >= 1, true, "execution quote summary missing");
|
|
1569
|
+
const quoteDetail = await client.getPaymentQuote(quote.quote.quote_id);
|
|
1570
|
+
assert.strictEqual(quoteDetail.quote.status, "quoted", "quote detail missing");
|
|
1571
|
+
const nativePreview = await client.previewExecutionQuote({
|
|
1572
|
+
command: "quickstart-preview",
|
|
1573
|
+
task_ref: "trust.verify",
|
|
1574
|
+
body: { subject_id: "subject-preview-1" }
|
|
1575
|
+
});
|
|
1576
|
+
assert.strictEqual(client.summarizeQuotePreview(nativePreview).quote.task_count >= 1, true, "native preview missing");
|
|
1577
|
+
const nativePreviewSummary = await client.previewExecutionQuoteSummary({
|
|
1578
|
+
command: "quickstart-preview",
|
|
1579
|
+
task_ref: "trust.verify",
|
|
1580
|
+
body: { subject_id: "subject-preview-1" }
|
|
1581
|
+
});
|
|
1582
|
+
assert.strictEqual(nativePreviewSummary.quote.task_count >= 1, true, "native preview summary missing");
|
|
1583
|
+
const executionSummary = await client.executeSummary({
|
|
1584
|
+
command: "quickstart-summary",
|
|
1585
|
+
task_ref: "trust.verify",
|
|
1586
|
+
body: { subject_id: "subject-summary" }
|
|
1587
|
+
});
|
|
1588
|
+
assert.strictEqual(executionSummary.transaction.transaction_id !== null, true, "execution summary missing");
|
|
1589
|
+
const settledExecutionSummary = await client.executeAndWaitSummary({
|
|
1590
|
+
command: "quickstart-summary-wait",
|
|
1591
|
+
task_ref: "trust.verify",
|
|
1592
|
+
body: { subject_id: "subject-summary-wait" }
|
|
1593
|
+
}, {
|
|
1594
|
+
defer_completion: true,
|
|
1595
|
+
timeoutMs: 5000,
|
|
1596
|
+
pollIntervalMs: 100
|
|
1597
|
+
});
|
|
1598
|
+
assert.strictEqual(settledExecutionSummary.delivery_status, "delivered", "execution wait summary missing");
|
|
1598
1599
|
const settledExecutionActivitySummary = await client.executeAndWaitActivitySummary({
|
|
1599
1600
|
command: "quickstart-summary-wait-activity",
|
|
1600
1601
|
task_ref: "settlement.submit",
|
|
1601
1602
|
body: { intent_id: "intent-quickstart-summary-wait-activity" },
|
|
1602
1603
|
defer_completion: true
|
|
1603
|
-
}, {
|
|
1604
|
-
timeoutMs: 5000,
|
|
1605
|
-
pollIntervalMs: 100
|
|
1604
|
+
}, {
|
|
1605
|
+
timeoutMs: 5000,
|
|
1606
|
+
pollIntervalMs: 100
|
|
1606
1607
|
});
|
|
1607
1608
|
assert.strictEqual(settledExecutionActivitySummary.delivery_count >= 1, true, "execution wait activity summary missing");
|
|
1608
1609
|
const settledExecutionMonitorSnapshot = await client.executeAndWaitMonitorSnapshot({
|
|
@@ -1619,50 +1620,50 @@ async function main() {
|
|
|
1619
1620
|
command: "quickstart-summary-wait-monitor",
|
|
1620
1621
|
task_ref: "settlement.submit",
|
|
1621
1622
|
body: { intent_id: "intent-quickstart-summary-wait-monitor" },
|
|
1622
|
-
defer_completion: true
|
|
1623
|
-
}, {
|
|
1624
|
-
timeoutMs: 5000,
|
|
1625
|
-
pollIntervalMs: 100
|
|
1626
|
-
});
|
|
1627
|
-
assert.strictEqual(settledExecutionMonitorSummary.status, "completed", "execution wait monitor summary missing");
|
|
1628
|
-
const settledExecutionLinkedSummary = await client.executeAndWaitLinkedRecordSummary({
|
|
1629
|
-
command: "quickstart-summary-wait-linked",
|
|
1630
|
-
task_ref: "settlement.submit",
|
|
1631
|
-
body: { intent_id: "intent-quickstart-summary-wait-linked" },
|
|
1632
|
-
defer_completion: true
|
|
1633
|
-
}, {
|
|
1634
|
-
timeoutMs: 5000,
|
|
1635
|
-
pollIntervalMs: 100
|
|
1636
|
-
});
|
|
1637
|
-
assert.strictEqual(settledExecutionLinkedSummary.delivery_count >= 1, true, "execution wait linked summary missing");
|
|
1638
|
-
const settledExecutionLinkedActivitySummary = await client.executeAndWaitLinkedRecordActivitySummary({
|
|
1639
|
-
command: "quickstart-summary-wait-linked-activity",
|
|
1640
|
-
task_ref: "settlement.submit",
|
|
1641
|
-
body: { intent_id: "intent-quickstart-summary-wait-linked-activity" },
|
|
1642
|
-
defer_completion: true
|
|
1643
|
-
}, {
|
|
1644
|
-
timeoutMs: 5000,
|
|
1645
|
-
pollIntervalMs: 100
|
|
1646
|
-
});
|
|
1647
|
-
assert.strictEqual(settledExecutionLinkedActivitySummary.transaction_count >= 1, true, "execution wait linked activity summary missing");
|
|
1648
|
-
const settledNativeExecutionSummary = await client.executeNativeAndWaitSummary({
|
|
1649
|
-
command: "quickstart-native-summary-wait",
|
|
1650
|
-
task_ref: "trust.verify",
|
|
1651
|
-
body: { subject_id: "subject-native-summary-wait" },
|
|
1652
|
-
defer_completion: true
|
|
1653
|
-
}, {
|
|
1654
|
-
timeoutMs: 5000,
|
|
1655
|
-
pollIntervalMs: 100
|
|
1656
|
-
});
|
|
1657
|
-
assert.strictEqual(settledNativeExecutionSummary.delivery_status, "delivered", "native execution wait summary missing");
|
|
1658
|
-
const settledNativeExecutionActivitySummary = await client.executeNativeAndWaitActivitySummary({
|
|
1659
|
-
command: "quickstart-native-summary-wait-activity",
|
|
1660
|
-
task_ref: "settlement.submit",
|
|
1661
|
-
body: { intent_id: "intent-quickstart-native-wait-activity" },
|
|
1662
|
-
defer_completion: true
|
|
1663
|
-
}, {
|
|
1664
|
-
timeoutMs: 5000,
|
|
1665
|
-
pollIntervalMs: 100
|
|
1623
|
+
defer_completion: true
|
|
1624
|
+
}, {
|
|
1625
|
+
timeoutMs: 5000,
|
|
1626
|
+
pollIntervalMs: 100
|
|
1627
|
+
});
|
|
1628
|
+
assert.strictEqual(settledExecutionMonitorSummary.status, "completed", "execution wait monitor summary missing");
|
|
1629
|
+
const settledExecutionLinkedSummary = await client.executeAndWaitLinkedRecordSummary({
|
|
1630
|
+
command: "quickstart-summary-wait-linked",
|
|
1631
|
+
task_ref: "settlement.submit",
|
|
1632
|
+
body: { intent_id: "intent-quickstart-summary-wait-linked" },
|
|
1633
|
+
defer_completion: true
|
|
1634
|
+
}, {
|
|
1635
|
+
timeoutMs: 5000,
|
|
1636
|
+
pollIntervalMs: 100
|
|
1637
|
+
});
|
|
1638
|
+
assert.strictEqual(settledExecutionLinkedSummary.delivery_count >= 1, true, "execution wait linked summary missing");
|
|
1639
|
+
const settledExecutionLinkedActivitySummary = await client.executeAndWaitLinkedRecordActivitySummary({
|
|
1640
|
+
command: "quickstart-summary-wait-linked-activity",
|
|
1641
|
+
task_ref: "settlement.submit",
|
|
1642
|
+
body: { intent_id: "intent-quickstart-summary-wait-linked-activity" },
|
|
1643
|
+
defer_completion: true
|
|
1644
|
+
}, {
|
|
1645
|
+
timeoutMs: 5000,
|
|
1646
|
+
pollIntervalMs: 100
|
|
1647
|
+
});
|
|
1648
|
+
assert.strictEqual(settledExecutionLinkedActivitySummary.transaction_count >= 1, true, "execution wait linked activity summary missing");
|
|
1649
|
+
const settledNativeExecutionSummary = await client.executeNativeAndWaitSummary({
|
|
1650
|
+
command: "quickstart-native-summary-wait",
|
|
1651
|
+
task_ref: "trust.verify",
|
|
1652
|
+
body: { subject_id: "subject-native-summary-wait" },
|
|
1653
|
+
defer_completion: true
|
|
1654
|
+
}, {
|
|
1655
|
+
timeoutMs: 5000,
|
|
1656
|
+
pollIntervalMs: 100
|
|
1657
|
+
});
|
|
1658
|
+
assert.strictEqual(settledNativeExecutionSummary.delivery_status, "delivered", "native execution wait summary missing");
|
|
1659
|
+
const settledNativeExecutionActivitySummary = await client.executeNativeAndWaitActivitySummary({
|
|
1660
|
+
command: "quickstart-native-summary-wait-activity",
|
|
1661
|
+
task_ref: "settlement.submit",
|
|
1662
|
+
body: { intent_id: "intent-quickstart-native-wait-activity" },
|
|
1663
|
+
defer_completion: true
|
|
1664
|
+
}, {
|
|
1665
|
+
timeoutMs: 5000,
|
|
1666
|
+
pollIntervalMs: 100
|
|
1666
1667
|
});
|
|
1667
1668
|
assert.strictEqual(settledNativeExecutionActivitySummary.delivery_count >= 1, true, "native execution wait activity summary missing");
|
|
1668
1669
|
const settledNativeExecutionMonitorSnapshot = await client.executeNativeAndWaitMonitorSnapshot({
|
|
@@ -1679,49 +1680,49 @@ async function main() {
|
|
|
1679
1680
|
command: "quickstart-native-summary-wait-monitor",
|
|
1680
1681
|
task_ref: "settlement.submit",
|
|
1681
1682
|
body: { intent_id: "intent-quickstart-native-wait-monitor" },
|
|
1682
|
-
defer_completion: true
|
|
1683
|
-
}, {
|
|
1684
|
-
timeoutMs: 5000,
|
|
1685
|
-
pollIntervalMs: 100
|
|
1686
|
-
});
|
|
1687
|
-
assert.strictEqual(settledNativeExecutionMonitorSummary.status, "completed", "native execution wait monitor summary missing");
|
|
1688
|
-
const settledNativeExecutionLinkedSummary = await client.executeNativeAndWaitLinkedRecordSummary({
|
|
1689
|
-
command: "quickstart-native-summary-wait-linked",
|
|
1690
|
-
task_ref: "settlement.submit",
|
|
1691
|
-
body: { intent_id: "intent-quickstart-native-wait-linked" },
|
|
1692
|
-
defer_completion: true
|
|
1693
|
-
}, {
|
|
1694
|
-
timeoutMs: 5000,
|
|
1695
|
-
pollIntervalMs: 100
|
|
1696
|
-
});
|
|
1697
|
-
assert.strictEqual(settledNativeExecutionLinkedSummary.delivery_count >= 1, true, "native execution wait linked summary missing");
|
|
1698
|
-
const settledNativeExecutionLinkedActivitySummary = await client.executeNativeAndWaitLinkedRecordActivitySummary({
|
|
1699
|
-
command: "quickstart-native-summary-wait-linked-activity",
|
|
1700
|
-
task_ref: "settlement.submit",
|
|
1701
|
-
body: { intent_id: "intent-quickstart-native-wait-linked-activity" },
|
|
1702
|
-
defer_completion: true
|
|
1703
|
-
}, {
|
|
1704
|
-
timeoutMs: 5000,
|
|
1705
|
-
pollIntervalMs: 100
|
|
1706
|
-
});
|
|
1707
|
-
assert.strictEqual(settledNativeExecutionLinkedActivitySummary.transaction_count >= 1, true, "native execution wait linked activity summary missing");
|
|
1708
|
-
const instantPreview = await client.previewExecutionQuote({
|
|
1709
|
-
command: "quickstart-preview-instant",
|
|
1710
|
-
task_ref: "trust.verify",
|
|
1711
|
-
body: { subject_id: "subject-preview-2" }
|
|
1712
|
-
}, {
|
|
1713
|
-
instant: true
|
|
1714
|
-
});
|
|
1715
|
-
assert.strictEqual(client.summarizeQuotePreview(instantPreview).payment_required, true, "instant preview missing");
|
|
1716
|
-
const instantPreviewSummary = await client.previewExecutionQuoteSummary({
|
|
1717
|
-
command: "quickstart-preview-instant",
|
|
1718
|
-
task_ref: "trust.verify",
|
|
1719
|
-
body: { subject_id: "subject-preview-2" }
|
|
1720
|
-
}, {
|
|
1721
|
-
instant: true
|
|
1722
|
-
});
|
|
1723
|
-
assert.strictEqual(instantPreviewSummary.payment_required, true, "instant preview summary missing");
|
|
1724
|
-
|
|
1683
|
+
defer_completion: true
|
|
1684
|
+
}, {
|
|
1685
|
+
timeoutMs: 5000,
|
|
1686
|
+
pollIntervalMs: 100
|
|
1687
|
+
});
|
|
1688
|
+
assert.strictEqual(settledNativeExecutionMonitorSummary.status, "completed", "native execution wait monitor summary missing");
|
|
1689
|
+
const settledNativeExecutionLinkedSummary = await client.executeNativeAndWaitLinkedRecordSummary({
|
|
1690
|
+
command: "quickstart-native-summary-wait-linked",
|
|
1691
|
+
task_ref: "settlement.submit",
|
|
1692
|
+
body: { intent_id: "intent-quickstart-native-wait-linked" },
|
|
1693
|
+
defer_completion: true
|
|
1694
|
+
}, {
|
|
1695
|
+
timeoutMs: 5000,
|
|
1696
|
+
pollIntervalMs: 100
|
|
1697
|
+
});
|
|
1698
|
+
assert.strictEqual(settledNativeExecutionLinkedSummary.delivery_count >= 1, true, "native execution wait linked summary missing");
|
|
1699
|
+
const settledNativeExecutionLinkedActivitySummary = await client.executeNativeAndWaitLinkedRecordActivitySummary({
|
|
1700
|
+
command: "quickstart-native-summary-wait-linked-activity",
|
|
1701
|
+
task_ref: "settlement.submit",
|
|
1702
|
+
body: { intent_id: "intent-quickstart-native-wait-linked-activity" },
|
|
1703
|
+
defer_completion: true
|
|
1704
|
+
}, {
|
|
1705
|
+
timeoutMs: 5000,
|
|
1706
|
+
pollIntervalMs: 100
|
|
1707
|
+
});
|
|
1708
|
+
assert.strictEqual(settledNativeExecutionLinkedActivitySummary.transaction_count >= 1, true, "native execution wait linked activity summary missing");
|
|
1709
|
+
const instantPreview = await client.previewExecutionQuote({
|
|
1710
|
+
command: "quickstart-preview-instant",
|
|
1711
|
+
task_ref: "trust.verify",
|
|
1712
|
+
body: { subject_id: "subject-preview-2" }
|
|
1713
|
+
}, {
|
|
1714
|
+
instant: true
|
|
1715
|
+
});
|
|
1716
|
+
assert.strictEqual(client.summarizeQuotePreview(instantPreview).payment_required, true, "instant preview missing");
|
|
1717
|
+
const instantPreviewSummary = await client.previewExecutionQuoteSummary({
|
|
1718
|
+
command: "quickstart-preview-instant",
|
|
1719
|
+
task_ref: "trust.verify",
|
|
1720
|
+
body: { subject_id: "subject-preview-2" }
|
|
1721
|
+
}, {
|
|
1722
|
+
instant: true
|
|
1723
|
+
});
|
|
1724
|
+
assert.strictEqual(instantPreviewSummary.payment_required, true, "instant preview summary missing");
|
|
1725
|
+
|
|
1725
1726
|
const result = await client.execute({
|
|
1726
1727
|
command: "quickstart",
|
|
1727
1728
|
task_ref: "trust.verify",
|
|
@@ -1743,7 +1744,7 @@ async function main() {
|
|
|
1743
1744
|
grant_id: "quickstart_credit_grant_1",
|
|
1744
1745
|
account_id: "acct_demo",
|
|
1745
1746
|
pack_id: "credits.agent"
|
|
1746
|
-
});
|
|
1747
|
+
}, { bearerToken: demoEnv.demoCreditBridgeToken });
|
|
1747
1748
|
assert.strictEqual(creditGrant.grant_id, "quickstart_credit_grant_1", "credit grant missing");
|
|
1748
1749
|
assert.strictEqual(typeof creditGrant.entitlement.entitlement_id, "string", "credit grant entitlement missing");
|
|
1749
1750
|
const creditBalance = await client.getCreditBalance("acct_demo");
|
|
@@ -1795,7 +1796,7 @@ async function main() {
|
|
|
1795
1796
|
const spendCredential = await client.createSpendCredential({
|
|
1796
1797
|
credential_id: "quickstart_spend_credential_1",
|
|
1797
1798
|
account_id: "acct_demo"
|
|
1798
|
-
});
|
|
1799
|
+
}, { bearerToken: demoEnv.demoAccountAuthToken });
|
|
1799
1800
|
assert.strictEqual(spendCredential.credential_id, "quickstart_spend_credential_1", "spend credential create missing");
|
|
1800
1801
|
const delegatedCreditResult = await client.executeWithSpendCredential({
|
|
1801
1802
|
payment_preference: "credits_first",
|
|
@@ -1809,7 +1810,7 @@ async function main() {
|
|
|
1809
1810
|
credential_id: "quickstart_spend_credential_pool_1",
|
|
1810
1811
|
account_id: "acct_demo",
|
|
1811
1812
|
entitlement_id: creditGrant.entitlement.entitlement_id
|
|
1812
|
-
});
|
|
1813
|
+
}, { bearerToken: demoEnv.demoAccountAuthToken });
|
|
1813
1814
|
assert.strictEqual(poolBoundSpendCredential.effective_pool_binding_mode, "entitlement_bound", "pool-bound spend credential mode missing");
|
|
1814
1815
|
const poolBoundDelegatedResult = await client.executeWithSpendCredential({
|
|
1815
1816
|
payment_preference: "credits_first",
|
|
@@ -1836,7 +1837,7 @@ async function main() {
|
|
|
1836
1837
|
account_id: "acct_demo",
|
|
1837
1838
|
pack_id: "credits.topup",
|
|
1838
1839
|
purchase_reference: "purchase-export-topup-1"
|
|
1839
|
-
});
|
|
1840
|
+
}, { bearerToken: demoEnv.demoCreditBridgeToken });
|
|
1840
1841
|
assert.strictEqual(creditGrantForResultExport.pack_id, "credits.topup", "credit grant export topup pack missing");
|
|
1841
1842
|
const creditFirstResultPackageExport = await client.exportInteractionResultPackage("result.spine.job.commitment", {
|
|
1842
1843
|
payment_preference: "credits_first",
|
|
@@ -1862,18 +1863,18 @@ async function main() {
|
|
|
1862
1863
|
);
|
|
1863
1864
|
const linkedResultSet = await client.getLinkedRecordSet(result);
|
|
1864
1865
|
assert.strictEqual(linkedResultSet.quote.quote_id, result.transaction.quote_id, "linked quote missing");
|
|
1865
|
-
assert.strictEqual(linkedResultSet.payment_ledger.length >= 1, true, "linked payment ledger missing");
|
|
1866
|
-
assert.strictEqual(linkedResultSet.deliveries.length >= 1, true, "linked deliveries missing");
|
|
1867
|
-
const linkedActivity = await client.getLinkedRecordActivitySnapshot(result);
|
|
1868
|
-
const linkedActivitySummary = client.summarizeLinkedRecordActivitySnapshot(linkedActivity);
|
|
1869
|
-
assert.strictEqual(linkedActivitySummary.quote_count >= 1, true, "linked activity snapshot missing");
|
|
1870
|
-
assert.strictEqual(typeof linkedActivitySummary.refs.quote_id, "string", "linked activity refs missing");
|
|
1871
|
-
const linkedActivitySummaryDirect = await client.getLinkedRecordActivitySummary(result);
|
|
1872
|
-
assert.strictEqual(linkedActivitySummaryDirect.quote_count >= 1, true, "linked activity summary helper missing");
|
|
1873
|
-
const linkedSummaryFromResult = await client.getLinkedRecordSummary(result);
|
|
1874
|
-
assert.strictEqual(linkedSummaryFromResult.delivery_count >= 1, true, "linked record summary helper missing");
|
|
1875
|
-
const linkedResultSummary = client.summarizeLinkedRecordSet(linkedResultSet);
|
|
1876
|
-
assert.strictEqual(linkedResultSummary.delivery_count >= 1, true, "linked record summary missing");
|
|
1866
|
+
assert.strictEqual(linkedResultSet.payment_ledger.length >= 1, true, "linked payment ledger missing");
|
|
1867
|
+
assert.strictEqual(linkedResultSet.deliveries.length >= 1, true, "linked deliveries missing");
|
|
1868
|
+
const linkedActivity = await client.getLinkedRecordActivitySnapshot(result);
|
|
1869
|
+
const linkedActivitySummary = client.summarizeLinkedRecordActivitySnapshot(linkedActivity);
|
|
1870
|
+
assert.strictEqual(linkedActivitySummary.quote_count >= 1, true, "linked activity snapshot missing");
|
|
1871
|
+
assert.strictEqual(typeof linkedActivitySummary.refs.quote_id, "string", "linked activity refs missing");
|
|
1872
|
+
const linkedActivitySummaryDirect = await client.getLinkedRecordActivitySummary(result);
|
|
1873
|
+
assert.strictEqual(linkedActivitySummaryDirect.quote_count >= 1, true, "linked activity summary helper missing");
|
|
1874
|
+
const linkedSummaryFromResult = await client.getLinkedRecordSummary(result);
|
|
1875
|
+
assert.strictEqual(linkedSummaryFromResult.delivery_count >= 1, true, "linked record summary helper missing");
|
|
1876
|
+
const linkedResultSummary = client.summarizeLinkedRecordSet(linkedResultSet);
|
|
1877
|
+
assert.strictEqual(linkedResultSummary.delivery_count >= 1, true, "linked record summary missing");
|
|
1877
1878
|
const executedQuote = await client.getPaymentQuote(result.transaction.quote_id);
|
|
1878
1879
|
assert.strictEqual(executedQuote.quote.status, "executed", "executed quote detail missing");
|
|
1879
1880
|
assert.strictEqual(executedQuote.quote.payment.status, "recorded", "executed quote payment status missing");
|
|
@@ -1932,8 +1933,8 @@ async function main() {
|
|
|
1932
1933
|
assert.strictEqual(typeof paymentEntry.payment.settlement.settlement_id, "string", "payment ledger settlement object missing");
|
|
1933
1934
|
assert.strictEqual(typeof paymentEntry.payment.treasury.destination_id, "string", "payment ledger treasury object missing");
|
|
1934
1935
|
assert.strictEqual(paymentEntry.payment.default_path.status, "recorded", "payment ledger default path status missing");
|
|
1935
|
-
const paymentSummary = client.summarizePaymentLedgerEntry(paymentEntry);
|
|
1936
|
-
assert.strictEqual(paymentSummary.payment_id, paymentEntry.payment.payment_id, "payment summary missing");
|
|
1936
|
+
const paymentSummary = client.summarizePaymentLedgerEntry(paymentEntry);
|
|
1937
|
+
assert.strictEqual(paymentSummary.payment_id, paymentEntry.payment.payment_id, "payment summary missing");
|
|
1937
1938
|
const paymentSummaryDirect = await client.getPaymentLedgerEntrySummary(paymentEntry.payment.payment_id);
|
|
1938
1939
|
assert.strictEqual(paymentSummaryDirect.payment_id, paymentEntry.payment.payment_id, "payment summary helper missing");
|
|
1939
1940
|
const paymentSummaries = await client.listPaymentLedgerSummaries({ transaction_id: result.transaction.transaction_id });
|
|
@@ -1943,13 +1944,13 @@ async function main() {
|
|
|
1943
1944
|
assert.strictEqual(paymentIds.length >= 1, true, "payment id list missing");
|
|
1944
1945
|
const paymentCurrencies = await client.listPaymentCurrencies({ transaction_id: result.transaction.transaction_id });
|
|
1945
1946
|
assert.strictEqual(paymentCurrencies.length >= 1, true, "payment currency list missing");
|
|
1946
|
-
const deliveries = await client.listDeliveries({ transaction_id: result.transaction.transaction_id });
|
|
1947
|
-
assert.strictEqual(Array.isArray(deliveries.deliveries), true, "delivery list missing");
|
|
1948
|
-
const delivery = await client.getDelivery(deliveries.deliveries[0].delivery_id);
|
|
1949
|
-
assert.strictEqual(delivery.delivery.transaction_id, result.transaction.transaction_id, "delivery detail missing");
|
|
1950
|
-
assert.strictEqual(Array.isArray(delivery.delivery.history), true, "delivery history missing");
|
|
1951
|
-
const deliverySummary = client.summarizeDelivery(delivery);
|
|
1952
|
-
assert.strictEqual(deliverySummary.transaction_id, result.transaction.transaction_id, "delivery summary missing");
|
|
1947
|
+
const deliveries = await client.listDeliveries({ transaction_id: result.transaction.transaction_id });
|
|
1948
|
+
assert.strictEqual(Array.isArray(deliveries.deliveries), true, "delivery list missing");
|
|
1949
|
+
const delivery = await client.getDelivery(deliveries.deliveries[0].delivery_id);
|
|
1950
|
+
assert.strictEqual(delivery.delivery.transaction_id, result.transaction.transaction_id, "delivery detail missing");
|
|
1951
|
+
assert.strictEqual(Array.isArray(delivery.delivery.history), true, "delivery history missing");
|
|
1952
|
+
const deliverySummary = client.summarizeDelivery(delivery);
|
|
1953
|
+
assert.strictEqual(deliverySummary.transaction_id, result.transaction.transaction_id, "delivery summary missing");
|
|
1953
1954
|
const deliverySummaryDirect = await client.getDeliverySummary(delivery.delivery.delivery_id);
|
|
1954
1955
|
assert.strictEqual(deliverySummaryDirect.delivery_id, delivery.delivery.delivery_id, "delivery summary helper missing");
|
|
1955
1956
|
const deliverySummaries = await client.listDeliverySummaries({ transaction_id: result.transaction.transaction_id });
|
|
@@ -1961,31 +1962,31 @@ async function main() {
|
|
|
1961
1962
|
assert.strictEqual(deliveryStatuses.length >= 1, true, "delivery status list missing");
|
|
1962
1963
|
const filteredDeliveriesByTarget = await client.listDeliveries({ transaction_id: result.transaction.transaction_id, delivery_target_kind: "callback" });
|
|
1963
1964
|
assert.strictEqual(Array.isArray(filteredDeliveriesByTarget.deliveries), true, "delivery target filter missing");
|
|
1964
|
-
const disputeSummary = await client.createDisputeSummary({
|
|
1965
|
-
transaction_id: result.transaction.transaction_id,
|
|
1966
|
-
receipt_id: result.receipt.receipt_id,
|
|
1967
|
-
title: "Delivery mismatch",
|
|
1968
|
-
reason_code: "delivery_mismatch",
|
|
1969
|
-
note: "Need review"
|
|
1970
|
-
});
|
|
1971
|
-
assert.strictEqual(typeof disputeSummary.dispute_id, "string", "dispute summary missing id");
|
|
1972
|
-
const reviewedDisputeSummary = await client.actOnDisputeSummary(disputeSummary.dispute_id, {
|
|
1973
|
-
action: "review",
|
|
1974
|
-
actor: { type: "operator", role: "reviewer" }
|
|
1975
|
-
});
|
|
1976
|
-
assert.strictEqual(reviewedDisputeSummary.status, "under_review", "dispute action summary missing");
|
|
1977
|
-
const resolvedDispute = await client.actOnDispute(disputeSummary.dispute_id, {
|
|
1978
|
-
action: "resolve",
|
|
1979
|
-
resolution_code: "validated"
|
|
1980
|
-
});
|
|
1981
|
-
assert.strictEqual(resolvedDispute.dispute.status, "resolved", "dispute resolution missing");
|
|
1982
|
-
const disputeActivity = await client.getDisputeActivitySnapshot(disputeSummary.dispute_id);
|
|
1983
|
-
const disputeActivitySummary = client.summarizeActivitySnapshot(disputeActivity);
|
|
1984
|
-
assert.strictEqual(disputeActivitySummary.dispute_count >= 1, true, "dispute activity snapshot missing");
|
|
1985
|
-
const disputeActivitySummaryDirect = await client.getDisputeActivitySummary(disputeSummary.dispute_id);
|
|
1986
|
-
assert.strictEqual(disputeActivitySummaryDirect.dispute_count >= 1, true, "dispute activity summary helper missing");
|
|
1987
|
-
const disputeSummaryDirect = await client.getDisputeSummary(disputeSummary.dispute_id);
|
|
1988
|
-
assert.strictEqual(disputeSummaryDirect.dispute_id, disputeSummary.dispute_id, "dispute summary helper missing");
|
|
1965
|
+
const disputeSummary = await client.createDisputeSummary({
|
|
1966
|
+
transaction_id: result.transaction.transaction_id,
|
|
1967
|
+
receipt_id: result.receipt.receipt_id,
|
|
1968
|
+
title: "Delivery mismatch",
|
|
1969
|
+
reason_code: "delivery_mismatch",
|
|
1970
|
+
note: "Need review"
|
|
1971
|
+
});
|
|
1972
|
+
assert.strictEqual(typeof disputeSummary.dispute_id, "string", "dispute summary missing id");
|
|
1973
|
+
const reviewedDisputeSummary = await client.actOnDisputeSummary(disputeSummary.dispute_id, {
|
|
1974
|
+
action: "review",
|
|
1975
|
+
actor: { type: "operator", role: "reviewer" }
|
|
1976
|
+
});
|
|
1977
|
+
assert.strictEqual(reviewedDisputeSummary.status, "under_review", "dispute action summary missing");
|
|
1978
|
+
const resolvedDispute = await client.actOnDispute(disputeSummary.dispute_id, {
|
|
1979
|
+
action: "resolve",
|
|
1980
|
+
resolution_code: "validated"
|
|
1981
|
+
});
|
|
1982
|
+
assert.strictEqual(resolvedDispute.dispute.status, "resolved", "dispute resolution missing");
|
|
1983
|
+
const disputeActivity = await client.getDisputeActivitySnapshot(disputeSummary.dispute_id);
|
|
1984
|
+
const disputeActivitySummary = client.summarizeActivitySnapshot(disputeActivity);
|
|
1985
|
+
assert.strictEqual(disputeActivitySummary.dispute_count >= 1, true, "dispute activity snapshot missing");
|
|
1986
|
+
const disputeActivitySummaryDirect = await client.getDisputeActivitySummary(disputeSummary.dispute_id);
|
|
1987
|
+
assert.strictEqual(disputeActivitySummaryDirect.dispute_count >= 1, true, "dispute activity summary helper missing");
|
|
1988
|
+
const disputeSummaryDirect = await client.getDisputeSummary(disputeSummary.dispute_id);
|
|
1989
|
+
assert.strictEqual(disputeSummaryDirect.dispute_id, disputeSummary.dispute_id, "dispute summary helper missing");
|
|
1989
1990
|
const disputeList = await client.listDisputes({ transaction_id: result.transaction.transaction_id, status: "under_review" });
|
|
1990
1991
|
assert.strictEqual(Array.isArray(disputeList.disputes), true, "dispute list missing");
|
|
1991
1992
|
const disputeSummaries = await client.listDisputeSummaries({ transaction_id: result.transaction.transaction_id });
|
|
@@ -1997,16 +1998,16 @@ async function main() {
|
|
|
1997
1998
|
assert.strictEqual(disputeReasonCodes.length >= 1, true, "dispute reason code list missing");
|
|
1998
1999
|
const filteredDisputesByTitle = await client.listDisputes({ transaction_id: result.transaction.transaction_id, title: "Delivery mismatch" });
|
|
1999
2000
|
assert.strictEqual(Array.isArray(filteredDisputesByTitle.disputes), true, "dispute title filter missing");
|
|
2000
|
-
const settledDispute = await client.waitForDispute(disputeSummary.dispute_id, {
|
|
2001
|
-
timeoutMs: 1000,
|
|
2002
|
-
pollIntervalMs: 50
|
|
2003
|
-
});
|
|
2004
|
-
assert.strictEqual(client.summarizeDispute(settledDispute).status, "resolved", "dispute summary missing");
|
|
2005
|
-
const settledDisputeSummary = await client.waitForDisputeSummary(disputeSummary.dispute_id, {
|
|
2006
|
-
timeoutMs: 1000,
|
|
2007
|
-
pollIntervalMs: 50
|
|
2008
|
-
});
|
|
2009
|
-
assert.strictEqual(settledDisputeSummary.status, "resolved", "dispute wait summary missing");
|
|
2001
|
+
const settledDispute = await client.waitForDispute(disputeSummary.dispute_id, {
|
|
2002
|
+
timeoutMs: 1000,
|
|
2003
|
+
pollIntervalMs: 50
|
|
2004
|
+
});
|
|
2005
|
+
assert.strictEqual(client.summarizeDispute(settledDispute).status, "resolved", "dispute summary missing");
|
|
2006
|
+
const settledDisputeSummary = await client.waitForDisputeSummary(disputeSummary.dispute_id, {
|
|
2007
|
+
timeoutMs: 1000,
|
|
2008
|
+
pollIntervalMs: 50
|
|
2009
|
+
});
|
|
2010
|
+
assert.strictEqual(settledDisputeSummary.status, "resolved", "dispute wait summary missing");
|
|
2010
2011
|
const refundSummary = await client.createRefundSummary({
|
|
2011
2012
|
transaction_id: result.transaction.transaction_id,
|
|
2012
2013
|
receipt_id: result.receipt.receipt_id,
|
|
@@ -2022,19 +2023,19 @@ async function main() {
|
|
|
2022
2023
|
action: "approve",
|
|
2023
2024
|
action_code: "manual_refund"
|
|
2024
2025
|
});
|
|
2025
|
-
assert.strictEqual(approvedRefundSummary.status, "approved", "refund action summary missing");
|
|
2026
|
-
const completedRefund = await client.actOnRefund(refundSummary.refund_id, {
|
|
2027
|
-
action: "complete",
|
|
2028
|
-
action_code: "manual_refund"
|
|
2029
|
-
});
|
|
2030
|
-
assert.strictEqual(completedRefund.refund.status, "completed", "refund completion missing");
|
|
2031
|
-
const refundActivity = await client.getRefundActivitySnapshot(refundSummary.refund_id);
|
|
2032
|
-
const refundActivitySummary = client.summarizeActivitySnapshot(refundActivity);
|
|
2033
|
-
assert.strictEqual(refundActivitySummary.refund_count >= 1, true, "refund activity snapshot missing");
|
|
2034
|
-
const refundActivitySummaryDirect = await client.getRefundActivitySummary(refundSummary.refund_id);
|
|
2035
|
-
assert.strictEqual(refundActivitySummaryDirect.refund_count >= 1, true, "refund activity summary helper missing");
|
|
2036
|
-
const refundSummaryDirect = await client.getRefundSummary(refundSummary.refund_id);
|
|
2037
|
-
assert.strictEqual(refundSummaryDirect.refund_id, refundSummary.refund_id, "refund summary helper missing");
|
|
2026
|
+
assert.strictEqual(approvedRefundSummary.status, "approved", "refund action summary missing");
|
|
2027
|
+
const completedRefund = await client.actOnRefund(refundSummary.refund_id, {
|
|
2028
|
+
action: "complete",
|
|
2029
|
+
action_code: "manual_refund"
|
|
2030
|
+
});
|
|
2031
|
+
assert.strictEqual(completedRefund.refund.status, "completed", "refund completion missing");
|
|
2032
|
+
const refundActivity = await client.getRefundActivitySnapshot(refundSummary.refund_id);
|
|
2033
|
+
const refundActivitySummary = client.summarizeActivitySnapshot(refundActivity);
|
|
2034
|
+
assert.strictEqual(refundActivitySummary.refund_count >= 1, true, "refund activity snapshot missing");
|
|
2035
|
+
const refundActivitySummaryDirect = await client.getRefundActivitySummary(refundSummary.refund_id);
|
|
2036
|
+
assert.strictEqual(refundActivitySummaryDirect.refund_count >= 1, true, "refund activity summary helper missing");
|
|
2037
|
+
const refundSummaryDirect = await client.getRefundSummary(refundSummary.refund_id);
|
|
2038
|
+
assert.strictEqual(refundSummaryDirect.refund_id, refundSummary.refund_id, "refund summary helper missing");
|
|
2038
2039
|
const refundList = await client.listRefunds({ transaction_id: result.transaction.transaction_id, status: "approved" });
|
|
2039
2040
|
assert.strictEqual(Array.isArray(refundList.refunds), true, "refund list missing");
|
|
2040
2041
|
const refundSummaries = await client.listRefundSummaries({ transaction_id: result.transaction.transaction_id });
|
|
@@ -2048,45 +2049,45 @@ async function main() {
|
|
|
2048
2049
|
assert.strictEqual(refundStatusSummaries.status_count >= 1, true, "refund status summaries missing");
|
|
2049
2050
|
const filteredRefundsByTitle = await client.listRefunds({ transaction_id: result.transaction.transaction_id, title: "Refund requested" });
|
|
2050
2051
|
assert.strictEqual(Array.isArray(filteredRefundsByTitle.refunds), true, "refund title filter missing");
|
|
2051
|
-
const settledRefund = await client.waitForRefund(refundSummary.refund_id, {
|
|
2052
|
-
timeoutMs: 1000,
|
|
2053
|
-
pollIntervalMs: 50
|
|
2054
|
-
});
|
|
2055
|
-
assert.strictEqual(client.summarizeRefund(settledRefund).status, "completed", "refund summary missing");
|
|
2056
|
-
const settledRefundSummary = await client.waitForRefundSummary(refundSummary.refund_id, {
|
|
2057
|
-
timeoutMs: 1000,
|
|
2058
|
-
pollIntervalMs: 50
|
|
2059
|
-
});
|
|
2060
|
-
assert.strictEqual(settledRefundSummary.status, "completed", "refund wait summary missing");
|
|
2061
|
-
const remediationTicketSummary = await client.createRemediationTicketSummary({
|
|
2062
|
-
transaction_id: result.transaction.transaction_id,
|
|
2063
|
-
receipt_id: result.receipt.receipt_id,
|
|
2064
|
-
reason_code: "manual_review",
|
|
2065
|
-
action_code: "investigate",
|
|
2066
|
-
assigned_owner: "ops-review"
|
|
2067
|
-
});
|
|
2068
|
-
assert.strictEqual(typeof remediationTicketSummary.ticket_id, "string", "remediation ticket summary missing id");
|
|
2069
|
-
const assignedTicketSummary = await client.actOnRemediationTicketSummary(remediationTicketSummary.ticket_id, {
|
|
2070
|
-
action: "assign",
|
|
2071
|
-
assigned_owner: "ops-review"
|
|
2072
|
-
});
|
|
2073
|
-
assert.strictEqual(assignedTicketSummary.status, "assigned", "remediation action summary missing");
|
|
2074
|
-
const resolvedTicket = await client.actOnRemediationTicket(remediationTicketSummary.ticket_id, {
|
|
2075
|
-
action: "resolve",
|
|
2076
|
-
note: "Handled by ops-review"
|
|
2077
|
-
});
|
|
2078
|
-
assert.strictEqual(resolvedTicket.remediation_ticket.status, "resolved", "remediation resolution missing");
|
|
2079
|
-
const remediationActivity = await client.getRemediationTicketActivitySnapshot(remediationTicketSummary.ticket_id);
|
|
2080
|
-
const remediationActivitySummary = client.summarizeActivitySnapshot(remediationActivity);
|
|
2081
|
-
assert.strictEqual(remediationActivitySummary.remediation_ticket_count >= 1, true, "remediation activity snapshot missing");
|
|
2082
|
-
const remediationActivitySummaryDirect = await client.getRemediationTicketActivitySummary(remediationTicketSummary.ticket_id);
|
|
2083
|
-
assert.strictEqual(remediationActivitySummaryDirect.remediation_ticket_count >= 1, true, "remediation activity summary helper missing");
|
|
2084
|
-
const remediationSummaryDirect = await client.getRemediationTicketSummary(remediationTicketSummary.ticket_id);
|
|
2085
|
-
assert.strictEqual(remediationSummaryDirect.ticket_id, remediationTicketSummary.ticket_id, "remediation summary helper missing");
|
|
2086
|
-
const remediationList = await client.listRemediationTickets({
|
|
2087
|
-
transaction_id: result.transaction.transaction_id,
|
|
2088
|
-
assigned_owner: "ops-review",
|
|
2089
|
-
status: "resolved"
|
|
2052
|
+
const settledRefund = await client.waitForRefund(refundSummary.refund_id, {
|
|
2053
|
+
timeoutMs: 1000,
|
|
2054
|
+
pollIntervalMs: 50
|
|
2055
|
+
});
|
|
2056
|
+
assert.strictEqual(client.summarizeRefund(settledRefund).status, "completed", "refund summary missing");
|
|
2057
|
+
const settledRefundSummary = await client.waitForRefundSummary(refundSummary.refund_id, {
|
|
2058
|
+
timeoutMs: 1000,
|
|
2059
|
+
pollIntervalMs: 50
|
|
2060
|
+
});
|
|
2061
|
+
assert.strictEqual(settledRefundSummary.status, "completed", "refund wait summary missing");
|
|
2062
|
+
const remediationTicketSummary = await client.createRemediationTicketSummary({
|
|
2063
|
+
transaction_id: result.transaction.transaction_id,
|
|
2064
|
+
receipt_id: result.receipt.receipt_id,
|
|
2065
|
+
reason_code: "manual_review",
|
|
2066
|
+
action_code: "investigate",
|
|
2067
|
+
assigned_owner: "ops-review"
|
|
2068
|
+
});
|
|
2069
|
+
assert.strictEqual(typeof remediationTicketSummary.ticket_id, "string", "remediation ticket summary missing id");
|
|
2070
|
+
const assignedTicketSummary = await client.actOnRemediationTicketSummary(remediationTicketSummary.ticket_id, {
|
|
2071
|
+
action: "assign",
|
|
2072
|
+
assigned_owner: "ops-review"
|
|
2073
|
+
});
|
|
2074
|
+
assert.strictEqual(assignedTicketSummary.status, "assigned", "remediation action summary missing");
|
|
2075
|
+
const resolvedTicket = await client.actOnRemediationTicket(remediationTicketSummary.ticket_id, {
|
|
2076
|
+
action: "resolve",
|
|
2077
|
+
note: "Handled by ops-review"
|
|
2078
|
+
});
|
|
2079
|
+
assert.strictEqual(resolvedTicket.remediation_ticket.status, "resolved", "remediation resolution missing");
|
|
2080
|
+
const remediationActivity = await client.getRemediationTicketActivitySnapshot(remediationTicketSummary.ticket_id);
|
|
2081
|
+
const remediationActivitySummary = client.summarizeActivitySnapshot(remediationActivity);
|
|
2082
|
+
assert.strictEqual(remediationActivitySummary.remediation_ticket_count >= 1, true, "remediation activity snapshot missing");
|
|
2083
|
+
const remediationActivitySummaryDirect = await client.getRemediationTicketActivitySummary(remediationTicketSummary.ticket_id);
|
|
2084
|
+
assert.strictEqual(remediationActivitySummaryDirect.remediation_ticket_count >= 1, true, "remediation activity summary helper missing");
|
|
2085
|
+
const remediationSummaryDirect = await client.getRemediationTicketSummary(remediationTicketSummary.ticket_id);
|
|
2086
|
+
assert.strictEqual(remediationSummaryDirect.ticket_id, remediationTicketSummary.ticket_id, "remediation summary helper missing");
|
|
2087
|
+
const remediationList = await client.listRemediationTickets({
|
|
2088
|
+
transaction_id: result.transaction.transaction_id,
|
|
2089
|
+
assigned_owner: "ops-review",
|
|
2090
|
+
status: "resolved"
|
|
2090
2091
|
});
|
|
2091
2092
|
assert.strictEqual(Array.isArray(remediationList.remediation_tickets), true, "remediation ticket list missing");
|
|
2092
2093
|
const remediationSummaries = await client.listRemediationTicketSummaries({ transaction_id: result.transaction.transaction_id });
|
|
@@ -2117,22 +2118,22 @@ async function main() {
|
|
|
2117
2118
|
timeoutMs: 1000,
|
|
2118
2119
|
pollIntervalMs: 50
|
|
2119
2120
|
});
|
|
2120
|
-
assert.strictEqual(client.summarizeRemediationTicket(settledTicket).status, "resolved", "remediation summary missing");
|
|
2121
|
-
const settledTicketSummary = await client.waitForRemediationTicketSummary(remediationTicketSummary.ticket_id, {
|
|
2122
|
-
timeoutMs: 1000,
|
|
2123
|
-
pollIntervalMs: 50
|
|
2124
|
-
});
|
|
2125
|
-
assert.strictEqual(settledTicketSummary.status, "resolved", "remediation wait summary missing");
|
|
2126
|
-
|
|
2127
|
-
const instant = await client.execute({
|
|
2128
|
-
command: "quickstart-instant",
|
|
2129
|
-
task_ref: "trust.verify",
|
|
2130
|
-
body: { subject_id: "subject-2" }
|
|
2131
|
-
}, {
|
|
2132
|
-
instant: true
|
|
2133
|
-
});
|
|
2134
|
-
assert.strictEqual(typeof instant.transaction.transaction_id, "string", "instant transaction missing");
|
|
2135
|
-
assert.strictEqual(typeof instant.receipt.receipt_id, "string", "instant receipt missing");
|
|
2121
|
+
assert.strictEqual(client.summarizeRemediationTicket(settledTicket).status, "resolved", "remediation summary missing");
|
|
2122
|
+
const settledTicketSummary = await client.waitForRemediationTicketSummary(remediationTicketSummary.ticket_id, {
|
|
2123
|
+
timeoutMs: 1000,
|
|
2124
|
+
pollIntervalMs: 50
|
|
2125
|
+
});
|
|
2126
|
+
assert.strictEqual(settledTicketSummary.status, "resolved", "remediation wait summary missing");
|
|
2127
|
+
|
|
2128
|
+
const instant = await client.execute({
|
|
2129
|
+
command: "quickstart-instant",
|
|
2130
|
+
task_ref: "trust.verify",
|
|
2131
|
+
body: { subject_id: "subject-2" }
|
|
2132
|
+
}, {
|
|
2133
|
+
instant: true
|
|
2134
|
+
});
|
|
2135
|
+
assert.strictEqual(typeof instant.transaction.transaction_id, "string", "instant transaction missing");
|
|
2136
|
+
assert.strictEqual(typeof instant.receipt.receipt_id, "string", "instant receipt missing");
|
|
2136
2137
|
const instantExecutionSummary = await client.executeInstantSummary({
|
|
2137
2138
|
command: "quickstart-instant-summary",
|
|
2138
2139
|
task_ref: "trust.verify",
|
|
@@ -2312,20 +2313,20 @@ async function main() {
|
|
|
2312
2313
|
command: "quickstart-instant-summary-wait",
|
|
2313
2314
|
task_ref: "settlement.submit",
|
|
2314
2315
|
body: { intent_id: "intent-quickstart-instant-wait" },
|
|
2315
|
-
defer_completion: true
|
|
2316
|
-
}, {
|
|
2317
|
-
timeoutMs: 5000,
|
|
2318
|
-
pollIntervalMs: 100
|
|
2319
|
-
});
|
|
2320
|
-
assert.strictEqual(settledInstantExecutionSummary.delivery_status, "delivered", "instant execution wait summary missing");
|
|
2321
|
-
const settledInstantExecutionActivitySummary = await client.executeInstantAndWaitActivitySummary({
|
|
2322
|
-
command: "quickstart-instant-summary-wait-activity",
|
|
2323
|
-
task_ref: "settlement.submit",
|
|
2324
|
-
body: { intent_id: "intent-quickstart-instant-wait-activity" },
|
|
2325
|
-
defer_completion: true
|
|
2326
|
-
}, {
|
|
2327
|
-
timeoutMs: 5000,
|
|
2328
|
-
pollIntervalMs: 100
|
|
2316
|
+
defer_completion: true
|
|
2317
|
+
}, {
|
|
2318
|
+
timeoutMs: 5000,
|
|
2319
|
+
pollIntervalMs: 100
|
|
2320
|
+
});
|
|
2321
|
+
assert.strictEqual(settledInstantExecutionSummary.delivery_status, "delivered", "instant execution wait summary missing");
|
|
2322
|
+
const settledInstantExecutionActivitySummary = await client.executeInstantAndWaitActivitySummary({
|
|
2323
|
+
command: "quickstart-instant-summary-wait-activity",
|
|
2324
|
+
task_ref: "settlement.submit",
|
|
2325
|
+
body: { intent_id: "intent-quickstart-instant-wait-activity" },
|
|
2326
|
+
defer_completion: true
|
|
2327
|
+
}, {
|
|
2328
|
+
timeoutMs: 5000,
|
|
2329
|
+
pollIntervalMs: 100
|
|
2329
2330
|
});
|
|
2330
2331
|
assert.strictEqual(settledInstantExecutionActivitySummary.delivery_count >= 1, true, "instant execution wait activity summary missing");
|
|
2331
2332
|
const settledInstantExecutionMonitorSnapshot = await client.executeInstantAndWaitMonitorSnapshot({
|
|
@@ -2342,625 +2343,625 @@ async function main() {
|
|
|
2342
2343
|
command: "quickstart-instant-summary-wait-monitor",
|
|
2343
2344
|
task_ref: "settlement.submit",
|
|
2344
2345
|
body: { intent_id: "intent-quickstart-instant-wait-monitor" },
|
|
2345
|
-
defer_completion: true
|
|
2346
|
-
}, {
|
|
2347
|
-
timeoutMs: 5000,
|
|
2348
|
-
pollIntervalMs: 100
|
|
2349
|
-
});
|
|
2350
|
-
assert.strictEqual(settledInstantExecutionMonitorSummary.status, "completed", "instant execution wait monitor summary missing");
|
|
2351
|
-
const settledInstantExecutionLinkedSummary = await client.executeInstantAndWaitLinkedRecordSummary({
|
|
2352
|
-
command: "quickstart-instant-summary-wait-linked",
|
|
2353
|
-
task_ref: "settlement.submit",
|
|
2354
|
-
body: { intent_id: "intent-quickstart-instant-wait-linked" },
|
|
2355
|
-
defer_completion: true
|
|
2356
|
-
}, {
|
|
2357
|
-
timeoutMs: 5000,
|
|
2358
|
-
pollIntervalMs: 100
|
|
2359
|
-
});
|
|
2360
|
-
assert.strictEqual(settledInstantExecutionLinkedSummary.delivery_count >= 1, true, "instant execution wait linked summary missing");
|
|
2361
|
-
const settledInstantExecutionLinkedActivitySummary = await client.executeInstantAndWaitLinkedRecordActivitySummary({
|
|
2362
|
-
command: "quickstart-instant-summary-wait-linked-activity",
|
|
2363
|
-
task_ref: "settlement.submit",
|
|
2364
|
-
body: { intent_id: "intent-quickstart-instant-wait-linked-activity" },
|
|
2365
|
-
defer_completion: true
|
|
2366
|
-
}, {
|
|
2367
|
-
timeoutMs: 5000,
|
|
2368
|
-
pollIntervalMs: 100
|
|
2369
|
-
});
|
|
2370
|
-
assert.strictEqual(settledInstantExecutionLinkedActivitySummary.transaction_count >= 1, true, "instant execution wait linked activity summary missing");
|
|
2371
|
-
|
|
2372
|
-
const deferred = await client.execute({
|
|
2373
|
-
command: "quickstart-deferred",
|
|
2374
|
-
task_ref: "settlement.submit",
|
|
2375
|
-
defer_completion: true,
|
|
2376
|
-
body: { intent_id: "intent-quickstart" }
|
|
2377
|
-
});
|
|
2378
|
-
assert.strictEqual(deferred.transaction.status, "accepted", "deferred transaction should start accepted");
|
|
2379
|
-
const deferredMonitorRefs = client.extractMonitorRefs(deferred);
|
|
2380
|
-
assert.strictEqual(typeof deferredMonitorRefs.transaction_id, "string", "deferred monitor transaction ref missing");
|
|
2381
|
-
const deferredSnapshot = await client.getMonitorSnapshot(deferred);
|
|
2382
|
-
assert.strictEqual(deferredSnapshot.transaction.status, "accepted", "deferred snapshot transaction missing");
|
|
2383
|
-
assert.strictEqual(deferredSnapshot.receipt.status, "pending", "deferred snapshot receipt missing");
|
|
2384
|
-
const deferredActivity = await client.getMonitorActivitySnapshot(deferred);
|
|
2385
|
-
const deferredActivitySummary = client.summarizeMonitorActivitySnapshot(deferredActivity);
|
|
2386
|
-
assert.strictEqual(deferredActivitySummary.transaction_count >= 1, true, "monitor activity snapshot missing");
|
|
2387
|
-
assert.strictEqual(typeof deferredActivitySummary.refs.transaction_id, "string", "monitor activity refs missing");
|
|
2388
|
-
const deferredActivitySummaryDirect = await client.getMonitorActivitySummary(deferred);
|
|
2389
|
-
assert.strictEqual(deferredActivitySummaryDirect.transaction_count >= 1, true, "monitor activity summary helper missing");
|
|
2390
|
-
const settled = await client.waitForMonitor(deferred, {
|
|
2391
|
-
timeoutMs: 5000,
|
|
2392
|
-
pollIntervalMs: 100
|
|
2393
|
-
});
|
|
2394
|
-
assert.strictEqual(settled.transaction.status, "completed", "deferred transaction did not settle");
|
|
2395
|
-
const settledMonitorSummary = await client.waitForMonitorSummary(deferred, {
|
|
2396
|
-
timeoutMs: 5000,
|
|
2397
|
-
pollIntervalMs: 100
|
|
2398
|
-
});
|
|
2399
|
-
assert.strictEqual(settledMonitorSummary.status, "completed", "deferred monitor wait summary missing");
|
|
2400
|
-
const settledMonitorSnapshot = await client.waitForMonitorSnapshot(deferred, {
|
|
2401
|
-
timeoutMs: 5000,
|
|
2402
|
-
pollIntervalMs: 100
|
|
2403
|
-
});
|
|
2404
|
-
assert.strictEqual(settledMonitorSnapshot.transaction.status, "completed", "deferred monitor wait snapshot missing");
|
|
2405
|
-
const settledMonitorActivitySnapshot = await client.waitForMonitorActivitySnapshot(deferred, {
|
|
2406
|
-
timeoutMs: 5000,
|
|
2407
|
-
pollIntervalMs: 100
|
|
2408
|
-
});
|
|
2409
|
-
assert.strictEqual(client.summarizeActivitySnapshot(settledMonitorActivitySnapshot).transaction_count >= 1, true, "deferred monitor activity wait snapshot missing");
|
|
2410
|
-
const settledMonitorActivitySummary = await client.waitForMonitorActivitySummary(deferred, {
|
|
2411
|
-
timeoutMs: 5000,
|
|
2412
|
-
pollIntervalMs: 100
|
|
2413
|
-
});
|
|
2414
|
-
assert.strictEqual(settledMonitorActivitySummary.transaction_count >= 1, true, "deferred monitor activity wait summary missing");
|
|
2415
|
-
const settledLinkedRecordSet = await client.waitForLinkedRecordSet(deferred, {
|
|
2416
|
-
timeoutMs: 5000,
|
|
2417
|
-
pollIntervalMs: 100
|
|
2418
|
-
});
|
|
2419
|
-
assert.strictEqual(settledLinkedRecordSet.transaction.status, "completed", "deferred linked record wait set missing");
|
|
2420
|
-
const settledLinkedRecordActivitySnapshot = await client.waitForLinkedRecordActivitySnapshot(deferred, {
|
|
2421
|
-
timeoutMs: 5000,
|
|
2422
|
-
pollIntervalMs: 100
|
|
2423
|
-
});
|
|
2424
|
-
assert.strictEqual(client.summarizeActivitySnapshot(settledLinkedRecordActivitySnapshot).transaction_count >= 1, true, "deferred linked record activity wait snapshot missing");
|
|
2425
|
-
const settledLinkedRecordSummary = await client.waitForLinkedRecordSummary(deferred, {
|
|
2426
|
-
timeoutMs: 5000,
|
|
2427
|
-
pollIntervalMs: 100
|
|
2428
|
-
});
|
|
2429
|
-
assert.strictEqual(settledLinkedRecordSummary.delivery_count >= 1, true, "deferred linked record wait summary missing");
|
|
2430
|
-
const settledLinkedRecordActivitySummary = await client.waitForLinkedRecordActivitySummary(deferred, {
|
|
2431
|
-
timeoutMs: 5000,
|
|
2432
|
-
pollIntervalMs: 100
|
|
2433
|
-
});
|
|
2434
|
-
assert.strictEqual(settledLinkedRecordActivitySummary.transaction_count >= 1, true, "deferred linked record activity wait summary missing");
|
|
2435
|
-
const settledQuote = await client.waitForQuote(deferred.transaction.quote_id, {
|
|
2436
|
-
timeoutMs: 5000,
|
|
2437
|
-
pollIntervalMs: 100
|
|
2438
|
-
});
|
|
2439
|
-
assert.strictEqual(settledQuote.quote.status, "executed", "deferred quote did not settle");
|
|
2440
|
-
const settledQuoteSummary = await client.waitForQuoteSummary(deferred.transaction.quote_id, {
|
|
2441
|
-
timeoutMs: 5000,
|
|
2442
|
-
pollIntervalMs: 100
|
|
2443
|
-
});
|
|
2444
|
-
assert.strictEqual(settledQuoteSummary.status, "executed", "deferred quote wait summary missing");
|
|
2445
|
-
const settledTransactionSummary = await client.waitForTransactionSummary(deferred.transaction.transaction_id, {
|
|
2446
|
-
timeoutMs: 5000,
|
|
2447
|
-
pollIntervalMs: 100
|
|
2448
|
-
});
|
|
2449
|
-
assert.strictEqual(settledTransactionSummary.status, "completed", "deferred transaction wait summary missing");
|
|
2450
|
-
const settledResultSet = await client.waitForResultSet(deferred, {
|
|
2451
|
-
timeoutMs: 5000,
|
|
2452
|
-
pollIntervalMs: 100
|
|
2453
|
-
});
|
|
2454
|
-
assert.strictEqual(settledResultSet.transaction.status, "completed", "result-set transaction missing");
|
|
2455
|
-
assert.strictEqual(settledResultSet.receipt.status, "completed", "result-set receipt missing");
|
|
2456
|
-
assert.strictEqual(settledResultSet.delivery.status, "delivered", "result-set delivery missing");
|
|
2457
|
-
const settledDeliverySummary = await client.waitForDeliverySummary(settledResultSet.delivery.delivery_id, {
|
|
2458
|
-
timeoutMs: 5000,
|
|
2459
|
-
pollIntervalMs: 100
|
|
2460
|
-
});
|
|
2461
|
-
assert.strictEqual(settledDeliverySummary.status, "delivered", "deferred delivery wait summary missing");
|
|
2462
|
-
const settledResultSummary = client.summarizeResultSet(settledResultSet);
|
|
2463
|
-
assert.strictEqual(settledResultSummary.transaction_status, "completed", "result-set summary transaction missing");
|
|
2464
|
-
assert.strictEqual(settledResultSummary.delivery_status, "delivered", "result-set summary delivery missing");
|
|
2465
|
-
const settledWorkflowSummary = await client.executeWorkflowAndWaitSummary("policy.transaction.flow", {
|
|
2466
|
-
"policy.simulate": { policy: "policy-d" },
|
|
2467
|
-
"settlement.submit": { intent_id: "intent-4" }
|
|
2468
|
-
}, {
|
|
2469
|
-
command: "quickstart-workflow-run-wait-summary",
|
|
2470
|
-
defer_completion: true,
|
|
2471
|
-
timeoutMs: 5000,
|
|
2472
|
-
pollIntervalMs: 100
|
|
2473
|
-
});
|
|
2474
|
-
assert.strictEqual(settledWorkflowSummary.delivery_status, "delivered", "workflow settled summary missing");
|
|
2475
|
-
const settledWorkflowSummaries = await client.executeWorkflowAndWaitSummaries([
|
|
2476
|
-
{
|
|
2477
|
-
workflow_ref: "policy.transaction.flow",
|
|
2478
|
-
task_bodies_by_ref: {
|
|
2479
|
-
"policy.simulate": { policy: "policy-d-batch" },
|
|
2480
|
-
"settlement.submit": { intent_id: "intent-4-batch" }
|
|
2481
|
-
}
|
|
2482
|
-
},
|
|
2483
|
-
{
|
|
2484
|
-
workflow_ref: "trust.flow",
|
|
2485
|
-
task_bodies_by_ref: {
|
|
2486
|
-
"trust.verify": { subject_id: "subject-4-batch" },
|
|
2487
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch" }
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
], {
|
|
2491
|
-
command: "quickstart-workflow-run-wait-summary-batch",
|
|
2492
|
-
defer_completion: true,
|
|
2493
|
-
timeoutMs: 5000,
|
|
2494
|
-
pollIntervalMs: 100
|
|
2495
|
-
});
|
|
2496
|
-
assert.strictEqual(settledWorkflowSummaries.workflow_count, 2, "workflow settled summaries missing");
|
|
2497
|
-
const settledWorkflowActivitySummaries = await client.executeWorkflowAndWaitActivitySummaries([
|
|
2498
|
-
{
|
|
2499
|
-
workflow_ref: "policy.transaction.flow",
|
|
2500
|
-
task_bodies_by_ref: {
|
|
2501
|
-
"policy.simulate": { policy: "policy-d-batch-activity" },
|
|
2502
|
-
"settlement.submit": { intent_id: "intent-4-batch-activity" }
|
|
2503
|
-
}
|
|
2504
|
-
},
|
|
2505
|
-
{
|
|
2506
|
-
workflow_ref: "trust.flow",
|
|
2507
|
-
task_bodies_by_ref: {
|
|
2508
|
-
"trust.verify": { subject_id: "subject-4-batch-activity" },
|
|
2509
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-activity" }
|
|
2510
|
-
}
|
|
2511
|
-
}
|
|
2512
|
-
], {
|
|
2513
|
-
command: "quickstart-workflow-run-wait-activity-batch",
|
|
2514
|
-
defer_completion: true,
|
|
2515
|
-
timeoutMs: 5000,
|
|
2516
|
-
pollIntervalMs: 100
|
|
2517
|
-
});
|
|
2518
|
-
assert.strictEqual(settledWorkflowActivitySummaries.workflow_count, 2, "workflow settled activity summaries missing");
|
|
2519
|
-
const settledWorkflowActivitySnapshots = await client.executeWorkflowAndWaitActivitySnapshots([
|
|
2520
|
-
{
|
|
2521
|
-
workflow_ref: "policy.transaction.flow",
|
|
2522
|
-
task_bodies_by_ref: {
|
|
2523
|
-
"policy.simulate": { policy: "policy-d-batch-activity-snapshot" },
|
|
2524
|
-
"settlement.submit": { intent_id: "intent-4-batch-activity-snapshot" }
|
|
2525
|
-
}
|
|
2526
|
-
},
|
|
2527
|
-
{
|
|
2528
|
-
workflow_ref: "trust.flow",
|
|
2529
|
-
task_bodies_by_ref: {
|
|
2530
|
-
"trust.verify": { subject_id: "subject-4-batch-activity-snapshot" },
|
|
2531
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-activity-snapshot" }
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
], {
|
|
2535
|
-
command: "quickstart-workflow-run-wait-activity-snapshot-batch",
|
|
2536
|
-
defer_completion: true,
|
|
2537
|
-
timeoutMs: 5000,
|
|
2538
|
-
pollIntervalMs: 100
|
|
2539
|
-
});
|
|
2540
|
-
assert.strictEqual(settledWorkflowActivitySnapshots.workflow_count, 2, "workflow settled activity snapshots missing");
|
|
2541
|
-
const settledWorkflowMonitorSummaries = await client.executeWorkflowAndWaitMonitorSummaries([
|
|
2542
|
-
{
|
|
2543
|
-
workflow_ref: "policy.transaction.flow",
|
|
2544
|
-
task_bodies_by_ref: {
|
|
2545
|
-
"policy.simulate": { policy: "policy-d-batch-monitor" },
|
|
2546
|
-
"settlement.submit": { intent_id: "intent-4-batch-monitor" }
|
|
2547
|
-
}
|
|
2548
|
-
},
|
|
2549
|
-
{
|
|
2550
|
-
workflow_ref: "trust.flow",
|
|
2551
|
-
task_bodies_by_ref: {
|
|
2552
|
-
"trust.verify": { subject_id: "subject-4-batch-monitor" },
|
|
2553
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-monitor" }
|
|
2554
|
-
}
|
|
2555
|
-
}
|
|
2556
|
-
], {
|
|
2557
|
-
command: "quickstart-workflow-run-wait-monitor-batch",
|
|
2558
|
-
defer_completion: true,
|
|
2559
|
-
timeoutMs: 5000,
|
|
2560
|
-
pollIntervalMs: 100
|
|
2561
|
-
});
|
|
2562
|
-
assert.strictEqual(settledWorkflowMonitorSummaries.workflow_count, 2, "workflow settled monitor summaries missing");
|
|
2563
|
-
const settledWorkflowMonitorSnapshots = await client.executeWorkflowAndWaitMonitorSnapshots([
|
|
2564
|
-
{
|
|
2565
|
-
workflow_ref: "policy.transaction.flow",
|
|
2566
|
-
task_bodies_by_ref: {
|
|
2567
|
-
"policy.simulate": { policy: "policy-d-batch-monitor-snapshot" },
|
|
2568
|
-
"settlement.submit": { intent_id: "intent-4-batch-monitor-snapshot" }
|
|
2569
|
-
}
|
|
2570
|
-
},
|
|
2571
|
-
{
|
|
2572
|
-
workflow_ref: "trust.flow",
|
|
2573
|
-
task_bodies_by_ref: {
|
|
2574
|
-
"trust.verify": { subject_id: "subject-4-batch-monitor-snapshot" },
|
|
2575
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-monitor-snapshot" }
|
|
2576
|
-
}
|
|
2577
|
-
}
|
|
2578
|
-
], {
|
|
2579
|
-
command: "quickstart-workflow-run-wait-monitor-snapshot-batch",
|
|
2580
|
-
defer_completion: true,
|
|
2581
|
-
timeoutMs: 5000,
|
|
2582
|
-
pollIntervalMs: 100
|
|
2583
|
-
});
|
|
2584
|
-
assert.strictEqual(settledWorkflowMonitorSnapshots.workflow_count, 2, "workflow settled monitor snapshots missing");
|
|
2585
|
-
const settledWorkflowMonitorActivitySnapshots = await client.executeWorkflowAndWaitMonitorActivitySnapshots([
|
|
2586
|
-
{
|
|
2587
|
-
workflow_ref: "policy.transaction.flow",
|
|
2588
|
-
task_bodies_by_ref: {
|
|
2589
|
-
"policy.simulate": { policy: "policy-d-batch-monitor-activity-snapshot" },
|
|
2590
|
-
"settlement.submit": { intent_id: "intent-4-batch-monitor-activity-snapshot" }
|
|
2591
|
-
}
|
|
2592
|
-
},
|
|
2593
|
-
{
|
|
2594
|
-
workflow_ref: "trust.flow",
|
|
2595
|
-
task_bodies_by_ref: {
|
|
2596
|
-
"trust.verify": { subject_id: "subject-4-batch-monitor-activity-snapshot" },
|
|
2597
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-monitor-activity-snapshot" }
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2600
|
-
], {
|
|
2601
|
-
command: "quickstart-workflow-run-wait-monitor-activity-snapshot-batch",
|
|
2346
|
+
defer_completion: true
|
|
2347
|
+
}, {
|
|
2348
|
+
timeoutMs: 5000,
|
|
2349
|
+
pollIntervalMs: 100
|
|
2350
|
+
});
|
|
2351
|
+
assert.strictEqual(settledInstantExecutionMonitorSummary.status, "completed", "instant execution wait monitor summary missing");
|
|
2352
|
+
const settledInstantExecutionLinkedSummary = await client.executeInstantAndWaitLinkedRecordSummary({
|
|
2353
|
+
command: "quickstart-instant-summary-wait-linked",
|
|
2354
|
+
task_ref: "settlement.submit",
|
|
2355
|
+
body: { intent_id: "intent-quickstart-instant-wait-linked" },
|
|
2356
|
+
defer_completion: true
|
|
2357
|
+
}, {
|
|
2358
|
+
timeoutMs: 5000,
|
|
2359
|
+
pollIntervalMs: 100
|
|
2360
|
+
});
|
|
2361
|
+
assert.strictEqual(settledInstantExecutionLinkedSummary.delivery_count >= 1, true, "instant execution wait linked summary missing");
|
|
2362
|
+
const settledInstantExecutionLinkedActivitySummary = await client.executeInstantAndWaitLinkedRecordActivitySummary({
|
|
2363
|
+
command: "quickstart-instant-summary-wait-linked-activity",
|
|
2364
|
+
task_ref: "settlement.submit",
|
|
2365
|
+
body: { intent_id: "intent-quickstart-instant-wait-linked-activity" },
|
|
2366
|
+
defer_completion: true
|
|
2367
|
+
}, {
|
|
2368
|
+
timeoutMs: 5000,
|
|
2369
|
+
pollIntervalMs: 100
|
|
2370
|
+
});
|
|
2371
|
+
assert.strictEqual(settledInstantExecutionLinkedActivitySummary.transaction_count >= 1, true, "instant execution wait linked activity summary missing");
|
|
2372
|
+
|
|
2373
|
+
const deferred = await client.execute({
|
|
2374
|
+
command: "quickstart-deferred",
|
|
2375
|
+
task_ref: "settlement.submit",
|
|
2602
2376
|
defer_completion: true,
|
|
2377
|
+
body: { intent_id: "intent-quickstart" }
|
|
2378
|
+
});
|
|
2379
|
+
assert.strictEqual(deferred.transaction.status, "accepted", "deferred transaction should start accepted");
|
|
2380
|
+
const deferredMonitorRefs = client.extractMonitorRefs(deferred);
|
|
2381
|
+
assert.strictEqual(typeof deferredMonitorRefs.transaction_id, "string", "deferred monitor transaction ref missing");
|
|
2382
|
+
const deferredSnapshot = await client.getMonitorSnapshot(deferred);
|
|
2383
|
+
assert.strictEqual(deferredSnapshot.transaction.status, "accepted", "deferred snapshot transaction missing");
|
|
2384
|
+
assert.strictEqual(deferredSnapshot.receipt.status, "pending", "deferred snapshot receipt missing");
|
|
2385
|
+
const deferredActivity = await client.getMonitorActivitySnapshot(deferred);
|
|
2386
|
+
const deferredActivitySummary = client.summarizeMonitorActivitySnapshot(deferredActivity);
|
|
2387
|
+
assert.strictEqual(deferredActivitySummary.transaction_count >= 1, true, "monitor activity snapshot missing");
|
|
2388
|
+
assert.strictEqual(typeof deferredActivitySummary.refs.transaction_id, "string", "monitor activity refs missing");
|
|
2389
|
+
const deferredActivitySummaryDirect = await client.getMonitorActivitySummary(deferred);
|
|
2390
|
+
assert.strictEqual(deferredActivitySummaryDirect.transaction_count >= 1, true, "monitor activity summary helper missing");
|
|
2391
|
+
const settled = await client.waitForMonitor(deferred, {
|
|
2603
2392
|
timeoutMs: 5000,
|
|
2604
2393
|
pollIntervalMs: 100
|
|
2605
2394
|
});
|
|
2606
|
-
assert.strictEqual(
|
|
2607
|
-
const
|
|
2395
|
+
assert.strictEqual(settled.transaction.status, "completed", "deferred transaction did not settle");
|
|
2396
|
+
const settledMonitorSummary = await client.waitForMonitorSummary(deferred, {
|
|
2397
|
+
timeoutMs: 5000,
|
|
2398
|
+
pollIntervalMs: 100
|
|
2399
|
+
});
|
|
2400
|
+
assert.strictEqual(settledMonitorSummary.status, "completed", "deferred monitor wait summary missing");
|
|
2401
|
+
const settledMonitorSnapshot = await client.waitForMonitorSnapshot(deferred, {
|
|
2402
|
+
timeoutMs: 5000,
|
|
2403
|
+
pollIntervalMs: 100
|
|
2404
|
+
});
|
|
2405
|
+
assert.strictEqual(settledMonitorSnapshot.transaction.status, "completed", "deferred monitor wait snapshot missing");
|
|
2406
|
+
const settledMonitorActivitySnapshot = await client.waitForMonitorActivitySnapshot(deferred, {
|
|
2407
|
+
timeoutMs: 5000,
|
|
2408
|
+
pollIntervalMs: 100
|
|
2409
|
+
});
|
|
2410
|
+
assert.strictEqual(client.summarizeActivitySnapshot(settledMonitorActivitySnapshot).transaction_count >= 1, true, "deferred monitor activity wait snapshot missing");
|
|
2411
|
+
const settledMonitorActivitySummary = await client.waitForMonitorActivitySummary(deferred, {
|
|
2412
|
+
timeoutMs: 5000,
|
|
2413
|
+
pollIntervalMs: 100
|
|
2414
|
+
});
|
|
2415
|
+
assert.strictEqual(settledMonitorActivitySummary.transaction_count >= 1, true, "deferred monitor activity wait summary missing");
|
|
2416
|
+
const settledLinkedRecordSet = await client.waitForLinkedRecordSet(deferred, {
|
|
2417
|
+
timeoutMs: 5000,
|
|
2418
|
+
pollIntervalMs: 100
|
|
2419
|
+
});
|
|
2420
|
+
assert.strictEqual(settledLinkedRecordSet.transaction.status, "completed", "deferred linked record wait set missing");
|
|
2421
|
+
const settledLinkedRecordActivitySnapshot = await client.waitForLinkedRecordActivitySnapshot(deferred, {
|
|
2422
|
+
timeoutMs: 5000,
|
|
2423
|
+
pollIntervalMs: 100
|
|
2424
|
+
});
|
|
2425
|
+
assert.strictEqual(client.summarizeActivitySnapshot(settledLinkedRecordActivitySnapshot).transaction_count >= 1, true, "deferred linked record activity wait snapshot missing");
|
|
2426
|
+
const settledLinkedRecordSummary = await client.waitForLinkedRecordSummary(deferred, {
|
|
2427
|
+
timeoutMs: 5000,
|
|
2428
|
+
pollIntervalMs: 100
|
|
2429
|
+
});
|
|
2430
|
+
assert.strictEqual(settledLinkedRecordSummary.delivery_count >= 1, true, "deferred linked record wait summary missing");
|
|
2431
|
+
const settledLinkedRecordActivitySummary = await client.waitForLinkedRecordActivitySummary(deferred, {
|
|
2432
|
+
timeoutMs: 5000,
|
|
2433
|
+
pollIntervalMs: 100
|
|
2434
|
+
});
|
|
2435
|
+
assert.strictEqual(settledLinkedRecordActivitySummary.transaction_count >= 1, true, "deferred linked record activity wait summary missing");
|
|
2436
|
+
const settledQuote = await client.waitForQuote(deferred.transaction.quote_id, {
|
|
2437
|
+
timeoutMs: 5000,
|
|
2438
|
+
pollIntervalMs: 100
|
|
2439
|
+
});
|
|
2440
|
+
assert.strictEqual(settledQuote.quote.status, "executed", "deferred quote did not settle");
|
|
2441
|
+
const settledQuoteSummary = await client.waitForQuoteSummary(deferred.transaction.quote_id, {
|
|
2442
|
+
timeoutMs: 5000,
|
|
2443
|
+
pollIntervalMs: 100
|
|
2444
|
+
});
|
|
2445
|
+
assert.strictEqual(settledQuoteSummary.status, "executed", "deferred quote wait summary missing");
|
|
2446
|
+
const settledTransactionSummary = await client.waitForTransactionSummary(deferred.transaction.transaction_id, {
|
|
2447
|
+
timeoutMs: 5000,
|
|
2448
|
+
pollIntervalMs: 100
|
|
2449
|
+
});
|
|
2450
|
+
assert.strictEqual(settledTransactionSummary.status, "completed", "deferred transaction wait summary missing");
|
|
2451
|
+
const settledResultSet = await client.waitForResultSet(deferred, {
|
|
2452
|
+
timeoutMs: 5000,
|
|
2453
|
+
pollIntervalMs: 100
|
|
2454
|
+
});
|
|
2455
|
+
assert.strictEqual(settledResultSet.transaction.status, "completed", "result-set transaction missing");
|
|
2456
|
+
assert.strictEqual(settledResultSet.receipt.status, "completed", "result-set receipt missing");
|
|
2457
|
+
assert.strictEqual(settledResultSet.delivery.status, "delivered", "result-set delivery missing");
|
|
2458
|
+
const settledDeliverySummary = await client.waitForDeliverySummary(settledResultSet.delivery.delivery_id, {
|
|
2459
|
+
timeoutMs: 5000,
|
|
2460
|
+
pollIntervalMs: 100
|
|
2461
|
+
});
|
|
2462
|
+
assert.strictEqual(settledDeliverySummary.status, "delivered", "deferred delivery wait summary missing");
|
|
2463
|
+
const settledResultSummary = client.summarizeResultSet(settledResultSet);
|
|
2464
|
+
assert.strictEqual(settledResultSummary.transaction_status, "completed", "result-set summary transaction missing");
|
|
2465
|
+
assert.strictEqual(settledResultSummary.delivery_status, "delivered", "result-set summary delivery missing");
|
|
2466
|
+
const settledWorkflowSummary = await client.executeWorkflowAndWaitSummary("policy.transaction.flow", {
|
|
2467
|
+
"policy.simulate": { policy: "policy-d" },
|
|
2468
|
+
"settlement.submit": { intent_id: "intent-4" }
|
|
2469
|
+
}, {
|
|
2470
|
+
command: "quickstart-workflow-run-wait-summary",
|
|
2471
|
+
defer_completion: true,
|
|
2472
|
+
timeoutMs: 5000,
|
|
2473
|
+
pollIntervalMs: 100
|
|
2474
|
+
});
|
|
2475
|
+
assert.strictEqual(settledWorkflowSummary.delivery_status, "delivered", "workflow settled summary missing");
|
|
2476
|
+
const settledWorkflowSummaries = await client.executeWorkflowAndWaitSummaries([
|
|
2608
2477
|
{
|
|
2609
2478
|
workflow_ref: "policy.transaction.flow",
|
|
2610
2479
|
task_bodies_by_ref: {
|
|
2611
|
-
"policy.simulate": { policy: "policy-d-batch
|
|
2612
|
-
"settlement.submit": { intent_id: "intent-4-batch
|
|
2480
|
+
"policy.simulate": { policy: "policy-d-batch" },
|
|
2481
|
+
"settlement.submit": { intent_id: "intent-4-batch" }
|
|
2613
2482
|
}
|
|
2614
2483
|
},
|
|
2615
2484
|
{
|
|
2616
2485
|
workflow_ref: "trust.flow",
|
|
2617
2486
|
task_bodies_by_ref: {
|
|
2618
|
-
"trust.verify": { subject_id: "subject-4-batch
|
|
2619
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch
|
|
2487
|
+
"trust.verify": { subject_id: "subject-4-batch" },
|
|
2488
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch" }
|
|
2620
2489
|
}
|
|
2621
2490
|
}
|
|
2622
2491
|
], {
|
|
2623
|
-
command: "quickstart-workflow-run-wait-
|
|
2492
|
+
command: "quickstart-workflow-run-wait-summary-batch",
|
|
2624
2493
|
defer_completion: true,
|
|
2625
2494
|
timeoutMs: 5000,
|
|
2626
2495
|
pollIntervalMs: 100
|
|
2627
2496
|
});
|
|
2628
|
-
assert.strictEqual(
|
|
2629
|
-
const
|
|
2630
|
-
{
|
|
2631
|
-
workflow_ref: "policy.transaction.flow",
|
|
2632
|
-
task_bodies_by_ref: {
|
|
2633
|
-
"policy.simulate": { policy: "policy-d-batch-linked" },
|
|
2634
|
-
"settlement.submit": { intent_id: "intent-4-batch-linked" }
|
|
2635
|
-
}
|
|
2636
|
-
},
|
|
2637
|
-
{
|
|
2638
|
-
workflow_ref: "trust.flow",
|
|
2639
|
-
task_bodies_by_ref: {
|
|
2640
|
-
"trust.verify": { subject_id: "subject-4-batch-linked" },
|
|
2641
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-linked" }
|
|
2642
|
-
}
|
|
2643
|
-
}
|
|
2644
|
-
], {
|
|
2645
|
-
command: "quickstart-workflow-run-wait-linked-batch",
|
|
2646
|
-
defer_completion: true,
|
|
2647
|
-
timeoutMs: 5000,
|
|
2648
|
-
pollIntervalMs: 100
|
|
2649
|
-
});
|
|
2650
|
-
assert.strictEqual(settledWorkflowLinkedSummaries.workflow_count, 2, "workflow settled linked summaries missing");
|
|
2651
|
-
const settledWorkflowLinkedSets = await client.executeWorkflowAndWaitLinkedRecordSets([
|
|
2652
|
-
{
|
|
2653
|
-
workflow_ref: "policy.transaction.flow",
|
|
2654
|
-
task_bodies_by_ref: {
|
|
2655
|
-
"policy.simulate": { policy: "policy-d-batch-linked-set" },
|
|
2656
|
-
"settlement.submit": { intent_id: "intent-4-batch-linked-set" }
|
|
2657
|
-
}
|
|
2658
|
-
},
|
|
2659
|
-
{
|
|
2660
|
-
workflow_ref: "trust.flow",
|
|
2661
|
-
task_bodies_by_ref: {
|
|
2662
|
-
"trust.verify": { subject_id: "subject-4-batch-linked-set" },
|
|
2663
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-linked-set" }
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
], {
|
|
2667
|
-
command: "quickstart-workflow-run-wait-linked-set-batch",
|
|
2668
|
-
defer_completion: true,
|
|
2669
|
-
timeoutMs: 5000,
|
|
2670
|
-
pollIntervalMs: 100
|
|
2671
|
-
});
|
|
2672
|
-
assert.strictEqual(settledWorkflowLinkedSets.workflow_count, 2, "workflow settled linked sets missing");
|
|
2673
|
-
const settledWorkflowLinkedActivitySummaries = await client.executeWorkflowAndWaitLinkedRecordActivitySummaries([
|
|
2674
|
-
{
|
|
2675
|
-
workflow_ref: "policy.transaction.flow",
|
|
2676
|
-
task_bodies_by_ref: {
|
|
2677
|
-
"policy.simulate": { policy: "policy-d-batch-linked-activity" },
|
|
2678
|
-
"settlement.submit": { intent_id: "intent-4-batch-linked-activity" }
|
|
2679
|
-
}
|
|
2680
|
-
},
|
|
2681
|
-
{
|
|
2682
|
-
workflow_ref: "trust.flow",
|
|
2683
|
-
task_bodies_by_ref: {
|
|
2684
|
-
"trust.verify": { subject_id: "subject-4-batch-linked-activity" },
|
|
2685
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-linked-activity" }
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
2688
|
-
], {
|
|
2689
|
-
command: "quickstart-workflow-run-wait-linked-activity-batch",
|
|
2690
|
-
defer_completion: true,
|
|
2691
|
-
timeoutMs: 5000,
|
|
2692
|
-
pollIntervalMs: 100
|
|
2693
|
-
});
|
|
2694
|
-
assert.strictEqual(settledWorkflowLinkedActivitySummaries.workflow_count, 2, "workflow settled linked activity summaries missing");
|
|
2695
|
-
const settledWorkflowLinkedActivitySnapshots = await client.executeWorkflowAndWaitLinkedRecordActivitySnapshots([
|
|
2696
|
-
{
|
|
2697
|
-
workflow_ref: "policy.transaction.flow",
|
|
2698
|
-
task_bodies_by_ref: {
|
|
2699
|
-
"policy.simulate": { policy: "policy-d-batch-linked-activity-snapshot" },
|
|
2700
|
-
"settlement.submit": { intent_id: "intent-4-batch-linked-activity-snapshot" }
|
|
2701
|
-
}
|
|
2702
|
-
},
|
|
2703
|
-
{
|
|
2704
|
-
workflow_ref: "trust.flow",
|
|
2705
|
-
task_bodies_by_ref: {
|
|
2706
|
-
"trust.verify": { subject_id: "subject-4-batch-linked-activity-snapshot" },
|
|
2707
|
-
"receipt.validate": { receipt_id: "rcpt-4-batch-linked-activity-snapshot" }
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
], {
|
|
2711
|
-
command: "quickstart-workflow-run-wait-linked-activity-snapshot-batch",
|
|
2712
|
-
defer_completion: true,
|
|
2713
|
-
timeoutMs: 5000,
|
|
2714
|
-
pollIntervalMs: 100
|
|
2715
|
-
});
|
|
2716
|
-
assert.strictEqual(settledWorkflowLinkedActivitySnapshots.workflow_count, 2, "workflow settled linked activity snapshots missing");
|
|
2717
|
-
const settledResultSummaryDirect = await client.getResultSetSummary(deferred, {
|
|
2718
|
-
timeoutMs: 5000,
|
|
2719
|
-
pollIntervalMs: 100
|
|
2720
|
-
});
|
|
2721
|
-
assert.strictEqual(settledResultSummaryDirect.transaction_status, "completed", "result-set summary helper missing");
|
|
2722
|
-
const settledResultActivitySnapshot = await client.waitForResultSetActivitySnapshot(deferred, {
|
|
2723
|
-
timeoutMs: 5000,
|
|
2724
|
-
pollIntervalMs: 100
|
|
2725
|
-
});
|
|
2726
|
-
assert.strictEqual(client.summarizeActivitySnapshot(settledResultActivitySnapshot).transaction_count >= 1, true, "result-set activity snapshot missing");
|
|
2727
|
-
const settledResultActivitySummary = await client.waitForResultSetActivitySummary(deferred, {
|
|
2728
|
-
timeoutMs: 5000,
|
|
2729
|
-
pollIntervalMs: 100
|
|
2730
|
-
});
|
|
2731
|
-
assert.strictEqual(settledResultActivitySummary.transaction_count >= 1, true, "result-set activity summary missing");
|
|
2732
|
-
const linkedDeferredSet = await client.getLinkedRecordSet(deferred);
|
|
2733
|
-
assert.strictEqual(linkedDeferredSet.transaction.status, "completed", "linked deferred transaction missing");
|
|
2734
|
-
assert.strictEqual(linkedDeferredSet.payment_ledger.length >= 1, true, "linked deferred payment ledger missing");
|
|
2735
|
-
|
|
2736
|
-
const taskSetPayload = await client.buildWorkflowTaskSet("policy.transaction.flow", {
|
|
2737
|
-
"policy.simulate": { policy: "policy-a" },
|
|
2738
|
-
"settlement.submit": { intent_id: "intent-1" }
|
|
2739
|
-
}, {
|
|
2740
|
-
command: "quickstart-task-set"
|
|
2741
|
-
});
|
|
2742
|
-
const taskSetResult = await client.execute(taskSetPayload);
|
|
2743
|
-
assert.strictEqual(taskSetResult.transaction.execution.task_count, 2, "task-set execution count missing");
|
|
2744
|
-
assert.strictEqual(taskSetResult.receipt.execution_summary.task_count, 2, "task-set receipt count missing");
|
|
2745
|
-
const taskSetSummary = await client.executeTaskSetSummary([
|
|
2746
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-summary" } },
|
|
2747
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-summary" } }
|
|
2748
|
-
], {
|
|
2749
|
-
command: "quickstart-task-set-summary"
|
|
2750
|
-
});
|
|
2751
|
-
assert.strictEqual(taskSetSummary.transaction.task_count, 2, "task-set summary missing");
|
|
2752
|
-
const taskSetSummaries = await client.executeTaskSetSummaries([
|
|
2753
|
-
{
|
|
2754
|
-
task_set_id: "task-set-summary-a",
|
|
2755
|
-
tasks: [
|
|
2756
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-summary-batch-a" } },
|
|
2757
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-summary-batch-a" } }
|
|
2758
|
-
],
|
|
2759
|
-
options: { command: "quickstart-task-set-summary-batch-a" }
|
|
2760
|
-
},
|
|
2761
|
-
{
|
|
2762
|
-
task_set_id: "task-set-summary-b",
|
|
2763
|
-
tasks: [
|
|
2764
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-summary-batch-b" } },
|
|
2765
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-summary-batch-b" } }
|
|
2766
|
-
],
|
|
2767
|
-
options: { command: "quickstart-task-set-summary-batch-b" }
|
|
2768
|
-
}
|
|
2769
|
-
]);
|
|
2770
|
-
assert.strictEqual(taskSetSummaries.task_set_count, 2, "task-set summaries batch missing");
|
|
2771
|
-
const settledTaskSetSummary = await client.executeTaskSetAndWaitSummary([
|
|
2772
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-summary" } },
|
|
2773
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-summary" } }
|
|
2774
|
-
], {
|
|
2775
|
-
command: "quickstart-task-set-wait-summary",
|
|
2776
|
-
defer_completion: true,
|
|
2777
|
-
timeoutMs: 5000,
|
|
2778
|
-
pollIntervalMs: 100
|
|
2779
|
-
});
|
|
2780
|
-
assert.strictEqual(settledTaskSetSummary.delivery_status, "delivered", "task-set settled summary missing");
|
|
2781
|
-
const settledTaskSetSummaries = await client.executeTaskSetAndWaitSummaries([
|
|
2782
|
-
{
|
|
2783
|
-
task_set_id: "task-set-wait-summary-a",
|
|
2784
|
-
tasks: [
|
|
2785
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-summary-batch-a" } },
|
|
2786
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-summary-batch-a" } }
|
|
2787
|
-
],
|
|
2788
|
-
options: {
|
|
2789
|
-
command: "quickstart-task-set-wait-summary-batch-a",
|
|
2790
|
-
defer_completion: true,
|
|
2791
|
-
timeoutMs: 5000,
|
|
2792
|
-
pollIntervalMs: 100
|
|
2793
|
-
}
|
|
2794
|
-
},
|
|
2795
|
-
{
|
|
2796
|
-
task_set_id: "task-set-wait-summary-b",
|
|
2797
|
-
tasks: [
|
|
2798
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-summary-batch-b" } },
|
|
2799
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-summary-batch-b" } }
|
|
2800
|
-
],
|
|
2801
|
-
options: {
|
|
2802
|
-
command: "quickstart-task-set-wait-summary-batch-b",
|
|
2803
|
-
defer_completion: true,
|
|
2804
|
-
timeoutMs: 5000,
|
|
2805
|
-
pollIntervalMs: 100
|
|
2806
|
-
}
|
|
2807
|
-
}
|
|
2808
|
-
]);
|
|
2809
|
-
assert.strictEqual(settledTaskSetSummaries.task_set_count, 2, "task-set settled summaries batch missing");
|
|
2810
|
-
const settledTaskSetActivitySummaries = await client.executeTaskSetAndWaitActivitySummaries([
|
|
2811
|
-
{
|
|
2812
|
-
task_set_id: "task-set-wait-activity-a",
|
|
2813
|
-
tasks: [
|
|
2814
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-activity-batch-a" } },
|
|
2815
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-activity-batch-a" } }
|
|
2816
|
-
],
|
|
2817
|
-
options: {
|
|
2818
|
-
command: "quickstart-task-set-wait-activity-batch-a",
|
|
2819
|
-
defer_completion: true,
|
|
2820
|
-
timeoutMs: 5000,
|
|
2821
|
-
pollIntervalMs: 100
|
|
2822
|
-
}
|
|
2823
|
-
},
|
|
2824
|
-
{
|
|
2825
|
-
task_set_id: "task-set-wait-activity-b",
|
|
2826
|
-
tasks: [
|
|
2827
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-activity-batch-b" } },
|
|
2828
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-activity-batch-b" } }
|
|
2829
|
-
],
|
|
2830
|
-
options: {
|
|
2831
|
-
command: "quickstart-task-set-wait-activity-batch-b",
|
|
2832
|
-
defer_completion: true,
|
|
2833
|
-
timeoutMs: 5000,
|
|
2834
|
-
pollIntervalMs: 100
|
|
2835
|
-
}
|
|
2836
|
-
}
|
|
2837
|
-
]);
|
|
2838
|
-
assert.strictEqual(settledTaskSetActivitySummaries.task_set_count, 2, "task-set settled activity summaries batch missing");
|
|
2839
|
-
const settledTaskSetActivitySnapshots = await client.executeTaskSetAndWaitActivitySnapshots([
|
|
2840
|
-
{
|
|
2841
|
-
task_set_id: "task-set-wait-activity-snapshot-a",
|
|
2842
|
-
tasks: [
|
|
2843
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-activity-snapshot-batch-a" } },
|
|
2844
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-activity-snapshot-batch-a" } }
|
|
2845
|
-
],
|
|
2846
|
-
options: {
|
|
2847
|
-
command: "quickstart-task-set-wait-activity-snapshot-batch-a",
|
|
2848
|
-
defer_completion: true,
|
|
2849
|
-
timeoutMs: 5000,
|
|
2850
|
-
pollIntervalMs: 100
|
|
2851
|
-
}
|
|
2852
|
-
},
|
|
2853
|
-
{
|
|
2854
|
-
task_set_id: "task-set-wait-activity-snapshot-b",
|
|
2855
|
-
tasks: [
|
|
2856
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-activity-snapshot-batch-b" } },
|
|
2857
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-activity-snapshot-batch-b" } }
|
|
2858
|
-
],
|
|
2859
|
-
options: {
|
|
2860
|
-
command: "quickstart-task-set-wait-activity-snapshot-batch-b",
|
|
2861
|
-
defer_completion: true,
|
|
2862
|
-
timeoutMs: 5000,
|
|
2863
|
-
pollIntervalMs: 100
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
]);
|
|
2867
|
-
assert.strictEqual(settledTaskSetActivitySnapshots.task_set_count, 2, "task-set settled activity snapshots batch missing");
|
|
2868
|
-
const settledTaskSetMonitorSummaries = await client.executeTaskSetAndWaitMonitorSummaries([
|
|
2869
|
-
{
|
|
2870
|
-
task_set_id: "task-set-wait-monitor-a",
|
|
2871
|
-
tasks: [
|
|
2872
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor-batch-a" } },
|
|
2873
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor-batch-a" } }
|
|
2874
|
-
],
|
|
2875
|
-
options: {
|
|
2876
|
-
command: "quickstart-task-set-wait-monitor-batch-a",
|
|
2877
|
-
defer_completion: true,
|
|
2878
|
-
timeoutMs: 5000,
|
|
2879
|
-
pollIntervalMs: 100
|
|
2880
|
-
}
|
|
2881
|
-
},
|
|
2882
|
-
{
|
|
2883
|
-
task_set_id: "task-set-wait-monitor-b",
|
|
2884
|
-
tasks: [
|
|
2885
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-monitor-batch-b" } },
|
|
2886
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-monitor-batch-b" } }
|
|
2887
|
-
],
|
|
2888
|
-
options: {
|
|
2889
|
-
command: "quickstart-task-set-wait-monitor-batch-b",
|
|
2890
|
-
defer_completion: true,
|
|
2891
|
-
timeoutMs: 5000,
|
|
2892
|
-
pollIntervalMs: 100
|
|
2893
|
-
}
|
|
2894
|
-
}
|
|
2895
|
-
]);
|
|
2896
|
-
assert.strictEqual(settledTaskSetMonitorSummaries.task_set_count, 2, "task-set settled monitor summaries batch missing");
|
|
2897
|
-
const settledTaskSetMonitorSnapshots = await client.executeTaskSetAndWaitMonitorSnapshots([
|
|
2898
|
-
{
|
|
2899
|
-
task_set_id: "task-set-wait-monitor-snapshot-a",
|
|
2900
|
-
tasks: [
|
|
2901
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor-snapshot-batch-a" } },
|
|
2902
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor-snapshot-batch-a" } }
|
|
2903
|
-
],
|
|
2904
|
-
options: {
|
|
2905
|
-
command: "quickstart-task-set-wait-monitor-snapshot-batch-a",
|
|
2906
|
-
defer_completion: true,
|
|
2907
|
-
timeoutMs: 5000,
|
|
2908
|
-
pollIntervalMs: 100
|
|
2909
|
-
}
|
|
2910
|
-
},
|
|
2911
|
-
{
|
|
2912
|
-
task_set_id: "task-set-wait-monitor-snapshot-b",
|
|
2913
|
-
tasks: [
|
|
2914
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-monitor-snapshot-batch-b" } },
|
|
2915
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-monitor-snapshot-batch-b" } }
|
|
2916
|
-
],
|
|
2917
|
-
options: {
|
|
2918
|
-
command: "quickstart-task-set-wait-monitor-snapshot-batch-b",
|
|
2919
|
-
defer_completion: true,
|
|
2920
|
-
timeoutMs: 5000,
|
|
2921
|
-
pollIntervalMs: 100
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
]);
|
|
2925
|
-
assert.strictEqual(settledTaskSetMonitorSnapshots.task_set_count, 2, "task-set settled monitor snapshots batch missing");
|
|
2926
|
-
const settledTaskSetMonitorActivitySnapshots = await client.executeTaskSetAndWaitMonitorActivitySnapshots([
|
|
2927
|
-
{
|
|
2928
|
-
task_set_id: "task-set-wait-monitor-activity-snapshot-a",
|
|
2929
|
-
tasks: [
|
|
2930
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor-activity-snapshot-batch-a" } },
|
|
2931
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor-activity-snapshot-batch-a" } }
|
|
2932
|
-
],
|
|
2933
|
-
options: {
|
|
2934
|
-
command: "quickstart-task-set-wait-monitor-activity-snapshot-batch-a",
|
|
2935
|
-
defer_completion: true,
|
|
2936
|
-
timeoutMs: 5000,
|
|
2937
|
-
pollIntervalMs: 100
|
|
2938
|
-
}
|
|
2939
|
-
},
|
|
2940
|
-
{
|
|
2941
|
-
task_set_id: "task-set-wait-monitor-activity-snapshot-b",
|
|
2942
|
-
tasks: [
|
|
2943
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-monitor-activity-snapshot-batch-b" } },
|
|
2944
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-monitor-activity-snapshot-batch-b" } }
|
|
2945
|
-
],
|
|
2946
|
-
options: {
|
|
2947
|
-
command: "quickstart-task-set-wait-monitor-activity-snapshot-batch-b",
|
|
2948
|
-
defer_completion: true,
|
|
2949
|
-
timeoutMs: 5000,
|
|
2950
|
-
pollIntervalMs: 100
|
|
2951
|
-
}
|
|
2952
|
-
}
|
|
2953
|
-
]);
|
|
2954
|
-
assert.strictEqual(settledTaskSetMonitorActivitySnapshots.task_set_count, 2, "task-set settled monitor activity snapshots batch missing");
|
|
2955
|
-
const settledTaskSetMonitorActivitySummaries = await client.executeTaskSetAndWaitMonitorActivitySummaries([
|
|
2497
|
+
assert.strictEqual(settledWorkflowSummaries.workflow_count, 2, "workflow settled summaries missing");
|
|
2498
|
+
const settledWorkflowActivitySummaries = await client.executeWorkflowAndWaitActivitySummaries([
|
|
2956
2499
|
{
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2500
|
+
workflow_ref: "policy.transaction.flow",
|
|
2501
|
+
task_bodies_by_ref: {
|
|
2502
|
+
"policy.simulate": { policy: "policy-d-batch-activity" },
|
|
2503
|
+
"settlement.submit": { intent_id: "intent-4-batch-activity" }
|
|
2504
|
+
}
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
workflow_ref: "trust.flow",
|
|
2508
|
+
task_bodies_by_ref: {
|
|
2509
|
+
"trust.verify": { subject_id: "subject-4-batch-activity" },
|
|
2510
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-activity" }
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
], {
|
|
2514
|
+
command: "quickstart-workflow-run-wait-activity-batch",
|
|
2515
|
+
defer_completion: true,
|
|
2516
|
+
timeoutMs: 5000,
|
|
2517
|
+
pollIntervalMs: 100
|
|
2518
|
+
});
|
|
2519
|
+
assert.strictEqual(settledWorkflowActivitySummaries.workflow_count, 2, "workflow settled activity summaries missing");
|
|
2520
|
+
const settledWorkflowActivitySnapshots = await client.executeWorkflowAndWaitActivitySnapshots([
|
|
2521
|
+
{
|
|
2522
|
+
workflow_ref: "policy.transaction.flow",
|
|
2523
|
+
task_bodies_by_ref: {
|
|
2524
|
+
"policy.simulate": { policy: "policy-d-batch-activity-snapshot" },
|
|
2525
|
+
"settlement.submit": { intent_id: "intent-4-batch-activity-snapshot" }
|
|
2526
|
+
}
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
workflow_ref: "trust.flow",
|
|
2530
|
+
task_bodies_by_ref: {
|
|
2531
|
+
"trust.verify": { subject_id: "subject-4-batch-activity-snapshot" },
|
|
2532
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-activity-snapshot" }
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
], {
|
|
2536
|
+
command: "quickstart-workflow-run-wait-activity-snapshot-batch",
|
|
2537
|
+
defer_completion: true,
|
|
2538
|
+
timeoutMs: 5000,
|
|
2539
|
+
pollIntervalMs: 100
|
|
2540
|
+
});
|
|
2541
|
+
assert.strictEqual(settledWorkflowActivitySnapshots.workflow_count, 2, "workflow settled activity snapshots missing");
|
|
2542
|
+
const settledWorkflowMonitorSummaries = await client.executeWorkflowAndWaitMonitorSummaries([
|
|
2543
|
+
{
|
|
2544
|
+
workflow_ref: "policy.transaction.flow",
|
|
2545
|
+
task_bodies_by_ref: {
|
|
2546
|
+
"policy.simulate": { policy: "policy-d-batch-monitor" },
|
|
2547
|
+
"settlement.submit": { intent_id: "intent-4-batch-monitor" }
|
|
2548
|
+
}
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
workflow_ref: "trust.flow",
|
|
2552
|
+
task_bodies_by_ref: {
|
|
2553
|
+
"trust.verify": { subject_id: "subject-4-batch-monitor" },
|
|
2554
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-monitor" }
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
], {
|
|
2558
|
+
command: "quickstart-workflow-run-wait-monitor-batch",
|
|
2559
|
+
defer_completion: true,
|
|
2560
|
+
timeoutMs: 5000,
|
|
2561
|
+
pollIntervalMs: 100
|
|
2562
|
+
});
|
|
2563
|
+
assert.strictEqual(settledWorkflowMonitorSummaries.workflow_count, 2, "workflow settled monitor summaries missing");
|
|
2564
|
+
const settledWorkflowMonitorSnapshots = await client.executeWorkflowAndWaitMonitorSnapshots([
|
|
2565
|
+
{
|
|
2566
|
+
workflow_ref: "policy.transaction.flow",
|
|
2567
|
+
task_bodies_by_ref: {
|
|
2568
|
+
"policy.simulate": { policy: "policy-d-batch-monitor-snapshot" },
|
|
2569
|
+
"settlement.submit": { intent_id: "intent-4-batch-monitor-snapshot" }
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
workflow_ref: "trust.flow",
|
|
2574
|
+
task_bodies_by_ref: {
|
|
2575
|
+
"trust.verify": { subject_id: "subject-4-batch-monitor-snapshot" },
|
|
2576
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-monitor-snapshot" }
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
], {
|
|
2580
|
+
command: "quickstart-workflow-run-wait-monitor-snapshot-batch",
|
|
2581
|
+
defer_completion: true,
|
|
2582
|
+
timeoutMs: 5000,
|
|
2583
|
+
pollIntervalMs: 100
|
|
2584
|
+
});
|
|
2585
|
+
assert.strictEqual(settledWorkflowMonitorSnapshots.workflow_count, 2, "workflow settled monitor snapshots missing");
|
|
2586
|
+
const settledWorkflowMonitorActivitySnapshots = await client.executeWorkflowAndWaitMonitorActivitySnapshots([
|
|
2587
|
+
{
|
|
2588
|
+
workflow_ref: "policy.transaction.flow",
|
|
2589
|
+
task_bodies_by_ref: {
|
|
2590
|
+
"policy.simulate": { policy: "policy-d-batch-monitor-activity-snapshot" },
|
|
2591
|
+
"settlement.submit": { intent_id: "intent-4-batch-monitor-activity-snapshot" }
|
|
2592
|
+
}
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
workflow_ref: "trust.flow",
|
|
2596
|
+
task_bodies_by_ref: {
|
|
2597
|
+
"trust.verify": { subject_id: "subject-4-batch-monitor-activity-snapshot" },
|
|
2598
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-monitor-activity-snapshot" }
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2601
|
+
], {
|
|
2602
|
+
command: "quickstart-workflow-run-wait-monitor-activity-snapshot-batch",
|
|
2603
|
+
defer_completion: true,
|
|
2604
|
+
timeoutMs: 5000,
|
|
2605
|
+
pollIntervalMs: 100
|
|
2606
|
+
});
|
|
2607
|
+
assert.strictEqual(settledWorkflowMonitorActivitySnapshots.workflow_count, 2, "workflow settled monitor activity snapshots missing");
|
|
2608
|
+
const settledWorkflowMonitorActivitySummaries = await client.executeWorkflowAndWaitMonitorActivitySummaries([
|
|
2609
|
+
{
|
|
2610
|
+
workflow_ref: "policy.transaction.flow",
|
|
2611
|
+
task_bodies_by_ref: {
|
|
2612
|
+
"policy.simulate": { policy: "policy-d-batch-monitor-activity-summary" },
|
|
2613
|
+
"settlement.submit": { intent_id: "intent-4-batch-monitor-activity-summary" }
|
|
2614
|
+
}
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
workflow_ref: "trust.flow",
|
|
2618
|
+
task_bodies_by_ref: {
|
|
2619
|
+
"trust.verify": { subject_id: "subject-4-batch-monitor-activity-summary" },
|
|
2620
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-monitor-activity-summary" }
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
], {
|
|
2624
|
+
command: "quickstart-workflow-run-wait-monitor-activity-summary-batch",
|
|
2625
|
+
defer_completion: true,
|
|
2626
|
+
timeoutMs: 5000,
|
|
2627
|
+
pollIntervalMs: 100
|
|
2628
|
+
});
|
|
2629
|
+
assert.strictEqual(settledWorkflowMonitorActivitySummaries.workflow_count, 2, "workflow settled monitor activity summaries missing");
|
|
2630
|
+
const settledWorkflowLinkedSummaries = await client.executeWorkflowAndWaitLinkedRecordSummaries([
|
|
2631
|
+
{
|
|
2632
|
+
workflow_ref: "policy.transaction.flow",
|
|
2633
|
+
task_bodies_by_ref: {
|
|
2634
|
+
"policy.simulate": { policy: "policy-d-batch-linked" },
|
|
2635
|
+
"settlement.submit": { intent_id: "intent-4-batch-linked" }
|
|
2636
|
+
}
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
workflow_ref: "trust.flow",
|
|
2640
|
+
task_bodies_by_ref: {
|
|
2641
|
+
"trust.verify": { subject_id: "subject-4-batch-linked" },
|
|
2642
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-linked" }
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
], {
|
|
2646
|
+
command: "quickstart-workflow-run-wait-linked-batch",
|
|
2647
|
+
defer_completion: true,
|
|
2648
|
+
timeoutMs: 5000,
|
|
2649
|
+
pollIntervalMs: 100
|
|
2650
|
+
});
|
|
2651
|
+
assert.strictEqual(settledWorkflowLinkedSummaries.workflow_count, 2, "workflow settled linked summaries missing");
|
|
2652
|
+
const settledWorkflowLinkedSets = await client.executeWorkflowAndWaitLinkedRecordSets([
|
|
2653
|
+
{
|
|
2654
|
+
workflow_ref: "policy.transaction.flow",
|
|
2655
|
+
task_bodies_by_ref: {
|
|
2656
|
+
"policy.simulate": { policy: "policy-d-batch-linked-set" },
|
|
2657
|
+
"settlement.submit": { intent_id: "intent-4-batch-linked-set" }
|
|
2658
|
+
}
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
workflow_ref: "trust.flow",
|
|
2662
|
+
task_bodies_by_ref: {
|
|
2663
|
+
"trust.verify": { subject_id: "subject-4-batch-linked-set" },
|
|
2664
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-linked-set" }
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
], {
|
|
2668
|
+
command: "quickstart-workflow-run-wait-linked-set-batch",
|
|
2669
|
+
defer_completion: true,
|
|
2670
|
+
timeoutMs: 5000,
|
|
2671
|
+
pollIntervalMs: 100
|
|
2672
|
+
});
|
|
2673
|
+
assert.strictEqual(settledWorkflowLinkedSets.workflow_count, 2, "workflow settled linked sets missing");
|
|
2674
|
+
const settledWorkflowLinkedActivitySummaries = await client.executeWorkflowAndWaitLinkedRecordActivitySummaries([
|
|
2675
|
+
{
|
|
2676
|
+
workflow_ref: "policy.transaction.flow",
|
|
2677
|
+
task_bodies_by_ref: {
|
|
2678
|
+
"policy.simulate": { policy: "policy-d-batch-linked-activity" },
|
|
2679
|
+
"settlement.submit": { intent_id: "intent-4-batch-linked-activity" }
|
|
2680
|
+
}
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
workflow_ref: "trust.flow",
|
|
2684
|
+
task_bodies_by_ref: {
|
|
2685
|
+
"trust.verify": { subject_id: "subject-4-batch-linked-activity" },
|
|
2686
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-linked-activity" }
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
], {
|
|
2690
|
+
command: "quickstart-workflow-run-wait-linked-activity-batch",
|
|
2691
|
+
defer_completion: true,
|
|
2692
|
+
timeoutMs: 5000,
|
|
2693
|
+
pollIntervalMs: 100
|
|
2694
|
+
});
|
|
2695
|
+
assert.strictEqual(settledWorkflowLinkedActivitySummaries.workflow_count, 2, "workflow settled linked activity summaries missing");
|
|
2696
|
+
const settledWorkflowLinkedActivitySnapshots = await client.executeWorkflowAndWaitLinkedRecordActivitySnapshots([
|
|
2697
|
+
{
|
|
2698
|
+
workflow_ref: "policy.transaction.flow",
|
|
2699
|
+
task_bodies_by_ref: {
|
|
2700
|
+
"policy.simulate": { policy: "policy-d-batch-linked-activity-snapshot" },
|
|
2701
|
+
"settlement.submit": { intent_id: "intent-4-batch-linked-activity-snapshot" }
|
|
2702
|
+
}
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
workflow_ref: "trust.flow",
|
|
2706
|
+
task_bodies_by_ref: {
|
|
2707
|
+
"trust.verify": { subject_id: "subject-4-batch-linked-activity-snapshot" },
|
|
2708
|
+
"receipt.validate": { receipt_id: "rcpt-4-batch-linked-activity-snapshot" }
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
], {
|
|
2712
|
+
command: "quickstart-workflow-run-wait-linked-activity-snapshot-batch",
|
|
2713
|
+
defer_completion: true,
|
|
2714
|
+
timeoutMs: 5000,
|
|
2715
|
+
pollIntervalMs: 100
|
|
2716
|
+
});
|
|
2717
|
+
assert.strictEqual(settledWorkflowLinkedActivitySnapshots.workflow_count, 2, "workflow settled linked activity snapshots missing");
|
|
2718
|
+
const settledResultSummaryDirect = await client.getResultSetSummary(deferred, {
|
|
2719
|
+
timeoutMs: 5000,
|
|
2720
|
+
pollIntervalMs: 100
|
|
2721
|
+
});
|
|
2722
|
+
assert.strictEqual(settledResultSummaryDirect.transaction_status, "completed", "result-set summary helper missing");
|
|
2723
|
+
const settledResultActivitySnapshot = await client.waitForResultSetActivitySnapshot(deferred, {
|
|
2724
|
+
timeoutMs: 5000,
|
|
2725
|
+
pollIntervalMs: 100
|
|
2726
|
+
});
|
|
2727
|
+
assert.strictEqual(client.summarizeActivitySnapshot(settledResultActivitySnapshot).transaction_count >= 1, true, "result-set activity snapshot missing");
|
|
2728
|
+
const settledResultActivitySummary = await client.waitForResultSetActivitySummary(deferred, {
|
|
2729
|
+
timeoutMs: 5000,
|
|
2730
|
+
pollIntervalMs: 100
|
|
2731
|
+
});
|
|
2732
|
+
assert.strictEqual(settledResultActivitySummary.transaction_count >= 1, true, "result-set activity summary missing");
|
|
2733
|
+
const linkedDeferredSet = await client.getLinkedRecordSet(deferred);
|
|
2734
|
+
assert.strictEqual(linkedDeferredSet.transaction.status, "completed", "linked deferred transaction missing");
|
|
2735
|
+
assert.strictEqual(linkedDeferredSet.payment_ledger.length >= 1, true, "linked deferred payment ledger missing");
|
|
2736
|
+
|
|
2737
|
+
const taskSetPayload = await client.buildWorkflowTaskSet("policy.transaction.flow", {
|
|
2738
|
+
"policy.simulate": { policy: "policy-a" },
|
|
2739
|
+
"settlement.submit": { intent_id: "intent-1" }
|
|
2740
|
+
}, {
|
|
2741
|
+
command: "quickstart-task-set"
|
|
2742
|
+
});
|
|
2743
|
+
const taskSetResult = await client.execute(taskSetPayload);
|
|
2744
|
+
assert.strictEqual(taskSetResult.transaction.execution.task_count, 2, "task-set execution count missing");
|
|
2745
|
+
assert.strictEqual(taskSetResult.receipt.execution_summary.task_count, 2, "task-set receipt count missing");
|
|
2746
|
+
const taskSetSummary = await client.executeTaskSetSummary([
|
|
2747
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-summary" } },
|
|
2748
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-summary" } }
|
|
2749
|
+
], {
|
|
2750
|
+
command: "quickstart-task-set-summary"
|
|
2751
|
+
});
|
|
2752
|
+
assert.strictEqual(taskSetSummary.transaction.task_count, 2, "task-set summary missing");
|
|
2753
|
+
const taskSetSummaries = await client.executeTaskSetSummaries([
|
|
2754
|
+
{
|
|
2755
|
+
task_set_id: "task-set-summary-a",
|
|
2756
|
+
tasks: [
|
|
2757
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-summary-batch-a" } },
|
|
2758
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-summary-batch-a" } }
|
|
2759
|
+
],
|
|
2760
|
+
options: { command: "quickstart-task-set-summary-batch-a" }
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
task_set_id: "task-set-summary-b",
|
|
2764
|
+
tasks: [
|
|
2765
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-summary-batch-b" } },
|
|
2766
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-summary-batch-b" } }
|
|
2767
|
+
],
|
|
2768
|
+
options: { command: "quickstart-task-set-summary-batch-b" }
|
|
2769
|
+
}
|
|
2770
|
+
]);
|
|
2771
|
+
assert.strictEqual(taskSetSummaries.task_set_count, 2, "task-set summaries batch missing");
|
|
2772
|
+
const settledTaskSetSummary = await client.executeTaskSetAndWaitSummary([
|
|
2773
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-summary" } },
|
|
2774
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-summary" } }
|
|
2775
|
+
], {
|
|
2776
|
+
command: "quickstart-task-set-wait-summary",
|
|
2777
|
+
defer_completion: true,
|
|
2778
|
+
timeoutMs: 5000,
|
|
2779
|
+
pollIntervalMs: 100
|
|
2780
|
+
});
|
|
2781
|
+
assert.strictEqual(settledTaskSetSummary.delivery_status, "delivered", "task-set settled summary missing");
|
|
2782
|
+
const settledTaskSetSummaries = await client.executeTaskSetAndWaitSummaries([
|
|
2783
|
+
{
|
|
2784
|
+
task_set_id: "task-set-wait-summary-a",
|
|
2785
|
+
tasks: [
|
|
2786
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-summary-batch-a" } },
|
|
2787
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-summary-batch-a" } }
|
|
2788
|
+
],
|
|
2789
|
+
options: {
|
|
2790
|
+
command: "quickstart-task-set-wait-summary-batch-a",
|
|
2791
|
+
defer_completion: true,
|
|
2792
|
+
timeoutMs: 5000,
|
|
2793
|
+
pollIntervalMs: 100
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
{
|
|
2797
|
+
task_set_id: "task-set-wait-summary-b",
|
|
2798
|
+
tasks: [
|
|
2799
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-summary-batch-b" } },
|
|
2800
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-summary-batch-b" } }
|
|
2801
|
+
],
|
|
2802
|
+
options: {
|
|
2803
|
+
command: "quickstart-task-set-wait-summary-batch-b",
|
|
2804
|
+
defer_completion: true,
|
|
2805
|
+
timeoutMs: 5000,
|
|
2806
|
+
pollIntervalMs: 100
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
]);
|
|
2810
|
+
assert.strictEqual(settledTaskSetSummaries.task_set_count, 2, "task-set settled summaries batch missing");
|
|
2811
|
+
const settledTaskSetActivitySummaries = await client.executeTaskSetAndWaitActivitySummaries([
|
|
2812
|
+
{
|
|
2813
|
+
task_set_id: "task-set-wait-activity-a",
|
|
2814
|
+
tasks: [
|
|
2815
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-activity-batch-a" } },
|
|
2816
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-activity-batch-a" } }
|
|
2817
|
+
],
|
|
2818
|
+
options: {
|
|
2819
|
+
command: "quickstart-task-set-wait-activity-batch-a",
|
|
2820
|
+
defer_completion: true,
|
|
2821
|
+
timeoutMs: 5000,
|
|
2822
|
+
pollIntervalMs: 100
|
|
2823
|
+
}
|
|
2824
|
+
},
|
|
2825
|
+
{
|
|
2826
|
+
task_set_id: "task-set-wait-activity-b",
|
|
2827
|
+
tasks: [
|
|
2828
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-activity-batch-b" } },
|
|
2829
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-activity-batch-b" } }
|
|
2830
|
+
],
|
|
2831
|
+
options: {
|
|
2832
|
+
command: "quickstart-task-set-wait-activity-batch-b",
|
|
2833
|
+
defer_completion: true,
|
|
2834
|
+
timeoutMs: 5000,
|
|
2835
|
+
pollIntervalMs: 100
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
]);
|
|
2839
|
+
assert.strictEqual(settledTaskSetActivitySummaries.task_set_count, 2, "task-set settled activity summaries batch missing");
|
|
2840
|
+
const settledTaskSetActivitySnapshots = await client.executeTaskSetAndWaitActivitySnapshots([
|
|
2841
|
+
{
|
|
2842
|
+
task_set_id: "task-set-wait-activity-snapshot-a",
|
|
2843
|
+
tasks: [
|
|
2844
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-activity-snapshot-batch-a" } },
|
|
2845
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-activity-snapshot-batch-a" } }
|
|
2846
|
+
],
|
|
2847
|
+
options: {
|
|
2848
|
+
command: "quickstart-task-set-wait-activity-snapshot-batch-a",
|
|
2849
|
+
defer_completion: true,
|
|
2850
|
+
timeoutMs: 5000,
|
|
2851
|
+
pollIntervalMs: 100
|
|
2852
|
+
}
|
|
2853
|
+
},
|
|
2854
|
+
{
|
|
2855
|
+
task_set_id: "task-set-wait-activity-snapshot-b",
|
|
2856
|
+
tasks: [
|
|
2857
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-activity-snapshot-batch-b" } },
|
|
2858
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-activity-snapshot-batch-b" } }
|
|
2859
|
+
],
|
|
2860
|
+
options: {
|
|
2861
|
+
command: "quickstart-task-set-wait-activity-snapshot-batch-b",
|
|
2862
|
+
defer_completion: true,
|
|
2863
|
+
timeoutMs: 5000,
|
|
2864
|
+
pollIntervalMs: 100
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
]);
|
|
2868
|
+
assert.strictEqual(settledTaskSetActivitySnapshots.task_set_count, 2, "task-set settled activity snapshots batch missing");
|
|
2869
|
+
const settledTaskSetMonitorSummaries = await client.executeTaskSetAndWaitMonitorSummaries([
|
|
2870
|
+
{
|
|
2871
|
+
task_set_id: "task-set-wait-monitor-a",
|
|
2872
|
+
tasks: [
|
|
2873
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor-batch-a" } },
|
|
2874
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor-batch-a" } }
|
|
2875
|
+
],
|
|
2876
|
+
options: {
|
|
2877
|
+
command: "quickstart-task-set-wait-monitor-batch-a",
|
|
2878
|
+
defer_completion: true,
|
|
2879
|
+
timeoutMs: 5000,
|
|
2880
|
+
pollIntervalMs: 100
|
|
2881
|
+
}
|
|
2882
|
+
},
|
|
2883
|
+
{
|
|
2884
|
+
task_set_id: "task-set-wait-monitor-b",
|
|
2885
|
+
tasks: [
|
|
2886
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-monitor-batch-b" } },
|
|
2887
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-monitor-batch-b" } }
|
|
2888
|
+
],
|
|
2889
|
+
options: {
|
|
2890
|
+
command: "quickstart-task-set-wait-monitor-batch-b",
|
|
2891
|
+
defer_completion: true,
|
|
2892
|
+
timeoutMs: 5000,
|
|
2893
|
+
pollIntervalMs: 100
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
]);
|
|
2897
|
+
assert.strictEqual(settledTaskSetMonitorSummaries.task_set_count, 2, "task-set settled monitor summaries batch missing");
|
|
2898
|
+
const settledTaskSetMonitorSnapshots = await client.executeTaskSetAndWaitMonitorSnapshots([
|
|
2899
|
+
{
|
|
2900
|
+
task_set_id: "task-set-wait-monitor-snapshot-a",
|
|
2901
|
+
tasks: [
|
|
2902
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor-snapshot-batch-a" } },
|
|
2903
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor-snapshot-batch-a" } }
|
|
2904
|
+
],
|
|
2905
|
+
options: {
|
|
2906
|
+
command: "quickstart-task-set-wait-monitor-snapshot-batch-a",
|
|
2907
|
+
defer_completion: true,
|
|
2908
|
+
timeoutMs: 5000,
|
|
2909
|
+
pollIntervalMs: 100
|
|
2910
|
+
}
|
|
2911
|
+
},
|
|
2912
|
+
{
|
|
2913
|
+
task_set_id: "task-set-wait-monitor-snapshot-b",
|
|
2914
|
+
tasks: [
|
|
2915
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-monitor-snapshot-batch-b" } },
|
|
2916
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-monitor-snapshot-batch-b" } }
|
|
2917
|
+
],
|
|
2918
|
+
options: {
|
|
2919
|
+
command: "quickstart-task-set-wait-monitor-snapshot-batch-b",
|
|
2920
|
+
defer_completion: true,
|
|
2921
|
+
timeoutMs: 5000,
|
|
2922
|
+
pollIntervalMs: 100
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
]);
|
|
2926
|
+
assert.strictEqual(settledTaskSetMonitorSnapshots.task_set_count, 2, "task-set settled monitor snapshots batch missing");
|
|
2927
|
+
const settledTaskSetMonitorActivitySnapshots = await client.executeTaskSetAndWaitMonitorActivitySnapshots([
|
|
2928
|
+
{
|
|
2929
|
+
task_set_id: "task-set-wait-monitor-activity-snapshot-a",
|
|
2930
|
+
tasks: [
|
|
2931
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor-activity-snapshot-batch-a" } },
|
|
2932
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor-activity-snapshot-batch-a" } }
|
|
2933
|
+
],
|
|
2934
|
+
options: {
|
|
2935
|
+
command: "quickstart-task-set-wait-monitor-activity-snapshot-batch-a",
|
|
2936
|
+
defer_completion: true,
|
|
2937
|
+
timeoutMs: 5000,
|
|
2938
|
+
pollIntervalMs: 100
|
|
2939
|
+
}
|
|
2940
|
+
},
|
|
2941
|
+
{
|
|
2942
|
+
task_set_id: "task-set-wait-monitor-activity-snapshot-b",
|
|
2943
|
+
tasks: [
|
|
2944
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-monitor-activity-snapshot-batch-b" } },
|
|
2945
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-monitor-activity-snapshot-batch-b" } }
|
|
2946
|
+
],
|
|
2947
|
+
options: {
|
|
2948
|
+
command: "quickstart-task-set-wait-monitor-activity-snapshot-batch-b",
|
|
2949
|
+
defer_completion: true,
|
|
2950
|
+
timeoutMs: 5000,
|
|
2951
|
+
pollIntervalMs: 100
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
]);
|
|
2955
|
+
assert.strictEqual(settledTaskSetMonitorActivitySnapshots.task_set_count, 2, "task-set settled monitor activity snapshots batch missing");
|
|
2956
|
+
const settledTaskSetMonitorActivitySummaries = await client.executeTaskSetAndWaitMonitorActivitySummaries([
|
|
2957
|
+
{
|
|
2958
|
+
task_set_id: "task-set-wait-monitor-activity-summary-a",
|
|
2959
|
+
tasks: [
|
|
2960
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor-activity-summary-batch-a" } },
|
|
2961
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor-activity-summary-batch-a" } }
|
|
2962
|
+
],
|
|
2963
|
+
options: {
|
|
2964
|
+
command: "quickstart-task-set-wait-monitor-activity-summary-batch-a",
|
|
2964
2965
|
defer_completion: true,
|
|
2965
2966
|
timeoutMs: 5000,
|
|
2966
2967
|
pollIntervalMs: 100
|
|
@@ -2982,274 +2983,274 @@ async function main() {
|
|
|
2982
2983
|
]);
|
|
2983
2984
|
assert.strictEqual(settledTaskSetMonitorActivitySummaries.task_set_count, 2, "task-set settled monitor activity summaries batch missing");
|
|
2984
2985
|
const settledTaskSetLinkedSummaries = await client.executeTaskSetAndWaitLinkedRecordSummaries([
|
|
2985
|
-
{
|
|
2986
|
-
task_set_id: "task-set-wait-linked-a",
|
|
2987
|
-
tasks: [
|
|
2988
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-batch-a" } },
|
|
2989
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-batch-a" } }
|
|
2990
|
-
],
|
|
2991
|
-
options: {
|
|
2992
|
-
command: "quickstart-task-set-wait-linked-batch-a",
|
|
2993
|
-
defer_completion: true,
|
|
2994
|
-
timeoutMs: 5000,
|
|
2995
|
-
pollIntervalMs: 100
|
|
2996
|
-
}
|
|
2997
|
-
},
|
|
2998
|
-
{
|
|
2999
|
-
task_set_id: "task-set-wait-linked-b",
|
|
3000
|
-
tasks: [
|
|
3001
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-batch-b" } },
|
|
3002
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-batch-b" } }
|
|
3003
|
-
],
|
|
3004
|
-
options: {
|
|
3005
|
-
command: "quickstart-task-set-wait-linked-batch-b",
|
|
3006
|
-
defer_completion: true,
|
|
3007
|
-
timeoutMs: 5000,
|
|
3008
|
-
pollIntervalMs: 100
|
|
3009
|
-
}
|
|
3010
|
-
}
|
|
3011
|
-
]);
|
|
3012
|
-
assert.strictEqual(settledTaskSetLinkedSummaries.task_set_count, 2, "task-set settled linked summaries batch missing");
|
|
3013
|
-
const settledTaskSetLinkedSets = await client.executeTaskSetAndWaitLinkedRecordSets([
|
|
3014
|
-
{
|
|
3015
|
-
task_set_id: "task-set-wait-linked-set-a",
|
|
3016
|
-
tasks: [
|
|
3017
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-set-batch-a" } },
|
|
3018
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-set-batch-a" } }
|
|
3019
|
-
],
|
|
3020
|
-
options: {
|
|
3021
|
-
command: "quickstart-task-set-wait-linked-set-batch-a",
|
|
3022
|
-
defer_completion: true,
|
|
3023
|
-
timeoutMs: 5000,
|
|
3024
|
-
pollIntervalMs: 100
|
|
3025
|
-
}
|
|
3026
|
-
},
|
|
3027
|
-
{
|
|
3028
|
-
task_set_id: "task-set-wait-linked-set-b",
|
|
3029
|
-
tasks: [
|
|
3030
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-set-batch-b" } },
|
|
3031
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-set-batch-b" } }
|
|
3032
|
-
],
|
|
3033
|
-
options: {
|
|
3034
|
-
command: "quickstart-task-set-wait-linked-set-batch-b",
|
|
3035
|
-
defer_completion: true,
|
|
3036
|
-
timeoutMs: 5000,
|
|
3037
|
-
pollIntervalMs: 100
|
|
3038
|
-
}
|
|
3039
|
-
}
|
|
3040
|
-
]);
|
|
3041
|
-
assert.strictEqual(settledTaskSetLinkedSets.task_set_count, 2, "task-set settled linked sets batch missing");
|
|
3042
|
-
const settledTaskSetLinkedActivitySummaries = await client.executeTaskSetAndWaitLinkedRecordActivitySummaries([
|
|
3043
|
-
{
|
|
3044
|
-
task_set_id: "task-set-wait-linked-activity-a",
|
|
3045
|
-
tasks: [
|
|
3046
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-activity-batch-a" } },
|
|
3047
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-activity-batch-a" } }
|
|
3048
|
-
],
|
|
3049
|
-
options: {
|
|
3050
|
-
command: "quickstart-task-set-wait-linked-activity-batch-a",
|
|
3051
|
-
defer_completion: true,
|
|
3052
|
-
timeoutMs: 5000,
|
|
3053
|
-
pollIntervalMs: 100
|
|
3054
|
-
}
|
|
3055
|
-
},
|
|
3056
|
-
{
|
|
3057
|
-
task_set_id: "task-set-wait-linked-activity-b",
|
|
3058
|
-
tasks: [
|
|
3059
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-activity-batch-b" } },
|
|
3060
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-activity-batch-b" } }
|
|
3061
|
-
],
|
|
3062
|
-
options: {
|
|
3063
|
-
command: "quickstart-task-set-wait-linked-activity-batch-b",
|
|
3064
|
-
defer_completion: true,
|
|
3065
|
-
timeoutMs: 5000,
|
|
3066
|
-
pollIntervalMs: 100
|
|
3067
|
-
}
|
|
3068
|
-
}
|
|
3069
|
-
]);
|
|
3070
|
-
assert.strictEqual(settledTaskSetLinkedActivitySummaries.task_set_count, 2, "task-set settled linked activity summaries batch missing");
|
|
3071
|
-
const settledTaskSetLinkedActivitySnapshots = await client.executeTaskSetAndWaitLinkedRecordActivitySnapshots([
|
|
3072
|
-
{
|
|
3073
|
-
task_set_id: "task-set-wait-linked-activity-snapshot-a",
|
|
3074
|
-
tasks: [
|
|
3075
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-activity-snapshot-batch-a" } },
|
|
3076
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-activity-snapshot-batch-a" } }
|
|
3077
|
-
],
|
|
3078
|
-
options: {
|
|
3079
|
-
command: "quickstart-task-set-wait-linked-activity-snapshot-batch-a",
|
|
3080
|
-
defer_completion: true,
|
|
3081
|
-
timeoutMs: 5000,
|
|
3082
|
-
pollIntervalMs: 100
|
|
3083
|
-
}
|
|
3084
|
-
},
|
|
3085
|
-
{
|
|
3086
|
-
task_set_id: "task-set-wait-linked-activity-snapshot-b",
|
|
3087
|
-
tasks: [
|
|
3088
|
-
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-activity-snapshot-batch-b" } },
|
|
3089
|
-
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-activity-snapshot-batch-b" } }
|
|
3090
|
-
],
|
|
3091
|
-
options: {
|
|
3092
|
-
command: "quickstart-task-set-wait-linked-activity-snapshot-batch-b",
|
|
3093
|
-
defer_completion: true,
|
|
3094
|
-
timeoutMs: 5000,
|
|
3095
|
-
pollIntervalMs: 100
|
|
3096
|
-
}
|
|
3097
|
-
}
|
|
3098
|
-
]);
|
|
3099
|
-
assert.strictEqual(settledTaskSetLinkedActivitySnapshots.task_set_count, 2, "task-set settled linked activity snapshots batch missing");
|
|
3100
|
-
const settledTaskSetActivitySummary = await client.executeTaskSetAndWaitActivitySummary([
|
|
3101
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-activity" } },
|
|
3102
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-activity" } }
|
|
3103
|
-
], {
|
|
3104
|
-
command: "quickstart-task-set-wait-activity",
|
|
3105
|
-
defer_completion: true,
|
|
3106
|
-
timeoutMs: 5000,
|
|
3107
|
-
pollIntervalMs: 100
|
|
3108
|
-
});
|
|
3109
|
-
assert.strictEqual(settledTaskSetActivitySummary.delivery_count >= 1, true, "task-set settled activity summary missing");
|
|
3110
|
-
const settledTaskSetMonitorSummary = await client.executeTaskSetAndWaitMonitorSummary([
|
|
3111
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor" } },
|
|
3112
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor" } }
|
|
3113
|
-
], {
|
|
3114
|
-
command: "quickstart-task-set-wait-monitor",
|
|
3115
|
-
defer_completion: true,
|
|
3116
|
-
timeoutMs: 5000,
|
|
3117
|
-
pollIntervalMs: 100
|
|
3118
|
-
});
|
|
3119
|
-
assert.strictEqual(settledTaskSetMonitorSummary.status, "completed", "task-set settled monitor summary missing");
|
|
3120
|
-
const settledTaskSetLinkedSummary = await client.executeTaskSetAndWaitLinkedRecordSummary([
|
|
3121
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked" } },
|
|
3122
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked" } }
|
|
3123
|
-
], {
|
|
3124
|
-
command: "quickstart-task-set-wait-linked",
|
|
3125
|
-
defer_completion: true,
|
|
3126
|
-
timeoutMs: 5000,
|
|
3127
|
-
pollIntervalMs: 100
|
|
3128
|
-
});
|
|
3129
|
-
assert.strictEqual(settledTaskSetLinkedSummary.delivery_count >= 1, true, "task-set settled linked summary missing");
|
|
3130
|
-
const settledTaskSetLinkedActivitySummary = await client.executeTaskSetAndWaitLinkedRecordActivitySummary([
|
|
3131
|
-
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-activity" } },
|
|
3132
|
-
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-activity" } }
|
|
3133
|
-
], {
|
|
3134
|
-
command: "quickstart-task-set-wait-linked-activity",
|
|
3135
|
-
defer_completion: true,
|
|
3136
|
-
timeoutMs: 5000,
|
|
3137
|
-
pollIntervalMs: 100
|
|
3138
|
-
});
|
|
3139
|
-
assert.strictEqual(settledTaskSetLinkedActivitySummary.transaction_count >= 1, true, "task-set settled linked activity summary missing");
|
|
3140
|
-
const workflowResult = await client.executeWorkflow("policy.transaction.flow", {
|
|
3141
|
-
"policy.simulate": { policy: "policy-b" },
|
|
3142
|
-
"settlement.submit": { intent_id: "intent-2" }
|
|
3143
|
-
}, {
|
|
3144
|
-
command: "quickstart-workflow-run"
|
|
3145
|
-
});
|
|
3146
|
-
assert.strictEqual(workflowResult.transaction.execution.task_count, 2, "workflow execution count missing");
|
|
3147
|
-
const settledWorkflowResult = await client.executeWorkflowAndWait("policy.transaction.flow", {
|
|
3148
|
-
"policy.simulate": { policy: "policy-c" },
|
|
3149
|
-
"settlement.submit": { intent_id: "intent-3" }
|
|
3150
|
-
}, {
|
|
3151
|
-
command: "quickstart-workflow-run-wait",
|
|
3152
|
-
defer_completion: true,
|
|
3153
|
-
timeoutMs: 5000,
|
|
3154
|
-
pollIntervalMs: 100
|
|
3155
|
-
});
|
|
3156
|
-
assert.strictEqual(settledWorkflowResult.transaction.status, "completed", "workflow settled transaction missing");
|
|
3157
|
-
assert.strictEqual(settledWorkflowResult.delivery.status, "delivered", "workflow settled delivery missing");
|
|
3158
|
-
const settledWorkflowActivitySummary = await client.executeWorkflowAndWaitActivitySummary("policy.transaction.flow", {
|
|
3159
|
-
"policy.simulate": { policy: "policy-c-activity" },
|
|
3160
|
-
"settlement.submit": { intent_id: "intent-3-activity" }
|
|
3161
|
-
}, {
|
|
3162
|
-
command: "quickstart-workflow-run-wait-activity",
|
|
3163
|
-
defer_completion: true,
|
|
3164
|
-
timeoutMs: 5000,
|
|
3165
|
-
pollIntervalMs: 100
|
|
3166
|
-
});
|
|
3167
|
-
assert.strictEqual(settledWorkflowActivitySummary.delivery_count >= 1, true, "workflow settled activity summary missing");
|
|
3168
|
-
const settledWorkflowMonitorSummary = await client.executeWorkflowAndWaitMonitorSummary("policy.transaction.flow", {
|
|
3169
|
-
"policy.simulate": { policy: "policy-c-monitor" },
|
|
3170
|
-
"settlement.submit": { intent_id: "intent-3-monitor" }
|
|
3171
|
-
}, {
|
|
3172
|
-
command: "quickstart-workflow-run-wait-monitor",
|
|
3173
|
-
defer_completion: true,
|
|
3174
|
-
timeoutMs: 5000,
|
|
3175
|
-
pollIntervalMs: 100
|
|
3176
|
-
});
|
|
3177
|
-
assert.strictEqual(settledWorkflowMonitorSummary.status, "completed", "workflow settled monitor summary missing");
|
|
3178
|
-
const settledWorkflowLinkedSummary = await client.executeWorkflowAndWaitLinkedRecordSummary("policy.transaction.flow", {
|
|
3179
|
-
"policy.simulate": { policy: "policy-c-linked" },
|
|
3180
|
-
"settlement.submit": { intent_id: "intent-3-linked" }
|
|
3181
|
-
}, {
|
|
3182
|
-
command: "quickstart-workflow-run-wait-linked",
|
|
3183
|
-
defer_completion: true,
|
|
3184
|
-
timeoutMs: 5000,
|
|
3185
|
-
pollIntervalMs: 100
|
|
3186
|
-
});
|
|
3187
|
-
assert.strictEqual(settledWorkflowLinkedSummary.delivery_count >= 1, true, "workflow settled linked summary missing");
|
|
3188
|
-
const settledWorkflowLinkedActivitySummary = await client.executeWorkflowAndWaitLinkedRecordActivitySummary("policy.transaction.flow", {
|
|
3189
|
-
"policy.simulate": { policy: "policy-c-linked-activity" },
|
|
3190
|
-
"settlement.submit": { intent_id: "intent-3-linked-activity" }
|
|
3191
|
-
}, {
|
|
3192
|
-
command: "quickstart-workflow-run-wait-linked-activity",
|
|
3193
|
-
defer_completion: true,
|
|
3194
|
-
timeoutMs: 5000,
|
|
3195
|
-
pollIntervalMs: 100
|
|
3196
|
-
});
|
|
3197
|
-
assert.strictEqual(settledWorkflowLinkedActivitySummary.transaction_count >= 1, true, "workflow settled linked activity summary missing");
|
|
3198
|
-
const quoteList = await client.listPaymentQuotes({ status: "executed", account_id: "acct_demo" });
|
|
3199
|
-
assert.strictEqual(Array.isArray(quoteList.quotes), true, "quote list missing");
|
|
3200
|
-
const activitySnapshot = await client.getActivitySnapshot({ account_id: "acct_demo" });
|
|
3201
|
-
const activitySummary = client.summarizeActivitySnapshot(activitySnapshot);
|
|
3202
|
-
assert.strictEqual(activitySummary.transaction_count >= 1, true, "activity snapshot missing");
|
|
3203
|
-
const activitySummaryDirect = await client.getActivitySummary({ account_id: "acct_demo" });
|
|
3204
|
-
assert.strictEqual(activitySummaryDirect.transaction_count >= 1, true, "activity summary helper missing");
|
|
3205
|
-
const quoteActivity = await client.getQuoteActivitySnapshot(result.transaction.quote_id);
|
|
3206
|
-
const quoteActivitySummary = client.summarizeActivitySnapshot(quoteActivity);
|
|
3207
|
-
assert.strictEqual(quoteActivitySummary.quote_count >= 1, true, "quote activity snapshot missing");
|
|
3208
|
-
const quoteActivitySummaryDirect = await client.getQuoteActivitySummary(result.transaction.quote_id);
|
|
3209
|
-
assert.strictEqual(quoteActivitySummaryDirect.quote_count >= 1, true, "quote activity summary helper missing");
|
|
3210
|
-
const transactionActivity = await client.getTransactionActivitySnapshot(result.transaction.transaction_id);
|
|
3211
|
-
const transactionActivitySummary = client.summarizeActivitySnapshot(transactionActivity);
|
|
3212
|
-
assert.strictEqual(transactionActivitySummary.transaction_count >= 1, true, "transaction activity snapshot missing");
|
|
3213
|
-
const transactionActivitySummaryDirect = await client.getTransactionActivitySummary(result.transaction.transaction_id);
|
|
3214
|
-
assert.strictEqual(transactionActivitySummaryDirect.transaction_count >= 1, true, "transaction activity summary helper missing");
|
|
3215
|
-
const receiptActivity = await client.getReceiptActivitySnapshot(result.receipt.receipt_id);
|
|
3216
|
-
const receiptActivitySummary = client.summarizeActivitySnapshot(receiptActivity);
|
|
3217
|
-
assert.strictEqual(receiptActivitySummary.receipt_count >= 1, true, "receipt activity snapshot missing");
|
|
3218
|
-
const receiptActivitySummaryDirect = await client.getReceiptActivitySummary(result.receipt.receipt_id);
|
|
3219
|
-
assert.strictEqual(receiptActivitySummaryDirect.receipt_count >= 1, true, "receipt activity summary helper missing");
|
|
3220
|
-
const paymentActivity = await client.getPaymentActivitySnapshot(paymentEntry.payment.payment_id);
|
|
3221
|
-
const paymentActivitySummary = client.summarizeActivitySnapshot(paymentActivity);
|
|
3222
|
-
assert.strictEqual(paymentActivitySummary.payment_ledger_count >= 1, true, "payment activity snapshot missing");
|
|
3223
|
-
const paymentActivitySummaryDirect = await client.getPaymentActivitySummary(paymentEntry.payment.payment_id);
|
|
3224
|
-
assert.strictEqual(paymentActivitySummaryDirect.payment_ledger_count >= 1, true, "payment activity summary helper missing");
|
|
3225
|
-
const deliveryActivity = await client.getDeliveryActivitySnapshot(delivery.delivery.delivery_id);
|
|
3226
|
-
const deliveryActivitySummary = client.summarizeActivitySnapshot(deliveryActivity);
|
|
3227
|
-
assert.strictEqual(deliveryActivitySummary.delivery_count >= 1, true, "delivery activity snapshot missing");
|
|
3228
|
-
const deliveryActivitySummaryDirect = await client.getDeliveryActivitySummary(delivery.delivery.delivery_id);
|
|
3229
|
-
assert.strictEqual(deliveryActivitySummaryDirect.delivery_count >= 1, true, "delivery activity summary helper missing");
|
|
3230
|
-
const reconciliation = await client.getReconciliationReport();
|
|
3231
|
-
assert.strictEqual(typeof reconciliation.summary, "object", "reconciliation report missing");
|
|
3232
|
-
const reconciliationSummary = client.summarizeReconciliationReport(reconciliation);
|
|
3233
|
-
assert.strictEqual(typeof reconciliationSummary.delivery_count, "number", "reconciliation summary missing");
|
|
3234
|
-
const reconciliationSummaryDirect = await client.getReconciliationReportSummary();
|
|
3235
|
-
assert.strictEqual(typeof reconciliationSummaryDirect.delivery_count, "number", "reconciliation summary helper missing");
|
|
3236
|
-
const exportPack = await client.getOperatorExportPack();
|
|
3237
|
-
assert.strictEqual(typeof exportPack.aggregates, "object", "operator export pack missing");
|
|
3238
|
-
const exportSummary = client.summarizeOperatorExportPack(exportPack);
|
|
3239
|
-
assert.strictEqual(typeof exportSummary.payment_ledger_count, "number", "operator export summary missing");
|
|
3240
|
-
const exportSummaryDirect = await client.getOperatorExportPackSummary();
|
|
3241
|
-
assert.strictEqual(typeof exportSummaryDirect.payment_ledger_count, "number", "operator export summary helper missing");
|
|
3242
|
-
|
|
3243
|
-
console.log("xytara quickstart passed");
|
|
3244
|
-
} finally {
|
|
3245
|
-
await new Promise((resolve, reject) => {
|
|
3246
|
-
server.close((error) => (error ? reject(error) : resolve()));
|
|
3247
|
-
});
|
|
3248
|
-
}
|
|
3249
|
-
}
|
|
3250
|
-
|
|
3251
|
-
main().catch((error) => {
|
|
3252
|
-
console.error(error);
|
|
3253
|
-
process.exitCode = 1;
|
|
3254
|
-
});
|
|
3255
|
-
|
|
2986
|
+
{
|
|
2987
|
+
task_set_id: "task-set-wait-linked-a",
|
|
2988
|
+
tasks: [
|
|
2989
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-batch-a" } },
|
|
2990
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-batch-a" } }
|
|
2991
|
+
],
|
|
2992
|
+
options: {
|
|
2993
|
+
command: "quickstart-task-set-wait-linked-batch-a",
|
|
2994
|
+
defer_completion: true,
|
|
2995
|
+
timeoutMs: 5000,
|
|
2996
|
+
pollIntervalMs: 100
|
|
2997
|
+
}
|
|
2998
|
+
},
|
|
2999
|
+
{
|
|
3000
|
+
task_set_id: "task-set-wait-linked-b",
|
|
3001
|
+
tasks: [
|
|
3002
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-batch-b" } },
|
|
3003
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-batch-b" } }
|
|
3004
|
+
],
|
|
3005
|
+
options: {
|
|
3006
|
+
command: "quickstart-task-set-wait-linked-batch-b",
|
|
3007
|
+
defer_completion: true,
|
|
3008
|
+
timeoutMs: 5000,
|
|
3009
|
+
pollIntervalMs: 100
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
]);
|
|
3013
|
+
assert.strictEqual(settledTaskSetLinkedSummaries.task_set_count, 2, "task-set settled linked summaries batch missing");
|
|
3014
|
+
const settledTaskSetLinkedSets = await client.executeTaskSetAndWaitLinkedRecordSets([
|
|
3015
|
+
{
|
|
3016
|
+
task_set_id: "task-set-wait-linked-set-a",
|
|
3017
|
+
tasks: [
|
|
3018
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-set-batch-a" } },
|
|
3019
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-set-batch-a" } }
|
|
3020
|
+
],
|
|
3021
|
+
options: {
|
|
3022
|
+
command: "quickstart-task-set-wait-linked-set-batch-a",
|
|
3023
|
+
defer_completion: true,
|
|
3024
|
+
timeoutMs: 5000,
|
|
3025
|
+
pollIntervalMs: 100
|
|
3026
|
+
}
|
|
3027
|
+
},
|
|
3028
|
+
{
|
|
3029
|
+
task_set_id: "task-set-wait-linked-set-b",
|
|
3030
|
+
tasks: [
|
|
3031
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-set-batch-b" } },
|
|
3032
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-set-batch-b" } }
|
|
3033
|
+
],
|
|
3034
|
+
options: {
|
|
3035
|
+
command: "quickstart-task-set-wait-linked-set-batch-b",
|
|
3036
|
+
defer_completion: true,
|
|
3037
|
+
timeoutMs: 5000,
|
|
3038
|
+
pollIntervalMs: 100
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
]);
|
|
3042
|
+
assert.strictEqual(settledTaskSetLinkedSets.task_set_count, 2, "task-set settled linked sets batch missing");
|
|
3043
|
+
const settledTaskSetLinkedActivitySummaries = await client.executeTaskSetAndWaitLinkedRecordActivitySummaries([
|
|
3044
|
+
{
|
|
3045
|
+
task_set_id: "task-set-wait-linked-activity-a",
|
|
3046
|
+
tasks: [
|
|
3047
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-activity-batch-a" } },
|
|
3048
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-activity-batch-a" } }
|
|
3049
|
+
],
|
|
3050
|
+
options: {
|
|
3051
|
+
command: "quickstart-task-set-wait-linked-activity-batch-a",
|
|
3052
|
+
defer_completion: true,
|
|
3053
|
+
timeoutMs: 5000,
|
|
3054
|
+
pollIntervalMs: 100
|
|
3055
|
+
}
|
|
3056
|
+
},
|
|
3057
|
+
{
|
|
3058
|
+
task_set_id: "task-set-wait-linked-activity-b",
|
|
3059
|
+
tasks: [
|
|
3060
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-activity-batch-b" } },
|
|
3061
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-activity-batch-b" } }
|
|
3062
|
+
],
|
|
3063
|
+
options: {
|
|
3064
|
+
command: "quickstart-task-set-wait-linked-activity-batch-b",
|
|
3065
|
+
defer_completion: true,
|
|
3066
|
+
timeoutMs: 5000,
|
|
3067
|
+
pollIntervalMs: 100
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
]);
|
|
3071
|
+
assert.strictEqual(settledTaskSetLinkedActivitySummaries.task_set_count, 2, "task-set settled linked activity summaries batch missing");
|
|
3072
|
+
const settledTaskSetLinkedActivitySnapshots = await client.executeTaskSetAndWaitLinkedRecordActivitySnapshots([
|
|
3073
|
+
{
|
|
3074
|
+
task_set_id: "task-set-wait-linked-activity-snapshot-a",
|
|
3075
|
+
tasks: [
|
|
3076
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-activity-snapshot-batch-a" } },
|
|
3077
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-activity-snapshot-batch-a" } }
|
|
3078
|
+
],
|
|
3079
|
+
options: {
|
|
3080
|
+
command: "quickstart-task-set-wait-linked-activity-snapshot-batch-a",
|
|
3081
|
+
defer_completion: true,
|
|
3082
|
+
timeoutMs: 5000,
|
|
3083
|
+
pollIntervalMs: 100
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
3086
|
+
{
|
|
3087
|
+
task_set_id: "task-set-wait-linked-activity-snapshot-b",
|
|
3088
|
+
tasks: [
|
|
3089
|
+
{ task_ref: "trust.verify", body: { subject_id: "subject-task-set-wait-linked-activity-snapshot-batch-b" } },
|
|
3090
|
+
{ task_ref: "receipt.validate", body: { receipt_id: "rcpt-task-set-wait-linked-activity-snapshot-batch-b" } }
|
|
3091
|
+
],
|
|
3092
|
+
options: {
|
|
3093
|
+
command: "quickstart-task-set-wait-linked-activity-snapshot-batch-b",
|
|
3094
|
+
defer_completion: true,
|
|
3095
|
+
timeoutMs: 5000,
|
|
3096
|
+
pollIntervalMs: 100
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
]);
|
|
3100
|
+
assert.strictEqual(settledTaskSetLinkedActivitySnapshots.task_set_count, 2, "task-set settled linked activity snapshots batch missing");
|
|
3101
|
+
const settledTaskSetActivitySummary = await client.executeTaskSetAndWaitActivitySummary([
|
|
3102
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-activity" } },
|
|
3103
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-activity" } }
|
|
3104
|
+
], {
|
|
3105
|
+
command: "quickstart-task-set-wait-activity",
|
|
3106
|
+
defer_completion: true,
|
|
3107
|
+
timeoutMs: 5000,
|
|
3108
|
+
pollIntervalMs: 100
|
|
3109
|
+
});
|
|
3110
|
+
assert.strictEqual(settledTaskSetActivitySummary.delivery_count >= 1, true, "task-set settled activity summary missing");
|
|
3111
|
+
const settledTaskSetMonitorSummary = await client.executeTaskSetAndWaitMonitorSummary([
|
|
3112
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-monitor" } },
|
|
3113
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-monitor" } }
|
|
3114
|
+
], {
|
|
3115
|
+
command: "quickstart-task-set-wait-monitor",
|
|
3116
|
+
defer_completion: true,
|
|
3117
|
+
timeoutMs: 5000,
|
|
3118
|
+
pollIntervalMs: 100
|
|
3119
|
+
});
|
|
3120
|
+
assert.strictEqual(settledTaskSetMonitorSummary.status, "completed", "task-set settled monitor summary missing");
|
|
3121
|
+
const settledTaskSetLinkedSummary = await client.executeTaskSetAndWaitLinkedRecordSummary([
|
|
3122
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked" } },
|
|
3123
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked" } }
|
|
3124
|
+
], {
|
|
3125
|
+
command: "quickstart-task-set-wait-linked",
|
|
3126
|
+
defer_completion: true,
|
|
3127
|
+
timeoutMs: 5000,
|
|
3128
|
+
pollIntervalMs: 100
|
|
3129
|
+
});
|
|
3130
|
+
assert.strictEqual(settledTaskSetLinkedSummary.delivery_count >= 1, true, "task-set settled linked summary missing");
|
|
3131
|
+
const settledTaskSetLinkedActivitySummary = await client.executeTaskSetAndWaitLinkedRecordActivitySummary([
|
|
3132
|
+
{ task_ref: "policy.simulate", body: { policy: "policy-task-set-wait-linked-activity" } },
|
|
3133
|
+
{ task_ref: "settlement.submit", body: { intent_id: "intent-task-set-wait-linked-activity" } }
|
|
3134
|
+
], {
|
|
3135
|
+
command: "quickstart-task-set-wait-linked-activity",
|
|
3136
|
+
defer_completion: true,
|
|
3137
|
+
timeoutMs: 5000,
|
|
3138
|
+
pollIntervalMs: 100
|
|
3139
|
+
});
|
|
3140
|
+
assert.strictEqual(settledTaskSetLinkedActivitySummary.transaction_count >= 1, true, "task-set settled linked activity summary missing");
|
|
3141
|
+
const workflowResult = await client.executeWorkflow("policy.transaction.flow", {
|
|
3142
|
+
"policy.simulate": { policy: "policy-b" },
|
|
3143
|
+
"settlement.submit": { intent_id: "intent-2" }
|
|
3144
|
+
}, {
|
|
3145
|
+
command: "quickstart-workflow-run"
|
|
3146
|
+
});
|
|
3147
|
+
assert.strictEqual(workflowResult.transaction.execution.task_count, 2, "workflow execution count missing");
|
|
3148
|
+
const settledWorkflowResult = await client.executeWorkflowAndWait("policy.transaction.flow", {
|
|
3149
|
+
"policy.simulate": { policy: "policy-c" },
|
|
3150
|
+
"settlement.submit": { intent_id: "intent-3" }
|
|
3151
|
+
}, {
|
|
3152
|
+
command: "quickstart-workflow-run-wait",
|
|
3153
|
+
defer_completion: true,
|
|
3154
|
+
timeoutMs: 5000,
|
|
3155
|
+
pollIntervalMs: 100
|
|
3156
|
+
});
|
|
3157
|
+
assert.strictEqual(settledWorkflowResult.transaction.status, "completed", "workflow settled transaction missing");
|
|
3158
|
+
assert.strictEqual(settledWorkflowResult.delivery.status, "delivered", "workflow settled delivery missing");
|
|
3159
|
+
const settledWorkflowActivitySummary = await client.executeWorkflowAndWaitActivitySummary("policy.transaction.flow", {
|
|
3160
|
+
"policy.simulate": { policy: "policy-c-activity" },
|
|
3161
|
+
"settlement.submit": { intent_id: "intent-3-activity" }
|
|
3162
|
+
}, {
|
|
3163
|
+
command: "quickstart-workflow-run-wait-activity",
|
|
3164
|
+
defer_completion: true,
|
|
3165
|
+
timeoutMs: 5000,
|
|
3166
|
+
pollIntervalMs: 100
|
|
3167
|
+
});
|
|
3168
|
+
assert.strictEqual(settledWorkflowActivitySummary.delivery_count >= 1, true, "workflow settled activity summary missing");
|
|
3169
|
+
const settledWorkflowMonitorSummary = await client.executeWorkflowAndWaitMonitorSummary("policy.transaction.flow", {
|
|
3170
|
+
"policy.simulate": { policy: "policy-c-monitor" },
|
|
3171
|
+
"settlement.submit": { intent_id: "intent-3-monitor" }
|
|
3172
|
+
}, {
|
|
3173
|
+
command: "quickstart-workflow-run-wait-monitor",
|
|
3174
|
+
defer_completion: true,
|
|
3175
|
+
timeoutMs: 5000,
|
|
3176
|
+
pollIntervalMs: 100
|
|
3177
|
+
});
|
|
3178
|
+
assert.strictEqual(settledWorkflowMonitorSummary.status, "completed", "workflow settled monitor summary missing");
|
|
3179
|
+
const settledWorkflowLinkedSummary = await client.executeWorkflowAndWaitLinkedRecordSummary("policy.transaction.flow", {
|
|
3180
|
+
"policy.simulate": { policy: "policy-c-linked" },
|
|
3181
|
+
"settlement.submit": { intent_id: "intent-3-linked" }
|
|
3182
|
+
}, {
|
|
3183
|
+
command: "quickstart-workflow-run-wait-linked",
|
|
3184
|
+
defer_completion: true,
|
|
3185
|
+
timeoutMs: 5000,
|
|
3186
|
+
pollIntervalMs: 100
|
|
3187
|
+
});
|
|
3188
|
+
assert.strictEqual(settledWorkflowLinkedSummary.delivery_count >= 1, true, "workflow settled linked summary missing");
|
|
3189
|
+
const settledWorkflowLinkedActivitySummary = await client.executeWorkflowAndWaitLinkedRecordActivitySummary("policy.transaction.flow", {
|
|
3190
|
+
"policy.simulate": { policy: "policy-c-linked-activity" },
|
|
3191
|
+
"settlement.submit": { intent_id: "intent-3-linked-activity" }
|
|
3192
|
+
}, {
|
|
3193
|
+
command: "quickstart-workflow-run-wait-linked-activity",
|
|
3194
|
+
defer_completion: true,
|
|
3195
|
+
timeoutMs: 5000,
|
|
3196
|
+
pollIntervalMs: 100
|
|
3197
|
+
});
|
|
3198
|
+
assert.strictEqual(settledWorkflowLinkedActivitySummary.transaction_count >= 1, true, "workflow settled linked activity summary missing");
|
|
3199
|
+
const quoteList = await client.listPaymentQuotes({ status: "executed", account_id: "acct_demo" });
|
|
3200
|
+
assert.strictEqual(Array.isArray(quoteList.quotes), true, "quote list missing");
|
|
3201
|
+
const activitySnapshot = await client.getActivitySnapshot({ account_id: "acct_demo" });
|
|
3202
|
+
const activitySummary = client.summarizeActivitySnapshot(activitySnapshot);
|
|
3203
|
+
assert.strictEqual(activitySummary.transaction_count >= 1, true, "activity snapshot missing");
|
|
3204
|
+
const activitySummaryDirect = await client.getActivitySummary({ account_id: "acct_demo" });
|
|
3205
|
+
assert.strictEqual(activitySummaryDirect.transaction_count >= 1, true, "activity summary helper missing");
|
|
3206
|
+
const quoteActivity = await client.getQuoteActivitySnapshot(result.transaction.quote_id);
|
|
3207
|
+
const quoteActivitySummary = client.summarizeActivitySnapshot(quoteActivity);
|
|
3208
|
+
assert.strictEqual(quoteActivitySummary.quote_count >= 1, true, "quote activity snapshot missing");
|
|
3209
|
+
const quoteActivitySummaryDirect = await client.getQuoteActivitySummary(result.transaction.quote_id);
|
|
3210
|
+
assert.strictEqual(quoteActivitySummaryDirect.quote_count >= 1, true, "quote activity summary helper missing");
|
|
3211
|
+
const transactionActivity = await client.getTransactionActivitySnapshot(result.transaction.transaction_id);
|
|
3212
|
+
const transactionActivitySummary = client.summarizeActivitySnapshot(transactionActivity);
|
|
3213
|
+
assert.strictEqual(transactionActivitySummary.transaction_count >= 1, true, "transaction activity snapshot missing");
|
|
3214
|
+
const transactionActivitySummaryDirect = await client.getTransactionActivitySummary(result.transaction.transaction_id);
|
|
3215
|
+
assert.strictEqual(transactionActivitySummaryDirect.transaction_count >= 1, true, "transaction activity summary helper missing");
|
|
3216
|
+
const receiptActivity = await client.getReceiptActivitySnapshot(result.receipt.receipt_id);
|
|
3217
|
+
const receiptActivitySummary = client.summarizeActivitySnapshot(receiptActivity);
|
|
3218
|
+
assert.strictEqual(receiptActivitySummary.receipt_count >= 1, true, "receipt activity snapshot missing");
|
|
3219
|
+
const receiptActivitySummaryDirect = await client.getReceiptActivitySummary(result.receipt.receipt_id);
|
|
3220
|
+
assert.strictEqual(receiptActivitySummaryDirect.receipt_count >= 1, true, "receipt activity summary helper missing");
|
|
3221
|
+
const paymentActivity = await client.getPaymentActivitySnapshot(paymentEntry.payment.payment_id);
|
|
3222
|
+
const paymentActivitySummary = client.summarizeActivitySnapshot(paymentActivity);
|
|
3223
|
+
assert.strictEqual(paymentActivitySummary.payment_ledger_count >= 1, true, "payment activity snapshot missing");
|
|
3224
|
+
const paymentActivitySummaryDirect = await client.getPaymentActivitySummary(paymentEntry.payment.payment_id);
|
|
3225
|
+
assert.strictEqual(paymentActivitySummaryDirect.payment_ledger_count >= 1, true, "payment activity summary helper missing");
|
|
3226
|
+
const deliveryActivity = await client.getDeliveryActivitySnapshot(delivery.delivery.delivery_id);
|
|
3227
|
+
const deliveryActivitySummary = client.summarizeActivitySnapshot(deliveryActivity);
|
|
3228
|
+
assert.strictEqual(deliveryActivitySummary.delivery_count >= 1, true, "delivery activity snapshot missing");
|
|
3229
|
+
const deliveryActivitySummaryDirect = await client.getDeliveryActivitySummary(delivery.delivery.delivery_id);
|
|
3230
|
+
assert.strictEqual(deliveryActivitySummaryDirect.delivery_count >= 1, true, "delivery activity summary helper missing");
|
|
3231
|
+
const reconciliation = await client.getReconciliationReport();
|
|
3232
|
+
assert.strictEqual(typeof reconciliation.summary, "object", "reconciliation report missing");
|
|
3233
|
+
const reconciliationSummary = client.summarizeReconciliationReport(reconciliation);
|
|
3234
|
+
assert.strictEqual(typeof reconciliationSummary.delivery_count, "number", "reconciliation summary missing");
|
|
3235
|
+
const reconciliationSummaryDirect = await client.getReconciliationReportSummary();
|
|
3236
|
+
assert.strictEqual(typeof reconciliationSummaryDirect.delivery_count, "number", "reconciliation summary helper missing");
|
|
3237
|
+
const exportPack = await client.getOperatorExportPack();
|
|
3238
|
+
assert.strictEqual(typeof exportPack.aggregates, "object", "operator export pack missing");
|
|
3239
|
+
const exportSummary = client.summarizeOperatorExportPack(exportPack);
|
|
3240
|
+
assert.strictEqual(typeof exportSummary.payment_ledger_count, "number", "operator export summary missing");
|
|
3241
|
+
const exportSummaryDirect = await client.getOperatorExportPackSummary();
|
|
3242
|
+
assert.strictEqual(typeof exportSummaryDirect.payment_ledger_count, "number", "operator export summary helper missing");
|
|
3243
|
+
|
|
3244
|
+
console.log("xytara quickstart passed");
|
|
3245
|
+
} finally {
|
|
3246
|
+
await new Promise((resolve, reject) => {
|
|
3247
|
+
server.close((error) => (error ? reject(error) : resolve()));
|
|
3248
|
+
});
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3252
|
+
main().catch((error) => {
|
|
3253
|
+
console.error(error);
|
|
3254
|
+
process.exitCode = 1;
|
|
3255
|
+
});
|
|
3256
|
+
|