@kohost/api-client 4.19.5 → 4.19.8-beta.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/dist/cjs/httpClient.d.cts +3 -7
- package/dist/cjs/{index-BjziDwt4.d.cts → index-1ZtkIYkt.d.cts} +3 -11
- package/dist/cjs/index.d.cts +2 -6
- package/dist/cjs/models/session.cjs +3 -2
- package/dist/cjs/models/session.cjs.map +1 -1
- package/dist/cjs/schemas/session.cjs +1 -3
- package/dist/cjs/schemas/session.cjs.map +1 -1
- package/dist/cjs/schemas/session.d.cts +1 -1
- package/dist/cjs/useCases/index.cjs +3 -15
- package/dist/cjs/useCases/index.cjs.map +1 -1
- package/dist/cjs/useCases/index.d.cts +1 -5
- package/dist/cjs/useCases/{listNotifications.cjs → listIntegrations.cjs} +12 -12
- package/dist/cjs/useCases/listIntegrations.cjs.map +1 -0
- package/dist/{esm/useCases/listNotifications.d.ts → cjs/useCases/listIntegrations.d.cts} +6 -6
- package/dist/cjs/validate.d.cts +0 -6
- package/dist/esm/httpClient.d.ts +3 -7
- package/dist/esm/{index-CY1L0nkI.d.ts → index-GPnaIdEY.d.ts} +3 -11
- package/dist/esm/index.d.ts +2 -6
- package/dist/esm/models/session.js +3 -2
- package/dist/esm/models/session.js.map +1 -1
- package/dist/esm/schemas/session.d.ts +1 -1
- package/dist/esm/schemas/session.js +1 -3
- package/dist/esm/schemas/session.js.map +1 -1
- package/dist/esm/useCases/index.d.ts +1 -5
- package/dist/esm/useCases/index.js +2 -10
- package/dist/esm/useCases/index.js.map +1 -1
- package/dist/{cjs/useCases/listNotifications.d.cts → esm/useCases/listIntegrations.d.ts} +6 -6
- package/dist/esm/useCases/{listNotifications.js → listIntegrations.js} +8 -8
- package/dist/esm/useCases/listIntegrations.js.map +1 -0
- package/dist/esm/validate.d.ts +0 -6
- package/package.json +1 -1
- package/dist/cjs/useCases/createNotification.cjs +0 -72
- package/dist/cjs/useCases/createNotification.cjs.map +0 -1
- package/dist/cjs/useCases/createNotification.d.cts +0 -29
- package/dist/cjs/useCases/deleteNotification.cjs +0 -72
- package/dist/cjs/useCases/deleteNotification.cjs.map +0 -1
- package/dist/cjs/useCases/deleteNotification.d.cts +0 -38
- package/dist/cjs/useCases/describeNotification.cjs +0 -72
- package/dist/cjs/useCases/describeNotification.cjs.map +0 -1
- package/dist/cjs/useCases/describeNotification.d.cts +0 -38
- package/dist/cjs/useCases/listNotifications.cjs.map +0 -1
- package/dist/cjs/useCases/updateNotification.cjs +0 -72
- package/dist/cjs/useCases/updateNotification.cjs.map +0 -1
- package/dist/cjs/useCases/updateNotification.d.cts +0 -38
- package/dist/esm/useCases/createNotification.d.ts +0 -29
- package/dist/esm/useCases/createNotification.js +0 -50
- package/dist/esm/useCases/createNotification.js.map +0 -1
- package/dist/esm/useCases/deleteNotification.d.ts +0 -38
- package/dist/esm/useCases/deleteNotification.js +0 -50
- package/dist/esm/useCases/deleteNotification.js.map +0 -1
- package/dist/esm/useCases/describeNotification.d.ts +0 -38
- package/dist/esm/useCases/describeNotification.js +0 -50
- package/dist/esm/useCases/describeNotification.js.map +0 -1
- package/dist/esm/useCases/listNotifications.js.map +0 -1
- package/dist/esm/useCases/updateNotification.d.ts +0 -38
- package/dist/esm/useCases/updateNotification.js +0 -50
- package/dist/esm/useCases/updateNotification.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
class
|
|
3
|
+
class ListIntegrationsCommand {
|
|
4
4
|
static {
|
|
5
|
-
__name(this, "
|
|
5
|
+
__name(this, "ListIntegrationsCommand");
|
|
6
6
|
}
|
|
7
7
|
url;
|
|
8
8
|
data;
|
|
@@ -10,15 +10,15 @@ class ListNotificationsCommand {
|
|
|
10
10
|
headers;
|
|
11
11
|
config;
|
|
12
12
|
static params = [];
|
|
13
|
-
static url = "/
|
|
13
|
+
static url = "/integrations";
|
|
14
14
|
static method = "get";
|
|
15
15
|
constructor(commandConfig, options = {}) {
|
|
16
|
-
const pathParams =
|
|
16
|
+
const pathParams = ListIntegrationsCommand.params;
|
|
17
17
|
let { data, query, headers } = commandConfig ?? {};
|
|
18
18
|
if (typeof data === "undefined") data = null;
|
|
19
19
|
if (typeof query === "undefined") query = null;
|
|
20
20
|
if (typeof headers === "undefined") headers = null;
|
|
21
|
-
let url =
|
|
21
|
+
let url = ListIntegrationsCommand.url;
|
|
22
22
|
if (pathParams && data) {
|
|
23
23
|
for (const param of pathParams) {
|
|
24
24
|
const urlParam = ":" + param;
|
|
@@ -35,7 +35,7 @@ class ListNotificationsCommand {
|
|
|
35
35
|
this.query = query;
|
|
36
36
|
this.headers = headers;
|
|
37
37
|
this.config = {
|
|
38
|
-
method:
|
|
38
|
+
method: ListIntegrationsCommand.method,
|
|
39
39
|
url,
|
|
40
40
|
data,
|
|
41
41
|
params: query,
|
|
@@ -45,6 +45,6 @@ class ListNotificationsCommand {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
ListIntegrationsCommand
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=
|
|
50
|
+
//# sourceMappingURL=listIntegrations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../.generated/useCases/listIntegrations.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface ListIntegrationsCommandConfig {\n data?: Record<string, unknown> | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface ListIntegrationsCommandRequestConfig {\n method: \"get\";\n url: string;\n data: Record<string, unknown> | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class ListIntegrationsCommand {\n url: string;\n data: Record<string, unknown> | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: ListIntegrationsCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/integrations\";\n static method = \"get\" as const;\n\n constructor(\n commandConfig: ListIntegrationsCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = ListIntegrationsCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = ListIntegrationsCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: ListIntegrationsCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;AAoBO,MAAM,wBAAwB;AAAA,EApBrC,OAoBqC;AAAA;AAAA;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC;AAAA,EACjB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,wBAAwB;AAE3C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,wBAAwB;AAE1C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,wBAAwB;AAAA,MAChC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
package/dist/esm/validate.d.ts
CHANGED
|
@@ -495,23 +495,17 @@ declare const validateServer: ajv.ValidateFunction<{
|
|
|
495
495
|
type: any;
|
|
496
496
|
}>;
|
|
497
497
|
declare const validateSession: ajv.ValidateFunction<{
|
|
498
|
-
data: any;
|
|
499
498
|
id: any;
|
|
500
499
|
type: any;
|
|
501
500
|
expires: any;
|
|
502
|
-
organizationId: any;
|
|
503
501
|
userId: any;
|
|
504
502
|
userAgent: any;
|
|
505
|
-
} & {
|
|
506
|
-
data: any;
|
|
507
503
|
} & {
|
|
508
504
|
id: any;
|
|
509
505
|
} & {
|
|
510
506
|
type: any;
|
|
511
507
|
} & {
|
|
512
508
|
expires: any;
|
|
513
|
-
} & {
|
|
514
|
-
organizationId: any;
|
|
515
509
|
} & {
|
|
516
510
|
userId: any;
|
|
517
511
|
} & {
|
package/package.json
CHANGED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var createNotification_exports = {};
|
|
20
|
-
__export(createNotification_exports, {
|
|
21
|
-
CreateNotificationCommand: () => CreateNotificationCommand
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(createNotification_exports);
|
|
24
|
-
class CreateNotificationCommand {
|
|
25
|
-
static {
|
|
26
|
-
__name(this, "CreateNotificationCommand");
|
|
27
|
-
}
|
|
28
|
-
url;
|
|
29
|
-
data;
|
|
30
|
-
query;
|
|
31
|
-
headers;
|
|
32
|
-
config;
|
|
33
|
-
static params = [];
|
|
34
|
-
static url = "/notifications";
|
|
35
|
-
static method = "post";
|
|
36
|
-
constructor(commandConfig, options = {}) {
|
|
37
|
-
const pathParams = CreateNotificationCommand.params;
|
|
38
|
-
let { data, query, headers } = commandConfig ?? {};
|
|
39
|
-
if (typeof data === "undefined") data = null;
|
|
40
|
-
if (typeof query === "undefined") query = null;
|
|
41
|
-
if (typeof headers === "undefined") headers = null;
|
|
42
|
-
let url = CreateNotificationCommand.url;
|
|
43
|
-
if (pathParams && data) {
|
|
44
|
-
for (const param of pathParams) {
|
|
45
|
-
const urlParam = ":" + param;
|
|
46
|
-
url = url.replace(urlParam, data[param]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
50
|
-
if (missingParams) {
|
|
51
|
-
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
52
|
-
throw new Error("Missing parameters: " + missing.join(", "));
|
|
53
|
-
}
|
|
54
|
-
this.url = url;
|
|
55
|
-
this.data = data;
|
|
56
|
-
this.query = query;
|
|
57
|
-
this.headers = headers;
|
|
58
|
-
this.config = {
|
|
59
|
-
method: CreateNotificationCommand.method,
|
|
60
|
-
url,
|
|
61
|
-
data,
|
|
62
|
-
params: query,
|
|
63
|
-
headers,
|
|
64
|
-
...options
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
-
0 && (module.exports = {
|
|
70
|
-
CreateNotificationCommand
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=createNotification.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/useCases/createNotification.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface CreateNotificationCommandConfig {\n data?: Record<string, unknown> | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface CreateNotificationCommandRequestConfig {\n method: \"post\";\n url: string;\n data: Record<string, unknown> | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class CreateNotificationCommand {\n url: string;\n data: Record<string, unknown> | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: CreateNotificationCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/notifications\";\n static method = \"post\" as const;\n\n constructor(\n commandConfig: CreateNotificationCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = CreateNotificationCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = CreateNotificationCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: CreateNotificationCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,0BAA0B;AAAA,EApBvC,OAoBuC;AAAA;AAAA;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC;AAAA,EACjB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,0BAA0B;AAE7C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,0BAA0B;AAE5C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,0BAA0B;AAAA,MAClC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
interface CreateNotificationCommandConfig {
|
|
2
|
-
data?: Record<string, unknown> | null;
|
|
3
|
-
headers?: Record<string, string> | null;
|
|
4
|
-
query?: Record<string, unknown> | null;
|
|
5
|
-
}
|
|
6
|
-
interface CreateNotificationCommandRequestConfig {
|
|
7
|
-
method: "post";
|
|
8
|
-
url: string;
|
|
9
|
-
data: Record<string, unknown> | null;
|
|
10
|
-
params: Record<string, unknown> | null;
|
|
11
|
-
headers: Record<string, string> | null;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
declare class CreateNotificationCommand {
|
|
18
|
-
url: string;
|
|
19
|
-
data: Record<string, unknown> | null;
|
|
20
|
-
query: Record<string, unknown> | null;
|
|
21
|
-
headers: Record<string, string> | null;
|
|
22
|
-
config: CreateNotificationCommandRequestConfig;
|
|
23
|
-
static params: readonly [];
|
|
24
|
-
static url: string;
|
|
25
|
-
static method: "post";
|
|
26
|
-
constructor(commandConfig: CreateNotificationCommandConfig, options?: Record<string, unknown>);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { CreateNotificationCommand, type CreateNotificationCommandConfig, type CreateNotificationCommandRequestConfig };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var deleteNotification_exports = {};
|
|
20
|
-
__export(deleteNotification_exports, {
|
|
21
|
-
DeleteNotificationCommand: () => DeleteNotificationCommand
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(deleteNotification_exports);
|
|
24
|
-
class DeleteNotificationCommand {
|
|
25
|
-
static {
|
|
26
|
-
__name(this, "DeleteNotificationCommand");
|
|
27
|
-
}
|
|
28
|
-
url;
|
|
29
|
-
data;
|
|
30
|
-
query;
|
|
31
|
-
headers;
|
|
32
|
-
config;
|
|
33
|
-
static params = ["id"];
|
|
34
|
-
static url = "/notifications/:id";
|
|
35
|
-
static method = "delete";
|
|
36
|
-
constructor(commandConfig, options = {}) {
|
|
37
|
-
const pathParams = DeleteNotificationCommand.params;
|
|
38
|
-
let { data, query, headers } = commandConfig ?? {};
|
|
39
|
-
if (typeof data === "undefined") data = null;
|
|
40
|
-
if (typeof query === "undefined") query = null;
|
|
41
|
-
if (typeof headers === "undefined") headers = null;
|
|
42
|
-
let url = DeleteNotificationCommand.url;
|
|
43
|
-
if (pathParams && data) {
|
|
44
|
-
for (const param of pathParams) {
|
|
45
|
-
const urlParam = ":" + param;
|
|
46
|
-
url = url.replace(urlParam, data[param]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
50
|
-
if (missingParams) {
|
|
51
|
-
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
52
|
-
throw new Error("Missing parameters: " + missing.join(", "));
|
|
53
|
-
}
|
|
54
|
-
this.url = url;
|
|
55
|
-
this.data = data;
|
|
56
|
-
this.query = query;
|
|
57
|
-
this.headers = headers;
|
|
58
|
-
this.config = {
|
|
59
|
-
method: DeleteNotificationCommand.method,
|
|
60
|
-
url,
|
|
61
|
-
data,
|
|
62
|
-
params: query,
|
|
63
|
-
headers,
|
|
64
|
-
...options
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
-
0 && (module.exports = {
|
|
70
|
-
DeleteNotificationCommand
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=deleteNotification.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/useCases/deleteNotification.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface DeleteNotificationCommandConfig {\n data?: { id: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface DeleteNotificationCommandRequestConfig {\n method: \"delete\";\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class DeleteNotificationCommand {\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: DeleteNotificationCommandRequestConfig;\n\n static params = [\"id\"] as const;\n static url = \"/notifications/:id\";\n static method = \"delete\" as const;\n\n constructor(\n commandConfig: DeleteNotificationCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = DeleteNotificationCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = DeleteNotificationCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: DeleteNotificationCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,0BAA0B;AAAA,EApBvC,OAoBuC;AAAA;AAAA;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC,IAAI;AAAA,EACrB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,0BAA0B;AAE7C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,0BAA0B;AAE5C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,0BAA0B;AAAA,MAClC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
interface DeleteNotificationCommandConfig {
|
|
2
|
-
data?: {
|
|
3
|
-
id: string;
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
} | null;
|
|
6
|
-
headers?: Record<string, string> | null;
|
|
7
|
-
query?: Record<string, unknown> | null;
|
|
8
|
-
}
|
|
9
|
-
interface DeleteNotificationCommandRequestConfig {
|
|
10
|
-
method: "delete";
|
|
11
|
-
url: string;
|
|
12
|
-
data: {
|
|
13
|
-
id: string;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
} | null;
|
|
16
|
-
params: Record<string, unknown> | null;
|
|
17
|
-
headers: Record<string, string> | null;
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
declare class DeleteNotificationCommand {
|
|
24
|
-
url: string;
|
|
25
|
-
data: {
|
|
26
|
-
id: string;
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
} | null;
|
|
29
|
-
query: Record<string, unknown> | null;
|
|
30
|
-
headers: Record<string, string> | null;
|
|
31
|
-
config: DeleteNotificationCommandRequestConfig;
|
|
32
|
-
static params: readonly ["id"];
|
|
33
|
-
static url: string;
|
|
34
|
-
static method: "delete";
|
|
35
|
-
constructor(commandConfig: DeleteNotificationCommandConfig, options?: Record<string, unknown>);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { DeleteNotificationCommand, type DeleteNotificationCommandConfig, type DeleteNotificationCommandRequestConfig };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var describeNotification_exports = {};
|
|
20
|
-
__export(describeNotification_exports, {
|
|
21
|
-
DescribeNotificationCommand: () => DescribeNotificationCommand
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(describeNotification_exports);
|
|
24
|
-
class DescribeNotificationCommand {
|
|
25
|
-
static {
|
|
26
|
-
__name(this, "DescribeNotificationCommand");
|
|
27
|
-
}
|
|
28
|
-
url;
|
|
29
|
-
data;
|
|
30
|
-
query;
|
|
31
|
-
headers;
|
|
32
|
-
config;
|
|
33
|
-
static params = ["id"];
|
|
34
|
-
static url = "/notifications/:id";
|
|
35
|
-
static method = "get";
|
|
36
|
-
constructor(commandConfig, options = {}) {
|
|
37
|
-
const pathParams = DescribeNotificationCommand.params;
|
|
38
|
-
let { data, query, headers } = commandConfig ?? {};
|
|
39
|
-
if (typeof data === "undefined") data = null;
|
|
40
|
-
if (typeof query === "undefined") query = null;
|
|
41
|
-
if (typeof headers === "undefined") headers = null;
|
|
42
|
-
let url = DescribeNotificationCommand.url;
|
|
43
|
-
if (pathParams && data) {
|
|
44
|
-
for (const param of pathParams) {
|
|
45
|
-
const urlParam = ":" + param;
|
|
46
|
-
url = url.replace(urlParam, data[param]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
50
|
-
if (missingParams) {
|
|
51
|
-
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
52
|
-
throw new Error("Missing parameters: " + missing.join(", "));
|
|
53
|
-
}
|
|
54
|
-
this.url = url;
|
|
55
|
-
this.data = data;
|
|
56
|
-
this.query = query;
|
|
57
|
-
this.headers = headers;
|
|
58
|
-
this.config = {
|
|
59
|
-
method: DescribeNotificationCommand.method,
|
|
60
|
-
url,
|
|
61
|
-
data,
|
|
62
|
-
params: query,
|
|
63
|
-
headers,
|
|
64
|
-
...options
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
-
0 && (module.exports = {
|
|
70
|
-
DescribeNotificationCommand
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=describeNotification.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/useCases/describeNotification.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface DescribeNotificationCommandConfig {\n data?: { id: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface DescribeNotificationCommandRequestConfig {\n method: \"get\";\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class DescribeNotificationCommand {\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: DescribeNotificationCommandRequestConfig;\n\n static params = [\"id\"] as const;\n static url = \"/notifications/:id\";\n static method = \"get\" as const;\n\n constructor(\n commandConfig: DescribeNotificationCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = DescribeNotificationCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = DescribeNotificationCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: DescribeNotificationCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,4BAA4B;AAAA,EApBzC,OAoByC;AAAA;AAAA;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC,IAAI;AAAA,EACrB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,4BAA4B;AAE/C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,4BAA4B;AAE9C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,4BAA4B;AAAA,MACpC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
interface DescribeNotificationCommandConfig {
|
|
2
|
-
data?: {
|
|
3
|
-
id: string;
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
} | null;
|
|
6
|
-
headers?: Record<string, string> | null;
|
|
7
|
-
query?: Record<string, unknown> | null;
|
|
8
|
-
}
|
|
9
|
-
interface DescribeNotificationCommandRequestConfig {
|
|
10
|
-
method: "get";
|
|
11
|
-
url: string;
|
|
12
|
-
data: {
|
|
13
|
-
id: string;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
} | null;
|
|
16
|
-
params: Record<string, unknown> | null;
|
|
17
|
-
headers: Record<string, string> | null;
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
declare class DescribeNotificationCommand {
|
|
24
|
-
url: string;
|
|
25
|
-
data: {
|
|
26
|
-
id: string;
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
} | null;
|
|
29
|
-
query: Record<string, unknown> | null;
|
|
30
|
-
headers: Record<string, string> | null;
|
|
31
|
-
config: DescribeNotificationCommandRequestConfig;
|
|
32
|
-
static params: readonly ["id"];
|
|
33
|
-
static url: string;
|
|
34
|
-
static method: "get";
|
|
35
|
-
constructor(commandConfig: DescribeNotificationCommandConfig, options?: Record<string, unknown>);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { DescribeNotificationCommand, type DescribeNotificationCommandConfig, type DescribeNotificationCommandRequestConfig };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/useCases/listNotifications.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface ListNotificationsCommandConfig {\n data?: Record<string, unknown> | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface ListNotificationsCommandRequestConfig {\n method: \"get\";\n url: string;\n data: Record<string, unknown> | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class ListNotificationsCommand {\n url: string;\n data: Record<string, unknown> | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: ListNotificationsCommandRequestConfig;\n\n static params = [] as const;\n static url = \"/notifications\";\n static method = \"get\" as const;\n\n constructor(\n commandConfig: ListNotificationsCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = ListNotificationsCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = ListNotificationsCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: ListNotificationsCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,yBAAyB;AAAA,EApBtC,OAoBsC;AAAA;AAAA;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC;AAAA,EACjB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,yBAAyB;AAE5C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,yBAAyB;AAE3C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,yBAAyB;AAAA,MACjC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var updateNotification_exports = {};
|
|
20
|
-
__export(updateNotification_exports, {
|
|
21
|
-
UpdateNotificationCommand: () => UpdateNotificationCommand
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(updateNotification_exports);
|
|
24
|
-
class UpdateNotificationCommand {
|
|
25
|
-
static {
|
|
26
|
-
__name(this, "UpdateNotificationCommand");
|
|
27
|
-
}
|
|
28
|
-
url;
|
|
29
|
-
data;
|
|
30
|
-
query;
|
|
31
|
-
headers;
|
|
32
|
-
config;
|
|
33
|
-
static params = ["id"];
|
|
34
|
-
static url = "/notifications/:id";
|
|
35
|
-
static method = "put";
|
|
36
|
-
constructor(commandConfig, options = {}) {
|
|
37
|
-
const pathParams = UpdateNotificationCommand.params;
|
|
38
|
-
let { data, query, headers } = commandConfig ?? {};
|
|
39
|
-
if (typeof data === "undefined") data = null;
|
|
40
|
-
if (typeof query === "undefined") query = null;
|
|
41
|
-
if (typeof headers === "undefined") headers = null;
|
|
42
|
-
let url = UpdateNotificationCommand.url;
|
|
43
|
-
if (pathParams && data) {
|
|
44
|
-
for (const param of pathParams) {
|
|
45
|
-
const urlParam = ":" + param;
|
|
46
|
-
url = url.replace(urlParam, data[param]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
50
|
-
if (missingParams) {
|
|
51
|
-
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
52
|
-
throw new Error("Missing parameters: " + missing.join(", "));
|
|
53
|
-
}
|
|
54
|
-
this.url = url;
|
|
55
|
-
this.data = data;
|
|
56
|
-
this.query = query;
|
|
57
|
-
this.headers = headers;
|
|
58
|
-
this.config = {
|
|
59
|
-
method: UpdateNotificationCommand.method,
|
|
60
|
-
url,
|
|
61
|
-
data,
|
|
62
|
-
params: query,
|
|
63
|
-
headers,
|
|
64
|
-
...options
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
-
0 && (module.exports = {
|
|
70
|
-
UpdateNotificationCommand
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=updateNotification.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.generated/useCases/updateNotification.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface UpdateNotificationCommandConfig {\n data?: { id: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface UpdateNotificationCommandRequestConfig {\n method: \"put\";\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n *\n */\nexport class UpdateNotificationCommand {\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: UpdateNotificationCommandRequestConfig;\n\n static params = [\"id\"] as const;\n static url = \"/notifications/:id\";\n static method = \"put\" as const;\n\n constructor(\n commandConfig: UpdateNotificationCommandConfig,\n options: Record<string, unknown> = {},\n ) {\n const pathParams = UpdateNotificationCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = UpdateNotificationCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: UpdateNotificationCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,MAAM,0BAA0B;AAAA,EApBvC,OAoBuC;AAAA;AAAA;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,OAAO,SAAS,CAAC,IAAI;AAAA,EACrB,OAAO,MAAM;AAAA,EACb,OAAO,SAAS;AAAA,EAEhB,YACE,eACA,UAAmC,CAAC,GACpC;AACA,UAAM,aAAa,0BAA0B;AAE7C,QAAI,EAAE,MAAM,OAAO,QAAQ,IAAI,iBAAiB,CAAC;AAEjD,QAAI,OAAO,SAAS,YAAa,QAAO;AACxC,QAAI,OAAO,UAAU,YAAa,SAAQ;AAC1C,QAAI,OAAO,YAAY,YAAa,WAAU;AAG9C,QAAI,MAAc,0BAA0B;AAE5C,QAAI,cAAc,MAAM;AACtB,iBAAW,SAAS,YAAY;AAC9B,cAAM,WAAW,MAAM;AACvB,cAAM,IAAI,QAAQ,UAAW,KAAgC,KAAK,CAAC;AAAA,MACrE;AAAA,IACF;AAGA,UAAM,gBAAgB,IAAI,MAAM,gBAAgB;AAChD,QAAI,eAAe;AACjB,YAAM,UAAU,cAAc,IAAI,CAAC,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACnE,YAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;AAAA,IAC7D;AAEA,SAAK,MAAM;AACX,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,UAAU;AAEf,SAAK,SAAS;AAAA,MACZ,QAAQ,0BAA0B;AAAA,MAClC;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,GAAG;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
interface UpdateNotificationCommandConfig {
|
|
2
|
-
data?: {
|
|
3
|
-
id: string;
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
} | null;
|
|
6
|
-
headers?: Record<string, string> | null;
|
|
7
|
-
query?: Record<string, unknown> | null;
|
|
8
|
-
}
|
|
9
|
-
interface UpdateNotificationCommandRequestConfig {
|
|
10
|
-
method: "put";
|
|
11
|
-
url: string;
|
|
12
|
-
data: {
|
|
13
|
-
id: string;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
} | null;
|
|
16
|
-
params: Record<string, unknown> | null;
|
|
17
|
-
headers: Record<string, string> | null;
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
declare class UpdateNotificationCommand {
|
|
24
|
-
url: string;
|
|
25
|
-
data: {
|
|
26
|
-
id: string;
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
} | null;
|
|
29
|
-
query: Record<string, unknown> | null;
|
|
30
|
-
headers: Record<string, string> | null;
|
|
31
|
-
config: UpdateNotificationCommandRequestConfig;
|
|
32
|
-
static params: readonly ["id"];
|
|
33
|
-
static url: string;
|
|
34
|
-
static method: "put";
|
|
35
|
-
constructor(commandConfig: UpdateNotificationCommandConfig, options?: Record<string, unknown>);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { UpdateNotificationCommand, type UpdateNotificationCommandConfig, type UpdateNotificationCommandRequestConfig };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
interface CreateNotificationCommandConfig {
|
|
2
|
-
data?: Record<string, unknown> | null;
|
|
3
|
-
headers?: Record<string, string> | null;
|
|
4
|
-
query?: Record<string, unknown> | null;
|
|
5
|
-
}
|
|
6
|
-
interface CreateNotificationCommandRequestConfig {
|
|
7
|
-
method: "post";
|
|
8
|
-
url: string;
|
|
9
|
-
data: Record<string, unknown> | null;
|
|
10
|
-
params: Record<string, unknown> | null;
|
|
11
|
-
headers: Record<string, string> | null;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
declare class CreateNotificationCommand {
|
|
18
|
-
url: string;
|
|
19
|
-
data: Record<string, unknown> | null;
|
|
20
|
-
query: Record<string, unknown> | null;
|
|
21
|
-
headers: Record<string, string> | null;
|
|
22
|
-
config: CreateNotificationCommandRequestConfig;
|
|
23
|
-
static params: readonly [];
|
|
24
|
-
static url: string;
|
|
25
|
-
static method: "post";
|
|
26
|
-
constructor(commandConfig: CreateNotificationCommandConfig, options?: Record<string, unknown>);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { CreateNotificationCommand, type CreateNotificationCommandConfig, type CreateNotificationCommandRequestConfig };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
class CreateNotificationCommand {
|
|
4
|
-
static {
|
|
5
|
-
__name(this, "CreateNotificationCommand");
|
|
6
|
-
}
|
|
7
|
-
url;
|
|
8
|
-
data;
|
|
9
|
-
query;
|
|
10
|
-
headers;
|
|
11
|
-
config;
|
|
12
|
-
static params = [];
|
|
13
|
-
static url = "/notifications";
|
|
14
|
-
static method = "post";
|
|
15
|
-
constructor(commandConfig, options = {}) {
|
|
16
|
-
const pathParams = CreateNotificationCommand.params;
|
|
17
|
-
let { data, query, headers } = commandConfig ?? {};
|
|
18
|
-
if (typeof data === "undefined") data = null;
|
|
19
|
-
if (typeof query === "undefined") query = null;
|
|
20
|
-
if (typeof headers === "undefined") headers = null;
|
|
21
|
-
let url = CreateNotificationCommand.url;
|
|
22
|
-
if (pathParams && data) {
|
|
23
|
-
for (const param of pathParams) {
|
|
24
|
-
const urlParam = ":" + param;
|
|
25
|
-
url = url.replace(urlParam, data[param]);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
29
|
-
if (missingParams) {
|
|
30
|
-
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
31
|
-
throw new Error("Missing parameters: " + missing.join(", "));
|
|
32
|
-
}
|
|
33
|
-
this.url = url;
|
|
34
|
-
this.data = data;
|
|
35
|
-
this.query = query;
|
|
36
|
-
this.headers = headers;
|
|
37
|
-
this.config = {
|
|
38
|
-
method: CreateNotificationCommand.method,
|
|
39
|
-
url,
|
|
40
|
-
data,
|
|
41
|
-
params: query,
|
|
42
|
-
headers,
|
|
43
|
-
...options
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
CreateNotificationCommand
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=createNotification.js.map
|