This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
config.js
executable file
·97 lines (93 loc) · 4.48 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
"use strict";
var config;
var Config = module.exports = function(opts) {
opts = opts ? opts : {};
if (config === undefined) {
config = {};
config.pollTimeout = opts.pollTimeout !== undefined ? opts.pollTimeout : 15 * 60 * 1000; // 15 minutes
config.defaultMetadataTypes = opts.defaultMetadataTypes !== undefined ? opts.defaultMetadataTypes : ['ApexClass', 'ApexComponent', 'ApexPage', 'ApexTrigger', 'CustomField', 'CustomObject', 'CustomTab', 'WebLink'];
config.defaultApiVersion = opts.defaultApiVersion !== undefined ? opts.defaultApiVersion : "45.0";
config.folderBasedMetadataMap = opts.folderBasedMetadataMap !== undefined ? opts.folderBasedMetadataMap : {
'EmailFolder': 'EmailTemplate',
'DashboardFolder': 'Dashboard',
'DocumentFolder': 'Document',
'ReportFolder': 'Report'
};
// https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/packaging_component_attributes.htm
// Components with no entry in the "Subscriber and Developer Editable" column
config.nonEditableManagedMetadataTypes = ['ApexClass', 'SharingReason', 'ApexTrigger', 'CompactLayout', 'CustomLabel', 'CustomPermission', /* CustomSetting */ 'FlexiPage', 'HomePageComponent', 'AuraDefinitionBundle', 'LightningComponentBundle', 'PermissionSet', 'PlatformCachePartition', 'StaticResource', 'Translation', 'ApexComponent', 'ApexPage'];
// https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm
config.standardPicklistMapping = {
'AccountContactRelation.Roles': 'AccountContactMultiRoles',
'AccountContactRole.Role': 'AccountContactRole',
'Account.Ownership': 'AccountOwnership',
'Account.Rating': 'AccountRating',
'Lead.Rating': 'AccountRating',
'Account.Type': 'AccountType',
'Asset.Status': 'AssetStatus',
'CampaignMember.Status': 'CampaignMemberStatus',
'Campaign.Status': 'CampaignStatus',
'Campaign.Type': 'CampaignType',
'CaseContactRole.Role': 'CaseContactRole',
'Case.Origin': 'CaseOrigin',
'Case.Priority': 'CasePriority',
'Case.Reason': 'CaseReason',
'Case.Status': 'CaseStatus',
'Case.Type': 'CaseType',
'OpportunityContactRole.Role': 'ContactRole',
'ContractContactRole.Role': 'ContractContactRole',
'Contract.Status': 'ContractStatus',
'Entitlement.Type': 'EntitlementType',
'Event.Subject': 'EventSubject',
'Event.Type': 'EventType',
'Period.PeriodLabel': 'FiscalYearPeriodName',
'FiscalYearSettings.PeriodPrefix': 'FiscalYearPeriodPrefix',
'Period.QuarterLabel': 'FiscalYearQuarterName',
'FiscalYearSettings.QuarterPrefix': 'FiscalYearQuarterPrefix',
// 'IdeaTheme.Categories': 'IdeaCategory', // You can’t read or update this standard value set or picklist field.
'Idea.Categories': 'IdeaMultiCategory',
'Idea.Status': 'IdeaStatus',
'IdeaTheme.Status': 'IdeaThemeStatus',
'Account.Industry': 'Industry',
'Lead.Industry': 'Industry',
'Account.AccountSource': 'LeadSource',
'Lead.AccountSource': 'LeadSource',
'Opportunity.Source': 'LeadSource',
'Lead.Status': 'LeadStatus',
'Opportunity.Competitors': 'OpportunityCompetitor',
'Opportunity.StageName': 'OpportunityStage',
'Opportunity.Type': 'OpportunityType',
'Order.Type': 'OrderType',
'Account.PartnerRole': 'PartnerRole',
'Product2.Family': 'Product2Family',
// 'Question.Origin': 'QuestionOrigin', // You can’t read or update this standard value set or picklist field.
'QuickText.Category': 'QuickTextCategory',
'QuickText.Channel': 'QuickTextChannel',
'Quote.Status': 'QuoteStatus',
'OpportunityTeamMember.TeamMemberRole': 'SalesTeamRole',
'UserAccountTeamMember.TeamMemberRole': 'SalesTeamRole',
'UserTeamMember.TeamMemberRole': 'SalesTeamRole',
'AccountTeamMember.TeamMemberRole': 'SalesTeamRole',
'Contact.Salutation': 'Salutation',
'Lead.Name': 'Salutation',
'ServiceContract.ApprovalStatus': 'ServiceContractApprovalStatus',
'SocialPost.Classification': 'SocialPostClassification',
'SocialPost.EngagementLevel': 'SocialPostEngagementLevel',
'SocialPost.ReviewedStatus': 'SocialPostReviewedStatus',
'Solution.Status': 'SolutionStatus',
'Task.Priority': 'TaskPriority',
'Task.Status': 'TaskStatus',
'Task.Subject': 'TaskSubject',
'Task.Type': 'TaskType',
'WorkOrderLineItem.Status': 'WorkOrderLineItemStatus',
'WorkOrder.Priority': 'WorkOrderPriority',
'WorkOrder.Status': 'WorkOrderStatus'
};
}
};
Config.prototype.get = function(key) {
return config[key];
};
Config.prototype.set = function(key, value) {
config[key] = value;
};