@loudcrowd/program-sdk v1.0.0
Install via NPM:
npm install @loudcrowd/program-sdkObtain Program Form Id:
All of the functions in SDK require a program form id in order to retrieve information about the program. This can be obtained by reaching out to your customer service rep.
Available Functions
Check Status
Description: This function will take either a customer’s email address or username and a program identifier and return the customer’s status in the indicated program. These statuses could be Approved, Rejected, Pending, or Not Registered.
Inputs:
id: string 
email(optional): string
username(optional): stringOutputs:
status: 'Approved' | 'Rejected' | 'Pending' | 'Not Registered' Get Program Form
Description: This function takes a program form id and gets information about it. This can be used to get the rules and custom fields for a given program.
Inputs:
id: stringOutputs:
id: string
program = graphene.Field("loudcrowd.graphql.types.PublicProgram")
logo_url: string
ig_username: string
custom_fields = [CustomFieldType]
PublicProgram:
   id: string
   name: string
CustomFieldType:
  id: string
  type: "TEXT" | "SELECT" | "TIKTOK" | "PHONE" | "ADDRESS" | "ADDRESS_2" | "ZIP_CODE" | "STATE" | "COUNTRY" | "CITY"
  title: string
  required: bool
  position: int
  options: [string]Register
Description: This function will take 4 main pieces of data in order to sign the customer up for the program: a program identifier, the customer’s email, and the customer’s instagram username, custom fields. email is required, as well as one of igUsername or ttUsername.
Inputs:
id: string
email: string
igUsername: string
ttUsername: string
customFields: [CustomFieldInput]
CustomFieldInput:
  id: string
  value: stringOutputs:
participants: [Participant]
Participant:
  igUsername: string
  email: string
  ttUsername: string4 years ago