@shopify/app-bridge-types 0.0.18 → 0.1.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.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#518](https://github.com/Shopify/extensibility/pull/518) [`bc1af9034c8cca66ebd7a44474aa7a11de7013e9`](https://github.com/Shopify/extensibility/commit/bc1af9034c8cca66ebd7a44474aa7a11de7013e9) Thanks [@SammyJoeOsborne](https://github.com/SammyJoeOsborne)! - Adding types for reviews plugin api.
8
+
3
9
  ## 0.0.18
4
10
 
5
11
  ### Patch Changes
package/dist/shopify.ts CHANGED
@@ -876,6 +876,26 @@ type ResourceTypes = {
876
876
  collection: Collection;
877
877
  };
878
878
 
879
+ type ReviewRequestDeclinedCode = 'mobile-app' | 'already-reviewed' | 'annual-limit-reached' | 'cooldown-period' | 'merchant-ineligible';
880
+
881
+ interface ReviewRequestDeclinedResponse {
882
+ success: false;
883
+ code: ReviewRequestDeclinedCode;
884
+ message: string;
885
+ }
886
+
887
+ type ReviewRequestResponse = ReviewRequestSuccessResponse | ReviewRequestDeclinedResponse;
888
+
889
+ interface ReviewRequestSuccessResponse {
890
+ success: true;
891
+ code: 'success';
892
+ message: 'Review modal shown successfully';
893
+ }
894
+
895
+ interface ReviewsApi {
896
+ request(): Promise<ReviewRequestResponse>;
897
+ }
898
+
879
899
  interface RuleSet {
880
900
  appliedDisjunctively: boolean;
881
901
  rules: CollectionRule[];
@@ -982,6 +1002,7 @@ export interface ShopifyGlobal {
982
1002
  intents: IntentsApi;
983
1003
  webVitals: WebVitalsApi;
984
1004
  support: SupportApi;
1005
+ reviews: ReviewsApi;
985
1006
  scopes: Scopes;
986
1007
  picker: PickerApi;
987
1008
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/app-bridge-types",
3
- "version": "0.0.18",
3
+ "version": "0.1.0",
4
4
  "description": "Companion types library for the Shopify App Bridge script",
5
5
  "private": false,
6
6
  "publishConfig": {