@@ -163,46 +163,77 @@ type SfSharingRules struct {
163163}
164164
165165type SfSharingBaseRule struct {
166- FullName string `xml:"fullName"`
167- AccessLevel string `xml:"accessLevel"`
168- Label string `xml:"label"`
169- Description string `xml:"description"`
170- SharedTo SfSharedTo `xml:"sharedTo"`
166+ FullName string `xml:"fullName"`
167+ Label string `xml:"label"`
168+ AccessLevel string `xml:"accessLevel"`
169+ Description string `xml:"description"`
170+ SharedTo SfSharedTo `xml:"sharedTo"`
171+ AccountSettings []SfAccountSharingRuleSettings `xml:"accountSettings"`
171172}
172173
173174type SfSharingCriteriaRule struct {
174175 SfSharingBaseRule
176+ BooleanFilter string `xml:"booleanFilter"`
177+ CriteriaItems []SfFilterItem `xml:"criteriaItems"`
178+ IncludeRecordsOwnedByAll bool `xml:"includeRecordsOwnedByAll"`
175179}
176180
177181type SfSharingGuestRules struct {
178182 SfSharingBaseRule
183+ BooleanFilter string `xml:"booleanFilter"`
184+ CriteriaItems []SfFilterItem `xml:"criteriaItems"`
185+ IncludeHVUOwnedRecords bool `xml:"includeHVUOwnedRecords"`
179186}
180187
181188type SfSharingOwnerRules struct {
182189 SfSharingBaseRule
190+ SharedFrom SfSharedTo `xml:"sharedFrom"`
183191}
184192
185193type SfSharingTerritoryRules struct {
186- SfSharingBaseRule
194+ SfSharingOwnerRules
187195}
188196
189197type SfSharedTo struct {
190- AllCustomerPortalUsers * struct {} `xml:"allCustomerPortalUsers"`
191- AllInternalUsers * struct {} `xml:"allInternalUsers"`
192- AllPartnerUsers * struct {} `xml:"allPartnerUsers"`
193- ChannelProgramGroup * struct {} `xml:"channelProgramGroup"`
194- Group []string `xml:"group"`
195- GuestUser []string `xml:"guestUser"`
198+ AllCustomerPortalUsers * struct {} `xml:"allCustomerPortalUsers"`
199+ AllInternalUsers * struct {} `xml:"allInternalUsers"`
200+ AllPartnerUsers * struct {} `xml:"allPartnerUsers"`
201+ ChannelProgramGroup * struct {} `xml:"channelProgramGroup"`
202+ Group []string `xml:"group"`
203+ GuestUser []string `xml:"guestUser"`
204+ ManagerSubordinates []string `xml:"managerSubordinates"`
205+ Managers []string `xml:"managers"`
206+ PortalRole []string `xml:"portalRole"`
207+ PortalRoleAndSubordinates []string `xml:"portalRoleAndSubordinates"`
208+ Role []string `xml:"role"`
209+ RoleAndSubordinates []string `xml:"roleAndSubordinates"`
210+ RoleAndSubordinatesInternal []string `xml:"roleAndSubordinatesInternal"`
211+ Territory []string `xml:"territory"`
212+ TerritoryAndSubordinates []string `xml:"territoryAndSubordinates"`
213+ Queue []string `xml:"queue"`
214+ }
215+
216+ type SfAccountSharingRuleSettings struct {
217+ CaseAccessLevel string `xml:"caseAccessLevel"`
218+ ContactAccessLevel string `xml:"contactAccessLevel"`
219+ OpportunityAccessLevel string `xml:"opportunityAccessLevel"`
220+ }
221+
222+ type SfFilterItem struct {
223+ Field string `xml:"field"`
224+ Operation string `xml:"operation"`
225+ Value string `xml:"value"`
226+ ValueField string `xml:"valueField"`
196227}
197228
198- type DuplicateRule struct {
229+ type SfDuplicateRule struct {
199230 XMLName xml.Name `xml:"DuplicateRule"`
200231 IsActive bool `xml:"isActive"`
201232 MasterLabel string `xml:"masterLabel"`
202233 Description string `xml:"description"`
203234}
204235
205- type MatchingRules struct {
236+ type SfMatchingRules struct {
206237 XMLName xml.Name `xml:"MatchingRules"`
207238}
208239
@@ -235,8 +266,8 @@ type SalesforceMeta struct {
235266 GlobalValueSets map [string ]* SfGlobalValueSet
236267 RestrictionRules map [string ]* SfRestrictionRule
237268 SharingRules map [string ]* SfSharingRules
238- DuplicateRules map [string ]* DuplicateRule
239- MatchingRules map [string ]* MatchingRules
269+ DuplicateRules map [string ]* SfDuplicateRule
270+ MatchingRules map [string ]* SfMatchingRules
240271 Flows map [string ]* SfFlow
241272 ApexTriggers map [string ]* SfApexTriggerCode
242273 SObjects map [string ]* SfCustomObject
0 commit comments