Skip to content

Latest commit

 

History

History
83 lines (78 loc) · 10.6 KB

licensekeywithactivations.md

File metadata and controls

83 lines (78 loc) · 10.6 KB

LicenseKeyWithActivations

Example Usage

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

let value: LicenseKeyWithActivations = {
  id: "<value>",
  organizationId: "<value>",
  userId: "<value>",
  customerId: "<value>",
  user: {
    id: "<value>",
    email: "[email protected]",
    publicName: "<value>",
  },
  customer: {
    id: "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
    createdAt: new Date("2024-03-03T12:22:36.931Z"),
    modifiedAt: new Date("2023-11-26T18:41:57.166Z"),
    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("2024-11-30T00:45:45.135Z"),
    avatarUrl: "https://www.gravatar.com/avatar/xxx?d=blank",
  },
  benefitId: "<value>",
  key: "<key>",
  displayKey: "<value>",
  status: "disabled",
  limitActivations: 572474,
  usage: 126999,
  limitUsage: 788582,
  validations: 774664,
  lastValidatedAt: new Date("2024-03-19T10:51:16.611Z"),
  expiresAt: new Date("2024-08-14T04:12:35.655Z"),
  activations: [
    {
      id: "<value>",
      licenseKeyId: "<value>",
      label: "<value>",
      meta: {},
      createdAt: new Date("2024-04-10T16:12:05.280Z"),
      modifiedAt: new Date("2023-09-03T18:31:34.012Z"),
    },
  ],
};

Fields

Field Type Required Description
id string ✔️ N/A
organizationId string ✔️ N/A
userId string ✔️ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
customerId string ✔️ N/A
user components.LicenseKeyUser ✔️ N/A
customer components.LicenseKeyCustomer ✔️ N/A
benefitId string ✔️ The benefit ID.
key string ✔️ N/A
displayKey string ✔️ N/A
status components.LicenseKeyStatus ✔️ N/A
limitActivations number ✔️ N/A
usage number ✔️ N/A
limitUsage number ✔️ N/A
validations number ✔️ N/A
lastValidatedAt Date ✔️ N/A
expiresAt Date ✔️ N/A
activations components.LicenseKeyActivationBase[] ✔️ N/A