@crmd-quote-manager/sdk 0.0.0 → 0.0.4

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 CHANGED
@@ -10,18 +10,9 @@ export declare interface IDataverseRow {
10
10
  }
11
11
 
12
12
  export declare interface IPluginContext {
13
- i18n: {
14
- t(key: string): string;
15
- };
16
- session: unknown;
17
- settings: {
18
- GetSetting<T>(key: string, entityName?: string): {
19
- Value: T;
20
- };
21
- GetSettingsByEntity<T>(key: string): {
22
- Value: T;
23
- }[];
24
- };
13
+ readonly i18n: Readonly<IPluginI18n>;
14
+ readonly session: Readonly<IPluginSession>;
15
+ readonly settings: Readonly<IPluginSettings>;
25
16
  }
26
17
 
27
18
  export declare interface IPluginEvents {
@@ -54,13 +45,52 @@ export declare interface IPluginEvents {
54
45
  };
55
46
  }
56
47
 
48
+ declare interface IPluginI18n {
49
+ t(key: string): string;
50
+ }
51
+
52
+ declare interface IPluginSession {
53
+ /** @deprecated */
54
+ table: Readonly<{
55
+ entityType: 'crmdqe_quoteheader';
56
+ id: string;
57
+ name: string;
58
+ }>;
59
+ app: Readonly<{
60
+ appId: string;
61
+ displayName: string;
62
+ uniqueName: string;
63
+ webResourceId: string;
64
+ webResourceName: string;
65
+ }>;
66
+ user: Readonly<{
67
+ id: string;
68
+ isAdmin: boolean;
69
+ languageId: number;
70
+ }>;
71
+ organization: Readonly<{
72
+ id: string;
73
+ name: string;
74
+ tenantId: string;
75
+ }>;
76
+ }
77
+
78
+ declare interface IPluginSettings {
79
+ GetSetting<T>(key: string, entityName?: string): {
80
+ Value: T;
81
+ };
82
+ GetSettingsByEntity<T>(key: string): {
83
+ Value: T;
84
+ }[];
85
+ }
86
+
57
87
  export declare type PluginEventKey = keyof IPluginEvents;
58
88
 
59
89
  export declare type QuoteManagerPlugin = {
60
90
  [K in PluginEventKey]: {
61
91
  message: K;
62
92
  sortOrder?: number;
63
- execute: IPluginEvents[K] extends object ? (context: IPluginContext, args: IPluginEvents[K]) => void | Promise<void> : (context: IPluginContext) => Promise<void>;
93
+ execute: IPluginEvents[K] extends object ? (context: IPluginContext, args: IPluginEvents[K]) => void | Promise<void> : (context: IPluginContext) => void | Promise<void>;
64
94
  };
65
95
  }[PluginEventKey];
66
96
 
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // src/index.ts
1
+ // src/plugins.ts
2
2
  function e(e) {
3
3
  return e;
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crmd-quote-manager/sdk",
3
- "version": "0.0.0",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"