orb-billing 1.25.0 → 1.27.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/CHANGELOG.md +31 -0
- package/README.md +40 -2
- package/core.d.ts +1 -0
- package/core.d.ts.map +1 -1
- package/core.js +5 -1
- package/core.js.map +1 -1
- package/core.mjs +5 -1
- package/core.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/customers/credits/ledger.d.ts +2 -2
- package/resources/customers/customers.d.ts +1 -13
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/events/events.d.ts +7 -49
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +23 -20
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +23 -20
- package/resources/events/events.mjs.map +1 -1
- package/resources/prices/prices.d.ts +135 -135
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +1 -1
- package/src/core.ts +11 -2
- package/src/resources/customers/credits/ledger.ts +2 -2
- package/src/resources/customers/customers.ts +1 -15
- package/src/resources/events/events.ts +8 -88
- package/src/resources/prices/prices.ts +217 -217
- package/src/resources/subscriptions.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.mjs","sourceRoot":"","sources":["../../src/resources/customers/customers.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;OAC5C,KAAK,YAAY,MAAM,2CAA2C;OAClE,KAAK,sBAAsB,MAAM,sDAAsD;OACvF,KAAK,QAAQ,MAAM,uCAAuC;OAC1D,KAAK,QAAQ,MAAM,uCAAuC;OAC1D,KAAK,UAAU,MAAM,iDAAiD;OACtE,EAAE,IAAI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CAAC;AAGjH,CAAC,EA9BgB,SAAS,KAAT,SAAS,QA8BzB"}
|
|
@@ -21,7 +21,7 @@ export declare class Events extends APIResource {
|
|
|
21
21
|
* event in cases where you need to:
|
|
22
22
|
*
|
|
23
23
|
* - update an event with new metadata as you iterate on your pricing model
|
|
24
|
-
* - update an event based on the result of an external API call (
|
|
24
|
+
* - update an event based on the result of an external API call (e.g. call to a
|
|
25
25
|
* payment gateway succeeded or failed)
|
|
26
26
|
*
|
|
27
27
|
* This amendment API is always audit-safe. The process will still retain the
|
|
@@ -62,7 +62,7 @@ export declare class Events extends APIResource {
|
|
|
62
62
|
* event in cases where you need to:
|
|
63
63
|
*
|
|
64
64
|
* - no longer bill for an event that was improperly reported
|
|
65
|
-
* - no longer bill for an event based on the result of an external API call (
|
|
65
|
+
* - no longer bill for an event based on the result of an external API call (e.g.
|
|
66
66
|
* call to a payment gateway failed and the user should not be billed)
|
|
67
67
|
*
|
|
68
68
|
* If you want to only change specific properties of an event, but keep the event
|
|
@@ -304,18 +304,13 @@ export declare class Events extends APIResource {
|
|
|
304
304
|
*
|
|
305
305
|
* - `event_ids`: This is an explicit array of IDs to filter by. Note that an
|
|
306
306
|
* event's ID is the `idempotency_key` that was originally used for ingestion.
|
|
307
|
-
* - `invoice_id`: This is an issued Orb invoice ID (see also
|
|
308
|
-
* [List Invoices](list-invoices)). Orb will fetch all events that were used to
|
|
309
|
-
* calculate the invoice. In the common case, this will be a list of events whose
|
|
310
|
-
* `timestamp` property falls within the billing period specified by the invoice.
|
|
311
307
|
*
|
|
312
308
|
* By default, Orb does not return _deprecated_ events in this endpoint.
|
|
313
309
|
*
|
|
314
310
|
* By default, Orb will not throw a `404` if no events matched, Orb will return an
|
|
315
311
|
* empty array for `data` instead.
|
|
316
312
|
*/
|
|
317
|
-
search(
|
|
318
|
-
search(options?: Core.RequestOptions): Core.APIPromise<EventSearchResponse>;
|
|
313
|
+
search(body: EventSearchParams, options?: Core.RequestOptions): Core.APIPromise<EventSearchResponse>;
|
|
319
314
|
}
|
|
320
315
|
export interface EventUpdateResponse {
|
|
321
316
|
/**
|
|
@@ -364,7 +359,6 @@ export declare namespace EventIngestResponse {
|
|
|
364
359
|
}
|
|
365
360
|
export interface EventSearchResponse {
|
|
366
361
|
data: Array<EventSearchResponse.Data>;
|
|
367
|
-
pagination_metadata: EventSearchResponse.PaginationMetadata;
|
|
368
362
|
}
|
|
369
363
|
export declare namespace EventSearchResponse {
|
|
370
364
|
/**
|
|
@@ -405,10 +399,6 @@ export declare namespace EventSearchResponse {
|
|
|
405
399
|
*/
|
|
406
400
|
timestamp: string;
|
|
407
401
|
}
|
|
408
|
-
interface PaginationMetadata {
|
|
409
|
-
has_more: boolean;
|
|
410
|
-
next_cursor: string | null;
|
|
411
|
-
}
|
|
412
402
|
}
|
|
413
403
|
export interface EventUpdateParams {
|
|
414
404
|
/**
|
|
@@ -488,43 +478,11 @@ export declare namespace EventIngestParams {
|
|
|
488
478
|
}
|
|
489
479
|
export interface EventSearchParams {
|
|
490
480
|
/**
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
|
|
494
|
-
cursor?: string | null;
|
|
495
|
-
/**
|
|
496
|
-
* Query param: The number of items to fetch. Defaults to 20.
|
|
497
|
-
*/
|
|
498
|
-
limit?: number;
|
|
499
|
-
/**
|
|
500
|
-
* Query param:
|
|
501
|
-
*/
|
|
502
|
-
'timestamp[gt]'?: string | null;
|
|
503
|
-
/**
|
|
504
|
-
* Query param:
|
|
505
|
-
*/
|
|
506
|
-
'timestamp[gte]'?: string | null;
|
|
507
|
-
/**
|
|
508
|
-
* Query param:
|
|
509
|
-
*/
|
|
510
|
-
'timestamp[lt]'?: string | null;
|
|
511
|
-
/**
|
|
512
|
-
* Query param:
|
|
513
|
-
*/
|
|
514
|
-
'timestamp[lte]'?: string | null;
|
|
515
|
-
/**
|
|
516
|
-
* Body param: This is an explicit array of IDs to filter by. Note that an event's
|
|
517
|
-
* ID is the idempotency_key that was originally used for ingestion. Values in this
|
|
518
|
-
* array will be treated case sensitively.
|
|
519
|
-
*/
|
|
520
|
-
event_ids?: Array<string> | null;
|
|
521
|
-
/**
|
|
522
|
-
* Body param: This is an issued Orb invoice ID (see also List Invoices). Orb will
|
|
523
|
-
* fetch all events that were used to calculate the invoice. In the common case,
|
|
524
|
-
* this will be a list of events whose timestamp property falls within the billing
|
|
525
|
-
* period specified by the invoice.
|
|
481
|
+
* This is an explicit array of IDs to filter by. Note that an event's ID is the
|
|
482
|
+
* idempotency_key that was originally used for ingestion. Values in this array
|
|
483
|
+
* will be treated case sensitively.
|
|
526
484
|
*/
|
|
527
|
-
|
|
485
|
+
event_ids: Array<string>;
|
|
528
486
|
}
|
|
529
487
|
export declare namespace Events {
|
|
530
488
|
export import EventUpdateResponse = EventsAPI.EventUpdateResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/resources/events/events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/resources/events/events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,YAAY,MAAM,wCAAwC,CAAC;AAEvE,qBAAa,MAAO,SAAQ,WAAW;IACrC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA2C;IAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CA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Y,CAAC,oBAAoB,CAAC;IACvE,MAAM,QAAQ,kBAAkB,GAAG,YAAY,CAAC,kBAAkB,CAAC;CACpE"}
|
|
@@ -26,7 +26,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.Events = void 0;
|
|
28
28
|
const resource_1 = require("orb-billing/resource");
|
|
29
|
-
const core_1 = require("orb-billing/core");
|
|
30
29
|
const BackfillsAPI = __importStar(require("orb-billing/resources/events/backfills"));
|
|
31
30
|
class Events extends resource_1.APIResource {
|
|
32
31
|
constructor() {
|
|
@@ -50,7 +49,7 @@ class Events extends resource_1.APIResource {
|
|
|
50
49
|
* event in cases where you need to:
|
|
51
50
|
*
|
|
52
51
|
* - update an event with new metadata as you iterate on your pricing model
|
|
53
|
-
* - update an event based on the result of an external API call (
|
|
52
|
+
* - update an event based on the result of an external API call (e.g. call to a
|
|
54
53
|
* payment gateway succeeded or failed)
|
|
55
54
|
*
|
|
56
55
|
* This amendment API is always audit-safe. The process will still retain the
|
|
@@ -93,7 +92,7 @@ class Events extends resource_1.APIResource {
|
|
|
93
92
|
* event in cases where you need to:
|
|
94
93
|
*
|
|
95
94
|
* - no longer bill for an event that was improperly reported
|
|
96
|
-
* - no longer bill for an event based on the result of an external API call (
|
|
95
|
+
* - no longer bill for an event based on the result of an external API call (e.g.
|
|
97
96
|
* call to a payment gateway failed and the user should not be billed)
|
|
98
97
|
*
|
|
99
98
|
* If you want to only change specific properties of an event, but keep the event
|
|
@@ -327,23 +326,27 @@ class Events extends resource_1.APIResource {
|
|
|
327
326
|
const { backfill_id, debug, ...body } = params;
|
|
328
327
|
return this.post('/ingest', { query: { backfill_id, debug }, body, ...options });
|
|
329
328
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
329
|
+
/**
|
|
330
|
+
* This endpoint returns a filtered set of events for an account in a
|
|
331
|
+
* [paginated list format](../reference/pagination).
|
|
332
|
+
*
|
|
333
|
+
* Note that this is a `POST` endpoint rather than a `GET` endpoint because it
|
|
334
|
+
* employs a JSON body for search criteria rather than query parameters, allowing
|
|
335
|
+
* for a more flexible search syntax.
|
|
336
|
+
*
|
|
337
|
+
* Note that a search criteria _must_ be specified. Currently, Orb supports the
|
|
338
|
+
* following criteria:
|
|
339
|
+
*
|
|
340
|
+
* - `event_ids`: This is an explicit array of IDs to filter by. Note that an
|
|
341
|
+
* event's ID is the `idempotency_key` that was originally used for ingestion.
|
|
342
|
+
*
|
|
343
|
+
* By default, Orb does not return _deprecated_ events in this endpoint.
|
|
344
|
+
*
|
|
345
|
+
* By default, Orb will not throw a `404` if no events matched, Orb will return an
|
|
346
|
+
* empty array for `data` instead.
|
|
347
|
+
*/
|
|
348
|
+
search(body, options) {
|
|
349
|
+
return this.post('/events/search', { body, ...options });
|
|
347
350
|
}
|
|
348
351
|
}
|
|
349
352
|
exports.Events = Events;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/resources/events/events.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,mDAAmD;
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/resources/events/events.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,mDAAmD;AAEnD,qFAAuE;AAEvE,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAqU9E,CAAC;IAnUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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gB,MAAM,GAAN,cAAM,KAAN,cAAM,QAiBtB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
import { APIResource } from 'orb-billing/resource';
|
|
3
|
-
import { isRequestOptions } from 'orb-billing/core';
|
|
4
3
|
import * as BackfillsAPI from 'orb-billing/resources/events/backfills';
|
|
5
4
|
export class Events extends APIResource {
|
|
6
5
|
constructor() {
|
|
@@ -24,7 +23,7 @@ export class Events extends APIResource {
|
|
|
24
23
|
* event in cases where you need to:
|
|
25
24
|
*
|
|
26
25
|
* - update an event with new metadata as you iterate on your pricing model
|
|
27
|
-
* - update an event based on the result of an external API call (
|
|
26
|
+
* - update an event based on the result of an external API call (e.g. call to a
|
|
28
27
|
* payment gateway succeeded or failed)
|
|
29
28
|
*
|
|
30
29
|
* This amendment API is always audit-safe. The process will still retain the
|
|
@@ -67,7 +66,7 @@ export class Events extends APIResource {
|
|
|
67
66
|
* event in cases where you need to:
|
|
68
67
|
*
|
|
69
68
|
* - no longer bill for an event that was improperly reported
|
|
70
|
-
* - no longer bill for an event based on the result of an external API call (
|
|
69
|
+
* - no longer bill for an event based on the result of an external API call (e.g.
|
|
71
70
|
* call to a payment gateway failed and the user should not be billed)
|
|
72
71
|
*
|
|
73
72
|
* If you want to only change specific properties of an event, but keep the event
|
|
@@ -301,23 +300,27 @@ export class Events extends APIResource {
|
|
|
301
300
|
const { backfill_id, debug, ...body } = params;
|
|
302
301
|
return this.post('/ingest', { query: { backfill_id, debug }, body, ...options });
|
|
303
302
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
303
|
+
/**
|
|
304
|
+
* This endpoint returns a filtered set of events for an account in a
|
|
305
|
+
* [paginated list format](../reference/pagination).
|
|
306
|
+
*
|
|
307
|
+
* Note that this is a `POST` endpoint rather than a `GET` endpoint because it
|
|
308
|
+
* employs a JSON body for search criteria rather than query parameters, allowing
|
|
309
|
+
* for a more flexible search syntax.
|
|
310
|
+
*
|
|
311
|
+
* Note that a search criteria _must_ be specified. Currently, Orb supports the
|
|
312
|
+
* following criteria:
|
|
313
|
+
*
|
|
314
|
+
* - `event_ids`: This is an explicit array of IDs to filter by. Note that an
|
|
315
|
+
* event's ID is the `idempotency_key` that was originally used for ingestion.
|
|
316
|
+
*
|
|
317
|
+
* By default, Orb does not return _deprecated_ events in this endpoint.
|
|
318
|
+
*
|
|
319
|
+
* By default, Orb will not throw a `404` if no events matched, Orb will return an
|
|
320
|
+
* empty array for `data` instead.
|
|
321
|
+
*/
|
|
322
|
+
search(body, options) {
|
|
323
|
+
return this.post('/events/search', { body, ...options });
|
|
321
324
|
}
|
|
322
325
|
}
|
|
323
326
|
(function (Events) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.mjs","sourceRoot":"","sources":["../../src/resources/events/events.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;
|
|
1
|
+
{"version":3,"file":"events.mjs","sourceRoot":"","sources":["../../src/resources/events/events.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAE3C,KAAK,YAAY,MAAM,wCAAwC;AAEtE,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAqU9E,CAAC;IAnUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,MAAM,CACJ,OAAe,EACf,IAAuB,EACvB,OAA6B;QAE7B,OAAO,IAAI,CAAC,GAAG,CAAC,WAA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