Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
salesforce-metadat-proprties
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanthreddyc committed Feb 22, 2024
1 parent 1549f67 commit a8e619c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions verticals/vertical-crm/providers/salesforce-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ export const salesforceProvider = {
}),

// MARK: - Metadata
metadataListStandardObjects: () =>
SALESFORCE_STANDARD_OBJECTS.map((name) => ({name})),
metadataListStandardObjects: () => {
console.log('standard objects called')
return SALESFORCE_STANDARD_OBJECTS.map((name) => ({name}))
},
metadataListCustomObjects: async ({instance}) => {
const res = await instance.GET('/sobjects')
return (res.data.sobjects ?? [])
Expand All @@ -233,8 +235,8 @@ export const salesforceProvider = {
},

metadataListProperties: async ({instance, input}) => {
const res = await instance.GET('/sobjects/{name}/describe', {
params: {path: {name: input.name}},
const res = await instance.GET('/sobjects/{sObject}/describe', {
params: {path: {sObject: input.name}},
})
return (res.data.fields ?? []).map((s) => mappers.objectProperty.parse(s))
},
Expand Down

0 comments on commit a8e619c

Please sign in to comment.