Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/app-bridge

Package Overview
Dependencies
Maintainers
13
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/app-bridge - npm Package Compare versions

Comparing version 1.3.1-alpha.2 to 1.3.1-alpha.3

29

actions/Features/actions.d.ts
/**
* @module Features
*/
import { ActionSet } from '../helper';
import { MetaAction } from '../types';
import { ErrorAction } from '../Error';
import { AnyAction } from '../../client';
import { Options, Action, RequestOptions } from './types';
import { AnyAction, ClientApplication } from '../../client';
/**
* @internal
*/
export declare type FeaturesAction = MetaAction | AnyAction;
export declare function update(): FeaturesAction;
export declare function validationError(action: MetaAction): undefined | ErrorAction;
/**
* A set of Actions for Updating, Requesting Features of AppBridge
* @public
*/
export declare class Features extends ActionSet {
constructor(app: ClientApplication<any>, options?: Options);
/**
* @public
*/
dispatch(action: Action.REQUEST, payload: RequestOptions): this;
/**
* @internal
*/
private dispatchFeaturesAction;
}
/**
* @public
*/
export declare function create(app: ClientApplication<any>, options?: Options): Features;

@@ -5,22 +5,69 @@ "use strict";

*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var helper_1 = require("../helper");
var types_1 = require("../types");
var Error_1 = require("../Error");
var types_2 = require("./types");
function update() {
return helper_1.actionWrapper({
group: types_1.Group.Features,
type: types_2.ActionType.UPDATE,
});
}
exports.update = update;
function validationError(action) {
switch (action.type) {
case types_2.ActionType.UPDATE:
return undefined;
default:
return Error_1.invalidActionType(action);
/**
* A set of Actions for Updating, Requesting Features of AppBridge
* @public
*/
var Features = /** @class */ (function (_super) {
__extends(Features, _super);
function Features(app, options) {
return _super.call(this, app, types_1.Group.Features, types_1.Group.Features, options ? options.id : undefined) || this;
}
/**
* @public
*/
Features.prototype.dispatch = function (action, payload) {
switch (action) {
case types_2.Action.REQUEST:
this.dispatchFeaturesAction(types_2.ActionType.REQUEST, payload);
break;
}
return this;
};
/**
* @internal
*/
Features.prototype.dispatchFeaturesAction = function (type, payload) {
this.app.dispatch(helper_1.actionWrapper({
group: types_1.Group.Features,
type: type,
payload: __assign({}, (payload || {}), { id: this.id }),
}));
};
return Features;
}(helper_1.ActionSet));
exports.Features = Features;
/**
* @public
*/
function create(app, options) {
return new Features(app, options);
}
exports.validationError = validationError;
exports.create = create;

@@ -0,9 +1,44 @@

import { Group } from '../types';
import { FeaturesAction } from '../../client';
/**
* @module Features
*/
/**
* Action Types for the Features group
* @public
*/
export declare enum ActionType {
UPDATE = "APP::FEATURES::UPDATE"
UPDATE = "APP::FEATURES::UPDATE",
REQUEST = "APP::FEATURES::REQUEST",
REQUEST_UPDATE = "APP::FEATURES::REQUEST::UPDATE"
}
/**
* Actions available to the Features group
* @public
*/
export declare enum Action {
UPDATE = "UPDATE"
UPDATE = "UPDATE",
REQUEST = "REQUEST",
REQUEST_UPDATE = "REQUEST::UPDATE"
}
/**
* Default options for Feature payloads
* @public
*/
export interface Options {
readonly id?: string;
}
/**
* Payload options for APP::FEATURES::REQUEST
* @public
*/
export interface RequestOptions extends Options {
feature: Group;
}
/**
* Payload options for APP::FEATURES::REQUEST::UPDATE
* @public
*/
export interface RequestUpdateOptions extends Options {
feature: FeaturesAction;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module Features
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Action Types for the Features group
* @public
*/
var ActionType;
(function (ActionType) {
ActionType["UPDATE"] = "APP::FEATURES::UPDATE";
ActionType["REQUEST"] = "APP::FEATURES::REQUEST";
ActionType["REQUEST_UPDATE"] = "APP::FEATURES::REQUEST::UPDATE";
})(ActionType = exports.ActionType || (exports.ActionType = {}));
/**
* Actions available to the Features group
* @public
*/
var Action;
(function (Action) {
Action["UPDATE"] = "UPDATE";
Action["REQUEST"] = "REQUEST";
Action["REQUEST_UPDATE"] = "REQUEST::UPDATE";
})(Action = exports.Action || (exports.Action = {}));

@@ -6,2 +6,13 @@ # Change Log

## [1.3.1-alpha.3](https://github.com/Shopify/app-bridge/compare/v1.3.1-alpha.2...v1.3.1-alpha.3) (2019-05-15)
### Features
* **features request:** added Feature Request Action ([#917](https://github.com/Shopify/app-bridge/issues/917)) ([2124acf](https://github.com/Shopify/app-bridge/commit/2124acf))
## [1.3.1-alpha.2](https://github.com/Shopify/app-bridge/compare/v1.3.1-alpha.1...v1.3.1-alpha.2) (2019-05-10)

@@ -8,0 +19,0 @@

4

package.json
{
"name": "@shopify/app-bridge",
"version": "1.3.1-alpha.2",
"version": "1.3.1-alpha.3",
"types": "index.d.ts",

@@ -53,3 +53,3 @@ "main": "index.js",

},
"gitHead": "446e5cca78faf3615a71db8bd1c4b94de7df1520"
"gitHead": "dad198b0a9b010c07c9e62de21046baadf012d6a"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc