Compare commits
No commits in common. "7d8c63f52dd8c2c8ec55035ce11f6ecce1197be6" and "7d5861b831d01a7a7644f5f4ff1ffcd13203bac4" have entirely different histories.
7d8c63f52d
...
7d5861b831
@ -228,16 +228,7 @@ export class SDKSignerClient {
|
|||||||
this.on('message', handler);
|
this.on('message', handler);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
async get_owned_processes(): Promise<ServerResponse> {
|
||||||
async getPairingId(): Promise<ServerResponse> {
|
|
||||||
const message: ClientMessage = {
|
|
||||||
type: MessageType.GET_PAIRING_ID,
|
|
||||||
messageId: this.generateMessageId()
|
|
||||||
};
|
|
||||||
return this.sendAndWait(message, MessageType.GET_PAIRING_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getOwnedProcesses(): Promise<ServerResponse> {
|
|
||||||
const message: ClientMessage = {
|
const message: ClientMessage = {
|
||||||
type: MessageType.GET_MY_PROCESSES,
|
type: MessageType.GET_MY_PROCESSES,
|
||||||
messageId: this.generateMessageId()
|
messageId: this.generateMessageId()
|
||||||
@ -295,30 +286,6 @@ export class SDKSignerClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getOfficeProcessByIdnot(idNot: string): Promise<{ processId: string, processData: any } | null> {
|
|
||||||
console.log('Getting office process by idnot:', idNot);
|
|
||||||
try {
|
|
||||||
const signerResponse: ServerResponse = await this.getOwnedProcesses();
|
|
||||||
// We are interested in the data
|
|
||||||
const processesData: any = signerResponse.data;
|
|
||||||
for (const [processId, processData] of Object.entries(processesData)) {
|
|
||||||
if (processData
|
|
||||||
&& typeof processData === 'object'
|
|
||||||
&& 'utype' in processData
|
|
||||||
&& 'idNot' in processData
|
|
||||||
&& (processData as any).utype === 'office'
|
|
||||||
&& (processData as any).idNot === idNot
|
|
||||||
) {
|
|
||||||
console.log('Found matching process:', processId);
|
|
||||||
return { processId, processData };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error getting user process by idnot:', error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify an update for a process
|
* Notify an update for a process
|
||||||
|
Loading…
x
Reference in New Issue
Block a user