@inklok/api-spec 7.6.2 → 7.7.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.
Files changed (2) hide show
  1. package/openapi.yaml +166 -1
  2. package/package.json +1 -1
package/openapi.yaml CHANGED
@@ -8,7 +8,7 @@ info:
8
8
  Authenticate using an API key or bearer token, then use the resources below to manage
9
9
  templates, agreements, documents, and signing. For your first integration, start with
10
10
  the Quick Start guide.
11
- version: "7.6.2"
11
+ version: "7.7.1"
12
12
  contact:
13
13
  name: Inklok API Support
14
14
  email: support@inklok.com
@@ -325,6 +325,61 @@ paths:
325
325
  '500':
326
326
  $ref: '#/components/responses/InternalServerError'
327
327
 
328
+ /me/billing:
329
+ get:
330
+ operationId: getMeBilling
331
+ summary: Get billing state for the current account
332
+ x-internal: true
333
+ x-visibility: internal
334
+ description: |
335
+ Returns the authenticated account's Billing Subscription authority record
336
+ and the derived entitlement projection used by the application UI.
337
+ tags:
338
+ - Me
339
+ responses:
340
+ '200':
341
+ description: Successfully retrieved billing state
342
+ content:
343
+ application/json:
344
+ schema:
345
+ $ref: '#/components/schemas/MeBillingResponse'
346
+ '401':
347
+ $ref: '#/components/responses/Unauthorized'
348
+ '500':
349
+ $ref: '#/components/responses/InternalServerError'
350
+
351
+ /me/billing/customer-portal:
352
+ post:
353
+ operationId: createMeBillingCustomerPortalSession
354
+ summary: Create a Paddle customer portal session for the current account
355
+ x-internal: true
356
+ x-visibility: internal
357
+ description: |
358
+ Creates a short-lived authenticated Paddle customer portal URL for the
359
+ authenticated account's Paddle-managed billing subscription. The Paddle
360
+ API key is never exposed to the client, and the portal URL must not be cached.
361
+ tags:
362
+ - Me
363
+ responses:
364
+ '200':
365
+ description: Successfully created a customer portal session
366
+ content:
367
+ application/json:
368
+ schema:
369
+ $ref: '#/components/schemas/MeBillingCustomerPortalResponse'
370
+ '401':
371
+ $ref: '#/components/responses/Unauthorized'
372
+ '403':
373
+ $ref: '#/components/responses/Forbidden'
374
+ '409':
375
+ $ref: '#/components/responses/Conflict'
376
+ '502':
377
+ $ref: '#/components/responses/BadGateway'
378
+ '503':
379
+ $ref: '#/components/responses/ServiceUnavailable'
380
+ '500':
381
+ $ref: '#/components/responses/InternalServerError'
382
+
328
383
  /platform/overview:
329
384
  get:
330
385
  operationId: getPlatformOverview
@@ -3639,6 +3694,102 @@ components:
3639
3694
  profile:
3640
3695
  $ref: '#/components/schemas/BootstrapProfile'
3641
3696
 
3697
+ MeBillingSubscription:
3698
+ type: object
3699
+ additionalProperties: false
3700
+ required:
3701
+ - source
3702
+ - currentPlan
3703
+ - status
3704
+ - billingInterval
3705
+ - currentBillingPeriodStart
3706
+ - currentBillingPeriodEnd
3707
+ - renewalDate
3708
+ - cancelAtPeriodEnd
3709
+ - paddleCustomerId
3710
+ - paddleSubscriptionId
3711
+ - nextBilledAt
3712
+ - nextExpectedBillingTransition
3713
+ properties:
3714
+ source:
3715
+ type: string
3716
+ enum: [PADDLE, INTERNAL]
3717
+ currentPlan:
3718
+ type: string
3719
+ enum: [free, pro, team, enterprise]
3720
+ status:
3721
+ type: string
3722
+ billingInterval:
3723
+ type: string
3724
+ enum: [day, week, month, year, unknown]
3725
+ currentBillingPeriodStart:
3726
+ type: string
3727
+ format: date-time
3728
+ nullable: true
3729
+ currentBillingPeriodEnd:
3730
+ type: string
3731
+ format: date-time
3732
+ nullable: true
3733
+ renewalDate:
3734
+ type: string
3735
+ format: date-time
3736
+ nullable: true
3737
+ cancelAtPeriodEnd:
3738
+ type: boolean
3739
+ paddleCustomerId:
3740
+ type: string
3741
+ nullable: true
3742
+ paddleSubscriptionId:
3743
+ type: string
3744
+ nullable: true
3745
+ nextBilledAt:
3746
+ type: string
3747
+ format: date-time
3748
+ nullable: true
3749
+ nextExpectedBillingTransition:
3750
+ type: string
3751
+ format: date-time
3752
+ nullable: true
3753
+
3754
+ MeBillingResponse:
3755
+ type: object
3756
+ additionalProperties: false
3757
+ required:
3758
+ - accountId
3759
+ - plan
3760
+ - subscriptionStatus
3761
+ - limits
3762
+ - billingSubscription
3763
+ properties:
3764
+ accountId:
3765
+ type: string
3766
+ plan:
3767
+ type: string
3768
+ enum: [free, pro, team, enterprise]
3769
+ subscriptionStatus:
3770
+ type: string
3771
+ limits:
3772
+ type: object
3773
+ additionalProperties: true
3774
+ billingSubscription:
3775
+ $ref: '#/components/schemas/MeBillingSubscription'
3776
+
3777
+ MeBillingCustomerPortalResponse:
3778
+ type: object
3779
+ additionalProperties: false
3780
+ required:
3781
+ - url
3782
+ - customerId
3783
+ - subscriptionId
3784
+ properties:
3785
+ url:
3786
+ type: string
3787
+ format: uri
3788
+ customerId:
3789
+ type: string
3790
+ subscriptionId:
3791
+ type: string
3792
+
3642
3793
  PlatformDailyEmailCounts:
3643
3794
  type: object
3644
3795
  required:
@@ -6513,6 +6664,20 @@ components:
6513
6664
  schema:
6514
6665
  $ref: '#/components/schemas/Error'
6515
6666
 
6667
+ BadGateway:
6668
+ description: Bad gateway - upstream service failed
6669
+ content:
6670
+ application/json:
6671
+ schema:
6672
+ $ref: '#/components/schemas/Error'
6673
+
6674
+ ServiceUnavailable:
6675
+ description: Service unavailable - dependency or configuration unavailable
6676
+ content:
6677
+ application/json:
6678
+ schema:
6679
+ $ref: '#/components/schemas/Error'
6680
+
6516
6681
  RateLimited:
6517
6682
  description: Too many requests
6518
6683
  content:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inklok/api-spec",
3
- "version": "7.6.2",
3
+ "version": "7.7.1",
4
4
  "description": "Canonical OpenAPI specification for the Inklok public API.",
5
5
  "main": "openapi.yaml",
6
6
  "license": "MIT",