@lerianstudio/matcher-mcp 4.5.0-beta.16 → 4.5.0-beta.18
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/dist/spec/openapi.yaml +235 -0
- package/package.json +1 -1
package/dist/spec/openapi.yaml
CHANGED
|
@@ -1155,6 +1155,38 @@ components:
|
|
|
1155
1155
|
required:
|
|
1156
1156
|
- status
|
|
1157
1157
|
type: object
|
|
1158
|
+
CheckoutBody:
|
|
1159
|
+
additionalProperties: false
|
|
1160
|
+
properties:
|
|
1161
|
+
interval:
|
|
1162
|
+
description: "Billing interval: \"monthly\" or \"annual\". It selects the payment methods the session offers — monthly is card, annual is boleto and Pix."
|
|
1163
|
+
examples:
|
|
1164
|
+
- monthly
|
|
1165
|
+
maxLength: 16
|
|
1166
|
+
type: string
|
|
1167
|
+
plan:
|
|
1168
|
+
description: Plan code to subscribe to. Must be a self-serve plan in the price list.
|
|
1169
|
+
examples:
|
|
1170
|
+
- tier_1
|
|
1171
|
+
maxLength: 64
|
|
1172
|
+
type: string
|
|
1173
|
+
required:
|
|
1174
|
+
- plan
|
|
1175
|
+
- interval
|
|
1176
|
+
type: object
|
|
1177
|
+
CheckoutSessionResponse:
|
|
1178
|
+
additionalProperties: false
|
|
1179
|
+
properties:
|
|
1180
|
+
sessionId:
|
|
1181
|
+
description: "Processor-side session identifier, for support and correlation. It activates nothing: activation happens only through the verified webhook."
|
|
1182
|
+
type: string
|
|
1183
|
+
url:
|
|
1184
|
+
description: Hosted checkout URL. Redirect the browser here.
|
|
1185
|
+
type: string
|
|
1186
|
+
required:
|
|
1187
|
+
- url
|
|
1188
|
+
- sessionId
|
|
1189
|
+
type: object
|
|
1158
1190
|
CloneContextRequest:
|
|
1159
1191
|
additionalProperties: false
|
|
1160
1192
|
properties:
|
|
@@ -2238,6 +2270,75 @@ components:
|
|
|
2238
2270
|
- credentialId
|
|
2239
2271
|
- createdAt
|
|
2240
2272
|
type: object
|
|
2273
|
+
CreditLedgerEntry:
|
|
2274
|
+
additionalProperties: false
|
|
2275
|
+
properties:
|
|
2276
|
+
amountCents:
|
|
2277
|
+
description: "How much the balance moved, in integer BRL cents. SIGNED: positive for a purchase, negative for a debit, so the entries sum to the balance."
|
|
2278
|
+
format: int64
|
|
2279
|
+
type: integer
|
|
2280
|
+
balanceAfterCents:
|
|
2281
|
+
description: The balance this movement left behind, in integer BRL cents.
|
|
2282
|
+
format: int64
|
|
2283
|
+
type: integer
|
|
2284
|
+
createdAt:
|
|
2285
|
+
description: When the movement was recorded (UTC).
|
|
2286
|
+
format: date-time
|
|
2287
|
+
type: string
|
|
2288
|
+
period:
|
|
2289
|
+
description: The enforcement period a debit was taken FOR. Omitted on a purchase, which belongs to no period, and on a trial's lifetime debit, which has none.
|
|
2290
|
+
format: date-time
|
|
2291
|
+
type: string
|
|
2292
|
+
reason:
|
|
2293
|
+
description: "Why the balance moved: \"purchase\", \"overage_debit\", or \"overage_debit_shortfall\" (the debit could not be covered in full and took the balance to zero)."
|
|
2294
|
+
type: string
|
|
2295
|
+
stripePaymentId:
|
|
2296
|
+
description: The payment behind a purchase, for support and correlation. Omitted on a debit, which charges nothing.
|
|
2297
|
+
type: string
|
|
2298
|
+
required:
|
|
2299
|
+
- amountCents
|
|
2300
|
+
- balanceAfterCents
|
|
2301
|
+
- reason
|
|
2302
|
+
- createdAt
|
|
2303
|
+
type: object
|
|
2304
|
+
CreditLedgerPage:
|
|
2305
|
+
additionalProperties: false
|
|
2306
|
+
properties:
|
|
2307
|
+
entries:
|
|
2308
|
+
description: Recorded movements of the prepaid overage balance, newest first, capped server-side.
|
|
2309
|
+
items:
|
|
2310
|
+
$ref: "#/components/schemas/CreditLedgerEntry"
|
|
2311
|
+
type:
|
|
2312
|
+
- array
|
|
2313
|
+
- "null"
|
|
2314
|
+
required:
|
|
2315
|
+
- entries
|
|
2316
|
+
type: object
|
|
2317
|
+
CreditPurchaseBody:
|
|
2318
|
+
additionalProperties: false
|
|
2319
|
+
properties:
|
|
2320
|
+
amountCents:
|
|
2321
|
+
description: How much credit to buy, in integer cents (BRL). The minimum and maximum come from the price list.
|
|
2322
|
+
examples:
|
|
2323
|
+
- 50000
|
|
2324
|
+
format: int64
|
|
2325
|
+
type: integer
|
|
2326
|
+
required:
|
|
2327
|
+
- amountCents
|
|
2328
|
+
type: object
|
|
2329
|
+
CreditPurchaseResponse:
|
|
2330
|
+
additionalProperties: false
|
|
2331
|
+
properties:
|
|
2332
|
+
sessionId:
|
|
2333
|
+
description: "Processor-side session identifier, for support and correlation. It credits nothing: the balance moves only through the verified webhook."
|
|
2334
|
+
type: string
|
|
2335
|
+
url:
|
|
2336
|
+
description: Hosted payment URL. Redirect the browser here.
|
|
2337
|
+
type: string
|
|
2338
|
+
required:
|
|
2339
|
+
- url
|
|
2340
|
+
- sessionId
|
|
2341
|
+
type: object
|
|
2241
2342
|
CurrencyExposureResponse:
|
|
2242
2343
|
additionalProperties: false
|
|
2243
2344
|
properties:
|
|
@@ -5542,6 +5643,15 @@ components:
|
|
|
5542
5643
|
- createdAt
|
|
5543
5644
|
- updatedAt
|
|
5544
5645
|
type: object
|
|
5646
|
+
PortalSessionResponse:
|
|
5647
|
+
additionalProperties: false
|
|
5648
|
+
properties:
|
|
5649
|
+
url:
|
|
5650
|
+
description: Hosted customer-portal URL. Redirect the browser here. It is short-lived and single-customer.
|
|
5651
|
+
type: string
|
|
5652
|
+
required:
|
|
5653
|
+
- url
|
|
5654
|
+
type: object
|
|
5545
5655
|
ProcessCallbackRequest:
|
|
5546
5656
|
additionalProperties: false
|
|
5547
5657
|
properties:
|
|
@@ -8165,6 +8275,26 @@ components:
|
|
|
8165
8275
|
description: "Lines consumed against the free-trial allotment (volume axis): distinct transactions matched, so a transaction re-matched under a different classification consumes one line and not two — the same figure the quota gate enforces on. Meaningful for a trialing or lapsed workspace; 0 for a paid plan."
|
|
8166
8276
|
format: int64
|
|
8167
8277
|
type: integer
|
|
8278
|
+
maxCreditPurchaseCents:
|
|
8279
|
+
description: Largest credit purchase the payment route accepts, in integer BRL cents.
|
|
8280
|
+
format: int64
|
|
8281
|
+
type: integer
|
|
8282
|
+
minCreditPurchaseCents:
|
|
8283
|
+
description: Smallest credit purchase the payment route accepts, in integer BRL cents.
|
|
8284
|
+
format: int64
|
|
8285
|
+
type: integer
|
|
8286
|
+
monthlyLineAllowance:
|
|
8287
|
+
description: Billable lines the plan includes per month, from the price list. Monthly on every plan regardless of billing interval. 0 when the stored plan code is not in the catalogue.
|
|
8288
|
+
format: int64
|
|
8289
|
+
type: integer
|
|
8290
|
+
overageCreditBalanceCents:
|
|
8291
|
+
description: Prepaid overage credit left, in integer BRL cents. Overage is debited from it daily; an exhausted balance blocks new matching, and unspent credit never expires.
|
|
8292
|
+
format: int64
|
|
8293
|
+
type: integer
|
|
8294
|
+
overageRateCentsPerThousandLines:
|
|
8295
|
+
description: What lines beyond the allowance cost, in integer BRL cents per THOUSAND lines (per-thousand because the entry rate is 0,4 cents a line and would truncate to zero). 0 when the stored plan code is not in the catalogue.
|
|
8296
|
+
format: int64
|
|
8297
|
+
type: integer
|
|
8168
8298
|
plan:
|
|
8169
8299
|
description: Commercial plan the workspace is on ("free" or a paid tier).
|
|
8170
8300
|
type: string
|
|
@@ -8184,6 +8314,11 @@ components:
|
|
|
8184
8314
|
- linesRemaining
|
|
8185
8315
|
- trialExpired
|
|
8186
8316
|
- expiryReason
|
|
8317
|
+
- monthlyLineAllowance
|
|
8318
|
+
- overageRateCentsPerThousandLines
|
|
8319
|
+
- overageCreditBalanceCents
|
|
8320
|
+
- minCreditPurchaseCents
|
|
8321
|
+
- maxCreditPurchaseCents
|
|
8187
8322
|
type: object
|
|
8188
8323
|
securitySchemes:
|
|
8189
8324
|
BearerAuth:
|
|
@@ -15871,6 +16006,106 @@ paths:
|
|
|
15871
16006
|
summary: Read the current workspace's commercial state
|
|
15872
16007
|
tags:
|
|
15873
16008
|
- Onboarding
|
|
16009
|
+
/v1/workspace/billing-portal:
|
|
16010
|
+
post:
|
|
16011
|
+
description: Opens the payment processor's hosted customer portal for the AUTHENTICATED tenant's own workspace and returns the URL to redirect the browser to. Card update, invoice history and cancellation live there, not here; cancellation takes effect at the end of the period already paid for. Errors use the RFC 9457 application/problem+json contract.
|
|
16012
|
+
operationId: workspace-billing-portal
|
|
16013
|
+
responses:
|
|
16014
|
+
"200":
|
|
16015
|
+
content:
|
|
16016
|
+
application/json:
|
|
16017
|
+
schema:
|
|
16018
|
+
$ref: "#/components/schemas/PortalSessionResponse"
|
|
16019
|
+
description: OK
|
|
16020
|
+
default:
|
|
16021
|
+
content:
|
|
16022
|
+
application/problem+json:
|
|
16023
|
+
schema:
|
|
16024
|
+
$ref: "#/components/schemas/Detail"
|
|
16025
|
+
description: Error
|
|
16026
|
+
security:
|
|
16027
|
+
- BearerAuth: []
|
|
16028
|
+
summary: Open the customer billing portal for the current workspace
|
|
16029
|
+
tags:
|
|
16030
|
+
- Onboarding
|
|
16031
|
+
/v1/workspace/checkout:
|
|
16032
|
+
post:
|
|
16033
|
+
description: "Opens a hosted checkout session that subscribes the AUTHENTICATED tenant's own workspace to a self-serve plan, and returns the URL to redirect the browser to. The workspace is resolved from the JWT tenant-slug claim: this endpoint never accepts a tenant identifier in the body, path, query or headers, and the session is bound to the caller's tenant. The billing interval selects the payment methods — monthly is card, annual is boleto and Pix — so a session is never created with an instrument the amount cannot clear. A plan that is not self-serve, an unknown plan or interval, and a workspace that already has a subscription are all refused before the processor is called. The return URLs carry no activation-bearing parameter: the plan is activated only by the verified webhook, and the return page reads the resulting state from GET /v1/workspace/billing. Errors use the RFC 9457 application/problem+json contract."
|
|
16034
|
+
operationId: workspace-checkout
|
|
16035
|
+
requestBody:
|
|
16036
|
+
content:
|
|
16037
|
+
application/json:
|
|
16038
|
+
schema:
|
|
16039
|
+
$ref: "#/components/schemas/CheckoutBody"
|
|
16040
|
+
required: true
|
|
16041
|
+
responses:
|
|
16042
|
+
"200":
|
|
16043
|
+
content:
|
|
16044
|
+
application/json:
|
|
16045
|
+
schema:
|
|
16046
|
+
$ref: "#/components/schemas/CheckoutSessionResponse"
|
|
16047
|
+
description: OK
|
|
16048
|
+
default:
|
|
16049
|
+
content:
|
|
16050
|
+
application/problem+json:
|
|
16051
|
+
schema:
|
|
16052
|
+
$ref: "#/components/schemas/Detail"
|
|
16053
|
+
description: Error
|
|
16054
|
+
security:
|
|
16055
|
+
- BearerAuth: []
|
|
16056
|
+
summary: Open a subscription checkout for the current workspace
|
|
16057
|
+
tags:
|
|
16058
|
+
- Onboarding
|
|
16059
|
+
/v1/workspace/credit-ledger:
|
|
16060
|
+
get:
|
|
16061
|
+
description: "Returns the AUTHENTICATED tenant's own prepaid overage-credit movements, newest first: every purchase and every daily overage debit, each with its signed amount, the balance it left behind, and why it happened. The daily debit only does its job if the customer can see it — a balance that moves with no readable explanation is money nobody can reconcile. The workspace is resolved from the JWT tenant-slug claim: this endpoint never accepts a tenant identifier in the request and can only read the caller's own movements. The result is capped server-side and has no pagination. A tenant with no self-serve workspace record returns 404. Errors use the RFC 9457 application/problem+json contract."
|
|
16062
|
+
operationId: workspace-credit-ledger
|
|
16063
|
+
responses:
|
|
16064
|
+
"200":
|
|
16065
|
+
content:
|
|
16066
|
+
application/json:
|
|
16067
|
+
schema:
|
|
16068
|
+
$ref: "#/components/schemas/CreditLedgerPage"
|
|
16069
|
+
description: OK
|
|
16070
|
+
default:
|
|
16071
|
+
content:
|
|
16072
|
+
application/problem+json:
|
|
16073
|
+
schema:
|
|
16074
|
+
$ref: "#/components/schemas/Detail"
|
|
16075
|
+
description: Error
|
|
16076
|
+
security:
|
|
16077
|
+
- BearerAuth: []
|
|
16078
|
+
summary: Read the current workspace's prepaid-credit movements
|
|
16079
|
+
tags:
|
|
16080
|
+
- Onboarding
|
|
16081
|
+
/v1/workspace/credit-purchase:
|
|
16082
|
+
post:
|
|
16083
|
+
description: "Opens a ONE-OFF hosted payment session that buys prepaid overage credit for the AUTHENTICATED tenant's own workspace, and returns the URL to redirect the browser to. It is never a subscription. The workspace is resolved from the JWT tenant-slug claim: this endpoint never accepts a tenant identifier in the body, path, query or headers. Any workspace may buy — trialing, lapsed, monthly or annual — because the customer who has run out of allowance is the one being told to buy. Payment is by CARD on every plan, including annual: the instrument that funds overage credit is deliberately not the subscription's instrument, and the card is saved for future CREDIT purchases only. An amount outside the price list's minimum and maximum is refused before the processor is called. The credit balance moves ONLY when the processor confirms the payment through the verified webhook — never on the return page and never in this response. Errors use the RFC 9457 application/problem+json contract."
|
|
16084
|
+
operationId: workspace-credit-purchase
|
|
16085
|
+
requestBody:
|
|
16086
|
+
content:
|
|
16087
|
+
application/json:
|
|
16088
|
+
schema:
|
|
16089
|
+
$ref: "#/components/schemas/CreditPurchaseBody"
|
|
16090
|
+
required: true
|
|
16091
|
+
responses:
|
|
16092
|
+
"200":
|
|
16093
|
+
content:
|
|
16094
|
+
application/json:
|
|
16095
|
+
schema:
|
|
16096
|
+
$ref: "#/components/schemas/CreditPurchaseResponse"
|
|
16097
|
+
description: OK
|
|
16098
|
+
default:
|
|
16099
|
+
content:
|
|
16100
|
+
application/problem+json:
|
|
16101
|
+
schema:
|
|
16102
|
+
$ref: "#/components/schemas/Detail"
|
|
16103
|
+
description: Error
|
|
16104
|
+
security:
|
|
16105
|
+
- BearerAuth: []
|
|
16106
|
+
summary: Buy prepaid overage credit for the current workspace
|
|
16107
|
+
tags:
|
|
16108
|
+
- Onboarding
|
|
15874
16109
|
/v1/workspaces/{slug}/auth-config:
|
|
15875
16110
|
get:
|
|
15876
16111
|
description: "Resolves the minimum a browser needs to start a PKCE login for a workspace: the console OAuth client id, the identity-provider organization, and the public issuer URL. This is a PUBLIC, anonymous, read-only, pre-tenant route: it carries no operator JWT and returns nothing about the account, its owner, or its lifecycle. It answers only for ACTIVE workspaces; a nonexistent, still-provisioning, or suspended workspace returns an IDENTICAL 404 (no enumeration of lifecycle state). The response is briefly cacheable and the route is rate-limited per client IP. Errors use the RFC 9457 application/problem+json contract."
|