@webority/security-razor 0.0.0-stage → 0.58.3

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/LICENSE.txt ADDED
@@ -0,0 +1,17 @@
1
+ Copyright (c) Webority Technologies. All rights reserved.
2
+
3
+ This software and its source code are proprietary and confidential to
4
+ Webority Technologies. Use is permitted only within Webority Technologies
5
+ products and by parties expressly authorised in writing by Webority
6
+ Technologies.
7
+
8
+ No part of this software may be reproduced, distributed, sublicensed, or
9
+ used to create derivative works outside that authorisation.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17
+ DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,13 @@
1
- # Temporary Holding Version
1
+ # @webority/security-razor
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This package types the window globals that Webority.Security.Razor's served scripts publish. It ships declarations only, so a page module gets checked types without any runtime code.
4
+
5
+ ## Use
6
+
7
+ ```ts
8
+ import type {} from "@webority/security-razor/public-form";
9
+ ```
10
+
11
+ After this import, `window.WeborityPublicForms` is typed. It may be undefined until public-form.js has loaded.
12
+
13
+ The package version always equals the Webority.Security NuGet packages' version.
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
- "name": "@webority/security-razor",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@webority/security-razor",
3
+ "version": "0.58.3",
4
+ "description": "Type declarations for the browser globals Webority.Security.Razor's scripts publish, for typed page modules.",
5
+ "license": "SEE LICENSE IN LICENSE.txt",
6
+ "type": "module",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "registry": "https://registry.npmjs.org/"
10
+ },
11
+ "files": [
12
+ "types/public-form.d.ts"
13
+ ],
14
+ "exports": {
15
+ "./public-form": {
16
+ "types": "./types/public-form.d.ts"
17
+ },
18
+ "./package.json": "./package.json"
19
+ },
20
+ "sideEffects": false,
21
+ "scripts": {
22
+ "prepack": "node ../../scripts/package-guard-pack.mjs --output-dirs types --allow-file ../../.webority/baselines/package-allow.json"
23
+ }
24
+ }
@@ -0,0 +1,25 @@
1
+ // Generated by Webority.Security.Razor/razor-js/build.mjs from types/public-form.d.ts. Do not edit.
2
+ declare global {
3
+ interface PublicFormSession {
4
+ token: string;
5
+ formStamp: string;
6
+ captchaSiteKey: string;
7
+ captchaTestToken?: string | null;
8
+ }
9
+ interface RecaptchaApi {
10
+ ready?: (callback: () => void) => void;
11
+ execute?: (siteKey: string, options: {
12
+ action: string;
13
+ }) => Promise<string>;
14
+ }
15
+ interface Window {
16
+ grecaptcha?: RecaptchaApi | undefined;
17
+ WeborityPublicForms?: {
18
+ ready: Promise<PublicFormSession | null>;
19
+ session: () => Promise<PublicFormSession>;
20
+ mintToken: (action: string) => Promise<string>;
21
+ } | undefined;
22
+ }
23
+ }
24
+
25
+ export {};