Capability Spec
apiVersion: naftiko.dev/v1
kind: CapabilityWorkflow
metadata:
name: bulk-address-cleansing
description: |
Normalize and canonicalize a list of raw, user-supplied addresses by batch-geocoding
them through positionstack. Returns the cleansed label, structured fields, and
confidence score per record. Requires Professional plan or above.
spec:
inputs:
- name: addresses
type: array
items: string
required: true
maxItems: 80
steps:
- id: batch-forward
uses: positionstack-geocoding#forward-batch
with:
query: "{{ inputs.addresses | join(',') }}"
limit: 1
bind:
results: data
outputs:
cleansed:
type: array
template:
original: "{{ item.query }}"
label: "{{ item.label }}"
latitude: "{{ item.latitude }}"
longitude: "{{ item.longitude }}"
confidence: "{{ item.confidence }}"
country_code: "{{ item.country_code }}"
from: "{{ results }}"