mitra-interactions-sdk 1.0.46-beta.2 → 1.0.47

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 CHANGED
@@ -265,9 +265,10 @@ import { executeDataLoaderMitra } from 'mitra-interactions-sdk';
265
265
 
266
266
  const result = await executeDataLoaderMitra({
267
267
  projectId: 123,
268
- dataLoaderId: 5
268
+ dataLoaderId: 5,
269
+ input: { mes: 1, ano: 2025 } // Opcional — parâmetros {{var}} da query
269
270
  });
270
- // result: { result: { timestamp, rowCount, query, status, fileSize, duration } }
271
+ // result: { status, result: { dataLoaderId, executionLog: { timestamp, rowCount, query, status, fileSize?, duration? }, message } }
271
272
  ```
272
273
 
273
274
  ### uploadFilePublicMitra / uploadFileLoadableMitra
package/dist/index.d.mts CHANGED
@@ -68,15 +68,21 @@ interface EmailResendCodeOptions {
68
68
  interface ExecuteDataLoaderOptions {
69
69
  projectId?: number;
70
70
  dataLoaderId: number;
71
+ input?: Record<string, unknown>;
71
72
  }
72
73
  interface ExecuteDataLoaderResponse {
74
+ status: string;
73
75
  result: {
74
- timestamp: string;
75
- rowCount: number;
76
- query: string;
77
- status: string;
78
- fileSize: number;
79
- duration: string;
76
+ dataLoaderId: number;
77
+ executionLog: {
78
+ timestamp: string;
79
+ rowCount: number;
80
+ query: string;
81
+ status: string;
82
+ fileSize?: string;
83
+ duration?: string;
84
+ };
85
+ message: string;
80
86
  };
81
87
  }
82
88
  interface ExecuteDbActionOptions {
package/dist/index.d.ts CHANGED
@@ -68,15 +68,21 @@ interface EmailResendCodeOptions {
68
68
  interface ExecuteDataLoaderOptions {
69
69
  projectId?: number;
70
70
  dataLoaderId: number;
71
+ input?: Record<string, unknown>;
71
72
  }
72
73
  interface ExecuteDataLoaderResponse {
74
+ status: string;
73
75
  result: {
74
- timestamp: string;
75
- rowCount: number;
76
- query: string;
77
- status: string;
78
- fileSize: number;
79
- duration: string;
76
+ dataLoaderId: number;
77
+ executionLog: {
78
+ timestamp: string;
79
+ rowCount: number;
80
+ query: string;
81
+ status: string;
82
+ fileSize?: string;
83
+ duration?: string;
84
+ };
85
+ message: string;
80
86
  };
81
87
  }
82
88
  interface ExecuteDbActionOptions {
package/dist/index.js CHANGED
@@ -409,9 +409,9 @@ function createMitraInstance(initialConfig) {
409
409
  },
410
410
  // Services
411
411
  async executeDataLoader(options) {
412
- return request("POST", "/interactions/executeDataLoader", {
413
- body: { projectId: resolveProjectId2(options.projectId), dataLoaderId: options.dataLoaderId }
414
- });
412
+ const body = { projectId: resolveProjectId2(options.projectId), dataLoaderId: options.dataLoaderId };
413
+ if (options.input !== void 0) body.input = options.input;
414
+ return request("POST", "/interactions/executeDataLoader", { body });
415
415
  },
416
416
  async executeDbAction(options) {
417
417
  const body = { projectId: resolveProjectId2(options.projectId), dbActionId: options.dbActionId };
@@ -870,10 +870,12 @@ var httpTenant = {
870
870
 
871
871
  // src/services.ts
872
872
  async function executeDataLoaderMitra(options) {
873
- return http.post("/interactions/executeDataLoader", {
873
+ const body = {
874
874
  projectId: resolveProjectId(options.projectId),
875
875
  dataLoaderId: options.dataLoaderId
876
- });
876
+ };
877
+ if (options.input !== void 0) body.input = options.input;
878
+ return http.post("/interactions/executeDataLoader", body);
877
879
  }
878
880
  async function executeDbActionMitra(options) {
879
881
  const body = {