sf-raven 1.0.3 → 1.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/README.md +40 -0
- package/lib/commands/raven/audit/display.d.ts +15 -0
- package/lib/commands/raven/audit/display.js +84 -0
- package/lib/commands/raven/audit/display.js.map +1 -0
- package/lib/commands/raven/event/subscribe.js +1 -1
- package/lib/commands/raven/event/subscribe.js.map +1 -1
- package/lib/commands/raven/object/display/fields.js +1 -1
- package/lib/commands/raven/object/display/fields.js.map +1 -1
- package/lib/commands/raven/object/display/recordtypes.js +1 -1
- package/lib/commands/raven/object/display/recordtypes.js.map +1 -1
- package/messages/raven.audit.display.md +26 -0
- package/oclif.manifest.json +51 -1
- package/package.json +35 -11
- /package/messages/{event.subscribe.md → raven.event.subscribe.md} +0 -0
- /package/messages/{object.display.fields.md → raven.object.display.fields.md} +0 -0
- /package/messages/{object.display.recordtypes.md → raven.object.display.recordtypes.md} +0 -0
package/README.md
CHANGED
|
@@ -164,6 +164,46 @@ Person Account PersonAccount 0124J000000YYYYDEF
|
|
|
164
164
|
...
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
+
## sf raven audit display
|
|
168
|
+
|
|
169
|
+
Show recent entries in the Setup Audit Trail.
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
USAGE
|
|
173
|
+
$ sf raven audit display -o <value> [--json] [-u <value>] [-l <value>]
|
|
174
|
+
|
|
175
|
+
FLAGS
|
|
176
|
+
-l, --limit=<value> [default: 20] The number of audit trail entries to return. Maximum is 2000.
|
|
177
|
+
-o, --target-org=<value> (required) Login username or alias for the target org.
|
|
178
|
+
-u, --username=<value> Username to filter the audit trail by.
|
|
179
|
+
|
|
180
|
+
GLOBAL FLAGS
|
|
181
|
+
--json Format output as json.
|
|
182
|
+
|
|
183
|
+
DESCRIPTION
|
|
184
|
+
Show recent entries in the Setup Audit Trail.
|
|
185
|
+
|
|
186
|
+
Returns the 20 most recent Setup Audit Trail entries, but this can be increased up to 2000 using the optional --limit flag. The results can be filtered by a particular user using the --username flag.
|
|
187
|
+
|
|
188
|
+
EXAMPLES
|
|
189
|
+
$ sf raven audit display --target-org dev
|
|
190
|
+
|
|
191
|
+
$ sf raven audit display --target-org dev --limit 200
|
|
192
|
+
|
|
193
|
+
$ sf raven audit display --target-org dev --username username@salesforce.com.dev
|
|
194
|
+
|
|
195
|
+
$ sf raven audit display --target-org dev --limit 50 --username username@salesforce.com.dev
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
OUTPUT
|
|
199
|
+
|
|
200
|
+
Date Username Type Action Delegate User
|
|
201
|
+
─────────────────── ───────────── ──────────── ─────────────────────────────────────────────────────────── ────────────────────
|
|
202
|
+
2023-09-29 17:23:47 user@dev.com Apex Trigger Changed Account Created Trigger code: AccountTrigger null
|
|
203
|
+
2023-09-29 17:23:43 user@dev.com Apex Trigger Created Account Created Trigger code: AccountCreatedTrigger null
|
|
204
|
+
...
|
|
205
|
+
```
|
|
206
|
+
|
|
167
207
|
## sf raven event subscribe
|
|
168
208
|
|
|
169
209
|
Subscribe to Platform Events.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type AuditDisplayResult = {
|
|
3
|
+
result: object;
|
|
4
|
+
};
|
|
5
|
+
export default class AuditDisplay extends SfCommand<AuditDisplayResult> {
|
|
6
|
+
static readonly summary: string;
|
|
7
|
+
static readonly description: string;
|
|
8
|
+
static readonly examples: string[];
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<AuditDisplayResult>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
4
|
+
const core_1 = require("@salesforce/core");
|
|
5
|
+
const dayjs = require("dayjs");
|
|
6
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
7
|
+
const messages = core_1.Messages.loadMessages('sf-raven', 'raven.audit.display');
|
|
8
|
+
class AuditDisplay extends sf_plugins_core_1.SfCommand {
|
|
9
|
+
async run() {
|
|
10
|
+
this.spinner.start('Loading...');
|
|
11
|
+
const { flags } = await this.parse(AuditDisplay);
|
|
12
|
+
const ux = new sf_plugins_core_1.Ux({ jsonEnabled: this.jsonEnabled() });
|
|
13
|
+
const org = flags['target-org'];
|
|
14
|
+
const conn = org.getConnection();
|
|
15
|
+
let query = '';
|
|
16
|
+
if (flags.username) {
|
|
17
|
+
query = `SELECT CreatedDate, CreatedBy.Username,
|
|
18
|
+
Section, Display, DelegateUser
|
|
19
|
+
FROM SetupAuditTrail
|
|
20
|
+
WHERE CreatedBy.Username = '${flags.username}'
|
|
21
|
+
ORDER BY CreatedDate DESC
|
|
22
|
+
LIMIT ${flags.limit}`;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
query = `SELECT CreatedDate, CreatedBy.Username,
|
|
26
|
+
Section, Display, DelegateUser
|
|
27
|
+
FROM SetupAuditTrail
|
|
28
|
+
ORDER BY CreatedDate DESC
|
|
29
|
+
LIMIT ${flags.limit}`;
|
|
30
|
+
}
|
|
31
|
+
const result = (await conn.query(query));
|
|
32
|
+
result.records.forEach((record) => {
|
|
33
|
+
record.CreatedDate = dayjs(record.CreatedDate).format('YYYY-MM-DD HH:mm:ss');
|
|
34
|
+
});
|
|
35
|
+
this.spinner.stop();
|
|
36
|
+
// Return table of fields
|
|
37
|
+
ux.table(result.records, {
|
|
38
|
+
createdDate: {
|
|
39
|
+
header: 'Date',
|
|
40
|
+
get: (row) => row.CreatedDate,
|
|
41
|
+
},
|
|
42
|
+
createdBy: {
|
|
43
|
+
header: 'Username',
|
|
44
|
+
get: (row) => row.CreatedBy?.Username,
|
|
45
|
+
},
|
|
46
|
+
section: {
|
|
47
|
+
header: 'Type',
|
|
48
|
+
get: (row) => row.Section,
|
|
49
|
+
},
|
|
50
|
+
display: {
|
|
51
|
+
header: 'Action',
|
|
52
|
+
get: (row) => row.Display,
|
|
53
|
+
},
|
|
54
|
+
delegateUser: {
|
|
55
|
+
header: 'Delegate User',
|
|
56
|
+
get: (row) => row.DelegateUser,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
AuditDisplay.summary = messages.getMessage('summary');
|
|
63
|
+
AuditDisplay.description = messages.getMessage('description');
|
|
64
|
+
AuditDisplay.examples = messages.getMessages('examples');
|
|
65
|
+
AuditDisplay.flags = {
|
|
66
|
+
'target-org': sf_plugins_core_1.Flags.requiredOrg({
|
|
67
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
68
|
+
char: 'o',
|
|
69
|
+
required: true,
|
|
70
|
+
}),
|
|
71
|
+
username: sf_plugins_core_1.Flags.string({
|
|
72
|
+
summary: messages.getMessage('flags.username.summary'),
|
|
73
|
+
char: 'u',
|
|
74
|
+
}),
|
|
75
|
+
limit: sf_plugins_core_1.Flags.integer({
|
|
76
|
+
summary: messages.getMessage('flags.limit.summary'),
|
|
77
|
+
char: 'l',
|
|
78
|
+
min: 1,
|
|
79
|
+
max: 2000,
|
|
80
|
+
default: 20,
|
|
81
|
+
}),
|
|
82
|
+
};
|
|
83
|
+
exports.default = AuditDisplay;
|
|
84
|
+
//# sourceMappingURL=display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/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nB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACnD,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,IAAI;QACT,OAAO,EAAE,EAAE;KACZ,CAAC;CACH,CAAC;kBAtBiB,YAAY"}
|
|
@@ -5,7 +5,7 @@ const core_1 = require("@salesforce/core");
|
|
|
5
5
|
const lib_1 = require("@salesforce/kit/lib");
|
|
6
6
|
const emoji = require("node-emoji");
|
|
7
7
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
8
|
-
const messages = core_1.Messages.loadMessages('sf-raven', 'event.subscribe');
|
|
8
|
+
const messages = core_1.Messages.loadMessages('sf-raven', 'raven.event.subscribe');
|
|
9
9
|
class EventSubscribe extends sf_plugins_core_1.SfCommand {
|
|
10
10
|
async run() {
|
|
11
11
|
const { flags } = await this.parse(EventSubscribe);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe.js","sourceRoot":"","sources":["../../../../src/commands/raven/event/subscribe.ts"],"names":[],"mappings":";;AAAA,iEAAmE;AACnE,2CAA6D;AAE7D,6CAA+C;AAC/C,oCAAoC;AAEpC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"subscribe.js","sourceRoot":"","sources":["../../../../src/commands/raven/event/subscribe.ts"],"names":[],"mappings":";;AAAA,iEAAmE;AACnE,2CAA6D;AAE7D,6CAA+C;AAC/C,oCAAoC;AAEpC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAC;AAM5E,MAAqB,cAAe,SAAQ,2BAA+B;IA6BlE,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MA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_core_1 = require("@salesforce/sf-plugins-core");
|
|
4
4
|
const core_1 = require("@salesforce/core");
|
|
5
5
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
6
|
-
const messages = core_1.Messages.loadMessages('sf-raven', 'object.display.fields');
|
|
6
|
+
const messages = core_1.Messages.loadMessages('sf-raven', 'raven.object.display.fields');
|
|
7
7
|
class ObjectDisplayFields extends sf_plugins_core_1.SfCommand {
|
|
8
8
|
async run() {
|
|
9
9
|
this.spinner.start('Loading...');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../src/commands/raven/object/display/fields.ts"],"names":[],"mappings":";;AAAA,iEAAmE;AACnE,2CAA4C;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../src/commands/raven/object/display/fields.ts"],"names":[],"mappings":";;AAAA,iEAAmE;AACnE,2CAA4C;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,6BAA6B,CAAC,CAAC;AAMlF,MAAqB,mBAAoB,SAAQ,2BAAoC;IAkB5E,KAAK,CAAC,GAAG;QACd,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAgBjC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACxD,MAAM,EAAE,GAAG,IAAI,oBAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAEvD,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;QAChC,MAAM,IAAI,GAAG,GAAG,CAAC,aAA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AAC;QACpB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;QACrD,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;kBAhBiB,mBAAmB"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
4
4
|
const core_1 = require("@salesforce/core");
|
|
5
5
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
6
|
-
const messages = core_1.Messages.loadMessages('sf-raven', 'object.display.recordtypes');
|
|
6
|
+
const messages = core_1.Messages.loadMessages('sf-raven', 'raven.object.display.recordtypes');
|
|
7
7
|
class ObjectDisplayRecordtypes extends sf_plugins_core_1.SfCommand {
|
|
8
8
|
async run() {
|
|
9
9
|
this.spinner.start('Loading...');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordtypes.js","sourceRoot":"","sources":["../../../../../src/commands/raven/object/display/recordtypes.ts"],"names":[],"mappings":";;AAAA,iEAAmE;AACnE,2CAA4C;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"recordtypes.js","sourceRoot":"","sources":["../../../../../src/commands/raven/object/display/recordtypes.ts"],"names":[],"mappings":";;AAAA,iEAAmE;AACnE,2CAA4C;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,kCAAkC,CAAC,CAAC;AAMvF,MAAqB,wBAAyB,SAAQ,2BAAyC;IAkBtF,KAAK,CAAC,GAAG;QACd,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAgBjC,MAAM,EAAE,KAAK,EAAE,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AAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,8BAAK,GAAG;IAC7B,YAAY,EAAE,uBAAK,CAAC,WAAW,CAAC;QAC9B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;QACxD,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,OAAO,EAAE,uBAAK,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;QACrD,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC;kBAhBiB,wBAAwB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Show recent entries in the Setup Audit Trail.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Returns the 20 most recent Setup Audit Trail entries, but this can be increased up to 2000 using the optional --limit flag. The results can be filtered by a particular user using the --username flag.
|
|
8
|
+
|
|
9
|
+
# flags.target-org.summary
|
|
10
|
+
|
|
11
|
+
Login username or alias for the target org.
|
|
12
|
+
|
|
13
|
+
# flags.username.summary
|
|
14
|
+
|
|
15
|
+
Username to filter the audit trail by.
|
|
16
|
+
|
|
17
|
+
# flags.limit.summary
|
|
18
|
+
|
|
19
|
+
The number of audit trail entries to return. Maximum is 2000.
|
|
20
|
+
|
|
21
|
+
# examples
|
|
22
|
+
|
|
23
|
+
- <%= config.bin %> <%= command.id %> --target-org dev
|
|
24
|
+
- <%= config.bin %> <%= command.id %> --target-org dev --limit 200
|
|
25
|
+
- <%= config.bin %> <%= command.id %> --target-org dev --username username@salesforce.com.dev
|
|
26
|
+
- <%= config.bin %> <%= command.id %> --target-org dev --limit 50 --username username@salesforce.com.dev
|
package/oclif.manifest.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.4",
|
|
3
3
|
"commands": {
|
|
4
|
+
"raven:audit:display": {
|
|
5
|
+
"id": "raven:audit:display",
|
|
6
|
+
"summary": "Show recent entries in the Setup Audit Trail.",
|
|
7
|
+
"description": "Returns the 20 most recent Setup Audit Trail entries, but this can be increased up to 2000 using the optional --limit flag. The results can be filtered by a particular user using the --username flag.",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"pluginName": "sf-raven",
|
|
10
|
+
"pluginAlias": "sf-raven",
|
|
11
|
+
"pluginType": "core",
|
|
12
|
+
"aliases": [],
|
|
13
|
+
"examples": [
|
|
14
|
+
"<%= config.bin %> <%= command.id %> --target-org dev",
|
|
15
|
+
"<%= config.bin %> <%= command.id %> --target-org dev --limit 200",
|
|
16
|
+
"<%= config.bin %> <%= command.id %> --target-org dev --username username@salesforce.com.dev",
|
|
17
|
+
"<%= config.bin %> <%= command.id %> --target-org dev --limit 50 --username username@salesforce.com.dev"
|
|
18
|
+
],
|
|
19
|
+
"flags": {
|
|
20
|
+
"json": {
|
|
21
|
+
"name": "json",
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Format output as json.",
|
|
24
|
+
"helpGroup": "GLOBAL",
|
|
25
|
+
"allowNo": false
|
|
26
|
+
},
|
|
27
|
+
"target-org": {
|
|
28
|
+
"name": "target-org",
|
|
29
|
+
"type": "option",
|
|
30
|
+
"char": "o",
|
|
31
|
+
"summary": "Login username or alias for the target org.",
|
|
32
|
+
"required": true,
|
|
33
|
+
"multiple": false
|
|
34
|
+
},
|
|
35
|
+
"username": {
|
|
36
|
+
"name": "username",
|
|
37
|
+
"type": "option",
|
|
38
|
+
"char": "u",
|
|
39
|
+
"summary": "Username to filter the audit trail by.",
|
|
40
|
+
"multiple": false
|
|
41
|
+
},
|
|
42
|
+
"limit": {
|
|
43
|
+
"name": "limit",
|
|
44
|
+
"type": "option",
|
|
45
|
+
"char": "l",
|
|
46
|
+
"summary": "The number of audit trail entries to return. Maximum is 2000.",
|
|
47
|
+
"multiple": false,
|
|
48
|
+
"default": 20
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"args": {},
|
|
52
|
+
"hasDynamicHelp": true
|
|
53
|
+
},
|
|
4
54
|
"raven:event:subscribe": {
|
|
5
55
|
"id": "raven:event:subscribe",
|
|
6
56
|
"summary": "Subscribe to Platform Events.",
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sf-raven",
|
|
3
3
|
"description": "A custom sf plugin built by @tomcarman",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^2.11.8",
|
|
7
7
|
"@salesforce/core": "^5.2.10",
|
|
8
8
|
"@salesforce/kit": "^3.0.8",
|
|
9
9
|
"@salesforce/sf-plugins-core": "^3.1.14",
|
|
10
|
+
"dayjs": "^1.11.10",
|
|
10
11
|
"node-emoji": "^2.1.0",
|
|
11
12
|
"pinst": "^3.0.0",
|
|
12
13
|
"tslib": "^2"
|
|
@@ -69,19 +70,42 @@
|
|
|
69
70
|
"@oclif/plugin-help"
|
|
70
71
|
],
|
|
71
72
|
"topics": {
|
|
72
|
-
"
|
|
73
|
-
"description": "
|
|
74
|
-
},
|
|
75
|
-
"object": {
|
|
76
|
-
"description": "description for object",
|
|
73
|
+
"raven": {
|
|
74
|
+
"description": "Various useful commands.",
|
|
77
75
|
"subtopics": {
|
|
78
|
-
"
|
|
79
|
-
"description": "
|
|
76
|
+
"audit": {
|
|
77
|
+
"description": "Commands relating to the Setup Audit Trail.",
|
|
78
|
+
"subtopics": {
|
|
79
|
+
"display": {
|
|
80
|
+
"description": "Show recent entries in the Setup Audit Trail."
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"event": {
|
|
85
|
+
"description": "Commands relating to Platform Events.",
|
|
86
|
+
"subtopics": {
|
|
87
|
+
"subscribe": {
|
|
88
|
+
"description": "Subscribe to Platform Events."
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"object": {
|
|
93
|
+
"description": "Commands relating to sObjects",
|
|
94
|
+
"subtopics": {
|
|
95
|
+
"display": {
|
|
96
|
+
"description": "Commands that display information about sObjects",
|
|
97
|
+
"subtopics": {
|
|
98
|
+
"fields": {
|
|
99
|
+
"description": "Show field information for a given sObject."
|
|
100
|
+
},
|
|
101
|
+
"recordtypes": {
|
|
102
|
+
"description": "Show Record Type information for a given sObject."
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
80
107
|
}
|
|
81
108
|
}
|
|
82
|
-
},
|
|
83
|
-
"event": {
|
|
84
|
-
"description": "description for event"
|
|
85
109
|
}
|
|
86
110
|
}
|
|
87
111
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|