@orvello/sdk 0.4.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 +10 -0
- package/dist/contract.cjs +13 -0
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +75 -1
- package/dist/contract.d.ts +75 -1
- package/dist/contract.js +13 -0
- package/dist/contract.js.map +1 -1
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +315 -0
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -8486,6 +8486,321 @@
|
|
|
8486
8486
|
]
|
|
8487
8487
|
}
|
|
8488
8488
|
},
|
|
8489
|
+
"/invoices/external/:invoiceId/payment-events": {
|
|
8490
|
+
"get": {
|
|
8491
|
+
"operationId": "invoices_payment_events_external",
|
|
8492
|
+
"tags": [
|
|
8493
|
+
"invoices-external"
|
|
8494
|
+
],
|
|
8495
|
+
"summary": "Replay durable bank payment evidence events",
|
|
8496
|
+
"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.",
|
|
8497
|
+
"responses": {
|
|
8498
|
+
"200": {
|
|
8499
|
+
"description": "JSON response",
|
|
8500
|
+
"content": {
|
|
8501
|
+
"application/json": {
|
|
8502
|
+
"schema": {
|
|
8503
|
+
"type": "object",
|
|
8504
|
+
"properties": {
|
|
8505
|
+
"success": {
|
|
8506
|
+
"type": "boolean"
|
|
8507
|
+
},
|
|
8508
|
+
"message": {
|
|
8509
|
+
"anyOf": [
|
|
8510
|
+
{
|
|
8511
|
+
"type": "string"
|
|
8512
|
+
},
|
|
8513
|
+
{
|
|
8514
|
+
"type": "null"
|
|
8515
|
+
}
|
|
8516
|
+
]
|
|
8517
|
+
},
|
|
8518
|
+
"code": {
|
|
8519
|
+
"anyOf": [
|
|
8520
|
+
{
|
|
8521
|
+
"type": "string"
|
|
8522
|
+
},
|
|
8523
|
+
{
|
|
8524
|
+
"type": "null"
|
|
8525
|
+
}
|
|
8526
|
+
]
|
|
8527
|
+
},
|
|
8528
|
+
"data": {
|
|
8529
|
+
"anyOf": [
|
|
8530
|
+
{
|
|
8531
|
+
"type": "object",
|
|
8532
|
+
"properties": {
|
|
8533
|
+
"events": {
|
|
8534
|
+
"type": "array",
|
|
8535
|
+
"items": {
|
|
8536
|
+
"type": "object",
|
|
8537
|
+
"properties": {
|
|
8538
|
+
"id": {
|
|
8539
|
+
"type": "string"
|
|
8540
|
+
},
|
|
8541
|
+
"type": {
|
|
8542
|
+
"const": "invoice.payment_evidence.changed"
|
|
8543
|
+
},
|
|
8544
|
+
"schemaVersion": {
|
|
8545
|
+
"const": 1
|
|
8546
|
+
},
|
|
8547
|
+
"invoiceId": {
|
|
8548
|
+
"type": "integer",
|
|
8549
|
+
"exclusiveMinimum": 0
|
|
8550
|
+
},
|
|
8551
|
+
"version": {
|
|
8552
|
+
"type": "integer",
|
|
8553
|
+
"exclusiveMinimum": 0
|
|
8554
|
+
},
|
|
8555
|
+
"cause": {
|
|
8556
|
+
"type": "string"
|
|
8557
|
+
},
|
|
8558
|
+
"occurredAt": {
|
|
8559
|
+
"type": "string",
|
|
8560
|
+
"format": "date-time"
|
|
8561
|
+
},
|
|
8562
|
+
"evidence": {
|
|
8563
|
+
"type": "object",
|
|
8564
|
+
"properties": {
|
|
8565
|
+
"invoiceId": {
|
|
8566
|
+
"type": "integer",
|
|
8567
|
+
"exclusiveMinimum": 0
|
|
8568
|
+
},
|
|
8569
|
+
"invoiceNumber": {
|
|
8570
|
+
"type": "string"
|
|
8571
|
+
},
|
|
8572
|
+
"currency": {
|
|
8573
|
+
"type": "string"
|
|
8574
|
+
},
|
|
8575
|
+
"invoiceStatus": {
|
|
8576
|
+
"type": "string"
|
|
8577
|
+
},
|
|
8578
|
+
"paidSource": {
|
|
8579
|
+
"anyOf": [
|
|
8580
|
+
{
|
|
8581
|
+
"type": "string"
|
|
8582
|
+
},
|
|
8583
|
+
{
|
|
8584
|
+
"type": "null"
|
|
8585
|
+
}
|
|
8586
|
+
]
|
|
8587
|
+
},
|
|
8588
|
+
"receivingAccountId": {
|
|
8589
|
+
"anyOf": [
|
|
8590
|
+
{
|
|
8591
|
+
"type": "integer",
|
|
8592
|
+
"exclusiveMinimum": 0
|
|
8593
|
+
},
|
|
8594
|
+
{
|
|
8595
|
+
"type": "null"
|
|
8596
|
+
}
|
|
8597
|
+
]
|
|
8598
|
+
},
|
|
8599
|
+
"invoiceAmount": {
|
|
8600
|
+
"type": "string"
|
|
8601
|
+
},
|
|
8602
|
+
"bankReceivedAmount": {
|
|
8603
|
+
"type": "string"
|
|
8604
|
+
},
|
|
8605
|
+
"bankRefundedAmount": {
|
|
8606
|
+
"type": "string"
|
|
8607
|
+
},
|
|
8608
|
+
"bankNetAmount": {
|
|
8609
|
+
"type": "string"
|
|
8610
|
+
},
|
|
8611
|
+
"nonCashSettlementAmount": {
|
|
8612
|
+
"type": "string"
|
|
8613
|
+
},
|
|
8614
|
+
"outstandingBankAmount": {
|
|
8615
|
+
"type": "string"
|
|
8616
|
+
},
|
|
8617
|
+
"overpaidBankAmount": {
|
|
8618
|
+
"type": "string"
|
|
8619
|
+
},
|
|
8620
|
+
"state": {
|
|
8621
|
+
"type": "string",
|
|
8622
|
+
"enum": [
|
|
8623
|
+
"unpaid",
|
|
8624
|
+
"partial",
|
|
8625
|
+
"covered",
|
|
8626
|
+
"overpaid",
|
|
8627
|
+
"review_required",
|
|
8628
|
+
"ineligible"
|
|
8629
|
+
]
|
|
8630
|
+
},
|
|
8631
|
+
"bankPaymentConfirmed": {
|
|
8632
|
+
"type": "boolean"
|
|
8633
|
+
},
|
|
8634
|
+
"issues": {
|
|
8635
|
+
"type": "array",
|
|
8636
|
+
"items": {
|
|
8637
|
+
"type": "string",
|
|
8638
|
+
"enum": [
|
|
8639
|
+
"missing_receiving_account",
|
|
8640
|
+
"invalid_invoice_amount",
|
|
8641
|
+
"ineligible_invoice",
|
|
8642
|
+
"missing_payment",
|
|
8643
|
+
"wrong_account",
|
|
8644
|
+
"currency_mismatch",
|
|
8645
|
+
"invalid_amount",
|
|
8646
|
+
"unsupported_source",
|
|
8647
|
+
"invalid_direction",
|
|
8648
|
+
"payment_overallocated",
|
|
8649
|
+
"non_cash_settlement",
|
|
8650
|
+
"status_without_bank_evidence",
|
|
8651
|
+
"negative_bank_balance"
|
|
8652
|
+
]
|
|
8653
|
+
}
|
|
8654
|
+
},
|
|
8655
|
+
"bankAllocationIds": {
|
|
8656
|
+
"type": "array",
|
|
8657
|
+
"items": {
|
|
8658
|
+
"type": "integer",
|
|
8659
|
+
"exclusiveMinimum": 0
|
|
8660
|
+
}
|
|
8661
|
+
},
|
|
8662
|
+
"excludedAllocationIds": {
|
|
8663
|
+
"type": "array",
|
|
8664
|
+
"items": {
|
|
8665
|
+
"type": "integer",
|
|
8666
|
+
"exclusiveMinimum": 0
|
|
8667
|
+
}
|
|
8668
|
+
},
|
|
8669
|
+
"reversedAllocationCount": {
|
|
8670
|
+
"type": "integer",
|
|
8671
|
+
"minimum": 0
|
|
8672
|
+
},
|
|
8673
|
+
"revision": {
|
|
8674
|
+
"type": "string",
|
|
8675
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
8676
|
+
},
|
|
8677
|
+
"observedAt": {
|
|
8678
|
+
"type": "string",
|
|
8679
|
+
"format": "date-time"
|
|
8680
|
+
}
|
|
8681
|
+
},
|
|
8682
|
+
"required": [
|
|
8683
|
+
"invoiceId",
|
|
8684
|
+
"invoiceNumber",
|
|
8685
|
+
"currency",
|
|
8686
|
+
"invoiceStatus",
|
|
8687
|
+
"paidSource",
|
|
8688
|
+
"receivingAccountId",
|
|
8689
|
+
"invoiceAmount",
|
|
8690
|
+
"bankReceivedAmount",
|
|
8691
|
+
"bankRefundedAmount",
|
|
8692
|
+
"bankNetAmount",
|
|
8693
|
+
"nonCashSettlementAmount",
|
|
8694
|
+
"outstandingBankAmount",
|
|
8695
|
+
"overpaidBankAmount",
|
|
8696
|
+
"state",
|
|
8697
|
+
"bankPaymentConfirmed",
|
|
8698
|
+
"issues",
|
|
8699
|
+
"bankAllocationIds",
|
|
8700
|
+
"excludedAllocationIds",
|
|
8701
|
+
"reversedAllocationCount",
|
|
8702
|
+
"revision",
|
|
8703
|
+
"observedAt"
|
|
8704
|
+
],
|
|
8705
|
+
"additionalProperties": false
|
|
8706
|
+
}
|
|
8707
|
+
},
|
|
8708
|
+
"required": [
|
|
8709
|
+
"id",
|
|
8710
|
+
"type",
|
|
8711
|
+
"schemaVersion",
|
|
8712
|
+
"invoiceId",
|
|
8713
|
+
"version",
|
|
8714
|
+
"cause",
|
|
8715
|
+
"occurredAt",
|
|
8716
|
+
"evidence"
|
|
8717
|
+
],
|
|
8718
|
+
"additionalProperties": false
|
|
8719
|
+
}
|
|
8720
|
+
},
|
|
8721
|
+
"nextVersion": {
|
|
8722
|
+
"type": "integer",
|
|
8723
|
+
"minimum": 0
|
|
8724
|
+
},
|
|
8725
|
+
"hasMore": {
|
|
8726
|
+
"type": "boolean"
|
|
8727
|
+
}
|
|
8728
|
+
},
|
|
8729
|
+
"required": [
|
|
8730
|
+
"events",
|
|
8731
|
+
"nextVersion",
|
|
8732
|
+
"hasMore"
|
|
8733
|
+
],
|
|
8734
|
+
"additionalProperties": false
|
|
8735
|
+
},
|
|
8736
|
+
{
|
|
8737
|
+
"type": "null"
|
|
8738
|
+
}
|
|
8739
|
+
]
|
|
8740
|
+
}
|
|
8741
|
+
},
|
|
8742
|
+
"required": [
|
|
8743
|
+
"success",
|
|
8744
|
+
"data"
|
|
8745
|
+
],
|
|
8746
|
+
"additionalProperties": false
|
|
8747
|
+
}
|
|
8748
|
+
}
|
|
8749
|
+
}
|
|
8750
|
+
}
|
|
8751
|
+
},
|
|
8752
|
+
"parameters": [
|
|
8753
|
+
{
|
|
8754
|
+
"name": "invoiceId",
|
|
8755
|
+
"in": "path",
|
|
8756
|
+
"required": true,
|
|
8757
|
+
"schema": {
|
|
8758
|
+
"type": "integer",
|
|
8759
|
+
"exclusiveMinimum": 0
|
|
8760
|
+
}
|
|
8761
|
+
},
|
|
8762
|
+
{
|
|
8763
|
+
"name": "afterVersion",
|
|
8764
|
+
"in": "query",
|
|
8765
|
+
"required": false,
|
|
8766
|
+
"schema": {
|
|
8767
|
+
"type": "integer",
|
|
8768
|
+
"minimum": 0,
|
|
8769
|
+
"maximum": 2147483647,
|
|
8770
|
+
"default": 0
|
|
8771
|
+
}
|
|
8772
|
+
},
|
|
8773
|
+
{
|
|
8774
|
+
"name": "limit",
|
|
8775
|
+
"in": "query",
|
|
8776
|
+
"required": false,
|
|
8777
|
+
"schema": {
|
|
8778
|
+
"type": "integer",
|
|
8779
|
+
"minimum": 1,
|
|
8780
|
+
"maximum": 100,
|
|
8781
|
+
"default": 50
|
|
8782
|
+
}
|
|
8783
|
+
}
|
|
8784
|
+
],
|
|
8785
|
+
"security": [
|
|
8786
|
+
{
|
|
8787
|
+
"oauth2Bearer": []
|
|
8788
|
+
},
|
|
8789
|
+
{
|
|
8790
|
+
"companyApiKeyBearer": []
|
|
8791
|
+
}
|
|
8792
|
+
],
|
|
8793
|
+
"x-auth": {
|
|
8794
|
+
"allowOAuth2": true,
|
|
8795
|
+
"allowApiKey": true,
|
|
8796
|
+
"allowUserSession": false,
|
|
8797
|
+
"requireRole": "viewer"
|
|
8798
|
+
},
|
|
8799
|
+
"x-scopes": [
|
|
8800
|
+
"invoices:read"
|
|
8801
|
+
]
|
|
8802
|
+
}
|
|
8803
|
+
},
|
|
8489
8804
|
"/invoices/external/:invoiceId/payment-evidence": {
|
|
8490
8805
|
"get": {
|
|
8491
8806
|
"operationId": "invoices_payment_evidence_external",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orvello/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Typed, zero-dependency SDK for integrating Node and Next.js applications with orvello - the accounting & invoicing platform. Sends the credential each route demands, and can prove a call would work without making it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"orvello",
|