@deliverart/sdk-js-company 2.5.33 → 2.6.0
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 +4 -7
- package/dist/index.d.cts +40 -9
- package/dist/index.d.ts +40 -9
- package/dist/index.js +5 -11
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -11293,14 +11293,12 @@ var GetCompanies = class extends import_sdk_js_core3.AbstractApiRequest {
|
|
|
11293
11293
|
this.outputSchema = getCompaniesResponseSchema;
|
|
11294
11294
|
this.querySchema = getCompaniesQuerySchema;
|
|
11295
11295
|
this.headersSchema = void 0;
|
|
11296
|
+
this.listItemSchema = companySchema;
|
|
11297
|
+
this.paginationDefaultEnabled = true;
|
|
11296
11298
|
}
|
|
11297
11299
|
getPath() {
|
|
11298
11300
|
return "/companies";
|
|
11299
11301
|
}
|
|
11300
|
-
parseResponse(data, rawResponse) {
|
|
11301
|
-
const companies = external_exports.array(companySchema).parse(data);
|
|
11302
|
-
return this.validateOutput({ data: companies, pagination: (0, import_sdk_js_global_types3.responseToPagination)(rawResponse) });
|
|
11303
|
-
}
|
|
11304
11302
|
};
|
|
11305
11303
|
|
|
11306
11304
|
// src/requests/GetCompanyDetails.ts
|
|
@@ -11339,14 +11337,13 @@ var GetUserCompanies = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
|
11339
11337
|
this.outputSchema = getUserCompaniesResponseSchema;
|
|
11340
11338
|
this.querySchema = getUserCompaniesQuerySchema;
|
|
11341
11339
|
this.headersSchema = void 0;
|
|
11340
|
+
this.listItemSchema = companySchema;
|
|
11341
|
+
this.paginationDefaultEnabled = false;
|
|
11342
11342
|
this.userId = userId;
|
|
11343
11343
|
}
|
|
11344
11344
|
getPath() {
|
|
11345
11345
|
return `/users/${this.userId}/companies`;
|
|
11346
11346
|
}
|
|
11347
|
-
parseResponse(data) {
|
|
11348
|
-
return external_exports.array(companySchema).parse(data);
|
|
11349
|
-
}
|
|
11350
11347
|
};
|
|
11351
11348
|
|
|
11352
11349
|
// src/requests/UpdateCompany.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
2
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
4
|
|
|
@@ -290,9 +289,9 @@ declare const getCompaniesResponseSchema: z.ZodObject<{
|
|
|
290
289
|
}, z.core.$strip>;
|
|
291
290
|
type GetCompaniesResponse = z.infer<typeof getCompaniesResponseSchema>;
|
|
292
291
|
declare class GetCompanies extends AbstractApiRequest<typeof getCompaniesInputSchema, typeof getCompaniesResponseSchema, GetCompaniesQueryParams> {
|
|
293
|
-
readonly method
|
|
294
|
-
readonly contentType
|
|
295
|
-
readonly accept
|
|
292
|
+
readonly method: "GET";
|
|
293
|
+
readonly contentType: "application/json";
|
|
294
|
+
readonly accept: "application/json";
|
|
296
295
|
readonly inputSchema: z.ZodUndefined;
|
|
297
296
|
readonly outputSchema: z.ZodObject<{
|
|
298
297
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -343,11 +342,27 @@ declare class GetCompanies extends AbstractApiRequest<typeof getCompaniesInputSc
|
|
|
343
342
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
344
343
|
}, z.core.$strip>;
|
|
345
344
|
readonly headersSchema: undefined;
|
|
345
|
+
readonly listItemSchema: z.ZodObject<{
|
|
346
|
+
id: z.ZodString;
|
|
347
|
+
businessName: z.ZodString;
|
|
348
|
+
vat: z.ZodString;
|
|
349
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
350
|
+
operationalAddress: z.ZodObject<{
|
|
351
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
354
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
355
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
createdAt: z.ZodString;
|
|
359
|
+
updatedAt: z.ZodString;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
readonly paginationDefaultEnabled = true;
|
|
346
362
|
constructor(options?: {
|
|
347
363
|
query?: GetCompaniesQueryParams;
|
|
348
364
|
});
|
|
349
365
|
getPath(): string;
|
|
350
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Company>;
|
|
351
366
|
}
|
|
352
367
|
|
|
353
368
|
declare const getCompanyDetailsInputSchema: z.ZodUndefined;
|
|
@@ -466,9 +481,9 @@ declare const getUserCompaniesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
466
481
|
}, z.core.$strip>>;
|
|
467
482
|
type GetUserCompaniesResponse = z.infer<typeof getUserCompaniesResponseSchema>;
|
|
468
483
|
declare class GetUserCompanies extends AbstractApiRequest<typeof getUserCompaniesInputSchema, typeof getUserCompaniesResponseSchema, GetUserCompaniesQueryParams> {
|
|
469
|
-
readonly method
|
|
470
|
-
readonly contentType
|
|
471
|
-
readonly accept
|
|
484
|
+
readonly method: "GET";
|
|
485
|
+
readonly contentType: "application/json";
|
|
486
|
+
readonly accept: "application/json";
|
|
472
487
|
readonly inputSchema: z.ZodUndefined;
|
|
473
488
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
474
489
|
id: z.ZodString;
|
|
@@ -509,12 +524,28 @@ declare class GetUserCompanies extends AbstractApiRequest<typeof getUserCompanie
|
|
|
509
524
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
510
525
|
}, z.core.$strip>;
|
|
511
526
|
readonly headersSchema: undefined;
|
|
527
|
+
readonly listItemSchema: z.ZodObject<{
|
|
528
|
+
id: z.ZodString;
|
|
529
|
+
businessName: z.ZodString;
|
|
530
|
+
vat: z.ZodString;
|
|
531
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
532
|
+
operationalAddress: z.ZodObject<{
|
|
533
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
534
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
535
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
536
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
537
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
538
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
539
|
+
}, z.core.$strip>;
|
|
540
|
+
createdAt: z.ZodString;
|
|
541
|
+
updatedAt: z.ZodString;
|
|
542
|
+
}, z.core.$strip>;
|
|
543
|
+
readonly paginationDefaultEnabled = false;
|
|
512
544
|
private readonly userId;
|
|
513
545
|
constructor(userId: string, options?: {
|
|
514
546
|
query?: GetUserCompaniesQueryParams;
|
|
515
547
|
});
|
|
516
548
|
getPath(): string;
|
|
517
|
-
parseResponse(data: unknown): Company[];
|
|
518
549
|
}
|
|
519
550
|
|
|
520
551
|
declare const updateCompanyInputSchema: z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
2
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
4
|
|
|
@@ -290,9 +289,9 @@ declare const getCompaniesResponseSchema: z.ZodObject<{
|
|
|
290
289
|
}, z.core.$strip>;
|
|
291
290
|
type GetCompaniesResponse = z.infer<typeof getCompaniesResponseSchema>;
|
|
292
291
|
declare class GetCompanies extends AbstractApiRequest<typeof getCompaniesInputSchema, typeof getCompaniesResponseSchema, GetCompaniesQueryParams> {
|
|
293
|
-
readonly method
|
|
294
|
-
readonly contentType
|
|
295
|
-
readonly accept
|
|
292
|
+
readonly method: "GET";
|
|
293
|
+
readonly contentType: "application/json";
|
|
294
|
+
readonly accept: "application/json";
|
|
296
295
|
readonly inputSchema: z.ZodUndefined;
|
|
297
296
|
readonly outputSchema: z.ZodObject<{
|
|
298
297
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -343,11 +342,27 @@ declare class GetCompanies extends AbstractApiRequest<typeof getCompaniesInputSc
|
|
|
343
342
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
344
343
|
}, z.core.$strip>;
|
|
345
344
|
readonly headersSchema: undefined;
|
|
345
|
+
readonly listItemSchema: z.ZodObject<{
|
|
346
|
+
id: z.ZodString;
|
|
347
|
+
businessName: z.ZodString;
|
|
348
|
+
vat: z.ZodString;
|
|
349
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
350
|
+
operationalAddress: z.ZodObject<{
|
|
351
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
354
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
355
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
createdAt: z.ZodString;
|
|
359
|
+
updatedAt: z.ZodString;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
readonly paginationDefaultEnabled = true;
|
|
346
362
|
constructor(options?: {
|
|
347
363
|
query?: GetCompaniesQueryParams;
|
|
348
364
|
});
|
|
349
365
|
getPath(): string;
|
|
350
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Company>;
|
|
351
366
|
}
|
|
352
367
|
|
|
353
368
|
declare const getCompanyDetailsInputSchema: z.ZodUndefined;
|
|
@@ -466,9 +481,9 @@ declare const getUserCompaniesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
466
481
|
}, z.core.$strip>>;
|
|
467
482
|
type GetUserCompaniesResponse = z.infer<typeof getUserCompaniesResponseSchema>;
|
|
468
483
|
declare class GetUserCompanies extends AbstractApiRequest<typeof getUserCompaniesInputSchema, typeof getUserCompaniesResponseSchema, GetUserCompaniesQueryParams> {
|
|
469
|
-
readonly method
|
|
470
|
-
readonly contentType
|
|
471
|
-
readonly accept
|
|
484
|
+
readonly method: "GET";
|
|
485
|
+
readonly contentType: "application/json";
|
|
486
|
+
readonly accept: "application/json";
|
|
472
487
|
readonly inputSchema: z.ZodUndefined;
|
|
473
488
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
474
489
|
id: z.ZodString;
|
|
@@ -509,12 +524,28 @@ declare class GetUserCompanies extends AbstractApiRequest<typeof getUserCompanie
|
|
|
509
524
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
510
525
|
}, z.core.$strip>;
|
|
511
526
|
readonly headersSchema: undefined;
|
|
527
|
+
readonly listItemSchema: z.ZodObject<{
|
|
528
|
+
id: z.ZodString;
|
|
529
|
+
businessName: z.ZodString;
|
|
530
|
+
vat: z.ZodString;
|
|
531
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
532
|
+
operationalAddress: z.ZodObject<{
|
|
533
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
534
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
535
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
536
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
537
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
538
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
539
|
+
}, z.core.$strip>;
|
|
540
|
+
createdAt: z.ZodString;
|
|
541
|
+
updatedAt: z.ZodString;
|
|
542
|
+
}, z.core.$strip>;
|
|
543
|
+
readonly paginationDefaultEnabled = false;
|
|
512
544
|
private readonly userId;
|
|
513
545
|
constructor(userId: string, options?: {
|
|
514
546
|
query?: GetUserCompaniesQueryParams;
|
|
515
547
|
});
|
|
516
548
|
getPath(): string;
|
|
517
|
-
parseResponse(data: unknown): Company[];
|
|
518
549
|
}
|
|
519
550
|
|
|
520
551
|
declare const updateCompanyInputSchema: z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -11239,10 +11239,7 @@ var DeleteCompany = class extends AbstractApiRequest2 {
|
|
|
11239
11239
|
|
|
11240
11240
|
// src/requests/GetCompanies.ts
|
|
11241
11241
|
import { AbstractApiRequest as AbstractApiRequest3 } from "@deliverart/sdk-js-core";
|
|
11242
|
-
import {
|
|
11243
|
-
createPaginatedSchema,
|
|
11244
|
-
responseToPagination
|
|
11245
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11242
|
+
import { createPaginatedSchema } from "@deliverart/sdk-js-global-types";
|
|
11246
11243
|
var getCompaniesQuerySchema = companiesQuerySchema;
|
|
11247
11244
|
var getCompaniesInputSchema = external_exports.undefined();
|
|
11248
11245
|
var getCompaniesResponseSchema = createPaginatedSchema(companySchema);
|
|
@@ -11256,14 +11253,12 @@ var GetCompanies = class extends AbstractApiRequest3 {
|
|
|
11256
11253
|
this.outputSchema = getCompaniesResponseSchema;
|
|
11257
11254
|
this.querySchema = getCompaniesQuerySchema;
|
|
11258
11255
|
this.headersSchema = void 0;
|
|
11256
|
+
this.listItemSchema = companySchema;
|
|
11257
|
+
this.paginationDefaultEnabled = true;
|
|
11259
11258
|
}
|
|
11260
11259
|
getPath() {
|
|
11261
11260
|
return "/companies";
|
|
11262
11261
|
}
|
|
11263
|
-
parseResponse(data, rawResponse) {
|
|
11264
|
-
const companies = external_exports.array(companySchema).parse(data);
|
|
11265
|
-
return this.validateOutput({ data: companies, pagination: responseToPagination(rawResponse) });
|
|
11266
|
-
}
|
|
11267
11262
|
};
|
|
11268
11263
|
|
|
11269
11264
|
// src/requests/GetCompanyDetails.ts
|
|
@@ -11302,14 +11297,13 @@ var GetUserCompanies = class extends AbstractApiRequest5 {
|
|
|
11302
11297
|
this.outputSchema = getUserCompaniesResponseSchema;
|
|
11303
11298
|
this.querySchema = getUserCompaniesQuerySchema;
|
|
11304
11299
|
this.headersSchema = void 0;
|
|
11300
|
+
this.listItemSchema = companySchema;
|
|
11301
|
+
this.paginationDefaultEnabled = false;
|
|
11305
11302
|
this.userId = userId;
|
|
11306
11303
|
}
|
|
11307
11304
|
getPath() {
|
|
11308
11305
|
return `/users/${this.userId}/companies`;
|
|
11309
11306
|
}
|
|
11310
|
-
parseResponse(data) {
|
|
11311
|
-
return external_exports.array(companySchema).parse(data);
|
|
11312
|
-
}
|
|
11313
11307
|
};
|
|
11314
11308
|
|
|
11315
11309
|
// src/requests/UpdateCompany.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-company",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Company Management",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@deliverart/sdk-js-core": "2.
|
|
22
|
-
"@deliverart/sdk-js-global-types": "2.
|
|
23
|
-
"@deliverart/sdk-js-user": "2.
|
|
21
|
+
"@deliverart/sdk-js-core": "2.6.0",
|
|
22
|
+
"@deliverart/sdk-js-global-types": "2.6.0",
|
|
23
|
+
"@deliverart/sdk-js-user": "2.6.0"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|