@novu/api 0.6.0 → 0.6.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 +29 -4
- package/bin/mcp-server.js +328 -91
- package/bin/mcp-server.js.map +15 -11
- package/docs/sdks/subscribers/README.md +113 -0
- package/funcs/subscribersSearch.js +1 -0
- package/funcs/subscribersSearch.js.map +1 -1
- package/funcs/subscribersUpsert.d.ts +18 -0
- package/funcs/subscribersUpsert.d.ts.map +1 -0
- package/funcs/subscribersUpsert.js +148 -0
- package/funcs/subscribersUpsert.js.map +1 -0
- package/hooks/types.d.ts +1 -1
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/subscribersUpsert.d.ts +11 -0
- package/mcp-server/tools/subscribersUpsert.d.ts.map +1 -0
- package/mcp-server/tools/subscribersUpsert.js +57 -0
- package/mcp-server/tools/subscribersUpsert.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/updatesubscriberrequestdto.d.ts +72 -0
- package/models/components/updatesubscriberrequestdto.d.ts.map +1 -0
- package/models/components/updatesubscriberrequestdto.js +74 -0
- package/models/components/updatesubscriberrequestdto.js.map +1 -0
- package/models/components/workflowinfodto.d.ts +5 -0
- package/models/components/workflowinfodto.d.ts.map +1 -1
- package/models/components/workflowinfodto.js +2 -0
- package/models/components/workflowinfodto.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/subscriberscontrollersearchsubscribers.d.ts +26 -6
- package/models/operations/subscriberscontrollersearchsubscribers.d.ts.map +1 -1
- package/models/operations/subscriberscontrollersearchsubscribers.js +11 -6
- package/models/operations/subscriberscontrollersearchsubscribers.js.map +1 -1
- package/models/operations/subscribersv1controllerupdatesubscriber.d.ts +68 -0
- package/models/operations/subscribersv1controllerupdatesubscriber.d.ts.map +1 -0
- package/models/operations/subscribersv1controllerupdatesubscriber.js +114 -0
- package/models/operations/subscribersv1controllerupdatesubscriber.js.map +1 -0
- package/package.json +2 -2
- package/sdk/subscribers.d.ts +7 -0
- package/sdk/subscribers.d.ts.map +1 -1
- package/sdk/subscribers.js +10 -0
- package/sdk/subscribers.js.map +1 -1
- package/sources/json-development.json +687 -117
- package/src/funcs/subscribersSearch.ts +1 -0
- package/src/funcs/subscribersUpsert.ts +240 -0
- package/src/hooks/types.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/subscribersUpsert.ts +43 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/updatesubscriberrequestdto.ts +124 -0
- package/src/models/components/workflowinfodto.ts +7 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/subscriberscontrollersearchsubscribers.ts +34 -12
- package/src/models/operations/subscribersv1controllerupdatesubscriber.ts +191 -0
- package/src/sdk/subscribers.ts +22 -0
package/bin/mcp-server.js
CHANGED
|
@@ -34264,9 +34264,9 @@ var init_config = __esm(() => {
|
|
|
34264
34264
|
SDK_METADATA = {
|
|
34265
34265
|
language: "typescript",
|
|
34266
34266
|
openapiDocVersion: "1.0",
|
|
34267
|
-
sdkVersion: "0.6.
|
|
34268
|
-
genVersion: "2.
|
|
34269
|
-
userAgent: "speakeasy-sdk/typescript 0.6.
|
|
34267
|
+
sdkVersion: "0.6.2",
|
|
34268
|
+
genVersion: "2.563.1",
|
|
34269
|
+
userAgent: "speakeasy-sdk/typescript 0.6.2 2.563.1 1.0 @novu/api"
|
|
34270
34270
|
};
|
|
34271
34271
|
});
|
|
34272
34272
|
|
|
@@ -38390,12 +38390,14 @@ var init_workflowinfodto = __esm(() => {
|
|
|
38390
38390
|
WorkflowInfoDto$inboundSchema = objectType({
|
|
38391
38391
|
slug: stringType(),
|
|
38392
38392
|
identifier: stringType(),
|
|
38393
|
-
name: stringType()
|
|
38393
|
+
name: stringType(),
|
|
38394
|
+
updatedAt: stringType().optional()
|
|
38394
38395
|
});
|
|
38395
38396
|
WorkflowInfoDto$outboundSchema = objectType({
|
|
38396
38397
|
slug: stringType(),
|
|
38397
38398
|
identifier: stringType(),
|
|
38398
|
-
name: stringType()
|
|
38399
|
+
name: stringType(),
|
|
38400
|
+
updatedAt: stringType().optional()
|
|
38399
38401
|
});
|
|
38400
38402
|
((WorkflowInfoDto$) => {
|
|
38401
38403
|
WorkflowInfoDto$.inboundSchema = WorkflowInfoDto$inboundSchema;
|
|
@@ -39691,6 +39693,37 @@ var init_updatesubscriberonlineflagrequestdto = __esm(() => {
|
|
|
39691
39693
|
})(UpdateSubscriberOnlineFlagRequestDto$ ||= {});
|
|
39692
39694
|
});
|
|
39693
39695
|
|
|
39696
|
+
// src/models/components/updatesubscriberrequestdto.ts
|
|
39697
|
+
var UpdateSubscriberRequestDto$inboundSchema, UpdateSubscriberRequestDto$outboundSchema, UpdateSubscriberRequestDto$;
|
|
39698
|
+
var init_updatesubscriberrequestdto = __esm(() => {
|
|
39699
|
+
init_lib();
|
|
39700
|
+
init_subscriberchanneldto();
|
|
39701
|
+
UpdateSubscriberRequestDto$inboundSchema = objectType({
|
|
39702
|
+
email: stringType().optional(),
|
|
39703
|
+
firstName: stringType().optional(),
|
|
39704
|
+
lastName: stringType().optional(),
|
|
39705
|
+
phone: stringType().optional(),
|
|
39706
|
+
avatar: stringType().optional(),
|
|
39707
|
+
locale: stringType().optional(),
|
|
39708
|
+
data: recordType(anyType()).optional(),
|
|
39709
|
+
channels: arrayType(SubscriberChannelDto$inboundSchema).optional()
|
|
39710
|
+
});
|
|
39711
|
+
UpdateSubscriberRequestDto$outboundSchema = objectType({
|
|
39712
|
+
email: stringType().optional(),
|
|
39713
|
+
firstName: stringType().optional(),
|
|
39714
|
+
lastName: stringType().optional(),
|
|
39715
|
+
phone: stringType().optional(),
|
|
39716
|
+
avatar: stringType().optional(),
|
|
39717
|
+
locale: stringType().optional(),
|
|
39718
|
+
data: recordType(anyType()).optional(),
|
|
39719
|
+
channels: arrayType(SubscriberChannelDto$outboundSchema).optional()
|
|
39720
|
+
});
|
|
39721
|
+
((UpdateSubscriberRequestDto$) => {
|
|
39722
|
+
UpdateSubscriberRequestDto$.inboundSchema = UpdateSubscriberRequestDto$inboundSchema;
|
|
39723
|
+
UpdateSubscriberRequestDto$.outboundSchema = UpdateSubscriberRequestDto$outboundSchema;
|
|
39724
|
+
})(UpdateSubscriberRequestDto$ ||= {});
|
|
39725
|
+
});
|
|
39726
|
+
|
|
39694
39727
|
// src/models/components/index.ts
|
|
39695
39728
|
var init_components = __esm(() => {
|
|
39696
39729
|
init_activitiesresponsedto();
|
|
@@ -39802,6 +39835,7 @@ var init_components = __esm(() => {
|
|
|
39802
39835
|
init_updateintegrationrequestdto();
|
|
39803
39836
|
init_updatesubscriberchannelrequestdto();
|
|
39804
39837
|
init_updatesubscriberonlineflagrequestdto();
|
|
39838
|
+
init_updatesubscriberrequestdto();
|
|
39805
39839
|
init_workflowinfodto();
|
|
39806
39840
|
init_workfloworiginenum();
|
|
39807
39841
|
init_workflowpreferencedto();
|
|
@@ -41023,13 +41057,14 @@ var init_subscriberscontrollersearchsubscribers = __esm(() => {
|
|
|
41023
41057
|
SubscribersControllerSearchSubscribersRequest$inboundSchema = objectType({
|
|
41024
41058
|
after: stringType().optional(),
|
|
41025
41059
|
before: stringType().optional(),
|
|
41060
|
+
limit: numberType().optional(),
|
|
41061
|
+
orderDirection: OrderDirection$inboundSchema.optional(),
|
|
41062
|
+
orderBy: stringType().optional(),
|
|
41063
|
+
includeCursor: booleanType().optional(),
|
|
41026
41064
|
email: stringType().optional(),
|
|
41027
41065
|
name: stringType().optional(),
|
|
41028
41066
|
phone: stringType().optional(),
|
|
41029
41067
|
subscriberId: stringType().optional(),
|
|
41030
|
-
limit: numberType().optional(),
|
|
41031
|
-
orderDirection: OrderDirection$inboundSchema.optional(),
|
|
41032
|
-
orderBy: anyType().optional(),
|
|
41033
41068
|
"idempotency-key": stringType().optional()
|
|
41034
41069
|
}).transform((v2) => {
|
|
41035
41070
|
return remap(v2, {
|
|
@@ -41039,13 +41074,14 @@ var init_subscriberscontrollersearchsubscribers = __esm(() => {
|
|
|
41039
41074
|
SubscribersControllerSearchSubscribersRequest$outboundSchema = objectType({
|
|
41040
41075
|
after: stringType().optional(),
|
|
41041
41076
|
before: stringType().optional(),
|
|
41077
|
+
limit: numberType().optional(),
|
|
41078
|
+
orderDirection: OrderDirection$outboundSchema.optional(),
|
|
41079
|
+
orderBy: stringType().optional(),
|
|
41080
|
+
includeCursor: booleanType().optional(),
|
|
41042
41081
|
email: stringType().optional(),
|
|
41043
41082
|
name: stringType().optional(),
|
|
41044
41083
|
phone: stringType().optional(),
|
|
41045
41084
|
subscriberId: stringType().optional(),
|
|
41046
|
-
limit: numberType().optional(),
|
|
41047
|
-
orderDirection: OrderDirection$outboundSchema.optional(),
|
|
41048
|
-
orderBy: anyType().optional(),
|
|
41049
41085
|
idempotencyKey: stringType().optional()
|
|
41050
41086
|
}).transform((v2) => {
|
|
41051
41087
|
return remap(v2, {
|
|
@@ -41753,6 +41789,60 @@ var init_subscribersv1controllermodifysubscriberchannel = __esm(() => {
|
|
|
41753
41789
|
})(SubscribersV1ControllerModifySubscriberChannelResponse$ ||= {});
|
|
41754
41790
|
});
|
|
41755
41791
|
|
|
41792
|
+
// src/models/operations/subscribersv1controllerupdatesubscriber.ts
|
|
41793
|
+
var SubscribersV1ControllerUpdateSubscriberRequest$inboundSchema, SubscribersV1ControllerUpdateSubscriberRequest$outboundSchema, SubscribersV1ControllerUpdateSubscriberRequest$, SubscribersV1ControllerUpdateSubscriberResponse$inboundSchema, SubscribersV1ControllerUpdateSubscriberResponse$outboundSchema, SubscribersV1ControllerUpdateSubscriberResponse$;
|
|
41794
|
+
var init_subscribersv1controllerupdatesubscriber = __esm(() => {
|
|
41795
|
+
init_lib();
|
|
41796
|
+
init_primitives();
|
|
41797
|
+
init_components();
|
|
41798
|
+
SubscribersV1ControllerUpdateSubscriberRequest$inboundSchema = objectType({
|
|
41799
|
+
subscriberId: stringType(),
|
|
41800
|
+
"idempotency-key": stringType().optional(),
|
|
41801
|
+
UpdateSubscriberRequestDto: UpdateSubscriberRequestDto$inboundSchema
|
|
41802
|
+
}).transform((v2) => {
|
|
41803
|
+
return remap(v2, {
|
|
41804
|
+
"idempotency-key": "idempotencyKey",
|
|
41805
|
+
UpdateSubscriberRequestDto: "updateSubscriberRequestDto"
|
|
41806
|
+
});
|
|
41807
|
+
});
|
|
41808
|
+
SubscribersV1ControllerUpdateSubscriberRequest$outboundSchema = objectType({
|
|
41809
|
+
subscriberId: stringType(),
|
|
41810
|
+
idempotencyKey: stringType().optional(),
|
|
41811
|
+
updateSubscriberRequestDto: UpdateSubscriberRequestDto$outboundSchema
|
|
41812
|
+
}).transform((v2) => {
|
|
41813
|
+
return remap(v2, {
|
|
41814
|
+
idempotencyKey: "idempotency-key",
|
|
41815
|
+
updateSubscriberRequestDto: "UpdateSubscriberRequestDto"
|
|
41816
|
+
});
|
|
41817
|
+
});
|
|
41818
|
+
((SubscribersV1ControllerUpdateSubscriberRequest$) => {
|
|
41819
|
+
SubscribersV1ControllerUpdateSubscriberRequest$.inboundSchema = SubscribersV1ControllerUpdateSubscriberRequest$inboundSchema;
|
|
41820
|
+
SubscribersV1ControllerUpdateSubscriberRequest$.outboundSchema = SubscribersV1ControllerUpdateSubscriberRequest$outboundSchema;
|
|
41821
|
+
})(SubscribersV1ControllerUpdateSubscriberRequest$ ||= {});
|
|
41822
|
+
SubscribersV1ControllerUpdateSubscriberResponse$inboundSchema = objectType({
|
|
41823
|
+
Headers: recordType(arrayType(stringType())),
|
|
41824
|
+
Result: SubscriberResponseDto$inboundSchema
|
|
41825
|
+
}).transform((v2) => {
|
|
41826
|
+
return remap(v2, {
|
|
41827
|
+
Headers: "headers",
|
|
41828
|
+
Result: "result"
|
|
41829
|
+
});
|
|
41830
|
+
});
|
|
41831
|
+
SubscribersV1ControllerUpdateSubscriberResponse$outboundSchema = objectType({
|
|
41832
|
+
headers: recordType(arrayType(stringType())),
|
|
41833
|
+
result: SubscriberResponseDto$outboundSchema
|
|
41834
|
+
}).transform((v2) => {
|
|
41835
|
+
return remap(v2, {
|
|
41836
|
+
headers: "Headers",
|
|
41837
|
+
result: "Result"
|
|
41838
|
+
});
|
|
41839
|
+
});
|
|
41840
|
+
((SubscribersV1ControllerUpdateSubscriberResponse$) => {
|
|
41841
|
+
SubscribersV1ControllerUpdateSubscriberResponse$.inboundSchema = SubscribersV1ControllerUpdateSubscriberResponse$inboundSchema;
|
|
41842
|
+
SubscribersV1ControllerUpdateSubscriberResponse$.outboundSchema = SubscribersV1ControllerUpdateSubscriberResponse$outboundSchema;
|
|
41843
|
+
})(SubscribersV1ControllerUpdateSubscriberResponse$ ||= {});
|
|
41844
|
+
});
|
|
41845
|
+
|
|
41756
41846
|
// src/models/operations/subscribersv1controllerupdatesubscriberchannel.ts
|
|
41757
41847
|
var SubscribersV1ControllerUpdateSubscriberChannelRequest$inboundSchema, SubscribersV1ControllerUpdateSubscriberChannelRequest$outboundSchema, SubscribersV1ControllerUpdateSubscriberChannelRequest$, SubscribersV1ControllerUpdateSubscriberChannelResponse$inboundSchema, SubscribersV1ControllerUpdateSubscriberChannelResponse$outboundSchema, SubscribersV1ControllerUpdateSubscriberChannelResponse$;
|
|
41758
41848
|
var init_subscribersv1controllerupdatesubscriberchannel = __esm(() => {
|
|
@@ -42310,6 +42400,7 @@ var init_operations = __esm(() => {
|
|
|
42310
42400
|
init_subscribersv1controllermarkallunreadasread();
|
|
42311
42401
|
init_subscribersv1controllermarkmessagesas();
|
|
42312
42402
|
init_subscribersv1controllermodifysubscriberchannel();
|
|
42403
|
+
init_subscribersv1controllerupdatesubscriber();
|
|
42313
42404
|
init_subscribersv1controllerupdatesubscriberchannel();
|
|
42314
42405
|
init_subscribersv1controllerupdatesubscriberonlineflag();
|
|
42315
42406
|
init_topicscontrollerassign();
|
|
@@ -47114,6 +47205,7 @@ async function $do35(client, request, options) {
|
|
|
47114
47205
|
after: payload.after,
|
|
47115
47206
|
before: payload.before,
|
|
47116
47207
|
email: payload.email,
|
|
47208
|
+
includeCursor: payload.includeCursor,
|
|
47117
47209
|
limit: payload.limit,
|
|
47118
47210
|
name: payload.name,
|
|
47119
47211
|
orderBy: payload.orderBy,
|
|
@@ -47234,11 +47326,154 @@ var init_subscribersSearch2 = __esm(() => {
|
|
|
47234
47326
|
};
|
|
47235
47327
|
});
|
|
47236
47328
|
|
|
47329
|
+
// src/funcs/subscribersUpsert.ts
|
|
47330
|
+
function subscribersUpsert(client, updateSubscriberRequestDto, subscriberId, idempotencyKey, options) {
|
|
47331
|
+
return new APIPromise($do36(client, updateSubscriberRequestDto, subscriberId, idempotencyKey, options));
|
|
47332
|
+
}
|
|
47333
|
+
async function $do36(client, updateSubscriberRequestDto, subscriberId, idempotencyKey, options) {
|
|
47334
|
+
const input = {
|
|
47335
|
+
updateSubscriberRequestDto,
|
|
47336
|
+
subscriberId,
|
|
47337
|
+
idempotencyKey
|
|
47338
|
+
};
|
|
47339
|
+
const parsed = safeParse(input, (value) => SubscribersV1ControllerUpdateSubscriberRequest$outboundSchema.parse(value), "Input validation failed");
|
|
47340
|
+
if (!parsed.ok) {
|
|
47341
|
+
return [parsed, { status: "invalid" }];
|
|
47342
|
+
}
|
|
47343
|
+
const payload = parsed.value;
|
|
47344
|
+
const body = encodeJSON("body", payload.UpdateSubscriberRequestDto, {
|
|
47345
|
+
explode: true
|
|
47346
|
+
});
|
|
47347
|
+
const pathParams = {
|
|
47348
|
+
subscriberId: encodeSimple("subscriberId", payload.subscriberId, {
|
|
47349
|
+
explode: false,
|
|
47350
|
+
charEncoding: "percent"
|
|
47351
|
+
})
|
|
47352
|
+
};
|
|
47353
|
+
const path = pathToFunc("/v1/subscribers/{subscriberId}")(pathParams);
|
|
47354
|
+
const headers = new Headers(compactMap({
|
|
47355
|
+
"Content-Type": "application/json",
|
|
47356
|
+
Accept: "application/json",
|
|
47357
|
+
"idempotency-key": encodeSimple("idempotency-key", payload["idempotency-key"], { explode: false, charEncoding: "none" })
|
|
47358
|
+
}));
|
|
47359
|
+
const secConfig = await extractSecurity(client._options.secretKey);
|
|
47360
|
+
const securityInput = secConfig == null ? {} : { secretKey: secConfig };
|
|
47361
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
47362
|
+
const context = {
|
|
47363
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
47364
|
+
operationID: "SubscribersV1Controller_updateSubscriber",
|
|
47365
|
+
oAuth2Scopes: [],
|
|
47366
|
+
resolvedSecurity: requestSecurity,
|
|
47367
|
+
securitySource: client._options.secretKey,
|
|
47368
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
47369
|
+
strategy: "backoff",
|
|
47370
|
+
backoff: {
|
|
47371
|
+
initialInterval: 1000,
|
|
47372
|
+
maxInterval: 30000,
|
|
47373
|
+
exponent: 1.5,
|
|
47374
|
+
maxElapsedTime: 3600000
|
|
47375
|
+
},
|
|
47376
|
+
retryConnectionErrors: true
|
|
47377
|
+
},
|
|
47378
|
+
retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"]
|
|
47379
|
+
};
|
|
47380
|
+
const requestRes = client._createRequest(context, {
|
|
47381
|
+
security: requestSecurity,
|
|
47382
|
+
method: "PUT",
|
|
47383
|
+
baseURL: options?.serverURL,
|
|
47384
|
+
path,
|
|
47385
|
+
headers,
|
|
47386
|
+
body,
|
|
47387
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
47388
|
+
}, options);
|
|
47389
|
+
if (!requestRes.ok) {
|
|
47390
|
+
return [requestRes, { status: "invalid" }];
|
|
47391
|
+
}
|
|
47392
|
+
const req = requestRes.value;
|
|
47393
|
+
const doResult = await client._do(req, {
|
|
47394
|
+
context,
|
|
47395
|
+
errorCodes: [
|
|
47396
|
+
"400",
|
|
47397
|
+
"401",
|
|
47398
|
+
"403",
|
|
47399
|
+
"404",
|
|
47400
|
+
"405",
|
|
47401
|
+
"409",
|
|
47402
|
+
"413",
|
|
47403
|
+
"414",
|
|
47404
|
+
"415",
|
|
47405
|
+
"422",
|
|
47406
|
+
"429",
|
|
47407
|
+
"4XX",
|
|
47408
|
+
"500",
|
|
47409
|
+
"503",
|
|
47410
|
+
"5XX"
|
|
47411
|
+
],
|
|
47412
|
+
retryConfig: context.retryConfig,
|
|
47413
|
+
retryCodes: context.retryCodes
|
|
47414
|
+
});
|
|
47415
|
+
if (!doResult.ok) {
|
|
47416
|
+
return [doResult, { status: "request-error", request: req }];
|
|
47417
|
+
}
|
|
47418
|
+
const response = doResult.value;
|
|
47419
|
+
const responseFields = {
|
|
47420
|
+
HttpMeta: { Response: response, Request: req }
|
|
47421
|
+
};
|
|
47422
|
+
const [result] = await match(json(200, SubscribersV1ControllerUpdateSubscriberResponse$inboundSchema, { hdrs: true, key: "Result" }), jsonErr(414, ErrorDto$inboundSchema), jsonErr([400, 401, 403, 404, 405, 409, 413, 415], ErrorDto$inboundSchema, { hdrs: true }), jsonErr(422, ValidationErrorDto$inboundSchema, { hdrs: true }), fail(429), jsonErr(500, ErrorDto$inboundSchema, { hdrs: true }), fail(503), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
47423
|
+
if (!result.ok) {
|
|
47424
|
+
return [result, { status: "complete", request: req, response }];
|
|
47425
|
+
}
|
|
47426
|
+
return [result, { status: "complete", request: req, response }];
|
|
47427
|
+
}
|
|
47428
|
+
var init_subscribersUpsert = __esm(() => {
|
|
47429
|
+
init_encodings();
|
|
47430
|
+
init_matchers();
|
|
47431
|
+
init_primitives();
|
|
47432
|
+
init_schemas();
|
|
47433
|
+
init_security();
|
|
47434
|
+
init_url();
|
|
47435
|
+
init_errors();
|
|
47436
|
+
init_operations();
|
|
47437
|
+
init_async();
|
|
47438
|
+
});
|
|
47439
|
+
|
|
47440
|
+
// src/mcp-server/tools/subscribersUpsert.ts
|
|
47441
|
+
var args36, tool$subscribersUpsert;
|
|
47442
|
+
var init_subscribersUpsert2 = __esm(() => {
|
|
47443
|
+
init_lib();
|
|
47444
|
+
init_subscribersUpsert();
|
|
47445
|
+
init_components();
|
|
47446
|
+
init_tools();
|
|
47447
|
+
args36 = {
|
|
47448
|
+
updateSubscriberRequestDto: UpdateSubscriberRequestDto$inboundSchema,
|
|
47449
|
+
subscriberId: stringType(),
|
|
47450
|
+
idempotencyKey: stringType().optional()
|
|
47451
|
+
};
|
|
47452
|
+
tool$subscribersUpsert = {
|
|
47453
|
+
name: "subscribers-upsert",
|
|
47454
|
+
description: `Upsert subscriber
|
|
47455
|
+
|
|
47456
|
+
Used to upsert the subscriber entity with new information`,
|
|
47457
|
+
args: args36,
|
|
47458
|
+
tool: async (client, args37, ctx) => {
|
|
47459
|
+
const [result, apiCall] = await subscribersUpsert(client, args37.updateSubscriberRequestDto, args37.subscriberId, args37.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
47460
|
+
if (!result.ok) {
|
|
47461
|
+
return {
|
|
47462
|
+
content: [{ type: "text", text: result.error.message }],
|
|
47463
|
+
isError: true
|
|
47464
|
+
};
|
|
47465
|
+
}
|
|
47466
|
+
const value = result.value.result;
|
|
47467
|
+
return formatResult(value, apiCall);
|
|
47468
|
+
}
|
|
47469
|
+
};
|
|
47470
|
+
});
|
|
47471
|
+
|
|
47237
47472
|
// src/funcs/topicsCreate.ts
|
|
47238
47473
|
function topicsCreate(client, createTopicRequestDto, idempotencyKey, options) {
|
|
47239
|
-
return new APIPromise($
|
|
47474
|
+
return new APIPromise($do37(client, createTopicRequestDto, idempotencyKey, options));
|
|
47240
47475
|
}
|
|
47241
|
-
async function $
|
|
47476
|
+
async function $do37(client, createTopicRequestDto, idempotencyKey, options) {
|
|
47242
47477
|
const input = {
|
|
47243
47478
|
createTopicRequestDto,
|
|
47244
47479
|
idempotencyKey
|
|
@@ -47342,13 +47577,13 @@ var init_topicsCreate = __esm(() => {
|
|
|
47342
47577
|
});
|
|
47343
47578
|
|
|
47344
47579
|
// src/mcp-server/tools/topicsCreate.ts
|
|
47345
|
-
var
|
|
47580
|
+
var args37, tool$topicsCreate;
|
|
47346
47581
|
var init_topicsCreate2 = __esm(() => {
|
|
47347
47582
|
init_lib();
|
|
47348
47583
|
init_topicsCreate();
|
|
47349
47584
|
init_components();
|
|
47350
47585
|
init_tools();
|
|
47351
|
-
|
|
47586
|
+
args37 = {
|
|
47352
47587
|
createTopicRequestDto: CreateTopicRequestDto$inboundSchema,
|
|
47353
47588
|
idempotencyKey: stringType().optional()
|
|
47354
47589
|
};
|
|
@@ -47357,9 +47592,9 @@ var init_topicsCreate2 = __esm(() => {
|
|
|
47357
47592
|
description: `Topic creation
|
|
47358
47593
|
|
|
47359
47594
|
Create a topic`,
|
|
47360
|
-
args:
|
|
47361
|
-
tool: async (client,
|
|
47362
|
-
const [result, apiCall] = await topicsCreate(client,
|
|
47595
|
+
args: args37,
|
|
47596
|
+
tool: async (client, args38, ctx) => {
|
|
47597
|
+
const [result, apiCall] = await topicsCreate(client, args38.createTopicRequestDto, args38.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
47363
47598
|
if (!result.ok) {
|
|
47364
47599
|
return {
|
|
47365
47600
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -47374,9 +47609,9 @@ Create a topic`,
|
|
|
47374
47609
|
|
|
47375
47610
|
// src/funcs/topicsDelete.ts
|
|
47376
47611
|
function topicsDelete(client, topicKey, idempotencyKey, options) {
|
|
47377
|
-
return new APIPromise($
|
|
47612
|
+
return new APIPromise($do38(client, topicKey, idempotencyKey, options));
|
|
47378
47613
|
}
|
|
47379
|
-
async function $
|
|
47614
|
+
async function $do38(client, topicKey, idempotencyKey, options) {
|
|
47380
47615
|
const input = {
|
|
47381
47616
|
topicKey,
|
|
47382
47617
|
idempotencyKey
|
|
@@ -47480,12 +47715,12 @@ var init_topicsDelete = __esm(() => {
|
|
|
47480
47715
|
});
|
|
47481
47716
|
|
|
47482
47717
|
// src/mcp-server/tools/topicsDelete.ts
|
|
47483
|
-
var
|
|
47718
|
+
var args38, tool$topicsDelete;
|
|
47484
47719
|
var init_topicsDelete2 = __esm(() => {
|
|
47485
47720
|
init_lib();
|
|
47486
47721
|
init_topicsDelete();
|
|
47487
47722
|
init_tools();
|
|
47488
|
-
|
|
47723
|
+
args38 = {
|
|
47489
47724
|
topicKey: stringType(),
|
|
47490
47725
|
idempotencyKey: stringType().optional()
|
|
47491
47726
|
};
|
|
@@ -47494,9 +47729,9 @@ var init_topicsDelete2 = __esm(() => {
|
|
|
47494
47729
|
description: `Delete topic
|
|
47495
47730
|
|
|
47496
47731
|
Delete a topic by its topic key if it has no subscribers`,
|
|
47497
|
-
args:
|
|
47498
|
-
tool: async (client,
|
|
47499
|
-
const [result, apiCall] = await topicsDelete(client,
|
|
47732
|
+
args: args38,
|
|
47733
|
+
tool: async (client, args39, ctx) => {
|
|
47734
|
+
const [result, apiCall] = await topicsDelete(client, args39.topicKey, args39.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
47500
47735
|
if (!result.ok) {
|
|
47501
47736
|
return {
|
|
47502
47737
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -47510,9 +47745,9 @@ Delete a topic by its topic key if it has no subscribers`,
|
|
|
47510
47745
|
|
|
47511
47746
|
// src/funcs/topicsList.ts
|
|
47512
47747
|
function topicsList(client, request, options) {
|
|
47513
|
-
return new APIPromise($
|
|
47748
|
+
return new APIPromise($do39(client, request, options));
|
|
47514
47749
|
}
|
|
47515
|
-
async function $
|
|
47750
|
+
async function $do39(client, request, options) {
|
|
47516
47751
|
const parsed = safeParse(request, (value) => TopicsControllerListTopicsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
47517
47752
|
if (!parsed.ok) {
|
|
47518
47753
|
return [parsed, { status: "invalid" }];
|
|
@@ -47615,12 +47850,12 @@ var init_topicsList = __esm(() => {
|
|
|
47615
47850
|
});
|
|
47616
47851
|
|
|
47617
47852
|
// src/mcp-server/tools/topicsList.ts
|
|
47618
|
-
var
|
|
47853
|
+
var args39, tool$topicsList;
|
|
47619
47854
|
var init_topicsList2 = __esm(() => {
|
|
47620
47855
|
init_topicsList();
|
|
47621
47856
|
init_operations();
|
|
47622
47857
|
init_tools();
|
|
47623
|
-
|
|
47858
|
+
args39 = {
|
|
47624
47859
|
request: TopicsControllerListTopicsRequest$inboundSchema
|
|
47625
47860
|
};
|
|
47626
47861
|
tool$topicsList = {
|
|
@@ -47628,9 +47863,9 @@ var init_topicsList2 = __esm(() => {
|
|
|
47628
47863
|
description: `Get topic list filtered
|
|
47629
47864
|
|
|
47630
47865
|
Returns a list of topics that can be paginated using the \`page\` query parameter and filtered by the topic key with the \`key\` query parameter`,
|
|
47631
|
-
args:
|
|
47632
|
-
tool: async (client,
|
|
47633
|
-
const [result, apiCall] = await topicsList(client,
|
|
47866
|
+
args: args39,
|
|
47867
|
+
tool: async (client, args40, ctx) => {
|
|
47868
|
+
const [result, apiCall] = await topicsList(client, args40.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
47634
47869
|
if (!result.ok) {
|
|
47635
47870
|
return {
|
|
47636
47871
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -47645,9 +47880,9 @@ Returns a list of topics that can be paginated using the \`page\` query paramete
|
|
|
47645
47880
|
|
|
47646
47881
|
// src/funcs/topicsRename.ts
|
|
47647
47882
|
function topicsRename(client, renameTopicRequestDto, topicKey, idempotencyKey, options) {
|
|
47648
|
-
return new APIPromise($
|
|
47883
|
+
return new APIPromise($do40(client, renameTopicRequestDto, topicKey, idempotencyKey, options));
|
|
47649
47884
|
}
|
|
47650
|
-
async function $
|
|
47885
|
+
async function $do40(client, renameTopicRequestDto, topicKey, idempotencyKey, options) {
|
|
47651
47886
|
const input = {
|
|
47652
47887
|
renameTopicRequestDto,
|
|
47653
47888
|
topicKey,
|
|
@@ -47758,13 +47993,13 @@ var init_topicsRename = __esm(() => {
|
|
|
47758
47993
|
});
|
|
47759
47994
|
|
|
47760
47995
|
// src/mcp-server/tools/topicsRename.ts
|
|
47761
|
-
var
|
|
47996
|
+
var args40, tool$topicsRename;
|
|
47762
47997
|
var init_topicsRename2 = __esm(() => {
|
|
47763
47998
|
init_lib();
|
|
47764
47999
|
init_topicsRename();
|
|
47765
48000
|
init_components();
|
|
47766
48001
|
init_tools();
|
|
47767
|
-
|
|
48002
|
+
args40 = {
|
|
47768
48003
|
renameTopicRequestDto: RenameTopicRequestDto$inboundSchema,
|
|
47769
48004
|
topicKey: stringType(),
|
|
47770
48005
|
idempotencyKey: stringType().optional()
|
|
@@ -47774,9 +48009,9 @@ var init_topicsRename2 = __esm(() => {
|
|
|
47774
48009
|
description: `Rename a topic
|
|
47775
48010
|
|
|
47776
48011
|
Rename a topic by providing a new name`,
|
|
47777
|
-
args:
|
|
47778
|
-
tool: async (client,
|
|
47779
|
-
const [result, apiCall] = await topicsRename(client,
|
|
48012
|
+
args: args40,
|
|
48013
|
+
tool: async (client, args41, ctx) => {
|
|
48014
|
+
const [result, apiCall] = await topicsRename(client, args41.renameTopicRequestDto, args41.topicKey, args41.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
47780
48015
|
if (!result.ok) {
|
|
47781
48016
|
return {
|
|
47782
48017
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -47791,9 +48026,9 @@ Rename a topic by providing a new name`,
|
|
|
47791
48026
|
|
|
47792
48027
|
// src/funcs/topicsRetrieve.ts
|
|
47793
48028
|
function topicsRetrieve(client, topicKey, idempotencyKey, options) {
|
|
47794
|
-
return new APIPromise($
|
|
48029
|
+
return new APIPromise($do41(client, topicKey, idempotencyKey, options));
|
|
47795
48030
|
}
|
|
47796
|
-
async function $
|
|
48031
|
+
async function $do41(client, topicKey, idempotencyKey, options) {
|
|
47797
48032
|
const input = {
|
|
47798
48033
|
topicKey,
|
|
47799
48034
|
idempotencyKey
|
|
@@ -47900,12 +48135,12 @@ var init_topicsRetrieve = __esm(() => {
|
|
|
47900
48135
|
});
|
|
47901
48136
|
|
|
47902
48137
|
// src/mcp-server/tools/topicsRetrieve.ts
|
|
47903
|
-
var
|
|
48138
|
+
var args41, tool$topicsRetrieve;
|
|
47904
48139
|
var init_topicsRetrieve2 = __esm(() => {
|
|
47905
48140
|
init_lib();
|
|
47906
48141
|
init_topicsRetrieve();
|
|
47907
48142
|
init_tools();
|
|
47908
|
-
|
|
48143
|
+
args41 = {
|
|
47909
48144
|
topicKey: stringType(),
|
|
47910
48145
|
idempotencyKey: stringType().optional()
|
|
47911
48146
|
};
|
|
@@ -47914,9 +48149,9 @@ var init_topicsRetrieve2 = __esm(() => {
|
|
|
47914
48149
|
description: `Get topic
|
|
47915
48150
|
|
|
47916
48151
|
Get a topic by its topic key`,
|
|
47917
|
-
args:
|
|
47918
|
-
tool: async (client,
|
|
47919
|
-
const [result, apiCall] = await topicsRetrieve(client,
|
|
48152
|
+
args: args41,
|
|
48153
|
+
tool: async (client, args42, ctx) => {
|
|
48154
|
+
const [result, apiCall] = await topicsRetrieve(client, args42.topicKey, args42.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
47920
48155
|
if (!result.ok) {
|
|
47921
48156
|
return {
|
|
47922
48157
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -47931,9 +48166,9 @@ Get a topic by its topic key`,
|
|
|
47931
48166
|
|
|
47932
48167
|
// src/funcs/topicsSubscribersAssign.ts
|
|
47933
48168
|
function topicsSubscribersAssign(client, addSubscribersRequestDto, topicKey, idempotencyKey, options) {
|
|
47934
|
-
return new APIPromise($
|
|
48169
|
+
return new APIPromise($do42(client, addSubscribersRequestDto, topicKey, idempotencyKey, options));
|
|
47935
48170
|
}
|
|
47936
|
-
async function $
|
|
48171
|
+
async function $do42(client, addSubscribersRequestDto, topicKey, idempotencyKey, options) {
|
|
47937
48172
|
const input = {
|
|
47938
48173
|
addSubscribersRequestDto,
|
|
47939
48174
|
topicKey,
|
|
@@ -48044,13 +48279,13 @@ var init_topicsSubscribersAssign = __esm(() => {
|
|
|
48044
48279
|
});
|
|
48045
48280
|
|
|
48046
48281
|
// src/mcp-server/tools/topicsSubscribersAssign.ts
|
|
48047
|
-
var
|
|
48282
|
+
var args42, tool$topicsSubscribersAssign;
|
|
48048
48283
|
var init_topicsSubscribersAssign2 = __esm(() => {
|
|
48049
48284
|
init_lib();
|
|
48050
48285
|
init_topicsSubscribersAssign();
|
|
48051
48286
|
init_components();
|
|
48052
48287
|
init_tools();
|
|
48053
|
-
|
|
48288
|
+
args42 = {
|
|
48054
48289
|
addSubscribersRequestDto: AddSubscribersRequestDto$inboundSchema,
|
|
48055
48290
|
topicKey: stringType(),
|
|
48056
48291
|
idempotencyKey: stringType().optional()
|
|
@@ -48060,9 +48295,9 @@ var init_topicsSubscribersAssign2 = __esm(() => {
|
|
|
48060
48295
|
description: `Subscribers addition
|
|
48061
48296
|
|
|
48062
48297
|
Add subscribers to a topic by key`,
|
|
48063
|
-
args:
|
|
48064
|
-
tool: async (client,
|
|
48065
|
-
const [result, apiCall] = await topicsSubscribersAssign(client,
|
|
48298
|
+
args: args42,
|
|
48299
|
+
tool: async (client, args43, ctx) => {
|
|
48300
|
+
const [result, apiCall] = await topicsSubscribersAssign(client, args43.addSubscribersRequestDto, args43.topicKey, args43.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
48066
48301
|
if (!result.ok) {
|
|
48067
48302
|
return {
|
|
48068
48303
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -48077,9 +48312,9 @@ Add subscribers to a topic by key`,
|
|
|
48077
48312
|
|
|
48078
48313
|
// src/funcs/topicsSubscribersRemove.ts
|
|
48079
48314
|
function topicsSubscribersRemove(client, removeSubscribersRequestDto, topicKey, idempotencyKey, options) {
|
|
48080
|
-
return new APIPromise($
|
|
48315
|
+
return new APIPromise($do43(client, removeSubscribersRequestDto, topicKey, idempotencyKey, options));
|
|
48081
48316
|
}
|
|
48082
|
-
async function $
|
|
48317
|
+
async function $do43(client, removeSubscribersRequestDto, topicKey, idempotencyKey, options) {
|
|
48083
48318
|
const input = {
|
|
48084
48319
|
removeSubscribersRequestDto,
|
|
48085
48320
|
topicKey,
|
|
@@ -48187,13 +48422,13 @@ var init_topicsSubscribersRemove = __esm(() => {
|
|
|
48187
48422
|
});
|
|
48188
48423
|
|
|
48189
48424
|
// src/mcp-server/tools/topicsSubscribersRemove.ts
|
|
48190
|
-
var
|
|
48425
|
+
var args43, tool$topicsSubscribersRemove;
|
|
48191
48426
|
var init_topicsSubscribersRemove2 = __esm(() => {
|
|
48192
48427
|
init_lib();
|
|
48193
48428
|
init_topicsSubscribersRemove();
|
|
48194
48429
|
init_components();
|
|
48195
48430
|
init_tools();
|
|
48196
|
-
|
|
48431
|
+
args43 = {
|
|
48197
48432
|
removeSubscribersRequestDto: RemoveSubscribersRequestDto$inboundSchema,
|
|
48198
48433
|
topicKey: stringType(),
|
|
48199
48434
|
idempotencyKey: stringType().optional()
|
|
@@ -48203,9 +48438,9 @@ var init_topicsSubscribersRemove2 = __esm(() => {
|
|
|
48203
48438
|
description: `Subscribers removal
|
|
48204
48439
|
|
|
48205
48440
|
Remove subscribers from a topic`,
|
|
48206
|
-
args:
|
|
48207
|
-
tool: async (client,
|
|
48208
|
-
const [result, apiCall] = await topicsSubscribersRemove(client,
|
|
48441
|
+
args: args43,
|
|
48442
|
+
tool: async (client, args44, ctx) => {
|
|
48443
|
+
const [result, apiCall] = await topicsSubscribersRemove(client, args44.removeSubscribersRequestDto, args44.topicKey, args44.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
48209
48444
|
if (!result.ok) {
|
|
48210
48445
|
return {
|
|
48211
48446
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -48219,9 +48454,9 @@ Remove subscribers from a topic`,
|
|
|
48219
48454
|
|
|
48220
48455
|
// src/funcs/topicsSubscribersRetrieve.ts
|
|
48221
48456
|
function topicsSubscribersRetrieve(client, externalSubscriberId, topicKey, idempotencyKey, options) {
|
|
48222
|
-
return new APIPromise($
|
|
48457
|
+
return new APIPromise($do44(client, externalSubscriberId, topicKey, idempotencyKey, options));
|
|
48223
48458
|
}
|
|
48224
|
-
async function $
|
|
48459
|
+
async function $do44(client, externalSubscriberId, topicKey, idempotencyKey, options) {
|
|
48225
48460
|
const input = {
|
|
48226
48461
|
externalSubscriberId,
|
|
48227
48462
|
topicKey,
|
|
@@ -48327,12 +48562,12 @@ var init_topicsSubscribersRetrieve = __esm(() => {
|
|
|
48327
48562
|
});
|
|
48328
48563
|
|
|
48329
48564
|
// src/mcp-server/tools/topicsSubscribersRetrieve.ts
|
|
48330
|
-
var
|
|
48565
|
+
var args44, tool$topicsSubscribersRetrieve;
|
|
48331
48566
|
var init_topicsSubscribersRetrieve2 = __esm(() => {
|
|
48332
48567
|
init_lib();
|
|
48333
48568
|
init_topicsSubscribersRetrieve();
|
|
48334
48569
|
init_tools();
|
|
48335
|
-
|
|
48570
|
+
args44 = {
|
|
48336
48571
|
externalSubscriberId: stringType(),
|
|
48337
48572
|
topicKey: stringType(),
|
|
48338
48573
|
idempotencyKey: stringType().optional()
|
|
@@ -48342,9 +48577,9 @@ var init_topicsSubscribersRetrieve2 = __esm(() => {
|
|
|
48342
48577
|
description: `Check topic subscriber
|
|
48343
48578
|
|
|
48344
48579
|
Check if a subscriber belongs to a certain topic`,
|
|
48345
|
-
args:
|
|
48346
|
-
tool: async (client,
|
|
48347
|
-
const [result, apiCall] = await topicsSubscribersRetrieve(client,
|
|
48580
|
+
args: args44,
|
|
48581
|
+
tool: async (client, args45, ctx) => {
|
|
48582
|
+
const [result, apiCall] = await topicsSubscribersRetrieve(client, args45.externalSubscriberId, args45.topicKey, args45.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
48348
48583
|
if (!result.ok) {
|
|
48349
48584
|
return {
|
|
48350
48585
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -48359,9 +48594,9 @@ Check if a subscriber belongs to a certain topic`,
|
|
|
48359
48594
|
|
|
48360
48595
|
// src/funcs/trigger.ts
|
|
48361
48596
|
function trigger(client, triggerEventRequestDto, idempotencyKey, options) {
|
|
48362
|
-
return new APIPromise($
|
|
48597
|
+
return new APIPromise($do45(client, triggerEventRequestDto, idempotencyKey, options));
|
|
48363
48598
|
}
|
|
48364
|
-
async function $
|
|
48599
|
+
async function $do45(client, triggerEventRequestDto, idempotencyKey, options) {
|
|
48365
48600
|
const input = {
|
|
48366
48601
|
triggerEventRequestDto,
|
|
48367
48602
|
idempotencyKey
|
|
@@ -48465,13 +48700,13 @@ var init_trigger = __esm(() => {
|
|
|
48465
48700
|
});
|
|
48466
48701
|
|
|
48467
48702
|
// src/mcp-server/tools/trigger.ts
|
|
48468
|
-
var
|
|
48703
|
+
var args45, tool$trigger;
|
|
48469
48704
|
var init_trigger2 = __esm(() => {
|
|
48470
48705
|
init_lib();
|
|
48471
48706
|
init_trigger();
|
|
48472
48707
|
init_components();
|
|
48473
48708
|
init_tools();
|
|
48474
|
-
|
|
48709
|
+
args45 = {
|
|
48475
48710
|
triggerEventRequestDto: TriggerEventRequestDto$inboundSchema,
|
|
48476
48711
|
idempotencyKey: stringType().optional()
|
|
48477
48712
|
};
|
|
@@ -48484,9 +48719,9 @@ var init_trigger2 = __esm(() => {
|
|
|
48484
48719
|
The trigger identifier is used to match the particular workflow associated with it.
|
|
48485
48720
|
Additional information can be passed according the body interface below.
|
|
48486
48721
|
`,
|
|
48487
|
-
args:
|
|
48488
|
-
tool: async (client,
|
|
48489
|
-
const [result, apiCall] = await trigger(client,
|
|
48722
|
+
args: args45,
|
|
48723
|
+
tool: async (client, args46, ctx) => {
|
|
48724
|
+
const [result, apiCall] = await trigger(client, args46.triggerEventRequestDto, args46.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
48490
48725
|
if (!result.ok) {
|
|
48491
48726
|
return {
|
|
48492
48727
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -48501,9 +48736,9 @@ var init_trigger2 = __esm(() => {
|
|
|
48501
48736
|
|
|
48502
48737
|
// src/funcs/triggerBroadcast.ts
|
|
48503
48738
|
function triggerBroadcast(client, triggerEventToAllRequestDto, idempotencyKey, options) {
|
|
48504
|
-
return new APIPromise($
|
|
48739
|
+
return new APIPromise($do46(client, triggerEventToAllRequestDto, idempotencyKey, options));
|
|
48505
48740
|
}
|
|
48506
|
-
async function $
|
|
48741
|
+
async function $do46(client, triggerEventToAllRequestDto, idempotencyKey, options) {
|
|
48507
48742
|
const input = {
|
|
48508
48743
|
triggerEventToAllRequestDto,
|
|
48509
48744
|
idempotencyKey
|
|
@@ -48604,13 +48839,13 @@ var init_triggerBroadcast = __esm(() => {
|
|
|
48604
48839
|
});
|
|
48605
48840
|
|
|
48606
48841
|
// src/mcp-server/tools/triggerBroadcast.ts
|
|
48607
|
-
var
|
|
48842
|
+
var args46, tool$triggerBroadcast;
|
|
48608
48843
|
var init_triggerBroadcast2 = __esm(() => {
|
|
48609
48844
|
init_lib();
|
|
48610
48845
|
init_triggerBroadcast();
|
|
48611
48846
|
init_components();
|
|
48612
48847
|
init_tools();
|
|
48613
|
-
|
|
48848
|
+
args46 = {
|
|
48614
48849
|
triggerEventToAllRequestDto: TriggerEventToAllRequestDto$inboundSchema,
|
|
48615
48850
|
idempotencyKey: stringType().optional()
|
|
48616
48851
|
};
|
|
@@ -48620,9 +48855,9 @@ var init_triggerBroadcast2 = __esm(() => {
|
|
|
48620
48855
|
|
|
48621
48856
|
Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.
|
|
48622
48857
|
In the future could be used to trigger events to a subset of subscribers based on defined filters.`,
|
|
48623
|
-
args:
|
|
48624
|
-
tool: async (client,
|
|
48625
|
-
const [result, apiCall] = await triggerBroadcast(client,
|
|
48858
|
+
args: args46,
|
|
48859
|
+
tool: async (client, args47, ctx) => {
|
|
48860
|
+
const [result, apiCall] = await triggerBroadcast(client, args47.triggerEventToAllRequestDto, args47.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
48626
48861
|
if (!result.ok) {
|
|
48627
48862
|
return {
|
|
48628
48863
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -48637,9 +48872,9 @@ Trigger a broadcast event to all existing subscribers, could be used to send ann
|
|
|
48637
48872
|
|
|
48638
48873
|
// src/funcs/triggerBulk.ts
|
|
48639
48874
|
function triggerBulk(client, bulkTriggerEventDto, idempotencyKey, options) {
|
|
48640
|
-
return new APIPromise($
|
|
48875
|
+
return new APIPromise($do47(client, bulkTriggerEventDto, idempotencyKey, options));
|
|
48641
48876
|
}
|
|
48642
|
-
async function $
|
|
48877
|
+
async function $do47(client, bulkTriggerEventDto, idempotencyKey, options) {
|
|
48643
48878
|
const input = {
|
|
48644
48879
|
bulkTriggerEventDto,
|
|
48645
48880
|
idempotencyKey
|
|
@@ -48743,13 +48978,13 @@ var init_triggerBulk = __esm(() => {
|
|
|
48743
48978
|
});
|
|
48744
48979
|
|
|
48745
48980
|
// src/mcp-server/tools/triggerBulk.ts
|
|
48746
|
-
var
|
|
48981
|
+
var args47, tool$triggerBulk;
|
|
48747
48982
|
var init_triggerBulk2 = __esm(() => {
|
|
48748
48983
|
init_lib();
|
|
48749
48984
|
init_triggerBulk();
|
|
48750
48985
|
init_components();
|
|
48751
48986
|
init_tools();
|
|
48752
|
-
|
|
48987
|
+
args47 = {
|
|
48753
48988
|
bulkTriggerEventDto: BulkTriggerEventDto$inboundSchema,
|
|
48754
48989
|
idempotencyKey: stringType().optional()
|
|
48755
48990
|
};
|
|
@@ -48761,9 +48996,9 @@ var init_triggerBulk2 = __esm(() => {
|
|
|
48761
48996
|
Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.
|
|
48762
48997
|
The bulk API is limited to 100 events per request.
|
|
48763
48998
|
`,
|
|
48764
|
-
args:
|
|
48765
|
-
tool: async (client,
|
|
48766
|
-
const [result, apiCall] = await triggerBulk(client,
|
|
48999
|
+
args: args47,
|
|
49000
|
+
tool: async (client, args48, ctx) => {
|
|
49001
|
+
const [result, apiCall] = await triggerBulk(client, args48.bulkTriggerEventDto, args48.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
48767
49002
|
if (!result.ok) {
|
|
48768
49003
|
return {
|
|
48769
49004
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -48780,7 +49015,7 @@ var init_triggerBulk2 = __esm(() => {
|
|
|
48780
49015
|
function createMCPServer(deps) {
|
|
48781
49016
|
const server = new McpServer({
|
|
48782
49017
|
name: "Novu",
|
|
48783
|
-
version: "0.6.
|
|
49018
|
+
version: "0.6.2"
|
|
48784
49019
|
});
|
|
48785
49020
|
const client = new NovuCore({
|
|
48786
49021
|
secretKey: deps.secretKey,
|
|
@@ -48804,6 +49039,7 @@ function createMCPServer(deps) {
|
|
|
48804
49039
|
tool(tool$subscribersPatch);
|
|
48805
49040
|
tool(tool$subscribersDelete);
|
|
48806
49041
|
tool(tool$subscribersList);
|
|
49042
|
+
tool(tool$subscribersUpsert);
|
|
48807
49043
|
tool(tool$subscribersCreateBulk);
|
|
48808
49044
|
tool(tool$integrationsList);
|
|
48809
49045
|
tool(tool$integrationsCreate);
|
|
@@ -48883,6 +49119,7 @@ var init_server2 = __esm(() => {
|
|
|
48883
49119
|
init_subscribersPropertiesUpdateOnlineFlag2();
|
|
48884
49120
|
init_subscribersRetrieve2();
|
|
48885
49121
|
init_subscribersSearch2();
|
|
49122
|
+
init_subscribersUpsert2();
|
|
48886
49123
|
init_topicsCreate2();
|
|
48887
49124
|
init_topicsDelete2();
|
|
48888
49125
|
init_topicsList2();
|
|
@@ -50083,7 +50320,7 @@ var routes = rn({
|
|
|
50083
50320
|
var app = Ve(routes, {
|
|
50084
50321
|
name: "mcp",
|
|
50085
50322
|
versionInfo: {
|
|
50086
|
-
currentVersion: "0.6.
|
|
50323
|
+
currentVersion: "0.6.2"
|
|
50087
50324
|
}
|
|
50088
50325
|
});
|
|
50089
50326
|
_t(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -50091,5 +50328,5 @@ export {
|
|
|
50091
50328
|
app
|
|
50092
50329
|
};
|
|
50093
50330
|
|
|
50094
|
-
//# debugId=
|
|
50331
|
+
//# debugId=0124D112E064DBEC64756E2164756E21
|
|
50095
50332
|
//# sourceMappingURL=mcp-server.js.map
|