@metronome/sdk 0.1.0-alpha.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 +24 -0
- package/LICENSE +201 -0
- package/README.md +313 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +90 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +237 -0
- package/core.d.ts.map +1 -0
- package/core.js +868 -0
- package/core.js.map +1 -0
- package/core.mjs +837 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +53 -0
- package/error.d.ts.map +1 -0
- package/error.js +143 -0
- package/error.js.map +1 -0
- package/error.mjs +127 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +210 -0
- package/index.d.ts +210 -0
- package/index.d.ts.map +1 -0
- package/index.js +133 -0
- package/index.js.map +1 -0
- package/index.mjs +105 -0
- package/index.mjs.map +1 -0
- package/package.json +106 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/alerts.d.ts +103 -0
- package/resources/alerts.d.ts.map +1 -0
- package/resources/alerts.js +23 -0
- package/resources/alerts.js.map +1 -0
- package/resources/alerts.mjs +19 -0
- package/resources/alerts.mjs.map +1 -0
- package/resources/audit-logs.d.ts +83 -0
- package/resources/audit-logs.d.ts.map +1 -0
- package/resources/audit-logs.js +18 -0
- package/resources/audit-logs.js.map +1 -0
- package/resources/audit-logs.mjs +14 -0
- package/resources/audit-logs.mjs.map +1 -0
- package/resources/billable-metrics.d.ts +236 -0
- package/resources/billable-metrics.d.ts.map +1 -0
- package/resources/billable-metrics.js +36 -0
- package/resources/billable-metrics.js.map +1 -0
- package/resources/billable-metrics.mjs +32 -0
- package/resources/billable-metrics.mjs.map +1 -0
- package/resources/credit-grants.d.ts +469 -0
- package/resources/credit-grants.d.ts.map +1 -0
- package/resources/credit-grants.js +50 -0
- package/resources/credit-grants.js.map +1 -0
- package/resources/credit-grants.mjs +46 -0
- package/resources/credit-grants.mjs.map +1 -0
- package/resources/custom-fields.d.ts +82 -0
- package/resources/custom-fields.d.ts.map +1 -0
- package/resources/custom-fields.js +66 -0
- package/resources/custom-fields.js.map +1 -0
- package/resources/custom-fields.mjs +62 -0
- package/resources/custom-fields.mjs.map +1 -0
- package/resources/customers/alerts.d.ts +146 -0
- package/resources/customers/alerts.d.ts.map +1 -0
- package/resources/customers/alerts.js +35 -0
- package/resources/customers/alerts.js.map +1 -0
- package/resources/customers/alerts.mjs +31 -0
- package/resources/customers/alerts.mjs.map +1 -0
- package/resources/customers/billing-config.d.ts +64 -0
- package/resources/customers/billing-config.d.ts.map +1 -0
- package/resources/customers/billing-config.js +37 -0
- package/resources/customers/billing-config.js.map +1 -0
- package/resources/customers/billing-config.mjs +33 -0
- package/resources/customers/billing-config.mjs.map +1 -0
- package/resources/customers/customers.d.ts +313 -0
- package/resources/customers/customers.d.ts.map +1 -0
- package/resources/customers/customers.js +116 -0
- package/resources/customers/customers.js.map +1 -0
- package/resources/customers/customers.mjs +89 -0
- package/resources/customers/customers.mjs.map +1 -0
- package/resources/customers/index.d.ts +6 -0
- package/resources/customers/index.d.ts.map +1 -0
- package/resources/customers/index.js +15 -0
- package/resources/customers/index.js.map +1 -0
- package/resources/customers/index.mjs +7 -0
- package/resources/customers/index.mjs.map +1 -0
- package/resources/customers/invoices.d.ts +331 -0
- package/resources/customers/invoices.d.ts.map +1 -0
- package/resources/customers/invoices.js +30 -0
- package/resources/customers/invoices.js.map +1 -0
- package/resources/customers/invoices.mjs +26 -0
- package/resources/customers/invoices.mjs.map +1 -0
- package/resources/customers/plans.d.ts +239 -0
- package/resources/customers/plans.d.ts.map +1 -0
- package/resources/customers/plans.js +41 -0
- package/resources/customers/plans.js.map +1 -0
- package/resources/customers/plans.mjs +37 -0
- package/resources/customers/plans.mjs.map +1 -0
- package/resources/dashboards.d.ts +61 -0
- package/resources/dashboards.d.ts.map +1 -0
- package/resources/dashboards.js +19 -0
- package/resources/dashboards.js.map +1 -0
- package/resources/dashboards.mjs +15 -0
- package/resources/dashboards.mjs.map +1 -0
- package/resources/index.d.ts +13 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +42 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +14 -0
- package/resources/index.mjs.map +1 -0
- package/resources/plans.d.ts +217 -0
- package/resources/plans.d.ts.map +1 -0
- package/resources/plans.js +36 -0
- package/resources/plans.js.map +1 -0
- package/resources/plans.mjs +32 -0
- package/resources/plans.mjs.map +1 -0
- package/resources/services.d.ts +26 -0
- package/resources/services.d.ts.map +1 -0
- package/resources/services.js +20 -0
- package/resources/services.js.map +1 -0
- package/resources/services.mjs +16 -0
- package/resources/services.mjs.map +1 -0
- package/resources/shared.d.ts +540 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/usage.d.ts +182 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +41 -0
- package/resources/usage.js.map +1 -0
- package/resources/usage.mjs +37 -0
- package/resources/usage.mjs.map +1 -0
- package/resources/webhooks.d.ts +22 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +91 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +87 -0
- package/resources/webhooks.mjs.map +1 -0
- package/shims/node.d.ts +29 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +83 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1146 -0
- package/src/error.ts +146 -0
- package/src/index.ts +303 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +11 -0
- package/src/resources/alerts.ts +144 -0
- package/src/resources/audit-logs.ts +116 -0
- package/src/resources/billable-metrics.ts +341 -0
- package/src/resources/credit-grants.ts +627 -0
- package/src/resources/custom-fields.ts +242 -0
- package/src/resources/customers/alerts.ts +214 -0
- package/src/resources/customers/billing-config.ts +183 -0
- package/src/resources/customers/customers.ts +500 -0
- package/src/resources/customers/index.ts +53 -0
- package/src/resources/customers/invoices.ts +533 -0
- package/src/resources/customers/plans.ts +363 -0
- package/src/resources/dashboards.ts +98 -0
- package/src/resources/index.ts +90 -0
- package/src/resources/plans.ts +333 -0
- package/src/resources/services.ts +35 -0
- package/src/resources/shared.ts +849 -0
- package/src/resources/usage.ts +245 -0
- package/src/resources/webhooks.ts +120 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +248 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +165 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +152 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import * as Core from "./core.js";
|
|
2
|
+
import * as Errors from "./error.js";
|
|
3
|
+
import { type Agent } from "./_shims/index.js";
|
|
4
|
+
import * as Uploads from "./uploads.js";
|
|
5
|
+
import * as API from '@metronome/sdk/resources/index';
|
|
6
|
+
export interface ClientOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Defaults to process.env['METRONOME_BEARER_TOKEN'].
|
|
9
|
+
*/
|
|
10
|
+
bearerToken?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Defaults to process.env['METRONOME_WEBHOOK_SECRET'].
|
|
13
|
+
*/
|
|
14
|
+
webhookSecret?: string | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
17
|
+
*
|
|
18
|
+
* Defaults to process.env['METRONOME_BASE_URL'].
|
|
19
|
+
*/
|
|
20
|
+
baseURL?: string | null | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
23
|
+
* from the server before timing out a single request.
|
|
24
|
+
*
|
|
25
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
26
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
27
|
+
*/
|
|
28
|
+
timeout?: number;
|
|
29
|
+
/**
|
|
30
|
+
* An HTTP agent used to manage HTTP(S) connections.
|
|
31
|
+
*
|
|
32
|
+
* If not provided, an agent will be constructed by default in the Node.js environment,
|
|
33
|
+
* otherwise no agent is used.
|
|
34
|
+
*/
|
|
35
|
+
httpAgent?: Agent;
|
|
36
|
+
/**
|
|
37
|
+
* Specify a custom `fetch` function implementation.
|
|
38
|
+
*
|
|
39
|
+
* If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
|
|
40
|
+
* defined globally.
|
|
41
|
+
*/
|
|
42
|
+
fetch?: Core.Fetch | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
45
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
46
|
+
*
|
|
47
|
+
* @default 2
|
|
48
|
+
*/
|
|
49
|
+
maxRetries?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Default headers to include with every request to the API.
|
|
52
|
+
*
|
|
53
|
+
* These can be removed in individual requests by explicitly setting the
|
|
54
|
+
* header to `undefined` or `null` in request options.
|
|
55
|
+
*/
|
|
56
|
+
defaultHeaders?: Core.Headers;
|
|
57
|
+
/**
|
|
58
|
+
* Default query parameters to include with every request to the API.
|
|
59
|
+
*
|
|
60
|
+
* These can be removed in individual requests by explicitly setting the
|
|
61
|
+
* param to `undefined` in request options.
|
|
62
|
+
*/
|
|
63
|
+
defaultQuery?: Core.DefaultQuery;
|
|
64
|
+
}
|
|
65
|
+
/** API Client for interfacing with the Metronome API. */
|
|
66
|
+
export declare class Metronome extends Core.APIClient {
|
|
67
|
+
bearerToken: string;
|
|
68
|
+
webhookSecret: string | null;
|
|
69
|
+
private _options;
|
|
70
|
+
/**
|
|
71
|
+
* API Client for interfacing with the Metronome API.
|
|
72
|
+
*
|
|
73
|
+
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
74
|
+
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
75
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com/v1] - Override the default base URL for the API.
|
|
76
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
77
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
78
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
79
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
80
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
81
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
82
|
+
*/
|
|
83
|
+
constructor({ baseURL, bearerToken, webhookSecret, ...opts }?: ClientOptions);
|
|
84
|
+
alerts: API.Alerts;
|
|
85
|
+
plans: API.Plans;
|
|
86
|
+
creditGrants: API.CreditGrants;
|
|
87
|
+
customers: API.Customers;
|
|
88
|
+
dashboards: API.Dashboards;
|
|
89
|
+
webhooks: API.Webhooks;
|
|
90
|
+
usage: API.Usage;
|
|
91
|
+
auditLogs: API.AuditLogs;
|
|
92
|
+
customFields: API.CustomFields;
|
|
93
|
+
billableMetrics: API.BillableMetrics;
|
|
94
|
+
services: API.Services;
|
|
95
|
+
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
96
|
+
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
97
|
+
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
98
|
+
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
99
|
+
static Metronome: typeof Metronome;
|
|
100
|
+
static MetronomeError: typeof Errors.MetronomeError;
|
|
101
|
+
static APIError: typeof Errors.APIError;
|
|
102
|
+
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
103
|
+
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
104
|
+
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
105
|
+
static NotFoundError: typeof Errors.NotFoundError;
|
|
106
|
+
static ConflictError: typeof Errors.ConflictError;
|
|
107
|
+
static RateLimitError: typeof Errors.RateLimitError;
|
|
108
|
+
static BadRequestError: typeof Errors.BadRequestError;
|
|
109
|
+
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
110
|
+
static InternalServerError: typeof Errors.InternalServerError;
|
|
111
|
+
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
112
|
+
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
113
|
+
static toFile: typeof Uploads.toFile;
|
|
114
|
+
static fileFromPath: typeof Uploads.fileFromPath;
|
|
115
|
+
}
|
|
116
|
+
export declare const MetronomeError: typeof Errors.MetronomeError, APIError: typeof Errors.APIError, APIConnectionError: typeof Errors.APIConnectionError, APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError, APIUserAbortError: typeof Errors.APIUserAbortError, NotFoundError: typeof Errors.NotFoundError, ConflictError: typeof Errors.ConflictError, RateLimitError: typeof Errors.RateLimitError, BadRequestError: typeof Errors.BadRequestError, AuthenticationError: typeof Errors.AuthenticationError, InternalServerError: typeof Errors.InternalServerError, PermissionDeniedError: typeof Errors.PermissionDeniedError, UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
117
|
+
export import toFile = Uploads.toFile;
|
|
118
|
+
export import fileFromPath = Uploads.fileFromPath;
|
|
119
|
+
export declare namespace Metronome {
|
|
120
|
+
export import RequestOptions = Core.RequestOptions;
|
|
121
|
+
export import Alerts = API.Alerts;
|
|
122
|
+
export import AlertCreateResponse = API.AlertCreateResponse;
|
|
123
|
+
export import AlertArchiveResponse = API.AlertArchiveResponse;
|
|
124
|
+
export import AlertCreateParams = API.AlertCreateParams;
|
|
125
|
+
export import AlertArchiveParams = API.AlertArchiveParams;
|
|
126
|
+
export import Plans = API.Plans;
|
|
127
|
+
export import PlanDetail = API.PlanDetail;
|
|
128
|
+
export import PlanListResponse = API.PlanListResponse;
|
|
129
|
+
export import PlanGetDetailsResponse = API.PlanGetDetailsResponse;
|
|
130
|
+
export import PlanListChargesResponse = API.PlanListChargesResponse;
|
|
131
|
+
export import PlanListCustomersResponse = API.PlanListCustomersResponse;
|
|
132
|
+
export import PlanListParams = API.PlanListParams;
|
|
133
|
+
export import PlanListChargesParams = API.PlanListChargesParams;
|
|
134
|
+
export import PlanListCustomersParams = API.PlanListCustomersParams;
|
|
135
|
+
export import CreditGrants = API.CreditGrants;
|
|
136
|
+
export import CreditLedgerEntry = API.CreditLedgerEntry;
|
|
137
|
+
export import RolloverAmountMaxAmount = API.RolloverAmountMaxAmount;
|
|
138
|
+
export import RolloverAmountMaxPercentage = API.RolloverAmountMaxPercentage;
|
|
139
|
+
export import CreditGrantCreateResponse = API.CreditGrantCreateResponse;
|
|
140
|
+
export import CreditGrantListResponse = API.CreditGrantListResponse;
|
|
141
|
+
export import CreditGrantEditResponse = API.CreditGrantEditResponse;
|
|
142
|
+
export import CreditGrantListCreditTypesResponse = API.CreditGrantListCreditTypesResponse;
|
|
143
|
+
export import CreditGrantListEntriesResponse = API.CreditGrantListEntriesResponse;
|
|
144
|
+
export import CreditGrantVoidResponse = API.CreditGrantVoidResponse;
|
|
145
|
+
export import CreditGrantCreateParams = API.CreditGrantCreateParams;
|
|
146
|
+
export import CreditGrantListParams = API.CreditGrantListParams;
|
|
147
|
+
export import CreditGrantEditParams = API.CreditGrantEditParams;
|
|
148
|
+
export import CreditGrantListCreditTypesParams = API.CreditGrantListCreditTypesParams;
|
|
149
|
+
export import CreditGrantListEntriesParams = API.CreditGrantListEntriesParams;
|
|
150
|
+
export import CreditGrantVoidParams = API.CreditGrantVoidParams;
|
|
151
|
+
export import Customers = API.Customers;
|
|
152
|
+
export import Customer = API.Customer;
|
|
153
|
+
export import CustomerDetail = API.CustomerDetail;
|
|
154
|
+
export import CustomerCreateResponse = API.CustomerCreateResponse;
|
|
155
|
+
export import CustomerRetrieveResponse = API.CustomerRetrieveResponse;
|
|
156
|
+
export import CustomerListResponse = API.CustomerListResponse;
|
|
157
|
+
export import CustomerArchiveResponse = API.CustomerArchiveResponse;
|
|
158
|
+
export import CustomerListBillableMetricsResponse = API.CustomerListBillableMetricsResponse;
|
|
159
|
+
export import CustomerListCostsResponse = API.CustomerListCostsResponse;
|
|
160
|
+
export import CustomerSetNameResponse = API.CustomerSetNameResponse;
|
|
161
|
+
export import CustomerCreateParams = API.CustomerCreateParams;
|
|
162
|
+
export import CustomerListParams = API.CustomerListParams;
|
|
163
|
+
export import CustomerArchiveParams = API.CustomerArchiveParams;
|
|
164
|
+
export import CustomerListBillableMetricsParams = API.CustomerListBillableMetricsParams;
|
|
165
|
+
export import CustomerListCostsParams = API.CustomerListCostsParams;
|
|
166
|
+
export import CustomerSetIngestAliasesParams = API.CustomerSetIngestAliasesParams;
|
|
167
|
+
export import CustomerSetNameParams = API.CustomerSetNameParams;
|
|
168
|
+
export import CustomerUpdateConfigParams = API.CustomerUpdateConfigParams;
|
|
169
|
+
export import Dashboards = API.Dashboards;
|
|
170
|
+
export import DashboardGetEmbeddableURLResponse = API.DashboardGetEmbeddableURLResponse;
|
|
171
|
+
export import DashboardGetEmbeddableURLParams = API.DashboardGetEmbeddableURLParams;
|
|
172
|
+
export import Webhooks = API.Webhooks;
|
|
173
|
+
export import Usage = API.Usage;
|
|
174
|
+
export import UsageListResponse = API.UsageListResponse;
|
|
175
|
+
export import UsageListWithGroupsResponse = API.UsageListWithGroupsResponse;
|
|
176
|
+
export import UsageListParams = API.UsageListParams;
|
|
177
|
+
export import UsageIngestParams = API.UsageIngestParams;
|
|
178
|
+
export import UsageListWithGroupsParams = API.UsageListWithGroupsParams;
|
|
179
|
+
export import AuditLogs = API.AuditLogs;
|
|
180
|
+
export import AuditLogListResponse = API.AuditLogListResponse;
|
|
181
|
+
export import AuditLogListParams = API.AuditLogListParams;
|
|
182
|
+
export import CustomFields = API.CustomFields;
|
|
183
|
+
export import CustomFieldListKeysResponse = API.CustomFieldListKeysResponse;
|
|
184
|
+
export import CustomFieldAddKeyParams = API.CustomFieldAddKeyParams;
|
|
185
|
+
export import CustomFieldDeleteValuesParams = API.CustomFieldDeleteValuesParams;
|
|
186
|
+
export import CustomFieldListKeysParams = API.CustomFieldListKeysParams;
|
|
187
|
+
export import CustomFieldRemoveKeyParams = API.CustomFieldRemoveKeyParams;
|
|
188
|
+
export import CustomFieldSetValuesParams = API.CustomFieldSetValuesParams;
|
|
189
|
+
export import BillableMetrics = API.BillableMetrics;
|
|
190
|
+
export import BillableMetricCreateResponse = API.BillableMetricCreateResponse;
|
|
191
|
+
export import BillableMetricRetrieveResponse = API.BillableMetricRetrieveResponse;
|
|
192
|
+
export import BillableMetricListResponse = API.BillableMetricListResponse;
|
|
193
|
+
export import BillableMetricArchiveResponse = API.BillableMetricArchiveResponse;
|
|
194
|
+
export import BillableMetricCreateParams = API.BillableMetricCreateParams;
|
|
195
|
+
export import BillableMetricListParams = API.BillableMetricListParams;
|
|
196
|
+
export import BillableMetricArchiveParams = API.BillableMetricArchiveParams;
|
|
197
|
+
export import Services = API.Services;
|
|
198
|
+
export import ServiceListResponse = API.ServiceListResponse;
|
|
199
|
+
export import Commit = API.Commit;
|
|
200
|
+
export import ContractWithoutAmendments = API.ContractWithoutAmendments;
|
|
201
|
+
export import CreditType = API.CreditType;
|
|
202
|
+
export import Discount = API.Discount;
|
|
203
|
+
export import ID = API.ID;
|
|
204
|
+
export import Override = API.Override;
|
|
205
|
+
export import Rate = API.Rate;
|
|
206
|
+
export import SchedulePointInTime = API.SchedulePointInTime;
|
|
207
|
+
export import ScheduledCharge = API.ScheduledCharge;
|
|
208
|
+
}
|
|
209
|
+
export default Metronome;
|
|
210
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,GAAG,MAAM,gCAAgC,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAE1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAElB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IAE/B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,IAAI,CAAC,O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details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
var _a;
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.fileFromPath = exports.toFile = exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.MetronomeError = exports.Metronome = void 0;
|
|
29
|
+
const Core = __importStar(require("./core.js"));
|
|
30
|
+
const Errors = __importStar(require("./error.js"));
|
|
31
|
+
const Uploads = __importStar(require("./uploads.js"));
|
|
32
|
+
const qs = __importStar(require("qs"));
|
|
33
|
+
const API = __importStar(require("@metronome/sdk/resources/index"));
|
|
34
|
+
/** API Client for interfacing with the Metronome API. */
|
|
35
|
+
class Metronome extends Core.APIClient {
|
|
36
|
+
/**
|
|
37
|
+
* API Client for interfacing with the Metronome API.
|
|
38
|
+
*
|
|
39
|
+
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
40
|
+
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
41
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com/v1] - Override the default base URL for the API.
|
|
42
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
43
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
44
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
45
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
46
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
47
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
48
|
+
*/
|
|
49
|
+
constructor({ baseURL = Core.readEnv('METRONOME_BASE_URL'), bearerToken = Core.readEnv('METRONOME_BEARER_TOKEN'), webhookSecret = Core.readEnv('METRONOME_WEBHOOK_SECRET') ?? null, ...opts } = {}) {
|
|
50
|
+
if (bearerToken === undefined) {
|
|
51
|
+
throw new Errors.MetronomeError("The METRONOME_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the Metronome client with an bearerToken option, like new Metronome({ bearerToken: 'My Bearer Token' }).");
|
|
52
|
+
}
|
|
53
|
+
const options = {
|
|
54
|
+
bearerToken,
|
|
55
|
+
webhookSecret,
|
|
56
|
+
...opts,
|
|
57
|
+
baseURL: baseURL || `https://api.metronome.com/v1`,
|
|
58
|
+
};
|
|
59
|
+
super({
|
|
60
|
+
baseURL: options.baseURL,
|
|
61
|
+
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
62
|
+
httpAgent: options.httpAgent,
|
|
63
|
+
maxRetries: options.maxRetries,
|
|
64
|
+
fetch: options.fetch,
|
|
65
|
+
});
|
|
66
|
+
this.alerts = new API.Alerts(this);
|
|
67
|
+
this.plans = new API.Plans(this);
|
|
68
|
+
this.creditGrants = new API.CreditGrants(this);
|
|
69
|
+
this.customers = new API.Customers(this);
|
|
70
|
+
this.dashboards = new API.Dashboards(this);
|
|
71
|
+
this.webhooks = new API.Webhooks(this);
|
|
72
|
+
this.usage = new API.Usage(this);
|
|
73
|
+
this.auditLogs = new API.AuditLogs(this);
|
|
74
|
+
this.customFields = new API.CustomFields(this);
|
|
75
|
+
this.billableMetrics = new API.BillableMetrics(this);
|
|
76
|
+
this.services = new API.Services(this);
|
|
77
|
+
this._options = options;
|
|
78
|
+
this.bearerToken = bearerToken;
|
|
79
|
+
this.webhookSecret = webhookSecret;
|
|
80
|
+
}
|
|
81
|
+
defaultQuery() {
|
|
82
|
+
return this._options.defaultQuery;
|
|
83
|
+
}
|
|
84
|
+
defaultHeaders(opts) {
|
|
85
|
+
return {
|
|
86
|
+
...super.defaultHeaders(opts),
|
|
87
|
+
...this._options.defaultHeaders,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
authHeaders(opts) {
|
|
91
|
+
return { Authorization: `Bearer ${this.bearerToken}` };
|
|
92
|
+
}
|
|
93
|
+
stringifyQuery(query) {
|
|
94
|
+
return qs.stringify(query, { arrayFormat: 'comma' });
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.Metronome = Metronome;
|
|
98
|
+
_a = Metronome;
|
|
99
|
+
Metronome.Metronome = _a;
|
|
100
|
+
Metronome.MetronomeError = Errors.MetronomeError;
|
|
101
|
+
Metronome.APIError = Errors.APIError;
|
|
102
|
+
Metronome.APIConnectionError = Errors.APIConnectionError;
|
|
103
|
+
Metronome.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
104
|
+
Metronome.APIUserAbortError = Errors.APIUserAbortError;
|
|
105
|
+
Metronome.NotFoundError = Errors.NotFoundError;
|
|
106
|
+
Metronome.ConflictError = Errors.ConflictError;
|
|
107
|
+
Metronome.RateLimitError = Errors.RateLimitError;
|
|
108
|
+
Metronome.BadRequestError = Errors.BadRequestError;
|
|
109
|
+
Metronome.AuthenticationError = Errors.AuthenticationError;
|
|
110
|
+
Metronome.InternalServerError = Errors.InternalServerError;
|
|
111
|
+
Metronome.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
112
|
+
Metronome.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
113
|
+
Metronome.toFile = Uploads.toFile;
|
|
114
|
+
Metronome.fileFromPath = Uploads.fileFromPath;
|
|
115
|
+
exports.MetronomeError = Errors.MetronomeError, exports.APIError = Errors.APIError, exports.APIConnectionError = Errors.APIConnectionError, exports.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError, exports.APIUserAbortError = Errors.APIUserAbortError, exports.NotFoundError = Errors.NotFoundError, exports.ConflictError = Errors.ConflictError, exports.RateLimitError = Errors.RateLimitError, exports.BadRequestError = Errors.BadRequestError, exports.AuthenticationError = Errors.AuthenticationError, exports.InternalServerError = Errors.InternalServerError, exports.PermissionDeniedError = Errors.PermissionDeniedError, exports.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
116
|
+
exports.toFile = Uploads.toFile;
|
|
117
|
+
exports.fileFromPath = Uploads.fileFromPath;
|
|
118
|
+
(function (Metronome) {
|
|
119
|
+
Metronome.Alerts = API.Alerts;
|
|
120
|
+
Metronome.Plans = API.Plans;
|
|
121
|
+
Metronome.CreditGrants = API.CreditGrants;
|
|
122
|
+
Metronome.Customers = API.Customers;
|
|
123
|
+
Metronome.Dashboards = API.Dashboards;
|
|
124
|
+
Metronome.Webhooks = API.Webhooks;
|
|
125
|
+
Metronome.Usage = API.Usage;
|
|
126
|
+
Metronome.AuditLogs = API.AuditLogs;
|
|
127
|
+
Metronome.CustomFields = API.CustomFields;
|
|
128
|
+
Metronome.BillableMetrics = API.BillableMetrics;
|
|
129
|
+
Metronome.Services = API.Services;
|
|
130
|
+
})(Metronome = exports.Metronome || (exports.Metronome = {}));
|
|
131
|
+
exports = module.exports = Metronome;
|
|
132
|
+
exports.default = Metronome;
|
|
133
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA+B;AAC/B,mDAAkC;AAElC,sDAAqC;AACrC,uCAAyB;AACzB,oEAAsD;AAsEtD,yDAAyD;AACzD,MAAa,SAAU,SAAQ,IAAI,CAAC,SAAS;IAM3C;;;;;;;;;;;;OAYG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC5C,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EACpD,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC,IAAI,IAAI,EAChE,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,MAAM,CAAC,cAAc,CAC7B,iNAAiN,CAClN,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,WAAW;YACX,aAAa;YACb,GAAG,IAAI;YACP,OAAO,EAAE,OAAO,IAAI,8BAA8B;SACnD,CAAC;QAEF,KAAK,CAAC;YACJ,OAAO,EAAE,OAAO,CAAC,OAAQ;YACzB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,cAAc;YAChD,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OA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ADR,gCAAwB,GACtB,MAAM,0BAAC;AAEG,QAAA,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACxB,QAAA,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAElD,WAAiB,SAAS;IAGV,gBAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAMpB,eAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAUlB,sBAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAiBhC,mBAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAmB1B,oBAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IAI5B,kBAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAExB,eAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAOlB,mBAAS,GAAG,GAAG,CAAC,SAAS,CAAC;IAI1B,sBAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAQhC,yBAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAStC,kBAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAYxC,CAAC,EArGgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAqGzB;AAED,kBAAe,SAAS,CAAC"}
|
package/index.mjs
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
var _a;
|
|
3
|
+
import * as Core from "./core.mjs";
|
|
4
|
+
import * as Errors from "./error.mjs";
|
|
5
|
+
import * as Uploads from "./uploads.mjs";
|
|
6
|
+
import * as qs from 'qs';
|
|
7
|
+
import * as API from '@metronome/sdk/resources/index';
|
|
8
|
+
/** API Client for interfacing with the Metronome API. */
|
|
9
|
+
export class Metronome extends Core.APIClient {
|
|
10
|
+
/**
|
|
11
|
+
* API Client for interfacing with the Metronome API.
|
|
12
|
+
*
|
|
13
|
+
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
14
|
+
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
15
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com/v1] - Override the default base URL for the API.
|
|
16
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
17
|
+
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
18
|
+
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
19
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
20
|
+
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
21
|
+
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
22
|
+
*/
|
|
23
|
+
constructor({ baseURL = Core.readEnv('METRONOME_BASE_URL'), bearerToken = Core.readEnv('METRONOME_BEARER_TOKEN'), webhookSecret = Core.readEnv('METRONOME_WEBHOOK_SECRET') ?? null, ...opts } = {}) {
|
|
24
|
+
if (bearerToken === undefined) {
|
|
25
|
+
throw new Errors.MetronomeError("The METRONOME_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the Metronome client with an bearerToken option, like new Metronome({ bearerToken: 'My Bearer Token' }).");
|
|
26
|
+
}
|
|
27
|
+
const options = {
|
|
28
|
+
bearerToken,
|
|
29
|
+
webhookSecret,
|
|
30
|
+
...opts,
|
|
31
|
+
baseURL: baseURL || `https://api.metronome.com/v1`,
|
|
32
|
+
};
|
|
33
|
+
super({
|
|
34
|
+
baseURL: options.baseURL,
|
|
35
|
+
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
36
|
+
httpAgent: options.httpAgent,
|
|
37
|
+
maxRetries: options.maxRetries,
|
|
38
|
+
fetch: options.fetch,
|
|
39
|
+
});
|
|
40
|
+
this.alerts = new API.Alerts(this);
|
|
41
|
+
this.plans = new API.Plans(this);
|
|
42
|
+
this.creditGrants = new API.CreditGrants(this);
|
|
43
|
+
this.customers = new API.Customers(this);
|
|
44
|
+
this.dashboards = new API.Dashboards(this);
|
|
45
|
+
this.webhooks = new API.Webhooks(this);
|
|
46
|
+
this.usage = new API.Usage(this);
|
|
47
|
+
this.auditLogs = new API.AuditLogs(this);
|
|
48
|
+
this.customFields = new API.CustomFields(this);
|
|
49
|
+
this.billableMetrics = new API.BillableMetrics(this);
|
|
50
|
+
this.services = new API.Services(this);
|
|
51
|
+
this._options = options;
|
|
52
|
+
this.bearerToken = bearerToken;
|
|
53
|
+
this.webhookSecret = webhookSecret;
|
|
54
|
+
}
|
|
55
|
+
defaultQuery() {
|
|
56
|
+
return this._options.defaultQuery;
|
|
57
|
+
}
|
|
58
|
+
defaultHeaders(opts) {
|
|
59
|
+
return {
|
|
60
|
+
...super.defaultHeaders(opts),
|
|
61
|
+
...this._options.defaultHeaders,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
authHeaders(opts) {
|
|
65
|
+
return { Authorization: `Bearer ${this.bearerToken}` };
|
|
66
|
+
}
|
|
67
|
+
stringifyQuery(query) {
|
|
68
|
+
return qs.stringify(query, { arrayFormat: 'comma' });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
_a = Metronome;
|
|
72
|
+
Metronome.Metronome = _a;
|
|
73
|
+
Metronome.MetronomeError = Errors.MetronomeError;
|
|
74
|
+
Metronome.APIError = Errors.APIError;
|
|
75
|
+
Metronome.APIConnectionError = Errors.APIConnectionError;
|
|
76
|
+
Metronome.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
77
|
+
Metronome.APIUserAbortError = Errors.APIUserAbortError;
|
|
78
|
+
Metronome.NotFoundError = Errors.NotFoundError;
|
|
79
|
+
Metronome.ConflictError = Errors.ConflictError;
|
|
80
|
+
Metronome.RateLimitError = Errors.RateLimitError;
|
|
81
|
+
Metronome.BadRequestError = Errors.BadRequestError;
|
|
82
|
+
Metronome.AuthenticationError = Errors.AuthenticationError;
|
|
83
|
+
Metronome.InternalServerError = Errors.InternalServerError;
|
|
84
|
+
Metronome.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
85
|
+
Metronome.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
86
|
+
Metronome.toFile = Uploads.toFile;
|
|
87
|
+
Metronome.fileFromPath = Uploads.fileFromPath;
|
|
88
|
+
export const { MetronomeError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } = Errors;
|
|
89
|
+
export var toFile = Uploads.toFile;
|
|
90
|
+
export var fileFromPath = Uploads.fileFromPath;
|
|
91
|
+
(function (Metronome) {
|
|
92
|
+
Metronome.Alerts = API.Alerts;
|
|
93
|
+
Metronome.Plans = API.Plans;
|
|
94
|
+
Metronome.CreditGrants = API.CreditGrants;
|
|
95
|
+
Metronome.Customers = API.Customers;
|
|
96
|
+
Metronome.Dashboards = API.Dashboards;
|
|
97
|
+
Metronome.Webhooks = API.Webhooks;
|
|
98
|
+
Metronome.Usage = API.Usage;
|
|
99
|
+
Metronome.AuditLogs = API.AuditLogs;
|
|
100
|
+
Metronome.CustomFields = API.CustomFields;
|
|
101
|
+
Metronome.BillableMetrics = API.BillableMetrics;
|
|
102
|
+
Metronome.Services = API.Services;
|
|
103
|
+
})(Metronome || (Metronome = {}));
|
|
104
|
+
export default Metronome;
|
|
105
|
+
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAE/E,KAAK,IAAI;OACT,KAAK,MAAM;OAEX,KAAK,OAAO;OACZ,KAAK,EAAE,MAAM,IAAI;OACjB,KAAK,GAAG,MAAM,gCAAgC;AAsErD,yDAAyD;AACzD,MAAM,OAAO,SAAU,SAAQ,IAAI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eAAe,SAAS,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@metronome/sdk",
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"description": "The official TypeScript library for the Metronome API",
|
|
5
|
+
"author": "Metronome <dev-feedback@metronome.com>",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"type": "commonjs",
|
|
9
|
+
"repository": "github:Metronome-Industries/metronome-node",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"packageManager": "yarn@1.22.22",
|
|
12
|
+
"files": [
|
|
13
|
+
"*"
|
|
14
|
+
],
|
|
15
|
+
"private": false,
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "./scripts/test",
|
|
18
|
+
"build": "./scripts/build",
|
|
19
|
+
"format": "prettier --write --cache --cache-strategy metadata . !dist",
|
|
20
|
+
"tsn": "ts-node -r tsconfig-paths/register",
|
|
21
|
+
"lint": "./scripts/lint",
|
|
22
|
+
"fix": "eslint --fix --ext ts,js ."
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@types/node": "^18.11.18",
|
|
26
|
+
"@types/node-fetch": "^2.6.4",
|
|
27
|
+
"@types/qs": "^6.9.7",
|
|
28
|
+
"abort-controller": "^3.0.0",
|
|
29
|
+
"agentkeepalive": "^4.2.1",
|
|
30
|
+
"form-data-encoder": "1.7.2",
|
|
31
|
+
"formdata-node": "^4.3.2",
|
|
32
|
+
"node-fetch": "^2.6.7",
|
|
33
|
+
"qs": "^6.10.3",
|
|
34
|
+
"web-streams-polyfill": "^3.2.1"
|
|
35
|
+
},
|
|
36
|
+
"sideEffects": [
|
|
37
|
+
"./_shims/index.js",
|
|
38
|
+
"./_shims/index.mjs",
|
|
39
|
+
"./shims/node.js",
|
|
40
|
+
"./shims/node.mjs",
|
|
41
|
+
"./shims/web.js",
|
|
42
|
+
"./shims/web.mjs"
|
|
43
|
+
],
|
|
44
|
+
"imports": {
|
|
45
|
+
"@metronome/sdk": ".",
|
|
46
|
+
"@metronome/sdk/*": "./src/*"
|
|
47
|
+
},
|
|
48
|
+
"exports": {
|
|
49
|
+
"./_shims/auto/*": {
|
|
50
|
+
"deno": {
|
|
51
|
+
"types": "./_shims/auto/*.d.ts",
|
|
52
|
+
"require": "./_shims/auto/*.js",
|
|
53
|
+
"default": "./_shims/auto/*.mjs"
|
|
54
|
+
},
|
|
55
|
+
"bun": {
|
|
56
|
+
"types": "./_shims/auto/*.d.ts",
|
|
57
|
+
"require": "./_shims/auto/*-bun.js",
|
|
58
|
+
"default": "./_shims/auto/*-bun.mjs"
|
|
59
|
+
},
|
|
60
|
+
"browser": {
|
|
61
|
+
"types": "./_shims/auto/*.d.ts",
|
|
62
|
+
"require": "./_shims/auto/*.js",
|
|
63
|
+
"default": "./_shims/auto/*.mjs"
|
|
64
|
+
},
|
|
65
|
+
"worker": {
|
|
66
|
+
"types": "./_shims/auto/*.d.ts",
|
|
67
|
+
"require": "./_shims/auto/*.js",
|
|
68
|
+
"default": "./_shims/auto/*.mjs"
|
|
69
|
+
},
|
|
70
|
+
"workerd": {
|
|
71
|
+
"types": "./_shims/auto/*.d.ts",
|
|
72
|
+
"require": "./_shims/auto/*.js",
|
|
73
|
+
"default": "./_shims/auto/*.mjs"
|
|
74
|
+
},
|
|
75
|
+
"node": {
|
|
76
|
+
"types": "./_shims/auto/*-node.d.ts",
|
|
77
|
+
"require": "./_shims/auto/*-node.js",
|
|
78
|
+
"default": "./_shims/auto/*-node.mjs"
|
|
79
|
+
},
|
|
80
|
+
"types": "./_shims/auto/*.d.ts",
|
|
81
|
+
"require": "./_shims/auto/*.js",
|
|
82
|
+
"default": "./_shims/auto/*.mjs"
|
|
83
|
+
},
|
|
84
|
+
".": {
|
|
85
|
+
"require": {
|
|
86
|
+
"types": "./index.d.ts",
|
|
87
|
+
"default": "./index.js"
|
|
88
|
+
},
|
|
89
|
+
"types": "./index.d.mts",
|
|
90
|
+
"default": "./index.mjs"
|
|
91
|
+
},
|
|
92
|
+
"./*.mjs": {
|
|
93
|
+
"types": "./*.d.ts",
|
|
94
|
+
"default": "./*.mjs"
|
|
95
|
+
},
|
|
96
|
+
"./*.js": {
|
|
97
|
+
"types": "./*.d.ts",
|
|
98
|
+
"default": "./*.js"
|
|
99
|
+
},
|
|
100
|
+
"./*": {
|
|
101
|
+
"types": "./*.d.ts",
|
|
102
|
+
"require": "./*.js",
|
|
103
|
+
"default": "./*.mjs"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
package/resource.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,WAAW;IACtB,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;gBAEjB,MAAM,EAAE,SAAS;CAG9B"}
|
package/resource.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.APIResource = void 0;
|
|
5
|
+
class APIResource {
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this._client = client;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.APIResource = APIResource;
|
|
11
|
+
//# sourceMappingURL=resource.js.map
|
package/resource.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAItF,MAAa,WAAW;IAGtB,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF;AAND,kCAMC"}
|
package/resource.mjs
ADDED
package/resource.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.mjs","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAItF,MAAM,OAAO,WAAW;IAGtB,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF"}
|