@deliverart/sdk-js-company 0.0.4 → 0.0.6
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/CHANGELOG.md +12 -0
- package/dist/index.cjs +19 -0
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +17 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/types.ts +22 -0
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -26,6 +26,8 @@ __export(index_exports, {
|
|
|
26
26
|
GetCompanyDetails: () => GetCompanyDetails,
|
|
27
27
|
UpdateCompany: () => UpdateCompany,
|
|
28
28
|
companyDetailsSchema: () => companyDetailsSchema,
|
|
29
|
+
companyNullablePathSchema: () => companyNullablePathSchema,
|
|
30
|
+
companyPathSchema: () => companyPathSchema,
|
|
29
31
|
companySchema: () => companySchema,
|
|
30
32
|
createCompanyInputSchema: () => createCompanyInputSchema,
|
|
31
33
|
createCompanyResponseSchema: () => createCompanyResponseSchema,
|
|
@@ -194,6 +196,21 @@ var UpdateCompany = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
|
194
196
|
return `/companies/${this.companyId}`;
|
|
195
197
|
}
|
|
196
198
|
};
|
|
199
|
+
|
|
200
|
+
// src/types.ts
|
|
201
|
+
var import_zod5 = require("zod");
|
|
202
|
+
var companyPathSchema = import_zod5.z.string().refine((val) => /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
|
|
203
|
+
message: "Invalid integration path format"
|
|
204
|
+
});
|
|
205
|
+
var companyNullablePathSchema = import_zod5.z.string().nullable().refine(
|
|
206
|
+
(val) => {
|
|
207
|
+
if (!val) return true;
|
|
208
|
+
return /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
message: "Invalid integration path format"
|
|
212
|
+
}
|
|
213
|
+
);
|
|
197
214
|
// Annotate the CommonJS export names for ESM import in node:
|
|
198
215
|
0 && (module.exports = {
|
|
199
216
|
CreateCompany,
|
|
@@ -202,6 +219,8 @@ var UpdateCompany = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
|
202
219
|
GetCompanyDetails,
|
|
203
220
|
UpdateCompany,
|
|
204
221
|
companyDetailsSchema,
|
|
222
|
+
companyNullablePathSchema,
|
|
223
|
+
companyPathSchema,
|
|
205
224
|
companySchema,
|
|
206
225
|
createCompanyInputSchema,
|
|
207
226
|
createCompanyResponseSchema,
|
package/dist/index.d.cts
CHANGED
|
@@ -1930,4 +1930,9 @@ declare class UpdateCompany extends AbstractApiRequest<UpdateCompanyInput, Updat
|
|
|
1930
1930
|
getPath(): string;
|
|
1931
1931
|
}
|
|
1932
1932
|
|
|
1933
|
-
|
|
1933
|
+
declare const companyPathSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
1934
|
+
type PointOfSalePath = z.infer<typeof companyPathSchema>;
|
|
1935
|
+
declare const companyNullablePathSchema: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
|
|
1936
|
+
type PointOfSaleNullablePath = z.infer<typeof companyNullablePathSchema>;
|
|
1937
|
+
|
|
1938
|
+
export { type Company, type CompanyDetails, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsResponse, type PointOfSaleNullablePath, type PointOfSalePath, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companyDetailsSchema, companyNullablePathSchema, companyPathSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1930,4 +1930,9 @@ declare class UpdateCompany extends AbstractApiRequest<UpdateCompanyInput, Updat
|
|
|
1930
1930
|
getPath(): string;
|
|
1931
1931
|
}
|
|
1932
1932
|
|
|
1933
|
-
|
|
1933
|
+
declare const companyPathSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
1934
|
+
type PointOfSalePath = z.infer<typeof companyPathSchema>;
|
|
1935
|
+
declare const companyNullablePathSchema: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>;
|
|
1936
|
+
type PointOfSaleNullablePath = z.infer<typeof companyNullablePathSchema>;
|
|
1937
|
+
|
|
1938
|
+
export { type Company, type CompanyDetails, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsResponse, type PointOfSaleNullablePath, type PointOfSalePath, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companyDetailsSchema, companyNullablePathSchema, companyPathSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
|
package/dist/index.js
CHANGED
|
@@ -154,6 +154,21 @@ var UpdateCompany = class extends AbstractApiRequest5 {
|
|
|
154
154
|
return `/companies/${this.companyId}`;
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
|
+
|
|
158
|
+
// src/types.ts
|
|
159
|
+
import { z as z5 } from "zod";
|
|
160
|
+
var companyPathSchema = z5.string().refine((val) => /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
|
|
161
|
+
message: "Invalid integration path format"
|
|
162
|
+
});
|
|
163
|
+
var companyNullablePathSchema = z5.string().nullable().refine(
|
|
164
|
+
(val) => {
|
|
165
|
+
if (!val) return true;
|
|
166
|
+
return /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
message: "Invalid integration path format"
|
|
170
|
+
}
|
|
171
|
+
);
|
|
157
172
|
export {
|
|
158
173
|
CreateCompany,
|
|
159
174
|
DeleteCompany,
|
|
@@ -161,6 +176,8 @@ export {
|
|
|
161
176
|
GetCompanyDetails,
|
|
162
177
|
UpdateCompany,
|
|
163
178
|
companyDetailsSchema,
|
|
179
|
+
companyNullablePathSchema,
|
|
180
|
+
companyPathSchema,
|
|
164
181
|
companySchema,
|
|
165
182
|
createCompanyInputSchema,
|
|
166
183
|
createCompanyResponseSchema,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/types.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const companyPathSchema = z
|
|
4
|
+
.string()
|
|
5
|
+
.refine(val => /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
|
|
6
|
+
message: 'Invalid integration path format',
|
|
7
|
+
})
|
|
8
|
+
export type PointOfSalePath = z.infer<typeof companyPathSchema>
|
|
9
|
+
|
|
10
|
+
export const companyNullablePathSchema = z
|
|
11
|
+
.string()
|
|
12
|
+
.nullable()
|
|
13
|
+
.refine(
|
|
14
|
+
val => {
|
|
15
|
+
if (!val) return true
|
|
16
|
+
return /^\/companies\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val)
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
message: 'Invalid integration path format',
|
|
20
|
+
},
|
|
21
|
+
)
|
|
22
|
+
export type PointOfSaleNullablePath = z.infer<typeof companyNullablePathSchema>
|