@trillboards/api-client 3.4.13 → 3.5.2
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 +15 -0
- package/dist/{chunk-XNJ4W7N6.mjs → chunk-2NBCWBT2.mjs} +8 -7
- package/dist/chunk-2NBCWBT2.mjs.map +1 -0
- package/dist/generated.d.mts +2441 -111
- package/dist/generated.d.ts +2441 -111
- package/dist/generated.js +6 -4
- package/dist/generated.js.map +1 -1
- package/dist/generated.mjs +1 -1
- package/dist/index.d.mts +38 -12
- package/dist/index.d.ts +38 -12
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-XNJ4W7N6.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { advertiserBuyingRoutes, advertiserRoutes, __require } from './chunk-
|
|
2
|
-
export { advertiserRoutes, generatedTypes } from './chunk-
|
|
1
|
+
import { advertiserBuyingRoutes, advertiserRoutes, __require, dspRoutes } from './chunk-2NBCWBT2.mjs';
|
|
2
|
+
export { advertiserRoutes, generatedTypes } from './chunk-2NBCWBT2.mjs';
|
|
3
3
|
import { createParser } from 'eventsource-parser';
|
|
4
4
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
5
5
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
@@ -79,7 +79,7 @@ var TrillboardsError = class _TrillboardsError extends Error {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
// src/version.ts
|
|
82
|
-
var VERSION = "3.
|
|
82
|
+
var VERSION = "3.5.2";
|
|
83
83
|
|
|
84
84
|
// src/http.ts
|
|
85
85
|
var PUBLIC_PATHS = ["/v1/errors", "/v1/changelog", "/api/discover", "/v1/health"];
|
|
@@ -1237,6 +1237,29 @@ var Webhooks = {
|
|
|
1237
1237
|
verifyAdcpWebhook
|
|
1238
1238
|
};
|
|
1239
1239
|
|
|
1240
|
-
|
|
1240
|
+
// src/dsp.ts
|
|
1241
|
+
var DspClient = class {
|
|
1242
|
+
constructor(options = {}) {
|
|
1243
|
+
this.http = new HttpClient({
|
|
1244
|
+
...options,
|
|
1245
|
+
baseUrl: (options.baseUrl ?? "https://api.trillboards.com").replace(/\/+$/, "")
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
execute(operation, ...args) {
|
|
1249
|
+
const input = args[0] === void 0 ? {} : args[0];
|
|
1250
|
+
const route = dspRoutes[operation];
|
|
1251
|
+
const path2 = route.path.replace(/\{([^}]+)\}/g, (_, name) => {
|
|
1252
|
+
const value = input.params?.[name];
|
|
1253
|
+
if (value === void 0 || value === null) throw new Error("Missing path parameter: " + name);
|
|
1254
|
+
return encodeURIComponent(String(value));
|
|
1255
|
+
});
|
|
1256
|
+
return this.http.request(route.method, path2, {
|
|
1257
|
+
params: input.query,
|
|
1258
|
+
body: input.body
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
|
|
1263
|
+
export { ADCP_WEBHOOK_SIGNING_TAG, ADVERTISER_BUYING_RESOURCE, AdvertiserBuyingClient, AdvertiserClient, AnalyticsClient, AudienceClient, BillingClient, CreativeExperimentsClient, DataClient, DevicesClient, DspClient, EarningsClient, ErrorsClient, FleetClient, ImpressionsClient, McpToolError, MediaBuysClient, ReactiveClient, RoutesClient, ScreensClient, TrillboardsClient, TrillboardsError, VERSION, Webhooks, WebhooksClient, constructEvent, constructEventLegacy, parseSignatureHeader, retryWithBackoff, verifyAdcpWebhook };
|
|
1241
1264
|
//# sourceMappingURL=index.mjs.map
|
|
1242
1265
|
//# sourceMappingURL=index.mjs.map
|