@crmd-quote-manager/sdk 0.0.0-stage → 0.0.3
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 +67 -0
- package/dist/index.js +5 -0
- package/package.json +19 -5
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare function definePlugin(plugin: QuoteManagerPlugin): QuoteManagerPlugin;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents a single row of data in Dataverse.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare interface IDataverseRow {
|
|
9
|
+
[key: string]: string | number | boolean | IDataverseRow | IDataverseRow[] | undefined | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
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
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare interface IPluginEvents {
|
|
28
|
+
Load: null;
|
|
29
|
+
'Settings.BuildEditorFields.Post': {
|
|
30
|
+
fields: any[];
|
|
31
|
+
};
|
|
32
|
+
AddProductsFromTemplate: {
|
|
33
|
+
item: IDataverseRow;
|
|
34
|
+
};
|
|
35
|
+
'CreateQuoteLineFromProduct.Post': {
|
|
36
|
+
item: IDataverseRow;
|
|
37
|
+
};
|
|
38
|
+
'Quote.AddProducts.Pre': {
|
|
39
|
+
products: IDataverseRow[];
|
|
40
|
+
};
|
|
41
|
+
'CPQ.Associations.AddWithSubtotal.Post': null;
|
|
42
|
+
'CPQ.Associations.AddToConfiguration.Post': null;
|
|
43
|
+
'PMG.OnItemUpdated': {
|
|
44
|
+
item: IDataverseRow;
|
|
45
|
+
previousItem: IDataverseRow;
|
|
46
|
+
};
|
|
47
|
+
'CalculateLinePrices.Pre': {
|
|
48
|
+
item: IDataverseRow;
|
|
49
|
+
previousItem: IDataverseRow;
|
|
50
|
+
};
|
|
51
|
+
'CalculateLinePrices.Post': {
|
|
52
|
+
item: IDataverseRow;
|
|
53
|
+
previousItem: IDataverseRow;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export declare type PluginEventKey = keyof IPluginEvents;
|
|
58
|
+
|
|
59
|
+
export declare type QuoteManagerPlugin = {
|
|
60
|
+
[K in PluginEventKey]: {
|
|
61
|
+
message: K;
|
|
62
|
+
sortOrder?: number;
|
|
63
|
+
execute: IPluginEvents[K] extends object ? (context: IPluginContext, args: IPluginEvents[K]) => void | Promise<void> : (context: IPluginContext) => void | Promise<void>;
|
|
64
|
+
};
|
|
65
|
+
}[PluginEventKey];
|
|
66
|
+
|
|
67
|
+
export { }
|
package/dist/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@crmd-quote-manager/sdk",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "vite build",
|
|
17
|
+
"release": "npm publish --access public",
|
|
18
|
+
"prepublishOnly": "npm run build"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/README.md
DELETED