@polar-sh/sdk 0.19.0 → 0.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/docs/sdks/benefits/README.md +0 -1
- package/docs/sdks/customersessions/README.md +85 -0
- package/funcs/customerSessionsCreate.d.ts +16 -0
- package/funcs/customerSessionsCreate.d.ts.map +1 -0
- package/funcs/customerSessionsCreate.js +100 -0
- package/funcs/customerSessionsCreate.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/benefitcreate.d.ts +4 -4
- package/models/components/benefitcreate.d.ts.map +1 -1
- package/models/components/benefitcreate.js +6 -6
- package/models/components/benefitcreate.js.map +1 -1
- package/models/components/benefitcustom.d.ts +1 -1
- package/models/components/benefitcustomcreate.d.ts +0 -5
- package/models/components/benefitcustomcreate.d.ts.map +1 -1
- package/models/components/benefitcustomcreate.js +0 -4
- package/models/components/benefitcustomcreate.js.map +1 -1
- package/models/components/benefitgithubrepositoryproperties.d.ts +5 -0
- package/models/components/benefitgithubrepositoryproperties.d.ts.map +1 -1
- package/models/components/benefitgithubrepositoryproperties.js +4 -0
- package/models/components/benefitgithubrepositoryproperties.js.map +1 -1
- package/models/components/checkout.d.ts +27 -0
- package/models/components/checkout.d.ts.map +1 -1
- package/models/components/checkout.js +28 -1
- package/models/components/checkout.js.map +1 -1
- package/models/components/checkoutlinkupdate.d.ts +0 -14
- package/models/components/checkoutlinkupdate.d.ts.map +1 -1
- package/models/components/checkoutlinkupdate.js.map +1 -1
- package/models/components/checkoutpricecreate.d.ts +41 -0
- package/models/components/checkoutpricecreate.d.ts.map +1 -1
- package/models/components/checkoutpricecreate.js +28 -1
- package/models/components/checkoutpricecreate.js.map +1 -1
- package/models/components/checkoutproductcreate.d.ts +41 -0
- package/models/components/checkoutproductcreate.d.ts.map +1 -1
- package/models/components/checkoutproductcreate.js +28 -1
- package/models/components/checkoutproductcreate.js.map +1 -1
- package/models/components/checkoutupdate.d.ts +38 -11
- package/models/components/checkoutupdate.d.ts.map +1 -1
- package/models/components/checkoutupdate.js +28 -1
- package/models/components/checkoutupdate.js.map +1 -1
- package/models/components/customer.d.ts +13 -13
- package/models/components/customer.d.ts.map +1 -1
- package/models/components/customer.js +16 -16
- package/models/components/customer.js.map +1 -1
- package/models/components/customersession.d.ts +57 -0
- package/models/components/customersession.d.ts.map +1 -0
- package/models/components/customersession.js +87 -0
- package/models/components/customersession.js.map +1 -0
- package/models/components/customersessioncreate.d.ts +35 -0
- package/models/components/customersessioncreate.d.ts.map +1 -0
- package/models/components/customersessioncreate.js +68 -0
- package/models/components/customersessioncreate.js.map +1 -0
- package/models/components/customfieldupdatecheckbox.d.ts +0 -14
- package/models/components/customfieldupdatecheckbox.d.ts.map +1 -1
- package/models/components/customfieldupdatecheckbox.js.map +1 -1
- package/models/components/customfieldupdatedate.d.ts +0 -14
- package/models/components/customfieldupdatedate.d.ts.map +1 -1
- package/models/components/customfieldupdatedate.js.map +1 -1
- package/models/components/customfieldupdatenumber.d.ts +0 -14
- package/models/components/customfieldupdatenumber.d.ts.map +1 -1
- package/models/components/customfieldupdatenumber.js.map +1 -1
- package/models/components/customfieldupdateselect.d.ts +0 -14
- package/models/components/customfieldupdateselect.d.ts.map +1 -1
- package/models/components/customfieldupdateselect.js.map +1 -1
- package/models/components/customfieldupdatetext.d.ts +0 -14
- package/models/components/customfieldupdatetext.d.ts.map +1 -1
- package/models/components/customfieldupdatetext.js.map +1 -1
- package/models/components/discountupdate.d.ts +0 -14
- package/models/components/discountupdate.d.ts.map +1 -1
- package/models/components/discountupdate.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/oauth2client.js +2 -2
- package/models/components/oauth2client.js.map +1 -1
- package/models/components/oauth2clientconfiguration.js +2 -2
- package/models/components/oauth2clientconfiguration.js.map +1 -1
- package/models/components/oauth2clientconfigurationupdate.js +2 -2
- package/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/models/components/ordersubscription.d.ts +5 -0
- package/models/components/ordersubscription.d.ts.map +1 -1
- package/models/components/ordersubscription.js +4 -0
- package/models/components/ordersubscription.js.map +1 -1
- package/models/components/orderuser.d.ts +2 -0
- package/models/components/orderuser.d.ts.map +1 -1
- package/models/components/orderuser.js +4 -0
- package/models/components/orderuser.js.map +1 -1
- package/models/components/productupdate.d.ts +0 -14
- package/models/components/productupdate.d.ts.map +1 -1
- package/models/components/productupdate.js.map +1 -1
- package/models/components/scope.d.ts +3 -0
- package/models/components/scope.d.ts.map +1 -1
- package/models/components/scope.js +1 -0
- package/models/components/scope.js.map +1 -1
- package/models/components/subscriptionuser.d.ts +2 -0
- package/models/components/subscriptionuser.d.ts.map +1 -1
- package/models/components/subscriptionuser.js +4 -0
- package/models/components/subscriptionuser.js.map +1 -1
- package/package.json +1 -1
- package/sdk/customersessions.d.ts +12 -0
- package/sdk/customersessions.d.ts.map +1 -0
- package/sdk/customersessions.js +22 -0
- package/sdk/customersessions.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +5 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/customerSessionsCreate.ts +132 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/benefitcreate.ts +14 -14
- package/src/models/components/benefitcustom.ts +1 -1
- package/src/models/components/benefitcustomcreate.ts +0 -9
- package/src/models/components/benefitgithubrepositoryproperties.ts +9 -0
- package/src/models/components/checkout.ts +60 -0
- package/src/models/components/checkoutlinkupdate.ts +0 -14
- package/src/models/components/checkoutpricecreate.ts +82 -0
- package/src/models/components/checkoutproductcreate.ts +82 -0
- package/src/models/components/checkoutupdate.ts +79 -11
- package/src/models/components/customer.ts +21 -21
- package/src/models/components/customersession.ts +126 -0
- package/src/models/components/customersessioncreate.ts +81 -0
- package/src/models/components/customfieldupdatecheckbox.ts +0 -14
- package/src/models/components/customfieldupdatedate.ts +0 -14
- package/src/models/components/customfieldupdatenumber.ts +0 -14
- package/src/models/components/customfieldupdateselect.ts +0 -14
- package/src/models/components/customfieldupdatetext.ts +0 -14
- package/src/models/components/discountupdate.ts +0 -14
- package/src/models/components/index.ts +2 -0
- package/src/models/components/oauth2client.ts +2 -2
- package/src/models/components/oauth2clientconfiguration.ts +2 -2
- package/src/models/components/oauth2clientconfigurationupdate.ts +2 -2
- package/src/models/components/ordersubscription.ts +9 -0
- package/src/models/components/orderuser.ts +6 -0
- package/src/models/components/productupdate.ts +0 -14
- package/src/models/components/scope.ts +1 -0
- package/src/models/components/subscriptionuser.ts +6 -0
- package/src/sdk/customersessions.ts +27 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -24,20 +24,6 @@ export type DiscountUpdateMetadata = string | number | boolean;
|
|
|
24
24
|
* Schema to update a discount.
|
|
25
25
|
*/
|
|
26
26
|
export type DiscountUpdate = {
|
|
27
|
-
/**
|
|
28
|
-
* Key-value object allowing you to store additional information.
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
*
|
|
32
|
-
* The key must be a string with a maximum length of **40 characters**.
|
|
33
|
-
* The value must be either:
|
|
34
|
-
*
|
|
35
|
-
* * A string with a maximum length of **500 characters**
|
|
36
|
-
* * An integer
|
|
37
|
-
* * A boolean
|
|
38
|
-
*
|
|
39
|
-
* You can store up to **50 key-value pairs**.
|
|
40
|
-
*/
|
|
41
27
|
metadata?: { [k: string]: string | number | boolean } | null | undefined;
|
|
42
28
|
name?: string | null | undefined;
|
|
43
29
|
code?: string | null | undefined;
|
|
@@ -120,6 +120,8 @@ export * from "./customerordersortproperty.js";
|
|
|
120
120
|
export * from "./customerordersubscription.js";
|
|
121
121
|
export * from "./customerportalcustomer.js";
|
|
122
122
|
export * from "./customerportaloauthaccount.js";
|
|
123
|
+
export * from "./customersession.js";
|
|
124
|
+
export * from "./customersessioncreate.js";
|
|
123
125
|
export * from "./customersortproperty.js";
|
|
124
126
|
export * from "./customersubscription.js";
|
|
125
127
|
export * from "./customersubscriptionproduct.js";
|
|
@@ -128,7 +128,7 @@ export const OAuth2Client$inboundSchema: z.ZodType<
|
|
|
128
128
|
grant_types: z.array(GrantTypes$inboundSchema).optional(),
|
|
129
129
|
response_types: z.array(ResponseTypes$inboundSchema).optional(),
|
|
130
130
|
scope: z.string().default(
|
|
131
|
-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
131
|
+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
132
132
|
),
|
|
133
133
|
client_name: z.string(),
|
|
134
134
|
client_uri: z.nullable(z.string()).optional(),
|
|
@@ -196,7 +196,7 @@ export const OAuth2Client$outboundSchema: z.ZodType<
|
|
|
196
196
|
grantTypes: z.array(GrantTypes$outboundSchema).optional(),
|
|
197
197
|
responseTypes: z.array(ResponseTypes$outboundSchema).optional(),
|
|
198
198
|
scope: z.string().default(
|
|
199
|
-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
199
|
+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
200
200
|
),
|
|
201
201
|
clientName: z.string(),
|
|
202
202
|
clientUri: z.nullable(z.string()).optional(),
|
|
@@ -134,7 +134,7 @@ export const OAuth2ClientConfiguration$inboundSchema: z.ZodType<
|
|
|
134
134
|
response_types: z.array(OAuth2ClientConfigurationResponseTypes$inboundSchema)
|
|
135
135
|
.optional(),
|
|
136
136
|
scope: z.string().default(
|
|
137
|
-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
137
|
+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
138
138
|
),
|
|
139
139
|
client_name: z.string(),
|
|
140
140
|
client_uri: z.nullable(z.string()).optional(),
|
|
@@ -185,7 +185,7 @@ export const OAuth2ClientConfiguration$outboundSchema: z.ZodType<
|
|
|
185
185
|
responseTypes: z.array(OAuth2ClientConfigurationResponseTypes$outboundSchema)
|
|
186
186
|
.optional(),
|
|
187
187
|
scope: z.string().default(
|
|
188
|
-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
188
|
+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
189
189
|
),
|
|
190
190
|
clientName: z.string(),
|
|
191
191
|
clientUri: z.nullable(z.string()).optional(),
|
|
@@ -138,7 +138,7 @@ export const OAuth2ClientConfigurationUpdate$inboundSchema: z.ZodType<
|
|
|
138
138
|
OAuth2ClientConfigurationUpdateResponseTypes$inboundSchema,
|
|
139
139
|
).optional(),
|
|
140
140
|
scope: z.string().default(
|
|
141
|
-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
141
|
+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
142
142
|
),
|
|
143
143
|
client_name: z.string(),
|
|
144
144
|
client_uri: z.nullable(z.string()).optional(),
|
|
@@ -192,7 +192,7 @@ export const OAuth2ClientConfigurationUpdate$outboundSchema: z.ZodType<
|
|
|
192
192
|
OAuth2ClientConfigurationUpdateResponseTypes$outboundSchema,
|
|
193
193
|
).optional(),
|
|
194
194
|
scope: z.string().default(
|
|
195
|
-
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
195
|
+
"openid profile email user:read organizations:read organizations:write custom_fields:read custom_fields:write discounts:read discounts:write checkout_links:read checkout_links:write checkouts:read checkouts:write products:read products:write benefits:read benefits:write files:read files:write subscriptions:read subscriptions:write customers:read customers:write customer_sessions:write orders:read metrics:read webhooks:read webhooks:write external_organizations:read license_keys:read license_keys:write repositories:read repositories:write issues:read issues:write customer_portal:read customer_portal:write",
|
|
196
196
|
),
|
|
197
197
|
clientName: z.string(),
|
|
198
198
|
clientUri: z.nullable(z.string()).optional(),
|
|
@@ -48,6 +48,10 @@ export type OrderSubscription = {
|
|
|
48
48
|
priceId: string;
|
|
49
49
|
discountId: string | null;
|
|
50
50
|
checkoutId: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
53
|
+
*/
|
|
54
|
+
userId: string;
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
/** @internal */
|
|
@@ -132,6 +136,7 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
132
136
|
price_id: z.string(),
|
|
133
137
|
discount_id: z.nullable(z.string()),
|
|
134
138
|
checkout_id: z.nullable(z.string()),
|
|
139
|
+
user_id: z.string(),
|
|
135
140
|
}).transform((v) => {
|
|
136
141
|
return remap$(v, {
|
|
137
142
|
"created_at": "createdAt",
|
|
@@ -147,6 +152,7 @@ export const OrderSubscription$inboundSchema: z.ZodType<
|
|
|
147
152
|
"price_id": "priceId",
|
|
148
153
|
"discount_id": "discountId",
|
|
149
154
|
"checkout_id": "checkoutId",
|
|
155
|
+
"user_id": "userId",
|
|
150
156
|
});
|
|
151
157
|
});
|
|
152
158
|
|
|
@@ -170,6 +176,7 @@ export type OrderSubscription$Outbound = {
|
|
|
170
176
|
price_id: string;
|
|
171
177
|
discount_id: string | null;
|
|
172
178
|
checkout_id: string | null;
|
|
179
|
+
user_id: string;
|
|
173
180
|
};
|
|
174
181
|
|
|
175
182
|
/** @internal */
|
|
@@ -196,6 +203,7 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
196
203
|
priceId: z.string(),
|
|
197
204
|
discountId: z.nullable(z.string()),
|
|
198
205
|
checkoutId: z.nullable(z.string()),
|
|
206
|
+
userId: z.string(),
|
|
199
207
|
}).transform((v) => {
|
|
200
208
|
return remap$(v, {
|
|
201
209
|
createdAt: "created_at",
|
|
@@ -211,6 +219,7 @@ export const OrderSubscription$outboundSchema: z.ZodType<
|
|
|
211
219
|
priceId: "price_id",
|
|
212
220
|
discountId: "discount_id",
|
|
213
221
|
checkoutId: "checkout_id",
|
|
222
|
+
userId: "user_id",
|
|
214
223
|
});
|
|
215
224
|
});
|
|
216
225
|
|
|
@@ -13,6 +13,7 @@ export type OrderUser = {
|
|
|
13
13
|
email: string;
|
|
14
14
|
publicName: string;
|
|
15
15
|
avatarUrl?: string | null | undefined;
|
|
16
|
+
githubUsername?: string | null | undefined;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
/** @internal */
|
|
@@ -25,10 +26,12 @@ export const OrderUser$inboundSchema: z.ZodType<
|
|
|
25
26
|
email: z.string(),
|
|
26
27
|
public_name: z.string(),
|
|
27
28
|
avatar_url: z.nullable(z.string()).optional(),
|
|
29
|
+
github_username: z.nullable(z.string()).optional(),
|
|
28
30
|
}).transform((v) => {
|
|
29
31
|
return remap$(v, {
|
|
30
32
|
"public_name": "publicName",
|
|
31
33
|
"avatar_url": "avatarUrl",
|
|
34
|
+
"github_username": "githubUsername",
|
|
32
35
|
});
|
|
33
36
|
});
|
|
34
37
|
|
|
@@ -38,6 +41,7 @@ export type OrderUser$Outbound = {
|
|
|
38
41
|
email: string;
|
|
39
42
|
public_name: string;
|
|
40
43
|
avatar_url?: string | null | undefined;
|
|
44
|
+
github_username?: string | null | undefined;
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
/** @internal */
|
|
@@ -50,10 +54,12 @@ export const OrderUser$outboundSchema: z.ZodType<
|
|
|
50
54
|
email: z.string(),
|
|
51
55
|
publicName: z.string(),
|
|
52
56
|
avatarUrl: z.nullable(z.string()).optional(),
|
|
57
|
+
githubUsername: z.nullable(z.string()).optional(),
|
|
53
58
|
}).transform((v) => {
|
|
54
59
|
return remap$(v, {
|
|
55
60
|
publicName: "public_name",
|
|
56
61
|
avatarUrl: "avatar_url",
|
|
62
|
+
githubUsername: "github_username",
|
|
57
63
|
});
|
|
58
64
|
});
|
|
59
65
|
|
|
@@ -64,20 +64,6 @@ export type ProductUpdatePrices =
|
|
|
64
64
|
* Schema to update a product.
|
|
65
65
|
*/
|
|
66
66
|
export type ProductUpdate = {
|
|
67
|
-
/**
|
|
68
|
-
* Key-value object allowing you to store additional information.
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
*
|
|
72
|
-
* The key must be a string with a maximum length of **40 characters**.
|
|
73
|
-
* The value must be either:
|
|
74
|
-
*
|
|
75
|
-
* * A string with a maximum length of **500 characters**
|
|
76
|
-
* * An integer
|
|
77
|
-
* * A boolean
|
|
78
|
-
*
|
|
79
|
-
* You can store up to **50 key-value pairs**.
|
|
80
|
-
*/
|
|
81
67
|
metadata?: { [k: string]: string | number | boolean } | null | undefined;
|
|
82
68
|
name?: string | null | undefined;
|
|
83
69
|
/**
|
|
@@ -32,6 +32,7 @@ export const Scope = {
|
|
|
32
32
|
SubscriptionsWrite: "subscriptions:write",
|
|
33
33
|
CustomersRead: "customers:read",
|
|
34
34
|
CustomersWrite: "customers:write",
|
|
35
|
+
CustomerSessionsWrite: "customer_sessions:write",
|
|
35
36
|
OrdersRead: "orders:read",
|
|
36
37
|
MetricsRead: "metrics:read",
|
|
37
38
|
WebhooksRead: "webhooks:read",
|
|
@@ -13,6 +13,7 @@ export type SubscriptionUser = {
|
|
|
13
13
|
email: string;
|
|
14
14
|
publicName: string;
|
|
15
15
|
avatarUrl?: string | null | undefined;
|
|
16
|
+
githubUsername?: string | null | undefined;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
/** @internal */
|
|
@@ -25,10 +26,12 @@ export const SubscriptionUser$inboundSchema: z.ZodType<
|
|
|
25
26
|
email: z.string(),
|
|
26
27
|
public_name: z.string(),
|
|
27
28
|
avatar_url: z.nullable(z.string()).optional(),
|
|
29
|
+
github_username: z.nullable(z.string()).optional(),
|
|
28
30
|
}).transform((v) => {
|
|
29
31
|
return remap$(v, {
|
|
30
32
|
"public_name": "publicName",
|
|
31
33
|
"avatar_url": "avatarUrl",
|
|
34
|
+
"github_username": "githubUsername",
|
|
32
35
|
});
|
|
33
36
|
});
|
|
34
37
|
|
|
@@ -38,6 +41,7 @@ export type SubscriptionUser$Outbound = {
|
|
|
38
41
|
email: string;
|
|
39
42
|
public_name: string;
|
|
40
43
|
avatar_url?: string | null | undefined;
|
|
44
|
+
github_username?: string | null | undefined;
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
/** @internal */
|
|
@@ -50,10 +54,12 @@ export const SubscriptionUser$outboundSchema: z.ZodType<
|
|
|
50
54
|
email: z.string(),
|
|
51
55
|
publicName: z.string(),
|
|
52
56
|
avatarUrl: z.nullable(z.string()).optional(),
|
|
57
|
+
githubUsername: z.nullable(z.string()).optional(),
|
|
53
58
|
}).transform((v) => {
|
|
54
59
|
return remap$(v, {
|
|
55
60
|
publicName: "public_name",
|
|
56
61
|
avatarUrl: "avatar_url",
|
|
62
|
+
githubUsername: "github_username",
|
|
57
63
|
});
|
|
58
64
|
});
|
|
59
65
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { customerSessionsCreate } from "../funcs/customerSessionsCreate.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as components from "../models/components/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class CustomerSessions extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Create Customer Session
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Create a customer session.
|
|
16
|
+
*/
|
|
17
|
+
async create(
|
|
18
|
+
request: components.CustomerSessionCreate,
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): Promise<components.CustomerSession> {
|
|
21
|
+
return unwrapAsync(customerSessionsCreate(
|
|
22
|
+
this,
|
|
23
|
+
request,
|
|
24
|
+
options,
|
|
25
|
+
));
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { CheckoutLinks } from "./checkoutlinks.js";
|
|
|
9
9
|
import { Checkouts } from "./checkouts.js";
|
|
10
10
|
import { CustomerPortal } from "./customerportal.js";
|
|
11
11
|
import { Customers } from "./customers.js";
|
|
12
|
+
import { CustomerSessions } from "./customersessions.js";
|
|
12
13
|
import { CustomFields } from "./customfields.js";
|
|
13
14
|
import { Discounts } from "./discounts.js";
|
|
14
15
|
import { ExternalOrganizations } from "./externalorganizations.js";
|
|
@@ -114,4 +115,9 @@ export class Polar extends ClientSDK {
|
|
|
114
115
|
get customerPortal(): CustomerPortal {
|
|
115
116
|
return (this._customerPortal ??= new CustomerPortal(this._options));
|
|
116
117
|
}
|
|
118
|
+
|
|
119
|
+
private _customerSessions?: CustomerSessions;
|
|
120
|
+
get customerSessions(): CustomerSessions {
|
|
121
|
+
return (this._customerSessions ??= new CustomerSessions(this._options));
|
|
122
|
+
}
|
|
117
123
|
}
|