@wix/create-app 0.0.100 → 0.0.101

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/build/index.js CHANGED
@@ -57083,6 +57083,7 @@ var CliSystemErrorCode = (0, import_variant11.variant)({
57083
57083
  FailedToWriteCache: (0, import_variant11.fields)(),
57084
57084
  UploadApplicationFailed: {},
57085
57085
  FailedToCreateDevCenterApp: {},
57086
+ FailedToAddPermission: {},
57086
57087
  FailedToGetPlacements: {},
57087
57088
  FailedToGetAppSecret: {},
57088
57089
  FailedToCreateTunnel: {},
@@ -66614,6 +66615,9 @@ function getErrorComponent(code, cause) {
66614
66615
  FailedToCreateDevCenterApp: () => {
66615
66616
  return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: "Failed to register your application in Wix" });
66616
66617
  },
66618
+ FailedToAddPermission: () => {
66619
+ return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: "Failed to add permission" });
66620
+ },
66617
66621
  FailedToGetPlacements: () => {
66618
66622
  return () => /* @__PURE__ */ import_react77.default.createElement(SystemErrorMessage, { message: "Failed to get placements" });
66619
66623
  },
@@ -71204,7 +71208,7 @@ function reportCommandStartEvent({
71204
71208
  }
71205
71209
 
71206
71210
  // package.json
71207
- var version = "0.0.100";
71211
+ var version = "0.0.101";
71208
71212
  var package_default = {
71209
71213
  name: "@wix/create-app",
71210
71214
  description: "Create Wix apps",
@@ -77860,6 +77864,64 @@ var DiscountType;
77860
77864
  DiscountType2["PERCENTAGE"] = "PERCENTAGE";
77861
77865
  })(DiscountType || (DiscountType = {}));
77862
77866
 
77867
+ // ../../node_modules/@wix/ambassador-devcenter-apps-v1-app-permission/build/es/http.impl.js
77868
+ init_esm_shims();
77869
+ var _appPermission = {
77870
+ createdDate: "google.protobuf.Timestamp",
77871
+ updatedDate: "google.protobuf.Timestamp"
77872
+ };
77873
+ var _createAppPermissionRequest = { appPermission: "_appPermission" };
77874
+ var _createAppPermissionResponse = { appPermission: "_appPermission" };
77875
+ function resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl(opts) {
77876
+ var domainToMappings = {
77877
+ "dev._base_domain_": [
77878
+ {
77879
+ srcPath: "/app-permissions-service",
77880
+ destPath: ""
77881
+ }
77882
+ ],
77883
+ "manage._base_domain_": [
77884
+ {
77885
+ srcPath: "/_api/app-permissions-service",
77886
+ destPath: ""
77887
+ }
77888
+ ],
77889
+ "www._base_domain_": [
77890
+ {
77891
+ srcPath: "/_api/app-permissions-service",
77892
+ destPath: ""
77893
+ }
77894
+ ]
77895
+ };
77896
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
77897
+ }
77898
+ function createAppPermission(payload5) {
77899
+ var _a3 = serializer(_createAppPermissionRequest, { _appPermission }), toReq = _a3.toJSON, fromReq = _a3.fromJSON;
77900
+ var fromRes = serializer(_createAppPermissionResponse, {
77901
+ _appPermission
77902
+ }).fromJSON;
77903
+ function __createAppPermission(_a4) {
77904
+ var host = _a4.host;
77905
+ var serializedData = toReq(payload5);
77906
+ var metadata = {
77907
+ entityFqdn: "wix.devcenter.apps.v1.app_permission",
77908
+ method: "POST",
77909
+ methodFqn: "wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission",
77910
+ url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({
77911
+ protoPath: "/v1/app-permissions",
77912
+ data: serializedData,
77913
+ host
77914
+ }),
77915
+ data: serializedData,
77916
+ transformResponse: fromRes
77917
+ };
77918
+ return metadata;
77919
+ }
77920
+ __createAppPermission.fromReq = fromReq;
77921
+ __createAppPermission.__isAmbassador = true;
77922
+ return __createAppPermission;
77923
+ }
77924
+
77863
77925
  // ../dev-center-client/src/schemas.ts
77864
77926
  init_esm_shims();
77865
77927
 
@@ -78698,7 +78760,7 @@ var ThumbnailsAlignment2;
78698
78760
  })(ThumbnailsAlignment2 || (ThumbnailsAlignment2 = {}));
78699
78761
  var GIFType;
78700
78762
  (function(GIFType2) {
78701
- GIFType2["GIF"] = "GIF";
78763
+ GIFType2["NORMAL"] = "NORMAL";
78702
78764
  GIFType2["STICKER"] = "STICKER";
78703
78765
  })(GIFType || (GIFType = {}));
78704
78766
  var Source2;
@@ -79826,6 +79888,32 @@ var DevCenterClient = class {
79826
79888
  };
79827
79889
  }
79828
79890
  retryOptions;
79891
+ addPermission = async ({
79892
+ appId,
79893
+ permissionId
79894
+ }) => {
79895
+ try {
79896
+ const { data } = await pRetry(
79897
+ () => this.httpClient.request(
79898
+ createAppPermission({
79899
+ appPermission: {
79900
+ appId,
79901
+ permission: {
79902
+ permissionId
79903
+ }
79904
+ }
79905
+ })
79906
+ ),
79907
+ this.retryOptions
79908
+ );
79909
+ return data;
79910
+ } catch (e2) {
79911
+ throw new CliError({
79912
+ code: CliErrorCode.FailedToAddPermission(),
79913
+ cause: e2
79914
+ });
79915
+ }
79916
+ };
79829
79917
  createApp = async (app) => {
79830
79918
  try {
79831
79919
  const { data } = await pRetry(