@freeticket/cli 0.11.1 → 0.12.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/README.md +1 -0
- package/dist/index.js +103 -43
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,6 +121,7 @@ ft sales list --status CONFIRMED --json
|
|
|
121
121
|
| `ft reports reconciliation` · `financials` | CFO reconciliation (Mercado Pago vs sale vs Siigo invoice) · per-function P&L | ADMIN |
|
|
122
122
|
| `ft settlements list` · `get <id>` · `document <id>` | Settlements paid to the organizer · signed download URL for the PDF, 5 min TTL (`--proof <fileName>` for a payment proof) | ADMIN |
|
|
123
123
|
| `ft content-videos list` · `content-posts list\|create` · `content-lives list\|get\|playback-token` | Organization content; `content-posts create --data` publishes a post or article | ADMIN |
|
|
124
|
+
| `ft waitlist list [--city <name>]` · `waitlist create --data` | Per-city waitlist of an enterprise landing (export with personal data); `create` needs an enterprise service key | ADMIN |
|
|
124
125
|
| `ft api-keys create <name>` · `list` · `revoke <id>` | Self-service API keys (the secret is shown once, never stored) | ADMIN |
|
|
125
126
|
| `ft admin login` · `me` · `workspaces` · `users` · `plans` · `feature-flags` · `tokens` · `audit-log` | Superadmin, cross-tenant — needs a SUPER_ADMIN session, not an API key. Includes `admin workspaces plan <id>` (assisted plan assignment), `plan-show <id>` (current plan) and `delete <id>` (soft delete; suspend first) and `webTemplate` / `customDomain` on `update` | SUPER_ADMIN |
|
|
126
127
|
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@freeticket/cli",
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.12.0",
|
|
7
7
|
description: "Official FreeTicket CLI \u2014 consumes the B2B REST API for events, sales, tickets, memberships, venues, staff, and reports.",
|
|
8
8
|
keywords: [
|
|
9
9
|
"freeticket",
|
|
@@ -200,6 +200,42 @@ var postEventsIdDates = (options) => {
|
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
};
|
|
203
|
+
var getEvents = (options) => {
|
|
204
|
+
return (options?.client ?? client).get({
|
|
205
|
+
security: [
|
|
206
|
+
{
|
|
207
|
+
name: "Authorization",
|
|
208
|
+
type: "apiKey"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "x-api-key",
|
|
212
|
+
type: "apiKey"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
url: "/events",
|
|
216
|
+
...options
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
var postEvents = (options) => {
|
|
220
|
+
return (options.client ?? client).post({
|
|
221
|
+
security: [
|
|
222
|
+
{
|
|
223
|
+
name: "Authorization",
|
|
224
|
+
type: "apiKey"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: "x-api-key",
|
|
228
|
+
type: "apiKey"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
url: "/events",
|
|
232
|
+
...options,
|
|
233
|
+
headers: {
|
|
234
|
+
"Content-Type": "application/json",
|
|
235
|
+
...options?.headers
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
};
|
|
203
239
|
var postAuthDeviceCode = (options) => {
|
|
204
240
|
return (options?.client ?? client).post({
|
|
205
241
|
url: "/auth/device/code",
|
|
@@ -262,42 +298,6 @@ var getMe = (options) => {
|
|
|
262
298
|
...options
|
|
263
299
|
});
|
|
264
300
|
};
|
|
265
|
-
var getEvents = (options) => {
|
|
266
|
-
return (options?.client ?? client).get({
|
|
267
|
-
security: [
|
|
268
|
-
{
|
|
269
|
-
name: "Authorization",
|
|
270
|
-
type: "apiKey"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
name: "x-api-key",
|
|
274
|
-
type: "apiKey"
|
|
275
|
-
}
|
|
276
|
-
],
|
|
277
|
-
url: "/events",
|
|
278
|
-
...options
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
var postEvents = (options) => {
|
|
282
|
-
return (options.client ?? client).post({
|
|
283
|
-
security: [
|
|
284
|
-
{
|
|
285
|
-
name: "Authorization",
|
|
286
|
-
type: "apiKey"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
name: "x-api-key",
|
|
290
|
-
type: "apiKey"
|
|
291
|
-
}
|
|
292
|
-
],
|
|
293
|
-
url: "/events",
|
|
294
|
-
...options,
|
|
295
|
-
headers: {
|
|
296
|
-
"Content-Type": "application/json",
|
|
297
|
-
...options?.headers
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
301
|
var deleteEventsId = (options) => {
|
|
302
302
|
return (options.client ?? client).delete({
|
|
303
303
|
security: [
|
|
@@ -1282,6 +1282,22 @@ var patchTicketsTicketCode = (options) => {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
});
|
|
1284
1284
|
};
|
|
1285
|
+
var postTicketsTicketCodeResend = (options) => {
|
|
1286
|
+
return (options.client ?? client).post({
|
|
1287
|
+
security: [
|
|
1288
|
+
{
|
|
1289
|
+
name: "Authorization",
|
|
1290
|
+
type: "apiKey"
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
name: "x-api-key",
|
|
1294
|
+
type: "apiKey"
|
|
1295
|
+
}
|
|
1296
|
+
],
|
|
1297
|
+
url: "/tickets/{ticketCode}/resend",
|
|
1298
|
+
...options
|
|
1299
|
+
});
|
|
1300
|
+
};
|
|
1285
1301
|
var postTicketsTicketCodeCheckin = (options) => {
|
|
1286
1302
|
return (options.client ?? client).post({
|
|
1287
1303
|
security: [
|
|
@@ -1474,8 +1490,8 @@ var postContentPlaybackToken = (options) => {
|
|
|
1474
1490
|
}
|
|
1475
1491
|
});
|
|
1476
1492
|
};
|
|
1477
|
-
var
|
|
1478
|
-
return (options
|
|
1493
|
+
var getWaitlist = (options) => {
|
|
1494
|
+
return (options?.client ?? client).get({
|
|
1479
1495
|
security: [
|
|
1480
1496
|
{
|
|
1481
1497
|
name: "Authorization",
|
|
@@ -1486,10 +1502,30 @@ var postTicketsTicketCodeResend = (options) => {
|
|
|
1486
1502
|
type: "apiKey"
|
|
1487
1503
|
}
|
|
1488
1504
|
],
|
|
1489
|
-
url: "/
|
|
1505
|
+
url: "/waitlist",
|
|
1490
1506
|
...options
|
|
1491
1507
|
});
|
|
1492
1508
|
};
|
|
1509
|
+
var postWaitlist = (options) => {
|
|
1510
|
+
return (options.client ?? client).post({
|
|
1511
|
+
security: [
|
|
1512
|
+
{
|
|
1513
|
+
name: "Authorization",
|
|
1514
|
+
type: "apiKey"
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
name: "x-api-key",
|
|
1518
|
+
type: "apiKey"
|
|
1519
|
+
}
|
|
1520
|
+
],
|
|
1521
|
+
url: "/waitlist",
|
|
1522
|
+
...options,
|
|
1523
|
+
headers: {
|
|
1524
|
+
"Content-Type": "application/json",
|
|
1525
|
+
...options?.headers
|
|
1526
|
+
}
|
|
1527
|
+
});
|
|
1528
|
+
};
|
|
1493
1529
|
|
|
1494
1530
|
// src/commands/account.ts
|
|
1495
1531
|
import chalk4 from "chalk";
|
|
@@ -2579,6 +2615,15 @@ var deleteTokensId = (options) => {
|
|
|
2579
2615
|
// src/lib/input.ts
|
|
2580
2616
|
import { readFileSync as readFileSync3 } from "fs";
|
|
2581
2617
|
import * as readline from "readline";
|
|
2618
|
+
function parseLimit(input) {
|
|
2619
|
+
const n = Number(input);
|
|
2620
|
+
if (!Number.isInteger(n) || n < 1 || n > 100)
|
|
2621
|
+
fail(
|
|
2622
|
+
`Invalid --limit: ${input}. Use an integer from 1 to 100.`,
|
|
2623
|
+
"For more rows, add --all to walk every page."
|
|
2624
|
+
);
|
|
2625
|
+
return n;
|
|
2626
|
+
}
|
|
2582
2627
|
function parseData(input) {
|
|
2583
2628
|
if (!input) {
|
|
2584
2629
|
fail(
|
|
@@ -2831,7 +2876,7 @@ function registerAdminResource(parent, spec) {
|
|
|
2831
2876
|
configureAdminClient();
|
|
2832
2877
|
const query = {};
|
|
2833
2878
|
if (!spec.noPaging) {
|
|
2834
|
-
query.limit =
|
|
2879
|
+
query.limit = parseLimit(opts.limit);
|
|
2835
2880
|
query.cursor = opts.cursor;
|
|
2836
2881
|
}
|
|
2837
2882
|
for (const f of spec.listFlags ?? []) {
|
|
@@ -2985,7 +3030,7 @@ ${chalk6.green("\u2713")} API key "${chalk6.bold(key.name)}" created (scope: ${k
|
|
|
2985
3030
|
configureClient(opts.workspace);
|
|
2986
3031
|
const columns = resolveColumns(opts, COLUMNS);
|
|
2987
3032
|
const query = {
|
|
2988
|
-
limit: opts.limit,
|
|
3033
|
+
limit: parseLimit(opts.limit),
|
|
2989
3034
|
cursor: opts.cursor
|
|
2990
3035
|
};
|
|
2991
3036
|
if (opts.all) {
|
|
@@ -3279,8 +3324,9 @@ function registerResource(program2, spec) {
|
|
|
3279
3324
|
for (const f of spec.listFlags ?? []) cmd.option(f.flag, f.describe);
|
|
3280
3325
|
cmd.action(async (opts) => {
|
|
3281
3326
|
let columns = resolveColumns(opts, spec.columns);
|
|
3327
|
+
opts.limit = parseLimit(opts.limit);
|
|
3282
3328
|
const query = {
|
|
3283
|
-
limit:
|
|
3329
|
+
limit: opts.limit,
|
|
3284
3330
|
cursor: opts.cursor
|
|
3285
3331
|
};
|
|
3286
3332
|
for (const f of spec.listFlags ?? []) {
|
|
@@ -3925,6 +3971,20 @@ registerResource(program, {
|
|
|
3925
3971
|
});
|
|
3926
3972
|
}
|
|
3927
3973
|
});
|
|
3974
|
+
registerResource(program, {
|
|
3975
|
+
name: "waitlist",
|
|
3976
|
+
describe: "Per-city waitlist entries of an enterprise landing",
|
|
3977
|
+
list: getWaitlist,
|
|
3978
|
+
create: postWaitlist,
|
|
3979
|
+
columns: ["id", "city", "name", "contact", "source", "createdAt"],
|
|
3980
|
+
listFlags: [
|
|
3981
|
+
{
|
|
3982
|
+
flag: "--city <name>",
|
|
3983
|
+
describe: "filter by city (accents/case ignored)",
|
|
3984
|
+
query: "city"
|
|
3985
|
+
}
|
|
3986
|
+
]
|
|
3987
|
+
});
|
|
3928
3988
|
registerTickets(program);
|
|
3929
3989
|
registerReports(program);
|
|
3930
3990
|
registerApiKeys(program);
|
package/package.json
CHANGED