@walkeros/server-destination-aws 4.8.1 → 4.8.2
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/CHANGELOG.md +23 -0
- package/dist/dev.d.mts +7 -2
- package/dist/dev.d.ts +7 -2
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.d.mts +7 -2
- package/dist/examples/index.d.ts +7 -2
- package/dist/examples/index.js +23 -6
- package/dist/examples/index.mjs +24 -7
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/schemas.js +1 -1
- package/dist/schemas.js.map +1 -1
- package/dist/schemas.mjs +1 -1
- package/dist/schemas.mjs.map +1 -1
- package/dist/walkerOS.json +407 -51
- package/package.json +6 -4
package/dist/schemas.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/firehose/schemas/index.ts","../src/firehose/schemas/settings.ts","../src/firehose/schemas/mapping.ts","../src/sns/schemas/index.ts","../src/sns/schemas/settings.ts","../src/sns/schemas/mapping.ts","../src/sns/schemas/setup.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema, FirehoseConfigSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport {\n SettingsSchema,\n type Settings,\n FirehoseConfigSchema,\n} from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n\n// Nested JSON Schema for Firehose subpage\nexport const firehose = zodToSchema(FirehoseConfigSchema);\n","import { z } from '@walkeros/core/dev';\n\nconst streamName = z\n .string()\n .min(1)\n .describe('Name of the Firehose stream (like walkeros-events). Required.')\n .optional();\n\nconst region = z\n .string()\n .describe(\n 'AWS region of the stream (like eu-central-1). Default: AWS_REGION or the active profile, else eu-central-1.',\n );\n\nconst client = z\n .any()\n .describe(\n 'A FirehoseClient of your own. Used as is and never closed by the destination.',\n );\n\nconst config = z\n .any()\n .describe(\n 'Raw FirehoseClient options passed to the SDK (like { endpoint, maxAttempts }). Put keys in config.credentials instead.',\n );\n\n/** @deprecated The nested form, still read as an alias of the flat fields. */\nexport const FirehoseConfigSchema = z.object({\n streamName,\n client: client.optional(),\n region: region.optional(),\n config: config.optional(),\n});\n\nexport const SettingsSchema = z.object({\n
|
|
1
|
+
{"version":3,"sources":["../src/firehose/schemas/index.ts","../src/firehose/schemas/settings.ts","../src/firehose/schemas/mapping.ts","../src/sns/schemas/index.ts","../src/sns/schemas/settings.ts","../src/sns/schemas/mapping.ts","../src/sns/schemas/setup.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema, FirehoseConfigSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport {\n SettingsSchema,\n type Settings,\n FirehoseConfigSchema,\n} from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n\n// Nested JSON Schema for Firehose subpage\nexport const firehose = zodToSchema(FirehoseConfigSchema);\n","import { z } from '@walkeros/core/dev';\n\nconst streamName = z\n .string()\n .min(1)\n .describe('Name of the Firehose stream (like walkeros-events). Required.')\n .optional();\n\nconst region = z\n .string()\n .describe(\n 'AWS region of the stream (like eu-central-1). Default: AWS_REGION or the active profile, else eu-central-1.',\n );\n\nconst client = z\n .any()\n .describe(\n 'A FirehoseClient of your own. Used as is and never closed by the destination.',\n );\n\nconst config = z\n .any()\n .describe(\n 'Raw FirehoseClient options passed to the SDK (like { endpoint, maxAttempts }). Put keys in config.credentials instead.',\n );\n\n/** @deprecated The nested form, still read as an alias of the flat fields. */\nexport const FirehoseConfigSchema = z.object({\n streamName,\n client: client.optional(),\n region: region.optional(),\n config: config.optional(),\n});\n\nexport const SettingsSchema = z\n .object({\n // Optional in the schema only so the deprecated alias still validates;\n // init throws when neither form names a stream.\n streamName,\n region: region.optional(),\n newline: z\n .boolean()\n .describe(\n 'Append a newline to every record (default true). Set false when the stream adds its own new line delimiter.',\n )\n .optional(),\n config: config.optional(),\n client: client.optional(),\n firehose: FirehoseConfigSchema.describe(\n 'Deprecated: use the flat fields streamName, region, config and client.',\n ).optional(),\n })\n .refine(\n (settings) =>\n settings.streamName !== undefined ||\n settings.firehose?.streamName !== undefined,\n { message: 'Set settings.streamName' },\n )\n // The same rule in JSON Schema: the stream is named in one of both forms.\n .meta({\n anyOf: [\n { required: ['streamName'] },\n {\n required: ['firehose'],\n properties: { firehose: { required: ['streamName'] } },\n },\n ],\n });\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * AWS Firehose Mapping Schema\n * Firehose has no rule-level settings: a rule's `data` becomes the record.\n */\nexport const MappingSchema = z.object({});\n\n/**\n * Type inference from MappingSchema\n */\nexport type Mapping = z.infer<typeof MappingSchema>;\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\nimport { SetupSchema } from './setup';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\nexport {\n SetupSchema,\n SetupSubscriptionSchema,\n type Setup,\n type SetupSubscription,\n} from './setup';\n\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\nexport const setup = zodToSchema(SetupSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z\n .object({\n topicArn: z\n .string()\n .describe(\n 'Topic ARN (like arn:aws:sns:eu-central-1:123456789012:walkeros-events). Region and topic name derive from it. Required unless topicName is set.',\n )\n .optional(),\n topicName: z\n .string()\n .min(1)\n .describe(\n 'Topic name (like walkeros-events). Used by walkeros setup; without topicArn the ARN is completed with the account id at the first publish.',\n )\n .optional(),\n region: z\n .string()\n .describe(\n 'AWS region (like eu-central-1). Default: the region in topicArn, AWS_REGION or the active profile, else eu-central-1.',\n )\n .optional(),\n client: z\n .any()\n .describe(\n 'An SNSClient of your own. Used as is and never closed by the destination.',\n )\n .optional(),\n config: z\n .any()\n .describe(\n 'Raw SNSClient options passed to the SDK. Put keys in config.credentials instead.',\n )\n .optional(),\n })\n .refine(\n (settings) =>\n settings.topicArn !== undefined || settings.topicName !== undefined,\n { message: 'Set settings.topicArn or settings.topicName' },\n )\n // The same rule in JSON Schema: one of both names the topic.\n .meta({\n anyOf: [{ required: ['topicArn'] }, { required: ['topicName'] }],\n });\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\n/**\n * SNS Mapping Schema.\n *\n * `messageAttributes` is `Mapping.Map`: each value resolves per event to the\n * SDK's `{ DataType, StringValue }` shape. Schema accepts any structure;\n * runtime mapping resolution coerces shape via `getMappingValue`.\n *\n * `messageGroupId` and `messageDeduplicationId` are `Mapping.Value`: a string\n * path or a value-config object.\n */\nexport const MappingSchema = z.object({\n messageAttributes: z.record(z.string(), z.unknown()).optional(),\n messageGroupId: z.unknown().optional(),\n messageDeduplicationId: z.unknown().optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const SetupSubscriptionSchema = z.object({\n protocol: z.enum(['sqs', 'lambda', 'https', 'http', 'email', 'sms']),\n endpoint: z.string().min(1),\n rawMessageDelivery: z.boolean().optional(),\n filterPolicy: z.record(z.string(), z.unknown()).optional(),\n deadLetterTargetArn: z.string().optional(),\n});\n\nexport const SetupSchema = z.object({\n region: z.string().optional(),\n displayName: z.string().optional(),\n fifoTopic: z.boolean().optional(),\n kmsMasterKeyId: z.string().optional(),\n tags: z.record(z.string(), z.string()).optional(),\n subscriptions: z.array(SetupSubscriptionSchema).optional(),\n});\n\nexport type Setup = z.infer<typeof SetupSchema>;\nexport type SetupSubscription = z.inf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