jsegd-fluig-types 1.0.25 → 1.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsegd-fluig-types",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Definições de tipos TypeScript para desenvolvimento na plataforma Fluig - Inclui APIs, SDK, datasets, workflows e webservices",
5
5
  "keywords": [
6
6
  "fluig",
@@ -1,328 +1,298 @@
1
1
  declare enum FormMod {
2
- "ADD" = "ADD",
3
- "MOD" = "MOD",
4
- "VIEW" = "VIEW",
5
- "NONE" = "NONE",
2
+ 'ADD' = 'ADD',
3
+ 'MOD' = 'MOD',
4
+ 'VIEW' = 'VIEW',
5
+ 'NONE' = 'NONE',
6
6
  }
7
7
 
8
8
  declare global {
9
- interface ServiceRequestOptions {
10
- companyId: string;
11
- serviceCode: string;
12
- endpoint: string;
13
- method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE" | "CONNECT";
14
- timeoutService: string;
15
- params?: { [key: string]: unknown } | { [key: string]: unknown }[];
16
- options?: {
17
- encoding: "UTF-8" | "ISO-8859-1";
18
- mediaType:
19
- | "application/json"
20
- | "application/xml"
21
- | "text/plain"
22
- | "multipart/form-data";
23
- useSSL: boolean;
24
- };
25
- headers?: {
26
- "Content-Type":
27
- | "application/json;charset=UTF-8"
28
- | "application/xml;charset=UTF-8"
29
- | "text/plain;charset=UTF-8"
30
- | "multipart/form-data";
31
- };
32
- }
33
- interface WKValues {
34
- WKDef: string;
35
- WKVersDef: string;
36
- WKNumProces: string;
37
- WKNumState: string;
38
- WKCompany: string;
39
- WKUser: string;
40
- WKUserComment: string;
41
- WKCompletTask: boolean;
42
- WKNextState: string;
43
- WKCardId: string;
44
- WKFormId: string;
45
- WKIdentityCompany: string;
46
- WKMobile: string;
47
- WKIsService: string;
48
- WKUserLocale: string;
49
- WKManagerMode: string;
50
- WKReplacement: string;
51
- WKIsTransfer: string;
52
- WKCurrentMovto: string;
53
- WKActualThread: string;
54
- }
9
+ interface ServiceRequestOptions {
10
+ companyId: string
11
+ serviceCode: string
12
+ endpoint: string
13
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT'
14
+ timeoutService: string
15
+ params?: { [key: string]: unknown } | { [key: string]: unknown }[]
16
+ options?: {
17
+ encoding: 'UTF-8' | 'ISO-8859-1'
18
+ mediaType: 'application/json' | 'application/xml' | 'text/plain' | 'multipart/form-data'
19
+ useSSL: boolean
20
+ }
21
+ headers?: {
22
+ 'Content-Type': 'application/json;charset=UTF-8' | 'application/xml;charset=UTF-8' | 'text/plain;charset=UTF-8' | 'multipart/form-data'
23
+ }
24
+ }
25
+ interface WKValues {
26
+ WKDef: string
27
+ WKVersDef: string
28
+ WKNumProces: string
29
+ WKNumState: string
30
+ WKCompany: string
31
+ WKUser: string
32
+ WKUserComment: string
33
+ WKCompletTask: boolean
34
+ WKNextState: string
35
+ WKCardId: string
36
+ WKFormId: string
37
+ WKIdentityCompany: string
38
+ WKMobile: string
39
+ WKIsService: string
40
+ WKUserLocale: string
41
+ WKManagerMode: string
42
+ WKReplacement: string
43
+ WKIsTransfer: string
44
+ WKCurrentMovto: string
45
+ WKActualThread: string
46
+ }
55
47
 
56
- /**
57
- * GlobalVars
58
- *
59
- * Objeto que armazena variáveis globais do workflow, permitindo o acesso e manipulação de informações compartilhadas entre diferentes partes do sistema.
60
- * @example
61
- * // Definindo uma variável global
62
- * globalVars.put("varName", "varValue");
63
- *
64
- * // Acessando uma variável global
65
- * const processo = globalVars.get("varName");
66
- */
67
- const globalVars: java.util.HashMap<java.lang.String, java.lang.String>;
68
-
69
- /**
70
- * Obtém o valor de uma variável global do workflow
71
- * @param key - Chave da variável global do workflow:
72
- * - WKDef: Código do processo
73
- * - WKVersDef: Versão do processo
74
- * - WKNumProces: Número da solicitação de processo
75
- * - WKNumState: Número da atividade
76
- * - WKCompany: Número da empresa
77
- * - WKUser: Código do usuário corrente
78
- * - WKUserComment: Comentário do usuário
79
- * - WKCompletTask: Se a tarefa foi completada
80
- * - WKNextState: Número da próxima atividade (destino)
81
- * - WKCardId: Código do registro de formulário do processo
82
- * - WKFormId: Código do formulário do processo
83
- * - WKIdentityCompany: Identificador da empresa selecionada para Experiências de uso TOTVS
84
- * - WKMobile: Identifica se a ação foi realizada através de um dispositivo mobile
85
- * - WKIsService: Identifica se a solicitação de cancelamento foi realizada através de um serviço
86
- * - WKUserLocale: Identifica o idioma corrente do usuário
87
- * - WKManagerMode: Identifica se o processo está sendo movimentado pela visão do gestor
88
- * - WKReplacement: Código do usuário substituto
89
- * - WKIsTransfer: Permite verificar se o usuário está ou não transferindo uma tarefa
90
- * - WKCurrentMovto: Permite a movimentação do processo
91
- * - WKActualThread: Retorna a Thread atual do processo
92
- * @returns Valor da variável global do workflow
93
- */
94
- function getValue(key: "WKDef"): string;
95
- function getValue(key: "WKVersDef"): string;
96
- function getValue(key: "WKNumProces"): string;
97
- function getValue(key: "WKNumState"): string;
98
- function getValue(key: "WKCompany"): string;
99
- function getValue(key: "WKUser"): string;
100
- function getValue(key: "WKUserComment"): string;
101
- function getValue(key: "WKCompletTask"): boolean;
102
- function getValue(key: "WKNextState"): string;
103
- function getValue(key: "WKCardId"): string;
104
- function getValue(key: "WKFormId"): string;
105
- function getValue(key: "WKIdentityCompany"): string;
106
- function getValue(key: "WKMobile"): string;
107
- function getValue(key: "WKIsService"): string;
108
- function getValue(key: "WKUserLocale"): string;
109
- function getValue(key: "WKManagerMode"): string;
110
- function getValue(key: "WKReplacement"): string;
111
- function getValue(key: "WKIsTransfer"): string;
112
- function getValue(key: "WKCurrentMovto"): string;
113
- function getValue(key: "WKActualThread"): string;
114
-
115
- /**
116
- * Obtém informações da API de Workflow
117
- */
118
- class hAPI {
119
48
  /**
120
- * Permite acessar o valor de um campo do formulário do processo
121
- * @param nomeCampo - Nome do campo do formulário
49
+ * GlobalVars
50
+ *
51
+ * Objeto que armazena variáveis globais do workflow, permitindo o acesso e manipulação de informações compartilhadas entre diferentes partes do sistema.
52
+ * @example
53
+ * // Definindo uma variável global
54
+ * globalVars.put("varName", "varValue");
55
+ *
56
+ * // Acessando uma variável global
57
+ * const processo = globalVars.get("varName");
122
58
  */
123
- static getCardValue(nomeCampo: string): string;
59
+ const globalVars: java.util.HashMap<java.lang.String, java.lang.String>
60
+
124
61
  /**
125
- * Permite definir o valor de um campo do formulário do processo
126
- * @param nomeCampo - Nome do campo do formulário
127
- * @param valor - Valor a ser definido no campo do formulário
62
+ * Obtém o valor de uma variável global do workflow
63
+ * @param key - Chave da variável global do workflow:
64
+ * - WKDef: Código do processo
65
+ * - WKVersDef: Versão do processo
66
+ * - WKNumProces: Número da solicitação de processo
67
+ * - WKNumState: Número da atividade
68
+ * - WKCompany: Número da empresa
69
+ * - WKUser: Código do usuário corrente
70
+ * - WKUserComment: Comentário do usuário
71
+ * - WKCompletTask: Se a tarefa foi completada
72
+ * - WKNextState: Número da próxima atividade (destino)
73
+ * - WKCardId: Código do registro de formulário do processo
74
+ * - WKFormId: Código do formulário do processo
75
+ * - WKIdentityCompany: Identificador da empresa selecionada para Experiências de uso TOTVS
76
+ * - WKMobile: Identifica se a ação foi realizada através de um dispositivo mobile
77
+ * - WKIsService: Identifica se a solicitação de cancelamento foi realizada através de um serviço
78
+ * - WKUserLocale: Identifica o idioma corrente do usuário
79
+ * - WKManagerMode: Identifica se o processo está sendo movimentado pela visão do gestor
80
+ * - WKReplacement: Código do usuário substituto
81
+ * - WKIsTransfer: Permite verificar se o usuário está ou não transferindo uma tarefa
82
+ * - WKCurrentMovto: Permite a movimentação do processo
83
+ * - WKActualThread: Retorna a Thread atual do processo
84
+ * @returns Valor da variável global do workflow
128
85
  */
129
- static setCardValue(nomeCampo: string, valor: string): string;
86
+ function getValue(key: 'WKDef'): string
87
+ function getValue(key: 'WKVersDef'): string
88
+ function getValue(key: 'WKNumProces'): string
89
+ function getValue(key: 'WKNumState'): string
90
+ function getValue(key: 'WKCompany'): string
91
+ function getValue(key: 'WKUser'): string
92
+ function getValue(key: 'WKUserComment'): string
93
+ function getValue(key: 'WKCompletTask'): boolean
94
+ function getValue(key: 'WKNextState'): string
95
+ function getValue(key: 'WKCardId'): string
96
+ function getValue(key: 'WKFormId'): string
97
+ function getValue(key: 'WKIdentityCompany'): string
98
+ function getValue(key: 'WKMobile'): string
99
+ function getValue(key: 'WKIsService'): string
100
+ function getValue(key: 'WKUserLocale'): string
101
+ function getValue(key: 'WKManagerMode'): string
102
+ function getValue(key: 'WKReplacement'): string
103
+ function getValue(key: 'WKIsTransfer'): string
104
+ function getValue(key: 'WKCurrentMovto'): string
105
+ function getValue(key: 'WKActualThread'): string
106
+
130
107
  /**
131
- * Adiciona um filho no formulário pai e filho do processo
132
- * @param tableName - Nome da tabela do formulário
133
- * @param cardData - Mapa com os campos do filho e seus valores
134
- * @example
135
- * const cardData = new java.util.HashMap();
136
- * cardData.put("NOME", "João");
137
- * cardData.put("IDADE", "30");
138
- * hAPI.addCardChild("TABELA_FILHOS", cardData);
108
+ * Obtém informações da API de Workflow
139
109
  */
140
- static addCardChild(
141
- tableName: string,
142
- cardData: java.util.HashMap<java.lang.String, java.lang.String>
143
- ): void;
110
+ class hAPI {
111
+ /**
112
+ * Permite acessar o valor de um campo do formulário do processo
113
+ * @param nomeCampo - Nome do campo do formulário
114
+ */
115
+ static getCardValue(nomeCampo: string): string
116
+ /**
117
+ * Permite definir o valor de um campo do formulário do processo
118
+ * @param nomeCampo - Nome do campo do formulário
119
+ * @param valor - Valor a ser definido no campo do formulário
120
+ */
121
+ static setCardValue(nomeCampo: string, valor: string): string
122
+ /**
123
+ * Adiciona um filho no formulário pai e filho do processo
124
+ * @param tableName - Nome da tabela do formulário
125
+ * @param cardData - Mapa com os campos do filho e seus valores
126
+ * @example
127
+ * const cardData = new java.util.HashMap();
128
+ * cardData.put("NOME", "João");
129
+ * cardData.put("IDADE", "30");
130
+ * hAPI.addCardChild("TABELA_FILHOS", cardData);
131
+ */
132
+ static addCardChild(tableName: string, cardData: java.util.HashMap<java.lang.String, java.lang.String>): void
144
133
 
145
- static removeCardChild(tableName: string, index: number): void;
146
- static setAutomaticDecision(
147
- taskNumber: number,
148
- responsible: java.util.ArrayList<string>,
149
- comment: string
150
- ): void;
151
- static getActiveStates(): java.util.ArrayList<object>;
152
- static getParentInstance(processInstanceId: number): number;
153
- static getChildrenInstances(
154
- processInstanceId: number
155
- ): java.util.List<number>;
156
- static setDueDate(
157
- processId: number,
158
- numThread: number,
159
- userId: string,
160
- dueDate: Date,
161
- timeInSeconds: number
162
- ): void;
163
- static transferTask(
164
- users: java.util.ArrayList<string>,
165
- comment: string,
166
- numThread?: number
167
- ): void;
168
- static setTaskComments(
169
- userId: string,
170
- processId: number,
171
- threadId: number,
172
- comment: string
173
- ): void;
174
- static getAdvancedProperty(nomePropriedade: string): string;
175
- static getCardData(numProcesso: number): java.util.HashMap<string, string>;
176
- static startProcess(
177
- processId: string,
178
- taskNumber: number,
179
- users: java.util.ArrayList<java.lang.String>,
180
- comment?: string,
181
- taskFinished?: boolean,
182
- form?: java.util.HashMap<java.lang.String, java.lang.String>,
183
- managerMode?: boolean
184
- ): java.util.HashMap<string, string>;
185
- static calculateDeadLineHours(
186
- deadlineDate: Date,
187
- seconds: number,
188
- deadlineInHours: number,
189
- periodId: string
190
- ): unknown;
191
- static calculateDeadLineTime(
192
- deadlineDate: Date,
193
- seconds: number,
194
- deadlineInHours: number,
195
- periodId: string
196
- ): unknown;
197
- static setColleagueReplacement(responsible: string): void;
198
- static getUserTaskLink(numAtividade: number): string;
199
- static getActualThread(
200
- companyNumber: number,
201
- processNumber: number,
202
- activityNumber: number
203
- ): number;
204
- static createAdHocTasks(
205
- processoId: number,
206
- sequenciaId: number,
207
- assunto: string,
208
- detalhamento: string,
209
- tarefas: unknown[]
210
- ): void;
211
- static listAttachments(): java.util.List<unknown>;
212
- static publishWorkflowAttachment(documentDto: unknown): void;
213
- static attachDocument(documentId: number): void;
214
- static getChildrenFromTable(
215
- tableName: string
216
- ): java.util.HashMap<string, string>;
217
- static getChildrenIndexes(tableName: string): number[];
218
- static getAvailableStatesDetail(
219
- companyId: number,
220
- userId: string,
221
- processId: number,
222
- processInstanceId: number,
223
- threadSequenceId?: number
224
- ): unknown;
225
- }
134
+ static removeCardChild(tableName: string, index: number): void
135
+ static setAutomaticDecision(taskNumber: number, responsible: java.util.ArrayList<string>, comment: string): void
136
+ static getActiveStates(): java.util.ArrayList<object>
137
+ static getParentInstance(processInstanceId: number): number
138
+ static getChildrenInstances(processInstanceId: number): java.util.List<number>
139
+ static setDueDate(processId: number, numThread: number, userId: string, dueDate: Date, timeInSeconds: number): void
140
+ static transferTask(users: java.util.ArrayList<string>, comment: string, numThread?: number): void
141
+ static setTaskComments(userId: string, processId: number, threadId: number, comment: string): void
142
+ static getAdvancedProperty(nomePropriedade: string): string
143
+ static getCardData(numProcesso: number): java.util.HashMap<string, string>
144
+ static startProcess(
145
+ processId: string,
146
+ taskNumber: number,
147
+ users: java.util.ArrayList<java.lang.String>,
148
+ comment?: string,
149
+ taskFinished?: boolean,
150
+ form?: java.util.HashMap<java.lang.String, java.lang.String>,
151
+ managerMode?: boolean
152
+ ): java.util.HashMap<string, string>
153
+ static calculateDeadLineHours(deadlineDate: Date, seconds: number, deadlineInHours: number, periodId: string): unknown
154
+ static calculateDeadLineTime(deadlineDate: Date, seconds: number, deadlineInHours: number, periodId: string): unknown
155
+ static setColleagueReplacement(responsible: string): void
156
+ static getUserTaskLink(numAtividade: number): string
157
+ static getActualThread(companyNumber: number, processNumber: number, activityNumber: number): number
158
+ static createAdHocTasks(processoId: number, sequenciaId: number, assunto: string, detalhamento: string, tarefas: unknown[]): void
159
+ static listAttachments(): java.util.List<unknown>
160
+ static publishWorkflowAttachment(documentDto: unknown): void
161
+ static attachDocument(documentId: number): void
162
+ static getChildrenFromTable(tableName: string): java.util.HashMap<string, string>
163
+ static getChildrenIndexes(tableName: string): number[]
164
+ static getAvailableStatesDetail(
165
+ companyId: number,
166
+ userId: string,
167
+ processId: number,
168
+ processInstanceId: number,
169
+ threadSequenceId?: number
170
+ ): unknown
171
+ }
226
172
 
227
- class JSONUtil {
228
- static toJSON(data: object): java.lang.String;
229
- }
173
+ class JSONUtil {
174
+ static toJSON(data: object): java.lang.String
175
+ }
230
176
 
231
- // #########################################################################
232
- // ########################## Eventos de Formulário ########################
233
- // #########################################################################
234
- class FormController {
235
- getCompanyId(): number;
236
- getDocumentId(): number;
237
- getVersion(): number;
238
- getCardIndex(): number;
239
- setEnabled(nomeCampo: string, habilita: boolean, protegido: boolean): void;
240
- getEnabled(nomeCampo: string): boolean;
241
- setValue(nomeCampo: string, valor: string): void;
242
- getValue(nomeCampo: string): string;
243
- setVisible(nomeCampo: string, visible: boolean): void;
244
- setVisibleById(idDoCampo: string, visible: boolean): void;
245
- setShowDisabledFields(habilita: boolean): void;
246
- setHidePrintLink(habilita: boolean): void;
247
- setHideDeleteButton(habilita: boolean): void;
248
- setEnhancedSecurityHiddenInputs(proteger: boolean): void;
249
- getFormMode(): FormMod;
250
- isHidePrintLink(): boolean;
251
- getChildrenFromTable(tableName: string): object;
252
- getChildrenIndexes(tableName: string): number[];
253
- isHideDeleteButton(): boolean;
254
- getMobile(): boolean;
255
- isVisible(nomeCampo: string): boolean;
256
- isVisibleById(id: string): boolean;
257
- }
258
- class customHTML {
259
- static append(html: string): void;
260
- }
261
- function displayFields(form: FormController, customHTML: customHTML): void;
262
- function enableFields(form: FormController): void;
263
- function inputFields(form: FormController): void;
264
- function validateForm(form: FormController): void;
177
+ // #########################################################################
178
+ // ########################## Eventos de Formulário ########################
179
+ // #########################################################################
180
+ class FormController {
181
+ getCompanyId(): number
182
+ getDocumentId(): number
183
+ getVersion(): number
184
+ getCardIndex(): number
185
+ setEnabled(nomeCampo: string, habilita: boolean, protegido: boolean): void
186
+ getEnabled(nomeCampo: string): boolean
187
+ setValue(nomeCampo: string, valor: string): void
188
+ getValue(nomeCampo: string): string
189
+ setVisible(nomeCampo: string, visible: boolean): void
190
+ setVisibleById(idDoCampo: string, visible: boolean): void
191
+ setShowDisabledFields(habilita: boolean): void
192
+ setHidePrintLink(habilita: boolean): void
193
+ setHideDeleteButton(habilita: boolean): void
194
+ setEnhancedSecurityHiddenInputs(proteger: boolean): void
195
+ getFormMode(): FormMod
196
+ isHidePrintLink(): boolean
197
+ getChildrenFromTable(tableName: string): object
198
+ getChildrenIndexes(tableName: string): number[]
199
+ isHideDeleteButton(): boolean
200
+ getMobile(): boolean
201
+ isVisible(nomeCampo: string): boolean
202
+ isVisibleById(id: string): boolean
203
+ }
204
+ class customHTML {
205
+ append(html: string): void
206
+ }
207
+ function displayFields(form: FormController, customHTML: customHTML): void
208
+ function enableFields(form: FormController): void
209
+ function inputFields(form: FormController): void
210
+ function validateForm(form: FormController): void
265
211
 
266
- // #########################################################################
267
- // ####################### Definição de Log ################################
268
- // #########################################################################
269
- class log {
270
- static dir(object: object): void;
271
- static info(message: string): void;
272
- static error(message: string): void;
273
- static warn(message: string): void;
274
- static debug(message: string): void;
275
- }
212
+ // #########################################################################
213
+ // ####################### Definição de Log ################################
214
+ // #########################################################################
215
+ class log {
216
+ static dir(object: object): void
217
+ static info(message: string): void
218
+ static error(message: string): void
219
+ static warn(message: string): void
220
+ static debug(message: string): void
221
+ }
276
222
 
277
- // #########################################################################
278
- // ########################## ServiceManager Types #########################
279
- // #########################################################################
223
+ // #########################################################################
224
+ // ########################## ServiceManager Types #########################
225
+ // #########################################################################
280
226
 
281
- // Mapeamento de classes Java comuns no Fluig
282
- interface ClassNameMap {
283
- "java.util.ArrayList": java.util.ArrayList<any>;
284
- "java.util.HashMap": java.util.HashMap<any, any>;
285
- "java.util.List": java.util.List<any>;
286
- "java.util.Collection": java.util.Collection<any>;
287
- "java.util.Map": java.util.Map<any, any>;
288
- "java.lang.String": java.lang.String;
289
- "java.lang.Integer": java.lang.Integer;
290
- "java.lang.Long": java.lang.Long;
291
- "java.lang.Object": java.lang.Object;
292
- "java.sql.ResultSet": java.sql.ResultSet;
293
- "java.sql.Date": java.sql.Date;
294
- "java.sql.Timestamp": java.sql.Timestamp;
295
- "javax.naming.InitialContext": javax.naming.InitialContext;
296
- "com.fluig.sdk.api.FluigAPI": com.fluig.sdk.api.FluigAPI;
297
- "com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService": com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService;
298
- }
227
+ // Mapeamento de classes Java comuns no Fluig
228
+ interface ClassNameMap {
229
+ 'java.util.ArrayList': java.util.ArrayList<any>
230
+ 'java.util.HashMap': java.util.HashMap<any, any>
231
+ 'java.util.List': java.util.List<any>
232
+ 'java.util.Collection': java.util.Collection<any>
233
+ 'java.util.Map': java.util.Map<any, any>
234
+ 'java.lang.String': java.lang.String
235
+ 'java.lang.Integer': java.lang.Integer
236
+ 'java.lang.Long': java.lang.Long
237
+ 'java.lang.Object': java.lang.Object
238
+ 'java.sql.ResultSet': java.sql.ResultSet
239
+ 'java.sql.Date': java.sql.Date
240
+ 'java.sql.Timestamp': java.sql.Timestamp
241
+ 'javax.naming.InitialContext': javax.naming.InitialContext
242
+ 'com.fluig.sdk.api.FluigAPI': com.fluig.sdk.api.FluigAPI
243
+ 'com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService': com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService
244
+ }
299
245
 
300
- class ServiceManager {
301
- static getService(serviceName: string): Service;
302
- }
246
+ class ServiceManager {
247
+ static getService(serviceName: string): Service
248
+ }
303
249
 
304
- class Service {
305
- getBean(): {
306
- /**
307
- * Instancia uma classe Java com tipagem específica baseada no nome da classe
308
- * @param className Nome completo da classe Java
309
- * @returns Instância da classe com tipagem apropriada
310
- * @example
311
- * const arrayList = service.getBean().instantiate('java.util.ArrayList');
312
- * arrayList.add("item"); // Métodos do ArrayList disponíveis
313
- *
314
- * const hashMap = service.getBean().instantiate('java.util.HashMap');
315
- * hashMap.put("key", "value"); // Métodos do HashMap disponíveis
316
- *
317
- * const fluigAPI = service.getBean().instantiate('com.fluig.sdk.api.FluigAPI');
318
- * fluigAPI.getUserService(); // Métodos da FluigAPI disponíveis
319
- *
320
- * const workflowService = service.getBean().instantiate('com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService');
321
- * workflowService.startProcess(...); // Métodos do ECMWorkflowEngineService disponíveis
322
- */
323
- instantiate<T extends keyof ClassNameMap>(className: T): ClassNameMap[T];
324
- instantiate<T = any>(className: string): T;
325
- };
326
- }
250
+ class Service {
251
+ getBean(): {
252
+ /**
253
+ * Instancia uma classe Java com tipagem específica baseada no nome da classe
254
+ * @param className Nome completo da classe Java
255
+ * @returns Instância da classe com tipagem apropriada
256
+ * @example
257
+ * const arrayList = service.getBean().instantiate('java.util.ArrayList');
258
+ * arrayList.add("item"); // Métodos do ArrayList disponíveis
259
+ *
260
+ * const hashMap = service.getBean().instantiate('java.util.HashMap');
261
+ * hashMap.put("key", "value"); // Métodos do HashMap disponíveis
262
+ *
263
+ * const fluigAPI = service.getBean().instantiate('com.fluig.sdk.api.FluigAPI');
264
+ * fluigAPI.getUserService(); // Métodos da FluigAPI disponíveis
265
+ *
266
+ * const workflowService = service.getBean().instantiate('com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService');
267
+ * workflowService.startProcess(...); // Métodos do ECMWorkflowEngineService disponíveis
268
+ */
269
+ instantiate<T extends keyof ClassNameMap>(className: T): ClassNameMap[T]
270
+ instantiate<T = any>(className: string): T
271
+ }
272
+ }
273
+ /**
274
+ * DatasetRequestParams
275
+ *
276
+ * Interface que define os parâmetros de uma requisição de dataset em scripts de workflow,
277
+ * incluindo informações sobre o processo, usuário e dados do formulário,
278
+ * permitindo a criação de datasets personalizados com base no contexto do workflow.
279
+ * @example
280
+ * var datasetRequestParams = {
281
+ requestId: getValue('WKNumProces'),
282
+ cardId: parseInt(getValue('WKCardId')),
283
+ companyId: parseInt(getValue('WKCompany')),
284
+ userId: getValue('WKUser'),
285
+ activityId: parseInt(getValue('WKNumState')),
286
+ cardData: hAPI.getCardData(parseInt(getValue('WKNumProces'))),
287
+ };
288
+ */
289
+ interface DatasetRequestParams {
290
+ requestId: string
291
+ cardId: number
292
+ companyId: number
293
+ userId: string
294
+ activityId: number
295
+ cardData: java.util.HashMap<string, string>
296
+ }
327
297
  }
328
- export {};
298
+ export {}