@deliverart/sdk-js-api-token 2.3.3 → 2.3.5
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/dist/index.cjs +6 -5
- package/dist/index.d.cts +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +6 -5
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -11252,7 +11252,8 @@ var apiTokenSchema = external_exports.object({
|
|
|
11252
11252
|
roles: external_exports.array(import_sdk_js_user.securityRoleSchema),
|
|
11253
11253
|
type: apiTokenTypeSchema,
|
|
11254
11254
|
createdAt: import_sdk_js_global_types2.datetimeSchema,
|
|
11255
|
-
expiresAt: import_sdk_js_global_types2.datetimeSchema.nullable()
|
|
11255
|
+
expiresAt: import_sdk_js_global_types2.datetimeSchema.nullable(),
|
|
11256
|
+
lastUsedAt: import_sdk_js_global_types2.datetimeSchema.nullable()
|
|
11256
11257
|
});
|
|
11257
11258
|
var apiTokenListItemSchema = apiTokenSchema.omit({
|
|
11258
11259
|
token: true
|
|
@@ -11352,7 +11353,7 @@ var GetApiTokens = class extends import_sdk_js_core3.AbstractApiRequest {
|
|
|
11352
11353
|
return "/api_tokens";
|
|
11353
11354
|
}
|
|
11354
11355
|
parseResponse(data, rawResponse) {
|
|
11355
|
-
const apiTokens = external_exports.array(
|
|
11356
|
+
const apiTokens = external_exports.array(apiTokenListItemSchema).parse(data);
|
|
11356
11357
|
return this.validateOutput({
|
|
11357
11358
|
data: apiTokens,
|
|
11358
11359
|
pagination: (0, import_sdk_js_global_types3.responseToPagination)(rawResponse)
|
|
@@ -11451,7 +11452,7 @@ var GetApiTokenFullAccessList = class extends import_sdk_js_core7.AbstractApiReq
|
|
|
11451
11452
|
return "/api_tokens/full_access";
|
|
11452
11453
|
}
|
|
11453
11454
|
parseResponse(data, rawResponse) {
|
|
11454
|
-
const apiTokens = external_exports.array(
|
|
11455
|
+
const apiTokens = external_exports.array(apiTokenFullAccessListItemSchema).parse(data);
|
|
11455
11456
|
return this.validateOutput({
|
|
11456
11457
|
data: apiTokens,
|
|
11457
11458
|
pagination: (0, import_sdk_js_global_types4.responseToPagination)(rawResponse)
|
|
@@ -11551,7 +11552,7 @@ var GetApiTokenPointOfSaleList = class extends import_sdk_js_core11.AbstractApiR
|
|
|
11551
11552
|
return "/api_tokens/point_of_sale";
|
|
11552
11553
|
}
|
|
11553
11554
|
parseResponse(data, rawResponse) {
|
|
11554
|
-
const apiTokens = external_exports.array(
|
|
11555
|
+
const apiTokens = external_exports.array(apiTokenPointOfSaleListItemSchema).parse(data);
|
|
11555
11556
|
return this.validateOutput({
|
|
11556
11557
|
data: apiTokens,
|
|
11557
11558
|
pagination: (0, import_sdk_js_global_types5.responseToPagination)(rawResponse)
|
|
@@ -11583,7 +11584,7 @@ var GetApiTokenPointOfSaleListFromPointOfSale = class extends import_sdk_js_core
|
|
|
11583
11584
|
return `/point_of_sales/${this.pointOfSaleId}/api_tokens`;
|
|
11584
11585
|
}
|
|
11585
11586
|
parseResponse(data, rawResponse) {
|
|
11586
|
-
const apiTokens = external_exports.array(
|
|
11587
|
+
const apiTokens = external_exports.array(apiTokenPointOfSaleListItemSchema).parse(data);
|
|
11587
11588
|
return this.validateOutput({
|
|
11588
11589
|
data: apiTokens,
|
|
11589
11590
|
pagination: (0, import_sdk_js_global_types6.responseToPagination)(rawResponse)
|
package/dist/index.d.cts
CHANGED
|
@@ -53,6 +53,7 @@ declare const apiTokenSchema: z.ZodObject<{
|
|
|
53
53
|
}>;
|
|
54
54
|
createdAt: z.ZodString;
|
|
55
55
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
56
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
56
57
|
}, z.core.$strip>;
|
|
57
58
|
type ApiToken = z.infer<typeof apiTokenSchema>;
|
|
58
59
|
declare const apiTokenListItemSchema: z.ZodObject<{
|
|
@@ -104,6 +105,7 @@ declare const apiTokenListItemSchema: z.ZodObject<{
|
|
|
104
105
|
ROLE_USER: "ROLE_USER";
|
|
105
106
|
}>>;
|
|
106
107
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
108
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
107
109
|
}, z.core.$strip>;
|
|
108
110
|
type ApiTokenListItem = z.infer<typeof apiTokenListItemSchema>;
|
|
109
111
|
declare const apiTokenFullAccessSchema: z.ZodObject<{
|
|
@@ -152,6 +154,7 @@ declare const apiTokenFullAccessSchema: z.ZodObject<{
|
|
|
152
154
|
}>>;
|
|
153
155
|
createdAt: z.ZodString;
|
|
154
156
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
157
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
155
158
|
type: z.ZodLiteral<"full_access">;
|
|
156
159
|
}, z.core.$strip>;
|
|
157
160
|
type ApiTokenFullAccess = z.infer<typeof apiTokenFullAccessSchema>;
|
|
@@ -201,6 +204,7 @@ declare const apiTokenFullAccessListItemSchema: z.ZodObject<{
|
|
|
201
204
|
ROLE_USER: "ROLE_USER";
|
|
202
205
|
}>>;
|
|
203
206
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
207
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
204
208
|
}, z.core.$strip>;
|
|
205
209
|
type ApiTokenFullAccessListItem = z.infer<typeof apiTokenFullAccessListItemSchema>;
|
|
206
210
|
declare const apiTokenPointOfSaleSchema: z.ZodObject<{
|
|
@@ -249,6 +253,7 @@ declare const apiTokenPointOfSaleSchema: z.ZodObject<{
|
|
|
249
253
|
}>>;
|
|
250
254
|
createdAt: z.ZodString;
|
|
251
255
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
256
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
252
257
|
type: z.ZodLiteral<"point_of_sale">;
|
|
253
258
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
254
259
|
}, z.core.$strip>;
|
|
@@ -299,6 +304,7 @@ declare const apiTokenPointOfSaleListItemSchema: z.ZodObject<{
|
|
|
299
304
|
ROLE_USER: "ROLE_USER";
|
|
300
305
|
}>>;
|
|
301
306
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
307
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
302
308
|
}, z.core.$strip>;
|
|
303
309
|
type ApiTokenPointOfSaleListItem = z.infer<typeof apiTokenPointOfSaleListItemSchema>;
|
|
304
310
|
declare const apiTokensQuerySchema: z.ZodObject<{
|
|
@@ -465,6 +471,7 @@ declare const getApiTokenDetailsResponseSchema: z.ZodObject<{
|
|
|
465
471
|
}>;
|
|
466
472
|
createdAt: z.ZodString;
|
|
467
473
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
474
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
468
475
|
}, z.core.$strip>;
|
|
469
476
|
type GetApiTokenDetailsResponse = z.infer<typeof getApiTokenDetailsResponseSchema>;
|
|
470
477
|
declare class GetApiTokenDetails extends AbstractApiRequest<typeof getApiTokenDetailsInputSchema, typeof getApiTokenDetailsResponseSchema> {
|
|
@@ -522,6 +529,7 @@ declare class GetApiTokenDetails extends AbstractApiRequest<typeof getApiTokenDe
|
|
|
522
529
|
}>;
|
|
523
530
|
createdAt: z.ZodString;
|
|
524
531
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
532
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
525
533
|
}, z.core.$strip>;
|
|
526
534
|
readonly querySchema: undefined;
|
|
527
535
|
readonly headersSchema: undefined;
|
|
@@ -678,6 +686,7 @@ declare const getApiTokensResponseSchema: z.ZodObject<{
|
|
|
678
686
|
ROLE_USER: "ROLE_USER";
|
|
679
687
|
}>>;
|
|
680
688
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
689
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
681
690
|
}, z.core.$strip>>;
|
|
682
691
|
pagination: z.ZodObject<{
|
|
683
692
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -744,6 +753,7 @@ declare class GetApiTokens extends AbstractApiRequest<typeof getApiTokensInputSc
|
|
|
744
753
|
ROLE_USER: "ROLE_USER";
|
|
745
754
|
}>>;
|
|
746
755
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
756
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
747
757
|
}, z.core.$strip>>;
|
|
748
758
|
pagination: z.ZodObject<{
|
|
749
759
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -948,6 +958,7 @@ declare const createApiTokenFullAccessResponseSchema: z.ZodObject<{
|
|
|
948
958
|
}>>;
|
|
949
959
|
createdAt: z.ZodString;
|
|
950
960
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
961
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
951
962
|
type: z.ZodLiteral<"full_access">;
|
|
952
963
|
}, z.core.$strip>;
|
|
953
964
|
type CreateApiTokenFullAccessResponse = z.infer<typeof createApiTokenFullAccessResponseSchema>;
|
|
@@ -1045,6 +1056,7 @@ declare class CreateApiTokenFullAccess extends AbstractApiRequest<typeof createA
|
|
|
1045
1056
|
}>>;
|
|
1046
1057
|
createdAt: z.ZodString;
|
|
1047
1058
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1059
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1048
1060
|
type: z.ZodLiteral<"full_access">;
|
|
1049
1061
|
}, z.core.$strip>;
|
|
1050
1062
|
readonly querySchema: undefined;
|
|
@@ -1116,6 +1128,7 @@ declare const getApiTokenFullAccessDetailsResponseSchema: z.ZodObject<{
|
|
|
1116
1128
|
}>>;
|
|
1117
1129
|
createdAt: z.ZodString;
|
|
1118
1130
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1131
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1119
1132
|
type: z.ZodLiteral<"full_access">;
|
|
1120
1133
|
}, z.core.$strip>;
|
|
1121
1134
|
type GetApiTokenFullAccessDetailsResponse = z.infer<typeof getApiTokenFullAccessDetailsResponseSchema>;
|
|
@@ -1170,6 +1183,7 @@ declare class GetApiTokenFullAccessDetails extends AbstractApiRequest<typeof get
|
|
|
1170
1183
|
}>>;
|
|
1171
1184
|
createdAt: z.ZodString;
|
|
1172
1185
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1186
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1173
1187
|
type: z.ZodLiteral<"full_access">;
|
|
1174
1188
|
}, z.core.$strip>;
|
|
1175
1189
|
readonly querySchema: undefined;
|
|
@@ -1324,6 +1338,7 @@ declare const getApiTokenFullAccessListResponseSchema: z.ZodObject<{
|
|
|
1324
1338
|
ROLE_USER: "ROLE_USER";
|
|
1325
1339
|
}>>;
|
|
1326
1340
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1341
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1327
1342
|
}, z.core.$strip>>;
|
|
1328
1343
|
pagination: z.ZodObject<{
|
|
1329
1344
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -1387,6 +1402,7 @@ declare class GetApiTokenFullAccessList extends AbstractApiRequest<typeof getApi
|
|
|
1387
1402
|
ROLE_USER: "ROLE_USER";
|
|
1388
1403
|
}>>;
|
|
1389
1404
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1405
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1390
1406
|
}, z.core.$strip>>;
|
|
1391
1407
|
pagination: z.ZodObject<{
|
|
1392
1408
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -1592,6 +1608,7 @@ declare const createApiTokenPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1592
1608
|
}>>;
|
|
1593
1609
|
createdAt: z.ZodString;
|
|
1594
1610
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1611
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1595
1612
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1596
1613
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1597
1614
|
}, z.core.$strip>;
|
|
@@ -1691,6 +1708,7 @@ declare class CreateApiTokenPointOfSale extends AbstractApiRequest<typeof create
|
|
|
1691
1708
|
}>>;
|
|
1692
1709
|
createdAt: z.ZodString;
|
|
1693
1710
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1711
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1694
1712
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1695
1713
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1696
1714
|
}, z.core.$strip>;
|
|
@@ -1763,6 +1781,7 @@ declare const getApiTokenPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
|
1763
1781
|
}>>;
|
|
1764
1782
|
createdAt: z.ZodString;
|
|
1765
1783
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1784
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1766
1785
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1767
1786
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1768
1787
|
}, z.core.$strip>;
|
|
@@ -1818,6 +1837,7 @@ declare class GetApiTokenPointOfSaleDetails extends AbstractApiRequest<typeof ge
|
|
|
1818
1837
|
}>>;
|
|
1819
1838
|
createdAt: z.ZodString;
|
|
1820
1839
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1840
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1821
1841
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1822
1842
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1823
1843
|
}, z.core.$strip>;
|
|
@@ -1973,6 +1993,7 @@ declare const getApiTokenPointOfSaleListResponseSchema: z.ZodObject<{
|
|
|
1973
1993
|
ROLE_USER: "ROLE_USER";
|
|
1974
1994
|
}>>;
|
|
1975
1995
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1996
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1976
1997
|
}, z.core.$strip>>;
|
|
1977
1998
|
pagination: z.ZodObject<{
|
|
1978
1999
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -2036,6 +2057,7 @@ declare class GetApiTokenPointOfSaleList extends AbstractApiRequest<typeof getAp
|
|
|
2036
2057
|
ROLE_USER: "ROLE_USER";
|
|
2037
2058
|
}>>;
|
|
2038
2059
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2060
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
2039
2061
|
}, z.core.$strip>>;
|
|
2040
2062
|
pagination: z.ZodObject<{
|
|
2041
2063
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -2294,6 +2316,7 @@ declare const getApiTokenPointOfSaleListFromPointOfSaleResponseSchema: z.ZodObje
|
|
|
2294
2316
|
ROLE_USER: "ROLE_USER";
|
|
2295
2317
|
}>>;
|
|
2296
2318
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2319
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
2297
2320
|
}, z.core.$strip>>;
|
|
2298
2321
|
pagination: z.ZodObject<{
|
|
2299
2322
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -2357,6 +2380,7 @@ declare class GetApiTokenPointOfSaleListFromPointOfSale extends AbstractApiReque
|
|
|
2357
2380
|
ROLE_USER: "ROLE_USER";
|
|
2358
2381
|
}>>;
|
|
2359
2382
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2383
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
2360
2384
|
}, z.core.$strip>>;
|
|
2361
2385
|
pagination: z.ZodObject<{
|
|
2362
2386
|
from: z.ZodCoercedNumber<unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ declare const apiTokenSchema: z.ZodObject<{
|
|
|
53
53
|
}>;
|
|
54
54
|
createdAt: z.ZodString;
|
|
55
55
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
56
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
56
57
|
}, z.core.$strip>;
|
|
57
58
|
type ApiToken = z.infer<typeof apiTokenSchema>;
|
|
58
59
|
declare const apiTokenListItemSchema: z.ZodObject<{
|
|
@@ -104,6 +105,7 @@ declare const apiTokenListItemSchema: z.ZodObject<{
|
|
|
104
105
|
ROLE_USER: "ROLE_USER";
|
|
105
106
|
}>>;
|
|
106
107
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
108
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
107
109
|
}, z.core.$strip>;
|
|
108
110
|
type ApiTokenListItem = z.infer<typeof apiTokenListItemSchema>;
|
|
109
111
|
declare const apiTokenFullAccessSchema: z.ZodObject<{
|
|
@@ -152,6 +154,7 @@ declare const apiTokenFullAccessSchema: z.ZodObject<{
|
|
|
152
154
|
}>>;
|
|
153
155
|
createdAt: z.ZodString;
|
|
154
156
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
157
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
155
158
|
type: z.ZodLiteral<"full_access">;
|
|
156
159
|
}, z.core.$strip>;
|
|
157
160
|
type ApiTokenFullAccess = z.infer<typeof apiTokenFullAccessSchema>;
|
|
@@ -201,6 +204,7 @@ declare const apiTokenFullAccessListItemSchema: z.ZodObject<{
|
|
|
201
204
|
ROLE_USER: "ROLE_USER";
|
|
202
205
|
}>>;
|
|
203
206
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
207
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
204
208
|
}, z.core.$strip>;
|
|
205
209
|
type ApiTokenFullAccessListItem = z.infer<typeof apiTokenFullAccessListItemSchema>;
|
|
206
210
|
declare const apiTokenPointOfSaleSchema: z.ZodObject<{
|
|
@@ -249,6 +253,7 @@ declare const apiTokenPointOfSaleSchema: z.ZodObject<{
|
|
|
249
253
|
}>>;
|
|
250
254
|
createdAt: z.ZodString;
|
|
251
255
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
256
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
252
257
|
type: z.ZodLiteral<"point_of_sale">;
|
|
253
258
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
254
259
|
}, z.core.$strip>;
|
|
@@ -299,6 +304,7 @@ declare const apiTokenPointOfSaleListItemSchema: z.ZodObject<{
|
|
|
299
304
|
ROLE_USER: "ROLE_USER";
|
|
300
305
|
}>>;
|
|
301
306
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
307
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
302
308
|
}, z.core.$strip>;
|
|
303
309
|
type ApiTokenPointOfSaleListItem = z.infer<typeof apiTokenPointOfSaleListItemSchema>;
|
|
304
310
|
declare const apiTokensQuerySchema: z.ZodObject<{
|
|
@@ -465,6 +471,7 @@ declare const getApiTokenDetailsResponseSchema: z.ZodObject<{
|
|
|
465
471
|
}>;
|
|
466
472
|
createdAt: z.ZodString;
|
|
467
473
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
474
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
468
475
|
}, z.core.$strip>;
|
|
469
476
|
type GetApiTokenDetailsResponse = z.infer<typeof getApiTokenDetailsResponseSchema>;
|
|
470
477
|
declare class GetApiTokenDetails extends AbstractApiRequest<typeof getApiTokenDetailsInputSchema, typeof getApiTokenDetailsResponseSchema> {
|
|
@@ -522,6 +529,7 @@ declare class GetApiTokenDetails extends AbstractApiRequest<typeof getApiTokenDe
|
|
|
522
529
|
}>;
|
|
523
530
|
createdAt: z.ZodString;
|
|
524
531
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
532
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
525
533
|
}, z.core.$strip>;
|
|
526
534
|
readonly querySchema: undefined;
|
|
527
535
|
readonly headersSchema: undefined;
|
|
@@ -678,6 +686,7 @@ declare const getApiTokensResponseSchema: z.ZodObject<{
|
|
|
678
686
|
ROLE_USER: "ROLE_USER";
|
|
679
687
|
}>>;
|
|
680
688
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
689
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
681
690
|
}, z.core.$strip>>;
|
|
682
691
|
pagination: z.ZodObject<{
|
|
683
692
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -744,6 +753,7 @@ declare class GetApiTokens extends AbstractApiRequest<typeof getApiTokensInputSc
|
|
|
744
753
|
ROLE_USER: "ROLE_USER";
|
|
745
754
|
}>>;
|
|
746
755
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
756
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
747
757
|
}, z.core.$strip>>;
|
|
748
758
|
pagination: z.ZodObject<{
|
|
749
759
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -948,6 +958,7 @@ declare const createApiTokenFullAccessResponseSchema: z.ZodObject<{
|
|
|
948
958
|
}>>;
|
|
949
959
|
createdAt: z.ZodString;
|
|
950
960
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
961
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
951
962
|
type: z.ZodLiteral<"full_access">;
|
|
952
963
|
}, z.core.$strip>;
|
|
953
964
|
type CreateApiTokenFullAccessResponse = z.infer<typeof createApiTokenFullAccessResponseSchema>;
|
|
@@ -1045,6 +1056,7 @@ declare class CreateApiTokenFullAccess extends AbstractApiRequest<typeof createA
|
|
|
1045
1056
|
}>>;
|
|
1046
1057
|
createdAt: z.ZodString;
|
|
1047
1058
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1059
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1048
1060
|
type: z.ZodLiteral<"full_access">;
|
|
1049
1061
|
}, z.core.$strip>;
|
|
1050
1062
|
readonly querySchema: undefined;
|
|
@@ -1116,6 +1128,7 @@ declare const getApiTokenFullAccessDetailsResponseSchema: z.ZodObject<{
|
|
|
1116
1128
|
}>>;
|
|
1117
1129
|
createdAt: z.ZodString;
|
|
1118
1130
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1131
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1119
1132
|
type: z.ZodLiteral<"full_access">;
|
|
1120
1133
|
}, z.core.$strip>;
|
|
1121
1134
|
type GetApiTokenFullAccessDetailsResponse = z.infer<typeof getApiTokenFullAccessDetailsResponseSchema>;
|
|
@@ -1170,6 +1183,7 @@ declare class GetApiTokenFullAccessDetails extends AbstractApiRequest<typeof get
|
|
|
1170
1183
|
}>>;
|
|
1171
1184
|
createdAt: z.ZodString;
|
|
1172
1185
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1186
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1173
1187
|
type: z.ZodLiteral<"full_access">;
|
|
1174
1188
|
}, z.core.$strip>;
|
|
1175
1189
|
readonly querySchema: undefined;
|
|
@@ -1324,6 +1338,7 @@ declare const getApiTokenFullAccessListResponseSchema: z.ZodObject<{
|
|
|
1324
1338
|
ROLE_USER: "ROLE_USER";
|
|
1325
1339
|
}>>;
|
|
1326
1340
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1341
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1327
1342
|
}, z.core.$strip>>;
|
|
1328
1343
|
pagination: z.ZodObject<{
|
|
1329
1344
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -1387,6 +1402,7 @@ declare class GetApiTokenFullAccessList extends AbstractApiRequest<typeof getApi
|
|
|
1387
1402
|
ROLE_USER: "ROLE_USER";
|
|
1388
1403
|
}>>;
|
|
1389
1404
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1405
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1390
1406
|
}, z.core.$strip>>;
|
|
1391
1407
|
pagination: z.ZodObject<{
|
|
1392
1408
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -1592,6 +1608,7 @@ declare const createApiTokenPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1592
1608
|
}>>;
|
|
1593
1609
|
createdAt: z.ZodString;
|
|
1594
1610
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1611
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1595
1612
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1596
1613
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1597
1614
|
}, z.core.$strip>;
|
|
@@ -1691,6 +1708,7 @@ declare class CreateApiTokenPointOfSale extends AbstractApiRequest<typeof create
|
|
|
1691
1708
|
}>>;
|
|
1692
1709
|
createdAt: z.ZodString;
|
|
1693
1710
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1711
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1694
1712
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1695
1713
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1696
1714
|
}, z.core.$strip>;
|
|
@@ -1763,6 +1781,7 @@ declare const getApiTokenPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
|
1763
1781
|
}>>;
|
|
1764
1782
|
createdAt: z.ZodString;
|
|
1765
1783
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1784
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1766
1785
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1767
1786
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1768
1787
|
}, z.core.$strip>;
|
|
@@ -1818,6 +1837,7 @@ declare class GetApiTokenPointOfSaleDetails extends AbstractApiRequest<typeof ge
|
|
|
1818
1837
|
}>>;
|
|
1819
1838
|
createdAt: z.ZodString;
|
|
1820
1839
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1840
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1821
1841
|
type: z.ZodLiteral<"point_of_sale">;
|
|
1822
1842
|
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
1823
1843
|
}, z.core.$strip>;
|
|
@@ -1973,6 +1993,7 @@ declare const getApiTokenPointOfSaleListResponseSchema: z.ZodObject<{
|
|
|
1973
1993
|
ROLE_USER: "ROLE_USER";
|
|
1974
1994
|
}>>;
|
|
1975
1995
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1996
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1976
1997
|
}, z.core.$strip>>;
|
|
1977
1998
|
pagination: z.ZodObject<{
|
|
1978
1999
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -2036,6 +2057,7 @@ declare class GetApiTokenPointOfSaleList extends AbstractApiRequest<typeof getAp
|
|
|
2036
2057
|
ROLE_USER: "ROLE_USER";
|
|
2037
2058
|
}>>;
|
|
2038
2059
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2060
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
2039
2061
|
}, z.core.$strip>>;
|
|
2040
2062
|
pagination: z.ZodObject<{
|
|
2041
2063
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -2294,6 +2316,7 @@ declare const getApiTokenPointOfSaleListFromPointOfSaleResponseSchema: z.ZodObje
|
|
|
2294
2316
|
ROLE_USER: "ROLE_USER";
|
|
2295
2317
|
}>>;
|
|
2296
2318
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2319
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
2297
2320
|
}, z.core.$strip>>;
|
|
2298
2321
|
pagination: z.ZodObject<{
|
|
2299
2322
|
from: z.ZodCoercedNumber<unknown>;
|
|
@@ -2357,6 +2380,7 @@ declare class GetApiTokenPointOfSaleListFromPointOfSale extends AbstractApiReque
|
|
|
2357
2380
|
ROLE_USER: "ROLE_USER";
|
|
2358
2381
|
}>>;
|
|
2359
2382
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
2383
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
2360
2384
|
}, z.core.$strip>>;
|
|
2361
2385
|
pagination: z.ZodObject<{
|
|
2362
2386
|
from: z.ZodCoercedNumber<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -11176,7 +11176,8 @@ var apiTokenSchema = external_exports.object({
|
|
|
11176
11176
|
roles: external_exports.array(securityRoleSchema),
|
|
11177
11177
|
type: apiTokenTypeSchema,
|
|
11178
11178
|
createdAt: datetimeSchema,
|
|
11179
|
-
expiresAt: datetimeSchema.nullable()
|
|
11179
|
+
expiresAt: datetimeSchema.nullable(),
|
|
11180
|
+
lastUsedAt: datetimeSchema.nullable()
|
|
11180
11181
|
});
|
|
11181
11182
|
var apiTokenListItemSchema = apiTokenSchema.omit({
|
|
11182
11183
|
token: true
|
|
@@ -11279,7 +11280,7 @@ var GetApiTokens = class extends AbstractApiRequest3 {
|
|
|
11279
11280
|
return "/api_tokens";
|
|
11280
11281
|
}
|
|
11281
11282
|
parseResponse(data, rawResponse) {
|
|
11282
|
-
const apiTokens = external_exports.array(
|
|
11283
|
+
const apiTokens = external_exports.array(apiTokenListItemSchema).parse(data);
|
|
11283
11284
|
return this.validateOutput({
|
|
11284
11285
|
data: apiTokens,
|
|
11285
11286
|
pagination: responseToPagination(rawResponse)
|
|
@@ -11381,7 +11382,7 @@ var GetApiTokenFullAccessList = class extends AbstractApiRequest7 {
|
|
|
11381
11382
|
return "/api_tokens/full_access";
|
|
11382
11383
|
}
|
|
11383
11384
|
parseResponse(data, rawResponse) {
|
|
11384
|
-
const apiTokens = external_exports.array(
|
|
11385
|
+
const apiTokens = external_exports.array(apiTokenFullAccessListItemSchema).parse(data);
|
|
11385
11386
|
return this.validateOutput({
|
|
11386
11387
|
data: apiTokens,
|
|
11387
11388
|
pagination: responseToPagination2(rawResponse)
|
|
@@ -11484,7 +11485,7 @@ var GetApiTokenPointOfSaleList = class extends AbstractApiRequest11 {
|
|
|
11484
11485
|
return "/api_tokens/point_of_sale";
|
|
11485
11486
|
}
|
|
11486
11487
|
parseResponse(data, rawResponse) {
|
|
11487
|
-
const apiTokens = external_exports.array(
|
|
11488
|
+
const apiTokens = external_exports.array(apiTokenPointOfSaleListItemSchema).parse(data);
|
|
11488
11489
|
return this.validateOutput({
|
|
11489
11490
|
data: apiTokens,
|
|
11490
11491
|
pagination: responseToPagination3(rawResponse)
|
|
@@ -11519,7 +11520,7 @@ var GetApiTokenPointOfSaleListFromPointOfSale = class extends AbstractApiRequest
|
|
|
11519
11520
|
return `/point_of_sales/${this.pointOfSaleId}/api_tokens`;
|
|
11520
11521
|
}
|
|
11521
11522
|
parseResponse(data, rawResponse) {
|
|
11522
|
-
const apiTokens = external_exports.array(
|
|
11523
|
+
const apiTokens = external_exports.array(apiTokenPointOfSaleListItemSchema).parse(data);
|
|
11523
11524
|
return this.validateOutput({
|
|
11524
11525
|
data: apiTokens,
|
|
11525
11526
|
pagination: responseToPagination4(rawResponse)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-api-token",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for API Token Management",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@deliverart/sdk-js-core": "2.3.
|
|
22
|
-
"@deliverart/sdk-js-global-types": "2.3.
|
|
23
|
-
"@deliverart/sdk-js-
|
|
24
|
-
"@deliverart/sdk-js-
|
|
21
|
+
"@deliverart/sdk-js-core": "2.3.5",
|
|
22
|
+
"@deliverart/sdk-js-global-types": "2.3.5",
|
|
23
|
+
"@deliverart/sdk-js-user": "2.3.5",
|
|
24
|
+
"@deliverart/sdk-js-point-of-sale": "2.3.5"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|