@deliverart/sdk-js-company 1.2.1 → 2.0.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 +35 -2
- package/dist/index.d.cts +96 -3
- package/dist/index.d.ts +96 -3
- package/dist/index.js +31 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
DeleteCompany: () => DeleteCompany,
|
|
25
25
|
GetCompanies: () => GetCompanies,
|
|
26
26
|
GetCompanyDetails: () => GetCompanyDetails,
|
|
27
|
+
GetUserCompanies: () => GetUserCompanies,
|
|
27
28
|
UpdateCompany: () => UpdateCompany,
|
|
28
29
|
companiesQuerySchema: () => companiesQuerySchema,
|
|
29
30
|
companyDetailsSchema: () => companyDetailsSchema,
|
|
@@ -39,6 +40,9 @@ __export(index_exports, {
|
|
|
39
40
|
getCompaniesResponseSchema: () => getCompaniesResponseSchema,
|
|
40
41
|
getCompanyDetailsInputSchema: () => getCompanyDetailsInputSchema,
|
|
41
42
|
getCompanyDetailsResponseSchema: () => getCompanyDetailsResponseSchema,
|
|
43
|
+
getUserCompaniesInputSchema: () => getUserCompaniesInputSchema,
|
|
44
|
+
getUserCompaniesQuerySchema: () => getUserCompaniesQuerySchema,
|
|
45
|
+
getUserCompaniesResponseSchema: () => getUserCompaniesResponseSchema,
|
|
42
46
|
updateCompanyInputSchema: () => updateCompanyInputSchema,
|
|
43
47
|
updateCompanyResponseSchema: () => updateCompanyResponseSchema,
|
|
44
48
|
writableCompanySchema: () => writableCompanySchema
|
|
@@ -11319,11 +11323,36 @@ var GetCompanyDetails = class extends import_sdk_js_core4.AbstractApiRequest {
|
|
|
11319
11323
|
}
|
|
11320
11324
|
};
|
|
11321
11325
|
|
|
11322
|
-
// src/requests/
|
|
11326
|
+
// src/requests/GetUserCompanies.ts
|
|
11323
11327
|
var import_sdk_js_core5 = require("@deliverart/sdk-js-core");
|
|
11328
|
+
var getUserCompaniesQuerySchema = companiesQuerySchema;
|
|
11329
|
+
var getUserCompaniesInputSchema = external_exports.undefined();
|
|
11330
|
+
var getUserCompaniesResponseSchema = external_exports.array(companySchema);
|
|
11331
|
+
var GetUserCompanies = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
11332
|
+
constructor(userId, options) {
|
|
11333
|
+
super(void 0, options);
|
|
11334
|
+
this.method = "GET";
|
|
11335
|
+
this.contentType = "application/json";
|
|
11336
|
+
this.accept = "application/json";
|
|
11337
|
+
this.inputSchema = getUserCompaniesInputSchema;
|
|
11338
|
+
this.outputSchema = getUserCompaniesResponseSchema;
|
|
11339
|
+
this.querySchema = getUserCompaniesQuerySchema;
|
|
11340
|
+
this.headersSchema = void 0;
|
|
11341
|
+
this.userId = userId;
|
|
11342
|
+
}
|
|
11343
|
+
getPath() {
|
|
11344
|
+
return `/users/${this.userId}/companies`;
|
|
11345
|
+
}
|
|
11346
|
+
parseResponse(data) {
|
|
11347
|
+
return external_exports.array(companySchema).parse(data);
|
|
11348
|
+
}
|
|
11349
|
+
};
|
|
11350
|
+
|
|
11351
|
+
// src/requests/UpdateCompany.ts
|
|
11352
|
+
var import_sdk_js_core6 = require("@deliverart/sdk-js-core");
|
|
11324
11353
|
var updateCompanyInputSchema = writableCompanySchema.partial();
|
|
11325
11354
|
var updateCompanyResponseSchema = companyDetailsSchema;
|
|
11326
|
-
var UpdateCompany = class extends
|
|
11355
|
+
var UpdateCompany = class extends import_sdk_js_core6.AbstractApiRequest {
|
|
11327
11356
|
constructor(companyId, input) {
|
|
11328
11357
|
super(input);
|
|
11329
11358
|
this.method = "PATCH";
|
|
@@ -11350,6 +11379,7 @@ var companyNullableIriSchema = (0, import_sdk_js_global_types3.iriNullableSchema
|
|
|
11350
11379
|
DeleteCompany,
|
|
11351
11380
|
GetCompanies,
|
|
11352
11381
|
GetCompanyDetails,
|
|
11382
|
+
GetUserCompanies,
|
|
11353
11383
|
UpdateCompany,
|
|
11354
11384
|
companiesQuerySchema,
|
|
11355
11385
|
companyDetailsSchema,
|
|
@@ -11365,6 +11395,9 @@ var companyNullableIriSchema = (0, import_sdk_js_global_types3.iriNullableSchema
|
|
|
11365
11395
|
getCompaniesResponseSchema,
|
|
11366
11396
|
getCompanyDetailsInputSchema,
|
|
11367
11397
|
getCompanyDetailsResponseSchema,
|
|
11398
|
+
getUserCompaniesInputSchema,
|
|
11399
|
+
getUserCompaniesQuerySchema,
|
|
11400
|
+
getUserCompaniesResponseSchema,
|
|
11368
11401
|
updateCompanyInputSchema,
|
|
11369
11402
|
updateCompanyResponseSchema,
|
|
11370
11403
|
writableCompanySchema
|
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,6 @@ import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-type
|
|
|
2
2
|
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
|
-
import { AxiosResponse } from 'axios';
|
|
6
5
|
|
|
7
6
|
declare const companySchema: z.ZodObject<{
|
|
8
7
|
id: z.ZodString;
|
|
@@ -348,7 +347,7 @@ declare class GetCompanies extends AbstractApiRequest<typeof getCompaniesInputSc
|
|
|
348
347
|
query?: GetCompaniesQueryParams;
|
|
349
348
|
});
|
|
350
349
|
getPath(): string;
|
|
351
|
-
parseResponse(data: unknown, rawResponse:
|
|
350
|
+
parseResponse(data: unknown, rawResponse: Response): Paginated<Company>;
|
|
352
351
|
}
|
|
353
352
|
|
|
354
353
|
declare const getCompanyDetailsInputSchema: z.ZodUndefined;
|
|
@@ -424,6 +423,100 @@ declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDeta
|
|
|
424
423
|
getPath(): string;
|
|
425
424
|
}
|
|
426
425
|
|
|
426
|
+
declare const getUserCompaniesQuerySchema: z.ZodObject<{
|
|
427
|
+
businessName: z.ZodOptional<z.ZodString>;
|
|
428
|
+
vat: z.ZodOptional<z.ZodString>;
|
|
429
|
+
taxCode: z.ZodOptional<z.ZodString>;
|
|
430
|
+
'billingAddress.city': z.ZodOptional<z.ZodString>;
|
|
431
|
+
'billingAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
432
|
+
'operationalAddress.city': z.ZodOptional<z.ZodString>;
|
|
433
|
+
'operationalAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
434
|
+
'order[businessName]': z.ZodOptional<z.ZodEnum<{
|
|
435
|
+
asc: "asc";
|
|
436
|
+
desc: "desc";
|
|
437
|
+
}>>;
|
|
438
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
439
|
+
asc: "asc";
|
|
440
|
+
desc: "desc";
|
|
441
|
+
}>>;
|
|
442
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
443
|
+
asc: "asc";
|
|
444
|
+
desc: "desc";
|
|
445
|
+
}>>;
|
|
446
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
type GetUserCompaniesQueryParams = z.infer<typeof getUserCompaniesQuerySchema>;
|
|
449
|
+
declare const getUserCompaniesInputSchema: z.ZodUndefined;
|
|
450
|
+
type GetUserCompaniesInput = z.input<typeof getUserCompaniesInputSchema>;
|
|
451
|
+
declare const getUserCompaniesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
452
|
+
id: z.ZodString;
|
|
453
|
+
businessName: z.ZodString;
|
|
454
|
+
vat: z.ZodString;
|
|
455
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
456
|
+
operationalAddress: z.ZodObject<{
|
|
457
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
458
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
459
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
461
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
462
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
createdAt: z.ZodString;
|
|
465
|
+
updatedAt: z.ZodString;
|
|
466
|
+
}, z.core.$strip>>;
|
|
467
|
+
type GetUserCompaniesResponse = z.infer<typeof getUserCompaniesResponseSchema>;
|
|
468
|
+
declare class GetUserCompanies extends AbstractApiRequest<typeof getUserCompaniesInputSchema, typeof getUserCompaniesResponseSchema, GetUserCompaniesQueryParams> {
|
|
469
|
+
readonly method = "GET";
|
|
470
|
+
readonly contentType = "application/json";
|
|
471
|
+
readonly accept = "application/json";
|
|
472
|
+
readonly inputSchema: z.ZodUndefined;
|
|
473
|
+
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
474
|
+
id: z.ZodString;
|
|
475
|
+
businessName: z.ZodString;
|
|
476
|
+
vat: z.ZodString;
|
|
477
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
478
|
+
operationalAddress: z.ZodObject<{
|
|
479
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
480
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
481
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
482
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
483
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
484
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
485
|
+
}, z.core.$strip>;
|
|
486
|
+
createdAt: z.ZodString;
|
|
487
|
+
updatedAt: z.ZodString;
|
|
488
|
+
}, z.core.$strip>>;
|
|
489
|
+
readonly querySchema: z.ZodObject<{
|
|
490
|
+
businessName: z.ZodOptional<z.ZodString>;
|
|
491
|
+
vat: z.ZodOptional<z.ZodString>;
|
|
492
|
+
taxCode: z.ZodOptional<z.ZodString>;
|
|
493
|
+
'billingAddress.city': z.ZodOptional<z.ZodString>;
|
|
494
|
+
'billingAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
495
|
+
'operationalAddress.city': z.ZodOptional<z.ZodString>;
|
|
496
|
+
'operationalAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
497
|
+
'order[businessName]': z.ZodOptional<z.ZodEnum<{
|
|
498
|
+
asc: "asc";
|
|
499
|
+
desc: "desc";
|
|
500
|
+
}>>;
|
|
501
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
502
|
+
asc: "asc";
|
|
503
|
+
desc: "desc";
|
|
504
|
+
}>>;
|
|
505
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
506
|
+
asc: "asc";
|
|
507
|
+
desc: "desc";
|
|
508
|
+
}>>;
|
|
509
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
510
|
+
}, z.core.$strip>;
|
|
511
|
+
readonly headersSchema: undefined;
|
|
512
|
+
private readonly userId;
|
|
513
|
+
constructor(userId: string, options?: {
|
|
514
|
+
query?: GetUserCompaniesQueryParams;
|
|
515
|
+
});
|
|
516
|
+
getPath(): string;
|
|
517
|
+
parseResponse(data: unknown): Company[];
|
|
518
|
+
}
|
|
519
|
+
|
|
427
520
|
declare const updateCompanyInputSchema: z.ZodObject<{
|
|
428
521
|
operationalAddress: z.ZodOptional<z.ZodObject<{
|
|
429
522
|
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -552,4 +645,4 @@ type CompanyIri = z.infer<typeof companyIriSchema>;
|
|
|
552
645
|
declare const companyNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/companies/:id"> | null, unknown>>;
|
|
553
646
|
type CompanyNullableIri = z.infer<typeof companyNullableIriSchema>;
|
|
554
647
|
|
|
555
|
-
export { type CompaniesQueryParams, type Company, type CompanyDetails, type CompanyIri, type CompanyNullableIri, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesInput, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsInput, type GetCompanyDetailsResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companiesQuerySchema, companyDetailsSchema, companyIriSchema, companyNullableIriSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
|
|
648
|
+
export { type CompaniesQueryParams, type Company, type CompanyDetails, type CompanyIri, type CompanyNullableIri, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesInput, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsInput, type GetCompanyDetailsResponse, GetUserCompanies, type GetUserCompaniesInput, type GetUserCompaniesQueryParams, type GetUserCompaniesResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companiesQuerySchema, companyDetailsSchema, companyIriSchema, companyNullableIriSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, getUserCompaniesInputSchema, getUserCompaniesQuerySchema, getUserCompaniesResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-type
|
|
|
2
2
|
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
|
-
import { AxiosResponse } from 'axios';
|
|
6
5
|
|
|
7
6
|
declare const companySchema: z.ZodObject<{
|
|
8
7
|
id: z.ZodString;
|
|
@@ -348,7 +347,7 @@ declare class GetCompanies extends AbstractApiRequest<typeof getCompaniesInputSc
|
|
|
348
347
|
query?: GetCompaniesQueryParams;
|
|
349
348
|
});
|
|
350
349
|
getPath(): string;
|
|
351
|
-
parseResponse(data: unknown, rawResponse:
|
|
350
|
+
parseResponse(data: unknown, rawResponse: Response): Paginated<Company>;
|
|
352
351
|
}
|
|
353
352
|
|
|
354
353
|
declare const getCompanyDetailsInputSchema: z.ZodUndefined;
|
|
@@ -424,6 +423,100 @@ declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDeta
|
|
|
424
423
|
getPath(): string;
|
|
425
424
|
}
|
|
426
425
|
|
|
426
|
+
declare const getUserCompaniesQuerySchema: z.ZodObject<{
|
|
427
|
+
businessName: z.ZodOptional<z.ZodString>;
|
|
428
|
+
vat: z.ZodOptional<z.ZodString>;
|
|
429
|
+
taxCode: z.ZodOptional<z.ZodString>;
|
|
430
|
+
'billingAddress.city': z.ZodOptional<z.ZodString>;
|
|
431
|
+
'billingAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
432
|
+
'operationalAddress.city': z.ZodOptional<z.ZodString>;
|
|
433
|
+
'operationalAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
434
|
+
'order[businessName]': z.ZodOptional<z.ZodEnum<{
|
|
435
|
+
asc: "asc";
|
|
436
|
+
desc: "desc";
|
|
437
|
+
}>>;
|
|
438
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
439
|
+
asc: "asc";
|
|
440
|
+
desc: "desc";
|
|
441
|
+
}>>;
|
|
442
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
443
|
+
asc: "asc";
|
|
444
|
+
desc: "desc";
|
|
445
|
+
}>>;
|
|
446
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
type GetUserCompaniesQueryParams = z.infer<typeof getUserCompaniesQuerySchema>;
|
|
449
|
+
declare const getUserCompaniesInputSchema: z.ZodUndefined;
|
|
450
|
+
type GetUserCompaniesInput = z.input<typeof getUserCompaniesInputSchema>;
|
|
451
|
+
declare const getUserCompaniesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
452
|
+
id: z.ZodString;
|
|
453
|
+
businessName: z.ZodString;
|
|
454
|
+
vat: z.ZodString;
|
|
455
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
456
|
+
operationalAddress: z.ZodObject<{
|
|
457
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
458
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
459
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
461
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
462
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
createdAt: z.ZodString;
|
|
465
|
+
updatedAt: z.ZodString;
|
|
466
|
+
}, z.core.$strip>>;
|
|
467
|
+
type GetUserCompaniesResponse = z.infer<typeof getUserCompaniesResponseSchema>;
|
|
468
|
+
declare class GetUserCompanies extends AbstractApiRequest<typeof getUserCompaniesInputSchema, typeof getUserCompaniesResponseSchema, GetUserCompaniesQueryParams> {
|
|
469
|
+
readonly method = "GET";
|
|
470
|
+
readonly contentType = "application/json";
|
|
471
|
+
readonly accept = "application/json";
|
|
472
|
+
readonly inputSchema: z.ZodUndefined;
|
|
473
|
+
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
474
|
+
id: z.ZodString;
|
|
475
|
+
businessName: z.ZodString;
|
|
476
|
+
vat: z.ZodString;
|
|
477
|
+
taxCode: z.ZodNullable<z.ZodString>;
|
|
478
|
+
operationalAddress: z.ZodObject<{
|
|
479
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
480
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
481
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
482
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
483
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
484
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
485
|
+
}, z.core.$strip>;
|
|
486
|
+
createdAt: z.ZodString;
|
|
487
|
+
updatedAt: z.ZodString;
|
|
488
|
+
}, z.core.$strip>>;
|
|
489
|
+
readonly querySchema: z.ZodObject<{
|
|
490
|
+
businessName: z.ZodOptional<z.ZodString>;
|
|
491
|
+
vat: z.ZodOptional<z.ZodString>;
|
|
492
|
+
taxCode: z.ZodOptional<z.ZodString>;
|
|
493
|
+
'billingAddress.city': z.ZodOptional<z.ZodString>;
|
|
494
|
+
'billingAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
495
|
+
'operationalAddress.city': z.ZodOptional<z.ZodString>;
|
|
496
|
+
'operationalAddress.postalCode': z.ZodOptional<z.ZodString>;
|
|
497
|
+
'order[businessName]': z.ZodOptional<z.ZodEnum<{
|
|
498
|
+
asc: "asc";
|
|
499
|
+
desc: "desc";
|
|
500
|
+
}>>;
|
|
501
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
502
|
+
asc: "asc";
|
|
503
|
+
desc: "desc";
|
|
504
|
+
}>>;
|
|
505
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
506
|
+
asc: "asc";
|
|
507
|
+
desc: "desc";
|
|
508
|
+
}>>;
|
|
509
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
510
|
+
}, z.core.$strip>;
|
|
511
|
+
readonly headersSchema: undefined;
|
|
512
|
+
private readonly userId;
|
|
513
|
+
constructor(userId: string, options?: {
|
|
514
|
+
query?: GetUserCompaniesQueryParams;
|
|
515
|
+
});
|
|
516
|
+
getPath(): string;
|
|
517
|
+
parseResponse(data: unknown): Company[];
|
|
518
|
+
}
|
|
519
|
+
|
|
427
520
|
declare const updateCompanyInputSchema: z.ZodObject<{
|
|
428
521
|
operationalAddress: z.ZodOptional<z.ZodObject<{
|
|
429
522
|
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -552,4 +645,4 @@ type CompanyIri = z.infer<typeof companyIriSchema>;
|
|
|
552
645
|
declare const companyNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/companies/:id"> | null, unknown>>;
|
|
553
646
|
type CompanyNullableIri = z.infer<typeof companyNullableIriSchema>;
|
|
554
647
|
|
|
555
|
-
export { type CompaniesQueryParams, type Company, type CompanyDetails, type CompanyIri, type CompanyNullableIri, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesInput, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsInput, type GetCompanyDetailsResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companiesQuerySchema, companyDetailsSchema, companyIriSchema, companyNullableIriSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
|
|
648
|
+
export { type CompaniesQueryParams, type Company, type CompanyDetails, type CompanyIri, type CompanyNullableIri, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesInput, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsInput, type GetCompanyDetailsResponse, GetUserCompanies, type GetUserCompaniesInput, type GetUserCompaniesQueryParams, type GetUserCompaniesResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companiesQuerySchema, companyDetailsSchema, companyIriSchema, companyNullableIriSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, getUserCompaniesInputSchema, getUserCompaniesQuerySchema, getUserCompaniesResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
|
package/dist/index.js
CHANGED
|
@@ -11286,11 +11286,36 @@ var GetCompanyDetails = class extends AbstractApiRequest4 {
|
|
|
11286
11286
|
}
|
|
11287
11287
|
};
|
|
11288
11288
|
|
|
11289
|
-
// src/requests/
|
|
11289
|
+
// src/requests/GetUserCompanies.ts
|
|
11290
11290
|
import { AbstractApiRequest as AbstractApiRequest5 } from "@deliverart/sdk-js-core";
|
|
11291
|
+
var getUserCompaniesQuerySchema = companiesQuerySchema;
|
|
11292
|
+
var getUserCompaniesInputSchema = external_exports.undefined();
|
|
11293
|
+
var getUserCompaniesResponseSchema = external_exports.array(companySchema);
|
|
11294
|
+
var GetUserCompanies = class extends AbstractApiRequest5 {
|
|
11295
|
+
constructor(userId, options) {
|
|
11296
|
+
super(void 0, options);
|
|
11297
|
+
this.method = "GET";
|
|
11298
|
+
this.contentType = "application/json";
|
|
11299
|
+
this.accept = "application/json";
|
|
11300
|
+
this.inputSchema = getUserCompaniesInputSchema;
|
|
11301
|
+
this.outputSchema = getUserCompaniesResponseSchema;
|
|
11302
|
+
this.querySchema = getUserCompaniesQuerySchema;
|
|
11303
|
+
this.headersSchema = void 0;
|
|
11304
|
+
this.userId = userId;
|
|
11305
|
+
}
|
|
11306
|
+
getPath() {
|
|
11307
|
+
return `/users/${this.userId}/companies`;
|
|
11308
|
+
}
|
|
11309
|
+
parseResponse(data) {
|
|
11310
|
+
return external_exports.array(companySchema).parse(data);
|
|
11311
|
+
}
|
|
11312
|
+
};
|
|
11313
|
+
|
|
11314
|
+
// src/requests/UpdateCompany.ts
|
|
11315
|
+
import { AbstractApiRequest as AbstractApiRequest6 } from "@deliverart/sdk-js-core";
|
|
11291
11316
|
var updateCompanyInputSchema = writableCompanySchema.partial();
|
|
11292
11317
|
var updateCompanyResponseSchema = companyDetailsSchema;
|
|
11293
|
-
var UpdateCompany = class extends
|
|
11318
|
+
var UpdateCompany = class extends AbstractApiRequest6 {
|
|
11294
11319
|
constructor(companyId, input) {
|
|
11295
11320
|
super(input);
|
|
11296
11321
|
this.method = "PATCH";
|
|
@@ -11316,6 +11341,7 @@ export {
|
|
|
11316
11341
|
DeleteCompany,
|
|
11317
11342
|
GetCompanies,
|
|
11318
11343
|
GetCompanyDetails,
|
|
11344
|
+
GetUserCompanies,
|
|
11319
11345
|
UpdateCompany,
|
|
11320
11346
|
companiesQuerySchema,
|
|
11321
11347
|
companyDetailsSchema,
|
|
@@ -11331,6 +11357,9 @@ export {
|
|
|
11331
11357
|
getCompaniesResponseSchema,
|
|
11332
11358
|
getCompanyDetailsInputSchema,
|
|
11333
11359
|
getCompanyDetailsResponseSchema,
|
|
11360
|
+
getUserCompaniesInputSchema,
|
|
11361
|
+
getUserCompaniesQuerySchema,
|
|
11362
|
+
getUserCompaniesResponseSchema,
|
|
11334
11363
|
updateCompanyInputSchema,
|
|
11335
11364
|
updateCompanyResponseSchema,
|
|
11336
11365
|
writableCompanySchema
|
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": "
|
|
4
|
+
"version": "2.0.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": "
|
|
22
|
-
"@deliverart/sdk-js-
|
|
23
|
-
"@deliverart/sdk-js-
|
|
21
|
+
"@deliverart/sdk-js-core": "2.0.0",
|
|
22
|
+
"@deliverart/sdk-js-user": "2.0.0",
|
|
23
|
+
"@deliverart/sdk-js-global-types": "2.0.0"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|