Align DoListAsnad with Hamkar (4 args) and treat empty ERROR as [].
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { randomBytes } from 'crypto';
|
||||
import type { TahesabHttpClient } from './tahesab-http.client';
|
||||
import type { TahesabHttpClient, TahesabCallOptions } from './tahesab-http.client';
|
||||
|
||||
export type ConnCreds = {
|
||||
baseUrl: string;
|
||||
@@ -146,6 +146,7 @@ export class TahesabApi {
|
||||
args?: unknown[],
|
||||
method?: 'GET' | 'POST',
|
||||
timeoutMs?: number,
|
||||
extra?: Pick<TahesabCallOptions, 'emptyResultOnError'>,
|
||||
) {
|
||||
return this.http.call<T>({
|
||||
...this.creds,
|
||||
@@ -154,6 +155,7 @@ export class TahesabApi {
|
||||
args,
|
||||
method,
|
||||
timeoutMs,
|
||||
...extra,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -222,15 +224,15 @@ export class TahesabApi {
|
||||
fromShamsi: string,
|
||||
toShamsi: string,
|
||||
) {
|
||||
// OpenAPI: Count_Last, Moshtari_Code, AzTarikhShamsi, TaTarikhShamsi, FilterNoSanad, Mande_Jens_Felez
|
||||
return this.call('DoListAsnad', 'DoListAsnad', [
|
||||
countLast,
|
||||
moshtariCode,
|
||||
fromShamsi,
|
||||
toShamsi,
|
||||
'',
|
||||
0,
|
||||
]);
|
||||
// مثل همکار: فقط ۴ پارامتر (Count_Last, Code, از, تا) — پارامتر اضافه باعث خطای تهحساب میشود
|
||||
return this.call(
|
||||
'DoListAsnad',
|
||||
'DoListAsnad',
|
||||
[countLast, moshtariCode, fromShamsi, toShamsi],
|
||||
'POST',
|
||||
55_000,
|
||||
{ emptyResultOnError: /رکوردی یافت نشد/i },
|
||||
);
|
||||
}
|
||||
|
||||
doListNameSekeh() {
|
||||
|
||||
Reference in New Issue
Block a user