/**
 * Facebook identity 绑定响应
 */
import { z } from "zod";

import { arrayOrEmpty, stringOrEmpty } from "../../nullable-defaults";

export const FacebookIdentityBindingSchema = z.object({
  conflicts: arrayOrEmpty(z.unknown()),
  bound: arrayOrEmpty(z.unknown()),
});

export const FacebookIdentityResponseSchema = z.object({
  fbAsid: stringOrEmpty,
  fbPsid: stringOrEmpty,
  facebookBinding: FacebookIdentityBindingSchema.default({
    conflicts: [],
    bound: [],
  }),
});

export type FacebookIdentityResponseInput = z.input<
  typeof FacebookIdentityResponseSchema
>;
export type FacebookIdentityResponseData = z.output<
  typeof FacebookIdentityResponseSchema
>;
