forked from NuroDev/lemonsqueezy.ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
licenseKeyInstance.types.ts
63 lines (58 loc) · 1.71 KB
/
licenseKeyInstance.types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import type {
BaseLemonsqueezyResponse,
LemonsqueezyDataType,
PaginatedBaseLemonsqueezyResponse,
SharedLemonsqueezyOptions,
} from "~/shared";
/**
* @docs https://docs.lemonsqueezy.com/api/license-key-instances#the-license-key-instance-object
*/
export interface LemonsqueezyLicenseKeyInstance {
attributes: {
/**
* An ISO-8601 formatted date-time string indicating when the object was created
*
* @see https://en.wikipedia.org/wiki/ISO_8601
*/
created_at: Date;
/**
* The unique identifier (UUID) for this instance
*
* This is the `instance_id` returned when activating a license key
*
* @docs https://docs.lemonsqueezy.com/help/licensing/license-api#post-v1-licenses-activate
*/
identifier: string;
/**
* The ID of the license key this instance belongs to
*/
license_key_id: number;
/**
* The name of the license key instance
*/
name: string;
/**
* An ISO-8601 formatted date-time string indicating when the object was last updated
*
* @see https://en.wikipedia.org/wiki/ISO_8601
*/
updated_at: Date;
};
type: LemonsqueezyDataType.license_key_instances;
id: string;
}
export interface ListAllLicenseKeyInstancesOptions
extends SharedLemonsqueezyOptions {
/**
* Only return instances belonging to the license key with this ID
*/
licenseKeyId?: string;
}
export type ListAllLicenseKeyInstancesResult =
PaginatedBaseLemonsqueezyResponse<Array<LemonsqueezyLicenseKeyInstance>>;
export interface RetrieveLicenseKeyInstanceOptions
extends SharedLemonsqueezyOptions {
id: string;
}
export type RetrieveLicenseKeyInstanceResult =
BaseLemonsqueezyResponse<LemonsqueezyLicenseKeyInstance>;