mitra-interactions-sdk 1.0.54 → 1.0.55

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.
Files changed (2) hide show
  1. package/README.md +34 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -256,6 +256,40 @@ const result = await stopServerFunctionExecutionMitra({
256
256
  // result: { status, result: { executionId, executionStatus: "CANCELLED" | "ALREADY_FINISHED" } }
257
257
  ```
258
258
 
259
+ ### Public Server Functions (sem autenticação)
260
+
261
+ Para Server Functions com `publicExecution = true`. Não requerem token.
262
+
263
+ ```typescript
264
+ import {
265
+ executePublicServerFunctionMitra,
266
+ executePublicServerFunctionAsyncMitra,
267
+ getPublicServerFunctionExecutionMitra
268
+ } from 'mitra-interactions-sdk';
269
+
270
+ // Sync — retorna resultado inline (timeout 5min)
271
+ const result = await executePublicServerFunctionMitra({
272
+ projectId: 123,
273
+ serverFunctionId: 49,
274
+ input: { param1: 'value' }
275
+ });
276
+ // result: { executionId, status, output, logs, error, durationMs }
277
+
278
+ // Async — retorna executionId imediatamente
279
+ const { executionId } = await executePublicServerFunctionAsyncMitra({
280
+ projectId: 123,
281
+ serverFunctionId: 50,
282
+ input: { heavyParam: true }
283
+ });
284
+
285
+ // Polling — consulta status/resultado
286
+ const execution = await getPublicServerFunctionExecutionMitra({
287
+ projectId: 123,
288
+ executionId
289
+ });
290
+ // execution: { executionId, status, output, logs, error, durationMs }
291
+ ```
292
+
259
293
  ### executeDataLoaderMitra
260
294
 
261
295
  Executa um Data Loader cadastrado no projeto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mitra-interactions-sdk",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "SDK agnóstico para interações com a plataforma Mitra",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",