diff --git a/README.md b/README.md index 16bbc696..41e9c7c6 100644 --- a/README.md +++ b/README.md @@ -111,17 +111,17 @@ apexdocs changelog --previousVersionDir force-app-previous --currentVersionDir f #### Flags -| Flag | Alias | Description | Default | Required | -|---------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|----------| -| `--sourceDir` | `-s` | The directory where the source files are located. | N/A | Yes | -| `--targetDir` | `-t` | The directory where the generated files will be placed. | `docs` | No | -| `--scope` | `-p` | A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. | `global` | No | -| `--defaultGroupName` | N/A | The default group name to use when a group is not specified. | `Miscellaneous` | No | -| `--namespace` | N/A | The package namespace, if any. If provided, it will be added to the generated files. | N/A | No | -| `--sortAlphabetically` | N/A | Sorts files appearing in the Reference Guide alphabetically, as well as the members of a class, interface or enum alphabetically. If false, the members will be displayed in the same order as the code. | `false` | No | -| `--includeMetadata ` | N/A | Whether to include the file's meta.xml information: Whether it is active and and the API version | `false` | No | -| `--linkingStrategy` | N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none` | `relative` | No | -| `--customObjectGroupName` | N/A | The name under which custom objects will be grouped in the Reference Guide | `Custom Objects` | No | +| Flag | Alias | Description | Default | Required | +|----------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|----------| +| `--sourceDir` | `-s` | The directory where the source files are located. | N/A | Yes | +| `--targetDir` | `-t` | The directory where the generated files will be placed. | `docs` | No | +| `--scope` | `-p` | A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. | `global` | No | +| `--defaultGroupName` | N/A | The default group name to use when a group is not specified. | `Miscellaneous` | No | +| `--namespace` | N/A | The package namespace, if any. If provided, it will be added to the generated files. | N/A | No | +| `--sortAlphabetically` | N/A | Sorts files appearing in the Reference Guide alphabetically, as well as the members of a class, interface or enum alphabetically. If false, the members will be displayed in the same order as the code. | `false` | No | +| `--includeMetadata ` | N/A | Whether to include the file's meta.xml information: Whether it is active and and the API version | `false` | No | +| `--linkingStrategy` | N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none` | `relative` | No | +| `--customObjectsGroupName` | N/A | The name under which custom objects will be grouped in the Reference Guide | `Custom Objects` | No | ##### Linking Strategy diff --git a/examples/changelog/current/classes/AccountService.cls-meta.xml b/examples/changelog/current/classes/AccountService.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/changelog/current/classes/AccountService.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/changelog/current/classes/IAnotherExample.cls-meta.xml b/examples/changelog/current/classes/IAnotherExample.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/changelog/current/classes/IAnotherExample.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/changelog/current/classes/IExemplificable.cls-meta.xml b/examples/changelog/current/classes/IExemplificable.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/changelog/current/classes/IExemplificable.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/changelog/current/classes/PossibleValues.cls-meta.xml b/examples/changelog/current/classes/PossibleValues.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/changelog/current/classes/PossibleValues.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/changelog/current/classes/SolidService.cls-meta.xml b/examples/changelog/current/classes/SolidService.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/changelog/current/classes/SolidService.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/changelog/previous/OldImplementation.cls-meta.xml b/examples/changelog/previous/OldImplementation.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/changelog/previous/OldImplementation.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/changelog/previous/SolidService.cls-meta.xml b/examples/changelog/previous/SolidService.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/changelog/previous/SolidService.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/docs/custom-objects/Event__c.md b/examples/markdown/docs/custom-objects/Event__c.md new file mode 100644 index 00000000..111bcb28 --- /dev/null +++ b/examples/markdown/docs/custom-objects/Event__c.md @@ -0,0 +1,61 @@ +# Event + +Represents an event that people can register for. + +## API Name +`ns__Event__c` + +## Fields +### Description + +**API Name** + +`ns__Description__c` + +**Type** + +*LongTextArea* + +--- +### End Date + +**API Name** + +`ns__End_Date__c` + +**Type** + +*Date* + +--- +### Location + +**API Name** + +`ns__Location__c` + +**Type** + +*Location* + +--- +### Start Date + +**API Name** + +`ns__Start_Date__c` + +**Type** + +*Date* + +--- +### Tag Line + +**API Name** + +`ns__Tag_Line__c` + +**Type** + +*Text* \ No newline at end of file diff --git a/examples/markdown/docs/custom-objects/Price_Component__c.md b/examples/markdown/docs/custom-objects/Price_Component__c.md new file mode 100644 index 00000000..e2305371 --- /dev/null +++ b/examples/markdown/docs/custom-objects/Price_Component__c.md @@ -0,0 +1,65 @@ +# Price Component + +## API Name +`ns__Price_Component__c` + +## Fields +### Description + +**API Name** + +`ns__Description__c` + +**Type** + +*Text* + +--- +### Expression + +The Expression that determines if this price should take effect or not. + +**API Name** + +`ns__Expression__c` + +**Type** + +*LongTextArea* + +--- +### Percent + +Use this field to calculate the price based on the list price's percentage instead of providing a flat price. + +**API Name** + +`ns__Percent__c` + +**Type** + +*Percent* + +--- +### Price + +Use this when the Price Component represents a Flat Price. To represent a Percentage use the Percent field. + +**API Name** + +`ns__Price__c` + +**Type** + +*Currency* + +--- +### Type + +**API Name** + +`ns__Type__c` + +**Type** + +*Picklist* \ No newline at end of file diff --git a/examples/markdown/docs/custom-objects/Product_Price_Component__c.md b/examples/markdown/docs/custom-objects/Product_Price_Component__c.md new file mode 100644 index 00000000..2417ab7b --- /dev/null +++ b/examples/markdown/docs/custom-objects/Product_Price_Component__c.md @@ -0,0 +1,26 @@ +# Product Price Component + +## API Name +`ns__Product_Price_Component__c` + +## Fields +### Price Component + +**API Name** + +`ns__Price_Component__c` + +**Type** + +*MasterDetail* + +--- +### Product + +**API Name** + +`ns__Product__c` + +**Type** + +*MasterDetail* \ No newline at end of file diff --git a/examples/markdown/docs/custom-objects/Product__c.md b/examples/markdown/docs/custom-objects/Product__c.md new file mode 100644 index 00000000..795d2ee1 --- /dev/null +++ b/examples/markdown/docs/custom-objects/Product__c.md @@ -0,0 +1,39 @@ +# Product (Custom) + +Product that is sold or available for sale. + +## API Name +`ns__Product__c` + +## Fields +### Description + +**API Name** + +`ns__Description__c` + +**Type** + +*Text* + +--- +### Event + +**API Name** + +`ns__Event__c` + +**Type** + +*Lookup* + +--- +### Features + +**API Name** + +`ns__Features__c` + +**Type** + +*LongTextArea* \ No newline at end of file diff --git a/examples/markdown/docs/custom-objects/Sales_Order_Line__c.md b/examples/markdown/docs/custom-objects/Sales_Order_Line__c.md new file mode 100644 index 00000000..da0fb5bf --- /dev/null +++ b/examples/markdown/docs/custom-objects/Sales_Order_Line__c.md @@ -0,0 +1,61 @@ +# Sales Order Line + +Represents a line item on a sales order. + +## API Name +`ns__Sales_Order_Line__c` + +## Fields +### Amount + +**API Name** + +`ns__Amount__c` + +**Type** + +*Currency* + +--- +### Product + +**API Name** + +`ns__Product__c` + +**Type** + +*Lookup* + +--- +### Sales Order + +**API Name** + +`ns__Sales_Order__c` + +**Type** + +*MasterDetail* + +--- +### Source Price Component + +**API Name** + +`ns__Source_Price_Component__c` + +**Type** + +*Lookup* + +--- +### Type + +**API Name** + +`ns__Type__c` + +**Type** + +*Picklist* \ No newline at end of file diff --git a/examples/markdown/docs/custom-objects/Sales_Order__c.md b/examples/markdown/docs/custom-objects/Sales_Order__c.md new file mode 100644 index 00000000..68a97269 --- /dev/null +++ b/examples/markdown/docs/custom-objects/Sales_Order__c.md @@ -0,0 +1,6 @@ +# Sales Order + +Custom object for tracking sales orders. + +## API Name +`ns__Sales_Order__c` \ No newline at end of file diff --git a/examples/markdown/docs/custom-objects/Speaker__c.md b/examples/markdown/docs/custom-objects/Speaker__c.md new file mode 100644 index 00000000..30c579b9 --- /dev/null +++ b/examples/markdown/docs/custom-objects/Speaker__c.md @@ -0,0 +1,39 @@ +# Speaker + +Represents a speaker at an event. + +## API Name +`ns__Speaker__c` + +## Fields +### About + +**API Name** + +`ns__About__c` + +**Type** + +*LongTextArea* + +--- +### Event + +**API Name** + +`ns__Event__c` + +**Type** + +*MasterDetail* + +--- +### Person + +**API Name** + +`ns__Person__c` + +**Type** + +*MasterDetail* \ No newline at end of file diff --git a/examples/markdown/docs/index.md b/examples/markdown/docs/index.md index 2486eaf6..bc012275 100644 --- a/examples/markdown/docs/index.md +++ b/examples/markdown/docs/index.md @@ -1,4 +1,30 @@ -# Apex Reference Guide +# Reference Guide + +## Custom Objects + +### [Event__c](custom-objects/Event__c.md) + +Represents an event that people can register for. + +### [Price_Component__c](custom-objects/Price_Component__c.md) + +### [Product_Price_Component__c](custom-objects/Product_Price_Component__c.md) + +### [Product__c](custom-objects/Product__c.md) + +Product that is sold or available for sale. + +### [Sales_Order_Line__c](custom-objects/Sales_Order_Line__c.md) + +Represents a line item on a sales order. + +### [Sales_Order__c](custom-objects/Sales_Order__c.md) + +Custom object for tracking sales orders. + +### [Speaker__c](custom-objects/Speaker__c.md) + +Represents a speaker at an event. ## Miscellaneous diff --git a/examples/markdown/force-app/classes/BaseClass.cls-meta.xml b/examples/markdown/force-app/classes/BaseClass.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/BaseClass.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/MultiInheritanceClass.cls-meta.xml b/examples/markdown/force-app/classes/MultiInheritanceClass.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/MultiInheritanceClass.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/ParentInterface.cls-meta.xml b/examples/markdown/force-app/classes/ParentInterface.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/ParentInterface.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/ReferencedEnum.cls-meta.xml b/examples/markdown/force-app/classes/ReferencedEnum.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/ReferencedEnum.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/SampleClass.cls-meta.xml b/examples/markdown/force-app/classes/SampleClass.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/SampleClass.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/SampleEnum.cls-meta.xml b/examples/markdown/force-app/classes/SampleEnum.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/SampleEnum.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/SampleException.cls-meta.xml b/examples/markdown/force-app/classes/SampleException.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/SampleException.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/SampleInterface.cls-meta.xml b/examples/markdown/force-app/classes/SampleInterface.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/SampleInterface.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/classes/Url.cls-meta.xml b/examples/markdown/force-app/classes/Url.cls-meta.xml new file mode 100644 index 00000000..998805a8 --- /dev/null +++ b/examples/markdown/force-app/classes/Url.cls-meta.xml @@ -0,0 +1,5 @@ + + + 62.0 + Active + diff --git a/examples/markdown/force-app/objects/Contact/fields/PhotoUrl__c.field-meta.xml b/examples/markdown/force-app/objects/Contact/fields/PhotoUrl__c.field-meta.xml new file mode 100644 index 00000000..a9117781 --- /dev/null +++ b/examples/markdown/force-app/objects/Contact/fields/PhotoUrl__c.field-meta.xml @@ -0,0 +1,9 @@ + + + PhotoUrl__c + false + + false + false + Url + diff --git a/examples/markdown/force-app/objects/Event__c/Event__c.object-meta.xml b/examples/markdown/force-app/objects/Event__c/Event__c.object-meta.xml new file mode 100644 index 00000000..d30dde5c --- /dev/null +++ b/examples/markdown/force-app/objects/Event__c/Event__c.object-meta.xml @@ -0,0 +1,167 @@ + + + + Accept + Default + + + Accept + Large + Default + + + Accept + Small + Default + + + CancelEdit + Default + + + CancelEdit + Large + Default + + + CancelEdit + Small + Default + + + Clone + Default + + + Clone + Large + Default + + + Clone + Small + Default + + + Delete + Default + + + Delete + Large + Default + + + Delete + Small + Default + + + Edit + Default + + + Edit + Large + Default + + + Edit + Small + Default + + + List + Default + + + List + Large + Default + + + List + Small + Default + + + New + Default + + + New + Large + Default + + + New + Small + Default + + + SaveEdit + Default + + + SaveEdit + Large + Default + + + SaveEdit + Small + Default + + + Tab + Default + + + Tab + Large + Default + + + Tab + Small + Default + + + View + Default + + + View + Large + Default + + + View + Small + Default + + false + SYSTEM + Deployed + false + true + false + false + false + false + false + true + true + Private + + + + Text + + Events + Represents an event that people can register for. + + ReadWrite + Vowel + Public + diff --git a/examples/markdown/force-app/objects/Event__c/fields/Description__c.field-meta.xml b/examples/markdown/force-app/objects/Event__c/fields/Description__c.field-meta.xml new file mode 100644 index 00000000..c1b682a4 --- /dev/null +++ b/examples/markdown/force-app/objects/Event__c/fields/Description__c.field-meta.xml @@ -0,0 +1,10 @@ + + + Description__c + false + + 32768 + false + LongTextArea + 10 + diff --git a/examples/markdown/force-app/objects/Event__c/fields/End_Date__c.field-meta.xml b/examples/markdown/force-app/objects/Event__c/fields/End_Date__c.field-meta.xml new file mode 100644 index 00000000..422a0003 --- /dev/null +++ b/examples/markdown/force-app/objects/Event__c/fields/End_Date__c.field-meta.xml @@ -0,0 +1,9 @@ + + + End_Date__c + false + + true + false + Date + diff --git a/examples/markdown/force-app/objects/Event__c/fields/Location__c.field-meta.xml b/examples/markdown/force-app/objects/Event__c/fields/Location__c.field-meta.xml new file mode 100644 index 00000000..b8f32121 --- /dev/null +++ b/examples/markdown/force-app/objects/Event__c/fields/Location__c.field-meta.xml @@ -0,0 +1,11 @@ + + + Location__c + false + false + + true + 3 + false + Location + diff --git a/examples/markdown/force-app/objects/Event__c/fields/Start_Date__c.field-meta.xml b/examples/markdown/force-app/objects/Event__c/fields/Start_Date__c.field-meta.xml new file mode 100644 index 00000000..81fb3f6d --- /dev/null +++ b/examples/markdown/force-app/objects/Event__c/fields/Start_Date__c.field-meta.xml @@ -0,0 +1,9 @@ + + + Start_Date__c + false + + true + false + Date + diff --git a/examples/markdown/force-app/objects/Event__c/fields/Tag_Line__c.field-meta.xml b/examples/markdown/force-app/objects/Event__c/fields/Tag_Line__c.field-meta.xml new file mode 100644 index 00000000..652ee2e0 --- /dev/null +++ b/examples/markdown/force-app/objects/Event__c/fields/Tag_Line__c.field-meta.xml @@ -0,0 +1,11 @@ + + + Tag_Line__c + false + + 255 + false + false + Text + false + diff --git a/examples/markdown/force-app/objects/Price_Component__c/Price_Component__c.object-meta.xml b/examples/markdown/force-app/objects/Price_Component__c/Price_Component__c.object-meta.xml new file mode 100644 index 00000000..ae72fd0c --- /dev/null +++ b/examples/markdown/force-app/objects/Price_Component__c/Price_Component__c.object-meta.xml @@ -0,0 +1,169 @@ + + + + Accept + Default + + + Accept + Large + Default + + + Accept + Small + Default + + + CancelEdit + Default + + + CancelEdit + Large + Default + + + CancelEdit + Small + Default + + + Clone + Default + + + Clone + Large + Default + + + Clone + Small + Default + + + Delete + Default + + + Delete + Large + Default + + + Delete + Small + Default + + + Edit + Default + + + Edit + Large + Default + + + Edit + Small + Default + + + List + Default + + + List + Large + Default + + + List + Small + Default + + + New + Default + + + New + Large + Default + + + New + Small + Default + + + SaveEdit + Default + + + SaveEdit + Large + Default + + + SaveEdit + Small + Default + + + Tab + Default + + + Tab + Large + Default + + + Tab + Small + Default + + + View + Action override created by Lightning App Builder during activation. + Price_Component_Record_Page + Large + false + Flexipage + + + View + Default + + + View + Small + Default + + false + SYSTEM + Deployed + false + true + false + false + false + false + false + true + true + Private + + + PC-{0000} + + AutoNumber + + Price Components + + ReadWrite + Public + diff --git a/examples/markdown/force-app/objects/Price_Component__c/fields/Description__c.field-meta.xml b/examples/markdown/force-app/objects/Price_Component__c/fields/Description__c.field-meta.xml new file mode 100644 index 00000000..69050ca6 --- /dev/null +++ b/examples/markdown/force-app/objects/Price_Component__c/fields/Description__c.field-meta.xml @@ -0,0 +1,11 @@ + + + Description__c + false + + 255 + false + false + Text + false + diff --git a/examples/markdown/force-app/objects/Price_Component__c/fields/Expression__c.field-meta.xml b/examples/markdown/force-app/objects/Price_Component__c/fields/Expression__c.field-meta.xml new file mode 100644 index 00000000..c0bf4e45 --- /dev/null +++ b/examples/markdown/force-app/objects/Price_Component__c/fields/Expression__c.field-meta.xml @@ -0,0 +1,12 @@ + + + Expression__c + The Expression that determines if this price should take effect or not. + false + The Expression that determines if this price should take effect or not. + + 131072 + false + LongTextArea + 20 + diff --git a/examples/markdown/force-app/objects/Price_Component__c/fields/Percent__c.field-meta.xml b/examples/markdown/force-app/objects/Price_Component__c/fields/Percent__c.field-meta.xml new file mode 100644 index 00000000..9c303bc4 --- /dev/null +++ b/examples/markdown/force-app/objects/Price_Component__c/fields/Percent__c.field-meta.xml @@ -0,0 +1,13 @@ + + + Percent__c + Use this field to calculate the price based on the list price's percentage instead of providing a flat price. + false + Use this field to calculate the price based on the list price's percentage instead of providing a flat price. + + 18 + false + 0 + false + Percent + diff --git a/examples/markdown/force-app/objects/Price_Component__c/fields/Price__c.field-meta.xml b/examples/markdown/force-app/objects/Price_Component__c/fields/Price__c.field-meta.xml new file mode 100644 index 00000000..84136dec --- /dev/null +++ b/examples/markdown/force-app/objects/Price_Component__c/fields/Price__c.field-meta.xml @@ -0,0 +1,13 @@ + + + Price__c + Use this when the Price Component represents a Flat Price. To represent a Percentage use the Percent field. + false + Use this when the Price Component represents a Flat Price. To represent a Percentage use the Percent field. + + 18 + false + 2 + false + Currency + diff --git a/examples/markdown/force-app/objects/Price_Component__c/fields/Type__c.field-meta.xml b/examples/markdown/force-app/objects/Price_Component__c/fields/Type__c.field-meta.xml new file mode 100644 index 00000000..c430b305 --- /dev/null +++ b/examples/markdown/force-app/objects/Price_Component__c/fields/Type__c.field-meta.xml @@ -0,0 +1,30 @@ + + + Type__c + false + + true + false + Picklist + + true + + false + + List Price + false + + + + Surcharge + false + + + + Discount + false + + + + + diff --git a/examples/markdown/force-app/objects/Product_Price_Component__c/Product_Price_Component__c.object-meta.xml b/examples/markdown/force-app/objects/Product_Price_Component__c/Product_Price_Component__c.object-meta.xml new file mode 100644 index 00000000..8a9a6348 --- /dev/null +++ b/examples/markdown/force-app/objects/Product_Price_Component__c/Product_Price_Component__c.object-meta.xml @@ -0,0 +1,166 @@ + + + + Accept + Default + + + Accept + Large + Default + + + Accept + Small + Default + + + CancelEdit + Default + + + CancelEdit + Large + Default + + + CancelEdit + Small + Default + + + Clone + Default + + + Clone + Large + Default + + + Clone + Small + Default + + + Delete + Default + + + Delete + Large + Default + + + Delete + Small + Default + + + Edit + Default + + + Edit + Large + Default + + + Edit + Small + Default + + + List + Default + + + List + Large + Default + + + List + Small + Default + + + New + Default + + + New + Large + Default + + + New + Small + Default + + + SaveEdit + Default + + + SaveEdit + Large + Default + + + SaveEdit + Small + Default + + + Tab + Default + + + Tab + Large + Default + + + Tab + Small + Default + + + View + Default + + + View + Large + Default + + + View + Small + Default + + false + SYSTEM + Deployed + false + true + false + false + false + false + false + true + true + ControlledByParent + + + PPC-{0000} + + AutoNumber + + Product Price Components + + ControlledByParent + Public + diff --git a/examples/markdown/force-app/objects/Product_Price_Component__c/fields/Price_Component__c.field-meta.xml b/examples/markdown/force-app/objects/Product_Price_Component__c/fields/Price_Component__c.field-meta.xml new file mode 100644 index 00000000..f152ecb6 --- /dev/null +++ b/examples/markdown/force-app/objects/Product_Price_Component__c/fields/Price_Component__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Price_Component__c + false + + Price_Component__c + Product Price Components + Product_Price_Components + 1 + false + false + MasterDetail + false + diff --git a/examples/markdown/force-app/objects/Product_Price_Component__c/fields/Product__c.field-meta.xml b/examples/markdown/force-app/objects/Product_Price_Component__c/fields/Product__c.field-meta.xml new file mode 100644 index 00000000..16ec5b33 --- /dev/null +++ b/examples/markdown/force-app/objects/Product_Price_Component__c/fields/Product__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Product__c + false + + Product__c + Product Price Components + Product_Price_Components + 0 + false + false + MasterDetail + false + diff --git a/examples/markdown/force-app/objects/Product__c/Product__c.object-meta.xml b/examples/markdown/force-app/objects/Product__c/Product__c.object-meta.xml new file mode 100644 index 00000000..cdeb52a9 --- /dev/null +++ b/examples/markdown/force-app/objects/Product__c/Product__c.object-meta.xml @@ -0,0 +1,169 @@ + + + + Accept + Default + + + Accept + Large + Default + + + Accept + Small + Default + + + CancelEdit + Default + + + CancelEdit + Large + Default + + + CancelEdit + Small + Default + + + Clone + Default + + + Clone + Large + Default + + + Clone + Small + Default + + + Delete + Default + + + Delete + Large + Default + + + Delete + Small + Default + + + Edit + Default + + + Edit + Large + Default + + + Edit + Small + Default + + + List + Default + + + List + Large + Default + + + List + Small + Default + + + New + Default + + + New + Large + Default + + + New + Small + Default + + + SaveEdit + Default + + + SaveEdit + Large + Default + + + SaveEdit + Small + Default + + + Tab + Default + + + Tab + Large + Default + + + Tab + Small + Default + + + View + Action override created by Lightning App Builder during activation. + Product_Record_Page + Large + false + Flexipage + + + View + Default + + + View + Small + Default + + false + SYSTEM + Deployed + false + true + false + false + false + false + false + true + true + Private + + Product that is sold or available for sale. + + + Text + + Products + + ReadWrite + Public + diff --git a/examples/markdown/force-app/objects/Product__c/fields/Description__c.field-meta.xml b/examples/markdown/force-app/objects/Product__c/fields/Description__c.field-meta.xml new file mode 100644 index 00000000..69050ca6 --- /dev/null +++ b/examples/markdown/force-app/objects/Product__c/fields/Description__c.field-meta.xml @@ -0,0 +1,11 @@ + + + Description__c + false + + 255 + false + false + Text + false + diff --git a/examples/markdown/force-app/objects/Product__c/fields/Event__c.field-meta.xml b/examples/markdown/force-app/objects/Product__c/fields/Event__c.field-meta.xml new file mode 100644 index 00000000..82947d0b --- /dev/null +++ b/examples/markdown/force-app/objects/Product__c/fields/Event__c.field-meta.xml @@ -0,0 +1,12 @@ + + + Event__c + Restrict + false + + Event__c + Products + true + false + Lookup + diff --git a/examples/markdown/force-app/objects/Product__c/fields/Features__c.field-meta.xml b/examples/markdown/force-app/objects/Product__c/fields/Features__c.field-meta.xml new file mode 100644 index 00000000..6b67a859 --- /dev/null +++ b/examples/markdown/force-app/objects/Product__c/fields/Features__c.field-meta.xml @@ -0,0 +1,10 @@ + + + Features__c + false + + 32768 + false + LongTextArea + 10 + diff --git a/examples/markdown/force-app/objects/Sales_Order_Line__c/Sales_Order_Line__c.object-meta.xml b/examples/markdown/force-app/objects/Sales_Order_Line__c/Sales_Order_Line__c.object-meta.xml new file mode 100644 index 00000000..36e9348d --- /dev/null +++ b/examples/markdown/force-app/objects/Sales_Order_Line__c/Sales_Order_Line__c.object-meta.xml @@ -0,0 +1,167 @@ + + + + Accept + Default + + + Accept + Large + Default + + + Accept + Small + Default + + + CancelEdit + Default + + + CancelEdit + Large + Default + + + CancelEdit + Small + Default + + + Clone + Default + + + Clone + Large + Default + + + Clone + Small + Default + + + Delete + Default + + + Delete + Large + Default + + + Delete + Small + Default + + + Edit + Default + + + Edit + Large + Default + + + Edit + Small + Default + + + List + Default + + + List + Large + Default + + + List + Small + Default + + + New + Default + + + New + Large + Default + + + New + Small + Default + + + SaveEdit + Default + + + SaveEdit + Large + Default + + + SaveEdit + Small + Default + + + Tab + Default + + + Tab + Large + Default + + + Tab + Small + Default + + + View + Default + + + View + Large + Default + + + View + Small + Default + + false + SYSTEM + Deployed + false + true + false + false + false + false + false + true + true + ControlledByParent + + Represents a line item on a sales order. + + SOL-{0000} + + AutoNumber + + Sales Order Lines + + ControlledByParent + Public + diff --git a/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Amount__c.field-meta.xml b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Amount__c.field-meta.xml new file mode 100644 index 00000000..3a464e2d --- /dev/null +++ b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Amount__c.field-meta.xml @@ -0,0 +1,11 @@ + + + Amount__c + false + + 18 + true + 2 + false + Currency + diff --git a/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Product__c.field-meta.xml b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Product__c.field-meta.xml new file mode 100644 index 00000000..b6b5369f --- /dev/null +++ b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Product__c.field-meta.xml @@ -0,0 +1,13 @@ + + + Product__c + Restrict + false + + Product__c + Sales Order Lines + Sales_Order_Lines + true + false + Lookup + diff --git a/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Sales_Order__c.field-meta.xml b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Sales_Order__c.field-meta.xml new file mode 100644 index 00000000..c1d881c8 --- /dev/null +++ b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Sales_Order__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Sales_Order__c + false + + Sales_Order__c + Sales Order Lines + Sales_Order_Lines + 0 + false + false + MasterDetail + false + diff --git a/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Source_Price_Component__c.field-meta.xml b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Source_Price_Component__c.field-meta.xml new file mode 100644 index 00000000..69817d96 --- /dev/null +++ b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Source_Price_Component__c.field-meta.xml @@ -0,0 +1,13 @@ + + + Source_Price_Component__c + SetNull + false + + Price_Component__c + Sales Order Lines + Sales_Order_Lines + false + false + Lookup + diff --git a/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Type__c.field-meta.xml b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Type__c.field-meta.xml new file mode 100644 index 00000000..328b5529 --- /dev/null +++ b/examples/markdown/force-app/objects/Sales_Order_Line__c/fields/Type__c.field-meta.xml @@ -0,0 +1,26 @@ + + + Type__c + "Charge" + false + + true + false + Picklist + + true + + false + + Charge + false + + + + Discount + false + + + + + diff --git a/examples/markdown/force-app/objects/Sales_Order__c/Sales_Order__c.object-meta.xml b/examples/markdown/force-app/objects/Sales_Order__c/Sales_Order__c.object-meta.xml new file mode 100644 index 00000000..2225e4f9 --- /dev/null +++ b/examples/markdown/force-app/objects/Sales_Order__c/Sales_Order__c.object-meta.xml @@ -0,0 +1,170 @@ + + + + Accept + Default + + + Accept + Large + Default + + + Accept + Small + Default + + + CancelEdit + Default + + + CancelEdit + Large + Default + + + CancelEdit + Small + Default + + + Clone + Default + + + Clone + Large + Default + + + Clone + Small + Default + + + Delete + Default + + + Delete + Large + Default + + + Delete + Small + Default + + + Edit + Default + + + Edit + Large + Default + + + Edit + Small + Default + + + List + Default + + + List + Large + Default + + + List + Small + Default + + + New + Default + + + New + Large + Default + + + New + Small + Default + + + SaveEdit + Default + + + SaveEdit + Large + Default + + + SaveEdit + Small + Default + + + Tab + Default + + + Tab + Large + Default + + + Tab + Small + Default + + + View + Action override created by Lightning App Builder during activation. + Sales_Order_Record_Page + Large + false + Flexipage + + + View + Default + + + View + Small + Default + + false + SYSTEM + Deployed + false + true + false + false + false + false + false + true + true + Private + + Custom object for tracking sales orders. + + SO-{0000} + + AutoNumber + + Sales Orders + + ReadWrite + Public + diff --git a/examples/markdown/force-app/objects/Speaker__c/Speaker__c.object-meta.xml b/examples/markdown/force-app/objects/Speaker__c/Speaker__c.object-meta.xml new file mode 100644 index 00000000..6bdf2199 --- /dev/null +++ b/examples/markdown/force-app/objects/Speaker__c/Speaker__c.object-meta.xml @@ -0,0 +1,167 @@ + + + + Accept + Default + + + Accept + Large + Default + + + Accept + Small + Default + + + CancelEdit + Default + + + CancelEdit + Large + Default + + + CancelEdit + Small + Default + + + Clone + Default + + + Clone + Large + Default + + + Clone + Small + Default + + + Delete + Default + + + Delete + Large + Default + + + Delete + Small + Default + + + Edit + Default + + + Edit + Large + Default + + + Edit + Small + Default + + + List + Default + + + List + Large + Default + + + List + Small + Default + + + New + Default + + + New + Large + Default + + + New + Small + Default + + + SaveEdit + Default + + + SaveEdit + Large + Default + + + SaveEdit + Small + Default + + + Tab + Default + + + Tab + Large + Default + + + Tab + Small + Default + + + View + Default + + + View + Large + Default + + + View + Small + Default + + false + SYSTEM + Deployed + false + true + false + false + false + false + false + true + true + ControlledByParent + + Represents a speaker at an event. + + SPEAK-{0000} + + AutoNumber + + Speakers + + ControlledByParent + Public + diff --git a/examples/markdown/force-app/objects/Speaker__c/fields/About__c.field-meta.xml b/examples/markdown/force-app/objects/Speaker__c/fields/About__c.field-meta.xml new file mode 100644 index 00000000..2fc71d94 --- /dev/null +++ b/examples/markdown/force-app/objects/Speaker__c/fields/About__c.field-meta.xml @@ -0,0 +1,10 @@ + + + About__c + false + + 32768 + false + LongTextArea + 3 + diff --git a/examples/markdown/force-app/objects/Speaker__c/fields/Event__c.field-meta.xml b/examples/markdown/force-app/objects/Speaker__c/fields/Event__c.field-meta.xml new file mode 100644 index 00000000..cf6bfc63 --- /dev/null +++ b/examples/markdown/force-app/objects/Speaker__c/fields/Event__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Event__c + false + + Event__c + Speakers + Speakers + 0 + false + false + MasterDetail + false + diff --git a/examples/markdown/force-app/objects/Speaker__c/fields/Person__c.field-meta.xml b/examples/markdown/force-app/objects/Speaker__c/fields/Person__c.field-meta.xml new file mode 100644 index 00000000..b7ac07b1 --- /dev/null +++ b/examples/markdown/force-app/objects/Speaker__c/fields/Person__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Person__c + false + + Contact + Speakers + Speakers + 1 + false + false + MasterDetail + false + diff --git a/package.json b/package.json index 3bb7bd76..43b8a745 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cparra/apexdocs", - "version": "3.4.0", + "version": "3.4.1", "description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.", "keywords": [ "apex", diff --git a/src/cli/args.ts b/src/cli/args.ts index 9f6cedc5..4a0ff7a7 100644 --- a/src/cli/args.ts +++ b/src/cli/args.ts @@ -142,7 +142,7 @@ function extractArgsForCommandsProvidedInConfig( } }); - return E.sequenceArray(configs); + return E.sequenceArray(configs) as E.Either; } type NoConfig = { diff --git a/src/cli/commands/markdown.ts b/src/cli/commands/markdown.ts index b8531a9f..e029d3b8 100644 --- a/src/cli/commands/markdown.ts +++ b/src/cli/commands/markdown.ts @@ -1,7 +1,8 @@ import { Options } from 'yargs'; import { markdownDefaults } from '../../defaults'; +import { CliConfigurableMarkdownConfig } from '../../core/shared/types'; -export const markdownOptions: { [key: string]: Options } = { +export const markdownOptions: Record = { sourceDir: { type: 'string', alias: 's', @@ -28,7 +29,7 @@ export const markdownOptions: { [key: string]: Options } = { default: markdownDefaults.defaultGroupName, describe: 'Defines the @group name to be used when a file does not specify it.', }, - customObjectGroupName: { + customObjectsGroupName: { type: 'string', default: markdownDefaults.customObjectsGroupName, describe: 'The name under which custom objects will be grouped in the Reference Guide', diff --git a/src/core/shared/types.d.ts b/src/core/shared/types.d.ts index a3c5cac1..2bc75ab1 100644 --- a/src/core/shared/types.d.ts +++ b/src/core/shared/types.d.ts @@ -16,9 +16,8 @@ type LinkingStrategy = // No logic will be applied, the reference path will be used as is. | 'none'; -export type UserDefinedMarkdownConfig = { +export type CliConfigurableMarkdownConfig = { sourceDir: string; - targetGenerator: 'markdown'; targetDir: string; scope: string[]; namespace?: string; @@ -27,11 +26,15 @@ export type UserDefinedMarkdownConfig = { sortAlphabetically: boolean; includeMetadata: boolean; linkingStrategy: LinkingStrategy; - excludeTags: string[]; referenceGuideTitle: string; - /** Glob patterns to exclude files from the documentation. */ +}; + +export type UserDefinedMarkdownConfig = { + targetGenerator: 'markdown' /** Glob patterns to exclude files from the documentation. */; + excludeTags: string[]; exclude: string[]; -} & Partial; +} & CliConfigurableMarkdownConfig & + Partial; export type UserDefinedOpenApiConfig = { targetGenerator: 'openapi';