@cristian-israel/giganet_lib_conecta 1.0.62 → 1.0.63

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 CHANGED
@@ -37077,4 +37077,50 @@ declare namespace routinesApi_types {
37077
37077
  export type { routinesApi_types_RoutinesTasksCreateInput as RoutinesTasksCreateInput, routinesApi_types_RoutinesTasksInput as RoutinesTasksInput, routinesApi_types_RoutinesTasksSyncJobsResponse as RoutinesTasksSyncJobsResponse, routinesApi_types_RoutinesTasksToggleActiveInput as RoutinesTasksToggleActiveInput, routinesApi_types_RoutinesTasksUpdateInput as RoutinesTasksUpdateInput };
37078
37078
  }
37079
37079
 
37080
- export { IXCSoftAPIClient, ixcSoftApi_types as IXCSoftAPITypes, type IXCSoftMysqlModels, type IXCSoftMysqlModelsAttributes, IXCSoftMysqlService, type OPASuiteMongoCollectionsModels, type OPASuiteMongoDocuments, OPASuiteMongoService, RoutinesAPIClient, routinesApi_types as RoutinesAPITypes, type RoutinesMongoCollectionsModels, type RoutinesMongoDocuments, RoutinesMongoService, type ToolsMongoCollectionsModels, type ToolsMongoDocuments, ToolsMongoService, loger, printSignature };
37080
+ type NtfyPriority = "max" | "high" | "default" | "low" | "min";
37081
+ type NtfyActionType = "view" | "broadcast" | "http" | "copy";
37082
+ interface NtfyAction {
37083
+ action: NtfyActionType;
37084
+ label: string;
37085
+ url?: string;
37086
+ intent?: string;
37087
+ method?: string;
37088
+ headers?: Record<string, string>;
37089
+ body?: string;
37090
+ content?: string;
37091
+ clear?: boolean;
37092
+ }
37093
+ interface NtfyPublishOptions {
37094
+ topic: string;
37095
+ message: string;
37096
+ title?: string;
37097
+ priority?: NtfyPriority;
37098
+ tags?: string[];
37099
+ click?: string;
37100
+ actions?: NtfyAction[];
37101
+ }
37102
+
37103
+ type ntfyApi_types_NtfyAction = NtfyAction;
37104
+ type ntfyApi_types_NtfyActionType = NtfyActionType;
37105
+ type ntfyApi_types_NtfyPriority = NtfyPriority;
37106
+ type ntfyApi_types_NtfyPublishOptions = NtfyPublishOptions;
37107
+ 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 };
37109
+ }
37110
+
37111
+ declare class NtfyPublishResource {
37112
+ private readonly client;
37113
+ constructor(client: APIClient);
37114
+ /**
37115
+ * Envia uma notificação para um tópico do ntfy.
37116
+ * @param options Opções da notificação
37117
+ */
37118
+ publish(options: NtfyPublishOptions): Promise<any>;
37119
+ }
37120
+
37121
+ declare class NtfyAPIClient extends APIClient {
37122
+ readonly notifications: NtfyPublishResource;
37123
+ constructor(config?: Partial<APIClientConfig>);
37124
+ }
37125
+
37126
+ 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
@@ -37077,4 +37077,50 @@ declare namespace routinesApi_types {
37077
37077
  export type { routinesApi_types_RoutinesTasksCreateInput as RoutinesTasksCreateInput, routinesApi_types_RoutinesTasksInput as RoutinesTasksInput, routinesApi_types_RoutinesTasksSyncJobsResponse as RoutinesTasksSyncJobsResponse, routinesApi_types_RoutinesTasksToggleActiveInput as RoutinesTasksToggleActiveInput, routinesApi_types_RoutinesTasksUpdateInput as RoutinesTasksUpdateInput };
37078
37078
  }
37079
37079
 
37080
- export { IXCSoftAPIClient, ixcSoftApi_types as IXCSoftAPITypes, type IXCSoftMysqlModels, type IXCSoftMysqlModelsAttributes, IXCSoftMysqlService, type OPASuiteMongoCollectionsModels, type OPASuiteMongoDocuments, OPASuiteMongoService, RoutinesAPIClient, routinesApi_types as RoutinesAPITypes, type RoutinesMongoCollectionsModels, type RoutinesMongoDocuments, RoutinesMongoService, type ToolsMongoCollectionsModels, type ToolsMongoDocuments, ToolsMongoService, loger, printSignature };
37080
+ type NtfyPriority = "max" | "high" | "default" | "low" | "min";
37081
+ type NtfyActionType = "view" | "broadcast" | "http" | "copy";
37082
+ interface NtfyAction {
37083
+ action: NtfyActionType;
37084
+ label: string;
37085
+ url?: string;
37086
+ intent?: string;
37087
+ method?: string;
37088
+ headers?: Record<string, string>;
37089
+ body?: string;
37090
+ content?: string;
37091
+ clear?: boolean;
37092
+ }
37093
+ interface NtfyPublishOptions {
37094
+ topic: string;
37095
+ message: string;
37096
+ title?: string;
37097
+ priority?: NtfyPriority;
37098
+ tags?: string[];
37099
+ click?: string;
37100
+ actions?: NtfyAction[];
37101
+ }
37102
+
37103
+ type ntfyApi_types_NtfyAction = NtfyAction;
37104
+ type ntfyApi_types_NtfyActionType = NtfyActionType;
37105
+ type ntfyApi_types_NtfyPriority = NtfyPriority;
37106
+ type ntfyApi_types_NtfyPublishOptions = NtfyPublishOptions;
37107
+ 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 };
37109
+ }
37110
+
37111
+ declare class NtfyPublishResource {
37112
+ private readonly client;
37113
+ constructor(client: APIClient);
37114
+ /**
37115
+ * Envia uma notificação para um tópico do ntfy.
37116
+ * @param options Opções da notificação
37117
+ */
37118
+ publish(options: NtfyPublishOptions): Promise<any>;
37119
+ }
37120
+
37121
+ declare class NtfyAPIClient extends APIClient {
37122
+ readonly notifications: NtfyPublishResource;
37123
+ constructor(config?: Partial<APIClientConfig>);
37124
+ }
37125
+
37126
+ 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
@@ -33,6 +33,8 @@ __export(index_exports, {
33
33
  IXCSoftAPIClient: () => IXCSoftAPIClient,
34
34
  IXCSoftAPITypes: () => ixc_soft_api_types_exports,
35
35
  IXCSoftMysqlService: () => IXCSoftMysqlService,
36
+ NtfyAPIClient: () => NtfyAPIClient,
37
+ NtfyAPITypes: () => ntfy_api_types_exports,
36
38
  OPASuiteMongoService: () => OPASuiteMongoService,
37
39
  RoutinesAPIClient: () => RoutinesAPIClient,
38
40
  RoutinesAPITypes: () => routines_api_types_exports,
@@ -91475,11 +91477,83 @@ var RoutinesAPIClient = class extends APIClient {
91475
91477
 
91476
91478
  // src/apis/clients/routines/routines-api.types.ts
91477
91479
  var routines_api_types_exports = {};
91480
+
91481
+ // src/apis/clients/ntfy/resources/publish/ntfy-publish.resource.ts
91482
+ var NtfyPublishResource = class {
91483
+ constructor(client) {
91484
+ this.client = client;
91485
+ }
91486
+ /**
91487
+ * Envia uma notificação para um tópico do ntfy.
91488
+ * @param options Opções da notificação
91489
+ */
91490
+ async publish(options) {
91491
+ const { topic, message, title, priority, tags, click, actions } = options;
91492
+ const headers = {
91493
+ "Content-Type": "text/plain"
91494
+ };
91495
+ if (title) headers["Title"] = title;
91496
+ if (priority) headers["Priority"] = priority;
91497
+ if (tags && tags.length > 0) headers["Tags"] = tags.join(",");
91498
+ if (click) headers["Click"] = click;
91499
+ if (actions && actions.length > 0) {
91500
+ headers["Actions"] = actions.map((a) => {
91501
+ const parts = [a.action, `label="${a.label}"`];
91502
+ if (a.action === "view" && a.url) parts.push(`url="${a.url}"`);
91503
+ if (a.action === "broadcast" && a.intent)
91504
+ parts.push(`intent="${a.intent}"`);
91505
+ if (a.action === "http" && a.url) parts.push(`url="${a.url}"`);
91506
+ if (a.action === "copy" && a.content)
91507
+ parts.push(`content="${a.content}"`);
91508
+ Object.entries(a).forEach(([key, value]) => {
91509
+ if (![
91510
+ "action",
91511
+ "label",
91512
+ "url",
91513
+ "intent",
91514
+ "content",
91515
+ "headers"
91516
+ ].includes(key) && value !== void 0) {
91517
+ parts.push(`${key}="${value}"`);
91518
+ }
91519
+ });
91520
+ if (a.action === "http" && a.headers) {
91521
+ Object.entries(a.headers).forEach(([hKey, hValue]) => {
91522
+ parts.push(`headers.${hKey}="${hValue}"`);
91523
+ });
91524
+ }
91525
+ return parts.join(", ");
91526
+ }).join("; ");
91527
+ }
91528
+ return this.client.post(`/${topic}`, message, {
91529
+ headers
91530
+ });
91531
+ }
91532
+ };
91533
+
91534
+ // src/apis/clients/ntfy/ntfy-api.client.ts
91535
+ var NtfyAPIClient = class extends APIClient {
91536
+ constructor(config) {
91537
+ const baseURL = config?.baseURL || "https://ntfy.sh";
91538
+ const auth = config?.auth || { type: "none" };
91539
+ super({
91540
+ ...config,
91541
+ baseURL,
91542
+ auth
91543
+ });
91544
+ this.notifications = new NtfyPublishResource(this);
91545
+ }
91546
+ };
91547
+
91548
+ // src/apis/clients/ntfy/ntfy-api.types.ts
91549
+ var ntfy_api_types_exports = {};
91478
91550
  // Annotate the CommonJS export names for ESM import in node:
91479
91551
  0 && (module.exports = {
91480
91552
  IXCSoftAPIClient,
91481
91553
  IXCSoftAPITypes,
91482
91554
  IXCSoftMysqlService,
91555
+ NtfyAPIClient,
91556
+ NtfyAPITypes,
91483
91557
  OPASuiteMongoService,
91484
91558
  RoutinesAPIClient,
91485
91559
  RoutinesAPITypes,
package/dist/index.mjs CHANGED
@@ -91436,10 +91436,82 @@ var RoutinesAPIClient = class extends APIClient {
91436
91436
 
91437
91437
  // src/apis/clients/routines/routines-api.types.ts
91438
91438
  var routines_api_types_exports = {};
91439
+
91440
+ // src/apis/clients/ntfy/resources/publish/ntfy-publish.resource.ts
91441
+ var NtfyPublishResource = class {
91442
+ constructor(client) {
91443
+ this.client = client;
91444
+ }
91445
+ /**
91446
+ * Envia uma notificação para um tópico do ntfy.
91447
+ * @param options Opções da notificação
91448
+ */
91449
+ async publish(options) {
91450
+ const { topic, message, title, priority, tags, click, actions } = options;
91451
+ const headers = {
91452
+ "Content-Type": "text/plain"
91453
+ };
91454
+ if (title) headers["Title"] = title;
91455
+ if (priority) headers["Priority"] = priority;
91456
+ if (tags && tags.length > 0) headers["Tags"] = tags.join(",");
91457
+ if (click) headers["Click"] = click;
91458
+ if (actions && actions.length > 0) {
91459
+ headers["Actions"] = actions.map((a) => {
91460
+ const parts = [a.action, `label="${a.label}"`];
91461
+ if (a.action === "view" && a.url) parts.push(`url="${a.url}"`);
91462
+ if (a.action === "broadcast" && a.intent)
91463
+ parts.push(`intent="${a.intent}"`);
91464
+ if (a.action === "http" && a.url) parts.push(`url="${a.url}"`);
91465
+ if (a.action === "copy" && a.content)
91466
+ parts.push(`content="${a.content}"`);
91467
+ Object.entries(a).forEach(([key, value]) => {
91468
+ if (![
91469
+ "action",
91470
+ "label",
91471
+ "url",
91472
+ "intent",
91473
+ "content",
91474
+ "headers"
91475
+ ].includes(key) && value !== void 0) {
91476
+ parts.push(`${key}="${value}"`);
91477
+ }
91478
+ });
91479
+ if (a.action === "http" && a.headers) {
91480
+ Object.entries(a.headers).forEach(([hKey, hValue]) => {
91481
+ parts.push(`headers.${hKey}="${hValue}"`);
91482
+ });
91483
+ }
91484
+ return parts.join(", ");
91485
+ }).join("; ");
91486
+ }
91487
+ return this.client.post(`/${topic}`, message, {
91488
+ headers
91489
+ });
91490
+ }
91491
+ };
91492
+
91493
+ // src/apis/clients/ntfy/ntfy-api.client.ts
91494
+ var NtfyAPIClient = class extends APIClient {
91495
+ constructor(config) {
91496
+ const baseURL = config?.baseURL || "https://ntfy.sh";
91497
+ const auth = config?.auth || { type: "none" };
91498
+ super({
91499
+ ...config,
91500
+ baseURL,
91501
+ auth
91502
+ });
91503
+ this.notifications = new NtfyPublishResource(this);
91504
+ }
91505
+ };
91506
+
91507
+ // src/apis/clients/ntfy/ntfy-api.types.ts
91508
+ var ntfy_api_types_exports = {};
91439
91509
  export {
91440
91510
  IXCSoftAPIClient,
91441
91511
  ixc_soft_api_types_exports as IXCSoftAPITypes,
91442
91512
  IXCSoftMysqlService,
91513
+ NtfyAPIClient,
91514
+ ntfy_api_types_exports as NtfyAPITypes,
91443
91515
  OPASuiteMongoService,
91444
91516
  RoutinesAPIClient,
91445
91517
  routines_api_types_exports as RoutinesAPITypes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cristian-israel/giganet_lib_conecta",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "Database Connector Layer",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",