orb-billing 1.24.2 → 1.25.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 +8 -0
- package/error.d.ts +7 -0
- package/error.d.ts.map +1 -1
- package/error.js +15 -1
- package/error.js.map +1 -1
- package/error.mjs +13 -0
- package/error.mjs.map +1 -1
- package/index.d.mts +5 -4
- package/index.d.ts +5 -4
- package/index.d.ts.map +1 -1
- package/index.js +4 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -2
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/items.d.ts +18 -25
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +11 -5
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +9 -3
- package/resources/items.mjs.map +1 -1
- package/resources/metrics.d.ts +4 -60
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs.map +1 -1
- package/src/error.ts +29 -0
- package/src/index.ts +5 -3
- package/src/resources/index.ts +1 -1
- package/src/resources/items.ts +23 -42
- package/src/resources/metrics.ts +4 -99
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/items.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE/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ACpB,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,UAAU,GACV,QAAQ,GACR,SAAS,GACT,OAAO,CAAC;QAEZ,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;CAAG;AAErD,yBAAiB,KAAK,CAAC;IACrB,MAAM,QAAQ,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IACnC,MAAM,QAAQ,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;IAC7C,MAAM,QAAQ,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;IAC3D,MAAM,QAAQ,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;CACxD"}
|
package/resources/items.js
CHANGED
|
@@ -24,17 +24,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
27
|
+
exports.ItemsPage = exports.Items = void 0;
|
|
28
28
|
const resource_1 = require("orb-billing/resource");
|
|
29
29
|
const core_1 = require("orb-billing/core");
|
|
30
30
|
const ItemsAPI = __importStar(require("orb-billing/resources/items"));
|
|
31
31
|
const pagination_1 = require("orb-billing/pagination");
|
|
32
32
|
class Items extends resource_1.APIResource {
|
|
33
|
+
/**
|
|
34
|
+
* This endpoint is used to create an [Item](../guides/concepts#item).
|
|
35
|
+
*/
|
|
36
|
+
create(body, options) {
|
|
37
|
+
return this.post('/items', { body, ...options });
|
|
38
|
+
}
|
|
33
39
|
list(query = {}, options) {
|
|
34
40
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
35
41
|
return this.list({}, query);
|
|
36
42
|
}
|
|
37
|
-
return this.getAPIList('/items',
|
|
43
|
+
return this.getAPIList('/items', ItemsPage, { query, ...options });
|
|
38
44
|
}
|
|
39
45
|
/**
|
|
40
46
|
* This endpoint returns an item identified by its item_id.
|
|
@@ -44,10 +50,10 @@ class Items extends resource_1.APIResource {
|
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
exports.Items = Items;
|
|
47
|
-
class
|
|
53
|
+
class ItemsPage extends pagination_1.Page {
|
|
48
54
|
}
|
|
49
|
-
exports.
|
|
55
|
+
exports.ItemsPage = ItemsPage;
|
|
50
56
|
(function (Items) {
|
|
51
|
-
Items.
|
|
57
|
+
Items.ItemsPage = ItemsAPI.ItemsPage;
|
|
52
58
|
})(Items = exports.Items || (exports.Items = {}));
|
|
53
59
|
//# sourceMappingURL=items.js.map
|
package/resources/items.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.js","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,mDAAmD;AACnD,2CAAoD;AACpD,sEAAwD;AACxD,uDAA+D;AAE/D,MAAa,KAAM,SAAQ,sBAAW;
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,mDAAmD;AACnD,2CAAoD;AACpD,sEAAwD;AACxD,uDAA+D;AAE/D,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnD,CAAC;IAQD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAc,EAAE,OAA6B;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF;AA9BD,sBA8BC;AAED,MAAa,SAAU,SAAQ,iBAAU;CAAG;AAA5C,8BAA4C;AAyC5C,WAAiB,KAAK;IAEN,eAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAG/C,CAAC,EALgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAKrB"}
|
package/resources/items.mjs
CHANGED
|
@@ -4,11 +4,17 @@ import { isRequestOptions } from 'orb-billing/core';
|
|
|
4
4
|
import * as ItemsAPI from 'orb-billing/resources/items';
|
|
5
5
|
import { Page } from 'orb-billing/pagination';
|
|
6
6
|
export class Items extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* This endpoint is used to create an [Item](../guides/concepts#item).
|
|
9
|
+
*/
|
|
10
|
+
create(body, options) {
|
|
11
|
+
return this.post('/items', { body, ...options });
|
|
12
|
+
}
|
|
7
13
|
list(query = {}, options) {
|
|
8
14
|
if (isRequestOptions(query)) {
|
|
9
15
|
return this.list({}, query);
|
|
10
16
|
}
|
|
11
|
-
return this.getAPIList('/items',
|
|
17
|
+
return this.getAPIList('/items', ItemsPage, { query, ...options });
|
|
12
18
|
}
|
|
13
19
|
/**
|
|
14
20
|
* This endpoint returns an item identified by its item_id.
|
|
@@ -17,9 +23,9 @@ export class Items extends APIResource {
|
|
|
17
23
|
return this.get(`/items/${itemId}`, options);
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
|
-
export class
|
|
26
|
+
export class ItemsPage extends Page {
|
|
21
27
|
}
|
|
22
28
|
(function (Items) {
|
|
23
|
-
Items.
|
|
29
|
+
Items.ItemsPage = ItemsAPI.ItemsPage;
|
|
24
30
|
})(Items || (Items = {}));
|
|
25
31
|
//# sourceMappingURL=items.mjs.map
|
package/resources/items.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.mjs","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;OAC5C,KAAK,QAAQ,MAAM,6BAA6B;OAChD,EAAE,IAAI,EAAmB,MAAM,wBAAwB;AAE9D,MAAM,OAAO,KAAM,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"items.mjs","sourceRoot":"","sources":["../src/resources/items.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;OAC5C,KAAK,QAAQ,MAAM,6BAA6B;OAChD,EAAE,IAAI,EAAmB,MAAM,wBAAwB;AAE9D,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnD,CAAC;IAQD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAc,EAAE,OAA6B;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF;AAED,MAAM,OAAO,SAAU,SAAQ,IAAU;CAAG;AAyC5C,WAAiB,KAAK;IAEN,eAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAG/C,CAAC,EALgB,KAAK,KAAL,KAAK,QAKrB"}
|
package/resources/metrics.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Core from 'orb-billing/core';
|
|
2
2
|
import { APIResource } from 'orb-billing/resource';
|
|
3
3
|
import * as MetricsAPI from 'orb-billing/resources/metrics';
|
|
4
|
+
import * as ItemsAPI from 'orb-billing/resources/items';
|
|
4
5
|
import { Page, type PageParams } from 'orb-billing/pagination';
|
|
5
6
|
export declare class Metrics extends APIResource {
|
|
6
7
|
/**
|
|
@@ -38,30 +39,11 @@ export interface MetricCreateResponse {
|
|
|
38
39
|
* with all line items, billable metrics, and prices and are used for defining
|
|
39
40
|
* external sync behavior for invoices and tax calculation purposes.
|
|
40
41
|
*/
|
|
41
|
-
item:
|
|
42
|
+
item: ItemsAPI.Item;
|
|
42
43
|
metadata: Record<string, string>;
|
|
43
44
|
name: string;
|
|
44
45
|
status: 'active' | 'draft' | 'archived';
|
|
45
46
|
}
|
|
46
|
-
export declare namespace MetricCreateResponse {
|
|
47
|
-
/**
|
|
48
|
-
* The Item resource represents a sellable product or good. Items are associated
|
|
49
|
-
* with all line items, billable metrics, and prices and are used for defining
|
|
50
|
-
* external sync behavior for invoices and tax calculation purposes.
|
|
51
|
-
*/
|
|
52
|
-
interface Item {
|
|
53
|
-
id: string;
|
|
54
|
-
created_at: string;
|
|
55
|
-
external_connections: Array<Item.ExternalConnection>;
|
|
56
|
-
name: string;
|
|
57
|
-
}
|
|
58
|
-
namespace Item {
|
|
59
|
-
interface ExternalConnection {
|
|
60
|
-
external_connection_name: 'stripe' | 'quickbooks' | 'bill.com' | 'netsuite' | 'taxjar' | 'avalara' | 'anrok';
|
|
61
|
-
external_entity_id: string;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
47
|
/**
|
|
66
48
|
* The Metric resource represents a calculation of a quantity based on events.
|
|
67
49
|
* Metrics are defined by the query that transforms raw usage events into
|
|
@@ -75,30 +57,11 @@ export interface MetricListResponse {
|
|
|
75
57
|
* with all line items, billable metrics, and prices and are used for defining
|
|
76
58
|
* external sync behavior for invoices and tax calculation purposes.
|
|
77
59
|
*/
|
|
78
|
-
item:
|
|
60
|
+
item: ItemsAPI.Item;
|
|
79
61
|
metadata: Record<string, string>;
|
|
80
62
|
name: string;
|
|
81
63
|
status: 'active' | 'draft' | 'archived';
|
|
82
64
|
}
|
|
83
|
-
export declare namespace MetricListResponse {
|
|
84
|
-
/**
|
|
85
|
-
* The Item resource represents a sellable product or good. Items are associated
|
|
86
|
-
* with all line items, billable metrics, and prices and are used for defining
|
|
87
|
-
* external sync behavior for invoices and tax calculation purposes.
|
|
88
|
-
*/
|
|
89
|
-
interface Item {
|
|
90
|
-
id: string;
|
|
91
|
-
created_at: string;
|
|
92
|
-
external_connections: Array<Item.ExternalConnection>;
|
|
93
|
-
name: string;
|
|
94
|
-
}
|
|
95
|
-
namespace Item {
|
|
96
|
-
interface ExternalConnection {
|
|
97
|
-
external_connection_name: 'stripe' | 'quickbooks' | 'bill.com' | 'netsuite' | 'taxjar' | 'avalara' | 'anrok';
|
|
98
|
-
external_entity_id: string;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
65
|
/**
|
|
103
66
|
* The Metric resource represents a calculation of a quantity based on events.
|
|
104
67
|
* Metrics are defined by the query that transforms raw usage events into
|
|
@@ -112,30 +75,11 @@ export interface MetricFetchResponse {
|
|
|
112
75
|
* with all line items, billable metrics, and prices and are used for defining
|
|
113
76
|
* external sync behavior for invoices and tax calculation purposes.
|
|
114
77
|
*/
|
|
115
|
-
item:
|
|
78
|
+
item: ItemsAPI.Item;
|
|
116
79
|
metadata: Record<string, string>;
|
|
117
80
|
name: string;
|
|
118
81
|
status: 'active' | 'draft' | 'archived';
|
|
119
82
|
}
|
|
120
|
-
export declare namespace MetricFetchResponse {
|
|
121
|
-
/**
|
|
122
|
-
* The Item resource represents a sellable product or good. Items are associated
|
|
123
|
-
* with all line items, billable metrics, and prices and are used for defining
|
|
124
|
-
* external sync behavior for invoices and tax calculation purposes.
|
|
125
|
-
*/
|
|
126
|
-
interface Item {
|
|
127
|
-
id: string;
|
|
128
|
-
created_at: string;
|
|
129
|
-
external_connections: Array<Item.ExternalConnection>;
|
|
130
|
-
name: string;
|
|
131
|
-
}
|
|
132
|
-
namespace Item {
|
|
133
|
-
interface ExternalConnection {
|
|
134
|
-
external_connection_name: 'stripe' | 'quickbooks' | 'bill.com' | 'netsuite' | 'taxjar' | 'avalara' | 'anrok';
|
|
135
|
-
external_entity_id: string;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
83
|
export interface MetricCreateParams {
|
|
140
84
|
/**
|
|
141
85
|
* A description of the metric.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE/D,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAItG;;;;OAIG;IACH,IAAI,CACF,KAAK,CAAC,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,uBAAuB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MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,yBAAiB,OAAO,CAAC;IACvB,MAAM,QAAQ,oBAAoB,GAAG,UAAU,CAAC,oBAAoB,CAAC;IACrE,MAAM,QAAQ,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;IACjE,MAAM,QAAQ,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC;IACnE,MAAM,QAAQ,uBAAuB,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAC3E,MAAM,QAAQ,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;IACjE,MAAM,QAAQ,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAC9D"}
|
package/resources/metrics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,mDAAmD;AACnD,2CAAoD;AACpD,0EAA4D;
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGrD,mDAAmD;AACnD,2CAAoD;AACpD,0EAA4D;AAE5D,uDAA+D;AAE/D,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;OAKG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAYD,IAAI,CACF,QAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAgB,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF;AAtCD,0BAsCC;AAED,MAAa,uBAAwB,SAAQ,iBAAwB;CAAG;AAAxE,0DAAwE;AAgHxE,WAAiB,OAAO;IAIR,+BAAuB,GAAG,UAAU,CAAC,uBAAuB,CAAC;AAG7E,CAAC,EAPgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAOvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.mjs","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;OAC5C,KAAK,UAAU,MAAM,+BAA+B;
|
|
1
|
+
{"version":3,"file":"metrics.mjs","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,sBAAsB;OAC3C,EAAE,gBAAgB,EAAE,MAAM,kBAAkB;OAC5C,KAAK,UAAU,MAAM,+BAA+B;OAEpD,EAAE,IAAI,EAAmB,MAAM,wBAAwB;AAE9D,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;OAKG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAYD,IAAI,CACF,QAAgD,EAAE,EAClD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAgB,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,IAAwB;CAAG;AAgHxE,WAAiB,OAAO;IAIR,+BAAuB,GAAG,UAAU,CAAC,uBAAuB,CAAC;AAG7E,CAAC,EAPgB,OAAO,KAAP,OAAO,QAOvB"}
|
package/src/error.ts
CHANGED
|
@@ -55,6 +55,10 @@ export class APIError extends OrbError {
|
|
|
55
55
|
|
|
56
56
|
const type = error?.['type'];
|
|
57
57
|
|
|
58
|
+
if (type === 'https://docs.withorb.com/reference/error-responses#400-constraint-violation') {
|
|
59
|
+
return new ConstraintViolation(status, error, message, headers);
|
|
60
|
+
}
|
|
61
|
+
|
|
58
62
|
if (type === 'https://docs.withorb.com/reference/error-responses#400-duplicate-resource-creation') {
|
|
59
63
|
return new DuplicateResourceCreation(status, error, message, headers);
|
|
60
64
|
}
|
|
@@ -190,6 +194,31 @@ export class RateLimitError extends APIError {
|
|
|
190
194
|
|
|
191
195
|
export class InternalServerError extends APIError {}
|
|
192
196
|
|
|
197
|
+
export class ConstraintViolation extends BadRequestError {
|
|
198
|
+
override status: 400;
|
|
199
|
+
|
|
200
|
+
type: 'https://docs.withorb.com/reference/error-responses#400-constraint-violation';
|
|
201
|
+
|
|
202
|
+
detail?: string | null;
|
|
203
|
+
|
|
204
|
+
title?: string | null;
|
|
205
|
+
|
|
206
|
+
constructor(
|
|
207
|
+
status: number | undefined,
|
|
208
|
+
error: Object | undefined,
|
|
209
|
+
message: string | undefined,
|
|
210
|
+
headers: Headers | undefined,
|
|
211
|
+
) {
|
|
212
|
+
const data = error as Record<string, any>;
|
|
213
|
+
super(status, error, message, headers);
|
|
214
|
+
|
|
215
|
+
this.status = data?.['status'];
|
|
216
|
+
this.type = data?.['type'];
|
|
217
|
+
this.detail = data?.['detail'];
|
|
218
|
+
this.title = data?.['title'];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
193
222
|
export class DuplicateResourceCreation extends BadRequestError {
|
|
194
223
|
override status: 400;
|
|
195
224
|
|
package/src/index.ts
CHANGED
|
@@ -164,6 +164,7 @@ export class Orb extends Core.APIClient {
|
|
|
164
164
|
static ResourceTooLarge = Errors.ResourceTooLarge;
|
|
165
165
|
static AuthenticationError = Errors.AuthenticationError;
|
|
166
166
|
static InternalServerError = Errors.InternalServerError;
|
|
167
|
+
static ConstraintViolation = Errors.ConstraintViolation;
|
|
167
168
|
static FeatureNotAvailable = Errors.FeatureNotAvailable;
|
|
168
169
|
static PermissionDeniedError = Errors.PermissionDeniedError;
|
|
169
170
|
static RequestValidationError = Errors.RequestValidationError;
|
|
@@ -191,6 +192,7 @@ export const {
|
|
|
191
192
|
ResourceTooLarge,
|
|
192
193
|
AuthenticationError,
|
|
193
194
|
InternalServerError,
|
|
195
|
+
ConstraintViolation,
|
|
194
196
|
FeatureNotAvailable,
|
|
195
197
|
PermissionDeniedError,
|
|
196
198
|
RequestValidationError,
|
|
@@ -259,9 +261,9 @@ export namespace Orb {
|
|
|
259
261
|
export import InvoiceMarkPaidParams = API.InvoiceMarkPaidParams;
|
|
260
262
|
|
|
261
263
|
export import Items = API.Items;
|
|
262
|
-
export import
|
|
263
|
-
export import
|
|
264
|
-
export import
|
|
264
|
+
export import Item = API.Item;
|
|
265
|
+
export import ItemsPage = API.ItemsPage;
|
|
266
|
+
export import ItemCreateParams = API.ItemCreateParams;
|
|
265
267
|
export import ItemListParams = API.ItemListParams;
|
|
266
268
|
|
|
267
269
|
export import Metrics = API.Metrics;
|
package/src/resources/index.ts
CHANGED
|
@@ -37,7 +37,7 @@ export {
|
|
|
37
37
|
InvoiceLineItemCreateParams,
|
|
38
38
|
InvoiceLineItems,
|
|
39
39
|
} from './invoice-line-items';
|
|
40
|
-
export {
|
|
40
|
+
export { Item, ItemCreateParams, ItemListParams, ItemsPage, Items } from './items';
|
|
41
41
|
export {
|
|
42
42
|
MetricCreateResponse,
|
|
43
43
|
MetricListResponse,
|
package/src/resources/items.ts
CHANGED
|
@@ -7,51 +7,55 @@ import * as ItemsAPI from "./items";
|
|
|
7
7
|
import { Page, type PageParams } from "../pagination";
|
|
8
8
|
|
|
9
9
|
export class Items extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* This endpoint is used to create an [Item](../guides/concepts#item).
|
|
12
|
+
*/
|
|
13
|
+
create(body: ItemCreateParams, options?: Core.RequestOptions): Core.APIPromise<Item> {
|
|
14
|
+
return this.post('/items', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
18
|
* This endpoint returns a list of all Items, ordered in descending order by
|
|
12
19
|
* creation time.
|
|
13
20
|
*/
|
|
14
|
-
list(
|
|
15
|
-
|
|
16
|
-
options?: Core.RequestOptions,
|
|
17
|
-
): Core.PagePromise<ItemListResponsesPage, ItemListResponse>;
|
|
18
|
-
list(options?: Core.RequestOptions): Core.PagePromise<ItemListResponsesPage, ItemListResponse>;
|
|
21
|
+
list(query?: ItemListParams, options?: Core.RequestOptions): Core.PagePromise<ItemsPage, Item>;
|
|
22
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ItemsPage, Item>;
|
|
19
23
|
list(
|
|
20
24
|
query: ItemListParams | Core.RequestOptions = {},
|
|
21
25
|
options?: Core.RequestOptions,
|
|
22
|
-
): Core.PagePromise<
|
|
26
|
+
): Core.PagePromise<ItemsPage, Item> {
|
|
23
27
|
if (isRequestOptions(query)) {
|
|
24
28
|
return this.list({}, query);
|
|
25
29
|
}
|
|
26
|
-
return this.getAPIList('/items',
|
|
30
|
+
return this.getAPIList('/items', ItemsPage, { query, ...options });
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
/**
|
|
30
34
|
* This endpoint returns an item identified by its item_id.
|
|
31
35
|
*/
|
|
32
|
-
fetch(itemId: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
36
|
+
fetch(itemId: string, options?: Core.RequestOptions): Core.APIPromise<Item> {
|
|
33
37
|
return this.get(`/items/${itemId}`, options);
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
|
|
37
|
-
export class
|
|
41
|
+
export class ItemsPage extends Page<Item> {}
|
|
38
42
|
|
|
39
43
|
/**
|
|
40
44
|
* The Item resource represents a sellable product or good. Items are associated
|
|
41
45
|
* with all line items, billable metrics, and prices and are used for defining
|
|
42
46
|
* external sync behavior for invoices and tax calculation purposes.
|
|
43
47
|
*/
|
|
44
|
-
export interface
|
|
48
|
+
export interface Item {
|
|
45
49
|
id: string;
|
|
46
50
|
|
|
47
51
|
created_at: string;
|
|
48
52
|
|
|
49
|
-
external_connections: Array<
|
|
53
|
+
external_connections: Array<Item.ExternalConnection>;
|
|
50
54
|
|
|
51
55
|
name: string;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
export namespace
|
|
58
|
+
export namespace Item {
|
|
55
59
|
export interface ExternalConnection {
|
|
56
60
|
external_connection_name:
|
|
57
61
|
| 'stripe'
|
|
@@ -66,41 +70,18 @@ export namespace ItemListResponse {
|
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*/
|
|
74
|
-
export interface ItemFetchResponse {
|
|
75
|
-
id: string;
|
|
76
|
-
|
|
77
|
-
created_at: string;
|
|
78
|
-
|
|
79
|
-
external_connections: Array<ItemFetchResponse.ExternalConnection>;
|
|
80
|
-
|
|
73
|
+
export interface ItemCreateParams {
|
|
74
|
+
/**
|
|
75
|
+
* The name of the item.
|
|
76
|
+
*/
|
|
81
77
|
name: string;
|
|
82
78
|
}
|
|
83
79
|
|
|
84
|
-
export namespace ItemFetchResponse {
|
|
85
|
-
export interface ExternalConnection {
|
|
86
|
-
external_connection_name:
|
|
87
|
-
| 'stripe'
|
|
88
|
-
| 'quickbooks'
|
|
89
|
-
| 'bill.com'
|
|
90
|
-
| 'netsuite'
|
|
91
|
-
| 'taxjar'
|
|
92
|
-
| 'avalara'
|
|
93
|
-
| 'anrok';
|
|
94
|
-
|
|
95
|
-
external_entity_id: string;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
80
|
export interface ItemListParams extends PageParams {}
|
|
100
81
|
|
|
101
82
|
export namespace Items {
|
|
102
|
-
export import
|
|
103
|
-
export import
|
|
104
|
-
export import
|
|
83
|
+
export import Item = ItemsAPI.Item;
|
|
84
|
+
export import ItemsPage = ItemsAPI.ItemsPage;
|
|
85
|
+
export import ItemCreateParams = ItemsAPI.ItemCreateParams;
|
|
105
86
|
export import ItemListParams = ItemsAPI.ItemListParams;
|
|
106
87
|
}
|
package/src/resources/metrics.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as Core from "../core";
|
|
|
4
4
|
import { APIResource } from "../resource";
|
|
5
5
|
import { isRequestOptions } from "../core";
|
|
6
6
|
import * as MetricsAPI from "./metrics";
|
|
7
|
+
import * as ItemsAPI from "./items";
|
|
7
8
|
import { Page, type PageParams } from "../pagination";
|
|
8
9
|
|
|
9
10
|
export class Metrics extends APIResource {
|
|
@@ -63,7 +64,7 @@ export interface MetricCreateResponse {
|
|
|
63
64
|
* with all line items, billable metrics, and prices and are used for defining
|
|
64
65
|
* external sync behavior for invoices and tax calculation purposes.
|
|
65
66
|
*/
|
|
66
|
-
item:
|
|
67
|
+
item: ItemsAPI.Item;
|
|
67
68
|
|
|
68
69
|
metadata: Record<string, string>;
|
|
69
70
|
|
|
@@ -72,38 +73,6 @@ export interface MetricCreateResponse {
|
|
|
72
73
|
status: 'active' | 'draft' | 'archived';
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
export namespace MetricCreateResponse {
|
|
76
|
-
/**
|
|
77
|
-
* The Item resource represents a sellable product or good. Items are associated
|
|
78
|
-
* with all line items, billable metrics, and prices and are used for defining
|
|
79
|
-
* external sync behavior for invoices and tax calculation purposes.
|
|
80
|
-
*/
|
|
81
|
-
export interface Item {
|
|
82
|
-
id: string;
|
|
83
|
-
|
|
84
|
-
created_at: string;
|
|
85
|
-
|
|
86
|
-
external_connections: Array<Item.ExternalConnection>;
|
|
87
|
-
|
|
88
|
-
name: string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export namespace Item {
|
|
92
|
-
export interface ExternalConnection {
|
|
93
|
-
external_connection_name:
|
|
94
|
-
| 'stripe'
|
|
95
|
-
| 'quickbooks'
|
|
96
|
-
| 'bill.com'
|
|
97
|
-
| 'netsuite'
|
|
98
|
-
| 'taxjar'
|
|
99
|
-
| 'avalara'
|
|
100
|
-
| 'anrok';
|
|
101
|
-
|
|
102
|
-
external_entity_id: string;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
76
|
/**
|
|
108
77
|
* The Metric resource represents a calculation of a quantity based on events.
|
|
109
78
|
* Metrics are defined by the query that transforms raw usage events into
|
|
@@ -119,7 +88,7 @@ export interface MetricListResponse {
|
|
|
119
88
|
* with all line items, billable metrics, and prices and are used for defining
|
|
120
89
|
* external sync behavior for invoices and tax calculation purposes.
|
|
121
90
|
*/
|
|
122
|
-
item:
|
|
91
|
+
item: ItemsAPI.Item;
|
|
123
92
|
|
|
124
93
|
metadata: Record<string, string>;
|
|
125
94
|
|
|
@@ -128,38 +97,6 @@ export interface MetricListResponse {
|
|
|
128
97
|
status: 'active' | 'draft' | 'archived';
|
|
129
98
|
}
|
|
130
99
|
|
|
131
|
-
export namespace MetricListResponse {
|
|
132
|
-
/**
|
|
133
|
-
* The Item resource represents a sellable product or good. Items are associated
|
|
134
|
-
* with all line items, billable metrics, and prices and are used for defining
|
|
135
|
-
* external sync behavior for invoices and tax calculation purposes.
|
|
136
|
-
*/
|
|
137
|
-
export interface Item {
|
|
138
|
-
id: string;
|
|
139
|
-
|
|
140
|
-
created_at: string;
|
|
141
|
-
|
|
142
|
-
external_connections: Array<Item.ExternalConnection>;
|
|
143
|
-
|
|
144
|
-
name: string;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export namespace Item {
|
|
148
|
-
export interface ExternalConnection {
|
|
149
|
-
external_connection_name:
|
|
150
|
-
| 'stripe'
|
|
151
|
-
| 'quickbooks'
|
|
152
|
-
| 'bill.com'
|
|
153
|
-
| 'netsuite'
|
|
154
|
-
| 'taxjar'
|
|
155
|
-
| 'avalara'
|
|
156
|
-
| 'anrok';
|
|
157
|
-
|
|
158
|
-
external_entity_id: string;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
100
|
/**
|
|
164
101
|
* The Metric resource represents a calculation of a quantity based on events.
|
|
165
102
|
* Metrics are defined by the query that transforms raw usage events into
|
|
@@ -175,7 +112,7 @@ export interface MetricFetchResponse {
|
|
|
175
112
|
* with all line items, billable metrics, and prices and are used for defining
|
|
176
113
|
* external sync behavior for invoices and tax calculation purposes.
|
|
177
114
|
*/
|
|
178
|
-
item:
|
|
115
|
+
item: ItemsAPI.Item;
|
|
179
116
|
|
|
180
117
|
metadata: Record<string, string>;
|
|
181
118
|
|
|
@@ -184,38 +121,6 @@ export interface MetricFetchResponse {
|
|
|
184
121
|
status: 'active' | 'draft' | 'archived';
|
|
185
122
|
}
|
|
186
123
|
|
|
187
|
-
export namespace MetricFetchResponse {
|
|
188
|
-
/**
|
|
189
|
-
* The Item resource represents a sellable product or good. Items are associated
|
|
190
|
-
* with all line items, billable metrics, and prices and are used for defining
|
|
191
|
-
* external sync behavior for invoices and tax calculation purposes.
|
|
192
|
-
*/
|
|
193
|
-
export interface Item {
|
|
194
|
-
id: string;
|
|
195
|
-
|
|
196
|
-
created_at: string;
|
|
197
|
-
|
|
198
|
-
external_connections: Array<Item.ExternalConnection>;
|
|
199
|
-
|
|
200
|
-
name: string;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export namespace Item {
|
|
204
|
-
export interface ExternalConnection {
|
|
205
|
-
external_connection_name:
|
|
206
|
-
| 'stripe'
|
|
207
|
-
| 'quickbooks'
|
|
208
|
-
| 'bill.com'
|
|
209
|
-
| 'netsuite'
|
|
210
|
-
| 'taxjar'
|
|
211
|
-
| 'avalara'
|
|
212
|
-
| 'anrok';
|
|
213
|
-
|
|
214
|
-
external_entity_id: string;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
124
|
export interface MetricCreateParams {
|
|
220
125
|
/**
|
|
221
126
|
* A description of the metric.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.25.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.25.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.25.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|