Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 4.88 KB

customersession.md

File metadata and controls

54 lines (48 loc) · 4.88 KB

CustomerSession

A customer session that can be used to authenticate as a customer.

Example Usage

import { CustomerSession } from "@polar-sh/sdk/models/components/customersession.js";

let value: CustomerSession = {
  createdAt: new Date("2023-07-02T22:27:37.876Z"),
  modifiedAt: new Date("2024-05-21T11:23:34.323Z"),
  id: "<value>",
  token: "<value>",
  expiresAt: new Date("2024-04-12T10:21:55.865Z"),
  customerPortalUrl: "https://frequent-festival.name",
  customerId: "<value>",
  customer: {
    id: "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
    createdAt: new Date("2023-12-12T10:38:57.042Z"),
    modifiedAt: new Date("2025-07-21T20:47:36.754Z"),
    metadata: {
      "key": "<value>",
    },
    externalId: "usr_1337",
    email: "[email protected]",
    emailVerified: true,
    name: "John Doe",
    billingAddress: {
      country: "FR",
    },
    taxId: [
      "911144442",
      "us_ein",
    ],
    organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
    deletedAt: new Date("2025-11-09T20:02:22.939Z"),
    avatarUrl: "https://www.gravatar.com/avatar/xxx?d=blank",
  },
};

Fields

Field Type Required Description
createdAt Date ✔️ Creation timestamp of the object.
modifiedAt Date ✔️ Last modification timestamp of the object.
id string ✔️ The ID of the object.
token string ✔️ N/A
expiresAt Date ✔️ N/A
customerPortalUrl string ✔️ N/A
customerId string ✔️ N/A
customer components.Customer ✔️ A customer in an organization.