UNPKG

3.17 kBTypeScriptView Raw
1import { _SPCollection, _SPInstance, ISPQueryable } from "../spqueryable.js";
2import { IFile } from "../files/types.js";
3export declare class _AppCatalog extends _SPCollection {
4 constructor(base: string | ISPQueryable, path?: string);
5 /**
6 * Get details of specific app from the app catalog
7 * @param id - Specify the guid of the app
8 */
9 getAppById(id: string): IApp;
10 /**
11 * Synchronize a solution to the Microsoft Teams App Catalog
12 * @param id - Specify the guid of the app
13 * @param useSharePointItemId (optional) - By default this REST call requires the SP Item id of the app, not the app id.
14 * PnPjs will try to fetch the item id by default, you can still use this parameter to pass your own item id in the first parameter
15 */
16 syncSolutionToTeams(id: string | number, useSharePointItemId?: boolean): Promise<void>;
17 /**
18 * Uploads an app package. Not supported for batching
19 *
20 * @param filename Filename to create.
21 * @param content app package data (eg: the .app or .sppkg file).
22 * @param shouldOverWrite Should an app with the same name in the same location be overwritten? (default: true)
23 * @returns Promise<IAppAddResult>
24 */
25 add(filename: string, content: string | ArrayBuffer | Blob, shouldOverWrite?: boolean): Promise<IAppAddResult>;
26}
27export interface IAppCatalog extends _AppCatalog {
28}
29export declare const AppCatalog: import("../spqueryable.js").ISPInvokableFactory<IAppCatalog>;
30export declare class _App extends _SPInstance {
31 /**
32 * This method deploys an app on the app catalog. It must be called in the context
33 * of the tenant app catalog web or it will fail.
34 *
35 * @param skipFeatureDeployment Deploy the app to the entire tenant
36 */
37 deploy(skipFeatureDeployment?: boolean): Promise<void>;
38 /**
39 * This method retracts a deployed app on the app catalog. It must be called in the context
40 * of the tenant app catalog web or it will fail.
41 */
42 retract(): Promise<void>;
43 /**
44 * This method allows an app which is already deployed to be installed on a web
45 */
46 install(): Promise<void>;
47 /**
48 * This method allows an app which is already installed to be uninstalled on a web
49 * Note: when you use the REST API to uninstall a solution package from the site, it is not relocated to the recycle bin
50 */
51 uninstall(): Promise<void>;
52 /**
53 * This method allows an app which is already installed to be upgraded on a web
54 */
55 upgrade(): Promise<void>;
56 /**
57 * This method removes an app from the app catalog. It must be called in the context
58 * of the tenant app catalog web or it will fail.
59 */
60 remove(): Promise<void>;
61 private do;
62}
63export interface IApp extends _App {
64}
65export declare const App: import("../spqueryable.js").ISPInvokableFactory<IApp>;
66/**
67 * Result object after adding an app
68 */
69export interface IAppAddResult {
70 /**
71 * Contains metadata of the added app
72 */
73 data: any;
74 /**
75 * A File instance to the item in SharePoint
76 */
77 file: IFile;
78}
79//# sourceMappingURL=types.d.ts.map
\No newline at end of file