@apideck/unify 0.28.0 → 0.28.2

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.
Files changed (95) hide show
  1. package/docs/sdks/categories/README.md +12 -0
  2. package/examples/package-lock.json +2 -2
  3. package/funcs/accountingCategoriesGet.d.ts.map +1 -1
  4. package/funcs/accountingCategoriesGet.js +4 -2
  5. package/funcs/accountingCategoriesGet.js.map +1 -1
  6. package/funcs/accountingCategoriesList.d.ts.map +1 -1
  7. package/funcs/accountingCategoriesList.js +4 -2
  8. package/funcs/accountingCategoriesList.js.map +1 -1
  9. package/jsr.json +1 -1
  10. package/lib/config.d.ts +4 -4
  11. package/lib/config.js +4 -4
  12. package/models/components/balancesheetfilter.d.ts +5 -0
  13. package/models/components/balancesheetfilter.d.ts.map +1 -1
  14. package/models/components/balancesheetfilter.js +4 -0
  15. package/models/components/balancesheetfilter.js.map +1 -1
  16. package/models/components/categoriesfilter.d.ts +67 -0
  17. package/models/components/categoriesfilter.d.ts.map +1 -0
  18. package/models/components/categoriesfilter.js +82 -0
  19. package/models/components/categoriesfilter.js.map +1 -0
  20. package/models/components/category.d.ts +39 -0
  21. package/models/components/category.d.ts.map +1 -1
  22. package/models/components/category.js +26 -1
  23. package/models/components/category.js.map +1 -1
  24. package/models/components/connection.d.ts +13 -13
  25. package/models/components/connection.d.ts.map +1 -1
  26. package/models/components/connection.js +16 -17
  27. package/models/components/connection.js.map +1 -1
  28. package/models/components/customfield.d.ts +37 -38
  29. package/models/components/customfield.d.ts.map +1 -1
  30. package/models/components/customfield.js +25 -54
  31. package/models/components/customfield.js.map +1 -1
  32. package/models/components/expense.d.ts +10 -0
  33. package/models/components/expense.d.ts.map +1 -1
  34. package/models/components/expense.js +8 -0
  35. package/models/components/expense.js.map +1 -1
  36. package/models/components/index.d.ts +1 -0
  37. package/models/components/index.d.ts.map +1 -1
  38. package/models/components/index.js +1 -0
  39. package/models/components/index.js.map +1 -1
  40. package/models/components/invoicelineitem.d.ts +10 -0
  41. package/models/components/invoicelineitem.d.ts.map +1 -1
  42. package/models/components/invoicelineitem.js +8 -0
  43. package/models/components/invoicelineitem.js.map +1 -1
  44. package/models/components/profitandlossfilter.d.ts +5 -0
  45. package/models/components/profitandlossfilter.d.ts.map +1 -1
  46. package/models/components/profitandlossfilter.js +4 -0
  47. package/models/components/profitandlossfilter.js.map +1 -1
  48. package/models/components/simpleformfieldoption.d.ts +13 -13
  49. package/models/components/simpleformfieldoption.d.ts.map +1 -1
  50. package/models/components/simpleformfieldoption.js +16 -16
  51. package/models/components/simpleformfieldoption.js.map +1 -1
  52. package/models/operations/accountingcategoriesall.d.ts +5 -0
  53. package/models/operations/accountingcategoriesall.d.ts.map +1 -1
  54. package/models/operations/accountingcategoriesall.js +2 -0
  55. package/models/operations/accountingcategoriesall.js.map +1 -1
  56. package/models/operations/accountingcategoriesone.d.ts +5 -0
  57. package/models/operations/accountingcategoriesone.d.ts.map +1 -1
  58. package/models/operations/accountingcategoriesone.js +2 -0
  59. package/models/operations/accountingcategoriesone.js.map +1 -1
  60. package/package.json +2 -2
  61. package/src/__tests__/activities.test.ts +8 -8
  62. package/src/__tests__/applicants.test.ts +4 -4
  63. package/src/__tests__/bankfeedaccounts.test.ts +4 -4
  64. package/src/__tests__/billpayments.test.ts +15 -15
  65. package/src/__tests__/bills.test.ts +8 -8
  66. package/src/__tests__/companies.test.ts +7 -7
  67. package/src/__tests__/contacts.test.ts +7 -7
  68. package/src/__tests__/creditnotes.test.ts +38 -38
  69. package/src/__tests__/customers.test.ts +7 -7
  70. package/src/__tests__/employees.test.ts +5 -5
  71. package/src/__tests__/expenses.test.ts +6 -6
  72. package/src/__tests__/invoices.test.ts +33 -33
  73. package/src/__tests__/journalentries.test.ts +8 -8
  74. package/src/__tests__/leads.test.ts +7 -7
  75. package/src/__tests__/ledgeraccounts.test.ts +15 -15
  76. package/src/__tests__/opportunities.test.ts +4 -4
  77. package/src/__tests__/payments.test.ts +15 -15
  78. package/src/__tests__/purchaseorders.test.ts +29 -29
  79. package/src/__tests__/suppliers.test.ts +7 -7
  80. package/src/__tests__/taxrates.test.ts +8 -8
  81. package/src/funcs/accountingCategoriesGet.ts +15 -5
  82. package/src/funcs/accountingCategoriesList.ts +17 -7
  83. package/src/lib/config.ts +4 -4
  84. package/src/models/components/balancesheetfilter.ts +9 -0
  85. package/src/models/components/categoriesfilter.ts +104 -0
  86. package/src/models/components/category.ts +39 -0
  87. package/src/models/components/connection.ts +27 -20
  88. package/src/models/components/customfield.ts +51 -83
  89. package/src/models/components/expense.ts +18 -0
  90. package/src/models/components/index.ts +1 -0
  91. package/src/models/components/invoicelineitem.ts +18 -0
  92. package/src/models/components/profitandlossfilter.ts +9 -0
  93. package/src/models/components/simpleformfieldoption.ts +21 -18
  94. package/src/models/operations/accountingcategoriesall.ts +7 -0
  95. package/src/models/operations/accountingcategoriesone.ts +7 -0
@@ -114,6 +114,10 @@ export type InvoiceLineItem = {
114
114
  * Discount amount applied to the line item when supported downstream.
115
115
  */
116
116
  discountAmount?: number | null | undefined;
117
+ /**
118
+ * ID of the category of the line item
119
+ */
120
+ categoryId?: string | null | undefined;
117
121
  /**
118
122
  * The ID of the location
119
123
  */
@@ -199,6 +203,10 @@ export type InvoiceLineItemInput = {
199
203
  * Discount amount applied to the line item when supported downstream.
200
204
  */
201
205
  discountAmount?: number | null | undefined;
206
+ /**
207
+ * ID of the category of the line item
208
+ */
209
+ categoryId?: string | null | undefined;
202
210
  /**
203
211
  * The ID of the location
204
212
  */
@@ -261,6 +269,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
261
269
  unit_of_measure: z.nullable(z.string()).optional(),
262
270
  discount_percentage: z.nullable(z.number()).optional(),
263
271
  discount_amount: z.nullable(z.number()).optional(),
272
+ category_id: z.nullable(z.string()).optional(),
264
273
  location_id: z.nullable(z.string()).optional(),
265
274
  department_id: z.nullable(z.string()).optional(),
266
275
  item: LinkedInvoiceItem$inboundSchema.optional(),
@@ -289,6 +298,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
289
298
  "unit_of_measure": "unitOfMeasure",
290
299
  "discount_percentage": "discountPercentage",
291
300
  "discount_amount": "discountAmount",
301
+ "category_id": "categoryId",
292
302
  "location_id": "locationId",
293
303
  "department_id": "departmentId",
294
304
  "tax_rate": "taxRate",
@@ -318,6 +328,7 @@ export type InvoiceLineItem$Outbound = {
318
328
  unit_of_measure?: string | null | undefined;
319
329
  discount_percentage?: number | null | undefined;
320
330
  discount_amount?: number | null | undefined;
331
+ category_id?: string | null | undefined;
321
332
  location_id?: string | null | undefined;
322
333
  department_id?: string | null | undefined;
323
334
  item?: LinkedInvoiceItem$Outbound | undefined;
@@ -354,6 +365,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
354
365
  unitOfMeasure: z.nullable(z.string()).optional(),
355
366
  discountPercentage: z.nullable(z.number()).optional(),
356
367
  discountAmount: z.nullable(z.number()).optional(),
368
+ categoryId: z.nullable(z.string()).optional(),
357
369
  locationId: z.nullable(z.string()).optional(),
358
370
  departmentId: z.nullable(z.string()).optional(),
359
371
  item: LinkedInvoiceItem$outboundSchema.optional(),
@@ -378,6 +390,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
378
390
  unitOfMeasure: "unit_of_measure",
379
391
  discountPercentage: "discount_percentage",
380
392
  discountAmount: "discount_amount",
393
+ categoryId: "category_id",
381
394
  locationId: "location_id",
382
395
  departmentId: "department_id",
383
396
  taxRate: "tax_rate",
@@ -440,6 +453,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
440
453
  unit_of_measure: z.nullable(z.string()).optional(),
441
454
  discount_percentage: z.nullable(z.number()).optional(),
442
455
  discount_amount: z.nullable(z.number()).optional(),
456
+ category_id: z.nullable(z.string()).optional(),
443
457
  location_id: z.nullable(z.string()).optional(),
444
458
  department_id: z.nullable(z.string()).optional(),
445
459
  item: LinkedInvoiceItem$inboundSchema.optional(),
@@ -460,6 +474,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
460
474
  "unit_of_measure": "unitOfMeasure",
461
475
  "discount_percentage": "discountPercentage",
462
476
  "discount_amount": "discountAmount",
477
+ "category_id": "categoryId",
463
478
  "location_id": "locationId",
464
479
  "department_id": "departmentId",
465
480
  "tax_rate": "taxRate",
@@ -485,6 +500,7 @@ export type InvoiceLineItemInput$Outbound = {
485
500
  unit_of_measure?: string | null | undefined;
486
501
  discount_percentage?: number | null | undefined;
487
502
  discount_amount?: number | null | undefined;
503
+ category_id?: string | null | undefined;
488
504
  location_id?: string | null | undefined;
489
505
  department_id?: string | null | undefined;
490
506
  item?: LinkedInvoiceItem$Outbound | undefined;
@@ -517,6 +533,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
517
533
  unitOfMeasure: z.nullable(z.string()).optional(),
518
534
  discountPercentage: z.nullable(z.number()).optional(),
519
535
  discountAmount: z.nullable(z.number()).optional(),
536
+ categoryId: z.nullable(z.string()).optional(),
520
537
  locationId: z.nullable(z.string()).optional(),
521
538
  departmentId: z.nullable(z.string()).optional(),
522
539
  item: LinkedInvoiceItem$outboundSchema.optional(),
@@ -537,6 +554,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
537
554
  unitOfMeasure: "unit_of_measure",
538
555
  discountPercentage: "discount_percentage",
539
556
  discountAmount: "discount_amount",
557
+ categoryId: "category_id",
540
558
  locationId: "location_id",
541
559
  departmentId: "department_id",
542
560
  taxRate: "tax_rate",
@@ -21,6 +21,10 @@ export type ProfitAndLossFilter = {
21
21
  * Filter by end date. If end date is given, start date is required.
22
22
  */
23
23
  endDate?: string | undefined;
24
+ /**
25
+ * Filter by location id
26
+ */
27
+ locationId?: string | undefined;
24
28
  };
25
29
 
26
30
  /** @internal */
@@ -32,11 +36,13 @@ export const ProfitAndLossFilter$inboundSchema: z.ZodType<
32
36
  customer_id: z.string().optional(),
33
37
  start_date: z.string().optional(),
34
38
  end_date: z.string().optional(),
39
+ location_id: z.string().optional(),
35
40
  }).transform((v) => {
36
41
  return remap$(v, {
37
42
  "customer_id": "customerId",
38
43
  "start_date": "startDate",
39
44
  "end_date": "endDate",
45
+ "location_id": "locationId",
40
46
  });
41
47
  });
42
48
 
@@ -45,6 +51,7 @@ export type ProfitAndLossFilter$Outbound = {
45
51
  customer_id?: string | undefined;
46
52
  start_date?: string | undefined;
47
53
  end_date?: string | undefined;
54
+ location_id?: string | undefined;
48
55
  };
49
56
 
50
57
  /** @internal */
@@ -56,11 +63,13 @@ export const ProfitAndLossFilter$outboundSchema: z.ZodType<
56
63
  customerId: z.string().optional(),
57
64
  startDate: z.string().optional(),
58
65
  endDate: z.string().optional(),
66
+ locationId: z.string().optional(),
59
67
  }).transform((v) => {
60
68
  return remap$(v, {
61
69
  customerId: "customer_id",
62
70
  startDate: "start_date",
63
71
  endDate: "end_date",
72
+ locationId: "location_id",
64
73
  });
65
74
  });
66
75
 
@@ -9,7 +9,7 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- export type Five = string | number | number;
12
+ export type Value5 = string | number | number;
13
13
 
14
14
  export type SimpleFormFieldOptionValue =
15
15
  | string
@@ -36,40 +36,43 @@ export type SimpleFormFieldOption = {
36
36
  };
37
37
 
38
38
  /** @internal */
39
- export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
39
+ export const Value5$inboundSchema: z.ZodType<Value5, z.ZodTypeDef, unknown> = z
40
40
  .union([z.string(), z.number().int(), z.number()]);
41
41
 
42
42
  /** @internal */
43
- export type Five$Outbound = string | number | number;
43
+ export type Value5$Outbound = string | number | number;
44
44
 
45
45
  /** @internal */
46
- export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
47
- z.union([z.string(), z.number().int(), z.number()]);
46
+ export const Value5$outboundSchema: z.ZodType<
47
+ Value5$Outbound,
48
+ z.ZodTypeDef,
49
+ Value5
50
+ > = z.union([z.string(), z.number().int(), z.number()]);
48
51
 
49
52
  /**
50
53
  * @internal
51
54
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
55
  */
53
- export namespace Five$ {
54
- /** @deprecated use `Five$inboundSchema` instead. */
55
- export const inboundSchema = Five$inboundSchema;
56
- /** @deprecated use `Five$outboundSchema` instead. */
57
- export const outboundSchema = Five$outboundSchema;
58
- /** @deprecated use `Five$Outbound` instead. */
59
- export type Outbound = Five$Outbound;
56
+ export namespace Value5$ {
57
+ /** @deprecated use `Value5$inboundSchema` instead. */
58
+ export const inboundSchema = Value5$inboundSchema;
59
+ /** @deprecated use `Value5$outboundSchema` instead. */
60
+ export const outboundSchema = Value5$outboundSchema;
61
+ /** @deprecated use `Value5$Outbound` instead. */
62
+ export type Outbound = Value5$Outbound;
60
63
  }
61
64
 
62
- export function fiveToJSON(five: Five): string {
63
- return JSON.stringify(Five$outboundSchema.parse(five));
65
+ export function value5ToJSON(value5: Value5): string {
66
+ return JSON.stringify(Value5$outboundSchema.parse(value5));
64
67
  }
65
68
 
66
- export function fiveFromJSON(
69
+ export function value5FromJSON(
67
70
  jsonString: string,
68
- ): SafeParseResult<Five, SDKValidationError> {
71
+ ): SafeParseResult<Value5, SDKValidationError> {
69
72
  return safeParse(
70
73
  jsonString,
71
- (x) => Five$inboundSchema.parse(JSON.parse(x)),
72
- `Failed to parse 'Five' from JSON`,
74
+ (x) => Value5$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'Value5' from JSON`,
73
76
  );
74
77
  }
75
78
 
@@ -49,6 +49,10 @@ export type AccountingCategoriesAllRequest = {
49
49
  * The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
50
50
  */
51
51
  fields?: string | null | undefined;
52
+ /**
53
+ * Apply filters
54
+ */
55
+ filter?: components.CategoriesFilter | undefined;
52
56
  };
53
57
 
54
58
  export type AccountingCategoriesAllResponse = {
@@ -135,6 +139,7 @@ export const AccountingCategoriesAllRequest$inboundSchema: z.ZodType<
135
139
  cursor: z.nullable(z.string()).optional(),
136
140
  limit: z.number().int().default(20),
137
141
  fields: z.nullable(z.string()).optional(),
142
+ filter: components.CategoriesFilter$inboundSchema.optional(),
138
143
  });
139
144
 
140
145
  /** @internal */
@@ -146,6 +151,7 @@ export type AccountingCategoriesAllRequest$Outbound = {
146
151
  cursor?: string | null | undefined;
147
152
  limit: number;
148
153
  fields?: string | null | undefined;
154
+ filter?: components.CategoriesFilter$Outbound | undefined;
149
155
  };
150
156
 
151
157
  /** @internal */
@@ -161,6 +167,7 @@ export const AccountingCategoriesAllRequest$outboundSchema: z.ZodType<
161
167
  cursor: z.nullable(z.string()).optional(),
162
168
  limit: z.number().int().default(20),
163
169
  fields: z.nullable(z.string()).optional(),
170
+ filter: components.CategoriesFilter$outboundSchema.optional(),
164
171
  });
165
172
 
166
173
  /**
@@ -45,6 +45,10 @@ export type AccountingCategoriesOneRequest = {
45
45
  * The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
46
46
  */
47
47
  fields?: string | null | undefined;
48
+ /**
49
+ * Apply filters
50
+ */
51
+ filter?: components.CategoriesFilter | undefined;
48
52
  };
49
53
 
50
54
  export type AccountingCategoriesOneResponse = {
@@ -130,6 +134,7 @@ export const AccountingCategoriesOneRequest$inboundSchema: z.ZodType<
130
134
  serviceId: z.string().optional(),
131
135
  raw: z.boolean().default(false),
132
136
  fields: z.nullable(z.string()).optional(),
137
+ filter: components.CategoriesFilter$inboundSchema.optional(),
133
138
  });
134
139
 
135
140
  /** @internal */
@@ -140,6 +145,7 @@ export type AccountingCategoriesOneRequest$Outbound = {
140
145
  serviceId?: string | undefined;
141
146
  raw: boolean;
142
147
  fields?: string | null | undefined;
148
+ filter?: components.CategoriesFilter$Outbound | undefined;
143
149
  };
144
150
 
145
151
  /** @internal */
@@ -154,6 +160,7 @@ export const AccountingCategoriesOneRequest$outboundSchema: z.ZodType<
154
160
  serviceId: z.string().optional(),
155
161
  raw: z.boolean().default(false),
156
162
  fields: z.nullable(z.string()).optional(),
163
+ filter: components.CategoriesFilter$outboundSchema.optional(),
157
164
  });
158
165
 
159
166
  /**