@indigov/zips-user-updates
TypeScript icon, indicating that this package has built-in type declarations

0.0.26 • Public • Published

ZIPS User Updates

This simple repo helps consolidate the data flow necessary to find accurate zip codes and Congressional districts for Zendesk users.

Pseudocode usage below. See index.test.ts for exact usage.

import ZIPSUserUpdates from '@indigov/zips-user-updates'

const zipsUserUpdates = ZIPSUserUpdates({
  zipsUrl: 'https://zips.com',
  zipsToken: 'token',
  district: 'AZ-01',
  cohort: 'ushor',
})

for (const user of await fetchAllZendeskUsers()) {
  const userFields = await zipsUserUpdates(user)
  if (userFields) {
    await updateZendeskUser({
      id: user.id,
      user_fields: userFields,
    })
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @indigov/zips-user-updates

Weekly Downloads

84

Version

0.0.26

License

ISC

Unpacked Size

35.6 kB

Total Files

9

Last publish

Collaborators

  • dmarg
  • lsapoz-indigov
  • cs-indigov
  • jezgo
  • elindigov
  • indigovadmin
  • derjacques
  • youngkwangk
  • e10jc
  • faizan-ali
  • josephemswiler
  • ishwaryav