@inceptionbg/main 2.0.74 → 2.0.76
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/dist/index.d.ts +7 -2
- package/dist/types/global.d.ts +73 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ISimpleObjectWithCode, ISimpleObject, ISelectData, IBooleanObject, IAnyObject } from '@inceptionbg/iui';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactElement, FC, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { AxiosResponse } from 'axios';
|
|
5
5
|
export { AxiosError } from 'axios';
|
|
6
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
6
7
|
import * as reactQuery from '@tanstack/react-query';
|
|
7
8
|
export { reactQuery as ReactQuery };
|
|
8
9
|
export { keepPreviousData, useMutation, useQuery } from '@tanstack/react-query';
|
|
@@ -1336,6 +1337,10 @@ interface IToken {
|
|
|
1336
1337
|
umcn?: string;
|
|
1337
1338
|
}
|
|
1338
1339
|
|
|
1340
|
+
type IUseMutationData = {
|
|
1341
|
+
onSuccess: (data: AxiosResponse<any, any>, variables: any) => void;
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1339
1344
|
interface ISidebarItem {
|
|
1340
1345
|
label: string;
|
|
1341
1346
|
icon?: IconDefinition;
|
|
@@ -1466,4 +1471,4 @@ interface Props {
|
|
|
1466
1471
|
}
|
|
1467
1472
|
declare const IndexDataSearch: FC<Props>;
|
|
1468
1473
|
|
|
1469
|
-
export { ApprovalStatus, AxiosTokenHandler, Constraints, DocumentApprovalFetchOption, DocumentFetchOption, DocumentFileFetchOptions, DocumentIndicies, DocumentSendFetchOption, DocumentStatuses, ErrorContext, Header, IApproval, IApprovalSearch, IApprovalStep, IApprovalStepSearch, IBankAccount, IBankAccountSearch, ICondition, IConditionIndexData, IConstraint, IContactPerson, ICountry, IDocument, IDocumentAny, IDocumentApproval, IDocumentApprovalStep, IDocumentApprovalVote, IDocumentFile, IDocumentFileParams, IDocumentIndex, IDocumentSearch, IDocumentSend, IDocumentSendSearch, IDocumentType, IEnv, IFile, IFileSignData, IFileType, IFileUpload, IInvoice, IInvoiceItem, ILatestApprovalProcess, IModule, IModuleId, IMunicipality, INote, INoteSearch, IOrganization, IOrganizationFetchOption, IOrganizationSearch, IOrganizationSettings, IPartner, IPartnerGroup, IPartnerType, IPartnersSearch, IPhaseGroup, IPhaseGroupSearch, IPlace, IRole, IRolePrivilege, IRoute, IServiceApi, ISidebarItem, IToken, IUploadDocumentType, IUser, IUserSettings, IVoteSearch, IndexDataSearch, LoginPage, MainPageWrapper, ModuleIds, NoAccessInfo, NoMatchPage, OrganizationStatus, OrganizationStatuses, PartnerGroupType, ReactQueryProvider, RolePrivilegeGroup, RolesWithPrivileges, Router, SelectOrgPage, Sidebar, UserFetchOption, UserOrgContext, UserOrgProvider, decodeToken, envVars, getUser, login, logout, modules };
|
|
1474
|
+
export { ApprovalStatus, AxiosTokenHandler, Constraints, DocumentApprovalFetchOption, DocumentFetchOption, DocumentFileFetchOptions, DocumentIndicies, DocumentSendFetchOption, DocumentStatuses, ErrorContext, Header, IApproval, IApprovalSearch, IApprovalStep, IApprovalStepSearch, IBankAccount, IBankAccountSearch, ICondition, IConditionIndexData, IConstraint, IContactPerson, ICountry, IDocument, IDocumentAny, IDocumentApproval, IDocumentApprovalStep, IDocumentApprovalVote, IDocumentFile, IDocumentFileParams, IDocumentIndex, IDocumentSearch, IDocumentSend, IDocumentSendSearch, IDocumentType, IEnv, IFile, IFileSignData, IFileType, IFileUpload, IInvoice, IInvoiceItem, ILatestApprovalProcess, IModule, IModuleId, IMunicipality, INote, INoteSearch, IOrganization, IOrganizationFetchOption, IOrganizationSearch, IOrganizationSettings, IPartner, IPartnerGroup, IPartnerType, IPartnersSearch, IPhaseGroup, IPhaseGroupSearch, IPlace, IRole, IRolePrivilege, IRoute, IServiceApi, ISidebarItem, IToken, IUploadDocumentType, IUseMutationData, IUser, IUserSettings, IVoteSearch, IndexDataSearch, LoginPage, MainPageWrapper, ModuleIds, NoAccessInfo, NoMatchPage, OrganizationStatus, OrganizationStatuses, PartnerGroupType, ReactQueryProvider, RolePrivilegeGroup, RolesWithPrivileges, Router, SelectOrgPage, Sidebar, UserFetchOption, UserOrgContext, UserOrgProvider, decodeToken, envVars, getUser, login, logout, modules };
|
package/dist/types/global.d.ts
CHANGED
|
@@ -211,6 +211,72 @@ interface AxiosProxyConfig {
|
|
|
211
211
|
protocol?: string;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
declare enum HttpStatusCode {
|
|
215
|
+
Continue = 100,
|
|
216
|
+
SwitchingProtocols = 101,
|
|
217
|
+
Processing = 102,
|
|
218
|
+
EarlyHints = 103,
|
|
219
|
+
Ok = 200,
|
|
220
|
+
Created = 201,
|
|
221
|
+
Accepted = 202,
|
|
222
|
+
NonAuthoritativeInformation = 203,
|
|
223
|
+
NoContent = 204,
|
|
224
|
+
ResetContent = 205,
|
|
225
|
+
PartialContent = 206,
|
|
226
|
+
MultiStatus = 207,
|
|
227
|
+
AlreadyReported = 208,
|
|
228
|
+
ImUsed = 226,
|
|
229
|
+
MultipleChoices = 300,
|
|
230
|
+
MovedPermanently = 301,
|
|
231
|
+
Found = 302,
|
|
232
|
+
SeeOther = 303,
|
|
233
|
+
NotModified = 304,
|
|
234
|
+
UseProxy = 305,
|
|
235
|
+
Unused = 306,
|
|
236
|
+
TemporaryRedirect = 307,
|
|
237
|
+
PermanentRedirect = 308,
|
|
238
|
+
BadRequest = 400,
|
|
239
|
+
Unauthorized = 401,
|
|
240
|
+
PaymentRequired = 402,
|
|
241
|
+
Forbidden = 403,
|
|
242
|
+
NotFound = 404,
|
|
243
|
+
MethodNotAllowed = 405,
|
|
244
|
+
NotAcceptable = 406,
|
|
245
|
+
ProxyAuthenticationRequired = 407,
|
|
246
|
+
RequestTimeout = 408,
|
|
247
|
+
Conflict = 409,
|
|
248
|
+
Gone = 410,
|
|
249
|
+
LengthRequired = 411,
|
|
250
|
+
PreconditionFailed = 412,
|
|
251
|
+
PayloadTooLarge = 413,
|
|
252
|
+
UriTooLong = 414,
|
|
253
|
+
UnsupportedMediaType = 415,
|
|
254
|
+
RangeNotSatisfiable = 416,
|
|
255
|
+
ExpectationFailed = 417,
|
|
256
|
+
ImATeapot = 418,
|
|
257
|
+
MisdirectedRequest = 421,
|
|
258
|
+
UnprocessableEntity = 422,
|
|
259
|
+
Locked = 423,
|
|
260
|
+
FailedDependency = 424,
|
|
261
|
+
TooEarly = 425,
|
|
262
|
+
UpgradeRequired = 426,
|
|
263
|
+
PreconditionRequired = 428,
|
|
264
|
+
TooManyRequests = 429,
|
|
265
|
+
RequestHeaderFieldsTooLarge = 431,
|
|
266
|
+
UnavailableForLegalReasons = 451,
|
|
267
|
+
InternalServerError = 500,
|
|
268
|
+
NotImplemented = 501,
|
|
269
|
+
BadGateway = 502,
|
|
270
|
+
ServiceUnavailable = 503,
|
|
271
|
+
GatewayTimeout = 504,
|
|
272
|
+
HttpVersionNotSupported = 505,
|
|
273
|
+
VariantAlsoNegotiates = 506,
|
|
274
|
+
InsufficientStorage = 507,
|
|
275
|
+
LoopDetected = 508,
|
|
276
|
+
NotExtended = 510,
|
|
277
|
+
NetworkAuthenticationRequired = 511,
|
|
278
|
+
}
|
|
279
|
+
|
|
214
280
|
type Method =
|
|
215
281
|
| 'get'
|
|
216
282
|
| 'GET'
|
|
@@ -239,7 +305,8 @@ type ResponseType =
|
|
|
239
305
|
| 'document'
|
|
240
306
|
| 'json'
|
|
241
307
|
| 'text'
|
|
242
|
-
| 'stream'
|
|
308
|
+
| 'stream'
|
|
309
|
+
| 'formdata';
|
|
243
310
|
|
|
244
311
|
type responseEncoding =
|
|
245
312
|
| 'ascii'
|
|
@@ -335,11 +402,12 @@ interface AxiosProgressEvent {
|
|
|
335
402
|
upload?: boolean;
|
|
336
403
|
download?: boolean;
|
|
337
404
|
event?: BrowserProgressEvent;
|
|
405
|
+
lengthComputable: boolean;
|
|
338
406
|
}
|
|
339
407
|
|
|
340
408
|
type Milliseconds = number;
|
|
341
409
|
|
|
342
|
-
type AxiosAdapterName = 'xhr' | 'http' | string;
|
|
410
|
+
type AxiosAdapterName = 'fetch' | 'xhr' | 'http' | string;
|
|
343
411
|
|
|
344
412
|
type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
|
|
345
413
|
|
|
@@ -380,7 +448,7 @@ interface AxiosRequestConfig<D = any> {
|
|
|
380
448
|
maxRate?: number | [MaxUploadRate, MaxDownloadRate];
|
|
381
449
|
beforeRedirect?: (
|
|
382
450
|
options: Record<string, any>,
|
|
383
|
-
responseDetails: { headers: Record<string, string
|
|
451
|
+
responseDetails: { headers: Record<string, string>; statusCode: HttpStatusCode }
|
|
384
452
|
) => void;
|
|
385
453
|
socketPath?: string | null;
|
|
386
454
|
transport?: any;
|
|
@@ -414,6 +482,8 @@ interface AxiosRequestConfig<D = any> {
|
|
|
414
482
|
| [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]
|
|
415
483
|
| LookupAddress
|
|
416
484
|
>);
|
|
485
|
+
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
|
|
486
|
+
fetchOptions?: Record<string, any>;
|
|
417
487
|
}
|
|
418
488
|
|
|
419
489
|
interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
|