@cristian-israel/giganet_lib_conecta 1.0.64 → 1.0.66
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 +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -37091,21 +37091,31 @@ interface NtfyAction {
|
|
|
37091
37091
|
clear?: boolean;
|
|
37092
37092
|
}
|
|
37093
37093
|
interface NtfyPublishOptions {
|
|
37094
|
-
topic: string;
|
|
37095
37094
|
message: string;
|
|
37096
37095
|
title?: string;
|
|
37096
|
+
sequence_id?: string;
|
|
37097
37097
|
priority?: NtfyPriority;
|
|
37098
37098
|
tags?: string[];
|
|
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,7 +37125,7 @@ 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 {
|
package/dist/index.d.ts
CHANGED
|
@@ -37091,21 +37091,31 @@ interface NtfyAction {
|
|
|
37091
37091
|
clear?: boolean;
|
|
37092
37092
|
}
|
|
37093
37093
|
interface NtfyPublishOptions {
|
|
37094
|
-
topic: string;
|
|
37095
37094
|
message: string;
|
|
37096
37095
|
title?: string;
|
|
37096
|
+
sequence_id?: string;
|
|
37097
37097
|
priority?: NtfyPriority;
|
|
37098
37098
|
tags?: string[];
|
|
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,7 +37125,7 @@ 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 {
|
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
|
};
|
|
@@ -91496,6 +91496,9 @@ var NtfyPublishResource = class {
|
|
|
91496
91496
|
if (priority) headers["Priority"] = priority;
|
|
91497
91497
|
if (tags && tags.length > 0) headers["Tags"] = tags.join(",");
|
|
91498
91498
|
if (click) headers["Click"] = click;
|
|
91499
|
+
if (sequence_id) {
|
|
91500
|
+
headers["Sequence-ID"] = sequence_id;
|
|
91501
|
+
}
|
|
91499
91502
|
if (actions && actions.length > 0) {
|
|
91500
91503
|
headers["Actions"] = actions.map((a) => {
|
|
91501
91504
|
const parts = [a.action, `label="${a.label}"`];
|
|
@@ -91525,9 +91528,7 @@ var NtfyPublishResource = class {
|
|
|
91525
91528
|
return parts.join(", ");
|
|
91526
91529
|
}).join("; ");
|
|
91527
91530
|
}
|
|
91528
|
-
return this.client.post(
|
|
91529
|
-
headers
|
|
91530
|
-
});
|
|
91531
|
+
return this.client.post("/", message, { headers });
|
|
91531
91532
|
}
|
|
91532
91533
|
};
|
|
91533
91534
|
|
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
|
};
|
|
@@ -91455,6 +91455,9 @@ var NtfyPublishResource = class {
|
|
|
91455
91455
|
if (priority) headers["Priority"] = priority;
|
|
91456
91456
|
if (tags && tags.length > 0) headers["Tags"] = tags.join(",");
|
|
91457
91457
|
if (click) headers["Click"] = click;
|
|
91458
|
+
if (sequence_id) {
|
|
91459
|
+
headers["Sequence-ID"] = sequence_id;
|
|
91460
|
+
}
|
|
91458
91461
|
if (actions && actions.length > 0) {
|
|
91459
91462
|
headers["Actions"] = actions.map((a) => {
|
|
91460
91463
|
const parts = [a.action, `label="${a.label}"`];
|
|
@@ -91484,9 +91487,7 @@ var NtfyPublishResource = class {
|
|
|
91484
91487
|
return parts.join(", ");
|
|
91485
91488
|
}).join("; ");
|
|
91486
91489
|
}
|
|
91487
|
-
return this.client.post(
|
|
91488
|
-
headers
|
|
91489
|
-
});
|
|
91490
|
+
return this.client.post("/", message, { headers });
|
|
91490
91491
|
}
|
|
91491
91492
|
};
|
|
91492
91493
|
|