@verdocs/js-sdk 3.10.7 → 3.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Envelopes/Envelopes.d.ts +2 -1
- package/Templates/Templates.d.ts +24 -0
- package/Templates/Templates.js +15 -0
- package/package.json +1 -1
package/Envelopes/Envelopes.d.ts
CHANGED
|
@@ -214,8 +214,9 @@ export interface ITimeRange {
|
|
|
214
214
|
end: string;
|
|
215
215
|
}
|
|
216
216
|
export interface IListEnvelopesParams {
|
|
217
|
-
|
|
217
|
+
view?: 'inbox' | 'sent' | 'action' | 'waiting' | 'completed';
|
|
218
218
|
q?: string;
|
|
219
|
+
status?: string[];
|
|
219
220
|
created_at?: ITimeRange;
|
|
220
221
|
is_owner?: boolean;
|
|
221
222
|
sort_by?: 'name' | 'created_at' | 'updated_at' | 'canceled_at' | 'status';
|
package/Templates/Templates.d.ts
CHANGED
|
@@ -117,6 +117,30 @@ export interface ITemplateCreateParams {
|
|
|
117
117
|
* ```
|
|
118
118
|
*/
|
|
119
119
|
export declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: ((percent: number, loadedBytes: number, totalBytes: number) => void) | undefined) => Promise<ITemplate>;
|
|
120
|
+
export interface ITemplateCreateFromSharepointParams {
|
|
121
|
+
/** Name for the template to create. */
|
|
122
|
+
name: string;
|
|
123
|
+
/** The site ID the source file is in. */
|
|
124
|
+
siteId: string;
|
|
125
|
+
/** The item ID of the source file. */
|
|
126
|
+
itemId: string;
|
|
127
|
+
/**
|
|
128
|
+
* On-Behalf-Of access token generated for the request. This must have an audience of "https://graph.microsoft.com"
|
|
129
|
+
* with Read access to the source file. This token is used ephemerally and discarded after the request, but it is
|
|
130
|
+
* still recommended that you generate it with the minimal permissions possible.
|
|
131
|
+
*/
|
|
132
|
+
oboToken: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Create a template from a Sharepoint asset.
|
|
136
|
+
*
|
|
137
|
+
* ```typescript
|
|
138
|
+
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
139
|
+
*
|
|
140
|
+
* const newTemplate = await Templates.createTemplateFromSharepoint((VerdocsEndpoint.getDefault(), {...});
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
export declare const createTemplateFromSharepoint: (endpoint: VerdocsEndpoint, params: ITemplateCreateFromSharepointParams) => Promise<ITemplate>;
|
|
120
144
|
/**
|
|
121
145
|
* Update a template.
|
|
122
146
|
*
|
package/Templates/Templates.js
CHANGED
|
@@ -153,6 +153,21 @@ export var createTemplate = function (endpoint, params, onUploadProgress) {
|
|
|
153
153
|
return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
+
/**
|
|
157
|
+
* Create a template from a Sharepoint asset.
|
|
158
|
+
*
|
|
159
|
+
* ```typescript
|
|
160
|
+
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
161
|
+
*
|
|
162
|
+
* const newTemplate = await Templates.createTemplateFromSharepoint((VerdocsEndpoint.getDefault(), {...});
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
export var createTemplateFromSharepoint = function (endpoint, params) {
|
|
166
|
+
var options = {
|
|
167
|
+
timeout: 120000,
|
|
168
|
+
};
|
|
169
|
+
return endpoint.api.post('/templates/from-sharepoint', params, options).then(function (r) { return r.data; });
|
|
170
|
+
};
|
|
156
171
|
/**
|
|
157
172
|
* Update a template.
|
|
158
173
|
*
|