addigy 2.8.2 → 2.9.0
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/index.d.ts +2 -1
- package/index.js +11 -0
- package/package.json +1 -1
- package/types.d.ts +101 -0
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateWebContentFilterPayload, CustomFact, Extension, FilevaultRequest, IAddigyConfig, IAddigyInternalAuthObject, MdmConfigurationPayload, NotificationSettings, PPPCInput, ServiceManagementPayloadRule, SupportedOsVersions } from './types';
|
|
1
|
+
import { CreateSoftware, CreateWebContentFilterPayload, CustomFact, Extension, FilevaultRequest, IAddigyConfig, IAddigyInternalAuthObject, MdmConfigurationPayload, NotificationSettings, PPPCInput, ServiceManagementPayloadRule, Software, SupportedOsVersions } from './types';
|
|
2
2
|
export * from './types';
|
|
3
3
|
declare enum AlertStatus {
|
|
4
4
|
Acknowledged = "Acknowledged",
|
|
@@ -41,6 +41,7 @@ export declare class Addigy {
|
|
|
41
41
|
getFileUploadUrl(fileName: string, contentType?: string): Promise<string>;
|
|
42
42
|
uploadFile(uploadUrl: string, file: object, contentType?: string): Promise<object[]>;
|
|
43
43
|
createCustomSoftware(baseIdentifier: string, version: string, downloads: string[], installationScript: string, condition: string, removeScript: string, priority?: number): Promise<object[]>;
|
|
44
|
+
createSoftwareInternal(authObject: IAddigyInternalAuthObject, software: CreateSoftware): Promise<Software>;
|
|
44
45
|
getUsers(authObject: IAddigyInternalAuthObject): Promise<object[]>;
|
|
45
46
|
createUser(authObject: IAddigyInternalAuthObject, email: string, name: string, policies: string[] | undefined, role: UserRoles | string, phone?: string): Promise<object[]>;
|
|
46
47
|
updateUser(authObject: IAddigyInternalAuthObject, email: string, name: string, policies: string[] | undefined, role: string, phone?: string): Promise<object[]>;
|
package/index.js
CHANGED
|
@@ -398,6 +398,17 @@ class Addigy {
|
|
|
398
398
|
throw err;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
+
async createSoftwareInternal(authObject, software) {
|
|
402
|
+
const res = await this._addigyRequest('https://app.addigy.com/api/software', {
|
|
403
|
+
headers: {
|
|
404
|
+
Cookie: `auth_token=${authObject.authToken};`,
|
|
405
|
+
origin: 'https://app-prod.addigy.com',
|
|
406
|
+
},
|
|
407
|
+
method: 'POST',
|
|
408
|
+
json: software,
|
|
409
|
+
});
|
|
410
|
+
return JSON.parse(res.body);
|
|
411
|
+
}
|
|
401
412
|
async getUsers(authObject) {
|
|
402
413
|
try {
|
|
403
414
|
let res = await this._addigyRequest('https://app-prod.addigy.com/api/account', {
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -290,3 +290,104 @@ export interface CreateWebContentFilterPayload {
|
|
|
290
290
|
requires_device_supervision?: boolean;
|
|
291
291
|
requires_mdm_profile_approved?: boolean;
|
|
292
292
|
}
|
|
293
|
+
export interface Software {
|
|
294
|
+
name: string;
|
|
295
|
+
provider: string;
|
|
296
|
+
identifier: string;
|
|
297
|
+
version: string;
|
|
298
|
+
instruction_id: string;
|
|
299
|
+
base_identifier: string;
|
|
300
|
+
public_software_instruction_id: string;
|
|
301
|
+
fact_identifier: string;
|
|
302
|
+
run_on_success: boolean;
|
|
303
|
+
predefined_conditions: PredefinedConditions;
|
|
304
|
+
condition: string;
|
|
305
|
+
remove_script: string;
|
|
306
|
+
policy_restricted: boolean;
|
|
307
|
+
status_on_skipped: string;
|
|
308
|
+
user_email: string;
|
|
309
|
+
label: string;
|
|
310
|
+
public: boolean;
|
|
311
|
+
organization_id: string;
|
|
312
|
+
downloads: any[];
|
|
313
|
+
profiles: any[];
|
|
314
|
+
installation_script: string;
|
|
315
|
+
price_per_device: number;
|
|
316
|
+
priority: number;
|
|
317
|
+
tcc_version: number;
|
|
318
|
+
type: string;
|
|
319
|
+
category: string;
|
|
320
|
+
software_icon: SoftwareIcon;
|
|
321
|
+
description: string;
|
|
322
|
+
archived: boolean;
|
|
323
|
+
}
|
|
324
|
+
export interface CreateSoftware {
|
|
325
|
+
base_identifier: string;
|
|
326
|
+
version: string;
|
|
327
|
+
downloads: SoftwareDownload[];
|
|
328
|
+
profiles: any[];
|
|
329
|
+
installation_script: string;
|
|
330
|
+
remove_script: string;
|
|
331
|
+
condition: string;
|
|
332
|
+
predefined_conditions: PredefinedConditions;
|
|
333
|
+
public: boolean | null;
|
|
334
|
+
software_icon: SoftwareIcon;
|
|
335
|
+
run_on_success: boolean;
|
|
336
|
+
status_on_skipped: string;
|
|
337
|
+
priority: number;
|
|
338
|
+
category: string;
|
|
339
|
+
}
|
|
340
|
+
export interface PredefinedConditions {
|
|
341
|
+
os_version: OSVersion;
|
|
342
|
+
app_exists: AppExists;
|
|
343
|
+
file_exists: FileExists;
|
|
344
|
+
file_not_exists: FileExists;
|
|
345
|
+
profile_exists: ProfileExists;
|
|
346
|
+
process_not_running: ProcessNotRunning;
|
|
347
|
+
required_architecture: RequiredArchitecture;
|
|
348
|
+
}
|
|
349
|
+
export interface AppExists {
|
|
350
|
+
enabled: boolean;
|
|
351
|
+
operator: string;
|
|
352
|
+
version: string;
|
|
353
|
+
path: string;
|
|
354
|
+
install_if_not_present: boolean;
|
|
355
|
+
}
|
|
356
|
+
export interface FileExists {
|
|
357
|
+
enabled: boolean;
|
|
358
|
+
path: string;
|
|
359
|
+
}
|
|
360
|
+
export interface OSVersion {
|
|
361
|
+
enabled: boolean;
|
|
362
|
+
operator: string;
|
|
363
|
+
version: string;
|
|
364
|
+
}
|
|
365
|
+
export interface ProcessNotRunning {
|
|
366
|
+
enabled: boolean;
|
|
367
|
+
process_name: string;
|
|
368
|
+
}
|
|
369
|
+
export interface ProfileExists {
|
|
370
|
+
enabled: boolean;
|
|
371
|
+
profile_id: string;
|
|
372
|
+
}
|
|
373
|
+
export interface RequiredArchitecture {
|
|
374
|
+
enabled: boolean;
|
|
375
|
+
apple_silicon: boolean;
|
|
376
|
+
}
|
|
377
|
+
export interface SoftwareIcon {
|
|
378
|
+
orgid: string;
|
|
379
|
+
filename: string;
|
|
380
|
+
id: string;
|
|
381
|
+
provider: string;
|
|
382
|
+
}
|
|
383
|
+
export interface SoftwareDownload {
|
|
384
|
+
orgid: string;
|
|
385
|
+
created: Date;
|
|
386
|
+
content_type: string;
|
|
387
|
+
filename: string;
|
|
388
|
+
id: string;
|
|
389
|
+
md5_hash: string;
|
|
390
|
+
provider: string;
|
|
391
|
+
user_email: string;
|
|
392
|
+
size: number;
|
|
393
|
+
}
|