@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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @deliverart/sdk-js-company
2
2
 
3
+ ## 0.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 65b64b5: Expose types
8
+
9
+ ## 0.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 83e0325: Expose company path types
14
+
3
15
  ## 0.0.4
4
16
 
5
17
  ### Patch Changes
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
- export { type Company, type CompanyDetails, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companyDetailsSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
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
- export { type Company, type CompanyDetails, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companyDetailsSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-company",
3
3
  "description": "Deliverart JavaScript SDK for User Management",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './models'
2
2
  export * from './requests'
3
+ export * from './types'
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>