@openmeter/sdk 1.0.0-beta-0aa28aae42bb → 1.0.0-beta-665f73793560

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.
@@ -113,6 +113,57 @@ export interface paths {
113
113
  patch?: never;
114
114
  trace?: never;
115
115
  };
116
+ '/api/v1/apps/custom-invoicing/{invoiceId}/draft/synchronized': {
117
+ parameters: {
118
+ query?: never;
119
+ header?: never;
120
+ path?: never;
121
+ cookie?: never;
122
+ };
123
+ get?: never;
124
+ put?: never;
125
+ /** Submit draft synchronization results */
126
+ post: operations['appCustomInvoicingDraftSynchronized'];
127
+ delete?: never;
128
+ options?: never;
129
+ head?: never;
130
+ patch?: never;
131
+ trace?: never;
132
+ };
133
+ '/api/v1/apps/custom-invoicing/{invoiceId}/issuing/synchronized': {
134
+ parameters: {
135
+ query?: never;
136
+ header?: never;
137
+ path?: never;
138
+ cookie?: never;
139
+ };
140
+ get?: never;
141
+ put?: never;
142
+ /** Submit issuing synchronization results */
143
+ post: operations['appCustomInvoicingIssuingSynchronized'];
144
+ delete?: never;
145
+ options?: never;
146
+ head?: never;
147
+ patch?: never;
148
+ trace?: never;
149
+ };
150
+ '/api/v1/apps/custom-invoicing/{invoiceId}/payment/status': {
151
+ parameters: {
152
+ query?: never;
153
+ header?: never;
154
+ path?: never;
155
+ cookie?: never;
156
+ };
157
+ get?: never;
158
+ put?: never;
159
+ /** Update payment status */
160
+ post: operations['appCustomInvoicingUpdatePaymentStatus'];
161
+ delete?: never;
162
+ options?: never;
163
+ head?: never;
164
+ patch?: never;
165
+ trace?: never;
166
+ };
116
167
  '/api/v1/apps/{id}': {
117
168
  parameters: {
118
169
  query?: never;
@@ -3219,6 +3270,80 @@ export interface components {
3219
3270
  /** @description Metadata to be used by the custom invoicing provider. */
3220
3271
  metadata?: components['schemas']['Metadata'];
3221
3272
  };
3273
+ /** @description Information to finalize the draft details of an invoice. */
3274
+ CustomInvoicingDraftSynchronizedRequest: {
3275
+ /** @description The result of the synchronization. */
3276
+ invoicing?: components['schemas']['CustomInvoicingSyncResult'];
3277
+ };
3278
+ /** @description Information to finalize the invoicing details of an invoice. */
3279
+ CustomInvoicingFinalizedInvoicingRequest: {
3280
+ /** @description If set the invoice's number will be set to this value. */
3281
+ invoiceNumber?: components['schemas']['InvoiceNumber'];
3282
+ /**
3283
+ * Format: date-time
3284
+ * @description If set the invoice's sent to customer at will be set to this value.
3285
+ * @example 2023-01-01T01:01:01.001Z
3286
+ */
3287
+ sentToCustomerAt?: Date;
3288
+ };
3289
+ /** @description Information to finalize the payment details of an invoice. */
3290
+ CustomInvoicingFinalizedPaymentRequest: {
3291
+ /** @description If set the invoice's payment external ID will be set to this value. */
3292
+ externalId?: string;
3293
+ };
3294
+ /** @description Information to finalize the invoice.
3295
+ *
3296
+ * If invoicing.invoiceNumber is not set, then a new invoice number will be generated (INV- prefix). */
3297
+ CustomInvoicingFinalizedRequest: {
3298
+ /** @description The result of the synchronization. */
3299
+ invoicing?: components['schemas']['CustomInvoicingFinalizedInvoicingRequest'];
3300
+ /** @description The result of the payment synchronization. */
3301
+ payment?: components['schemas']['CustomInvoicingFinalizedPaymentRequest'];
3302
+ };
3303
+ /** @description Mapping between line discounts and external IDs. */
3304
+ CustomInvoicingLineDiscountExternalIdMapping: {
3305
+ /**
3306
+ * @description The line discount ID.
3307
+ * @example 01G65Z755AFWAKHE12NY0CQ9FH
3308
+ */
3309
+ lineDiscountId: string;
3310
+ /** @description The external ID (e.g. custom invoicing system's ID). */
3311
+ externalId: string;
3312
+ };
3313
+ /** @description Mapping between lines and external IDs. */
3314
+ CustomInvoicingLineExternalIdMapping: {
3315
+ /**
3316
+ * @description The line ID.
3317
+ * @example 01G65Z755AFWAKHE12NY0CQ9FH
3318
+ */
3319
+ lineId: string;
3320
+ /** @description The external ID (e.g. custom invoicing system's ID). */
3321
+ externalId: string;
3322
+ };
3323
+ /**
3324
+ * @description Payment trigger to execute on a finalized invoice.
3325
+ * @enum {string}
3326
+ */
3327
+ CustomInvoicingPaymentTrigger: 'paid' | 'payment_failed' | 'payment_uncollectible' | 'payment_overdue' | 'action_required' | 'void';
3328
+ /** @description Information to synchronize the invoice.
3329
+ *
3330
+ * Can be used to store external app's IDs on the invoice or lines. */
3331
+ CustomInvoicingSyncResult: {
3332
+ /** @description If set the invoice's number will be set to this value. */
3333
+ invoiceNumber?: components['schemas']['InvoiceNumber'];
3334
+ /** @description If set the invoice's invoicing external ID will be set to this value. */
3335
+ externalId?: string;
3336
+ /** @description If set the invoice's line external IDs will be set to this value.
3337
+ *
3338
+ * This can be used to reference the external system's entities in the
3339
+ * invoice. */
3340
+ lineExternalIds?: components['schemas']['CustomInvoicingLineExternalIdMapping'][];
3341
+ /** @description If set the invoice's line discount external IDs will be set to this value.
3342
+ *
3343
+ * This can be used to reference the external system's entities in the
3344
+ * invoice. */
3345
+ lineDiscountExternalIds?: components['schemas']['CustomInvoicingLineDiscountExternalIdMapping'][];
3346
+ };
3222
3347
  /** @description Custom invoicing tax config. */
3223
3348
  CustomInvoicingTaxConfig: {
3224
3349
  /**
@@ -3229,6 +3354,13 @@ export interface components {
3229
3354
  */
3230
3355
  code: string;
3231
3356
  };
3357
+ /** @description Update payment status request.
3358
+ *
3359
+ * Can be used to manipulate invoice's payment status (when custominvoicing app is being used). */
3360
+ CustomInvoicingUpdatePaymentStatusRequest: {
3361
+ /** @description The trigger to be executed on the invoice. */
3362
+ trigger: components['schemas']['CustomInvoicingPaymentTrigger'];
3363
+ };
3232
3364
  /** @description Plan input for custom subscription creation (without key and version). */
3233
3365
  CustomPlanInput: {
3234
3366
  /**
@@ -9639,7 +9771,16 @@ export type CurrencyCode = components['schemas']['CurrencyCode'];
9639
9771
  export type CustomInvoicingApp = components['schemas']['CustomInvoicingApp'];
9640
9772
  export type CustomInvoicingAppReplaceUpdate = components['schemas']['CustomInvoicingAppReplaceUpdate'];
9641
9773
  export type CustomInvoicingCustomerAppData = components['schemas']['CustomInvoicingCustomerAppData'];
9774
+ export type CustomInvoicingDraftSynchronizedRequest = components['schemas']['CustomInvoicingDraftSynchronizedRequest'];
9775
+ export type CustomInvoicingFinalizedInvoicingRequest = components['schemas']['CustomInvoicingFinalizedInvoicingRequest'];
9776
+ export type CustomInvoicingFinalizedPaymentRequest = components['schemas']['CustomInvoicingFinalizedPaymentRequest'];
9777
+ export type CustomInvoicingFinalizedRequest = components['schemas']['CustomInvoicingFinalizedRequest'];
9778
+ export type CustomInvoicingLineDiscountExternalIdMapping = components['schemas']['CustomInvoicingLineDiscountExternalIdMapping'];
9779
+ export type CustomInvoicingLineExternalIdMapping = components['schemas']['CustomInvoicingLineExternalIdMapping'];
9780
+ export type CustomInvoicingPaymentTrigger = components['schemas']['CustomInvoicingPaymentTrigger'];
9781
+ export type CustomInvoicingSyncResult = components['schemas']['CustomInvoicingSyncResult'];
9642
9782
  export type CustomInvoicingTaxConfig = components['schemas']['CustomInvoicingTaxConfig'];
9783
+ export type CustomInvoicingUpdatePaymentStatusRequest = components['schemas']['CustomInvoicingUpdatePaymentStatusRequest'];
9643
9784
  export type CustomPlanInput = components['schemas']['CustomPlanInput'];
9644
9785
  export type CustomSubscriptionChange = components['schemas']['CustomSubscriptionChange'];
9645
9786
  export type CustomSubscriptionCreate = components['schemas']['CustomSubscriptionCreate'];
@@ -10753,6 +10894,267 @@ export interface operations {
10753
10894
  };
10754
10895
  };
10755
10896
  };
10897
+ appCustomInvoicingDraftSynchronized: {
10898
+ parameters: {
10899
+ query?: never;
10900
+ header?: never;
10901
+ path: {
10902
+ invoiceId: string;
10903
+ };
10904
+ cookie?: never;
10905
+ };
10906
+ requestBody: {
10907
+ content: {
10908
+ 'application/json': components['schemas']['CustomInvoicingDraftSynchronizedRequest'];
10909
+ };
10910
+ };
10911
+ responses: {
10912
+ /** @description There is no content to send for this request, but the headers may be useful. */
10913
+ 204: {
10914
+ headers: {
10915
+ [name: string]: unknown;
10916
+ };
10917
+ content?: never;
10918
+ };
10919
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
10920
+ 400: {
10921
+ headers: {
10922
+ [name: string]: unknown;
10923
+ };
10924
+ content: {
10925
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
10926
+ };
10927
+ };
10928
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
10929
+ 401: {
10930
+ headers: {
10931
+ [name: string]: unknown;
10932
+ };
10933
+ content: {
10934
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
10935
+ };
10936
+ };
10937
+ /** @description The server understood the request but refuses to authorize it. */
10938
+ 403: {
10939
+ headers: {
10940
+ [name: string]: unknown;
10941
+ };
10942
+ content: {
10943
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
10944
+ };
10945
+ };
10946
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
10947
+ 412: {
10948
+ headers: {
10949
+ [name: string]: unknown;
10950
+ };
10951
+ content: {
10952
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
10953
+ };
10954
+ };
10955
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
10956
+ 500: {
10957
+ headers: {
10958
+ [name: string]: unknown;
10959
+ };
10960
+ content: {
10961
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
10962
+ };
10963
+ };
10964
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
10965
+ 503: {
10966
+ headers: {
10967
+ [name: string]: unknown;
10968
+ };
10969
+ content: {
10970
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
10971
+ };
10972
+ };
10973
+ /** @description An unexpected error response. */
10974
+ default: {
10975
+ headers: {
10976
+ [name: string]: unknown;
10977
+ };
10978
+ content: {
10979
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
10980
+ };
10981
+ };
10982
+ };
10983
+ };
10984
+ appCustomInvoicingIssuingSynchronized: {
10985
+ parameters: {
10986
+ query?: never;
10987
+ header?: never;
10988
+ path: {
10989
+ invoiceId: string;
10990
+ };
10991
+ cookie?: never;
10992
+ };
10993
+ requestBody: {
10994
+ content: {
10995
+ 'application/json': components['schemas']['CustomInvoicingFinalizedRequest'];
10996
+ };
10997
+ };
10998
+ responses: {
10999
+ /** @description There is no content to send for this request, but the headers may be useful. */
11000
+ 204: {
11001
+ headers: {
11002
+ [name: string]: unknown;
11003
+ };
11004
+ content?: never;
11005
+ };
11006
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
11007
+ 400: {
11008
+ headers: {
11009
+ [name: string]: unknown;
11010
+ };
11011
+ content: {
11012
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
11013
+ };
11014
+ };
11015
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
11016
+ 401: {
11017
+ headers: {
11018
+ [name: string]: unknown;
11019
+ };
11020
+ content: {
11021
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
11022
+ };
11023
+ };
11024
+ /** @description The server understood the request but refuses to authorize it. */
11025
+ 403: {
11026
+ headers: {
11027
+ [name: string]: unknown;
11028
+ };
11029
+ content: {
11030
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
11031
+ };
11032
+ };
11033
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
11034
+ 412: {
11035
+ headers: {
11036
+ [name: string]: unknown;
11037
+ };
11038
+ content: {
11039
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
11040
+ };
11041
+ };
11042
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
11043
+ 500: {
11044
+ headers: {
11045
+ [name: string]: unknown;
11046
+ };
11047
+ content: {
11048
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
11049
+ };
11050
+ };
11051
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
11052
+ 503: {
11053
+ headers: {
11054
+ [name: string]: unknown;
11055
+ };
11056
+ content: {
11057
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
11058
+ };
11059
+ };
11060
+ /** @description An unexpected error response. */
11061
+ default: {
11062
+ headers: {
11063
+ [name: string]: unknown;
11064
+ };
11065
+ content: {
11066
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
11067
+ };
11068
+ };
11069
+ };
11070
+ };
11071
+ appCustomInvoicingUpdatePaymentStatus: {
11072
+ parameters: {
11073
+ query?: never;
11074
+ header?: never;
11075
+ path: {
11076
+ invoiceId: string;
11077
+ };
11078
+ cookie?: never;
11079
+ };
11080
+ requestBody: {
11081
+ content: {
11082
+ 'application/json': components['schemas']['CustomInvoicingUpdatePaymentStatusRequest'];
11083
+ };
11084
+ };
11085
+ responses: {
11086
+ /** @description There is no content to send for this request, but the headers may be useful. */
11087
+ 204: {
11088
+ headers: {
11089
+ [name: string]: unknown;
11090
+ };
11091
+ content?: never;
11092
+ };
11093
+ /** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
11094
+ 400: {
11095
+ headers: {
11096
+ [name: string]: unknown;
11097
+ };
11098
+ content: {
11099
+ 'application/problem+json': components['schemas']['BadRequestProblemResponse'];
11100
+ };
11101
+ };
11102
+ /** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
11103
+ 401: {
11104
+ headers: {
11105
+ [name: string]: unknown;
11106
+ };
11107
+ content: {
11108
+ 'application/problem+json': components['schemas']['UnauthorizedProblemResponse'];
11109
+ };
11110
+ };
11111
+ /** @description The server understood the request but refuses to authorize it. */
11112
+ 403: {
11113
+ headers: {
11114
+ [name: string]: unknown;
11115
+ };
11116
+ content: {
11117
+ 'application/problem+json': components['schemas']['ForbiddenProblemResponse'];
11118
+ };
11119
+ };
11120
+ /** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
11121
+ 412: {
11122
+ headers: {
11123
+ [name: string]: unknown;
11124
+ };
11125
+ content: {
11126
+ 'application/problem+json': components['schemas']['PreconditionFailedProblemResponse'];
11127
+ };
11128
+ };
11129
+ /** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
11130
+ 500: {
11131
+ headers: {
11132
+ [name: string]: unknown;
11133
+ };
11134
+ content: {
11135
+ 'application/problem+json': components['schemas']['InternalServerErrorProblemResponse'];
11136
+ };
11137
+ };
11138
+ /** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
11139
+ 503: {
11140
+ headers: {
11141
+ [name: string]: unknown;
11142
+ };
11143
+ content: {
11144
+ 'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse'];
11145
+ };
11146
+ };
11147
+ /** @description An unexpected error response. */
11148
+ default: {
11149
+ headers: {
11150
+ [name: string]: unknown;
11151
+ };
11152
+ content: {
11153
+ 'application/problem+json': components['schemas']['UnexpectedProblemResponse'];
11154
+ };
11155
+ };
11156
+ };
11157
+ };
10756
11158
  getApp: {
10757
11159
  parameters: {
10758
11160
  query?: never;