@shopify/app-bridge-types 0.0.17 → 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 +12 -0
- package/dist/index.d.ts +8 -0
- package/dist/shopify.ts +25 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## 0.0.18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#325](https://github.com/Shopify/extensibility/pull/325) [`dfac2e4a775102b81488155dc4b00c8132988a22`](https://github.com/Shopify/extensibility/commit/dfac2e4a775102b81488155dc4b00c8132988a22) Thanks [@elanalynn](https://github.com/elanalynn)! - Expose ResourcePicker and Toast types
|
|
14
|
+
|
|
3
15
|
## 0.0.17
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ import type {
|
|
|
11
11
|
UINavMenuAttributes,
|
|
12
12
|
UITitleBarAttributes,
|
|
13
13
|
UISaveBarAttributes,
|
|
14
|
+
ToastOptions,
|
|
15
|
+
Product,
|
|
16
|
+
ProductVariant,
|
|
17
|
+
Collection,
|
|
14
18
|
} from './shopify';
|
|
15
19
|
|
|
16
20
|
export {
|
|
@@ -19,6 +23,10 @@ export {
|
|
|
19
23
|
UINavMenuAttributes,
|
|
20
24
|
UITitleBarAttributes,
|
|
21
25
|
UISaveBarAttributes,
|
|
26
|
+
ToastOptions,
|
|
27
|
+
Product,
|
|
28
|
+
ProductVariant,
|
|
29
|
+
Collection,
|
|
22
30
|
};
|
|
23
31
|
|
|
24
32
|
declare global {
|
package/dist/shopify.ts
CHANGED
|
@@ -194,7 +194,7 @@ interface Cart {
|
|
|
194
194
|
*/
|
|
195
195
|
type CartSubscriber = (cart: Cart) => void;
|
|
196
196
|
|
|
197
|
-
interface Collection extends Resource {
|
|
197
|
+
export interface Collection extends Resource {
|
|
198
198
|
availablePublicationCount: number;
|
|
199
199
|
description: string;
|
|
200
200
|
descriptionHtml: string;
|
|
@@ -747,7 +747,7 @@ interface PrivilegedAdminUser extends AdminUser {
|
|
|
747
747
|
email?: string;
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
interface Product extends Resource {
|
|
750
|
+
export interface Product extends Resource {
|
|
751
751
|
availablePublicationCount: number;
|
|
752
752
|
createdAt: string;
|
|
753
753
|
descriptionHtml: string;
|
|
@@ -780,7 +780,7 @@ enum ProductStatus {
|
|
|
780
780
|
Draft = "DRAFT"
|
|
781
781
|
}
|
|
782
782
|
|
|
783
|
-
interface ProductVariant extends Resource {
|
|
783
|
+
export interface ProductVariant extends Resource {
|
|
784
784
|
availableForSale: boolean;
|
|
785
785
|
barcode?: string | null;
|
|
786
786
|
compareAtPrice?: Money | null;
|
|
@@ -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
|
}
|
|
@@ -1015,7 +1036,7 @@ interface ToastApi {
|
|
|
1015
1036
|
|
|
1016
1037
|
type ToastHide = (id: string) => void;
|
|
1017
1038
|
|
|
1018
|
-
interface ToastOptions {
|
|
1039
|
+
export interface ToastOptions {
|
|
1019
1040
|
/**
|
|
1020
1041
|
* The length of time in milliseconds the toast message should persist.
|
|
1021
1042
|
* @defaultValue 5000
|