@shopify/app-bridge-types 0.1.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#623](https://github.com/Shopify/extensibility/pull/623) [`6334cc4f89f8c22c871dfb122f8d5aba358b26a3`](https://github.com/Shopify/extensibility/commit/6334cc4f89f8c22c871dfb122f8d5aba358b26a3) Thanks [@SammyJoeOsborne](https://github.com/SammyJoeOsborne)! - Updating ReviewRequestDeclinedResponse type with new recently-installed code
8
+
3
9
  ## 0.1.0
4
10
 
5
11
  ### Minor Changes
package/dist/shopify.ts CHANGED
@@ -60,6 +60,21 @@ interface AdminUser {
60
60
  accountAccess?: string;
61
61
  }
62
62
 
63
+ /**
64
+ * This API interface provides methods to retrieve app and extension status information.
65
+ */
66
+ interface AppApi {
67
+ /**
68
+ * The list of extensions from the current app.
69
+ * @returns A promise that resolves to the array of ExtensionResponse containing extension status information.
70
+ *
71
+ * This array may be empty if the app has no extensions.
72
+ *
73
+ * @throws {Error} When the App API is not available or the request fails.
74
+ */
75
+ extensions(): Promise<ExtensionInfo[]>;
76
+ }
77
+
63
78
  export interface AppBridgeAttributes {
64
79
  }
65
80
 
@@ -337,6 +352,33 @@ interface _EnvironmentApi {
337
352
  pos?: boolean;
338
353
  }
339
354
 
355
+ /**
356
+ * Represents an activation record for an extension.
357
+ * Contains information about where an extension is activated.
358
+ */
359
+ interface ExtensionActivation {
360
+ /**
361
+ * The target identifier for the extension activation.
362
+ */
363
+ target: string;
364
+ }
365
+
366
+ /**
367
+ * Contains the status information for the App's extension.
368
+ * This includes the extension's handle, and activation targets.
369
+ */
370
+ interface ExtensionInfo {
371
+ /**
372
+ * The unique identifier for the extension.
373
+ */
374
+ handle: string;
375
+ /**
376
+ * List of activation records for the extension.
377
+ * Contains information about where the extension is currently activated.
378
+ */
379
+ activations: ExtensionActivation[];
380
+ }
381
+
340
382
  interface Filters {
341
383
  /**
342
384
  * Whether to show hidden resources, referring to products that are not published on any sales channels.
@@ -876,7 +918,7 @@ type ResourceTypes = {
876
918
  collection: Collection;
877
919
  };
878
920
 
879
- type ReviewRequestDeclinedCode = 'mobile-app' | 'already-reviewed' | 'annual-limit-reached' | 'cooldown-period' | 'merchant-ineligible';
921
+ type ReviewRequestDeclinedCode = 'mobile-app' | 'already-reviewed' | 'annual-limit-reached' | 'cooldown-period' | 'merchant-ineligible' | 'recently-installed';
880
922
 
881
923
  interface ReviewRequestDeclinedResponse {
882
924
  success: false;
@@ -1005,6 +1047,7 @@ export interface ShopifyGlobal {
1005
1047
  reviews: ReviewsApi;
1006
1048
  scopes: Scopes;
1007
1049
  picker: PickerApi;
1050
+ app: AppApi;
1008
1051
  }
1009
1052
 
1010
1053
  interface SupportApi {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/app-bridge-types",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Companion types library for the Shopify App Bridge script",
5
5
  "private": false,
6
6
  "publishConfig": {