@adobe/ccweb-add-on-sdk-types 1.7.0 → 1.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/ccweb-add-on-sdk-types",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "author": "Adobe",
5
5
  "license": "MIT",
6
6
  "description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "tslib": "2.6.2",
42
+ "@swc/helpers": "0.5.12",
42
43
  "gl-matrix": "3.3.0"
43
44
  },
44
45
  "devDependencies": {
package/ui/ui-sdk.d.ts CHANGED
@@ -253,6 +253,12 @@ declare interface ApplicationBase {
253
253
  * @returns if the user is premium user or not
254
254
  */
255
255
  startPremiumUpgradeIfFreeUser(): Promise<boolean>;
256
+ /**
257
+ * @experimental - Experimental API
258
+ * Get information regarding current platform.
259
+ * @returns the details regarding the current platform.
260
+ */
261
+ getCurrentPlatform(): Promise<CurrentPlatformPayload>;
256
262
  }
257
263
 
258
264
  /**
@@ -499,11 +505,37 @@ declare namespace Constants {
499
505
  MediaTabs,
500
506
  ElementsTabs,
501
507
  PanelActionType,
508
+ PlatformEnvironment,
509
+ DeviceClass,
510
+ PlatformType,
502
511
  AuthorizationStatus
503
512
  };
504
513
  }
505
514
  export { Constants };
506
515
 
516
+ /**
517
+ * @experimental - Experimental API
518
+ * Interface for the current platform
519
+ */
520
+ export declare interface CurrentPlatformPayload {
521
+ /**
522
+ * Purchases are NOT allowed in the {@link PlatformEnvironment.app} as of now
523
+ */
524
+ inAppPurchaseAllowed: boolean;
525
+ /**
526
+ * Denotes the platform type
527
+ */
528
+ platform: PlatformType;
529
+ /**
530
+ * Denotes the current environment
531
+ */
532
+ environment: PlatformEnvironment;
533
+ /**
534
+ * Denotes the device class
535
+ */
536
+ deviceClass: DeviceClass;
537
+ }
538
+
507
539
  /**
508
540
  * Represents the current logged-in user accessing the host application
509
541
  */
@@ -561,6 +593,25 @@ export declare interface DevFlags {
561
593
  simulateFreeUser: boolean;
562
594
  }
563
595
 
596
+ /**
597
+ * @experimental - Experimental API
598
+ * Denotes the device class
599
+ */
600
+ export declare enum DeviceClass {
601
+ /**
602
+ * Mobile Device
603
+ */
604
+ mobile = "mobile",
605
+ /**
606
+ * Tablet Device
607
+ */
608
+ tablet = "tablet",
609
+ /**
610
+ * Desktop
611
+ */
612
+ desktop = "desktop"
613
+ }
614
+
564
615
  /**
565
616
  * Represents the Modal Dialog that the add-on has presented to the user.
566
617
  */
@@ -1174,6 +1225,68 @@ export declare interface PdfRenditionOptions extends RenditionOptions {
1174
1225
  pageBoxes?: PdfPageBoxes;
1175
1226
  }
1176
1227
 
1228
+ /**
1229
+ * @experimental - Experimental API
1230
+ * Denotes the enum for current environment
1231
+ */
1232
+ export declare enum PlatformEnvironment {
1233
+ /**
1234
+ * App Environment
1235
+ */
1236
+ app = "app",
1237
+ /**
1238
+ * Web Environment
1239
+ */
1240
+ web = "web"
1241
+ }
1242
+
1243
+ /**
1244
+ * @experimental - Experimental API
1245
+ * Denotes the type of platform
1246
+ */
1247
+ export declare enum PlatformType {
1248
+ /**
1249
+ * iOS
1250
+ */
1251
+ iOS = "ios",
1252
+ /**
1253
+ * iPad
1254
+ */
1255
+ iPadOS = "ipad",
1256
+ /**
1257
+ * Chrome OS
1258
+ */
1259
+ chromeOS = "chromeOS",
1260
+ /**
1261
+ * Android
1262
+ */
1263
+ android = "android",
1264
+ /**
1265
+ * Chrome Browser
1266
+ */
1267
+ chromeBrowser = "chromeBrowser",
1268
+ /**
1269
+ * Firefox Browser
1270
+ */
1271
+ fireforxBrowser = "firefoxBrowser",
1272
+ /**
1273
+ * Edge Browser
1274
+ */
1275
+ edgeBrowser = "edgeBrowser",
1276
+ /**
1277
+ * Samsung Browser
1278
+ */
1279
+ samsungBrowser = "samsumgBrowser",
1280
+ /**
1281
+ * Safari Browser
1282
+ */
1283
+ safariBrowser = "safariBrowser",
1284
+ /**
1285
+ * Unknown Platform
1286
+ */
1287
+ unknown = "unknown"
1288
+ }
1289
+
1177
1290
  export declare interface PngRenditionOptions extends RenditionOptions {
1178
1291
  /**
1179
1292
  * PNG rendition format
package/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowSyntheticDefaultImports": true,
4
- "declaration": true,
5
- "declarationMap": true,
6
- "emitDecoratorMetadata": true,
7
- "esModuleInterop": true,
8
- "experimentalDecorators": true,
9
- "forceConsistentCasingInFileNames": true,
10
- "importHelpers": true,
11
- "incremental": true,
12
- "isolatedModules": true,
13
- "module": "ESNext",
14
- "moduleResolution": "node",
15
- "noImplicitOverride": false,
16
- "noUnusedLocals": true,
17
- "outDir": "dist",
18
- "preserveConstEnums": true,
19
- "sourceMap": true,
20
- "strict": true,
21
- "target": "ESNext",
22
- "useUnknownInCatchVariables": false
23
- },
24
- "exclude": ["node_modules"],
25
- "ts-node": {
26
- "files": true
27
- }
28
- }