File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -1734,6 +1734,29 @@ describe('AppClient tests', () => {
17341734 } ) ;
17351735 } ) ;
17361736
1737+ describe ( 'getAppContent tests' , ( ) => {
1738+ beforeEach ( ( ) => {
1739+ mockTransport = createRouterTransport ( ( { service } ) => {
1740+ service ( AppService , {
1741+ getAppContent : ( ) =>
1742+ new pb . GetAppContentResponse ( {
1743+ blobPath : '/path/to/blob' ,
1744+ entrypoint : 'index.html' ,
1745+ } ) ,
1746+ } ) ;
1747+ } ) ;
1748+ } ) ;
1749+
1750+ it ( 'getAppContent' , async ( ) => {
1751+ const response = await subject ( ) . getAppContent (
1752+ 'publicNamespace' ,
1753+ 'machineName'
1754+ ) ;
1755+ expect ( response . blobPath ) . toEqual ( '/path/to/blob' ) ;
1756+ expect ( response . entrypoint ) . toEqual ( 'index.html' ) ;
1757+ } ) ;
1758+ } ) ;
1759+
17371760 describe ( 'getOrganizationMetadata' , ( ) => {
17381761 beforeEach ( ( ) => {
17391762 mockTransport = createRouterTransport ( ( { service } ) => {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 CreateModuleResponse ,
1313 Fragment ,
1414 FragmentVisibility ,
15+ GetAppContentResponse ,
1516 GetRobotPartLogsResponse ,
1617 GetRobotPartResponse ,
1718 ListOrganizationMembersResponse ,
@@ -1177,6 +1178,20 @@ export class AppClient {
11771178 return this . client . createKeyFromExistingKeyAuthorizations ( { id } ) ;
11781179 }
11791180
1181+ /**
1182+ * Retrieves the app content for an organization.
1183+ *
1184+ * @param publicNamespace The public namespace of the organization
1185+ * @param name The name of the app
1186+ * @returns The blob path and entrypoint of the app content
1187+ */
1188+ async getAppContent (
1189+ publicNamespace : string ,
1190+ name : string
1191+ ) : Promise < GetAppContentResponse > {
1192+ return this . client . getAppContent ( { publicNamespace, name } ) ;
1193+ }
1194+
11801195 /**
11811196 * Retrieves user-defined metadata for an organization.
11821197 *
You can’t perform that action at this time.
0 commit comments