@xube/kit-destination 0.0.14 → 0.0.16

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.
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validate = void 0;
4
4
  exports.validate = validate10;
5
5
  exports.default = validate10;
6
- const schema27 = { "$ref": "#/definitions/confirmationrequestJsonSchema", "definitions": { "confirmationrequestJsonSchema": { "type": "object", "properties": { "arn": { "type": "string" }, "confirmationToken": { "type": "string" }, "enableUrl": { "type": "string" }, "messageType": { "type": "string" } }, "required": ["arn", "confirmationToken", "enableUrl", "messageType"], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#" };
7
- const schema28 = { "type": "object", "properties": { "arn": { "type": "string" }, "confirmationToken": { "type": "string" }, "enableUrl": { "type": "string" }, "messageType": { "type": "string" } }, "required": ["arn", "confirmationToken", "enableUrl", "messageType"], "additionalProperties": false };
6
+ const schema27 = { "$ref": "#/definitions/confirmationrequestJsonSchema", "definitions": { "confirmationrequestJsonSchema": { "type": "object", "properties": { "arn": { "type": "string" }, "confirmationToken": { "type": "string" }, "enableUrl": { "type": "string" }, "messageType": { "type": "string" } }, "required": ["arn", "confirmationToken", "enableUrl", "messageType"], "additionalProperties": true } }, "$schema": "http://json-schema.org/draft-07/schema#" };
7
+ const schema28 = { "type": "object", "properties": { "arn": { "type": "string" }, "confirmationToken": { "type": "string" }, "enableUrl": { "type": "string" }, "messageType": { "type": "string" } }, "required": ["arn", "confirmationToken", "enableUrl", "messageType"], "additionalProperties": true };
8
8
  function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { let vErrors = null; let errors = 0; if (data && typeof data == "object" && !Array.isArray(data)) {
9
9
  if (data.arn === undefined) {
10
10
  const err0 = { instancePath, schemaPath: "#/definitions/confirmationrequestJsonSchema/required", keyword: "required", params: { missingProperty: "arn" }, message: "must have required property '" + "arn" + "'" };
@@ -46,74 +46,62 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
46
46
  }
47
47
  errors++;
48
48
  }
49
- for (const key0 in data) {
50
- if (!((((key0 === "arn") || (key0 === "confirmationToken")) || (key0 === "enableUrl")) || (key0 === "messageType"))) {
51
- const err4 = { instancePath, schemaPath: "#/definitions/confirmationrequestJsonSchema/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
52
- if (vErrors === null) {
53
- vErrors = [err4];
54
- }
55
- else {
56
- vErrors.push(err4);
57
- }
58
- errors++;
59
- }
60
- }
61
49
  if (data.arn !== undefined) {
62
50
  if (typeof data.arn !== "string") {
63
- const err5 = { instancePath: instancePath + "/arn", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/arn/type", keyword: "type", params: { type: "string" }, message: "must be string" };
51
+ const err4 = { instancePath: instancePath + "/arn", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/arn/type", keyword: "type", params: { type: "string" }, message: "must be string" };
64
52
  if (vErrors === null) {
65
- vErrors = [err5];
53
+ vErrors = [err4];
66
54
  }
67
55
  else {
68
- vErrors.push(err5);
56
+ vErrors.push(err4);
69
57
  }
70
58
  errors++;
71
59
  }
72
60
  }
73
61
  if (data.confirmationToken !== undefined) {
74
62
  if (typeof data.confirmationToken !== "string") {
75
- const err6 = { instancePath: instancePath + "/confirmationToken", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/confirmationToken/type", keyword: "type", params: { type: "string" }, message: "must be string" };
63
+ const err5 = { instancePath: instancePath + "/confirmationToken", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/confirmationToken/type", keyword: "type", params: { type: "string" }, message: "must be string" };
76
64
  if (vErrors === null) {
77
- vErrors = [err6];
65
+ vErrors = [err5];
78
66
  }
79
67
  else {
80
- vErrors.push(err6);
68
+ vErrors.push(err5);
81
69
  }
82
70
  errors++;
83
71
  }
84
72
  }
85
73
  if (data.enableUrl !== undefined) {
86
74
  if (typeof data.enableUrl !== "string") {
87
- const err7 = { instancePath: instancePath + "/enableUrl", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/enableUrl/type", keyword: "type", params: { type: "string" }, message: "must be string" };
75
+ const err6 = { instancePath: instancePath + "/enableUrl", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/enableUrl/type", keyword: "type", params: { type: "string" }, message: "must be string" };
88
76
  if (vErrors === null) {
89
- vErrors = [err7];
77
+ vErrors = [err6];
90
78
  }
91
79
  else {
92
- vErrors.push(err7);
80
+ vErrors.push(err6);
93
81
  }
94
82
  errors++;
95
83
  }
96
84
  }
97
85
  if (data.messageType !== undefined) {
98
86
  if (typeof data.messageType !== "string") {
99
- const err8 = { instancePath: instancePath + "/messageType", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/messageType/type", keyword: "type", params: { type: "string" }, message: "must be string" };
87
+ const err7 = { instancePath: instancePath + "/messageType", schemaPath: "#/definitions/confirmationrequestJsonSchema/properties/messageType/type", keyword: "type", params: { type: "string" }, message: "must be string" };
100
88
  if (vErrors === null) {
101
- vErrors = [err8];
89
+ vErrors = [err7];
102
90
  }
103
91
  else {
104
- vErrors.push(err8);
92
+ vErrors.push(err7);
105
93
  }
106
94
  errors++;
107
95
  }
108
96
  }
109
97
  }
110
98
  else {
111
- const err9 = { instancePath, schemaPath: "#/definitions/confirmationrequestJsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
99
+ const err8 = { instancePath, schemaPath: "#/definitions/confirmationrequestJsonSchema/type", keyword: "type", params: { type: "object" }, message: "must be object" };
112
100
  if (vErrors === null) {
113
- vErrors = [err9];
101
+ vErrors = [err8];
114
102
  }
115
103
  else {
116
- vErrors.push(err9);
104
+ vErrors.push(err8);
117
105
  }
118
106
  errors++;
119
107
  } validate10.errors = vErrors; return errors === 0; }
@@ -5,14 +5,14 @@ export declare const ConfirmationRequestSchema: z.ZodObject<{
5
5
  confirmationToken: z.ZodString;
6
6
  enableUrl: z.ZodString;
7
7
  messageType: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- arn: string;
10
- confirmationToken: string;
11
- enableUrl: string;
12
- messageType: string;
13
- }, {
14
- arn: string;
15
- confirmationToken: string;
16
- enableUrl: string;
17
- messageType: string;
18
- }>;
8
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9
+ arn: z.ZodString;
10
+ confirmationToken: z.ZodString;
11
+ enableUrl: z.ZodString;
12
+ messageType: z.ZodString;
13
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14
+ arn: z.ZodString;
15
+ confirmationToken: z.ZodString;
16
+ enableUrl: z.ZodString;
17
+ messageType: z.ZodString;
18
+ }, z.ZodTypeAny, "passthrough">>;
@@ -8,4 +8,4 @@ exports.ConfirmationRequestSchema = zod_1.z.object({
8
8
  confirmationToken: zod_1.z.string(),
9
9
  enableUrl: zod_1.z.string(),
10
10
  messageType: zod_1.z.string(),
11
- });
11
+ }).nonstrict();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-destination",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -19,13 +19,13 @@
19
19
  "homepage": "https://github.com/XubeLtd/dev-kit#readme",
20
20
  "devDependencies": {
21
21
  "@types/node": "^20.4.7",
22
- "@xube/kit-build": "^0.0.14",
22
+ "@xube/kit-build": "^0.0.16",
23
23
  "ts-node": "^10.9.1",
24
24
  "typescript": "^5.1.6"
25
25
  },
26
26
  "dependencies": {
27
- "@xube/kit-generator": "^0.0.14",
28
- "@xube/kit-log": "^0.0.14",
29
- "@xube/kit-request": "^0.0.14"
27
+ "@xube/kit-generator": "^0.0.16",
28
+ "@xube/kit-log": "^0.0.16",
29
+ "@xube/kit-request": "^0.0.16"
30
30
  }
31
31
  }
package/src/confirm.ts CHANGED
@@ -29,6 +29,10 @@ export const confirmDestination = async (
29
29
  log: XubeLog = XubeLog.getInstance()
30
30
  ): Promise<XubeResponse<boolean>> => {
31
31
  log.info("Attempting to confirm destination");
32
+
33
+
34
+
35
+
32
36
  const response = await fetch(confirmationRequest.enableUrl, {
33
37
  method: "GET",
34
38
  headers: {
@@ -1 +1 @@
1
- "use strict";export const validate = validate10;export default validate10;const schema27 = {"$ref":"#/definitions/confirmationrequestJsonSchema","definitions":{"confirmationrequestJsonSchema":{"type":"object","properties":{"arn":{"type":"string"},"confirmationToken":{"type":"string"},"enableUrl":{"type":"string"},"messageType":{"type":"string"}},"required":["arn","confirmationToken","enableUrl","messageType"],"additionalProperties":false}},"$schema":"http://json-schema.org/draft-07/schema#"};const schema28 = {"type":"object","properties":{"arn":{"type":"string"},"confirmationToken":{"type":"string"},"enableUrl":{"type":"string"},"messageType":{"type":"string"}},"required":["arn","confirmationToken","enableUrl","messageType"],"additionalProperties":false};function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.arn === undefined){const err0 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "arn"},message:"must have required property '"+"arn"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.confirmationToken === undefined){const err1 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "confirmationToken"},message:"must have required property '"+"confirmationToken"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.enableUrl === undefined){const err2 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "enableUrl"},message:"must have required property '"+"enableUrl"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.messageType === undefined){const err3 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "messageType"},message:"must have required property '"+"messageType"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "arn") || (key0 === "confirmationToken")) || (key0 === "enableUrl")) || (key0 === "messageType"))){const err4 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.arn !== undefined){if(typeof data.arn !== "string"){const err5 = {instancePath:instancePath+"/arn",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/arn/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.confirmationToken !== undefined){if(typeof data.confirmationToken !== "string"){const err6 = {instancePath:instancePath+"/confirmationToken",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/confirmationToken/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.enableUrl !== undefined){if(typeof data.enableUrl !== "string"){const err7 = {instancePath:instancePath+"/enableUrl",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/enableUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.messageType !== undefined){if(typeof data.messageType !== "string"){const err8 = {instancePath:instancePath+"/messageType",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/messageType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate10.errors = vErrors;return errors === 0;}
1
+ "use strict";export const validate = validate10;export default validate10;const schema27 = {"$ref":"#/definitions/confirmationrequestJsonSchema","definitions":{"confirmationrequestJsonSchema":{"type":"object","properties":{"arn":{"type":"string"},"confirmationToken":{"type":"string"},"enableUrl":{"type":"string"},"messageType":{"type":"string"}},"required":["arn","confirmationToken","enableUrl","messageType"],"additionalProperties":true}},"$schema":"http://json-schema.org/draft-07/schema#"};const schema28 = {"type":"object","properties":{"arn":{"type":"string"},"confirmationToken":{"type":"string"},"enableUrl":{"type":"string"},"messageType":{"type":"string"}},"required":["arn","confirmationToken","enableUrl","messageType"],"additionalProperties":true};function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.arn === undefined){const err0 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "arn"},message:"must have required property '"+"arn"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.confirmationToken === undefined){const err1 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "confirmationToken"},message:"must have required property '"+"confirmationToken"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.enableUrl === undefined){const err2 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "enableUrl"},message:"must have required property '"+"enableUrl"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.messageType === undefined){const err3 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/required",keyword:"required",params:{missingProperty: "messageType"},message:"must have required property '"+"messageType"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.arn !== undefined){if(typeof data.arn !== "string"){const err4 = {instancePath:instancePath+"/arn",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/arn/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.confirmationToken !== undefined){if(typeof data.confirmationToken !== "string"){const err5 = {instancePath:instancePath+"/confirmationToken",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/confirmationToken/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.enableUrl !== undefined){if(typeof data.enableUrl !== "string"){const err6 = {instancePath:instancePath+"/enableUrl",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/enableUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.messageType !== undefined){if(typeof data.messageType !== "string"){const err7 = {instancePath:instancePath+"/messageType",schemaPath:"#/definitions/confirmationrequestJsonSchema/properties/messageType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"#/definitions/confirmationrequestJsonSchema/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}validate10.errors = vErrors;return errors === 0;}
@@ -7,4 +7,4 @@ export const ConfirmationRequestSchema = z.object({
7
7
  confirmationToken: z.string(),
8
8
  enableUrl: z.string(),
9
9
  messageType: z.string(),
10
- });
10
+ }).nonstrict();