@orvello/sdk 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRACT_SHA256 +1 -1
- package/README.md +18 -0
- package/dist/contract.cjs +191 -0
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +609 -3
- package/dist/contract.d.ts +609 -3
- package/dist/contract.js +191 -0
- package/dist/contract.js.map +1 -1
- package/dist/index.cjs +29 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +29 -3
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1949 -200
- package/package.json +1 -1
package/CONTRACT_SHA256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
02a65db9ad216d195f560a2e4f7cdd7a19a38814362b4c89551188796b017768
|
package/README.md
CHANGED
|
@@ -418,3 +418,21 @@ allocations separately from invoice status. Amounts remain decimal strings. Use
|
|
|
418
418
|
`bankPaymentConfirmed`, `state` and `issues` together; a manual `paid` mark alone is
|
|
419
419
|
not bank evidence. `revision` is a content digest, not an ordered event version.
|
|
420
420
|
This call neither imports bank transactions nor initiates payments.
|
|
421
|
+
|
|
422
|
+
### Frozen bank payment instructions
|
|
423
|
+
|
|
424
|
+
`client.invoices.getPaymentInstructions(invoiceId)` reads the invoice's frozen bank
|
|
425
|
+
reference and recipient. The amount is a decimal string. Existing invoices without a
|
|
426
|
+
snapshot return HTTP 409; the SDK does not invent instructions. This read is not payment
|
|
427
|
+
evidence and must not trigger provisioning. Use `getPaymentEvidence` for bank coverage.
|
|
428
|
+
The matching Bills endpoint and schema must be deployed before using this operation.
|
|
429
|
+
|
|
430
|
+
### Replay bank payment evidence events
|
|
431
|
+
|
|
432
|
+
`client.invoices.getPaymentEvents(invoiceId, { afterVersion: 0, limit: 50 })`
|
|
433
|
+
returns durable events ordered by per-invoice `version`, plus `nextVersion` and
|
|
434
|
+
`hasMore`. Store the cursor atomically with inbox processing, deduplicate by event
|
|
435
|
+
UUID and reject unknown schema versions. Replay does not acknowledge/delete events.
|
|
436
|
+
Re-read `getPaymentEvidence(invoiceId)` before acting on historical coverage.
|
|
437
|
+
A later event can revoke it. Invoices without frozen instructions are not enrolled.
|
|
438
|
+
Available with Bills payment-event journal migration 0041 and the matching API deployment.
|
package/dist/contract.cjs
CHANGED
|
@@ -394,6 +394,70 @@ var apiRoutes_app_info = {
|
|
|
394
394
|
|
|
395
395
|
// src/generated/api/base/routes.auth.ts
|
|
396
396
|
var apiRoutes_auth = {
|
|
397
|
+
// Contract source: explicit
|
|
398
|
+
"auth_mfa_complete": {
|
|
399
|
+
method: "POST",
|
|
400
|
+
path: "/auth/mfa/complete",
|
|
401
|
+
auth: { "type": "public" },
|
|
402
|
+
meta: {
|
|
403
|
+
tags: ["auth"],
|
|
404
|
+
summary: "Complete a first-factor login with TOTP or a recovery code",
|
|
405
|
+
bodyContentType: "application/json",
|
|
406
|
+
validated: { "params": false, "query": false, "body": true }
|
|
407
|
+
},
|
|
408
|
+
types: null
|
|
409
|
+
},
|
|
410
|
+
// Contract source: explicit
|
|
411
|
+
"auth_mfa_status": {
|
|
412
|
+
method: "GET",
|
|
413
|
+
path: "/auth/mfa",
|
|
414
|
+
auth: { "type": "frontend_bearer_http" },
|
|
415
|
+
meta: {
|
|
416
|
+
tags: ["auth"],
|
|
417
|
+
summary: "Read the current product account's MFA status",
|
|
418
|
+
validated: { "params": false, "query": true, "body": false }
|
|
419
|
+
},
|
|
420
|
+
types: null
|
|
421
|
+
},
|
|
422
|
+
// Contract source: explicit
|
|
423
|
+
"auth_mfa_setup": {
|
|
424
|
+
method: "POST",
|
|
425
|
+
path: "/auth/mfa/setup",
|
|
426
|
+
auth: { "type": "frontend_bearer_http" },
|
|
427
|
+
meta: {
|
|
428
|
+
tags: ["auth"],
|
|
429
|
+
summary: "Prepare TOTP enrollment after rechecking the password",
|
|
430
|
+
bodyContentType: "application/json",
|
|
431
|
+
validated: { "params": false, "query": false, "body": true }
|
|
432
|
+
},
|
|
433
|
+
types: null
|
|
434
|
+
},
|
|
435
|
+
// Contract source: explicit
|
|
436
|
+
"auth_mfa_enable": {
|
|
437
|
+
method: "POST",
|
|
438
|
+
path: "/auth/mfa/enable",
|
|
439
|
+
auth: { "type": "frontend_bearer_http" },
|
|
440
|
+
meta: {
|
|
441
|
+
tags: ["auth"],
|
|
442
|
+
summary: "Confirm TOTP enrollment and return recovery codes once",
|
|
443
|
+
bodyContentType: "application/json",
|
|
444
|
+
validated: { "params": false, "query": false, "body": true }
|
|
445
|
+
},
|
|
446
|
+
types: null
|
|
447
|
+
},
|
|
448
|
+
// Contract source: explicit
|
|
449
|
+
"auth_mfa_disable": {
|
|
450
|
+
method: "POST",
|
|
451
|
+
path: "/auth/mfa/disable",
|
|
452
|
+
auth: { "type": "frontend_bearer_http" },
|
|
453
|
+
meta: {
|
|
454
|
+
tags: ["auth"],
|
|
455
|
+
summary: "Disable MFA using both the password and a second factor",
|
|
456
|
+
bodyContentType: "application/json",
|
|
457
|
+
validated: { "params": false, "query": false, "body": true }
|
|
458
|
+
},
|
|
459
|
+
types: null
|
|
460
|
+
},
|
|
397
461
|
// Contract source: explicit
|
|
398
462
|
"auth_register": {
|
|
399
463
|
method: "POST",
|
|
@@ -521,6 +585,107 @@ var apiRoutes_auth = {
|
|
|
521
585
|
validated: { "params": false, "query": true, "body": false }
|
|
522
586
|
},
|
|
523
587
|
types: null
|
|
588
|
+
},
|
|
589
|
+
// Contract source: explicit
|
|
590
|
+
"auth_me_email_patch": {
|
|
591
|
+
method: "PATCH",
|
|
592
|
+
path: "/auth/me/email",
|
|
593
|
+
auth: { "type": "frontend_bearer_http" },
|
|
594
|
+
meta: {
|
|
595
|
+
tags: ["auth"],
|
|
596
|
+
summary: "Change current user's email after password confirmation",
|
|
597
|
+
bodyContentType: "application/json",
|
|
598
|
+
validated: { "params": false, "query": false, "body": true }
|
|
599
|
+
},
|
|
600
|
+
types: null
|
|
601
|
+
},
|
|
602
|
+
// Contract source: explicit
|
|
603
|
+
"auth_password_change": {
|
|
604
|
+
method: "POST",
|
|
605
|
+
path: "/auth/password/change",
|
|
606
|
+
auth: { "type": "frontend_bearer_http" },
|
|
607
|
+
meta: {
|
|
608
|
+
tags: ["auth"],
|
|
609
|
+
summary: "Change password for the current user",
|
|
610
|
+
bodyContentType: "application/json",
|
|
611
|
+
validated: { "params": false, "query": false, "body": true }
|
|
612
|
+
},
|
|
613
|
+
types: null
|
|
614
|
+
},
|
|
615
|
+
// Contract source: explicit
|
|
616
|
+
"auth_password_reset_request": {
|
|
617
|
+
method: "POST",
|
|
618
|
+
path: "/auth/password/reset/request",
|
|
619
|
+
auth: { "type": "public" },
|
|
620
|
+
meta: {
|
|
621
|
+
tags: ["auth"],
|
|
622
|
+
summary: "Request a password reset email",
|
|
623
|
+
bodyContentType: "application/json",
|
|
624
|
+
validated: { "params": false, "query": false, "body": true }
|
|
625
|
+
},
|
|
626
|
+
types: null
|
|
627
|
+
},
|
|
628
|
+
// Contract source: explicit
|
|
629
|
+
"auth_password_reset_confirm": {
|
|
630
|
+
method: "POST",
|
|
631
|
+
path: "/auth/password/reset/confirm",
|
|
632
|
+
auth: { "type": "public" },
|
|
633
|
+
meta: {
|
|
634
|
+
tags: ["auth"],
|
|
635
|
+
summary: "Reset password with an email token",
|
|
636
|
+
bodyContentType: "application/json",
|
|
637
|
+
validated: { "params": false, "query": false, "body": true }
|
|
638
|
+
},
|
|
639
|
+
types: null
|
|
640
|
+
},
|
|
641
|
+
// Contract source: explicit
|
|
642
|
+
"auth_password_reset_landing": {
|
|
643
|
+
method: "GET",
|
|
644
|
+
path: "/auth/password/reset",
|
|
645
|
+
auth: { "type": "public" },
|
|
646
|
+
meta: {
|
|
647
|
+
tags: ["auth"],
|
|
648
|
+
summary: "Browser landing page for password reset links",
|
|
649
|
+
validated: { "params": false, "query": true, "body": false }
|
|
650
|
+
},
|
|
651
|
+
types: null
|
|
652
|
+
},
|
|
653
|
+
// Contract source: explicit
|
|
654
|
+
"auth_sessions_list": {
|
|
655
|
+
method: "GET",
|
|
656
|
+
path: "/auth/sessions",
|
|
657
|
+
auth: { "type": "frontend_bearer_http" },
|
|
658
|
+
meta: {
|
|
659
|
+
tags: ["auth"],
|
|
660
|
+
summary: "List active refresh-token sessions for the current user",
|
|
661
|
+
validated: { "params": false, "query": true, "body": false }
|
|
662
|
+
},
|
|
663
|
+
types: null
|
|
664
|
+
},
|
|
665
|
+
// Contract source: explicit
|
|
666
|
+
"auth_sessions_revoke": {
|
|
667
|
+
method: "DELETE",
|
|
668
|
+
path: "/auth/sessions/:sessionId",
|
|
669
|
+
auth: { "type": "frontend_bearer_http" },
|
|
670
|
+
meta: {
|
|
671
|
+
tags: ["auth"],
|
|
672
|
+
summary: "Revoke one active session",
|
|
673
|
+
validated: { "params": true, "query": false, "body": false }
|
|
674
|
+
},
|
|
675
|
+
types: null
|
|
676
|
+
},
|
|
677
|
+
// Contract source: explicit
|
|
678
|
+
"auth_sessions_revoke_other": {
|
|
679
|
+
method: "POST",
|
|
680
|
+
path: "/auth/sessions/revoke-other",
|
|
681
|
+
auth: { "type": "frontend_bearer_http" },
|
|
682
|
+
meta: {
|
|
683
|
+
tags: ["auth"],
|
|
684
|
+
summary: "Revoke all sessions except the supplied current refresh token",
|
|
685
|
+
bodyContentType: "application/json",
|
|
686
|
+
validated: { "params": false, "query": false, "body": true }
|
|
687
|
+
},
|
|
688
|
+
types: null
|
|
524
689
|
}
|
|
525
690
|
};
|
|
526
691
|
|
|
@@ -3711,6 +3876,19 @@ var apiRoutes_invoices = {
|
|
|
3711
3876
|
|
|
3712
3877
|
// src/generated/api/features/routes.invoices_external.ts
|
|
3713
3878
|
var apiRoutes_invoices_external = {
|
|
3879
|
+
// Contract source: explicit
|
|
3880
|
+
"invoices_payment_events_external": {
|
|
3881
|
+
method: "GET",
|
|
3882
|
+
path: "/invoices/external/:invoiceId/payment-events",
|
|
3883
|
+
auth: { "type": "unified_bearer", "allowUserSession": false, "allowOAuth2": true, "allowApiKey": true, "requireRole": "viewer", "scopes": ["invoices:read"] },
|
|
3884
|
+
meta: {
|
|
3885
|
+
tags: ["invoices-external"],
|
|
3886
|
+
summary: "Replay durable bank payment evidence events",
|
|
3887
|
+
description: "Per-invoice ordered journal, afterVersion exclusive. Replay does not acknowledge or delete events. Consumers persist their cursor atomically with processing and re-read current payment evidence before commerce actions. Historical invoices without frozen instructions are not enrolled. No global cursor or delivery-order promise across invoices.",
|
|
3888
|
+
validated: { "params": true, "query": true, "body": false }
|
|
3889
|
+
},
|
|
3890
|
+
types: null
|
|
3891
|
+
},
|
|
3714
3892
|
// Contract source: explicit
|
|
3715
3893
|
"invoices_payment_evidence_external": {
|
|
3716
3894
|
method: "GET",
|
|
@@ -3725,6 +3903,19 @@ var apiRoutes_invoices_external = {
|
|
|
3725
3903
|
types: null
|
|
3726
3904
|
},
|
|
3727
3905
|
// Contract source: explicit
|
|
3906
|
+
"invoices_payment_instructions_external": {
|
|
3907
|
+
method: "GET",
|
|
3908
|
+
path: "/invoices/external/:invoiceId/payment-instructions",
|
|
3909
|
+
auth: { "type": "unified_bearer", "allowUserSession": false, "allowOAuth2": true, "allowApiKey": true, "requireRole": "viewer", "scopes": ["invoices:read"] },
|
|
3910
|
+
meta: {
|
|
3911
|
+
tags: ["invoices-external"],
|
|
3912
|
+
summary: "Read immutable bank payment instructions",
|
|
3913
|
+
description: "Reference and recipient frozen on first issue. Decimal amount is a string. Historical invoices without a snapshot return 409; no reference is created by reading. This is not evidence of payment or permission to provision.",
|
|
3914
|
+
validated: { "params": true, "query": false, "body": false }
|
|
3915
|
+
},
|
|
3916
|
+
types: null
|
|
3917
|
+
},
|
|
3918
|
+
// Contract source: explicit
|
|
3728
3919
|
"invoices_search_external": {
|
|
3729
3920
|
method: "GET",
|
|
3730
3921
|
path: "/invoices/external",
|