@techextensor/tab-sdk 0.0.51 → 0.0.53
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/fesm2022/techextensor-tab-sdk.mjs +31 -83
- package/fesm2022/techextensor-tab-sdk.mjs.map +1 -1
- package/lib/app/analytics.service.d.ts +1 -1
- package/lib/app/file.service.d.ts +1 -1
- package/lib/crud/crud.service.d.ts +7 -14
- package/lib/interface/crud.interface.d.ts +12 -72
- package/lib/ui/form.service.d.ts +1 -3
- package/lib/workflow/transition.service.d.ts +2 -2
- package/package.json +2 -2
|
@@ -22,7 +22,7 @@ export declare class AnalyticsService {
|
|
|
22
22
|
* @param payload The screen performance payload containing the statistics to be inserted.
|
|
23
23
|
* @returns A promise that resolves to a common API response containing the result of the insertion.
|
|
24
24
|
*/
|
|
25
|
-
insertScreenPerformance(payload: ScreenPerformancePayload): Promise<CommonApiResponse>;
|
|
25
|
+
insertScreenPerformance(payload: ScreenPerformancePayload, headers?: any): Promise<CommonApiResponse>;
|
|
26
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<AnalyticsService, never>;
|
|
27
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<AnalyticsService>;
|
|
28
28
|
}
|
|
@@ -17,7 +17,7 @@ export declare class FileService {
|
|
|
17
17
|
* @param mediaId The ID of the media file to remove.
|
|
18
18
|
* @returns A promise that resolves to a common API response.
|
|
19
19
|
*/
|
|
20
|
-
removeMediaFile(mediaId: string): Promise<CommonApiResponse>;
|
|
20
|
+
removeMediaFile(mediaId: string, headers?: any): Promise<CommonApiResponse>;
|
|
21
21
|
/**
|
|
22
22
|
* Processes an FTP URL and returns a processed URL.
|
|
23
23
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APISelectQuery, CommonApiResponse, DeletePayload, GetPayload, InsertPayload, UpdatePayload,
|
|
1
|
+
import { APISelectQuery, CommonApiResponse, DeletePayload, GetPayload, InsertPayload, UpdatePayload, ImportDataPayload, RcordHistoryPayload, SearchDataPayload, executeStoredProcedurePayload } from '@techextensor/tab-core-utility';
|
|
2
2
|
import { CrudOptions } from '../interface/crud.interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class CrudService {
|
|
@@ -59,7 +59,7 @@ export declare class CrudService {
|
|
|
59
59
|
* @param parameters - Optional parameters to pass to the select query.
|
|
60
60
|
* @returns A promise that resolves to a common API response containing the result of executing the select query.
|
|
61
61
|
*/
|
|
62
|
-
executeSelectQuery(selectQueryId: string, parameters?: any, additionalConfig?: any): Promise<CommonApiResponse>;
|
|
62
|
+
executeSelectQuery(selectQueryId: string, parameters?: any, additionalConfig?: any, headers?: any): Promise<CommonApiResponse>;
|
|
63
63
|
/**
|
|
64
64
|
* Executes a select query using the provided select query data.
|
|
65
65
|
*
|
|
@@ -67,7 +67,7 @@ export declare class CrudService {
|
|
|
67
67
|
* @param parameters - Optional parameters to pass to the select query.
|
|
68
68
|
* @returns A promise that resolves to a common API response containing the result of executing the select query.
|
|
69
69
|
*/
|
|
70
|
-
executeSelectExecutor(data: APISelectQuery, parameters?: any): Promise<CommonApiResponse>;
|
|
70
|
+
executeSelectExecutor(data: APISelectQuery, parameters?: any, headers?: any): Promise<CommonApiResponse>;
|
|
71
71
|
/**
|
|
72
72
|
* Gets the search data using the provided search query and limit.
|
|
73
73
|
*
|
|
@@ -82,26 +82,19 @@ export declare class CrudService {
|
|
|
82
82
|
* @param payload - The payload containing app object ID and record IDs.
|
|
83
83
|
* @returns A promise that resolves to a common API response containing the record history.
|
|
84
84
|
*/
|
|
85
|
-
getRecordHistory(payload: RcordHistoryPayload): Promise<CommonApiResponse>;
|
|
85
|
+
getRecordHistory(payload: RcordHistoryPayload, headers?: any): Promise<CommonApiResponse>;
|
|
86
86
|
/**
|
|
87
87
|
* Imports data into the database.
|
|
88
88
|
*
|
|
89
89
|
* @param payload - The data to import.
|
|
90
90
|
* @returns A promise that resolves to a common API response containing the result of importing the data.
|
|
91
91
|
*/
|
|
92
|
-
import(payload:
|
|
92
|
+
import(payload: ImportDataPayload): Promise<any>;
|
|
93
93
|
/**
|
|
94
94
|
* Handles notification display after a CRUD operation.
|
|
95
95
|
*
|
|
96
|
-
* Default behavior:
|
|
97
|
-
*
|
|
98
|
-
* - Error: NOT shown (interceptor handles errors globally)
|
|
99
|
-
*
|
|
100
|
-
* Can be customized via CrudNotificationOptions:
|
|
101
|
-
* - `silent: true` - suppresses all notifications
|
|
102
|
-
* - `success: false` - suppresses success only
|
|
103
|
-
* - `success: { message, title, configuration }` - custom success notification
|
|
104
|
-
* - `error: { message, title, configuration }` - custom error notification (overrides interceptor)
|
|
96
|
+
* Default behavior: auto-shows success toast with operation-specific message.
|
|
97
|
+
* When skipDefaultToast is true, no toast is shown — caller handles it via TabSdk.ui.showSuccess().
|
|
105
98
|
*/
|
|
106
99
|
private handleNotification;
|
|
107
100
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrudService, never>;
|
|
@@ -1,85 +1,25 @@
|
|
|
1
|
-
import { IndividualConfig } from 'ngx-toastr';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Supports full ngx-toastr IndividualConfig for toast customization
|
|
6
|
-
* (timeOut, positionClass, progressBar, closeButton, etc.)
|
|
7
|
-
*/
|
|
8
|
-
export interface CrudNotificationConfig {
|
|
9
|
-
/** Override the default notification message */
|
|
10
|
-
message?: string;
|
|
11
|
-
/** Override the default notification title */
|
|
12
|
-
title?: string;
|
|
13
|
-
/** Full ngx-toastr configuration for toast customization */
|
|
14
|
-
configuration?: Partial<IndividualConfig<any>>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Options to control automatic notifications after CRUD operations.
|
|
18
|
-
*
|
|
19
|
-
* By default:
|
|
20
|
-
* - Success notifications are ENABLED (auto-shown on StatusCode 200)
|
|
21
|
-
* - Error notifications are DISABLED (already handled by the API interceptor)
|
|
2
|
+
* Extended options for CRUD operations.
|
|
3
|
+
* Pass as the second argument to TabSdk.crud.insert/update/delete.
|
|
22
4
|
*
|
|
23
5
|
* @example
|
|
24
6
|
* ```typescript
|
|
25
|
-
* // Default behavior — auto success
|
|
7
|
+
* // Default behavior — auto success toast
|
|
26
8
|
* await TabSdk.crud.insert({ ... });
|
|
27
9
|
*
|
|
28
|
-
* //
|
|
29
|
-
* await TabSdk.crud.
|
|
30
|
-
* notify: { success: { message: 'User registered!', title: 'Welcome' } }
|
|
31
|
-
* });
|
|
32
|
-
*
|
|
33
|
-
* // Silent — no success notification
|
|
34
|
-
* await TabSdk.crud.insert(payload, { notify: { silent: true } });
|
|
10
|
+
* // Skip default toast (silent operation or custom message)
|
|
11
|
+
* await TabSdk.crud.delete(payload, { skipDefaultToast: true });
|
|
35
12
|
*
|
|
36
|
-
* //
|
|
37
|
-
* await TabSdk.crud.delete(payload, {
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* notify: { error: { message: 'Could not save changes' } }
|
|
42
|
-
* });
|
|
43
|
-
*
|
|
44
|
-
* // Full toast customization
|
|
45
|
-
* await TabSdk.crud.update(payload, {
|
|
46
|
-
* notify: {
|
|
47
|
-
* success: {
|
|
48
|
-
* message: 'Saved!',
|
|
49
|
-
* configuration: { timeOut: 2000, positionClass: 'toast-top-center' }
|
|
50
|
-
* }
|
|
51
|
-
* }
|
|
52
|
-
* });
|
|
13
|
+
* // Skip default toast and show custom message
|
|
14
|
+
* const res = await TabSdk.crud.delete(payload, { skipDefaultToast: true });
|
|
15
|
+
* if (res.IsSuccess) {
|
|
16
|
+
* TabSdk.ui.showSuccess({ message: 'Settings removed' });
|
|
17
|
+
* }
|
|
53
18
|
* ```
|
|
54
19
|
*/
|
|
55
|
-
export interface CrudNotificationOptions {
|
|
56
|
-
/**
|
|
57
|
-
* When true, suppresses both success and error notifications.
|
|
58
|
-
* Useful for background/silent operations (e.g., toggling favorites).
|
|
59
|
-
*/
|
|
60
|
-
silent?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Success notification configuration.
|
|
63
|
-
* - `undefined` (default): auto-shows default success message (e.g., "Record Created Successfully")
|
|
64
|
-
* - `false`: suppresses success notification
|
|
65
|
-
* - `CrudNotificationConfig`: shows custom success notification
|
|
66
|
-
*/
|
|
67
|
-
success?: CrudNotificationConfig | false;
|
|
68
|
-
/**
|
|
69
|
-
* Error notification configuration.
|
|
70
|
-
* - `undefined` (default): no error notification (interceptor handles it globally)
|
|
71
|
-
* - `false`: explicitly suppresses error notification
|
|
72
|
-
* - `CrudNotificationConfig`: shows custom error notification (overrides interceptor for this call)
|
|
73
|
-
*/
|
|
74
|
-
error?: CrudNotificationConfig | false;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Extended options for CRUD operations.
|
|
78
|
-
* Pass as the second argument to TabSdk.crud.insert/update/delete.
|
|
79
|
-
*/
|
|
80
20
|
export interface CrudOptions {
|
|
81
21
|
/** Optional HTTP headers to pass to the server */
|
|
82
22
|
headers?: any;
|
|
83
|
-
/**
|
|
84
|
-
|
|
23
|
+
/** When true, suppresses the default success toast. Use TabSdk.ui.showSuccess() for custom messages. */
|
|
24
|
+
skipDefaultToast?: boolean;
|
|
85
25
|
}
|
package/lib/ui/form.service.d.ts
CHANGED
|
@@ -46,9 +46,7 @@ export declare class FormService {
|
|
|
46
46
|
parseTemplate(requestPayload: TemplateParsePayload, onFailedParseOnServer?: boolean): Promise<CommonApiResponse>;
|
|
47
47
|
/**
|
|
48
48
|
* Handles notification display after a process request operation.
|
|
49
|
-
*
|
|
50
|
-
* - Success: auto-shown by default
|
|
51
|
-
* - Error: NOT shown by default (interceptor handles)
|
|
49
|
+
* Default: auto-shows success toast. When skipDefaultToast is true, no toast is shown.
|
|
52
50
|
*/
|
|
53
51
|
private handleNotification;
|
|
54
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
|
|
@@ -8,14 +8,14 @@ export declare class TransitionService {
|
|
|
8
8
|
* @param payload - The payload containing information to determine the next status.
|
|
9
9
|
* @returns A promise that resolves to the common API response.
|
|
10
10
|
*/
|
|
11
|
-
getNextStatus(payload: NextStatusPayload): Promise<CommonApiResponse>;
|
|
11
|
+
getNextStatus(payload: NextStatusPayload, headers?: any): Promise<CommonApiResponse>;
|
|
12
12
|
/**
|
|
13
13
|
* Updates the status of an entity based on the provided payload.
|
|
14
14
|
*
|
|
15
15
|
* @param payload - The payload containing information to update the status.
|
|
16
16
|
* @returns A promise that resolves to the common API response.
|
|
17
17
|
*/
|
|
18
|
-
updateStatus(payload: UpdateStatusPayload): Promise<any>;
|
|
18
|
+
updateStatus(payload: UpdateStatusPayload, headers?: any): Promise<any>;
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<TransitionService, never>;
|
|
20
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<TransitionService>;
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techextensor/tab-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.2.15",
|
|
6
6
|
"@angular/core": "^19.2.15",
|
|
7
|
-
"@techextensor/tab-core-utility": "2.2.
|
|
7
|
+
"@techextensor/tab-core-utility": "2.2.193"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "^2.8.1"
|