@cristian-israel/giganet_lib_conecta 1.0.63 → 1.0.65
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/index.d.mts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -37091,7 +37091,7 @@ interface NtfyAction {
|
|
|
37091
37091
|
clear?: boolean;
|
|
37092
37092
|
}
|
|
37093
37093
|
interface NtfyPublishOptions {
|
|
37094
|
-
|
|
37094
|
+
sequence_id: string;
|
|
37095
37095
|
message: string;
|
|
37096
37096
|
title?: string;
|
|
37097
37097
|
priority?: NtfyPriority;
|
|
@@ -37099,13 +37099,23 @@ interface NtfyPublishOptions {
|
|
|
37099
37099
|
click?: string;
|
|
37100
37100
|
actions?: NtfyAction[];
|
|
37101
37101
|
}
|
|
37102
|
+
interface NtfyPublishResponse {
|
|
37103
|
+
id: string;
|
|
37104
|
+
sequence_id?: string;
|
|
37105
|
+
time: number;
|
|
37106
|
+
expires: number;
|
|
37107
|
+
event: "message" | string;
|
|
37108
|
+
topic: string;
|
|
37109
|
+
message: string;
|
|
37110
|
+
}
|
|
37102
37111
|
|
|
37103
37112
|
type ntfyApi_types_NtfyAction = NtfyAction;
|
|
37104
37113
|
type ntfyApi_types_NtfyActionType = NtfyActionType;
|
|
37105
37114
|
type ntfyApi_types_NtfyPriority = NtfyPriority;
|
|
37106
37115
|
type ntfyApi_types_NtfyPublishOptions = NtfyPublishOptions;
|
|
37116
|
+
type ntfyApi_types_NtfyPublishResponse = NtfyPublishResponse;
|
|
37107
37117
|
declare namespace ntfyApi_types {
|
|
37108
|
-
export type { ntfyApi_types_NtfyAction as NtfyAction, ntfyApi_types_NtfyActionType as NtfyActionType, ntfyApi_types_NtfyPriority as NtfyPriority, ntfyApi_types_NtfyPublishOptions as NtfyPublishOptions };
|
|
37118
|
+
export type { ntfyApi_types_NtfyAction as NtfyAction, ntfyApi_types_NtfyActionType as NtfyActionType, ntfyApi_types_NtfyPriority as NtfyPriority, ntfyApi_types_NtfyPublishOptions as NtfyPublishOptions, ntfyApi_types_NtfyPublishResponse as NtfyPublishResponse };
|
|
37109
37119
|
}
|
|
37110
37120
|
|
|
37111
37121
|
declare class NtfyPublishResource {
|
|
@@ -37115,12 +37125,14 @@ declare class NtfyPublishResource {
|
|
|
37115
37125
|
* Envia uma notificação para um tópico do ntfy.
|
|
37116
37126
|
* @param options Opções da notificação
|
|
37117
37127
|
*/
|
|
37118
|
-
publish(options: NtfyPublishOptions): Promise<
|
|
37128
|
+
publish(options: NtfyPublishOptions): Promise<NtfyPublishResponse>;
|
|
37119
37129
|
}
|
|
37120
37130
|
|
|
37121
37131
|
declare class NtfyAPIClient extends APIClient {
|
|
37122
37132
|
readonly notifications: NtfyPublishResource;
|
|
37123
|
-
constructor(config
|
|
37133
|
+
constructor(config: Partial<APIClientConfig> & {
|
|
37134
|
+
topic: string;
|
|
37135
|
+
});
|
|
37124
37136
|
}
|
|
37125
37137
|
|
|
37126
37138
|
export { IXCSoftAPIClient, ixcSoftApi_types as IXCSoftAPITypes, type IXCSoftMysqlModels, type IXCSoftMysqlModelsAttributes, IXCSoftMysqlService, NtfyAPIClient, ntfyApi_types as NtfyAPITypes, type OPASuiteMongoCollectionsModels, type OPASuiteMongoDocuments, OPASuiteMongoService, RoutinesAPIClient, routinesApi_types as RoutinesAPITypes, type RoutinesMongoCollectionsModels, type RoutinesMongoDocuments, RoutinesMongoService, type ToolsMongoCollectionsModels, type ToolsMongoDocuments, ToolsMongoService, loger, printSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -37091,7 +37091,7 @@ interface NtfyAction {
|
|
|
37091
37091
|
clear?: boolean;
|
|
37092
37092
|
}
|
|
37093
37093
|
interface NtfyPublishOptions {
|
|
37094
|
-
|
|
37094
|
+
sequence_id: string;
|
|
37095
37095
|
message: string;
|
|
37096
37096
|
title?: string;
|
|
37097
37097
|
priority?: NtfyPriority;
|
|
@@ -37099,13 +37099,23 @@ interface NtfyPublishOptions {
|
|
|
37099
37099
|
click?: string;
|
|
37100
37100
|
actions?: NtfyAction[];
|
|
37101
37101
|
}
|
|
37102
|
+
interface NtfyPublishResponse {
|
|
37103
|
+
id: string;
|
|
37104
|
+
sequence_id?: string;
|
|
37105
|
+
time: number;
|
|
37106
|
+
expires: number;
|
|
37107
|
+
event: "message" | string;
|
|
37108
|
+
topic: string;
|
|
37109
|
+
message: string;
|
|
37110
|
+
}
|
|
37102
37111
|
|
|
37103
37112
|
type ntfyApi_types_NtfyAction = NtfyAction;
|
|
37104
37113
|
type ntfyApi_types_NtfyActionType = NtfyActionType;
|
|
37105
37114
|
type ntfyApi_types_NtfyPriority = NtfyPriority;
|
|
37106
37115
|
type ntfyApi_types_NtfyPublishOptions = NtfyPublishOptions;
|
|
37116
|
+
type ntfyApi_types_NtfyPublishResponse = NtfyPublishResponse;
|
|
37107
37117
|
declare namespace ntfyApi_types {
|
|
37108
|
-
export type { ntfyApi_types_NtfyAction as NtfyAction, ntfyApi_types_NtfyActionType as NtfyActionType, ntfyApi_types_NtfyPriority as NtfyPriority, ntfyApi_types_NtfyPublishOptions as NtfyPublishOptions };
|
|
37118
|
+
export type { ntfyApi_types_NtfyAction as NtfyAction, ntfyApi_types_NtfyActionType as NtfyActionType, ntfyApi_types_NtfyPriority as NtfyPriority, ntfyApi_types_NtfyPublishOptions as NtfyPublishOptions, ntfyApi_types_NtfyPublishResponse as NtfyPublishResponse };
|
|
37109
37119
|
}
|
|
37110
37120
|
|
|
37111
37121
|
declare class NtfyPublishResource {
|
|
@@ -37115,12 +37125,14 @@ declare class NtfyPublishResource {
|
|
|
37115
37125
|
* Envia uma notificação para um tópico do ntfy.
|
|
37116
37126
|
* @param options Opções da notificação
|
|
37117
37127
|
*/
|
|
37118
|
-
publish(options: NtfyPublishOptions): Promise<
|
|
37128
|
+
publish(options: NtfyPublishOptions): Promise<NtfyPublishResponse>;
|
|
37119
37129
|
}
|
|
37120
37130
|
|
|
37121
37131
|
declare class NtfyAPIClient extends APIClient {
|
|
37122
37132
|
readonly notifications: NtfyPublishResource;
|
|
37123
|
-
constructor(config
|
|
37133
|
+
constructor(config: Partial<APIClientConfig> & {
|
|
37134
|
+
topic: string;
|
|
37135
|
+
});
|
|
37124
37136
|
}
|
|
37125
37137
|
|
|
37126
37138
|
export { IXCSoftAPIClient, ixcSoftApi_types as IXCSoftAPITypes, type IXCSoftMysqlModels, type IXCSoftMysqlModelsAttributes, IXCSoftMysqlService, NtfyAPIClient, ntfyApi_types as NtfyAPITypes, type OPASuiteMongoCollectionsModels, type OPASuiteMongoDocuments, OPASuiteMongoService, RoutinesAPIClient, routinesApi_types as RoutinesAPITypes, type RoutinesMongoCollectionsModels, type RoutinesMongoDocuments, RoutinesMongoService, type ToolsMongoCollectionsModels, type ToolsMongoDocuments, ToolsMongoService, loger, printSignature };
|
package/dist/index.js
CHANGED
|
@@ -91488,7 +91488,7 @@ var NtfyPublishResource = class {
|
|
|
91488
91488
|
* @param options Opções da notificação
|
|
91489
91489
|
*/
|
|
91490
91490
|
async publish(options) {
|
|
91491
|
-
const {
|
|
91491
|
+
const { sequence_id, message, title, priority, tags, click, actions } = options;
|
|
91492
91492
|
const headers = {
|
|
91493
91493
|
"Content-Type": "text/plain"
|
|
91494
91494
|
};
|
|
@@ -91525,7 +91525,7 @@ var NtfyPublishResource = class {
|
|
|
91525
91525
|
return parts.join(", ");
|
|
91526
91526
|
}).join("; ");
|
|
91527
91527
|
}
|
|
91528
|
-
return this.client.post(`/${
|
|
91528
|
+
return this.client.post(`/${sequence_id}`, message, {
|
|
91529
91529
|
headers
|
|
91530
91530
|
});
|
|
91531
91531
|
}
|
|
@@ -91534,10 +91534,15 @@ var NtfyPublishResource = class {
|
|
|
91534
91534
|
// src/apis/clients/ntfy/ntfy-api.client.ts
|
|
91535
91535
|
var NtfyAPIClient = class extends APIClient {
|
|
91536
91536
|
constructor(config) {
|
|
91537
|
-
const
|
|
91538
|
-
|
|
91537
|
+
const { topic, ...rest } = config;
|
|
91538
|
+
if (!topic) {
|
|
91539
|
+
throw new Error("Topic required");
|
|
91540
|
+
}
|
|
91541
|
+
const URL = rest.baseURL ?? "https://ntfy.sh";
|
|
91542
|
+
const baseURL = `${URL}/${config.topic}`;
|
|
91543
|
+
const auth = rest.auth ?? { type: "none" };
|
|
91539
91544
|
super({
|
|
91540
|
-
...
|
|
91545
|
+
...rest,
|
|
91541
91546
|
baseURL,
|
|
91542
91547
|
auth
|
|
91543
91548
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -91447,7 +91447,7 @@ var NtfyPublishResource = class {
|
|
|
91447
91447
|
* @param options Opções da notificação
|
|
91448
91448
|
*/
|
|
91449
91449
|
async publish(options) {
|
|
91450
|
-
const {
|
|
91450
|
+
const { sequence_id, message, title, priority, tags, click, actions } = options;
|
|
91451
91451
|
const headers = {
|
|
91452
91452
|
"Content-Type": "text/plain"
|
|
91453
91453
|
};
|
|
@@ -91484,7 +91484,7 @@ var NtfyPublishResource = class {
|
|
|
91484
91484
|
return parts.join(", ");
|
|
91485
91485
|
}).join("; ");
|
|
91486
91486
|
}
|
|
91487
|
-
return this.client.post(`/${
|
|
91487
|
+
return this.client.post(`/${sequence_id}`, message, {
|
|
91488
91488
|
headers
|
|
91489
91489
|
});
|
|
91490
91490
|
}
|
|
@@ -91493,10 +91493,15 @@ var NtfyPublishResource = class {
|
|
|
91493
91493
|
// src/apis/clients/ntfy/ntfy-api.client.ts
|
|
91494
91494
|
var NtfyAPIClient = class extends APIClient {
|
|
91495
91495
|
constructor(config) {
|
|
91496
|
-
const
|
|
91497
|
-
|
|
91496
|
+
const { topic, ...rest } = config;
|
|
91497
|
+
if (!topic) {
|
|
91498
|
+
throw new Error("Topic required");
|
|
91499
|
+
}
|
|
91500
|
+
const URL = rest.baseURL ?? "https://ntfy.sh";
|
|
91501
|
+
const baseURL = `${URL}/${config.topic}`;
|
|
91502
|
+
const auth = rest.auth ?? { type: "none" };
|
|
91498
91503
|
super({
|
|
91499
|
-
...
|
|
91504
|
+
...rest,
|
|
91500
91505
|
baseURL,
|
|
91501
91506
|
auth
|
|
91502
91507
|
});
|