@zinn-digital/sdk 0.1.1981 → 0.1.1983
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/dist/generated/schema.d.ts +146 -0
- package/package.json +1 -1
|
@@ -6635,6 +6635,26 @@ export interface paths {
|
|
|
6635
6635
|
patch?: never;
|
|
6636
6636
|
trace?: never;
|
|
6637
6637
|
};
|
|
6638
|
+
"/v1/admin/free-credit": {
|
|
6639
|
+
parameters: {
|
|
6640
|
+
query?: never;
|
|
6641
|
+
header?: never;
|
|
6642
|
+
path?: never;
|
|
6643
|
+
cookie?: never;
|
|
6644
|
+
};
|
|
6645
|
+
/**
|
|
6646
|
+
* Free credit given away — granted, consumed, what it bought, our cost, conversion.
|
|
6647
|
+
* @description Free credit (Cloud trial credit, promo, sign-up, staff gifts and goodwill) per period (today UTC, 7 days, 30 days, all time) and per currency: granted by kind and split by whether a card was on file at the grant; consumed (exact for the trial purse); the server hours, sizes and locations it bought and our cost of them (USD, from the cached cost table; an uncached size is reported as unknown, never as free); conversion of the orgs whose first free credit fell in the period (live gateway money net of refunds or a settled top-up, after that credit) and net = revenue minus our cost; the 25 orgs that consumed the most with trial-guard signals. Our own orgs are one separate total. Cached for five minutes. Requires staff + `billing.view`.
|
|
6648
|
+
*/
|
|
6649
|
+
get: operations["getAdminFreeCreditReport"];
|
|
6650
|
+
put?: never;
|
|
6651
|
+
post?: never;
|
|
6652
|
+
delete?: never;
|
|
6653
|
+
options?: never;
|
|
6654
|
+
head?: never;
|
|
6655
|
+
patch?: never;
|
|
6656
|
+
trace?: never;
|
|
6657
|
+
};
|
|
6638
6658
|
"/v1/admin/free-plan-customers": {
|
|
6639
6659
|
parameters: {
|
|
6640
6660
|
query?: never;
|
|
@@ -65397,6 +65417,108 @@ export interface components {
|
|
|
65397
65417
|
/** @enum {string} */
|
|
65398
65418
|
state: "running" | "done" | "failed";
|
|
65399
65419
|
};
|
|
65420
|
+
AdminFreeCreditCount: {
|
|
65421
|
+
count: number;
|
|
65422
|
+
/** Format: int64 */
|
|
65423
|
+
minor: number;
|
|
65424
|
+
};
|
|
65425
|
+
AdminFreeCreditPeriods: {
|
|
65426
|
+
"7d": components["schemas"]["AdminFreeCreditCount"];
|
|
65427
|
+
"30d": components["schemas"]["AdminFreeCreditCount"];
|
|
65428
|
+
all: components["schemas"]["AdminFreeCreditCount"];
|
|
65429
|
+
today: components["schemas"]["AdminFreeCreditCount"];
|
|
65430
|
+
};
|
|
65431
|
+
/** @description The free-credit giveaway report. Money is integer minor units in the row's currency; `cost_usd_minor` is our cost in US cents (null when the size's cost is unknown). */
|
|
65432
|
+
AdminFreeCreditReport: {
|
|
65433
|
+
bought: {
|
|
65434
|
+
cost_known: boolean;
|
|
65435
|
+
currency: string;
|
|
65436
|
+
location: string;
|
|
65437
|
+
periods: {
|
|
65438
|
+
[key: string]: {
|
|
65439
|
+
/** Format: int64 */
|
|
65440
|
+
cost_usd_minor: number | null;
|
|
65441
|
+
/** Format: int64 */
|
|
65442
|
+
free_minor: number;
|
|
65443
|
+
hours: number;
|
|
65444
|
+
servers: number;
|
|
65445
|
+
};
|
|
65446
|
+
};
|
|
65447
|
+
size: string;
|
|
65448
|
+
}[];
|
|
65449
|
+
consumed: {
|
|
65450
|
+
card_less: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65451
|
+
card_on_file: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65452
|
+
currency: string;
|
|
65453
|
+
total: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65454
|
+
}[];
|
|
65455
|
+
conversion: {
|
|
65456
|
+
[key: string]: {
|
|
65457
|
+
cost_unknown_hours: number;
|
|
65458
|
+
/** Format: int64 */
|
|
65459
|
+
cost_usd_minor: number;
|
|
65460
|
+
/** Format: int64 */
|
|
65461
|
+
net_usd_minor: number;
|
|
65462
|
+
orgs: number;
|
|
65463
|
+
other_currency_revenue: boolean;
|
|
65464
|
+
paid_orgs: number;
|
|
65465
|
+
revenue: {
|
|
65466
|
+
currency: string;
|
|
65467
|
+
/** Format: int64 */
|
|
65468
|
+
minor: number;
|
|
65469
|
+
}[];
|
|
65470
|
+
};
|
|
65471
|
+
};
|
|
65472
|
+
/** @description Orders whose free-credit release or refund credit is in another currency than the order. Refused: left out of every sum and counted here. */
|
|
65473
|
+
currency_mismatch_orders: number;
|
|
65474
|
+
/** Format: date-time */
|
|
65475
|
+
generated_at: string;
|
|
65476
|
+
/** @description One row per currency and kind that has any grant; a kind with none has no row. */
|
|
65477
|
+
granted: {
|
|
65478
|
+
card_less: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65479
|
+
card_on_file: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65480
|
+
currency: string;
|
|
65481
|
+
/** @enum {string} */
|
|
65482
|
+
kind: "trial" | "promo" | "signup" | "staff" | "goodwill";
|
|
65483
|
+
total: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65484
|
+
}[];
|
|
65485
|
+
internal_excluded: {
|
|
65486
|
+
currency: string;
|
|
65487
|
+
periods: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65488
|
+
}[];
|
|
65489
|
+
kinds: ("trial" | "promo" | "signup" | "staff" | "goodwill")[];
|
|
65490
|
+
notes: {
|
|
65491
|
+
cost_currency: string;
|
|
65492
|
+
general_purse_spend_not_split: boolean;
|
|
65493
|
+
};
|
|
65494
|
+
periods: ("today" | "7d" | "30d" | "all")[];
|
|
65495
|
+
/** @description The free part of refunds of free-funded orders to Zinn® credit (free is refunded first). It stays free credit and is never counted as money paid. */
|
|
65496
|
+
refunded_free: {
|
|
65497
|
+
currency: string;
|
|
65498
|
+
periods: components["schemas"]["AdminFreeCreditPeriods"];
|
|
65499
|
+
}[];
|
|
65500
|
+
top_consumers: {
|
|
65501
|
+
card_on_file: boolean;
|
|
65502
|
+
/** Format: int64 */
|
|
65503
|
+
consumed_minor: number;
|
|
65504
|
+
cost_unknown_hours: number;
|
|
65505
|
+
/** Format: int64 */
|
|
65506
|
+
cost_usd_minor: number;
|
|
65507
|
+
currency: string;
|
|
65508
|
+
/** Format: int64 */
|
|
65509
|
+
granted_minor: number;
|
|
65510
|
+
hours: number;
|
|
65511
|
+
name: string;
|
|
65512
|
+
org_id: components["schemas"]["Uuid"];
|
|
65513
|
+
paid: {
|
|
65514
|
+
currency: string;
|
|
65515
|
+
/** Format: int64 */
|
|
65516
|
+
minor: number;
|
|
65517
|
+
}[];
|
|
65518
|
+
/** @description `shared_<kind>` (a trial fingerprint shared with another customer org), `guard_flagged` / `guard_blocked`, `no_card_hash` (a method with no card hash, e.g. Link), `used_up_never_paid`. */
|
|
65519
|
+
signals: string[];
|
|
65520
|
+
}[];
|
|
65521
|
+
};
|
|
65400
65522
|
AdminFreePlanCustomer: {
|
|
65401
65523
|
came_from: string;
|
|
65402
65524
|
customer: string;
|
|
@@ -134132,6 +134254,30 @@ export interface operations {
|
|
|
134132
134254
|
404: components["responses"]["NotFound"];
|
|
134133
134255
|
};
|
|
134134
134256
|
};
|
|
134257
|
+
getAdminFreeCreditReport: {
|
|
134258
|
+
parameters: {
|
|
134259
|
+
query?: never;
|
|
134260
|
+
header?: never;
|
|
134261
|
+
path?: never;
|
|
134262
|
+
cookie?: never;
|
|
134263
|
+
};
|
|
134264
|
+
requestBody?: never;
|
|
134265
|
+
responses: {
|
|
134266
|
+
/** @description The report. */
|
|
134267
|
+
200: {
|
|
134268
|
+
headers: {
|
|
134269
|
+
[name: string]: unknown;
|
|
134270
|
+
};
|
|
134271
|
+
content: {
|
|
134272
|
+
"application/json": {
|
|
134273
|
+
data: components["schemas"]["AdminFreeCreditReport"];
|
|
134274
|
+
};
|
|
134275
|
+
};
|
|
134276
|
+
};
|
|
134277
|
+
401: components["responses"]["Unauthorized"];
|
|
134278
|
+
403: components["responses"]["Forbidden"];
|
|
134279
|
+
};
|
|
134280
|
+
};
|
|
134135
134281
|
listAdminFreePlanCustomers: {
|
|
134136
134282
|
parameters: {
|
|
134137
134283
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1983",
|
|
4
4
|
"description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",
|