@osdk/maker 0.12.0-beta.8 → 0.13.0-beta.1
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/CHANGELOG.md +123 -0
- package/README.md +88 -62
- package/build/browser/api/defineAction.js +403 -106
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineLink.js +2 -2
- package/build/browser/api/defineLink.js.map +1 -1
- package/build/browser/api/defineObject.js +6 -2
- package/build/browser/api/defineObject.js.map +1 -1
- package/build/browser/api/defineOntology.js +80 -35
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/defineSpt.js.map +1 -1
- package/build/browser/api/ontologyUtils.js +80 -0
- package/build/browser/api/ontologyUtils.js.map +1 -1
- package/build/browser/api/overall.test.js +4741 -2358
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/api/types.js +2 -0
- package/build/browser/api/types.js.map +1 -1
- package/build/browser/cli/main.js +2 -10
- package/build/browser/cli/main.js.map +1 -1
- package/build/browser/index.js +5 -4
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +575 -153
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +98 -20
- package/build/esm/api/defineAction.js +403 -106
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineLink.js +2 -2
- package/build/esm/api/defineLink.js.map +1 -1
- package/build/esm/api/defineObject.js +6 -2
- package/build/esm/api/defineObject.js.map +1 -1
- package/build/esm/api/defineOntology.js +80 -35
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/defineSpt.js.map +1 -1
- package/build/esm/api/ontologyUtils.js +80 -0
- package/build/esm/api/ontologyUtils.js.map +1 -1
- package/build/esm/api/overall.test.js +4741 -2358
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/api/types.js +2 -0
- package/build/esm/api/types.js.map +1 -1
- package/build/esm/cli/main.js +2 -10
- package/build/esm/cli/main.js.map +1 -1
- package/build/esm/index.js +5 -4
- package/build/esm/index.js.map +1 -1
- package/build/types/api/defineAction.d.ts +7 -6
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineObject.d.ts +2 -2
- package/build/types/api/defineObject.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts +3 -2
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/api/defineSpt.d.ts +2 -2
- package/build/types/api/defineSpt.d.ts.map +1 -1
- package/build/types/api/ontologyUtils.d.ts +5 -2
- package/build/types/api/ontologyUtils.d.ts.map +1 -1
- package/build/types/api/types.d.ts +83 -12
- package/build/types/api/types.d.ts.map +1 -1
- package/build/types/cli/main.d.ts.map +1 -1
- package/build/types/index.d.ts +6 -5
- package/build/types/index.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,128 @@
|
|
|
1
1
|
# @osdk/maker
|
|
2
2
|
|
|
3
|
+
## 0.12.0-beta.21
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3ff44da: Existing OTs as action parameters in OAC
|
|
8
|
+
- 367cc04: Add default value and constraint overrides to OAC action parameters
|
|
9
|
+
- 283905f: Better error message for invalid parameter ordering on actions
|
|
10
|
+
- e62a890: Custom submission options for OAC actions
|
|
11
|
+
- 94beece: Enable "other" option for oneOf constraints on OAC actions
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- @osdk/api@2.4.0-beta.17
|
|
16
|
+
|
|
17
|
+
## 0.12.0-beta.20
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 45ed433: Target objects are configurable and default parameter ordering is better in OAC actions
|
|
22
|
+
|
|
23
|
+
## 0.12.0-beta.19
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- @osdk/api@2.4.0-beta.16
|
|
28
|
+
|
|
29
|
+
## 0.12.0-beta.18
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- @osdk/api@2.4.0-beta.15
|
|
34
|
+
|
|
35
|
+
## 0.12.0-beta.17
|
|
36
|
+
|
|
37
|
+
### Minor Changes
|
|
38
|
+
|
|
39
|
+
- f1f587b: Support custom parameters in OAC actions
|
|
40
|
+
- 641bc0c: Fix create-or-modify non parameter mapped property bug
|
|
41
|
+
- 25bae67: OAC modify object actions set parameter defaults to match the selected object
|
|
42
|
+
- 5c76e33: Trim value type before putting it in SPT IR
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- @osdk/api@2.4.0-beta.14
|
|
47
|
+
|
|
48
|
+
## 0.12.0-beta.16
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [4bc848b]
|
|
53
|
+
- @osdk/api@2.4.0-beta.13
|
|
54
|
+
|
|
55
|
+
## 0.12.0-beta.15
|
|
56
|
+
|
|
57
|
+
### Minor Changes
|
|
58
|
+
|
|
59
|
+
- a1736f3: Actions can have properties that are not mapped to parameters
|
|
60
|
+
- c621638: Create or Modify actions in OAC
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- @osdk/api@2.4.0-beta.12
|
|
65
|
+
|
|
66
|
+
## 0.12.0-beta.14
|
|
67
|
+
|
|
68
|
+
### Minor Changes
|
|
69
|
+
|
|
70
|
+
- d384b4c: Add custom display names and descriptions for action parameters in OAC
|
|
71
|
+
- 02be685: Remove jiti
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- @osdk/api@2.4.0-beta.11
|
|
76
|
+
|
|
77
|
+
## 0.12.0-beta.13
|
|
78
|
+
|
|
79
|
+
### Minor Changes
|
|
80
|
+
|
|
81
|
+
- ed41359: Action sections in OAC
|
|
82
|
+
|
|
83
|
+
## 0.12.0-beta.12
|
|
84
|
+
|
|
85
|
+
### Minor Changes
|
|
86
|
+
|
|
87
|
+
- 666787f: fix text allowed values name
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- @osdk/api@2.4.0-beta.10
|
|
92
|
+
|
|
93
|
+
## 0.12.0-beta.11
|
|
94
|
+
|
|
95
|
+
### Minor Changes
|
|
96
|
+
|
|
97
|
+
- b0955ef: Action parameter defaults and table forms
|
|
98
|
+
- defc2cf: change parameterLevelValidations to parameterConfiguration
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- Updated dependencies [9101bad]
|
|
103
|
+
- @osdk/api@2.4.0-beta.9
|
|
104
|
+
|
|
105
|
+
## 0.12.0-beta.10
|
|
106
|
+
|
|
107
|
+
### Minor Changes
|
|
108
|
+
|
|
109
|
+
- 4dffba1: Support extended string params in actions
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies [9f4fe9e]
|
|
114
|
+
- @osdk/api@2.4.0-beta.8
|
|
115
|
+
|
|
116
|
+
## 0.12.0-beta.9
|
|
117
|
+
|
|
118
|
+
### Minor Changes
|
|
119
|
+
|
|
120
|
+
- ac0029e: Improve CRUD actions customization
|
|
121
|
+
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- @osdk/api@2.4.0-beta.7
|
|
125
|
+
|
|
3
126
|
## 0.12.0-beta.8
|
|
4
127
|
|
|
5
128
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -567,72 +567,15 @@ const personToAddressLink = defineInterfaceLinkConstraint({
|
|
|
567
567
|
|
|
568
568
|
Actions define operations that can be performed on objects and interfaces.
|
|
569
569
|
|
|
570
|
-
### Custom Action
|
|
571
|
-
|
|
572
|
-
```typescript
|
|
573
|
-
import { defineAction } from "@osdk/maker";
|
|
574
|
-
|
|
575
|
-
// Define a custom action
|
|
576
|
-
const markAsInactiveAction = defineAction({
|
|
577
|
-
apiName: "mark-as-inactive",
|
|
578
|
-
displayName: "Mark as Inactive",
|
|
579
|
-
parameters: [
|
|
580
|
-
{
|
|
581
|
-
id: "reason",
|
|
582
|
-
displayName: "Reason",
|
|
583
|
-
type: "string",
|
|
584
|
-
validation: {
|
|
585
|
-
required: true,
|
|
586
|
-
allowedValues: { type: "text" },
|
|
587
|
-
},
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
id: "effectiveDate",
|
|
591
|
-
displayName: "Effective Date",
|
|
592
|
-
type: "date",
|
|
593
|
-
validation: {
|
|
594
|
-
required: true,
|
|
595
|
-
allowedValues: { type: "datetime" },
|
|
596
|
-
},
|
|
597
|
-
},
|
|
598
|
-
],
|
|
599
|
-
status: "active",
|
|
600
|
-
rules: [
|
|
601
|
-
{
|
|
602
|
-
type: "addOrModifyObjectRuleV2",
|
|
603
|
-
addOrModifyObjectRuleV2: {
|
|
604
|
-
objectToModify: "objectToModifyParameter",
|
|
605
|
-
propertyValues: {
|
|
606
|
-
"isActive": {
|
|
607
|
-
type: "staticValue",
|
|
608
|
-
staticValue: {
|
|
609
|
-
type: "boolean",
|
|
610
|
-
boolean: false,
|
|
611
|
-
},
|
|
612
|
-
},
|
|
613
|
-
"inactiveReason": {
|
|
614
|
-
type: "parameterId",
|
|
615
|
-
parameterId: "reason",
|
|
616
|
-
},
|
|
617
|
-
"inactiveDate": {
|
|
618
|
-
type: "parameterId",
|
|
619
|
-
parameterId: "effectiveDate",
|
|
620
|
-
},
|
|
621
|
-
},
|
|
622
|
-
structFieldValues: {},
|
|
623
|
-
},
|
|
624
|
-
},
|
|
625
|
-
],
|
|
626
|
-
});
|
|
627
|
-
```
|
|
628
|
-
|
|
629
570
|
### Create Object Action
|
|
630
571
|
|
|
631
572
|
```typescript
|
|
632
573
|
import { defineCreateObjectAction } from "@osdk/maker";
|
|
633
574
|
|
|
634
575
|
// Define an action to create an employee
|
|
635
|
-
const createEmployeeAction = defineCreateObjectAction(
|
|
576
|
+
const createEmployeeAction = defineCreateObjectAction({
|
|
577
|
+
objectType: employeeObject,
|
|
578
|
+
});
|
|
636
579
|
```
|
|
637
580
|
|
|
638
581
|
### Modify Object Action
|
|
@@ -641,7 +584,9 @@ const createEmployeeAction = defineCreateObjectAction(employeeObject);
|
|
|
641
584
|
import { defineModifyObjectAction } from "@osdk/maker";
|
|
642
585
|
|
|
643
586
|
// Define an action to modify an employee
|
|
644
|
-
const modifyEmployeeAction = defineModifyObjectAction(
|
|
587
|
+
const modifyEmployeeAction = defineModifyObjectAction({
|
|
588
|
+
objectType: employeeObject,
|
|
589
|
+
});
|
|
645
590
|
```
|
|
646
591
|
|
|
647
592
|
### Delete Object Action
|
|
@@ -650,7 +595,9 @@ const modifyEmployeeAction = defineModifyObjectAction(employeeObject);
|
|
|
650
595
|
import { defineDeleteObjectAction } from "@osdk/maker";
|
|
651
596
|
|
|
652
597
|
// Define an action to delete an employee
|
|
653
|
-
const deleteEmployeeAction = defineDeleteObjectAction(
|
|
598
|
+
const deleteEmployeeAction = defineDeleteObjectAction({
|
|
599
|
+
objectType: employeeObject,
|
|
600
|
+
});
|
|
654
601
|
```
|
|
655
602
|
|
|
656
603
|
### Interface Actions
|
|
@@ -673,3 +620,82 @@ const createEmployeePersonAction = defineCreateInterfaceObjectAction(
|
|
|
673
620
|
// Define an action to modify objects implementing an interface
|
|
674
621
|
const modifyPersonAction = defineModifyInterfaceObjectAction(personInterface);
|
|
675
622
|
```
|
|
623
|
+
|
|
624
|
+
### Custom Action
|
|
625
|
+
|
|
626
|
+
More customization such as security/submission criteria, constraints on parameter values, parameter overrides, etc.
|
|
627
|
+
can also be added.
|
|
628
|
+
|
|
629
|
+
```typescript
|
|
630
|
+
import {
|
|
631
|
+
ActionParameterConditionalOverride,
|
|
632
|
+
ConditionDefinition,
|
|
633
|
+
defineModifyObjectAction,
|
|
634
|
+
defineObject,
|
|
635
|
+
} from "@osdk/maker";
|
|
636
|
+
|
|
637
|
+
const employeeObject = defineObject({
|
|
638
|
+
apiName: "employee",
|
|
639
|
+
displayName: "Employee",
|
|
640
|
+
pluralDisplayName: "Employees",
|
|
641
|
+
titlePropertyApiName: "id",
|
|
642
|
+
primaryKeyPropertyApiName: "id",
|
|
643
|
+
properties: {
|
|
644
|
+
"id": { type: "string", displayName: "ID" },
|
|
645
|
+
"team": { type: "string" },
|
|
646
|
+
"numDeals": { type: "integer" },
|
|
647
|
+
"experience": { type: "integer" },
|
|
648
|
+
},
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
const mustBeManagerCondition: ConditionDefinition = {
|
|
652
|
+
type: "group",
|
|
653
|
+
name: "managerGroup", // Actual group assigned during installation
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
const mustBeInTeamCondition: ConditionDefinition = {
|
|
657
|
+
type: "group",
|
|
658
|
+
name: "teamGroup",
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
const teamEqualsSalesParameterCondition: ConditionDefinition = {
|
|
662
|
+
type: "parameter",
|
|
663
|
+
parameterId: "team",
|
|
664
|
+
matches: {
|
|
665
|
+
type: "staticValue",
|
|
666
|
+
staticValue: {
|
|
667
|
+
type: "string",
|
|
668
|
+
string: "sales",
|
|
669
|
+
},
|
|
670
|
+
},
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
const makeDealsVisible: ActionParameterConditionalOverride = {
|
|
674
|
+
type: "visibility",
|
|
675
|
+
condition: {
|
|
676
|
+
type: "and",
|
|
677
|
+
conditions: [
|
|
678
|
+
mustBeInTeamCondition,
|
|
679
|
+
teamEqualsSalesParameterCondition,
|
|
680
|
+
],
|
|
681
|
+
},
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
const modifyObjectActionType = defineModifyObjectAction(
|
|
685
|
+
{
|
|
686
|
+
objectType: employeeObject,
|
|
687
|
+
actionLevelValidation: {
|
|
688
|
+
condition: mustBeManagerCondition,
|
|
689
|
+
},
|
|
690
|
+
parameterConfiguration: {
|
|
691
|
+
"numDeals": {
|
|
692
|
+
defaultVisibility: "hidden",
|
|
693
|
+
conditionalOverrides: [
|
|
694
|
+
makeDealsVisible,
|
|
695
|
+
],
|
|
696
|
+
},
|
|
697
|
+
},
|
|
698
|
+
excludedProperties: ["experience"],
|
|
699
|
+
},
|
|
700
|
+
);
|
|
701
|
+
```
|