orb-billing 6.0.0 → 6.0.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.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -4
- package/bin/cli +52 -0
- package/bin/migration-config.json +238 -0
- package/package.json +4 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.0.2](https://github.com/orbcorp/orb-typescript/compare/v6.0.1...v6.0.2) (2026-07-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* ship the v1 migration codemod and correct the npm install instructions ([13c9039](https://github.com/orbcorp/orb-typescript/commit/13c90394af4dafb67edfab5f0431a92168adf01b))
|
|
9
|
+
|
|
10
|
+
## [6.0.1](https://github.com/orbcorp/orb-typescript/compare/v6.0.0...v6.0.1) (2026-07-14)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **internal:** restore tokenless publish script (OIDC) ([eeb743a](https://github.com/orbcorp/orb-typescript/commit/eeb743af8ae1c1dbc559e396b1bc84277b5fcd38))
|
|
16
|
+
|
|
3
17
|
## [6.0.0](https://github.com/orbcorp/orb-typescript/compare/v0.0.1...v6.0.0) (2026-07-14)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -9,12 +9,9 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.witho
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npm install
|
|
12
|
+
npm install orb-billing
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
> [!NOTE]
|
|
16
|
-
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install orb-billing`
|
|
17
|
-
|
|
18
15
|
## Usage
|
|
19
16
|
|
|
20
17
|
The full API of this library can be found in [api.md](api.md).
|
package/bin/cli
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
const commands = {
|
|
6
|
+
migrate: {
|
|
7
|
+
description: 'Run migrations to update your code using orb-billing@5 to be compatible with orb-billing@6',
|
|
8
|
+
fn: () => {
|
|
9
|
+
const result = spawnSync(
|
|
10
|
+
'npx',
|
|
11
|
+
[
|
|
12
|
+
'-y',
|
|
13
|
+
'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz',
|
|
14
|
+
'--migrationConfig',
|
|
15
|
+
require.resolve('./migration-config.json'),
|
|
16
|
+
...process.argv.slice(3),
|
|
17
|
+
],
|
|
18
|
+
{ stdio: 'inherit' },
|
|
19
|
+
);
|
|
20
|
+
if (result.status !== 0) {
|
|
21
|
+
process.exit(result.status);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function exitWithHelp() {
|
|
28
|
+
console.log(`Usage: orb-billing <subcommand>`);
|
|
29
|
+
console.log();
|
|
30
|
+
console.log('Subcommands:');
|
|
31
|
+
|
|
32
|
+
for (const [name, info] of Object.entries(commands)) {
|
|
33
|
+
console.log(` ${name} ${info.description}`);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
console.log();
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (process.argv.length < 3) {
|
|
41
|
+
exitWithHelp();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const commandName = process.argv[2];
|
|
45
|
+
|
|
46
|
+
const command = commands[commandName];
|
|
47
|
+
if (!command) {
|
|
48
|
+
console.log(`Unknown subcommand ${commandName}.`);
|
|
49
|
+
exitWithHelp();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
command.fn();
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pkg": "orb-billing",
|
|
3
|
+
"githubRepo": "https://github.com/orbcorp/orb-typescript",
|
|
4
|
+
"clientClass": "Orb",
|
|
5
|
+
"methods": [
|
|
6
|
+
{
|
|
7
|
+
"base": "beta",
|
|
8
|
+
"name": "fetchPlanVersion",
|
|
9
|
+
"params": [
|
|
10
|
+
{
|
|
11
|
+
"type": "param",
|
|
12
|
+
"key": "version",
|
|
13
|
+
"location": "path"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "params",
|
|
17
|
+
"maybeOverload": false
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "options"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"oldParams": [
|
|
24
|
+
{
|
|
25
|
+
"type": "param",
|
|
26
|
+
"key": "plan_id",
|
|
27
|
+
"location": "path"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "param",
|
|
31
|
+
"key": "version",
|
|
32
|
+
"location": "path"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "options"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"base": "beta.externalPlanID",
|
|
41
|
+
"name": "fetchPlanVersion",
|
|
42
|
+
"params": [
|
|
43
|
+
{
|
|
44
|
+
"type": "param",
|
|
45
|
+
"key": "version",
|
|
46
|
+
"location": "path"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "params",
|
|
50
|
+
"maybeOverload": false
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "options"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"oldParams": [
|
|
57
|
+
{
|
|
58
|
+
"type": "param",
|
|
59
|
+
"key": "external_plan_id",
|
|
60
|
+
"location": "path"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "param",
|
|
64
|
+
"key": "version",
|
|
65
|
+
"location": "path"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "options"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"base": "customers.credits.topUps",
|
|
74
|
+
"name": "delete",
|
|
75
|
+
"params": [
|
|
76
|
+
{
|
|
77
|
+
"type": "param",
|
|
78
|
+
"key": "top_up_id",
|
|
79
|
+
"location": "path"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "params",
|
|
83
|
+
"maybeOverload": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "options"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"oldParams": [
|
|
90
|
+
{
|
|
91
|
+
"type": "param",
|
|
92
|
+
"key": "customer_id",
|
|
93
|
+
"location": "path"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "param",
|
|
97
|
+
"key": "top_up_id",
|
|
98
|
+
"location": "path"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "options"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"base": "customers.credits.topUps",
|
|
107
|
+
"name": "deleteByExternalID",
|
|
108
|
+
"params": [
|
|
109
|
+
{
|
|
110
|
+
"type": "param",
|
|
111
|
+
"key": "top_up_id",
|
|
112
|
+
"location": "path"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "params",
|
|
116
|
+
"maybeOverload": false
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "options"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"oldParams": [
|
|
123
|
+
{
|
|
124
|
+
"type": "param",
|
|
125
|
+
"key": "external_customer_id",
|
|
126
|
+
"location": "path"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "param",
|
|
130
|
+
"key": "top_up_id",
|
|
131
|
+
"location": "path"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "options"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"base": "invoices",
|
|
140
|
+
"name": "deleteLineItem",
|
|
141
|
+
"params": [
|
|
142
|
+
{
|
|
143
|
+
"type": "param",
|
|
144
|
+
"key": "line_item_id",
|
|
145
|
+
"location": "path"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"type": "params",
|
|
149
|
+
"maybeOverload": false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "options"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"oldParams": [
|
|
156
|
+
{
|
|
157
|
+
"type": "param",
|
|
158
|
+
"key": "invoice_id",
|
|
159
|
+
"location": "path"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "param",
|
|
163
|
+
"key": "line_item_id",
|
|
164
|
+
"location": "path"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "options"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"base": "plans.migrations",
|
|
173
|
+
"name": "retrieve",
|
|
174
|
+
"params": [
|
|
175
|
+
{
|
|
176
|
+
"type": "param",
|
|
177
|
+
"key": "migration_id",
|
|
178
|
+
"location": "path"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"type": "params",
|
|
182
|
+
"maybeOverload": false
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"type": "options"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"oldParams": [
|
|
189
|
+
{
|
|
190
|
+
"type": "param",
|
|
191
|
+
"key": "plan_id",
|
|
192
|
+
"location": "path"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "param",
|
|
196
|
+
"key": "migration_id",
|
|
197
|
+
"location": "path"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "options"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"base": "plans.migrations",
|
|
206
|
+
"name": "cancel",
|
|
207
|
+
"params": [
|
|
208
|
+
{
|
|
209
|
+
"type": "param",
|
|
210
|
+
"key": "migration_id",
|
|
211
|
+
"location": "path"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"type": "params",
|
|
215
|
+
"maybeOverload": false
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"type": "options"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"oldParams": [
|
|
222
|
+
{
|
|
223
|
+
"type": "param",
|
|
224
|
+
"key": "plan_id",
|
|
225
|
+
"location": "path"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"type": "param",
|
|
229
|
+
"key": "migration_id",
|
|
230
|
+
"location": "path"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "options"
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.0.
|
|
1
|
+
export const VERSION = '6.0.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.0.
|
|
1
|
+
export declare const VERSION = "6.0.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.0.
|
|
1
|
+
export declare const VERSION = "6.0.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '6.0.
|
|
1
|
+
export const VERSION = '6.0.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|