@nocobase/plugin-verification 2.1.0-beta.35 → 2.1.0-beta.37

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.
Files changed (31) hide show
  1. package/client-v2.d.ts +2 -0
  2. package/client-v2.js +1 -0
  3. package/dist/client-v2/190.596918843af85477.js +10 -0
  4. package/dist/client-v2/290.a651bc7c42fc98bc.js +10 -0
  5. package/dist/client-v2/548.eb3ed70d62d68d60.js +10 -0
  6. package/dist/client-v2/81.b8599d97bf4ca2a8.js +10 -0
  7. package/dist/client-v2/934.a3c0fa32883528e4.js +10 -0
  8. package/dist/client-v2/973.8a85e3793371482b.js +10 -0
  9. package/dist/client-v2/components/VerificationCode.d.ts +49 -0
  10. package/dist/client-v2/components/VerifierSelect.d.ts +45 -0
  11. package/dist/client-v2/index.d.ts +19 -0
  12. package/dist/client-v2/index.js +10 -0
  13. package/dist/client-v2/locale.d.ts +17 -0
  14. package/dist/client-v2/otp-sms-provider-manager.d.ts +35 -0
  15. package/dist/client-v2/otp-verification/sms/AdminSettingsForm.d.ts +21 -0
  16. package/dist/client-v2/otp-verification/sms/BindForm.d.ts +18 -0
  17. package/dist/client-v2/otp-verification/sms/VerificationForm.d.ts +18 -0
  18. package/dist/client-v2/otp-verification/sms/index.d.ts +25 -0
  19. package/dist/client-v2/otp-verification/sms/providers/AliyunSettings.d.ts +17 -0
  20. package/dist/client-v2/otp-verification/sms/providers/TencentSettings.d.ts +17 -0
  21. package/dist/client-v2/pages/VerifiersPage.d.ts +61 -0
  22. package/dist/client-v2/plugin.d.ts +25 -0
  23. package/dist/client-v2/user-center/MyVerifiers.d.ts +19 -0
  24. package/dist/client-v2/user-center/VerificationUserCenterItemModel.d.ts +29 -0
  25. package/dist/client-v2/verification-manager.d.ts +49 -0
  26. package/dist/externalVersion.js +9 -6
  27. package/dist/node_modules/@alicloud/dysmsapi20170525/package.json +1 -1
  28. package/dist/node_modules/@alicloud/openapi-client/package.json +1 -1
  29. package/dist/node_modules/@alicloud/tea-util/package.json +1 -1
  30. package/dist/node_modules/tencentcloud-sdk-nodejs-sms/package.json +1 -1
  31. package/package.json +4 -2
package/client-v2.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/client-v2';
2
+ export { default } from './dist/client-v2';
package/client-v2.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client-v2/index.js');
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_verification_client_v2=self.webpackChunk_nocobase_plugin_verification_client_v2||[]).push([["190"],{653:function(e,n,i){i.r(n),i.d(n,{VerificationForm:function(){return l}});var r=i(59),t=i(155),a=i.n(t),o=i(17),u=i(488);function l(e){var n=e.verifier,i=e.actionType,t=e.boundInfo,l=e.isLogged,c=(0,u.Au)().t,s=r.Form.useFormInstance(),m=r.Form.useWatch("uuid",s),d=!!(null==t?void 0:t.publicInfo);return a().createElement(a().Fragment,null,a().createElement(r.Form.Item,{name:"uuid",label:c("Phone"),rules:[{required:!0,message:c("Please enter a phone number")}],initialValue:null==t?void 0:t.publicInfo},a().createElement(r.Input,{disabled:d})),a().createElement(r.Form.Item,{name:"code",label:c("Verification code"),rules:[{required:!0,message:c("Please enter the verification code")}]},a().createElement(o.n,{actionType:i,verifier:n,phone:m,isLogged:l})))}n.default=l}}]);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_verification_client_v2=self.webpackChunk_nocobase_plugin_verification_client_v2||[]).push([["290"],{289:function(e,t,n){n.r(t),n.d(t,{default:function(){return S},recursiveTrim:function(){return w},submitVerifierForm:function(){return E}});var r=n(375),i=n(485),o=n(694),a=n(625),u=n(59),l=n(773),c=n(155),s=n.n(c),f=n(488),m=n(373);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,i)}function y(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){p(o,r,i,a,u,"next",e)}function u(e){p(o,r,i,a,u,"throw",e)}a(void 0)})}}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function v(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,u=!1;try{for(i=i.call(e);!(a=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==i.return||i.return()}finally{if(u)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function w(e){return"string"==typeof e?e.trim():Array.isArray(e)?e.map(function(e){return w(e)}):e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"?Object.fromEntries(Object.entries(e).map(function(e){var t=h(e,2);return[t[0],w(t[1])]})):e}function E(e){return y(function(){var t,n,r;return g(this,function(i){switch(i.label){case 0:if(n=w(e.raw.options||{}),"create"!==e.mode)return[3,2];return[4,e.resource.create({values:v(b({},e.raw),{options:n})})];case 1:case 3:return i.sent(),e.onSubmitted(),[2];case 2:if((null==(t=e.record)?void 0:t.name)==null)return[3,4];return r=v(b({},(0,l.cloneDeep)(e.record),e.raw),{options:b({},e.record.options||{},n)}),[4,e.resource.update({filterByTk:e.record.name,values:r})];case 4:throw Error("Edit mode requires record.name; got ".concat(JSON.stringify(e.record)))}})})()}function O(){return(0,o.useFlowContext)().api.resource("verifiers")}function A(e){var t,n=(0,f.Au)().t,r=(0,f.kj)(),d=(0,i.useApp)().pm.get(m.A),p=O(),b=h(u.Form.useForm(),1)[0],v=h((0,c.useState)(!1),2),w=v[0],A=v[1],S=(0,c.useMemo)(function(){return e.verificationTypeOptions.map(function(e){return{value:e.name,label:r(e.title||e.name)}})},[e.verificationTypeOptions,r]),T=(0,c.useMemo)(function(){return"edit"===e.mode?(0,l.cloneDeep)(e.record||{}):{name:(0,o.randomId)("v_"),verificationType:e.verificationType,options:{}}},[e.mode,e.record,e.verificationType]);(0,c.useEffect)(function(){b.setFieldsValue(T)},[b,T]);var j=(0,c.useMemo)(function(){var t,n,r=null==d||null==(n=d.verificationManager.getVerification(e.verificationType))||null==(t=n.components)?void 0:t.AdminSettingsFormLoader;return r?(0,c.lazy)(r):null},[d,e.verificationType]),k=(0,a.useMemoizedFn)(function(){return y(function(){var t;return g(this,function(n){switch(n.label){case 0:return[4,b.validateFields()];case 1:t=n.sent(),A(!0),n.label=2;case 2:return n.trys.push([2,,4,5]),[4,E({raw:t,mode:e.mode,record:e.record,resource:p,onSubmitted:e.onSubmitted})];case 3:return n.sent(),[3,5];case 4:return A(!1),[7];case 5:return[2]}})})()});return s().createElement(i.DrawerFormLayout,{title:n("create"===e.mode?"Add new":"Edit"),onSubmit:k,submitting:w,submitText:n("Submit"),cancelText:n("Cancel")},s().createElement(u.Form,{form:b,layout:"vertical",initialValues:T},s().createElement(u.Form.Item,{name:"name",label:n("UID"),rules:[{required:!0,message:n("Please enter a UID")},{pattern:/^[a-zA-Z0-9_-]+$/,message:n("a-z, A-Z, 0-9, _, -")}]},s().createElement(u.Input,{disabled:"edit"===e.mode})),s().createElement(u.Form.Item,{name:"title",label:n("Title")},s().createElement(u.Input,null)),s().createElement(u.Form.Item,{name:"description",label:n("Description")},s().createElement(u.Input.TextArea,null)),s().createElement(u.Form.Item,{name:"verificationType",hidden:!0},s().createElement(u.Input,null)),"edit"===e.mode?s().createElement(u.Form.Item,{label:n("Verification type")},s().createElement(u.Tag,null,null==(t=S.find(function(t){return t.value===e.verificationType}))?void 0:t.label)):null,j?s().createElement(c.Suspense,{fallback:null},s().createElement(j,null)):null))}function S(){var e,t=(0,f.Au)().t,n=(0,f.kj)(),l=(0,o.useFlowContext)(),m=u.theme.useToken().token,d=u.App.useApp().modal,p=O(),b=h((0,c.useState)(1),2),v=b[0],w=b[1],E=h((0,c.useState)([]),2),S=E[0],T=E[1],j=(e=O(),(0,a.useRequest)(function(){return y(function(){var t,n,r;return g(this,function(i){switch(i.label){case 0:return[4,e.listTypes()];case 1:return[2,Array.isArray(r=Array.isArray(n=null==(t=i.sent())?void 0:t.data)?n:null==n?void 0:n.data)?r:[]]}})})()},{cacheKey:"@nocobase/plugin-verification:verifiers:listTypes"})).data,k=(0,c.useMemo)(function(){return j||[]},[j]),I=(0,a.useRequest)(function(){return y(function(){return g(this,function(e){switch(e.label){case 0:return[4,p.list({page:v,pageSize:50,appends:[]})];case 1:var t,n,r,i,o,a,u,l;return[2,(a=Array.isArray(o=null==(i=null==(t=e.sent())?void 0:t.data)?void 0:i.data)?o:Array.isArray(null==o?void 0:o.data)?o.data:[],u=Array.isArray(o)||null==o?void 0:o.meta,{records:a,total:null!=(n=null!=(r=(l=(null==i?void 0:i.meta)||u||{}).count)?r:l.total)?n:a.length})]}})})()},{refreshDeps:[v]}),D=I.data,F=I.loading,x=I.refresh,P=(0,a.useMemoizedFn)(function(e,t,n){l.viewer.drawer({width:"50%",closable:!0,content:function(){return s().createElement(A,{mode:e,verificationType:t,verificationTypeOptions:k,record:n,onSubmitted:function(){return x()}})}})}),C=(0,a.useMemoizedFn)(function(e){d.confirm({title:t("Delete"),content:t("Are you sure you want to delete it?"),onOk:function(){return y(function(){return g(this,function(t){switch(t.label){case 0:return[4,p.destroy({filterByTk:e})];case 1:return t.sent(),T([]),x(),[2]}})})()}})}),_=(0,a.useMemoizedFn)(function(e){var t=k.find(function(t){return t.name===e});return n((null==t?void 0:t.title)||e||"")}),M=(0,c.useMemo)(function(){return[{title:t("UID"),dataIndex:"name"},{title:t("Title"),dataIndex:"title"},{title:t("Verification type"),dataIndex:"verificationType",render:function(e){return e?s().createElement(u.Tag,null,_(e)):null}},{title:t("Description"),dataIndex:"description"},{title:t("Actions"),width:160,render:function(e,n){return s().createElement(u.Space,null,s().createElement("a",{onClick:function(){n.verificationType&&P("edit",n.verificationType,n)}},t("Edit")),s().createElement("a",{onClick:function(){return null!=n.name&&C(n.name)}},t("Delete")))}}]},[C,P,t,_]);return s().createElement(u.Card,{variant:"borderless"},s().createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:m.marginSM,marginBottom:m.margin}},s().createElement(u.Button,{icon:s().createElement(r.DeleteOutlined,null),disabled:!S.length,onClick:function(){return C(S)}},t("Delete")),s().createElement(u.Dropdown,{menu:{items:k.map(function(e){return{key:e.name,label:n(e.title||e.name)}}),onClick:function(e){P("create",e.key)}},disabled:!k.length},s().createElement(u.Button,{type:"primary",icon:s().createElement(r.PlusOutlined,null)},t("Add new")," ",s().createElement(r.DownOutlined,null)))),s().createElement(i.Table,{rowKey:"name",loading:F,columns:M,dataSource:(null==D?void 0:D.records)||[],rowSelection:{selectedRowKeys:S,onChange:T},pagination:{current:v,pageSize:50,total:(null==D?void 0:D.total)||0,showSizeChanger:!1,onChange:w}}))}}}]);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_verification_client_v2=self.webpackChunk_nocobase_plugin_verification_client_v2||[]).push([["548"],{239:function(e,t,n){n.r(t),n.d(t,{TencentSettings:function(){return m}});var a=n(485),l=n(59),r=n(155),s=n.n(r),i=n(488);function m(){var e=(0,i.Au)().t;return s().createElement(s().Fragment,null,s().createElement(l.Form.Item,{name:["options","settings","secretId"],label:e("Secret Id"),rules:[{required:!0,message:e("Please enter the Secret Id")}]},s().createElement(a.EnvVariableInput,null)),s().createElement(l.Form.Item,{name:["options","settings","secretKey"],label:e("Secret Key"),rules:[{required:!0,message:e("Please enter the Secret Key")}]},s().createElement(a.EnvVariableInput,{password:!0})),s().createElement(l.Form.Item,{name:["options","settings","region"],label:e("Region"),rules:[{required:!0,message:e("Please enter the region")}]},s().createElement(a.EnvVariableInput,null)),s().createElement(l.Form.Item,{name:["options","settings","endpoint"],label:e("Endpoint"),initialValue:"sms.tencentcloudapi.com"},s().createElement(a.EnvVariableInput,null)),s().createElement(l.Form.Item,{name:["options","settings","SignName"],label:e("Sign name")},s().createElement(a.EnvVariableInput,null)),s().createElement(l.Form.Item,{name:["options","settings","SmsSdkAppId"],label:e("Sms sdk app id"),rules:[{required:!0,message:e("Please enter the Sms sdk app id")}]},s().createElement(a.EnvVariableInput,null)),s().createElement(l.Form.Item,{name:["options","settings","TemplateId"],label:e("Template Id"),rules:[{required:!0,message:e("Please enter the Template Id")}]},s().createElement(a.EnvVariableInput,null)))}t.default=m}}]);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_verification_client_v2=self.webpackChunk_nocobase_plugin_verification_client_v2||[]).push([["81"],{560:function(e,r,t){t.r(r),t.d(r,{AdminSettingsForm:function(){return f}});var n=t(485),o=t(694),a=t(59),l=t(155),u=t.n(l),i=t(488),c=t(373);function s(e,r,t,n,o,a,l){try{var u=e[a](l),i=u.value}catch(e){t(e);return}u.done?r(i):Promise.resolve(i).then(n,o)}function f(){var e=(0,i.Au)().t,r=(0,i.kj)(),t=(0,o.useFlowContext)(),f=(0,n.useApp)().pm.get(c.A),p=a.Form.useFormInstance(),v=a.Form.useWatch(["options","provider"],p),m=(0,l.useMemo)(function(){if(!v)return null;var e,r,t=null==f||null==(r=f.smsOTPProviderManager.getProvider(v))||null==(e=r.components)?void 0:e.AdminSettingsFormLoader;return t?(0,l.lazy)(t):null},[f,v]);return u().createElement(u().Fragment,null,u().createElement(a.Form.Item,{name:["options","provider"],label:e("Provider"),rules:[{required:!0,message:e("Please select a provider")}]},u().createElement(n.RemoteSelect,{request:function(){var e;return(e=function(){var e,r,n;return function(e,r){var t,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(l,"next",{value:i(0)}),u(l,"throw",{value:i(1)}),u(l,"return",{value:i(2)}),"function"==typeof Symbol&&u(l,Symbol.iterator,{value:function(){return this}}),l;function i(u){return function(i){var c=[u,i];if(t)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(a=0)),a;)try{if(t=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=r.call(e,a)}catch(e){c=[6,e],n=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return[4,t.api.resource("smsOTPProviders").list()];case 1:return[2,Array.isArray(n=null==(r=o.sent())||null==(e=r.data)?void 0:e.data)?n:[]]}})},function(){var r=this,t=arguments;return new Promise(function(n,o){var a=e.apply(r,t);function l(e){s(a,n,o,l,u,"next",e)}function u(e){s(a,n,o,l,u,"throw",e)}l(void 0)})})()},cacheKey:"@nocobase/plugin-verification:smsOTPProviders:list",mapOptions:function(e){return{label:r(e.title||e.name),value:e.name}}})),m?u().createElement(l.Suspense,{fallback:null},u().createElement(m,null)):null)}r.default=f}}]);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_verification_client_v2=self.webpackChunk_nocobase_plugin_verification_client_v2||[]).push([["934"],{397:function(e,n,r){r.r(n),r.d(n,{BindForm:function(){return c}});var t=r(59),i=r(155),a=r.n(i),o=r(17),u=r(488);function c(e){var n=e.verifier,r=e.actionType,i=e.isLogged,c=(0,u.Au)().t,l=t.Form.useFormInstance(),s=t.Form.useWatch("uuid",l);return a().createElement(a().Fragment,null,a().createElement(t.Form.Item,{name:"uuid",label:c("Phone"),rules:[{required:!0,message:c("Please enter a phone number")}]},a().createElement(t.Input,null)),a().createElement(t.Form.Item,{name:"code",label:c("Verification code"),rules:[{required:!0,message:c("Please enter the verification code")}]},a().createElement(o.n,{actionType:r,verifier:n,phone:s,isLogged:i})))}n.default=c}}]);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_verification_client_v2=self.webpackChunk_nocobase_plugin_verification_client_v2||[]).push([["973"],{708:function(e,t,n){n.r(t),n.d(t,{AliyunSettings:function(){return c}});var s=n(485),a=n(59),l=n(155),r=n.n(l),i=n(488);function c(){var e=(0,i.Au)().t;return r().createElement(r().Fragment,null,r().createElement(a.Form.Item,{name:["options","settings","accessKeyId"],label:e("Access Key ID"),rules:[{required:!0,message:e("Please enter the Access Key ID")}]},r().createElement(s.EnvVariableInput,null)),r().createElement(a.Form.Item,{name:["options","settings","accessKeySecret"],label:e("Access Key Secret"),rules:[{required:!0,message:e("Please enter the Access Key Secret")}]},r().createElement(s.EnvVariableInput,{password:!0})),r().createElement(a.Form.Item,{name:["options","settings","endpoint"],label:e("Endpoint"),rules:[{required:!0,message:e("Please enter the endpoint")}]},r().createElement(s.EnvVariableInput,null)),r().createElement(a.Form.Item,{name:["options","settings","sign"],label:e("Sign"),rules:[{required:!0,message:e("Please enter the sign")}]},r().createElement(s.EnvVariableInput,null)),r().createElement(a.Form.Item,{name:["options","settings","template"],label:e("Template code"),rules:[{required:!0,message:e("Please enter the template code")}]},r().createElement(s.EnvVariableInput,null)))}t.default=c}}]);
@@ -0,0 +1,49 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export interface VerificationCodeProps {
11
+ /** Persisted OTP value. Controlled by the parent `Form.Item`. */
12
+ value?: string;
13
+ onChange?: (next: string) => void;
14
+ /**
15
+ * Server-side action the OTP grants (e.g. `auth:signIn`,
16
+ * `verifiers:bind`, `twoFactorAuth:verify`). Forwarded to the
17
+ * `smsOTP:*` endpoint so the OTP is bound to a specific action.
18
+ */
19
+ actionType: string;
20
+ /** Verifier name (a row in the `verifiers` collection). */
21
+ verifier: string;
22
+ /**
23
+ * The phone number the OTP is sent to. Parent reads it via
24
+ * `Form.useWatch('uuid', form)` and forwards it here. Required at send
25
+ * time — the send button is disabled until it has a value.
26
+ */
27
+ phone?: string;
28
+ /**
29
+ * Whether the user is already signed in. Drives the choice between
30
+ * `smsOTP:create` (logged-in) and `smsOTP:publicCreate` (anonymous).
31
+ * Defaults to `false` (anonymous).
32
+ */
33
+ isLogged?: boolean;
34
+ disabled?: boolean;
35
+ placeholder?: string;
36
+ }
37
+ /**
38
+ * Verification-code input + "Send code / Retry in N s" button pair.
39
+ *
40
+ * Rewrite of v1's `VerificationCode`:
41
+ * - No `withDynamicSchemaProps`, no `useForm()` — the parent owns the
42
+ * phone value via `Form.useWatch` and passes it in as a prop.
43
+ * - Countdown starts from the server-reported `expiresAt` so the UI
44
+ * tracks the same window the server enforces.
45
+ * - Clearing the code on resend matches v1 behaviour so the user has
46
+ * to type the new code rather than reusing the stale one.
47
+ */
48
+ export declare function VerificationCode(props: VerificationCodeProps): React.JSX.Element;
49
+ export default VerificationCode;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export interface VerifierSelectProps {
11
+ /**
12
+ * Verification scene name passed to `verifiers:listByScene`. Each
13
+ * consumer plugin uses its own scene (e.g. `auth-sms`, `two-factor`,
14
+ * `unbind-verifier`) so different scenes can opt different verifier
15
+ * types in or out via server config.
16
+ */
17
+ scene: string;
18
+ value?: string | string[];
19
+ onChange?: (next: string | string[]) => void;
20
+ /** Default false. */
21
+ multiple?: boolean;
22
+ placeholder?: string;
23
+ disabled?: boolean;
24
+ /**
25
+ * antd `Select` style passthrough. Keep this open in case a caller
26
+ * needs to size the dropdown explicitly inside a constrained form.
27
+ */
28
+ style?: React.CSSProperties;
29
+ /**
30
+ * Suppress the helper text rendered under the Select. Defaults to
31
+ * `false`; pass `true` when the caller wants to host its own hint
32
+ * (e.g. inside a `Form.Item.extra` slot).
33
+ */
34
+ hideHint?: boolean;
35
+ }
36
+ /**
37
+ * Domain wrapper around the framework-level `RemoteSelect`. Loads the
38
+ * verifiers configured for `scene` from `/verifiers:listByScene` and
39
+ * binds them to a single- or multi-select. The helper text underneath
40
+ * mirrors the v1 affordance: a list of available verifier types and a
41
+ * deep link into the admin settings page. The list of available types
42
+ * comes from the same response, so no extra request is needed.
43
+ */
44
+ export declare function VerifierSelect(props: VerifierSelectProps): React.JSX.Element;
45
+ export default VerifierSelect;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export { PROVIDER_TYPE_SMS_ALIYUN, PROVIDER_TYPE_SMS_TENCENT, SMS_OTP_VERIFICATION_TYPE } from '../constants';
10
+ export { default, PluginVerificationClientV2 } from './plugin';
11
+ export { NAMESPACE, useT, useVerificationTranslation } from './locale';
12
+ export { VerificationManager } from './verification-manager';
13
+ export type { BindFormProps, VerificationFormProps, VerificationTypeOptions } from './verification-manager';
14
+ export { SMSOTPProviderManager } from './otp-sms-provider-manager';
15
+ export type { SMSOTPProviderOptions } from './otp-sms-provider-manager';
16
+ export { VerifierSelect } from './components/VerifierSelect';
17
+ export type { VerifierSelectProps } from './components/VerifierSelect';
18
+ export { VerificationCode } from './components/VerificationCode';
19
+ export type { VerificationCodeProps } from './components/VerificationCode';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("react-router-dom"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):"function"==typeof define&&define.amd?define("@nocobase/plugin-verification/client-v2",["ahooks","react-i18next","@nocobase/client-v2","react-router-dom","react","antd","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client","lodash"],t):"object"==typeof exports?exports["@nocobase/plugin-verification/client-v2"]=t(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("react-router-dom"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):e["@nocobase/plugin-verification/client-v2"]=t(e.ahooks,e["react-i18next"],e["@nocobase/client-v2"],e["react-router-dom"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e.lodash)}(self,function(e,t,n,r,o,i,a,u,c,l){return function(){"use strict";var s,f,p,v={17:function(e,t,n){n.d(t,{n:function(){return f}});var r=n(694),o=n(625),i=n(59),a=n(155),u=n.n(a),c=n(488);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){n(e);return}u.done?t(c):Promise.resolve(c).then(r,o)}function f(e){var t,n=e.value,f=e.onChange,p=e.actionType,v=e.verifier,d=e.phone,b=e.isLogged,y=e.disabled,h=e.placeholder,m=(0,c.Au)().t,g=(0,r.useFlowContext)(),w=i.App.useApp(),S=w.message,O=w.notification,E=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),k=E[0],x=E[1],P=(0,a.useRef)(null);(0,a.useEffect)(function(){k<=0&&P.current&&(clearInterval(P.current),P.current=null)},[k]),(0,a.useEffect)(function(){return function(){P.current&&(clearInterval(P.current),P.current=null)}},[]);var j=(0,o.useMemoizedFn)(function(){var e;return(e=function(){var e,t,r,o,i,a,u,c,l,s;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(y){switch(y.label){case 0:if(k>0)return[2];if(!d)return S.error(m("Please enter a phone number first")),[2];e=b?"create":"publicCreate",y.label=1;case 1:return y.trys.push([1,3,,4]),[4,g.api.resource("smsOTP")[e]({values:{action:p,verifier:v,uuid:d}})];case 2:return o=(null==(r=y.sent())||null==(t=r.data)?void 0:t.data)||{},S.success(m("Operation succeeded")),n&&(null==f||f("")),x(o.expiresAt?Math.max(1,Math.ceil((Date.parse(o.expiresAt)-Date.now())/1e3)):60),P.current=setInterval(function(){x(function(e){return e-1})},1e3),[3,4];case 3:return s=(null==(i=y.sent())||null==(l=i.response)||null==(c=l.data)||null==(u=c.errors)||null==(a=u[0])?void 0:a.message)||(null==i?void 0:i.message),O.error({message:s||m("Verification send failed, please try later or contact to administrator")}),[3,4];case 4:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){s(i,r,o,a,u,"next",e)}function u(e){s(i,r,o,a,u,"throw",e)}a(void 0)})})()});return u().createElement(i.Space.Compact,{style:{width:"100%"}},u().createElement(i.Input,{value:n,onChange:function(e){return null==f?void 0:f(e.target.value)},disabled:y,placeholder:h}),u().createElement(i.Button,{onClick:j,disabled:y||k>0},k>0?m("Retry after {{count}} seconds",{count:k}):m("Send code")))}},373:function(e,t,n){n.d(t,{A:function(){return D},I:function(){return $}});var r=n(485),o=n(624),i=n(488),a={components:{VerificationFormLoader:function(){return n.e("190").then(n.bind(n,653))},AdminSettingsFormLoader:function(){return n.e("81").then(n.bind(n,560))},BindFormLoader:function(){return n.e("934").then(n.bind(n,397))}}},u={components:{AdminSettingsFormLoader:function(){return n.e("973").then(n.bind(n,708))}}},c={components:{AdminSettingsFormLoader:function(){return n.e("548").then(n.bind(n,239))}}},l=n(261),s=n(155),f=n.n(s),p=n(694),v=n(625),d=n(59);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){n(e);return}u.done?t(c):Promise.resolve(c).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,u,"next",e)}function u(e){y(i,r,o,a,u,"throw",e)}a(void 0)})}}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function S(){var e=new Map;return function(t,n){var r=e.get(t);if(r)return r;var o=(0,s.lazy)(n);return e.set(t,o),o}}var O=S();function E(e){var t,n,o=(0,i.Au)().t,a=(0,i.kj)(),u=(0,p.useFlowContext)(),c=(0,r.useApp)().pm.get(D),l=null==c||null==(n=c.verificationManager.getVerification(e.verifier.verificationType))||null==(t=n.components)?void 0:t.BindFormLoader,b=(0,s.useMemo)(function(){return l?O(e.verifier.verificationType,l):null},[l,e.verifier.verificationType]),y=g(d.Form.useForm(),1)[0],S=g((0,s.useState)(!1),2),E=S[0],k=S[1],x=a(e.verifier.title||"")||o("Bind"),P=(0,v.useMemoizedFn)(function(){return h(function(){var t;return w(this,function(n){switch(n.label){case 0:return[4,y.validateFields()];case 1:t=n.sent(),k(!0),n.label=2;case 2:return n.trys.push([2,,4,5]),[4,u.api.resource("verifiers").bind({values:m({verifier:e.verifier.name},t)})];case 3:return n.sent(),e.onSubmitted(),[3,5];case 4:return k(!1),[7];case 5:return[2]}})})()});return b?f().createElement(r.DialogFormLayout,{title:x,onSubmit:P,submitting:E,submitText:o("Bind"),cancelText:o("Cancel")},f().createElement(d.Form,{form:y,layout:"vertical"},f().createElement(s.Suspense,{fallback:f().createElement(d.Spin,null)},f().createElement(b,{verifier:e.verifier.name,actionType:"verifiers:bind",isLogged:!0})))):f().createElement(r.DialogFormLayout,{title:x,onSubmit:function(){return h(function(){return w(this,function(e){return[2,void 0]})})()},submitText:o("Close"),cancelText:o("Cancel")},f().createElement(d.Alert,{type:"warning",showIcon:!0,message:o("This verifier type ({{type}}) is not yet supported in the new client. Please switch to the legacy client to bind it.",{type:e.verifier.verificationType})}))}var k=S();function x(e){var t,n=(0,i.kj)(),o=(0,i.Au)().t,a=(0,p.useFlowContext)(),u=(0,r.useApp)().pm.get(D),c=null==(t=e.availableVerifiers[0])?void 0:t.name,l=g((0,s.useState)(c),2),b=l[0],y=l[1],S=g(d.Form.useForm(),1)[0],O=g((0,s.useState)(!1),2),E=O[0],x=O[1],P=(0,v.useMemoizedFn)(function(){return h(function(){var t;return w(this,function(n){switch(n.label){case 0:if(!b)return[2];return[4,S.validateFields()];case 1:t=n.sent(),x(!0),n.label=2;case 2:return n.trys.push([2,,4,5]),[4,a.api.resource("verifiers").unbind({values:m({verifier:b,unbindVerifier:e.targetVerifier.name},t)})];case 3:return n.sent(),e.onSubmitted(),[3,5];case 4:return x(!1),[7];case 5:return[2]}})})()}),j=e.availableVerifiers.map(function(e){var t,r,o=null==u||null==(r=u.verificationManager.getVerification(e.verificationType))||null==(t=r.components)?void 0:t.VerificationFormLoader;if(!o)return null;var i=k(e.verificationType,o),a=n(e.title||"")||n(e.verificationTypeTitle||e.verificationType);return{key:e.name,label:a,children:f().createElement(s.Suspense,{fallback:f().createElement(d.Spin,null)},f().createElement(i,{verifier:e.name,actionType:"verifiers:unbind",boundInfo:e.boundInfo,isLogged:!0}))}}).filter(Boolean);return f().createElement(r.DialogFormLayout,{title:o("Unbind verifier"),onSubmit:P,submitting:E,submitText:o("Unbind"),cancelText:o("Cancel")},f().createElement(d.Form,{form:S,layout:"vertical"},j.length?f().createElement(d.Tabs,{activeKey:b,onChange:function(e){S.resetFields(),y(e)},destroyInactiveTabPane:!0,items:j}):f().createElement("span",null,o("No verifier available to verify your identity."))))}function P(e){var t,n=(0,i.Au)().t,r=(0,p.useFlowContext)(),o=!!(null==(t=e.verifier.boundInfo)?void 0:t.bound),a=(0,v.useMemoizedFn)(function(){r.viewer.dialog({closable:!0,content:function(){return f().createElement(E,{verifier:e.verifier,onSubmitted:function(){return e.onChanged()}})}})}),u=(0,v.useMemoizedFn)(function(){return h(function(){var t,n,o;return w(this,function(i){switch(i.label){case 0:return[4,r.api.resource("verifiers").listForVerify({scene:"unbind-verifier"})];case 1:return o=(null==(n=i.sent())||null==(t=n.data)?void 0:t.data)||[],r.viewer.dialog({closable:!0,content:function(){return f().createElement(x,{targetVerifier:e.verifier,availableVerifiers:o,onSubmitted:function(){return e.onChanged()}})}}),[2]}})})()});return o?f().createElement("a",{onClick:u},n("Unbind")):f().createElement("a",{onClick:a},n("Bind"))}function j(){var e=(0,i.kj)(),t=(0,i.Au)().t,n=(0,p.useFlowContext)(),r=d.App.useApp().message,o=(0,v.useRequest)(function(){return h(function(){var e,t;return w(this,function(r){switch(r.label){case 0:return[4,n.api.resource("verifiers").listByUser()];case 1:return[2,(null==(t=r.sent())||null==(e=t.data)?void 0:e.data)||[]]}})})()}),a=o.data,u=o.loading,c=o.refresh,l=(0,v.useMemoizedFn)(function(){c(),r.success(t("Operation succeeded"))});return u?f().createElement(d.Spin,null):f().createElement(d.List,{bordered:!0,dataSource:a||[],renderItem:function(n){var r,o;return f().createElement(d.List.Item,{actions:[f().createElement(P,{key:"action",verifier:n,onChanged:l})]},f().createElement(d.List.Item.Meta,{title:f().createElement(f().Fragment,null,e(n.title||"")," ",(null==(r=n.boundInfo)?void 0:r.bound)?f().createElement(d.Tag,{color:"success"},t("Configured")):f().createElement(d.Tag,{color:"warning"},t("Not configured"))),description:e(n.description||"")}),f().createElement("div",null,null==(o=n.boundInfo)?void 0:o.publicInfo))}})}function T(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){n(e);return}u.done?t(c):Promise.resolve(c).then(r,o)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}var M=[i.CU,"client"],F=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=_(t),C(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,I()?Reflect.construct(t,r||[],_(this).constructor):t.apply(this,r)),"section","profile"),C(e,"sort",150),C(e,"label","Verification"),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&A(n,e),t=[{key:"getLabelNode",value:function(){return this.context.t("Verification",{ns:M,nsMode:"fallback"})}},{key:"onClick",value:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){return this.context.viewer.drawer({title:this.context.t("Verification",{ns:M,nsMode:"fallback"}),width:"50%",closable:!0,content:function(){return f().createElement(j,null)}}),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){T(i,r,o,a,u,"next",e)}function u(e){T(i,r,o,a,u,"throw",e)}a(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(r.UserCenterActionItemModel);C(F,"itemId","verification");var V=n(319);function q(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){n(e);return}u.done?t(c):Promise.resolve(c).then(r,o)}function L(e,t,n){return(L=z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&B(o,n.prototype),o}).apply(null,arguments)}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t="function"==typeof Map?new Map:void 0;return(N=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return L(e,arguments,U(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),B(n,e)})(e)}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(z=function(){return!!e})()}var $=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=U(t),R(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,z()?Reflect.construct(t,n||[],U(this).constructor):t.apply(this,n)),"verificationManager",new V.X),R(e,"smsOTPProviderManager",new l.X),e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&B(r,e),t=[{key:"load",value:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){return this.app.flowEngine.registerModels({VerificationUserCenterItemModel:F}),this.registerSettingsPages(),this.verificationManager.registerVerificationType(o.Fz,a),this.smsOTPProviderManager.registerProvider(o.ob,u),this.smsOTPProviderManager.registerProvider(o.Zs,c),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){q(i,r,o,a,u,"next",e)}function u(e){q(i,r,o,a,u,"throw",e)}a(void 0)})}).call(this)}},{key:"registerSettingsPages",value:function(){var e=this,t=function(t){return e.app.i18n.t(t,{ns:i.CU})};this.pluginSettingsManager.addMenuItem({key:i.CU,title:t("Verification"),icon:"CheckCircleOutlined",aclSnippet:"pm.verification"}),this.pluginSettingsManager.addPageTabItem({menuKey:i.CU,key:"index",title:t("Verifiers"),icon:"CheckCircleOutlined",aclSnippet:"pm.verification.verifiers",sort:1,componentLoader:function(){return n.e("290").then(n.bind(n,289))}})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,t),r}(N(r.Plugin)),D=$},488:function(e,t,n){n.d(t,{Au:function(){return a},CU:function(){return i},kj:function(){return u}});var r=n(694),o=n(953),i="verification";function a(){return(0,o.useTranslation)([i,"client"],{nsMode:"fallback"})}function u(){var e=(0,r.useFlowEngine)();return function(t){return e.context.t(t,{ns:[i,"client"],nsMode:"fallback"})}}},261:function(e,t,n){n.d(t,{X:function(){return o}});var r=n(768),o=function(){var e;function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e="providers",n=new r.Registry,e in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n}return e=[{key:"registerProvider",value:function(e,t){this.providers.register(e,t)}},{key:"getProvider",value:function(e){return this.providers.get(e)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}()},319:function(e,t,n){n.d(t,{X:function(){return o}});var r=n(768),o=function(){var e;function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e="verifications",n=new r.Registry,e in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n}return e=[{key:"registerVerificationType",value:function(e,t){this.verifications.register(e,t)}},{key:"getVerification",value:function(e){return this.verifications.get(e)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}()},624:function(e,t,n){n.d(t,{Fz:function(){return r},Zs:function(){return i},ob:function(){return o}});var r="sms-otp",o="sms-aliyun",i="sms-tencent"},375:function(e){e.exports=a},485:function(e){e.exports=n},694:function(e){e.exports=u},768:function(e){e.exports=c},625:function(t){t.exports=e},59:function(e){e.exports=i},773:function(e){e.exports=l},155:function(e){e.exports=o},953:function(e){e.exports=t},442:function(e){e.exports=r}},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return v[e](n,n.exports,b),n.exports}b.m=v,b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return""+e+"."+({190:"596918843af85477",290:"a651bc7c42fc98bc",548:"eb3ed70d62d68d60",81:"b8599d97bf4ca2a8",934:"a3c0fa32883528e4",973:"8a85e3793371482b"})[e]+".js"},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},y={},b.l=function(e,t,n,r){if(y[e])return void y[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var c=a[u];if(c.getAttribute("src")==e||c.getAttribute("data-rspack")=="@nocobase/plugin-verification/client-v2:"+n){o=c;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,b.nc&&o.setAttribute("nonce",b.nc),o.setAttribute("data-rspack","@nocobase/plugin-verification/client-v2:"+n),o.src=e),y[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=y[e];if(delete y[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},b.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.g.importScripts&&(h=b.g.location+"");var y,h,m=b.g.document;if(!h&&m&&(m.currentScript&&"SCRIPT"===m.currentScript.tagName.toUpperCase()&&(h=m.currentScript.src),!h)){var g=m.getElementsByTagName("script");if(g.length)for(var w=g.length-1;w>-1&&(!h||!/^http(s?):/.test(h));)h=g[w--].src}if(!h)throw Error("Automatic publicPath is not supported in this browser");b.p=h.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s={889:0},b.f.j=function(e,t){var n=b.o(s,e)?s[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=s[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),i=Error();b.l(o,function(t){if(b.o(s,e)&&(0!==(n=s[e])&&(s[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},f=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],u=0;if(o.some(function(e){return 0!==s[e]})){for(n in i)b.o(i,n)&&(b.m[n]=i[n]);a&&a(b)}for(e&&e(t);u<o.length;u++)r=o[u],b.o(s,r)&&s[r]&&s[r][0](),s[r]=0},(p=self.webpackChunk_nocobase_plugin_verification_client_v2=self.webpackChunk_nocobase_plugin_verification_client_v2||[]).forEach(f.bind(null,0)),p.push=f.bind(null,p.push.bind(p));var S={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-verification/dist/client-v2/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",o=r.indexOf("/v2/");e=o>=0?r.slice(0,o+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-verification/dist/client-v2/"}b.p=e}(),!function(){b.r(S),b.d(S,{VerificationManager:function(){return r.X},default:function(){return t.A},SMS_OTP_VERIFICATION_TYPE:function(){return e.Fz},PROVIDER_TYPE_SMS_ALIYUN:function(){return e.ob},useT:function(){return n.kj},VerifierSelect:function(){return v},VerificationCode:function(){return d.n},NAMESPACE:function(){return n.CU},SMSOTPProviderManager:function(){return o.X},PROVIDER_TYPE_SMS_TENCENT:function(){return e.Zs},PluginVerificationClientV2:function(){return t.I},useVerificationTranslation:function(){return n.Au}});var e=b(624),t=b(373),n=b(488),r=b(319),o=b(261),i=b(485),a=b(694),u=b(59),c=b(155),l=b.n(c),s=b(442);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){n(e);return}u.done?t(c):Promise.resolve(c).then(r,o)}function v(e){var t,r=e.scene,o=e.value,v=e.onChange,d=e.multiple,b=e.placeholder,y=e.disabled,h=e.style,m=e.hideHint,g=(0,n.Au)().t,w=(0,n.kj)(),S=(0,a.useFlowContext)(),O=(0,c.useMemo)(function(){return"@nocobase/plugin-verification:verifiers:listByScene:".concat(r)},[r]),E=function(e){if(Array.isArray(e))return e}(t=(0,c.useState)([]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return f(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),k=E[0],x=E[1];return l().createElement(l().Fragment,null,l().createElement(i.RemoteSelect,{request:function(){var e;return(e=function(){var e,t,n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:c(0)}),u(a,"throw",{value:c(1)}),u(a,"return",{value:c(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function c(u){return function(c){var l=[u,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return[4,S.api.resource("verifiers").listByScene({scene:r})];case 1:return[2,null!=(e=null==(n=o.sent())||null==(t=n.data)?void 0:t.data)?e:{}]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,u,"next",e)}function u(e){p(i,r,o,a,u,"throw",e)}a(void 0)})})()},selectItems:function(e){return(null==e?void 0:e.verifiers)||[]},onLoaded:function(e,t){x(((null==t?void 0:t.availableTypes)||[]).map(function(e){return w(e.title||e.name)}))},cacheKey:O,refreshDeps:[r],mapOptions:function(e){return{label:w(e.title||e.name),value:e.name}},mode:d?"multiple":void 0,value:o,onChange:v,placeholder:b,disabled:y,style:h}),m?null:l().createElement(u.Typography.Text,{type:"secondary"},g("The following types of verifiers are available:")," ",k.join(", "),". ",g("Go to")," ",l().createElement(s.Link,{to:"/admin/settings/verification"},g("create verifiers"))))}var d=b(17)}(),S}()});
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const NAMESPACE = "verification";
10
+ export declare function useVerificationTranslation(): import("react-i18next").UseTranslationResponse<("verification" | "client")[], undefined>;
11
+ /**
12
+ * v2-style translator. Routes through `flowEngine.context.t`, which natively
13
+ * expands legacy Formily Schema templates (e.g. `{{t("Phone")}}`) — useful
14
+ * when the value comes from a server payload that still contains the
15
+ * `{{t("…")}}` wrapper.
16
+ */
17
+ export declare function useT(): (key: string) => string;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import type { ComponentType } from 'react';
10
+ type LoaderOf<P = Record<string, never>> = () => Promise<{
11
+ default: ComponentType<P>;
12
+ }>;
13
+ export type SMSOTPProviderOptions = {
14
+ components: {
15
+ /**
16
+ * Loader for the provider-specific admin-settings form. Stored as an
17
+ * async `() => import(...)` so third-party SMS providers contributed
18
+ * via `registerProvider()` come in as their own webpack chunk,
19
+ * fetched only when the corresponding provider is picked in the
20
+ * verifier configuration drawer.
21
+ */
22
+ AdminSettingsFormLoader: LoaderOf;
23
+ };
24
+ };
25
+ /**
26
+ * Registry of SMS OTP providers (Aliyun, Tencent, …). Each entry only
27
+ * needs to contribute its admin settings form — the runtime side is
28
+ * handled server-side.
29
+ */
30
+ export declare class SMSOTPProviderManager {
31
+ providers: any;
32
+ registerProvider(type: string, options: SMSOTPProviderOptions): void;
33
+ getProvider(type: string): any;
34
+ }
35
+ export {};
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ /**
11
+ * Admin settings form for an SMS-OTP verifier:
12
+ * 1. `options.provider` selects which configured SMS provider (Aliyun /
13
+ * Tencent / …) sends the OTP. The list is the server resource
14
+ * `smsOTPProviders:list`.
15
+ * 2. `options.settings.*` is the provider-specific configuration form,
16
+ * looked up from the plugin's `smsOTPProviderManager` at runtime so
17
+ * third-party providers contributed via `registerProvider()` slot in
18
+ * automatically.
19
+ */
20
+ export declare function AdminSettingsForm(): React.JSX.Element;
21
+ export default AdminSettingsForm;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import type { BindFormProps } from '../../verification-manager';
11
+ /**
12
+ * SMS-OTP bind form. Same shape as `VerificationForm` minus the bound
13
+ * publicInfo path — when binding, the user is always typing in a new
14
+ * phone number. Hosted inside the parent `<Form>` so `uuid` / `code`
15
+ * land on the parent's `form.values`.
16
+ */
17
+ export declare function BindForm(props: BindFormProps): React.JSX.Element;
18
+ export default BindForm;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import type { VerificationFormProps } from '../../verification-manager';
11
+ /**
12
+ * SMS-OTP verify form: phone number (read-only when bound) + verification
13
+ * code field paired with a "send code" button. Hosted inside a parent
14
+ * `<Form>` — antd Form.Item paths land on `uuid` (phone) and `code`,
15
+ * matching the v1 schema so server-side handlers are unchanged.
16
+ */
17
+ export declare function VerificationForm(props: VerificationFormProps): React.JSX.Element;
18
+ export default VerificationForm;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const smsOTPVerificationOptions: {
10
+ components: {
11
+ VerificationFormLoader: () => Promise<typeof import("./VerificationForm")>;
12
+ AdminSettingsFormLoader: () => Promise<typeof import("./AdminSettingsForm")>;
13
+ BindFormLoader: () => Promise<typeof import("./BindForm")>;
14
+ };
15
+ };
16
+ export declare const smsAliyunProviderOptions: {
17
+ components: {
18
+ AdminSettingsFormLoader: () => Promise<typeof import("./providers/AliyunSettings")>;
19
+ };
20
+ };
21
+ export declare const smsTencentProviderOptions: {
22
+ components: {
23
+ AdminSettingsFormLoader: () => Promise<typeof import("./providers/TencentSettings")>;
24
+ };
25
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ /**
11
+ * Aliyun SMS provider settings. Field names match the v1 schema 1:1, so
12
+ * the persisted shape on the server is unchanged. Each value can be a
13
+ * literal credential or an `{{ $env.X }}` reference; secret fields use
14
+ * `EnvVariableInput`'s `password` mode to mask non-variable values.
15
+ */
16
+ export declare function AliyunSettings(): React.JSX.Element;
17
+ export default AliyunSettings;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ /**
11
+ * Tencent SMS provider settings. Mirror of v1 schema; persisted payload
12
+ * keys are unchanged. Secret credentials use `EnvVariableInput`'s
13
+ * `password` mode so literal values are masked but `{{ $env.X }}`
14
+ * references stay editable through the picker.
15
+ */
16
+ export declare function TencentSettings(): React.JSX.Element;
17
+ export default TencentSettings;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export type VerifierOptions = Record<string, unknown>;
11
+ export type VerifierRecord = {
12
+ name?: string;
13
+ title?: string | null;
14
+ description?: string | null;
15
+ verificationType?: string;
16
+ options?: VerifierOptions;
17
+ };
18
+ export type VerifierFormValues = {
19
+ name?: string;
20
+ title?: string | null;
21
+ description?: string | null;
22
+ verificationType?: string;
23
+ options?: VerifierOptions;
24
+ };
25
+ export declare function recursiveTrim<T>(value: T): T;
26
+ /**
27
+ * Submit pipeline for the create/edit verifier drawer.
28
+ *
29
+ * Extracted from the React component so the request layer can be tested
30
+ * directly without spinning up the full FlowEngine + viewer stack.
31
+ *
32
+ * The fallthrough `else` is deliberate — it converts what used to be a
33
+ * silent no-op (when `record.name` was undefined because we read the
34
+ * wrong primary key) into a loud error. The `verifiers` collection uses
35
+ * `name` as its primary key (`autoGenId: false`), so `filterByTk` must
36
+ * be the name string.
37
+ */
38
+ export type VerifierResource = {
39
+ create(params: {
40
+ values: VerifierFormValues;
41
+ }): Promise<unknown>;
42
+ update(params: {
43
+ filterByTk: string;
44
+ values: VerifierFormValues;
45
+ }): Promise<unknown>;
46
+ };
47
+ export declare function submitVerifierForm(args: {
48
+ raw: VerifierFormValues;
49
+ mode: 'create' | 'edit';
50
+ record?: VerifierRecord;
51
+ resource: VerifierResource;
52
+ onSubmitted: () => void;
53
+ }): Promise<void>;
54
+ /**
55
+ * Admin settings page for the Verification plugin. Lists all configured
56
+ * verifiers with create / edit / delete + bulk delete. Per-type fields
57
+ * are injected from `verificationManager` registered via the plugin
58
+ * registry so third-party verifier types (TOTP, future biometric, …)
59
+ * plug in without touching this page.
60
+ */
61
+ export default function VerifiersPage(): React.JSX.Element;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { Plugin } from '@nocobase/client-v2';
10
+ import { SMSOTPProviderManager } from './otp-sms-provider-manager';
11
+ import { VerificationManager } from './verification-manager';
12
+ /**
13
+ * v2 entry for the Verification plugin. Mirrors the v1 surface (`verificationManager` and `smsOTPProviderManager` instances exposed to downstream plugins) but plugs into the v2 lifecycle:
14
+ *
15
+ * - `pluginSettingsManager.addMenuItem` / `addPageTabItem` register the admin settings page with a lazy `componentLoader`.
16
+ * - `flowEngine.registerModels` contributes the User Center entry.
17
+ * - The legacy `src/client/` entry is intentionally left in place so downstream v1-only plugins (TOTP authenticator, 2FA pro plugin) keep working until they migrate independently.
18
+ */
19
+ export declare class PluginVerificationClientV2 extends Plugin {
20
+ verificationManager: VerificationManager;
21
+ smsOTPProviderManager: SMSOTPProviderManager;
22
+ load(): Promise<void>;
23
+ private registerSettingsPages;
24
+ }
25
+ export default PluginVerificationClientV2;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ /**
11
+ * Drawer content for the User Center's "Verification" entry. Lists
12
+ * every verifier the current user can bind/unbind, with a Configured /
13
+ * Not configured tag and a per-row action. Bind opens a type-specific
14
+ * sub-drawer; Unbind opens a Tabs-based confirmation drawer that
15
+ * authenticates the user with any other bound verifier before removing
16
+ * the target.
17
+ */
18
+ export declare function MyVerifiers(): React.JSX.Element;
19
+ export default MyVerifiers;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { UserCenterActionItemModel } from '@nocobase/client-v2';
10
+ /**
11
+ * User Center entry that opens the "My verifiers" drawer. Section is
12
+ * `profile` so it sits next to language / theme controls. Sort is
13
+ * tightened to 150 to match v1's ordering, where Verification lived
14
+ * between Profile (100) and Theme (200).
15
+ *
16
+ * The base `UserCenterTextItemView` renders `getLabelNode()`, which by
17
+ * default routes through `this.context.t(label)` with no namespace —
18
+ * that would never resolve the verification-namespaced key. Override
19
+ * the node directly so the verification i18n namespace is consulted.
20
+ */
21
+ export declare class VerificationUserCenterItemModel extends UserCenterActionItemModel {
22
+ static itemId: string;
23
+ section: "profile";
24
+ sort: number;
25
+ label: string;
26
+ getLabelNode(): string;
27
+ onClick(): Promise<void>;
28
+ }
29
+ export default VerificationUserCenterItemModel;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import type { ComponentType } from 'react';
10
+ export type VerificationFormProps = {
11
+ verifier: string;
12
+ actionType: string;
13
+ boundInfo?: {
14
+ bound?: boolean;
15
+ publicInfo?: any;
16
+ };
17
+ isLogged?: boolean;
18
+ };
19
+ export type BindFormProps = {
20
+ verifier: string;
21
+ actionType: string;
22
+ isLogged?: boolean;
23
+ };
24
+ type LoaderOf<P = Record<string, never>> = () => Promise<{
25
+ default: ComponentType<P>;
26
+ }>;
27
+ export type VerificationTypeOptions = {
28
+ /**
29
+ * Async loaders for the type-specific forms. The manager stores loaders
30
+ * rather than direct component references so each verifier type
31
+ * contributes its own webpack chunk and is only fetched when a verifier
32
+ * of that type is actually shown.
33
+ *
34
+ * Consumers wrap each loader with `React.lazy` (cached via `useMemo` or
35
+ * a per-type cache to avoid re-creating the lazy wrapper) and render it
36
+ * under `<Suspense>`.
37
+ */
38
+ components: {
39
+ AdminSettingsFormLoader?: LoaderOf;
40
+ VerificationFormLoader?: LoaderOf<VerificationFormProps>;
41
+ BindFormLoader?: LoaderOf<BindFormProps>;
42
+ };
43
+ };
44
+ export declare class VerificationManager {
45
+ verifications: any;
46
+ registerVerificationType(type: string, options: VerificationTypeOptions): void;
47
+ getVerification(type: string): any;
48
+ }
49
+ export {};
@@ -8,21 +8,24 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-beta.35",
11
+ "@nocobase/client": "2.1.0-beta.37",
12
12
  "react": "18.2.0",
13
13
  "antd": "5.24.2",
14
14
  "@formily/shared": "2.3.7",
15
15
  "@formily/react": "2.3.7",
16
16
  "@formily/core": "2.3.7",
17
- "@nocobase/server": "2.1.0-beta.35",
18
- "@nocobase/utils": "2.1.0-beta.35",
19
- "@nocobase/cache": "2.1.0-beta.35",
20
- "@nocobase/actions": "2.1.0-beta.35",
21
- "@nocobase/database": "2.1.0-beta.35",
17
+ "@nocobase/flow-engine": "2.1.0-beta.37",
22
18
  "react-i18next": "11.18.6",
19
+ "@nocobase/utils": "2.1.0-beta.37",
20
+ "@nocobase/client-v2": "2.1.0-beta.37",
21
+ "@nocobase/server": "2.1.0-beta.37",
22
+ "@nocobase/cache": "2.1.0-beta.37",
23
+ "@nocobase/actions": "2.1.0-beta.37",
24
+ "@nocobase/database": "2.1.0-beta.37",
23
25
  "react-router-dom": "6.30.1",
24
26
  "@formily/antd-v5": "1.2.3",
25
27
  "@ant-design/icons": "5.6.1",
28
+ "ahooks": "3.7.8",
26
29
  "lodash": "4.18.1",
27
30
  "dayjs": "1.11.13"
28
31
  };
@@ -1 +1 @@
1
- {"name":"@alicloud/dysmsapi20170525","version":"2.0.17","description":"","main":"dist/client.js","scripts":{"test":"mocha --reporter spec --timeout 3000 test/*.test.js","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Alibaba Cloud SDK","license":"Apache-2.0","devDependencies":{"@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.4","@alicloud/openapi-client":"^0.4.1","@alicloud/endpoint-util":"^0.0.1","@alicloud/openapi-util":"^0.2.9"},"files":["dist","src"],"_lastModified":"2026-05-19T16:49:13.014Z"}
1
+ {"name":"@alicloud/dysmsapi20170525","version":"2.0.17","description":"","main":"dist/client.js","scripts":{"test":"mocha --reporter spec --timeout 3000 test/*.test.js","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Alibaba Cloud SDK","license":"Apache-2.0","devDependencies":{"@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.4","@alicloud/openapi-client":"^0.4.1","@alicloud/endpoint-util":"^0.0.1","@alicloud/openapi-util":"^0.2.9"},"files":["dist","src"],"_lastModified":"2026-05-26T00:45:07.739Z"}
@@ -1 +1 @@
1
- {"name":"@alicloud/openapi-client","version":"0.4.12","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts --timeout=10000","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"","license":"ISC","devDependencies":{"@types/mocha":"^5.2.7","mocha":"^6.2.0","@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.9","@alicloud/credentials":"^2.3.1","@alicloud/openapi-util":"^0.3.2","@alicloud/gateway-spi":"^0.0.8","@alicloud/tea-xml":"0.0.3"},"files":["dist","src"],"repository":"git@github.com:aliyun/darabonba-openapi.git","_lastModified":"2026-05-19T16:49:13.950Z"}
1
+ {"name":"@alicloud/openapi-client","version":"0.4.12","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts --timeout=10000","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"","license":"ISC","devDependencies":{"@types/mocha":"^5.2.7","mocha":"^6.2.0","@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.9","@alicloud/credentials":"^2.3.1","@alicloud/openapi-util":"^0.3.2","@alicloud/gateway-spi":"^0.0.8","@alicloud/tea-xml":"0.0.3"},"files":["dist","src"],"repository":"git@github.com:aliyun/darabonba-openapi.git","_lastModified":"2026-05-26T00:45:08.731Z"}
@@ -1 +1 @@
1
- {"name":"@alicloud/tea-util","version":"1.4.4","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Jackson Tian","license":"Apache-2.0","devDependencies":{"@types/mocha":"^7.0.1","@types/node":"^12.12.26","mocha":"^7.0.1","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.5.1","kitx":"^2.0.0"},"files":["dist","src"],"_lastModified":"2026-05-19T16:49:14.192Z"}
1
+ {"name":"@alicloud/tea-util","version":"1.4.4","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Jackson Tian","license":"Apache-2.0","devDependencies":{"@types/mocha":"^7.0.1","@types/node":"^12.12.26","mocha":"^7.0.1","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.5.1","kitx":"^2.0.0"},"files":["dist","src"],"_lastModified":"2026-05-26T00:45:08.952Z"}
@@ -1 +1 @@
1
- {"name":"tencentcloud-sdk-nodejs-sms","version":"4.1.171","description":"腾讯云 API NODEJS SDK","main":"./tencentcloud/index.js","module":"./es/index.js","types":"./tencentcloud/index.d.ts","scripts":{"test":"mocha -t 10000","build":"concurrently 'npm:build:cjs' 'npm:build:es'","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build:slim":"node ./scripts/build_slim.js","prettier":"prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'","clean":"rimraf tencentcloud es","test:common":"vitest run"},"engines":{"node":">=10"},"files":["tencentcloud","es"],"keywords":["tencentcloudapi","tencentcloud","qcloud","sdk","js","nodejs"],"author":"tencentcloudapi","license":"Apache-2.0","dependencies":{"tencentcloud-sdk-nodejs-common":"*","tslib":"1.13.0"},"directories":{"example":"examples","lib":"lib"},"repository":{"type":"git","url":"https://github.com/tencentcloud/tencentcloud-sdk-nodejs"},"devDependencies":{"@types/ini":"^4.1.1","@types/json-bigint":"^1.0.1","@types/node":"^18.0.0","@types/node-fetch":"^2.5.7","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^2.34.0","babel-eslint":"^10.0.2","chai":"^4.2.0","concurrently":"^6.5.1","esbuild":"^0.25.0","eslint":"^6.8.0","eslint-plugin-react":"^7.17.0","mocha":"^8.4.0","prettier":"^2.3.0","rimraf":"^5.0.10","ts-node":"^8.10.2","typescript":"^5.9.2","vitest":"2.1.9"},"_lastModified":"2026-05-19T16:49:15.431Z"}
1
+ {"name":"tencentcloud-sdk-nodejs-sms","version":"4.1.171","description":"腾讯云 API NODEJS SDK","main":"./tencentcloud/index.js","module":"./es/index.js","types":"./tencentcloud/index.d.ts","scripts":{"test":"mocha -t 10000","build":"concurrently 'npm:build:cjs' 'npm:build:es'","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build:slim":"node ./scripts/build_slim.js","prettier":"prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'","clean":"rimraf tencentcloud es","test:common":"vitest run"},"engines":{"node":">=10"},"files":["tencentcloud","es"],"keywords":["tencentcloudapi","tencentcloud","qcloud","sdk","js","nodejs"],"author":"tencentcloudapi","license":"Apache-2.0","dependencies":{"tencentcloud-sdk-nodejs-common":"*","tslib":"1.13.0"},"directories":{"example":"examples","lib":"lib"},"repository":{"type":"git","url":"https://github.com/tencentcloud/tencentcloud-sdk-nodejs"},"devDependencies":{"@types/ini":"^4.1.1","@types/json-bigint":"^1.0.1","@types/node":"^18.0.0","@types/node-fetch":"^2.5.7","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^2.34.0","babel-eslint":"^10.0.2","chai":"^4.2.0","concurrently":"^6.5.1","esbuild":"^0.25.0","eslint":"^6.8.0","eslint-plugin-react":"^7.17.0","mocha":"^8.4.0","prettier":"^2.3.0","rimraf":"^5.0.10","ts-node":"^8.10.2","typescript":"^5.9.2","vitest":"2.1.9"},"_lastModified":"2026-05-26T00:45:10.233Z"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "User identity verification management, including SMS, TOTP authenticator, with extensibility.",
7
7
  "description.ru-RU": "Управление проверкой личности пользователя, включая SMS, TOTP-авторизацию, с возможностью расширения.",
8
8
  "description.zh-CN": "用户身份验证管理,包含短信、TOTP 认证器等,可扩展。",
9
- "version": "2.1.0-beta.35",
9
+ "version": "2.1.0-beta.37",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/verification",
@@ -28,13 +28,15 @@
28
28
  "peerDependencies": {
29
29
  "@nocobase/actions": "2.x",
30
30
  "@nocobase/client": "2.x",
31
+ "@nocobase/client-v2": "2.x",
31
32
  "@nocobase/database": "2.x",
33
+ "@nocobase/flow-engine": "2.x",
32
34
  "@nocobase/resourcer": "2.x",
33
35
  "@nocobase/server": "2.x",
34
36
  "@nocobase/test": "2.x",
35
37
  "@nocobase/utils": "2.x"
36
38
  },
37
- "gitHead": "74310d8b9e9581fcde14b5a93d12b41ddb5bb325",
39
+ "gitHead": "7132e5b83ecc0e42b54715eaf1429c72bcef34ae",
38
40
  "keywords": [
39
41
  "Authentication",
40
42
  "Verification",