tapimo 0.2.0 → 0.3.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 +31 -3
- package/dist/ApiKey.d.ts +1 -0
- package/dist/ApiKey.d.ts.map +1 -1
- package/dist/ApiKey.js +5 -2
- package/dist/ApiKey.js.map +1 -1
- package/dist/ApiKeys.d.ts +28 -1
- package/dist/ApiKeys.d.ts.map +1 -1
- package/dist/ApiKeys.js +34 -1
- package/dist/ApiKeys.js.map +1 -1
- package/dist/App.d.ts +7167 -4507
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +8 -0
- package/dist/App.js.map +1 -1
- package/dist/Scope.d.ts +11 -2
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +14 -3
- package/dist/Scope.js.map +1 -1
- package/dist/admin/App.d.ts +128 -118
- package/dist/admin/App.d.ts.map +1 -1
- package/dist/admin/apps/api-keys.d.ts +7 -0
- package/dist/admin/apps/api-keys.d.ts.map +1 -1
- package/dist/admin/apps/scopes.d.ts +8 -0
- package/dist/admin/apps/scopes.d.ts.map +1 -1
- package/dist/admin/apps/scopes.js +3 -0
- package/dist/admin/apps/scopes.js.map +1 -1
- package/dist/admin/apps/verified-tokens.d.ts +57 -57
- package/dist/admin/ui.generated.d.ts +1 -1
- package/dist/admin/ui.generated.js +13 -13
- package/dist/admin/ui.generated.js.map +1 -1
- package/dist/analytics/Analytics.d.ts +151 -0
- package/dist/analytics/Analytics.d.ts.map +1 -0
- package/dist/analytics/Analytics.js +212 -0
- package/dist/analytics/Analytics.js.map +1 -0
- package/dist/analytics/tables/requestEvents.d.ts +215 -0
- package/dist/analytics/tables/requestEvents.d.ts.map +1 -0
- package/dist/analytics/tables/requestEvents.js +264 -0
- package/dist/analytics/tables/requestEvents.js.map +1 -0
- package/dist/apps/data/App.d.ts +1024 -624
- package/dist/apps/data/App.d.ts.map +1 -1
- package/dist/apps/data/App.js +36 -0
- package/dist/apps/data/App.js.map +1 -1
- package/dist/apps/data/routes/balances.d.ts +45 -45
- package/dist/apps/data/routes/coingecko.d.ts +176 -176
- package/dist/apps/data/routes/exchanges.d.ts +455 -455
- package/dist/apps/data/routes/fee-amm.d.ts +101 -101
- package/dist/apps/data/routes/funding.d.ts +765 -0
- package/dist/apps/data/routes/funding.d.ts.map +1 -0
- package/dist/apps/data/routes/funding.js +383 -0
- package/dist/apps/data/routes/funding.js.map +1 -0
- package/dist/apps/data/routes/receipts.d.ts.map +1 -1
- package/dist/apps/data/routes/receipts.js +2 -8
- package/dist/apps/data/routes/receipts.js.map +1 -1
- package/dist/apps/data/routes/rpc.d.ts +29 -36
- package/dist/apps/data/routes/rpc.d.ts.map +1 -1
- package/dist/apps/data/routes/rpc.js +29 -1
- package/dist/apps/data/routes/rpc.js.map +1 -1
- package/dist/apps/data/routes/tokenlist.d.ts +36 -36
- package/dist/apps/data/routes/transfers.d.ts +56 -56
- package/dist/apps/data/routes/verified-tokens.d.ts +36 -36
- package/dist/apps/data/routes/webhooks.d.ts +45 -45
- package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
- package/dist/apps/data/routes/webhooks.js +8 -8
- package/dist/apps/data/routes/webhooks.js.map +1 -1
- package/dist/apps/docs/App.d.ts +4 -2
- package/dist/apps/docs/App.d.ts.map +1 -1
- package/dist/apps/docs/App.js +27 -95
- package/dist/apps/docs/App.js.map +1 -1
- package/dist/apps/docs/reference.d.ts +21 -0
- package/dist/apps/docs/reference.d.ts.map +1 -0
- package/dist/apps/docs/reference.js +112 -0
- package/dist/apps/docs/reference.js.map +1 -0
- package/dist/apps/index.d.ts +1 -0
- package/dist/apps/index.d.ts.map +1 -1
- package/dist/apps/index.js +1 -0
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/mcp.d.ts +76 -0
- package/dist/apps/mcp.d.ts.map +1 -0
- package/dist/apps/mcp.js +188 -0
- package/dist/apps/mcp.js.map +1 -0
- package/dist/apps/platform/App.d.ts +3005 -728
- package/dist/apps/platform/App.d.ts.map +1 -1
- package/dist/apps/platform/App.js +13 -3
- package/dist/apps/platform/App.js.map +1 -1
- package/dist/apps/platform/Billing.d.ts +279 -0
- package/dist/apps/platform/Billing.d.ts.map +1 -0
- package/dist/apps/platform/Billing.js +477 -0
- package/dist/apps/platform/Billing.js.map +1 -0
- package/dist/apps/platform/index.d.ts +1 -0
- package/dist/apps/platform/index.d.ts.map +1 -1
- package/dist/apps/platform/index.js +1 -0
- package/dist/apps/platform/index.js.map +1 -1
- package/dist/apps/platform/routes/api-keys.d.ts +341 -49
- package/dist/apps/platform/routes/api-keys.d.ts.map +1 -1
- package/dist/apps/platform/routes/api-keys.js +115 -13
- package/dist/apps/platform/routes/api-keys.js.map +1 -1
- package/dist/apps/platform/routes/billing.d.ts +1520 -0
- package/dist/apps/platform/routes/billing.d.ts.map +1 -0
- package/dist/apps/platform/routes/billing.js +795 -0
- package/dist/apps/platform/routes/billing.js.map +1 -0
- package/dist/apps/platform/routes/invitations.d.ts +201 -83
- package/dist/apps/platform/routes/invitations.d.ts.map +1 -1
- package/dist/apps/platform/routes/invitations.js +58 -0
- package/dist/apps/platform/routes/invitations.js.map +1 -1
- package/dist/apps/platform/routes/me.d.ts +17 -17
- package/dist/apps/platform/routes/orgs.d.ts +50 -36
- package/dist/apps/platform/routes/orgs.d.ts.map +1 -1
- package/dist/apps/platform/routes/orgs.js +14 -3
- package/dist/apps/platform/routes/orgs.js.map +1 -1
- package/dist/apps/platform/routes/projects.d.ts +97 -97
- package/dist/apps/platform/routes/scopes.d.ts +107 -0
- package/dist/apps/platform/routes/scopes.d.ts.map +1 -0
- package/dist/apps/platform/routes/scopes.js +66 -0
- package/dist/apps/platform/routes/scopes.js.map +1 -0
- package/dist/apps/platform/routes/usage.d.ts +588 -0
- package/dist/apps/platform/routes/usage.d.ts.map +1 -0
- package/dist/apps/platform/routes/usage.js +391 -0
- package/dist/apps/platform/routes/usage.js.map +1 -0
- package/dist/apps/relay/App.d.ts +4 -1
- package/dist/apps/relay/App.d.ts.map +1 -1
- package/dist/apps/relay/App.js +118 -10
- package/dist/apps/relay/App.js.map +1 -1
- package/dist/apps/relay/Sponsorships.d.ts.map +1 -1
- package/dist/apps/relay/Sponsorships.js +2 -1
- package/dist/apps/relay/Sponsorships.js.map +1 -1
- package/dist/cli/Cli.d.ts +8 -1
- package/dist/cli/Cli.d.ts.map +1 -1
- package/dist/cli/Cli.js +11 -3
- package/dist/cli/Cli.js.map +1 -1
- package/dist/cli/commands/admin.d.ts +4 -0
- package/dist/cli/commands/admin.d.ts.map +1 -1
- package/dist/cli/commands/admin.js +80 -1
- package/dist/cli/commands/admin.js.map +1 -1
- package/dist/db/Db.d.ts +7 -0
- package/dist/db/Db.d.ts.map +1 -1
- package/dist/db/Db.js +126 -0
- package/dist/db/Db.js.map +1 -1
- package/dist/db/Schema.d.ts +79 -0
- package/dist/db/Schema.d.ts.map +1 -1
- package/dist/db/Schema.js +88 -2
- package/dist/db/Schema.js.map +1 -1
- package/dist/db/tables/billingSettings.d.ts +55 -0
- package/dist/db/tables/billingSettings.d.ts.map +1 -0
- package/dist/db/tables/billingSettings.js +70 -0
- package/dist/db/tables/billingSettings.js.map +1 -0
- package/dist/db/tables/invitations.js +2 -2
- package/dist/db/tables/invitations.js.map +1 -1
- package/dist/db/tables/organizations.d.ts +6 -2
- package/dist/db/tables/organizations.d.ts.map +1 -1
- package/dist/db/tables/organizations.js +10 -4
- package/dist/db/tables/organizations.js.map +1 -1
- package/dist/db/tables/projects.js +2 -2
- package/dist/db/tables/projects.js.map +1 -1
- package/dist/db/tables/requestUsage.d.ts +121 -0
- package/dist/db/tables/requestUsage.d.ts.map +1 -0
- package/dist/db/tables/requestUsage.js +150 -0
- package/dist/db/tables/requestUsage.js.map +1 -0
- package/dist/db/tables/sponsoredTransactions.d.ts +119 -0
- package/dist/db/tables/sponsoredTransactions.d.ts.map +1 -1
- package/dist/db/tables/sponsoredTransactions.js +155 -2
- package/dist/db/tables/sponsoredTransactions.js.map +1 -1
- package/dist/db/tables/stripeCustomers.d.ts +81 -0
- package/dist/db/tables/stripeCustomers.d.ts.map +1 -0
- package/dist/db/tables/stripeCustomers.js +120 -0
- package/dist/db/tables/stripeCustomers.js.map +1 -0
- package/dist/db/tables/users.js +2 -2
- package/dist/db/tables/users.js.map +1 -1
- package/dist/handlers/internal/sponsorship.d.ts +5 -2
- package/dist/handlers/internal/sponsorship.d.ts.map +1 -1
- package/dist/handlers/internal/sponsorship.js +19 -5
- package/dist/handlers/internal/sponsorship.js.map +1 -1
- package/dist/handlers/internal/utils.d.ts +10 -3
- package/dist/handlers/internal/utils.d.ts.map +1 -1
- package/dist/handlers/internal/utils.js +14 -6
- package/dist/handlers/internal/utils.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/Auth.d.ts +18 -4
- package/dist/internal/Auth.d.ts.map +1 -1
- package/dist/internal/Auth.js +148 -76
- package/dist/internal/Auth.js.map +1 -1
- package/dist/internal/Cache.d.ts.map +1 -1
- package/dist/internal/Cache.js +4 -1
- package/dist/internal/Cache.js.map +1 -1
- package/dist/internal/EdgeCache.d.ts +10 -0
- package/dist/internal/EdgeCache.d.ts.map +1 -1
- package/dist/internal/EdgeCache.js +39 -8
- package/dist/internal/EdgeCache.js.map +1 -1
- package/dist/internal/Fees.d.ts +27 -0
- package/dist/internal/Fees.d.ts.map +1 -0
- package/dist/internal/Fees.js +48 -0
- package/dist/internal/Fees.js.map +1 -0
- package/dist/internal/FundingRoutes.d.ts +183 -0
- package/dist/internal/FundingRoutes.d.ts.map +1 -0
- package/dist/internal/FundingRoutes.js +490 -0
- package/dist/internal/FundingRoutes.js.map +1 -0
- package/dist/internal/Id.d.ts +15 -0
- package/dist/internal/Id.d.ts.map +1 -0
- package/dist/internal/Id.js +22 -0
- package/dist/internal/Id.js.map +1 -0
- package/dist/internal/Log.d.ts +2 -0
- package/dist/internal/Log.d.ts.map +1 -1
- package/dist/internal/Log.js +3 -0
- package/dist/internal/Log.js.map +1 -1
- package/dist/internal/OpenApi.d.ts +10 -1
- package/dist/internal/OpenApi.d.ts.map +1 -1
- package/dist/internal/OpenApi.js +8 -1
- package/dist/internal/OpenApi.js.map +1 -1
- package/dist/internal/RateLimit.d.ts +25 -0
- package/dist/internal/RateLimit.d.ts.map +1 -1
- package/dist/internal/RateLimit.js +51 -0
- package/dist/internal/RateLimit.js.map +1 -1
- package/dist/internal/Response.d.ts +1 -1
- package/dist/internal/Response.d.ts.map +1 -1
- package/dist/internal/Schema.d.ts +8 -0
- package/dist/internal/Schema.d.ts.map +1 -1
- package/dist/internal/Schema.js +7 -0
- package/dist/internal/Schema.js.map +1 -1
- package/dist/internal/Webhooks.d.ts.map +1 -1
- package/dist/internal/Webhooks.js +3 -3
- package/dist/internal/Webhooks.js.map +1 -1
- package/package.json +4 -3
- package/src/ApiKey.ts +9 -2
- package/src/ApiKeys.test.ts +51 -0
- package/src/ApiKeys.ts +50 -1
- package/src/App.test.ts +33 -86718
- package/src/App.ts +18 -0
- package/src/Client.test-d.ts +351 -0
- package/src/Scope.ts +16 -3
- package/src/admin/apps/scopes.test.ts +6 -0
- package/src/admin/apps/scopes.ts +3 -0
- package/src/admin/ui/src/components/Page.tsx +2 -3
- package/src/admin/ui/src/routes/__root.tsx +2 -2
- package/src/admin/ui/src/routes/api-keys.tsx +2 -2
- package/src/admin/ui.generated.ts +13 -13
- package/src/analytics/Analytics.test.ts +527 -0
- package/src/analytics/Analytics.ts +318 -0
- package/src/analytics/tables/requestEvents.ts +523 -0
- package/src/apps/data/App.test.ts +72 -0
- package/src/apps/data/App.ts +35 -0
- package/src/apps/data/routes/funding.test.ts +214 -0
- package/src/apps/data/routes/funding.ts +584 -0
- package/src/apps/data/routes/receipts.ts +2 -9
- package/src/apps/data/routes/rpc.test.ts +78 -2
- package/src/apps/data/routes/rpc.ts +31 -1
- package/src/apps/data/routes/webhooks.test.ts +1 -1
- package/src/apps/data/routes/webhooks.ts +11 -8
- package/src/apps/docs/App.ts +29 -100
- package/src/apps/docs/reference.ts +132 -0
- package/src/apps/index.ts +1 -0
- package/src/apps/mcp.test.ts +206 -0
- package/src/apps/mcp.ts +250 -0
- package/src/apps/platform/App.ts +43 -4
- package/src/apps/platform/Billing.test.ts +530 -0
- package/src/apps/platform/Billing.ts +682 -0
- package/src/apps/platform/index.ts +1 -0
- package/src/apps/platform/routes/api-keys.test.ts +172 -9
- package/src/apps/platform/routes/api-keys.ts +136 -20
- package/src/apps/platform/routes/billing.test.ts +1100 -0
- package/src/apps/platform/routes/billing.ts +966 -0
- package/src/apps/platform/routes/invitations.test.ts +55 -7
- package/src/apps/platform/routes/invitations.ts +68 -0
- package/src/apps/platform/routes/me.test.ts +230 -0
- package/src/apps/platform/routes/orgs.ts +26 -4
- package/src/apps/platform/routes/scopes.test.ts +29 -0
- package/src/apps/platform/routes/scopes.ts +85 -0
- package/src/apps/platform/routes/usage.test.ts +422 -0
- package/src/apps/platform/routes/usage.ts +527 -0
- package/src/apps/relay/App.test.ts +457 -8
- package/src/apps/relay/App.ts +120 -12
- package/src/apps/relay/Sponsorships.test.ts +1 -1
- package/src/apps/relay/Sponsorships.ts +2 -1
- package/src/cli/Cli.test.ts +25 -2
- package/src/cli/Cli.ts +17 -2
- package/src/cli/commands/admin.test.ts +83 -0
- package/src/cli/commands/admin.ts +89 -1
- package/src/db/Db.ts +137 -0
- package/src/db/Schema.ts +104 -2
- package/src/db/tables/billingSettings.test.ts +87 -0
- package/src/db/tables/billingSettings.ts +108 -0
- package/src/db/tables/invitations.ts +2 -2
- package/src/db/tables/organizations.test.ts +1 -1
- package/src/db/tables/organizations.ts +15 -5
- package/src/db/tables/projects.ts +2 -2
- package/src/db/tables/requestUsage.ts +231 -0
- package/src/db/tables/sponsoredTransactions.test.ts +108 -1
- package/src/db/tables/sponsoredTransactions.ts +230 -2
- package/src/db/tables/stripeCustomers.test.ts +109 -0
- package/src/db/tables/stripeCustomers.ts +162 -0
- package/src/db/tables/users.ts +2 -2
- package/src/handlers/internal/sponsorship.ts +34 -7
- package/src/handlers/internal/utils.ts +19 -7
- package/src/index.ts +1 -0
- package/src/internal/Auth.test.ts +175 -25
- package/src/internal/Auth.ts +175 -86
- package/src/internal/Cache.ts +5 -1
- package/src/internal/EdgeCache.test.ts +27 -4
- package/src/internal/EdgeCache.ts +47 -9
- package/src/internal/Fees.test.ts +32 -0
- package/src/internal/Fees.ts +51 -0
- package/src/internal/FundingRoutes.ts +583 -0
- package/src/internal/Id.test.ts +17 -0
- package/src/internal/Id.ts +24 -0
- package/src/internal/Log.test.ts +1 -0
- package/src/internal/Log.ts +5 -0
- package/src/internal/OpenApi.ts +12 -1
- package/src/internal/RateLimit.test.ts +84 -0
- package/src/internal/RateLimit.ts +70 -0
- package/src/internal/Response.ts +1 -1
- package/src/internal/Schema.ts +8 -0
- package/src/internal/Webhooks.test.ts +3 -3
- package/src/internal/Webhooks.ts +3 -3
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import * as z from 'zod/mini';
|
|
3
|
+
import * as Auth from '../../../internal/Auth.js';
|
|
4
|
+
import * as Cache from '../../../internal/Cache.js';
|
|
5
|
+
import * as OpenApi from '../../../internal/OpenApi.js';
|
|
6
|
+
import * as Response from '../../../internal/Response.js';
|
|
7
|
+
import * as Scope from '../../../Scope.js';
|
|
8
|
+
/** Zod schemas owned by the scope-catalog resource. */
|
|
9
|
+
export var schema;
|
|
10
|
+
(function (schema) {
|
|
11
|
+
/** Schemas for the getScopes operation. */
|
|
12
|
+
let getScopes;
|
|
13
|
+
(function (getScopes) {
|
|
14
|
+
/** A single issuable API-key scope. */
|
|
15
|
+
getScopes.Entry = z
|
|
16
|
+
.object({
|
|
17
|
+
description: z
|
|
18
|
+
.string()
|
|
19
|
+
.check(z.describe('Human-readable explanation of what the scope grants.'), z.meta({ examples: ['Read webhook subscriptions.'] })),
|
|
20
|
+
scope: z
|
|
21
|
+
.enum(Scope.catalog.map((entry) => entry.scope))
|
|
22
|
+
.check(z.describe('Scope identifier used in API-key grants and route policies.'), z.meta({ examples: ['data:read'] })),
|
|
23
|
+
selfServe: z
|
|
24
|
+
.boolean()
|
|
25
|
+
.check(z.describe('Whether a session may self-mint this scope (else super-admin-only).'), z.meta({ examples: [true] })),
|
|
26
|
+
})
|
|
27
|
+
.check(z.describe('A single issuable API-key scope.'));
|
|
28
|
+
/** Response body for the scope catalog. */
|
|
29
|
+
getScopes.Response = z
|
|
30
|
+
.object({
|
|
31
|
+
data: z.array(getScopes.Entry).check(z.describe('Issuable API-key scopes.')),
|
|
32
|
+
})
|
|
33
|
+
.check(z.describe('Response body for the scope catalog.'));
|
|
34
|
+
})(getScopes = schema.getScopes || (schema.getScopes = {}));
|
|
35
|
+
})(schema || (schema = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Mounts the `/scopes` resource: the issuable API-key scope vocabulary, served
|
|
38
|
+
* from {@link Scope.catalog}. Public catalog data: anonymous callers are served
|
|
39
|
+
* within the public quota; the session lane lets signed-in consoles skip it.
|
|
40
|
+
*/
|
|
41
|
+
export function scopes() {
|
|
42
|
+
return new Hono().get('/v1/scopes', Auth.policy({ public: true, session: true }), OpenApi.describeRoute({
|
|
43
|
+
description: 'See which scopes can be granted to API keys.',
|
|
44
|
+
operationId: 'getScopes',
|
|
45
|
+
responses: OpenApi.responses({
|
|
46
|
+
success: { description: 'Issuable scope catalog.', schema: schema.getScopes.Response },
|
|
47
|
+
}),
|
|
48
|
+
summary: 'List scopes',
|
|
49
|
+
tags: ['API Keys'],
|
|
50
|
+
}), Cache.response({
|
|
51
|
+
cacheControl: Cache.policies.stable,
|
|
52
|
+
name: 'tempo-api:scopes:v1',
|
|
53
|
+
key: (c) => {
|
|
54
|
+
const url = new URL(c.req.url);
|
|
55
|
+
url.search = '';
|
|
56
|
+
return url.toString();
|
|
57
|
+
},
|
|
58
|
+
}), (c) => {
|
|
59
|
+
if (Auth.narrowAccess)
|
|
60
|
+
return Auth.accessError(c);
|
|
61
|
+
return c.json(Response.validated(schema.getScopes.Response, {
|
|
62
|
+
data: Scope.catalog.map((entry) => ({ ...entry })),
|
|
63
|
+
}), 200);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=scopes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../../../../src/apps/platform/routes/scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAG7B,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAA;AACjD,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAA;AACnD,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAA;AACvD,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAE1C,uDAAuD;AACvD,MAAM,KAAW,MAAM,CAkCtB;AAlCD,WAAiB,MAAM;IACrB,2CAA2C;IAC3C,IAAiB,SAAS,CA+BzB;IA/BD,WAAiB,SAAS;QACxB,uCAAuC;QAC1B,eAAK,GAAG,CAAC;aACnB,MAAM,CAAC;YACN,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,KAAK,CACJ,CAAC,CAAC,QAAQ,CAAC,sDAAsD,CAAC,EAClE,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,6BAA6B,CAAC,EAAE,CAAC,CACtD;YACH,KAAK,EAAE,CAAC;iBACL,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;iBAC/C,KAAK,CACJ,CAAC,CAAC,QAAQ,CAAC,6DAA6D,CAAC,EACzE,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CACpC;YACH,SAAS,EAAE,CAAC;iBACT,OAAO,EAAE;iBACT,KAAK,CACJ,CAAC,CAAC,QAAQ,CAAC,qEAAqE,CAAC,EACjF,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAC7B;SACJ,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC,CAAC,CAAA;QAExD,2CAA2C;QAC9B,kBAAQ,GAAG,CAAC;aACtB,MAAM,CAAC;YACN,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,eAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC;SACnE,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC,CAAC,CAAA;IAC9D,CAAC,EA/BgB,SAAS,GAAT,OAAA,SAAS,KAAT,OAAA,SAAS,QA+BzB;AACH,CAAC,EAlCgB,MAAM,KAAN,MAAM,QAkCtB;AAED;;;;GAIG;AACH,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,IAAI,EAAmB,CAAC,GAAG,CACpC,YAAY,EACZ,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAC5C,OAAO,CAAC,aAAa,CAAC;QACpB,WAAW,EAAE,8CAA8C;QAC3D,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC;YAC3B,OAAO,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;SACvF,CAAC;QACF,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,CAAC,UAAU,CAAC;KACnB,CAAC,EACF,KAAK,CAAC,QAAQ,CAAkB;QAC9B,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM;QACnC,IAAI,EAAE,qBAAqB;QAC3B,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE;YACT,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAC9B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAA;YACf,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAA;QACvB,CAAC;KACF,CAAC,EACF,CAAC,CAAC,EAAE,EAAE;QACJ,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;QACjD,OAAO,CAAC,CAAC,IAAI,CACX,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC5C,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;SACnD,CAAC,EACF,GAAG,CACJ,CAAA;IACH,CAAC,CACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import * as Response from '../../../internal/Response.js';
|
|
3
|
+
import type { Environment } from '../App.js';
|
|
4
|
+
/** Zod schemas owned by the usage resource. */
|
|
5
|
+
export declare namespace schema {
|
|
6
|
+
/** Schemas for the getRequestUsage operation. */
|
|
7
|
+
namespace getRequestUsage {
|
|
8
|
+
/** Usage grouped by API key. */
|
|
9
|
+
const KeyBreakdown: z.ZodMiniObject<{
|
|
10
|
+
apiKeyId: z.ZodMiniString<string>;
|
|
11
|
+
averageDurationMs: z.ZodMiniNumber<number>;
|
|
12
|
+
errors: z.ZodMiniNumber<number>;
|
|
13
|
+
requests: z.ZodMiniNumber<number>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** Path parameters addressing one organization's usage. */
|
|
16
|
+
const Params: z.ZodMiniObject<{
|
|
17
|
+
orgId: z.ZodMiniString<string>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
/** Query parameters for request usage. */
|
|
20
|
+
const Query: z.ZodMiniObject<{
|
|
21
|
+
environment: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
22
|
+
production: "production";
|
|
23
|
+
sandbox: "sandbox";
|
|
24
|
+
}>>;
|
|
25
|
+
from: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
26
|
+
interval: z.ZodMiniDefault<z.ZodMiniEnum<{
|
|
27
|
+
day: "day";
|
|
28
|
+
hour: "hour";
|
|
29
|
+
}>>;
|
|
30
|
+
projectId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
31
|
+
to: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
/** Usage grouped by route. */
|
|
34
|
+
const RouteBreakdown: z.ZodMiniObject<{
|
|
35
|
+
averageDurationMs: z.ZodMiniNumber<number>;
|
|
36
|
+
errors: z.ZodMiniNumber<number>;
|
|
37
|
+
requests: z.ZodMiniNumber<number>;
|
|
38
|
+
route: z.ZodMiniString<string>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
/** One usage series point. */
|
|
41
|
+
const SeriesPoint: z.ZodMiniObject<{
|
|
42
|
+
errors: z.ZodMiniNumber<number>;
|
|
43
|
+
requests: z.ZodMiniNumber<number>;
|
|
44
|
+
time: z.ZodMiniString<string>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
/** Usage grouped by status code. */
|
|
47
|
+
const StatusBreakdown: z.ZodMiniObject<{
|
|
48
|
+
requests: z.ZodMiniNumber<number>;
|
|
49
|
+
status: z.ZodMiniNumber<number>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
/** Overall usage totals. */
|
|
52
|
+
const Totals: z.ZodMiniObject<{
|
|
53
|
+
averageDurationMs: z.ZodMiniNumber<number>;
|
|
54
|
+
errors: z.ZodMiniNumber<number>;
|
|
55
|
+
requests: z.ZodMiniNumber<number>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
/** Request usage. */
|
|
58
|
+
const Response: z.ZodMiniObject<{
|
|
59
|
+
byKey: z.ZodMiniArray<z.ZodMiniObject<{
|
|
60
|
+
apiKeyId: z.ZodMiniString<string>;
|
|
61
|
+
averageDurationMs: z.ZodMiniNumber<number>;
|
|
62
|
+
errors: z.ZodMiniNumber<number>;
|
|
63
|
+
requests: z.ZodMiniNumber<number>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
byRoute: z.ZodMiniArray<z.ZodMiniObject<{
|
|
66
|
+
averageDurationMs: z.ZodMiniNumber<number>;
|
|
67
|
+
errors: z.ZodMiniNumber<number>;
|
|
68
|
+
requests: z.ZodMiniNumber<number>;
|
|
69
|
+
route: z.ZodMiniString<string>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
byStatus: z.ZodMiniArray<z.ZodMiniObject<{
|
|
72
|
+
requests: z.ZodMiniNumber<number>;
|
|
73
|
+
status: z.ZodMiniNumber<number>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
from: z.ZodMiniString<string>;
|
|
76
|
+
interval: z.ZodMiniEnum<{
|
|
77
|
+
day: "day";
|
|
78
|
+
hour: "hour";
|
|
79
|
+
}>;
|
|
80
|
+
series: z.ZodMiniArray<z.ZodMiniObject<{
|
|
81
|
+
errors: z.ZodMiniNumber<number>;
|
|
82
|
+
requests: z.ZodMiniNumber<number>;
|
|
83
|
+
time: z.ZodMiniString<string>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
to: z.ZodMiniString<string>;
|
|
86
|
+
totals: z.ZodMiniObject<{
|
|
87
|
+
averageDurationMs: z.ZodMiniNumber<number>;
|
|
88
|
+
errors: z.ZodMiniNumber<number>;
|
|
89
|
+
requests: z.ZodMiniNumber<number>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
}
|
|
93
|
+
/** Schemas for the getSponsorshipUsage operation. */
|
|
94
|
+
namespace getSponsorshipUsage {
|
|
95
|
+
/** One time bucket of sponsorship usage. */
|
|
96
|
+
const Bucket: z.ZodMiniObject<{
|
|
97
|
+
count: z.ZodMiniNumber<number>;
|
|
98
|
+
feeTotal: z.ZodMiniObject<{
|
|
99
|
+
amount: z.ZodMiniString<string>;
|
|
100
|
+
currency: z.ZodMiniEnum<{
|
|
101
|
+
usd: "usd";
|
|
102
|
+
}>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
timestamp: z.ZodMiniString<string>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
/** Path parameters addressing one organization's usage. */
|
|
107
|
+
const Params: z.ZodMiniObject<{
|
|
108
|
+
orgId: z.ZodMiniString<string>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
/** Query parameters scoping the sponsorship usage series. */
|
|
111
|
+
const Query: z.ZodMiniObject<{
|
|
112
|
+
environment: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
113
|
+
production: "production";
|
|
114
|
+
sandbox: "sandbox";
|
|
115
|
+
}>>;
|
|
116
|
+
from: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
117
|
+
interval: z.ZodMiniDefault<z.ZodMiniEnum<{
|
|
118
|
+
day: "day";
|
|
119
|
+
hour: "hour";
|
|
120
|
+
month: "month";
|
|
121
|
+
week: "week";
|
|
122
|
+
}>>;
|
|
123
|
+
projectId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
124
|
+
to: z.ZodMiniOptional<z.ZodMiniISODateTime>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
/** Sponsorship usage bucketed over time. */
|
|
127
|
+
const Response: z.ZodMiniObject<{
|
|
128
|
+
data: z.ZodMiniArray<z.ZodMiniObject<{
|
|
129
|
+
count: z.ZodMiniNumber<number>;
|
|
130
|
+
feeTotal: z.ZodMiniObject<{
|
|
131
|
+
amount: z.ZodMiniString<string>;
|
|
132
|
+
currency: z.ZodMiniEnum<{
|
|
133
|
+
usd: "usd";
|
|
134
|
+
}>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
timestamp: z.ZodMiniString<string>;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Mounts the usage surface: project request usage (read from a host-supplied
|
|
143
|
+
* analytics capability) and an organization's sponsorship volume and fees
|
|
144
|
+
* over time. Session lane; reads for members.
|
|
145
|
+
*/
|
|
146
|
+
export declare function usage(): import("hono/hono-base").HonoBase<Environment, {
|
|
147
|
+
"/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/usage/requests": {
|
|
148
|
+
$get: {
|
|
149
|
+
output: {
|
|
150
|
+
error: {
|
|
151
|
+
code: "api_key_malformed";
|
|
152
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
153
|
+
message: string;
|
|
154
|
+
};
|
|
155
|
+
requestId: string;
|
|
156
|
+
};
|
|
157
|
+
outputFormat: "json";
|
|
158
|
+
status: 400;
|
|
159
|
+
input: {
|
|
160
|
+
param: {
|
|
161
|
+
orgId: string;
|
|
162
|
+
};
|
|
163
|
+
} & {
|
|
164
|
+
query?: {
|
|
165
|
+
environment?: string | string[];
|
|
166
|
+
from?: string | string[];
|
|
167
|
+
interval?: string | string[];
|
|
168
|
+
projectId?: string | string[];
|
|
169
|
+
to?: string | string[];
|
|
170
|
+
} | undefined;
|
|
171
|
+
};
|
|
172
|
+
} | {
|
|
173
|
+
output: {
|
|
174
|
+
error: {
|
|
175
|
+
code: "api_key_invalid" | "api_key_missing";
|
|
176
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
177
|
+
message: string;
|
|
178
|
+
};
|
|
179
|
+
requestId: string;
|
|
180
|
+
};
|
|
181
|
+
outputFormat: "json";
|
|
182
|
+
status: 401;
|
|
183
|
+
input: {
|
|
184
|
+
param: {
|
|
185
|
+
orgId: string;
|
|
186
|
+
};
|
|
187
|
+
} & {
|
|
188
|
+
query?: {
|
|
189
|
+
environment?: string | string[];
|
|
190
|
+
from?: string | string[];
|
|
191
|
+
interval?: string | string[];
|
|
192
|
+
projectId?: string | string[];
|
|
193
|
+
to?: string | string[];
|
|
194
|
+
} | undefined;
|
|
195
|
+
};
|
|
196
|
+
} | {
|
|
197
|
+
output: {
|
|
198
|
+
error: {
|
|
199
|
+
code: "query_invalid";
|
|
200
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
201
|
+
message: string;
|
|
202
|
+
};
|
|
203
|
+
requestId: string;
|
|
204
|
+
};
|
|
205
|
+
outputFormat: "json";
|
|
206
|
+
status: 400;
|
|
207
|
+
input: {
|
|
208
|
+
param: {
|
|
209
|
+
orgId: string;
|
|
210
|
+
};
|
|
211
|
+
} & {
|
|
212
|
+
query?: {
|
|
213
|
+
environment?: string | string[];
|
|
214
|
+
from?: string | string[];
|
|
215
|
+
interval?: string | string[];
|
|
216
|
+
projectId?: string | string[];
|
|
217
|
+
to?: string | string[];
|
|
218
|
+
} | undefined;
|
|
219
|
+
};
|
|
220
|
+
} | {
|
|
221
|
+
output: {
|
|
222
|
+
error: {
|
|
223
|
+
code: "upstream_error";
|
|
224
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
225
|
+
message: string;
|
|
226
|
+
};
|
|
227
|
+
requestId: string;
|
|
228
|
+
};
|
|
229
|
+
outputFormat: "json";
|
|
230
|
+
status: 502;
|
|
231
|
+
input: {
|
|
232
|
+
param: {
|
|
233
|
+
orgId: string;
|
|
234
|
+
};
|
|
235
|
+
} & {
|
|
236
|
+
query?: {
|
|
237
|
+
environment?: string | string[];
|
|
238
|
+
from?: string | string[];
|
|
239
|
+
interval?: string | string[];
|
|
240
|
+
projectId?: string | string[];
|
|
241
|
+
to?: string | string[];
|
|
242
|
+
} | undefined;
|
|
243
|
+
};
|
|
244
|
+
} | {
|
|
245
|
+
output: {
|
|
246
|
+
error: {
|
|
247
|
+
code: "param_invalid";
|
|
248
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
249
|
+
message: string;
|
|
250
|
+
};
|
|
251
|
+
requestId: string;
|
|
252
|
+
};
|
|
253
|
+
outputFormat: "json";
|
|
254
|
+
status: 400;
|
|
255
|
+
input: {
|
|
256
|
+
param: {
|
|
257
|
+
orgId: string;
|
|
258
|
+
};
|
|
259
|
+
} & {
|
|
260
|
+
query?: {
|
|
261
|
+
environment?: string | string[];
|
|
262
|
+
from?: string | string[];
|
|
263
|
+
interval?: string | string[];
|
|
264
|
+
projectId?: string | string[];
|
|
265
|
+
to?: string | string[];
|
|
266
|
+
} | undefined;
|
|
267
|
+
};
|
|
268
|
+
} | {
|
|
269
|
+
output: {
|
|
270
|
+
error: {
|
|
271
|
+
code: "forbidden";
|
|
272
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
273
|
+
message: string;
|
|
274
|
+
};
|
|
275
|
+
requestId: string;
|
|
276
|
+
};
|
|
277
|
+
outputFormat: "json";
|
|
278
|
+
status: 403;
|
|
279
|
+
input: {
|
|
280
|
+
param: {
|
|
281
|
+
orgId: string;
|
|
282
|
+
};
|
|
283
|
+
} & {
|
|
284
|
+
query?: {
|
|
285
|
+
environment?: string | string[];
|
|
286
|
+
from?: string | string[];
|
|
287
|
+
interval?: string | string[];
|
|
288
|
+
projectId?: string | string[];
|
|
289
|
+
to?: string | string[];
|
|
290
|
+
} | undefined;
|
|
291
|
+
};
|
|
292
|
+
} | {
|
|
293
|
+
output: {
|
|
294
|
+
error: {
|
|
295
|
+
code: "organization_not_found";
|
|
296
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
297
|
+
message: string;
|
|
298
|
+
};
|
|
299
|
+
requestId: string;
|
|
300
|
+
};
|
|
301
|
+
outputFormat: "json";
|
|
302
|
+
status: 404;
|
|
303
|
+
input: {
|
|
304
|
+
param: {
|
|
305
|
+
orgId: string;
|
|
306
|
+
};
|
|
307
|
+
} & {
|
|
308
|
+
query?: {
|
|
309
|
+
environment?: string | string[];
|
|
310
|
+
from?: string | string[];
|
|
311
|
+
interval?: string | string[];
|
|
312
|
+
projectId?: string | string[];
|
|
313
|
+
to?: string | string[];
|
|
314
|
+
} | undefined;
|
|
315
|
+
};
|
|
316
|
+
} | {
|
|
317
|
+
output: {
|
|
318
|
+
error: {
|
|
319
|
+
code: "analytics_unconfigured";
|
|
320
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
321
|
+
message: string;
|
|
322
|
+
};
|
|
323
|
+
requestId: string;
|
|
324
|
+
};
|
|
325
|
+
outputFormat: "json";
|
|
326
|
+
status: 501;
|
|
327
|
+
input: {
|
|
328
|
+
param: {
|
|
329
|
+
orgId: string;
|
|
330
|
+
};
|
|
331
|
+
} & {
|
|
332
|
+
query?: {
|
|
333
|
+
environment?: string | string[];
|
|
334
|
+
from?: string | string[];
|
|
335
|
+
interval?: string | string[];
|
|
336
|
+
projectId?: string | string[];
|
|
337
|
+
to?: string | string[];
|
|
338
|
+
} | undefined;
|
|
339
|
+
};
|
|
340
|
+
} | {
|
|
341
|
+
output: {
|
|
342
|
+
byKey: {
|
|
343
|
+
apiKeyId: string;
|
|
344
|
+
averageDurationMs: number;
|
|
345
|
+
errors: number;
|
|
346
|
+
requests: number;
|
|
347
|
+
}[];
|
|
348
|
+
byRoute: {
|
|
349
|
+
averageDurationMs: number;
|
|
350
|
+
errors: number;
|
|
351
|
+
requests: number;
|
|
352
|
+
route: string;
|
|
353
|
+
}[];
|
|
354
|
+
byStatus: {
|
|
355
|
+
requests: number;
|
|
356
|
+
status: number;
|
|
357
|
+
}[];
|
|
358
|
+
from: string;
|
|
359
|
+
interval: "day" | "hour";
|
|
360
|
+
series: {
|
|
361
|
+
errors: number;
|
|
362
|
+
requests: number;
|
|
363
|
+
time: string;
|
|
364
|
+
}[];
|
|
365
|
+
to: string;
|
|
366
|
+
totals: {
|
|
367
|
+
averageDurationMs: number;
|
|
368
|
+
errors: number;
|
|
369
|
+
requests: number;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
outputFormat: "json";
|
|
373
|
+
status: 200;
|
|
374
|
+
input: {
|
|
375
|
+
param: {
|
|
376
|
+
orgId: string;
|
|
377
|
+
};
|
|
378
|
+
} & {
|
|
379
|
+
query?: {
|
|
380
|
+
environment?: string | string[];
|
|
381
|
+
from?: string | string[];
|
|
382
|
+
interval?: string | string[];
|
|
383
|
+
projectId?: string | string[];
|
|
384
|
+
to?: string | string[];
|
|
385
|
+
} | undefined;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
} & {
|
|
390
|
+
"/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/usage/sponsorships": {
|
|
391
|
+
$get: {
|
|
392
|
+
output: {
|
|
393
|
+
error: {
|
|
394
|
+
code: "api_key_malformed";
|
|
395
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
396
|
+
message: string;
|
|
397
|
+
};
|
|
398
|
+
requestId: string;
|
|
399
|
+
};
|
|
400
|
+
outputFormat: "json";
|
|
401
|
+
status: 400;
|
|
402
|
+
input: {
|
|
403
|
+
param: {
|
|
404
|
+
orgId: string;
|
|
405
|
+
};
|
|
406
|
+
} & {
|
|
407
|
+
query?: {
|
|
408
|
+
environment?: string | string[];
|
|
409
|
+
from?: string | string[];
|
|
410
|
+
interval?: string | string[];
|
|
411
|
+
projectId?: string | string[];
|
|
412
|
+
to?: string | string[];
|
|
413
|
+
} | undefined;
|
|
414
|
+
};
|
|
415
|
+
} | {
|
|
416
|
+
output: {
|
|
417
|
+
error: {
|
|
418
|
+
code: "api_key_invalid" | "api_key_missing";
|
|
419
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
420
|
+
message: string;
|
|
421
|
+
};
|
|
422
|
+
requestId: string;
|
|
423
|
+
};
|
|
424
|
+
outputFormat: "json";
|
|
425
|
+
status: 401;
|
|
426
|
+
input: {
|
|
427
|
+
param: {
|
|
428
|
+
orgId: string;
|
|
429
|
+
};
|
|
430
|
+
} & {
|
|
431
|
+
query?: {
|
|
432
|
+
environment?: string | string[];
|
|
433
|
+
from?: string | string[];
|
|
434
|
+
interval?: string | string[];
|
|
435
|
+
projectId?: string | string[];
|
|
436
|
+
to?: string | string[];
|
|
437
|
+
} | undefined;
|
|
438
|
+
};
|
|
439
|
+
} | {
|
|
440
|
+
output: {
|
|
441
|
+
error: {
|
|
442
|
+
code: "query_invalid";
|
|
443
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
444
|
+
message: string;
|
|
445
|
+
};
|
|
446
|
+
requestId: string;
|
|
447
|
+
};
|
|
448
|
+
outputFormat: "json";
|
|
449
|
+
status: 400;
|
|
450
|
+
input: {
|
|
451
|
+
param: {
|
|
452
|
+
orgId: string;
|
|
453
|
+
};
|
|
454
|
+
} & {
|
|
455
|
+
query?: {
|
|
456
|
+
environment?: string | string[];
|
|
457
|
+
from?: string | string[];
|
|
458
|
+
interval?: string | string[];
|
|
459
|
+
projectId?: string | string[];
|
|
460
|
+
to?: string | string[];
|
|
461
|
+
} | undefined;
|
|
462
|
+
};
|
|
463
|
+
} | {
|
|
464
|
+
output: {
|
|
465
|
+
error: {
|
|
466
|
+
code: "upstream_error";
|
|
467
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
468
|
+
message: string;
|
|
469
|
+
};
|
|
470
|
+
requestId: string;
|
|
471
|
+
};
|
|
472
|
+
outputFormat: "json";
|
|
473
|
+
status: 502;
|
|
474
|
+
input: {
|
|
475
|
+
param: {
|
|
476
|
+
orgId: string;
|
|
477
|
+
};
|
|
478
|
+
} & {
|
|
479
|
+
query?: {
|
|
480
|
+
environment?: string | string[];
|
|
481
|
+
from?: string | string[];
|
|
482
|
+
interval?: string | string[];
|
|
483
|
+
projectId?: string | string[];
|
|
484
|
+
to?: string | string[];
|
|
485
|
+
} | undefined;
|
|
486
|
+
};
|
|
487
|
+
} | {
|
|
488
|
+
output: {
|
|
489
|
+
error: {
|
|
490
|
+
code: "param_invalid";
|
|
491
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
492
|
+
message: string;
|
|
493
|
+
};
|
|
494
|
+
requestId: string;
|
|
495
|
+
};
|
|
496
|
+
outputFormat: "json";
|
|
497
|
+
status: 400;
|
|
498
|
+
input: {
|
|
499
|
+
param: {
|
|
500
|
+
orgId: string;
|
|
501
|
+
};
|
|
502
|
+
} & {
|
|
503
|
+
query?: {
|
|
504
|
+
environment?: string | string[];
|
|
505
|
+
from?: string | string[];
|
|
506
|
+
interval?: string | string[];
|
|
507
|
+
projectId?: string | string[];
|
|
508
|
+
to?: string | string[];
|
|
509
|
+
} | undefined;
|
|
510
|
+
};
|
|
511
|
+
} | {
|
|
512
|
+
output: {
|
|
513
|
+
error: {
|
|
514
|
+
code: "forbidden";
|
|
515
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
516
|
+
message: string;
|
|
517
|
+
};
|
|
518
|
+
requestId: string;
|
|
519
|
+
};
|
|
520
|
+
outputFormat: "json";
|
|
521
|
+
status: 403;
|
|
522
|
+
input: {
|
|
523
|
+
param: {
|
|
524
|
+
orgId: string;
|
|
525
|
+
};
|
|
526
|
+
} & {
|
|
527
|
+
query?: {
|
|
528
|
+
environment?: string | string[];
|
|
529
|
+
from?: string | string[];
|
|
530
|
+
interval?: string | string[];
|
|
531
|
+
projectId?: string | string[];
|
|
532
|
+
to?: string | string[];
|
|
533
|
+
} | undefined;
|
|
534
|
+
};
|
|
535
|
+
} | {
|
|
536
|
+
output: {
|
|
537
|
+
error: {
|
|
538
|
+
code: "organization_not_found";
|
|
539
|
+
details?: readonly Response.error.Detail[] | undefined;
|
|
540
|
+
message: string;
|
|
541
|
+
};
|
|
542
|
+
requestId: string;
|
|
543
|
+
};
|
|
544
|
+
outputFormat: "json";
|
|
545
|
+
status: 404;
|
|
546
|
+
input: {
|
|
547
|
+
param: {
|
|
548
|
+
orgId: string;
|
|
549
|
+
};
|
|
550
|
+
} & {
|
|
551
|
+
query?: {
|
|
552
|
+
environment?: string | string[];
|
|
553
|
+
from?: string | string[];
|
|
554
|
+
interval?: string | string[];
|
|
555
|
+
projectId?: string | string[];
|
|
556
|
+
to?: string | string[];
|
|
557
|
+
} | undefined;
|
|
558
|
+
};
|
|
559
|
+
} | {
|
|
560
|
+
output: {
|
|
561
|
+
data: {
|
|
562
|
+
count: number;
|
|
563
|
+
feeTotal: {
|
|
564
|
+
amount: string;
|
|
565
|
+
currency: "usd";
|
|
566
|
+
};
|
|
567
|
+
timestamp: string;
|
|
568
|
+
}[];
|
|
569
|
+
};
|
|
570
|
+
outputFormat: "json";
|
|
571
|
+
status: 200;
|
|
572
|
+
input: {
|
|
573
|
+
param: {
|
|
574
|
+
orgId: string;
|
|
575
|
+
};
|
|
576
|
+
} & {
|
|
577
|
+
query?: {
|
|
578
|
+
environment?: string | string[];
|
|
579
|
+
from?: string | string[];
|
|
580
|
+
interval?: string | string[];
|
|
581
|
+
projectId?: string | string[];
|
|
582
|
+
to?: string | string[];
|
|
583
|
+
} | undefined;
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
}, "/", "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/usage/sponsorships">;
|
|
588
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../../src/apps/platform/routes/usage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAS7B,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AAIzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,+CAA+C;AAC/C,yBAAiB,MAAM,CAAC;IACtB,iDAAiD;IACjD,UAAiB,eAAe,CAAC;QAC/B,gCAAgC;QACzB,MAAM,YAAY;;;;;yBAqBwB,CAAA;QAEjD,2DAA2D;QACpD,MAAM,MAAM;;yBASiD,CAAA;QAEpE,0CAA0C;QACnC,MAAM,KAAK;;;;;;;;;;;;0BA4ByC,CAAA;QAE3D,8BAA8B;QACvB,MAAM,cAAc;;;;;yBAqBoB,CAAA;QAE/C,8BAA8B;QACvB,MAAM,WAAW;;;;yBAeuB,CAAA;QAE/C,oCAAoC;QAC7B,MAAM,eAAe;;;yBASyB,CAAA;QAErD,4BAA4B;QACrB,MAAM,MAAM;;;;yBAe0B,CAAA;QAE7C,qBAAqB;QACd,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA2BpB,CAAA;KACF;IAED,qDAAqD;IACrD,UAAiB,mBAAmB,CAAC;QACnC,4CAA4C;QACrC,MAAM,MAAM;;;;;;;;;yBA8BlB,CAAA;QAED,2DAA2D;QACpD,MAAM,MAAM;;yBASkD,CAAA;QAErE,6DAA6D;QACtD,MAAM,KAAK;;;;;;;;;;;;;;0BAiC4D,CAAA;QAE9E,4CAA4C;QACrC,MAAM,QAAQ;;;;;;;;;;;yBASpB,CAAA;KACF;CACF;AAED;;;;GAIG;AACH,wBAAgB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kEA2LpB"}
|