@shopify/app-bridge-types 0.1.0 → 0.3.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/shopify.ts +58 -23
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#669](https://github.com/Shopify/extensibility/pull/669) [`ad18a376e0e7a4e3921fa8f394d424644eb1f7bc`](https://github.com/Shopify/extensibility/commit/ad18a376e0e7a4e3921fa8f394d424644eb1f7bc) Thanks [@SammyJoeOsborne](https://github.com/SammyJoeOsborne)! - Updating ReviewRequestDeclinedResponse type with new codes: already-open, open-in-progress, and cancelled
|
|
8
|
+
|
|
9
|
+
## 0.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
3
15
|
## 0.1.0
|
|
4
16
|
|
|
5
17
|
### 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
|
|
|
@@ -122,6 +137,7 @@ interface AppBridgeConfig {
|
|
|
122
137
|
export interface AppBridgeElements {
|
|
123
138
|
'ui-modal': UIModalAttributes;
|
|
124
139
|
'ui-nav-menu': UINavMenuAttributes;
|
|
140
|
+
's-app-nav': SAppNavAttributes;
|
|
125
141
|
'ui-save-bar': UISaveBarAttributes;
|
|
126
142
|
'ui-title-bar': UITitleBarAttributes;
|
|
127
143
|
}
|
|
@@ -337,6 +353,33 @@ interface _EnvironmentApi {
|
|
|
337
353
|
pos?: boolean;
|
|
338
354
|
}
|
|
339
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Represents an activation record for an extension.
|
|
358
|
+
* Contains information about where an extension is activated.
|
|
359
|
+
*/
|
|
360
|
+
interface ExtensionActivation {
|
|
361
|
+
/**
|
|
362
|
+
* The target identifier for the extension activation.
|
|
363
|
+
*/
|
|
364
|
+
target: string;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Contains the status information for the app's extension.
|
|
369
|
+
* This includes the extension's handle, and activation targets.
|
|
370
|
+
*/
|
|
371
|
+
interface ExtensionInfo {
|
|
372
|
+
/**
|
|
373
|
+
* The unique identifier for the extension.
|
|
374
|
+
*/
|
|
375
|
+
handle: string;
|
|
376
|
+
/**
|
|
377
|
+
* List of activation records for the extension.
|
|
378
|
+
* Contains information about where the extension is currently activated.
|
|
379
|
+
*/
|
|
380
|
+
activations: ExtensionActivation[];
|
|
381
|
+
}
|
|
382
|
+
|
|
340
383
|
interface Filters {
|
|
341
384
|
/**
|
|
342
385
|
* Whether to show hidden resources, referring to products that are not published on any sales channels.
|
|
@@ -876,7 +919,7 @@ type ResourceTypes = {
|
|
|
876
919
|
collection: Collection;
|
|
877
920
|
};
|
|
878
921
|
|
|
879
|
-
type ReviewRequestDeclinedCode = 'mobile-app' | 'already-reviewed' | 'annual-limit-reached' | 'cooldown-period' | 'merchant-ineligible';
|
|
922
|
+
type ReviewRequestDeclinedCode = 'mobile-app' | 'already-reviewed' | 'annual-limit-reached' | 'cooldown-period' | 'merchant-ineligible' | 'recently-installed' | 'already-open' | 'open-in-progress' | 'cancelled';
|
|
880
923
|
|
|
881
924
|
interface ReviewRequestDeclinedResponse {
|
|
882
925
|
success: false;
|
|
@@ -901,6 +944,13 @@ interface RuleSet {
|
|
|
901
944
|
rules: CollectionRule[];
|
|
902
945
|
}
|
|
903
946
|
|
|
947
|
+
export interface SAppNavAttributes {
|
|
948
|
+
children?: any;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
export interface SAppNavElement extends HTMLElement {
|
|
952
|
+
}
|
|
953
|
+
|
|
904
954
|
interface SaveBarApi extends Required<_SaveBarApi> {
|
|
905
955
|
}
|
|
906
956
|
|
|
@@ -921,9 +971,9 @@ interface _SaveBarApi {
|
|
|
921
971
|
*/
|
|
922
972
|
toggle?(id: string): Promise<void>;
|
|
923
973
|
/**
|
|
924
|
-
*
|
|
974
|
+
* Checks if saveBar is shown. This promise resolves if the save bar is not shown. Uses this method before navigating away from the page only when you have a custom routing that is not anchor tag.
|
|
925
975
|
*/
|
|
926
|
-
leaveConfirmation(): Promise<void>;
|
|
976
|
+
leaveConfirmation?(): Promise<void>;
|
|
927
977
|
}
|
|
928
978
|
|
|
929
979
|
interface ScannerApi {
|
|
@@ -1005,6 +1055,7 @@ export interface ShopifyGlobal {
|
|
|
1005
1055
|
reviews: ReviewsApi;
|
|
1006
1056
|
scopes: Scopes;
|
|
1007
1057
|
picker: PickerApi;
|
|
1058
|
+
app: AppApi;
|
|
1008
1059
|
}
|
|
1009
1060
|
|
|
1010
1061
|
interface SupportApi {
|
|
@@ -1150,33 +1201,14 @@ interface UIModalElement_2 extends Omit<HTMLElement, 'addEventListener' | 'remov
|
|
|
1150
1201
|
}
|
|
1151
1202
|
export type { UIModalElement_2 as UIModalElement }
|
|
1152
1203
|
|
|
1153
|
-
export interface UINavMenuAttributes
|
|
1204
|
+
export interface UINavMenuAttributes {
|
|
1154
1205
|
children?: any;
|
|
1155
1206
|
}
|
|
1156
1207
|
|
|
1157
|
-
interface _UINavMenuAttributes {
|
|
1158
|
-
children?: [UINavMenuFirstChild, ...UINavMenuChildren[]];
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
interface UINavMenuChildren {
|
|
1162
|
-
a?: {
|
|
1163
|
-
href: string;
|
|
1164
|
-
children: string;
|
|
1165
|
-
};
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
1208
|
interface UINavMenuElement_2 extends HTMLElement {
|
|
1169
1209
|
}
|
|
1170
1210
|
export type { UINavMenuElement_2 as UINavMenuElement }
|
|
1171
1211
|
|
|
1172
|
-
interface UINavMenuFirstChild {
|
|
1173
|
-
a: {
|
|
1174
|
-
rel: 'home';
|
|
1175
|
-
href: string;
|
|
1176
|
-
children?: string;
|
|
1177
|
-
};
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
1212
|
export interface UISaveBarAttributes extends _UISaveBarAttributes {
|
|
1181
1213
|
children?: any;
|
|
1182
1214
|
}
|
|
@@ -1268,6 +1300,9 @@ interface _UITitleBarAttributes {
|
|
|
1268
1300
|
}
|
|
1269
1301
|
|
|
1270
1302
|
interface UITitleBarChildren {
|
|
1303
|
+
/**
|
|
1304
|
+
* Note that anchor tag elements are not supported in Remix. You can use Remix's `<Link>` component instead.
|
|
1305
|
+
*/
|
|
1271
1306
|
a?: BaseElementAttributes & {
|
|
1272
1307
|
variant?: 'breadcrumb' | 'primary';
|
|
1273
1308
|
};
|