@inklok/api-spec 7.9.0 → 7.9.2

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 +342 -3
  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.9.0"
11
+ version: "7.9.2"
12
12
  contact:
13
13
  name: Inklok API Support
14
14
  email: support@inklok.com
@@ -486,7 +486,7 @@ paths:
486
486
  content:
487
487
  application/json:
488
488
  schema:
489
- $ref: '#/components/schemas/MeBillingSeatsUpdateRequest'
489
+ $ref: '#/components/schemas/MeBillingSeatsApplyRequest'
490
490
  responses:
491
491
  '200':
492
492
  description: Successfully updated seats
@@ -528,6 +528,45 @@ paths:
528
528
  '500':
529
529
  $ref: '#/components/responses/InternalServerError'
530
530
 
531
+ /me/billing/seats/preview:
532
+ post:
533
+ operationId: previewMeBillingSeats
534
+ summary: Preview an additional-seat change for the current account
535
+ x-internal: true
536
+ x-visibility: internal
537
+ description: |
538
+ Previews the Paddle financial impact of changing the Additional Seat
539
+ subscription item quantity without applying the subscription mutation.
540
+ tags:
541
+ - Me
542
+ requestBody:
543
+ required: true
544
+ content:
545
+ application/json:
546
+ schema:
547
+ $ref: '#/components/schemas/MeBillingSeatsPreviewRequest'
548
+ responses:
549
+ '200':
550
+ description: Successfully previewed the seat change
551
+ content:
552
+ application/json:
553
+ schema:
554
+ $ref: '#/components/schemas/MeBillingSeatsPreviewResponse'
555
+ '400':
556
+ $ref: '#/components/responses/BadRequest'
557
+ '401':
558
+ $ref: '#/components/responses/Unauthorized'
559
+ '403':
560
+ $ref: '#/components/responses/Forbidden'
561
+ '409':
562
+ $ref: '#/components/responses/Conflict'
563
+ '502':
564
+ $ref: '#/components/responses/BadGateway'
565
+ '503':
566
+ $ref: '#/components/responses/ServiceUnavailable'
567
+ '500':
568
+ $ref: '#/components/responses/InternalServerError'
569
+
531
570
  /platform/overview:
532
571
  get:
533
572
  operationId: getPlatformOverview
@@ -766,6 +805,54 @@ paths:
766
805
  '500':
767
806
  $ref: '#/components/responses/InternalServerError'
768
807
 
808
+ /platform/billing-activity:
809
+ get:
810
+ operationId: getPlatformBillingActivity
811
+ summary: Get Platform billing activity
812
+ x-visibility: internal
813
+ description: |
814
+ Returns normalized billing activity for one account, newest first.
815
+ Requires an authorized platform administrator.
816
+ Raw Paddle webhook payloads and payment details are not returned.
817
+ x-required-global-roles: [PLATFORM_ADMIN]
818
+ tags:
819
+ - Platform
820
+ parameters:
821
+ - in: query
822
+ name: accountId
823
+ required: true
824
+ schema:
825
+ type: string
826
+ description: Billing account ID to inspect.
827
+ - in: query
828
+ name: limit
829
+ schema:
830
+ type: integer
831
+ minimum: 1
832
+ maximum: 100
833
+ default: 25
834
+ description: Maximum number of activity rows to return.
835
+ - in: query
836
+ name: cursor
837
+ schema:
838
+ type: string
839
+ description: Opaque pagination cursor returned by the previous response.
840
+ responses:
841
+ '200':
842
+ description: Successfully retrieved Platform billing activity
843
+ content:
844
+ application/json:
845
+ schema:
846
+ $ref: '#/components/schemas/PlatformBillingActivityResponse'
847
+ '400':
848
+ $ref: '#/components/responses/BadRequest'
849
+ '401':
850
+ $ref: '#/components/responses/Unauthorized'
851
+ '403':
852
+ $ref: '#/components/responses/Forbidden'
853
+ '500':
854
+ $ref: '#/components/responses/InternalServerError'
855
+
769
856
  /platform/ses:
770
857
  get:
771
858
  operationId: getPlatformSes
@@ -3934,7 +4021,7 @@ components:
3934
4021
  nullable: true
3935
4022
  minimum: 0
3936
4023
 
3937
- MeBillingSeatsUpdateRequest:
4024
+ MeBillingSeatsPreviewRequest:
3938
4025
  type: object
3939
4026
  additionalProperties: false
3940
4027
  required:
@@ -3944,6 +4031,133 @@ components:
3944
4031
  type: integer
3945
4032
  minimum: 0
3946
4033
 
4034
+ MeBillingSeatsApplyRequest:
4035
+ type: object
4036
+ additionalProperties: false
4037
+ required:
4038
+ - additionalSeats
4039
+ - previewToken
4040
+ properties:
4041
+ additionalSeats:
4042
+ type: integer
4043
+ minimum: 0
4044
+ previewToken:
4045
+ type: string
4046
+ description: Signed token returned by the seat-change preview endpoint.
4047
+
4048
+ MeBillingSeatsPreviewResponse:
4049
+ type: object
4050
+ additionalProperties: false
4051
+ required:
4052
+ - accountId
4053
+ - subscriptionId
4054
+ - currentAdditionalSeats
4055
+ - proposedAdditionalSeats
4056
+ - currentEffectiveSeatLimit
4057
+ - proposedEffectiveSeatLimit
4058
+ - direction
4059
+ - prorationBillingMode
4060
+ - memberLimitWarning
4061
+ - immediateAdjustment
4062
+ - nextRecurringAmount
4063
+ - nextBillingDate
4064
+ - billingCycle
4065
+ - previewToken
4066
+ properties:
4067
+ accountId:
4068
+ type: string
4069
+ subscriptionId:
4070
+ type: string
4071
+ currentAdditionalSeats:
4072
+ type: integer
4073
+ minimum: 0
4074
+ proposedAdditionalSeats:
4075
+ type: integer
4076
+ minimum: 0
4077
+ currentEffectiveSeatLimit:
4078
+ type: integer
4079
+ nullable: true
4080
+ minimum: 0
4081
+ proposedEffectiveSeatLimit:
4082
+ type: integer
4083
+ nullable: true
4084
+ minimum: 0
4085
+ direction:
4086
+ type: string
4087
+ enum: [increase, decrease, unchanged]
4088
+ prorationBillingMode:
4089
+ type: string
4090
+ enum: [prorated_immediately, prorated_next_billing_period]
4091
+ memberLimitWarning:
4092
+ type: object
4093
+ nullable: true
4094
+ additionalProperties: false
4095
+ required:
4096
+ - activeMembers
4097
+ - proposedEffectiveSeatLimit
4098
+ - overBy
4099
+ properties:
4100
+ activeMembers:
4101
+ type: integer
4102
+ minimum: 0
4103
+ proposedEffectiveSeatLimit:
4104
+ type: integer
4105
+ minimum: 0
4106
+ overBy:
4107
+ type: integer
4108
+ minimum: 1
4109
+ immediateAdjustment:
4110
+ type: object
4111
+ additionalProperties: false
4112
+ required:
4113
+ - amount
4114
+ - currencyCode
4115
+ - kind
4116
+ properties:
4117
+ amount:
4118
+ type: integer
4119
+ description: Signed minor-unit amount. Positive charges now; negative credits now; zero means no immediate payment.
4120
+ currencyCode:
4121
+ type: string
4122
+ nullable: true
4123
+ kind:
4124
+ type: string
4125
+ enum: [charge, credit, none]
4126
+ nextRecurringAmount:
4127
+ type: object
4128
+ additionalProperties: false
4129
+ required:
4130
+ - amount
4131
+ - currencyCode
4132
+ properties:
4133
+ amount:
4134
+ type: integer
4135
+ nullable: true
4136
+ description: Minor-unit recurring subscription total from Paddle preview.
4137
+ currencyCode:
4138
+ type: string
4139
+ nullable: true
4140
+ nextBillingDate:
4141
+ type: string
4142
+ format: date-time
4143
+ nullable: true
4144
+ billingCycle:
4145
+ type: object
4146
+ additionalProperties: false
4147
+ required:
4148
+ - interval
4149
+ - frequency
4150
+ properties:
4151
+ interval:
4152
+ type: string
4153
+ enum: [day, week, month, year, unknown]
4154
+ frequency:
4155
+ type: integer
4156
+ nullable: true
4157
+ minimum: 1
4158
+ previewToken:
4159
+ type: string
4160
+
3947
4161
  MeBillingResponse:
3948
4162
  type: object
3949
4163
  additionalProperties: false
@@ -4911,6 +5125,131 @@ components:
4911
5125
  enum:
4912
5126
  - peak_minute
4913
5127
  - daily_capacity
5128
+ generatedAt:
5129
+ type: string
5130
+ format: date-time
5131
+
5132
+ PlatformBillingActivityType:
5133
+ type: string
5134
+ enum:
5135
+ - plan_changed
5136
+ - subscription_status_changed
5137
+ - seats_changed
5138
+ - billing_reconciled
5139
+ - seat_change_failed
5140
+
5141
+ PlatformBillingActivitySource:
5142
+ type: string
5143
+ enum:
5144
+ - paddle_webhook
5145
+ - me_billing
5146
+ - billing_reconciliation
5147
+
5148
+ PlatformBillingActivityItem:
5149
+ type: object
5150
+ required:
5151
+ - accountId
5152
+ - activityId
5153
+ - activityKey
5154
+ - activityType
5155
+ - occurredAt
5156
+ - source
5157
+ - createdAt
5158
+ properties:
5159
+ accountId:
5160
+ type: string
5161
+ activityId:
5162
+ type: string
5163
+ activityKey:
5164
+ type: string
5165
+ activityType:
5166
+ $ref: '#/components/schemas/PlatformBillingActivityType'
5167
+ occurredAt:
5168
+ type: string
5169
+ format: date-time
5170
+ source:
5171
+ $ref: '#/components/schemas/PlatformBillingActivitySource'
5172
+ actorUserId:
5173
+ type: string
5174
+ nullable: true
5175
+ requestId:
5176
+ type: string
5177
+ nullable: true
5178
+ paddleEventId:
5179
+ type: string
5180
+ nullable: true
5181
+ paddleSubscriptionId:
5182
+ type: string
5183
+ nullable: true
5184
+ oldPlan:
5185
+ nullable: true
5186
+ allOf:
5187
+ - $ref: '#/components/schemas/Plan'
5188
+ newPlan:
5189
+ nullable: true
5190
+ allOf:
5191
+ - $ref: '#/components/schemas/Plan'
5192
+ oldSubscriptionStatus:
5193
+ type: string
5194
+ nullable: true
5195
+ newSubscriptionStatus:
5196
+ type: string
5197
+ nullable: true
5198
+ oldAdditionalSeats:
5199
+ type: integer
5200
+ nullable: true
5201
+ minimum: 0
5202
+ newAdditionalSeats:
5203
+ type: integer
5204
+ nullable: true
5205
+ minimum: 0
5206
+ oldEffectiveSeatLimit:
5207
+ type: integer
5208
+ nullable: true
5209
+ minimum: 0
5210
+ newEffectiveSeatLimit:
5211
+ type: integer
5212
+ nullable: true
5213
+ minimum: 0
5214
+ attemptedAdditionalSeats:
5215
+ type: integer
5216
+ nullable: true
5217
+ minimum: 0
5218
+ attemptedEffectiveSeatLimit:
5219
+ type: integer
5220
+ nullable: true
5221
+ minimum: 0
5222
+ errorCode:
5223
+ type: string
5224
+ nullable: true
5225
+ errorCategory:
5226
+ type: string
5227
+ nullable: true
5228
+ createdAt:
5229
+ type: string
5230
+ format: date-time
5231
+
5232
+ PlatformBillingActivityResponse:
5233
+ type: object
5234
+ required:
5235
+ - accountId
5236
+ - items
5237
+ - count
5238
+ - nextCursor
5239
+ - generatedAt
5240
+ properties:
5241
+ accountId:
5242
+ type: string
5243
+ items:
5244
+ type: array
5245
+ items:
5246
+ $ref: '#/components/schemas/PlatformBillingActivityItem'
5247
+ count:
5248
+ type: integer
5249
+ minimum: 0
5250
+ nextCursor:
5251
+ type: string
5252
+ nullable: true
4914
5253
  generatedAt:
4915
5254
  type: string
4916
5255
  format: date-time
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inklok/api-spec",
3
- "version": "7.9.0",
3
+ "version": "7.9.2",
4
4
  "description": "Canonical OpenAPI specification for the Inklok public API.",
5
5
  "main": "openapi.yaml",
6
6
  "license": "MIT",