-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1202 from contentstack/refactor/CS-42957
refactor: marketplace apps HTTP adapter calls to SDK call migration on import command [CS-42957]
- Loading branch information
Showing
8 changed files
with
278 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
265 changes: 159 additions & 106 deletions
265
packages/contentstack-import/src/import/modules/marketplace-apps.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
type AppLocation = | ||
| 'cs.cm.stack.config' | ||
| 'cs.cm.stack.dashboard' | ||
| 'cs.cm.stack.sidebar' | ||
| 'cs.cm.stack.custom_field' | ||
| 'cs.cm.stack.rte' | ||
| 'cs.cm.stack.asset_sidebar' | ||
| 'cs.org.config'; | ||
|
||
interface ExtensionMeta { | ||
uid?: string; | ||
name?: string; | ||
description?: string; | ||
path?: string; | ||
signed: boolean; | ||
extension_uid?: string; | ||
data_type?: string; | ||
enabled?: boolean; | ||
width?: number; | ||
blur?: boolean; | ||
default_width?: 'full' | 'half'; | ||
} | ||
|
||
interface Extension { | ||
type: AppLocation; | ||
meta: ExtensionMeta[]; | ||
} | ||
|
||
interface LocationConfiguration { | ||
signed: boolean; | ||
base_url: string; | ||
locations: Extension[]; | ||
} | ||
|
||
interface AnyProperty { | ||
[propName: string]: any; | ||
} | ||
|
||
type Manifest = { | ||
uid: string; | ||
name: string; | ||
icon?: string; | ||
hosting?: any; | ||
version?: number; | ||
description: string; | ||
organization_uid: string; | ||
framework_version?: string; | ||
oauth?: any; | ||
webhook?: any; | ||
ui_location: LocationConfiguration; | ||
target_type: 'stack' | 'organization'; | ||
visibility: 'private' | 'public' | 'public_unlisted'; | ||
} & AnyProperty; | ||
|
||
type Installation = { | ||
uid: string; | ||
status: string; | ||
manifest: Manifest; | ||
configuration: any; | ||
server_configuration: any; | ||
target: { type: string; uid: string }; | ||
ui_location: LocationConfiguration; | ||
} & AnyProperty; | ||
|
||
export { Installation, Manifest }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters