Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 8, 2024
1 parent 1a999c9 commit 861f35c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 43
configured_endpoints: 42
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-a0403cd987757a0e69e2bffb8a87a8cf4a848a8c35d35ed5eb34cf4649a9b5d0.yml
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@ const metronome = new Metronome({
});

async function main() {
const response = await metronome.ingest({
body: [
{
transaction_id: '2021-01-01T00:00:00Z_cluster42',
customer_id: '[email protected]',
event_type: 'heartbeat',
timestamp: '2021-01-01T00:00:00Z',
},
],
const alertCreateResponse = await metronome.alerts.create({
alert_type: 'spend_threshold_reached',
name: '$100 spend threshold reached',
threshold: 10000,
});

console.log(alertCreateResponse.data);
}

main();
Expand Down
6 changes: 0 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Metronome

Methods:

- <code title="post /ingest">client.<a href="./src/index.ts">ingest</a>([ ...body ]) -> void</code>

# Shared

Types:
Expand Down
14 changes: 0 additions & 14 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { type Agent } from './_shims/index';
import * as Uploads from './uploads';
import * as qs from 'qs';
import * as API from './resources/index';
import * as TopLevelAPI from './resources/top-level';

export interface ClientOptions {
/**
Expand Down Expand Up @@ -140,17 +139,6 @@ export class Metronome extends Core.APIClient {
auditLogs: API.AuditLogs = new API.AuditLogs(this);
customFields: API.CustomFields = new API.CustomFields(this);

/**
* Send usage events to Metronome. The body of this request is expected to be a
* JSON array of between 1 and 100 usage events. Compressed request bodies are
* supported with a `Content-Encoding: gzip` header. See
* [Getting usage into Metronome](https://docs.metronome.com/getting-usage-data-into-metronome/overview)
* to learn more about usage events.
*/
ingest(body: TopLevelAPI.IngestParams, options?: Core.RequestOptions): Core.APIPromise<void> {
return this.post('/ingest', { body, ...options, headers: { Accept: '*/*', ...options?.headers } });
}

protected override defaultQuery(): Core.DefaultQuery | undefined {
return this._options.defaultQuery;
}
Expand Down Expand Up @@ -212,8 +200,6 @@ export import fileFromPath = Uploads.fileFromPath;
export namespace Metronome {
export import RequestOptions = Core.RequestOptions;

export import IngestParams = API.IngestParams;

export import Alerts = API.Alerts;
export import AlertCreateResponse = API.AlertCreateResponse;
export import AlertArchiveResponse = API.AlertArchiveResponse;
Expand Down
1 change: 0 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export {
CustomerAlerts,
} from './customer-alerts';
export { DashboardGetEmbeddableURLResponse, DashboardGetEmbeddableURLParams, Dashboards } from './dashboards';
export { IngestParams } from './top-level';
export {
PlanDetail,
PlanListResponse,
Expand Down
26 changes: 0 additions & 26 deletions src/resources/top-level.ts

This file was deleted.

41 changes: 0 additions & 41 deletions tests/api-resources/top-level.test.ts

This file was deleted.

0 comments on commit 861f35c

Please sign in to comment.