Skip to content

Commit cbef651

Browse files
feat: types support for reinstall and test case
1 parent 766ded5 commit cbef651

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/typescript/app.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,18 @@ export function installation(marketplace: Marketplace) {
192192
done()
193193
}).catch(done)
194194
})
195+
196+
test('should Reinstall App', done => {
197+
marketplace.app(appUid).reinstall({targetType: 'stack', targetUid: process.env.APIKEY as string})
198+
.then((reinstallation) => {
199+
installationUid = reinstallation.installation_uid
200+
expect(reinstallation.installation_uid).to.not.equal(undefined)
201+
expect(reinstallation.fetch).to.not.equal(undefined)
202+
expect(reinstallation.update).to.not.equal(undefined)
203+
expect(reinstallation.uninstall).to.not.equal(undefined)
204+
done()
205+
}).catch(done)
206+
})
195207

196208
test('should Uninstall App installation', done => {
197209
marketplace.installation(installationUid).uninstall()

types/marketplace/app/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface App extends SystemFields, SystemFunction<App> {
2020
redirectUri: string,
2121
scope: string,
2222
state: string }): Promise<AnyProperty>
23+
reinstall(data: {targetUid: string, targetType: AppTarget}): Promise<Installation>
2324
authorization(): Authorization
2425
listInstallations(): Promise<ContentstackCollection<App>>
2526
}

0 commit comments

Comments
 (0)