polarity-integration-utils 2.0.8 → 3.1.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.
Files changed (139) hide show
  1. package/dist/dts/context/cache.d.ts +149 -0
  2. package/dist/dts/context/cache.d.ts.map +1 -0
  3. package/dist/dts/context/index.d.ts +3 -0
  4. package/dist/dts/context/index.d.ts.map +1 -0
  5. package/dist/dts/context/integration-context.d.ts +16 -0
  6. package/dist/dts/context/integration-context.d.ts.map +1 -0
  7. package/dist/dts/index.d.ts +4 -1
  8. package/dist/dts/index.d.ts.map +1 -1
  9. package/dist/dts/index.docs.d.ts +1 -0
  10. package/dist/dts/index.docs.d.ts.map +1 -1
  11. package/dist/dts/lib/context/cache.d.ts +149 -0
  12. package/dist/dts/lib/context/cache.d.ts.map +1 -0
  13. package/dist/dts/lib/context/index.d.ts +3 -0
  14. package/dist/dts/lib/context/index.d.ts.map +1 -0
  15. package/dist/dts/lib/context/integration-context.d.ts +16 -0
  16. package/dist/dts/lib/context/integration-context.d.ts.map +1 -0
  17. package/dist/dts/lib/errors/api-request-error.d.ts +10 -0
  18. package/dist/dts/lib/errors/api-request-error.d.ts.map +1 -0
  19. package/dist/dts/lib/errors/auth-request-error.d.ts +10 -0
  20. package/dist/dts/lib/errors/auth-request-error.d.ts.map +1 -0
  21. package/dist/dts/lib/errors/index.d.ts +8 -0
  22. package/dist/dts/lib/errors/index.d.ts.map +1 -0
  23. package/dist/dts/lib/errors/integration-error.d.ts +189 -0
  24. package/dist/dts/lib/errors/integration-error.d.ts.map +1 -0
  25. package/dist/dts/lib/errors/library-usage-error.d.ts +12 -0
  26. package/dist/dts/lib/errors/library-usage-error.d.ts.map +1 -0
  27. package/dist/dts/lib/errors/network-error.d.ts +11 -0
  28. package/dist/dts/lib/errors/network-error.d.ts.map +1 -0
  29. package/dist/dts/lib/errors/parse-error-to-readable-json.d.ts +7 -0
  30. package/dist/dts/lib/errors/parse-error-to-readable-json.d.ts.map +1 -0
  31. package/dist/dts/lib/errors/retry-request-error.d.ts +11 -0
  32. package/dist/dts/lib/errors/retry-request-error.d.ts.map +1 -0
  33. package/dist/dts/lib/index.d.ts +8 -0
  34. package/dist/dts/lib/index.d.ts.map +1 -0
  35. package/dist/dts/lib/index.docs.d.ts +10 -0
  36. package/dist/dts/lib/index.docs.d.ts.map +1 -0
  37. package/dist/dts/lib/internal/helpers/parallel-limit.d.ts +9 -0
  38. package/dist/dts/lib/internal/helpers/parallel-limit.d.ts.map +1 -0
  39. package/dist/dts/lib/internal/helpers/sanitize-object.d.ts +11 -0
  40. package/dist/dts/lib/internal/helpers/sanitize-object.d.ts.map +1 -0
  41. package/dist/dts/lib/logging/index.d.ts +2 -0
  42. package/dist/dts/lib/logging/index.d.ts.map +1 -0
  43. package/dist/dts/lib/logging/logger.d.ts +49 -0
  44. package/dist/dts/lib/logging/logger.d.ts.map +1 -0
  45. package/dist/dts/lib/requests/index.d.ts +3 -0
  46. package/dist/dts/lib/requests/index.d.ts.map +1 -0
  47. package/dist/dts/lib/requests/polarity-request.d.ts +411 -0
  48. package/dist/dts/lib/requests/polarity-request.d.ts.map +1 -0
  49. package/dist/dts/lib/requests/sanitize-request-options.d.ts +20 -0
  50. package/dist/dts/lib/requests/sanitize-request-options.d.ts.map +1 -0
  51. package/dist/dts/lib/testing/enhanced-utils/create-entity.d.ts +3 -0
  52. package/dist/dts/lib/testing/enhanced-utils/create-entity.d.ts.map +1 -0
  53. package/dist/dts/lib/testing/enhanced-utils/create-mock-integration-context.d.ts +3 -0
  54. package/dist/dts/lib/testing/enhanced-utils/create-mock-integration-context.d.ts.map +1 -0
  55. package/dist/dts/lib/testing/enhanced-utils/mock-request.d.ts +14 -0
  56. package/dist/dts/lib/testing/enhanced-utils/mock-request.d.ts.map +1 -0
  57. package/dist/dts/lib/testing/enhanced-utils/validate-integration.d.ts +8 -0
  58. package/dist/dts/lib/testing/enhanced-utils/validate-integration.d.ts.map +1 -0
  59. package/dist/dts/lib/testing/index.d.ts +6 -0
  60. package/dist/dts/lib/testing/index.d.ts.map +1 -0
  61. package/dist/dts/lib/testing/test-factory/create-integration-tests.d.ts +6 -0
  62. package/dist/dts/lib/testing/test-factory/create-integration-tests.d.ts.map +1 -0
  63. package/dist/dts/lib/testing/test-factory/test-do-lookup.d.ts +7 -0
  64. package/dist/dts/lib/testing/test-factory/test-do-lookup.d.ts.map +1 -0
  65. package/dist/dts/lib/testing/test-factory/test-on-message.d.ts +8 -0
  66. package/dist/dts/lib/testing/test-factory/test-on-message.d.ts.map +1 -0
  67. package/dist/dts/lib/types.d.ts +101 -0
  68. package/dist/dts/lib/types.d.ts.map +1 -0
  69. package/dist/dts/lib/zod-types.d.ts +278 -0
  70. package/dist/dts/lib/zod-types.d.ts.map +1 -0
  71. package/dist/dts/testing/enhanced-utils/create-entity.d.ts +3 -0
  72. package/dist/dts/testing/enhanced-utils/create-entity.d.ts.map +1 -0
  73. package/dist/dts/testing/enhanced-utils/create-mock-integration-context.d.ts +3 -0
  74. package/dist/dts/testing/enhanced-utils/create-mock-integration-context.d.ts.map +1 -0
  75. package/dist/dts/testing/enhanced-utils/mock-request.d.ts +14 -0
  76. package/dist/dts/testing/enhanced-utils/mock-request.d.ts.map +1 -0
  77. package/dist/dts/testing/enhanced-utils/validate-integration.d.ts +8 -0
  78. package/dist/dts/testing/enhanced-utils/validate-integration.d.ts.map +1 -0
  79. package/dist/dts/testing/index.d.ts +6 -0
  80. package/dist/dts/testing/index.d.ts.map +1 -0
  81. package/dist/dts/testing/test-factory/create-integration-tests.d.ts +6 -0
  82. package/dist/dts/testing/test-factory/create-integration-tests.d.ts.map +1 -0
  83. package/dist/dts/testing/test-factory/test-do-lookup.d.ts +7 -0
  84. package/dist/dts/testing/test-factory/test-do-lookup.d.ts.map +1 -0
  85. package/dist/dts/testing/test-factory/test-on-message.d.ts +8 -0
  86. package/dist/dts/testing/test-factory/test-on-message.d.ts.map +1 -0
  87. package/dist/{tsdoc-metadata.json → dts/tsdoc-metadata.json} +1 -1
  88. package/dist/dts/types.d.ts +50 -53
  89. package/dist/dts/types.d.ts.map +1 -1
  90. package/dist/dts/zod-types.d.ts +278 -0
  91. package/dist/dts/zod-types.d.ts.map +1 -0
  92. package/dist/es/lib/context/index.js +18 -0
  93. package/dist/es/lib/context/integration-context.js +2 -0
  94. package/dist/es/{errors → lib/errors}/network-error.js +1 -1
  95. package/dist/es/{index.docs.js → lib/index.docs.js} +1 -0
  96. package/dist/es/{index.js → lib/index.js} +9 -1
  97. package/dist/es/lib/testing/enhanced-utils/create-entity.js +37 -0
  98. package/dist/es/lib/testing/enhanced-utils/create-mock-integration-context.js +36 -0
  99. package/dist/es/lib/testing/enhanced-utils/mock-request.js +22 -0
  100. package/dist/es/lib/testing/enhanced-utils/validate-integration.js +159 -0
  101. package/dist/es/lib/testing/index.js +21 -0
  102. package/dist/es/lib/testing/test-factory/create-integration-tests.js +53 -0
  103. package/dist/es/lib/testing/test-factory/test-do-lookup.js +24 -0
  104. package/dist/es/lib/testing/test-factory/test-on-message.js +24 -0
  105. package/dist/es/lib/types.js +5 -0
  106. package/dist/es/lib/zod-types.js +206 -0
  107. package/dist/lib/context/cache.js +2 -0
  108. package/dist/lib/context/index.js +18 -0
  109. package/dist/lib/context/integration-context.js +2 -0
  110. package/dist/lib/errors/network-error.js +1 -1
  111. package/dist/lib/index.docs.js +1 -0
  112. package/dist/lib/index.js +9 -1
  113. package/dist/lib/testing/enhanced-utils/create-entity.js +37 -0
  114. package/dist/lib/testing/enhanced-utils/create-mock-integration-context.js +36 -0
  115. package/dist/lib/testing/enhanced-utils/mock-request.js +22 -0
  116. package/dist/lib/testing/enhanced-utils/validate-integration.js +159 -0
  117. package/dist/lib/testing/index.js +21 -0
  118. package/dist/lib/testing/test-factory/create-integration-tests.js +53 -0
  119. package/dist/lib/testing/test-factory/test-do-lookup.js +24 -0
  120. package/dist/lib/testing/test-factory/test-on-message.js +24 -0
  121. package/dist/lib/types.js +3 -0
  122. package/dist/lib/zod-types.js +206 -0
  123. package/dist/polarity-integration-utils.d.ts +461 -54
  124. package/package.json +30 -9
  125. /package/dist/es/{types.js → lib/context/cache.js} +0 -0
  126. /package/dist/es/{errors → lib/errors}/api-request-error.js +0 -0
  127. /package/dist/es/{errors → lib/errors}/auth-request-error.js +0 -0
  128. /package/dist/es/{errors → lib/errors}/index.js +0 -0
  129. /package/dist/es/{errors → lib/errors}/integration-error.js +0 -0
  130. /package/dist/es/{errors → lib/errors}/library-usage-error.js +0 -0
  131. /package/dist/es/{errors → lib/errors}/parse-error-to-readable-json.js +0 -0
  132. /package/dist/es/{errors → lib/errors}/retry-request-error.js +0 -0
  133. /package/dist/es/{internal → lib/internal}/helpers/parallel-limit.js +0 -0
  134. /package/dist/es/{internal → lib/internal}/helpers/sanitize-object.js +0 -0
  135. /package/dist/es/{logging → lib/logging}/index.js +0 -0
  136. /package/dist/es/{logging → lib/logging}/logger.js +0 -0
  137. /package/dist/es/{requests → lib/requests}/index.js +0 -0
  138. /package/dist/es/{requests → lib/requests}/polarity-request.js +0 -0
  139. /package/dist/es/{requests → lib/requests}/sanitize-request-options.js +0 -0
@@ -0,0 +1,8 @@
1
+ import { Integration, IntegrationConfig } from '../../types';
2
+ export interface ValidationResult {
3
+ isValid: boolean;
4
+ errors: string[];
5
+ warnings: string[];
6
+ }
7
+ export declare const validateIntegration: (integration: Integration, config?: IntegrationConfig) => ValidationResult;
8
+ //# sourceMappingURL=validate-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-integration.d.ts","sourceRoot":"","sources":["../../../../../lib/testing/enhanced-utils/validate-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAsB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKjF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,mBAAmB,GAC9B,aAAa,WAAW,EACxB,SAAS,iBAAiB,KACzB,gBAoCF,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './test-factory/create-integration-tests';
2
+ export * from './enhanced-utils/create-entity';
3
+ export * from './enhanced-utils/create-mock-integration-context';
4
+ export * from './enhanced-utils/mock-request';
5
+ export * from './enhanced-utils/validate-integration';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/testing/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Integration } from '../../types';
2
+ export declare const createIntegrationTests: (integration: Integration) => {
3
+ testDoLookup: any;
4
+ testOnMessage: any;
5
+ };
6
+ //# sourceMappingURL=create-integration-tests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-integration-tests.d.ts","sourceRoot":"","sources":["../../../../../lib/testing/test-factory/create-integration-tests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,eAAO,MAAM,sBAAsB,GAAI,aAAa,WAAW;;;CAY9D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { DoLookupResult, DoLookupUserOptions, Entity, Integration } from '../../types';
2
+ export declare const testDoLookup: (integration: Integration, description: string, { entities, options, expected }: {
3
+ entities: Entity[];
4
+ options: DoLookupUserOptions;
5
+ expected: DoLookupResult;
6
+ }) => void;
7
+ //# sourceMappingURL=test-do-lookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-do-lookup.d.ts","sourceRoot":"","sources":["../../../../../lib/testing/test-factory/test-do-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIvF,eAAO,MAAM,YAAY,GACvB,aAAa,WAAW,EACxB,aAAa,MAAM,EACnB,iCAIG;IACD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;CAC1B,SAkBF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DoLookupUserOptions, Integration } from '../../types';
2
+ export declare const testOnMessage: (integration: Integration, description: string, { command, args, expected, options }: {
3
+ command: string;
4
+ args: Record<string, unknown>;
5
+ expected: unknown;
6
+ options?: DoLookupUserOptions;
7
+ }) => void;
8
+ //# sourceMappingURL=test-on-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-on-message.d.ts","sourceRoot":"","sources":["../../../../../lib/testing/test-factory/test-on-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/D,eAAO,MAAM,aAAa,GACxB,aAAa,WAAW,EACxB,aAAa,MAAM,EACnB,sCAKG;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,SAmBF,CAAC"}
@@ -0,0 +1,101 @@
1
+ import { z } from 'zod';
2
+ import { Logger as PolarityLogger } from './logging';
3
+ import { ValidationErrorSchema, DoLookupUserOptionsSchema, ValidateOptionsUserOptionsSchema, ValidateOptionsUserOptionSchema, PossibleUserOptionValueSchema, DropdownUserOptionValueSchema, EntitySchema, EntityTypeSchema, StandardEntityTypeSchema, ChannelSchema, ResultSchema, IntegrationConfigSchema } from './zod-types';
4
+ /**
5
+ * @public
6
+ */
7
+ export type ValidationError = z.infer<typeof ValidationErrorSchema>;
8
+ /**
9
+ * User options object passed into the integration's `doLookup` method.
10
+ *
11
+ * @example
12
+ * Example of the user options object passed into `doLookup`
13
+ * ```js
14
+ * function doLookup(entities, options, cb){
15
+ * // options here is of type DoLookupUserOptions
16
+ * }
17
+ * ```
18
+ *
19
+ * @example
20
+ * As an example, if your integration has a user option with a `key` value of
21
+ * `apiKey` within its `config.json`, the user options object passed into the `doLookup` method would look like:
22
+ * ```json
23
+ * {
24
+ * "apiKey": "XXXXXXXXXX"
25
+ * }
26
+ * ```
27
+ * @public
28
+ */
29
+ export type DoLookupUserOptions = z.infer<typeof DoLookupUserOptionsSchema>;
30
+ /**
31
+ * @public
32
+ */
33
+ export type ValidateOptionsUserOptions = z.infer<typeof ValidateOptionsUserOptionsSchema>;
34
+ /**
35
+ * @public
36
+ */
37
+ export type ValidateOptionsUserOption = z.infer<typeof ValidateOptionsUserOptionSchema>;
38
+ /**
39
+ * @public
40
+ */
41
+ export type PossibleUserOptionValue = z.infer<typeof PossibleUserOptionValueSchema>;
42
+ /**
43
+ * @public
44
+ */
45
+ export type DropdownUserOptionValue = z.infer<typeof DropdownUserOptionValueSchema>;
46
+ /**
47
+ * Represents a Polarity Entity object which is passed to an integration's
48
+ * doLookup method.
49
+ *
50
+ * @public
51
+ */
52
+ export type Entity = z.infer<typeof EntitySchema>;
53
+ /**
54
+ * @public
55
+ */
56
+ export type Channel = z.infer<typeof ChannelSchema>;
57
+ /**
58
+ * Entity Types including custom types
59
+ * @public
60
+ */
61
+ export type EntityType = z.infer<typeof EntityTypeSchema>;
62
+ /**
63
+ * List of supported entity type values
64
+ * @public
65
+ */
66
+ export type StandardEntityType = z.infer<typeof StandardEntityTypeSchema>;
67
+ /**
68
+ * @public
69
+ */
70
+ export type Result<TDetails = unknown> = Omit<z.infer<typeof ResultSchema>, 'data'> & {
71
+ data: {
72
+ summary: string[];
73
+ details: TDetails;
74
+ };
75
+ };
76
+ /**
77
+ * @public
78
+ */
79
+ export type DoLookupResult<TDetails = unknown> = Result<TDetails>[];
80
+ /**
81
+ * @public
82
+ */
83
+ export type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
84
+ /**
85
+ * @public
86
+ */
87
+ export { PolarityLogger };
88
+ /**
89
+ * @public
90
+ */
91
+ import { IntegrationContext } from './context';
92
+ import { IntegrationError } from './errors';
93
+ export { IntegrationContext, IntegrationError };
94
+ export interface Integration<TStartupResult = unknown, TDetails = unknown> {
95
+ startup: (logger: PolarityLogger) => Promise<TStartupResult>;
96
+ doLookup: (entities: Entity[], options: DoLookupUserOptions, context: IntegrationContext) => Promise<DoLookupResult<TDetails> | IntegrationError | null | void>;
97
+ onMessage?: (payload: unknown, options: DoLookupUserOptions, context: IntegrationContext) => Promise<unknown>;
98
+ onDetails?: (lookupObject: Result<TDetails>, options: DoLookupUserOptions, context: IntegrationContext) => Promise<unknown>;
99
+ validateOptions: (options: ValidateOptionsUserOptions, context: IntegrationContext) => IntegrationError[];
100
+ }
101
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,278 @@
1
+ import { z } from 'zod';
2
+ export declare const ValidationErrorSchema: z.ZodObject<{
3
+ key: z.ZodString;
4
+ message: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const DropdownUserOptionValueSchema: z.ZodObject<{
7
+ display: z.ZodString;
8
+ value: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export declare const PossibleUserOptionValueSchema: z.ZodUnion<readonly [z.ZodUndefined, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
11
+ display: z.ZodString;
12
+ value: z.ZodString;
13
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
14
+ display: z.ZodString;
15
+ value: z.ZodString;
16
+ }, z.core.$strip>>]>;
17
+ export declare const DoLookupUserOptionsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUndefined, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
18
+ display: z.ZodString;
19
+ value: z.ZodString;
20
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
21
+ display: z.ZodString;
22
+ value: z.ZodString;
23
+ }, z.core.$strip>>]>>;
24
+ export declare const ValidateOptionsUserOptionSchema: z.ZodObject<{
25
+ integration_id: z.ZodOptional<z.ZodString>;
26
+ key: z.ZodString;
27
+ value: z.ZodUnion<readonly [z.ZodUndefined, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
28
+ display: z.ZodString;
29
+ value: z.ZodString;
30
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
31
+ display: z.ZodString;
32
+ value: z.ZodString;
33
+ }, z.core.$strip>>]>;
34
+ user_can_edit: z.ZodOptional<z.ZodBoolean>;
35
+ admin_only: z.ZodOptional<z.ZodBoolean>;
36
+ }, z.core.$strip>;
37
+ export declare const ValidateOptionsUserOptionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38
+ integration_id: z.ZodOptional<z.ZodString>;
39
+ key: z.ZodString;
40
+ value: z.ZodUnion<readonly [z.ZodUndefined, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
41
+ display: z.ZodString;
42
+ value: z.ZodString;
43
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
44
+ display: z.ZodString;
45
+ value: z.ZodString;
46
+ }, z.core.$strip>>]>;
47
+ user_can_edit: z.ZodOptional<z.ZodBoolean>;
48
+ admin_only: z.ZodOptional<z.ZodBoolean>;
49
+ }, z.core.$strip>>;
50
+ export declare const ChannelSchema: z.ZodObject<{
51
+ channel_name: z.ZodString;
52
+ id: z.ZodNumber;
53
+ }, z.core.$strip>;
54
+ export declare const StandardEntityTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>;
55
+ export declare const EntityTypeSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>, z.ZodLiteral<"*">, z.ZodLiteral<"custom">, z.ZodCustom<`custom.${string}`, `custom.${string}`>]>;
56
+ export declare const EntitySchema: z.ZodObject<{
57
+ value: z.ZodString;
58
+ types: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>, z.ZodLiteral<"*">, z.ZodLiteral<"custom">, z.ZodCustom<`custom.${string}`, `custom.${string}`>]>>;
59
+ type: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>, z.ZodLiteral<"*">, z.ZodLiteral<"custom">, z.ZodCustom<`custom.${string}`, `custom.${string}`>]>;
60
+ requestContext: z.ZodObject<{
61
+ requestType: z.ZodLiteral<"onDemand">;
62
+ isUserInitiated: z.ZodBoolean;
63
+ }, z.core.$strip>;
64
+ longitude: z.ZodNumber;
65
+ latitude: z.ZodNumber;
66
+ isURL: z.ZodBoolean;
67
+ isSHA512: z.ZodBoolean;
68
+ isSHA256: z.ZodBoolean;
69
+ isSHA1: z.ZodBoolean;
70
+ isPrivateIP: z.ZodBoolean;
71
+ isMD5: z.ZodBoolean;
72
+ isIPv6: z.ZodBoolean;
73
+ isIPv4: z.ZodBoolean;
74
+ isIP: z.ZodBoolean;
75
+ isHex: z.ZodBoolean;
76
+ isHash: z.ZodBoolean;
77
+ isHTMLTag: z.ZodBoolean;
78
+ isEmail: z.ZodBoolean;
79
+ isDomain: z.ZodBoolean;
80
+ hashType: z.ZodUnion<readonly [z.ZodLiteral<"md5">, z.ZodLiteral<"sha1">, z.ZodLiteral<"sha256">, z.ZodLiteral<"sha512">, z.ZodLiteral<"">]>;
81
+ displayValue: z.ZodString;
82
+ channels: z.ZodArray<z.ZodObject<{
83
+ channel_name: z.ZodString;
84
+ id: z.ZodNumber;
85
+ }, z.core.$strip>>;
86
+ IPType: z.ZodUnion<readonly [z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"">]>;
87
+ }, z.core.$strip>;
88
+ export declare const ResultSchema: z.ZodObject<{
89
+ entity: z.ZodObject<{
90
+ value: z.ZodString;
91
+ types: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>, z.ZodLiteral<"*">, z.ZodLiteral<"custom">, z.ZodCustom<`custom.${string}`, `custom.${string}`>]>>;
92
+ type: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>, z.ZodLiteral<"*">, z.ZodLiteral<"custom">, z.ZodCustom<`custom.${string}`, `custom.${string}`>]>;
93
+ requestContext: z.ZodObject<{
94
+ requestType: z.ZodLiteral<"onDemand">;
95
+ isUserInitiated: z.ZodBoolean;
96
+ }, z.core.$strip>;
97
+ longitude: z.ZodNumber;
98
+ latitude: z.ZodNumber;
99
+ isURL: z.ZodBoolean;
100
+ isSHA512: z.ZodBoolean;
101
+ isSHA256: z.ZodBoolean;
102
+ isSHA1: z.ZodBoolean;
103
+ isPrivateIP: z.ZodBoolean;
104
+ isMD5: z.ZodBoolean;
105
+ isIPv6: z.ZodBoolean;
106
+ isIPv4: z.ZodBoolean;
107
+ isIP: z.ZodBoolean;
108
+ isHex: z.ZodBoolean;
109
+ isHash: z.ZodBoolean;
110
+ isHTMLTag: z.ZodBoolean;
111
+ isEmail: z.ZodBoolean;
112
+ isDomain: z.ZodBoolean;
113
+ hashType: z.ZodUnion<readonly [z.ZodLiteral<"md5">, z.ZodLiteral<"sha1">, z.ZodLiteral<"sha256">, z.ZodLiteral<"sha512">, z.ZodLiteral<"">]>;
114
+ displayValue: z.ZodString;
115
+ channels: z.ZodArray<z.ZodObject<{
116
+ channel_name: z.ZodString;
117
+ id: z.ZodNumber;
118
+ }, z.core.$strip>>;
119
+ IPType: z.ZodUnion<readonly [z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"">]>;
120
+ }, z.core.$strip>;
121
+ displayValue: z.ZodOptional<z.ZodString>;
122
+ data: z.ZodObject<{
123
+ summary: z.ZodArray<z.ZodString>;
124
+ details: z.ZodUnknown;
125
+ }, z.core.$strip>;
126
+ }, z.core.$strip>;
127
+ export declare const DoLookupResultSchema: z.ZodArray<z.ZodObject<{
128
+ entity: z.ZodObject<{
129
+ value: z.ZodString;
130
+ types: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>, z.ZodLiteral<"*">, z.ZodLiteral<"custom">, z.ZodCustom<`custom.${string}`, `custom.${string}`>]>>;
131
+ type: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"IP">, z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv4CIDR">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"MAC">, z.ZodLiteral<"MD5">, z.ZodLiteral<"SHA1">, z.ZodLiteral<"SHA256">, z.ZodLiteral<"cve">, z.ZodLiteral<"domain">, z.ZodLiteral<"email">, z.ZodLiteral<"hash">, z.ZodLiteral<"string">, z.ZodLiteral<"url">]>, z.ZodLiteral<"*">, z.ZodLiteral<"custom">, z.ZodCustom<`custom.${string}`, `custom.${string}`>]>;
132
+ requestContext: z.ZodObject<{
133
+ requestType: z.ZodLiteral<"onDemand">;
134
+ isUserInitiated: z.ZodBoolean;
135
+ }, z.core.$strip>;
136
+ longitude: z.ZodNumber;
137
+ latitude: z.ZodNumber;
138
+ isURL: z.ZodBoolean;
139
+ isSHA512: z.ZodBoolean;
140
+ isSHA256: z.ZodBoolean;
141
+ isSHA1: z.ZodBoolean;
142
+ isPrivateIP: z.ZodBoolean;
143
+ isMD5: z.ZodBoolean;
144
+ isIPv6: z.ZodBoolean;
145
+ isIPv4: z.ZodBoolean;
146
+ isIP: z.ZodBoolean;
147
+ isHex: z.ZodBoolean;
148
+ isHash: z.ZodBoolean;
149
+ isHTMLTag: z.ZodBoolean;
150
+ isEmail: z.ZodBoolean;
151
+ isDomain: z.ZodBoolean;
152
+ hashType: z.ZodUnion<readonly [z.ZodLiteral<"md5">, z.ZodLiteral<"sha1">, z.ZodLiteral<"sha256">, z.ZodLiteral<"sha512">, z.ZodLiteral<"">]>;
153
+ displayValue: z.ZodString;
154
+ channels: z.ZodArray<z.ZodObject<{
155
+ channel_name: z.ZodString;
156
+ id: z.ZodNumber;
157
+ }, z.core.$strip>>;
158
+ IPType: z.ZodUnion<readonly [z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv6">, z.ZodLiteral<"">]>;
159
+ }, z.core.$strip>;
160
+ displayValue: z.ZodOptional<z.ZodString>;
161
+ data: z.ZodObject<{
162
+ summary: z.ZodArray<z.ZodString>;
163
+ details: z.ZodUnknown;
164
+ }, z.core.$strip>;
165
+ }, z.core.$strip>>;
166
+ export declare const IntegrationConfigSchema: z.ZodObject<{
167
+ polarityIntegrationUuid: z.ZodUUID;
168
+ name: z.ZodString;
169
+ acronym: z.ZodString;
170
+ description: z.ZodOptional<z.ZodString>;
171
+ defaultColor: z.ZodOptional<z.ZodString>;
172
+ entityTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
173
+ dataTypes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
174
+ type: z.ZodOptional<z.ZodLiteral<"custom">>;
175
+ name: z.ZodOptional<z.ZodString>;
176
+ description: z.ZodOptional<z.ZodString>;
177
+ key: z.ZodString;
178
+ regex: z.ZodString;
179
+ editable: z.ZodOptional<z.ZodBoolean>;
180
+ enabled: z.ZodOptional<z.ZodBoolean>;
181
+ }, z.core.$strip>]>>>;
182
+ customTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
183
+ type: z.ZodOptional<z.ZodLiteral<"custom">>;
184
+ name: z.ZodOptional<z.ZodString>;
185
+ description: z.ZodOptional<z.ZodString>;
186
+ key: z.ZodString;
187
+ regex: z.ZodString;
188
+ editable: z.ZodOptional<z.ZodBoolean>;
189
+ enabled: z.ZodOptional<z.ZodBoolean>;
190
+ }, z.core.$strip>>>;
191
+ supportsAdditionalCustomTypes: z.ZodOptional<z.ZodBoolean>;
192
+ styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
193
+ block: z.ZodObject<{
194
+ component: z.ZodObject<{
195
+ file: z.ZodString;
196
+ }, z.core.$strip>;
197
+ template: z.ZodObject<{
198
+ file: z.ZodString;
199
+ }, z.core.$strip>;
200
+ }, z.core.$strip>;
201
+ summary: z.ZodOptional<z.ZodObject<{
202
+ component: z.ZodObject<{
203
+ file: z.ZodString;
204
+ }, z.core.$strip>;
205
+ template: z.ZodObject<{
206
+ file: z.ZodString;
207
+ }, z.core.$strip>;
208
+ }, z.core.$strip>>;
209
+ onDemandOnly: z.ZodOptional<z.ZodBoolean>;
210
+ copyOnDemand: z.ZodOptional<z.ZodBoolean>;
211
+ logging: z.ZodOptional<z.ZodObject<{
212
+ level: z.ZodEnum<{
213
+ error: "error";
214
+ debug: "debug";
215
+ info: "info";
216
+ trace: "trace";
217
+ warn: "warn";
218
+ fatal: "fatal";
219
+ }>;
220
+ }, z.core.$strip>>;
221
+ request: z.ZodOptional<z.ZodObject<{
222
+ cert: z.ZodOptional<z.ZodString>;
223
+ key: z.ZodOptional<z.ZodString>;
224
+ passphrase: z.ZodOptional<z.ZodString>;
225
+ ca: z.ZodOptional<z.ZodString>;
226
+ proxy: z.ZodOptional<z.ZodString>;
227
+ rejectUnauthorized: z.ZodOptional<z.ZodBoolean>;
228
+ }, z.core.$strip>>;
229
+ options: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
230
+ type: z.ZodEnum<{
231
+ text: "text";
232
+ password: "password";
233
+ }>;
234
+ key: z.ZodString;
235
+ name: z.ZodString;
236
+ description: z.ZodOptional<z.ZodString>;
237
+ default: z.ZodNullable<z.ZodString>;
238
+ userCanEdit: z.ZodOptional<z.ZodBoolean>;
239
+ adminOnly: z.ZodOptional<z.ZodBoolean>;
240
+ }, z.core.$strip>, z.ZodObject<{
241
+ type: z.ZodLiteral<"boolean">;
242
+ key: z.ZodString;
243
+ name: z.ZodString;
244
+ description: z.ZodOptional<z.ZodString>;
245
+ default: z.ZodNullable<z.ZodBoolean>;
246
+ userCanEdit: z.ZodOptional<z.ZodBoolean>;
247
+ adminOnly: z.ZodOptional<z.ZodBoolean>;
248
+ }, z.core.$strip>, z.ZodObject<{
249
+ type: z.ZodLiteral<"number">;
250
+ key: z.ZodString;
251
+ name: z.ZodString;
252
+ description: z.ZodOptional<z.ZodString>;
253
+ default: z.ZodNullable<z.ZodNumber>;
254
+ userCanEdit: z.ZodOptional<z.ZodBoolean>;
255
+ adminOnly: z.ZodOptional<z.ZodBoolean>;
256
+ }, z.core.$strip>, z.ZodObject<{
257
+ type: z.ZodLiteral<"select">;
258
+ key: z.ZodString;
259
+ name: z.ZodString;
260
+ description: z.ZodOptional<z.ZodString>;
261
+ default: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
262
+ value: z.ZodString;
263
+ display: z.ZodString;
264
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
265
+ value: z.ZodString;
266
+ display: z.ZodString;
267
+ }, z.core.$strip>>, z.ZodString]>>;
268
+ options: z.ZodArray<z.ZodObject<{
269
+ value: z.ZodString;
270
+ display: z.ZodString;
271
+ }, z.core.$strip>>;
272
+ multiple: z.ZodOptional<z.ZodBoolean>;
273
+ userCanEdit: z.ZodBoolean;
274
+ adminOnly: z.ZodBoolean;
275
+ }, z.core.$strip>], "type">>>;
276
+ }, z.core.$strip>;
277
+ export type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
278
+ //# sourceMappingURL=zod-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod-types.d.ts","sourceRoot":"","sources":["../../../lib/zod-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;oBAOxC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;qBAGrC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;iBAM1C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;kBAG5C,CAAC;AAEF,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH,eAAO,MAAM,wBAAwB,gVAenC,CAAC;AAEH,eAAO,MAAM,gBAAgB,ucAK3B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCvB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOvB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAwB,CAAC;AAyE1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoClC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Entity, EntityType } from '../../types';
2
+ export declare const createEntity: (type: EntityType, value: string) => Entity;
3
+ //# sourceMappingURL=create-entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-entity.d.ts","sourceRoot":"","sources":["../../../../lib/testing/enhanced-utils/create-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,YAAY,GAAI,MAAM,UAAU,EAAE,OAAO,MAAM,KAAG,MAmC9D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IntegrationContext } from '../../context';
2
+ export declare const createMockIntegrationContext: () => IntegrationContext;
3
+ //# sourceMappingURL=create-mock-integration-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-mock-integration-context.d.ts","sourceRoot":"","sources":["../../../../lib/testing/enhanced-utils/create-mock-integration-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,4BAA4B,QAAO,kBAgC/C,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { PolarityRequest } from '../../requests/polarity-request';
2
+ export declare const mockRequest: () => {
3
+ PolarityRequestMock: jest.MockedClass<typeof PolarityRequest>;
4
+ mockRequest: {
5
+ get: jest.Mock<any, any, any>;
6
+ post: jest.Mock<any, any, any>;
7
+ put: jest.Mock<any, any, any>;
8
+ delete: jest.Mock<any, any, any>;
9
+ patch: jest.Mock<any, any, any>;
10
+ head: jest.Mock<any, any, any>;
11
+ options: jest.Mock<any, any, any>;
12
+ };
13
+ };
14
+ //# sourceMappingURL=mock-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock-request.d.ts","sourceRoot":"","sources":["../../../../lib/testing/enhanced-utils/mock-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAIlE,eAAO,MAAM,WAAW;yBAcoB,IAAI,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC;;;;;;;;;;CAGnF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Integration, IntegrationConfig } from '../../types';
2
+ export interface ValidationResult {
3
+ isValid: boolean;
4
+ errors: string[];
5
+ warnings: string[];
6
+ }
7
+ export declare const validateIntegration: (integration: Integration, config?: IntegrationConfig) => ValidationResult;
8
+ //# sourceMappingURL=validate-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-integration.d.ts","sourceRoot":"","sources":["../../../../lib/testing/enhanced-utils/validate-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAsB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKjF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,mBAAmB,GAC9B,aAAa,WAAW,EACxB,SAAS,iBAAiB,KACzB,gBAoCF,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './test-factory/create-integration-tests';
2
+ export * from './enhanced-utils/create-entity';
3
+ export * from './enhanced-utils/create-mock-integration-context';
4
+ export * from './enhanced-utils/mock-request';
5
+ export * from './enhanced-utils/validate-integration';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/testing/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Integration } from '../../types';
2
+ export declare const createIntegrationTests: (integration: Integration) => {
3
+ testDoLookup: any;
4
+ testOnMessage: any;
5
+ };
6
+ //# sourceMappingURL=create-integration-tests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-integration-tests.d.ts","sourceRoot":"","sources":["../../../../lib/testing/test-factory/create-integration-tests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,eAAO,MAAM,sBAAsB,GAAI,aAAa,WAAW;;;CAY9D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { DoLookupResult, DoLookupUserOptions, Entity, Integration } from '../../types';
2
+ export declare const testDoLookup: (integration: Integration, description: string, { entities, options, expected }: {
3
+ entities: Entity[];
4
+ options: DoLookupUserOptions;
5
+ expected: DoLookupResult;
6
+ }) => void;
7
+ //# sourceMappingURL=test-do-lookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-do-lookup.d.ts","sourceRoot":"","sources":["../../../../lib/testing/test-factory/test-do-lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIvF,eAAO,MAAM,YAAY,GACvB,aAAa,WAAW,EACxB,aAAa,MAAM,EACnB,iCAIG;IACD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;CAC1B,SAkBF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DoLookupUserOptions, Integration } from '../../types';
2
+ export declare const testOnMessage: (integration: Integration, description: string, { command, args, expected, options }: {
3
+ command: string;
4
+ args: Record<string, unknown>;
5
+ expected: unknown;
6
+ options?: DoLookupUserOptions;
7
+ }) => void;
8
+ //# sourceMappingURL=test-on-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-on-message.d.ts","sourceRoot":"","sources":["../../../../lib/testing/test-factory/test-on-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/D,eAAO,MAAM,aAAa,GACxB,aAAa,WAAW,EACxB,aAAa,MAAM,EACnB,sCAKG;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,SAmBF,CAAC"}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.13"
8
+ "packageVersion": "7.53.3"
9
9
  }
10
10
  ]
11
11
  }