scotthovestadt / gigya

Gigya JavaScript REST SDK
MIT License
37 stars 62 forks source link

adding the subscriptionSchema as part of the getSchema response #9

Closed EugeneKrapivin closed 7 years ago

scotthovestadt commented 7 years ago

@EugeneKrapivin Are you sure it returns all the same fields? My understanding is that the API returns only:

export interface AccountsSubscriptionSetSchemaField {
    type?: 'boolean';
}

EIther this or the AccountsSubscriptionSetSchemaField interface should change.

EugeneKrapivin commented 7 years ago

@scotthovestadt the API returns all the fields just like any other schema record (shortened for brevity)

{
  "profileSchema": {
    "fields": {
      "address": {
        "writeAccess": "serverOnly",
        "encrypt": "AES",
        "type": "string",
        "allowNull": true,
        "required": false
        }
    },    
    "unique": [],
    "dynamicSchema": false
  },
  "dataSchema": {
    "fields": {
      "asdf": {
        "writeAccess": "clientModify",
        "type": "boolean",
        "allowNull": true,
        "required": false
      }
    },
    "unique": [],
    "dynamicSchema": true
  },
  "subscriptionSchema": {
    "fields": {
      "ThisIsMyUltimateSubscription.email.isSubscribed": {
        "writeAccess": "clientModify",
        "type": "boolean",
        "allowNull": false,
        "required": false
      }
    },
    "unique": [],
    "dynamicSchema": false
  }
}