@rnaga/wp-node 1.2.10 → 1.2.11

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.
@@ -8,6 +8,10 @@ export declare class UserSelfRegistrationCrud extends Crud {
8
8
  constructor(components: Components, config: Config, logger: Logger);
9
9
  private checkPermission;
10
10
  private checkEligibility;
11
+ canSignup(): Promise<{
12
+ data: boolean;
13
+ info: undefined;
14
+ }>;
11
15
  update(input: {
12
16
  eligibility: boolean;
13
17
  }, options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"user-self-registration.crud.d.ts","sourceRoot":"","sources":["../../src/crud/user-self-registration.crud.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAOxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,qBACa,wBAAyB,SAAQ,IAAI;IAG9C,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;gBAFd,UAAU,EAAE,UAAU,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM;YAKV,eAAe;YAmBf,gBAAgB;IAQxB,MAAM,CACV,KAAK,EAAE;QACL,WAAW,EAAE,OAAO,CAAC;KACtB,EACD,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;KACZ;;;;IAaR;;;;;;;;OAQG;IACG,yBAAyB,CAAC,IAAI,EAAE;QACpC,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;;;;;;;;;;IA+DK,QAAQ,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;;;;IAapD,QAAQ,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;;;;CAmBzD"}
1
+ {"version":3,"file":"user-self-registration.crud.d.ts","sourceRoot":"","sources":["../../src/crud/user-self-registration.crud.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAOxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,qBACa,wBAAyB,SAAQ,IAAI;IAG9C,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;gBAFd,UAAU,EAAE,UAAU,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM;YAKV,eAAe;YAmBf,gBAAgB;IAQxB,SAAS;;;;IAQT,MAAM,CACV,KAAK,EAAE;QACL,WAAW,EAAE,OAAO,CAAC;KACtB,EACD,OAAO,GAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;KACZ;;;;IAaR;;;;;;;;OAQG;IACG,yBAAyB,CAAC,IAAI,EAAE;QACpC,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;;;;;;;;;;IA+DK,QAAQ,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;;;;IAapD,QAAQ,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;;;;CAczD"}
@@ -84,6 +84,10 @@ let UserSelfRegistrationCrud = class UserSelfRegistrationCrud extends crud_1.Cru
84
84
  throw new error_1.CrudError(error_1.StatusMessage.BAD_REQUEST, "Not allowed");
85
85
  }
86
86
  }
87
+ async canSignup() {
88
+ const userSelfRegistrationUtil = this.components.get(user_self_registration_util_1.UserSelfRegistrationUtil);
89
+ return this.returnValue(await userSelfRegistrationUtil.canSignup());
90
+ }
87
91
  async update(input, options = {}) {
88
92
  await this.checkPermission(options.siteId);
89
93
  const userSelfRegistrationUtil = this.components.get(user_self_registration_util_1.UserSelfRegistrationUtil);
@@ -155,13 +159,8 @@ let UserSelfRegistrationCrud = class UserSelfRegistrationCrud extends crud_1.Cru
155
159
  const { key: activationKey, user_login: userLogin } = args;
156
160
  const userSelfRegistrationUtil = this.components.get(user_self_registration_util_1.UserSelfRegistrationUtil);
157
161
  await this.checkEligibility(userSelfRegistrationUtil);
158
- //try {
159
162
  const result = await userSelfRegistrationUtil.activate(activationKey, userLogin);
160
163
  return this.returnValue(result);
161
- // } catch (e) {
162
- // this.logger.error(String(e));
163
- // throw new CrudError(StatusMessage.BAD_REQUEST, String(e));
164
- // }
165
164
  }
166
165
  };
167
166
  exports.UserSelfRegistrationCrud = UserSelfRegistrationCrud;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnaga/wp-node",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && tsc --project tsconfig.build.json && npm run copyfiles && cp package.json ./dist/",