@augno/sdk 0.18.0 → 0.18.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 (280) hide show
  1. package/CHANGELOG.md +2 -7
  2. package/package.json +1 -1
  3. package/resources/ai/memories.d.mts +6 -6
  4. package/resources/ai/memories.d.mts.map +1 -1
  5. package/resources/ai/memories.d.ts +6 -6
  6. package/resources/ai/memories.d.ts.map +1 -1
  7. package/resources/auth/api-keys/api-keys.d.mts +8 -0
  8. package/resources/auth/api-keys/api-keys.d.mts.map +1 -1
  9. package/resources/auth/api-keys/api-keys.d.ts +8 -0
  10. package/resources/auth/api-keys/api-keys.d.ts.map +1 -1
  11. package/resources/auth/api-keys/api-keys.js.map +1 -1
  12. package/resources/auth/api-keys/api-keys.mjs.map +1 -1
  13. package/resources/catalog/items/attributes.d.mts +3 -0
  14. package/resources/catalog/items/attributes.d.mts.map +1 -1
  15. package/resources/catalog/items/attributes.d.ts +3 -0
  16. package/resources/catalog/items/attributes.d.ts.map +1 -1
  17. package/resources/catalog/items/attributes.js +3 -0
  18. package/resources/catalog/items/attributes.js.map +1 -1
  19. package/resources/catalog/items/attributes.mjs +3 -0
  20. package/resources/catalog/items/attributes.mjs.map +1 -1
  21. package/resources/catalog/materials/materials.d.mts +6 -0
  22. package/resources/catalog/materials/materials.d.mts.map +1 -1
  23. package/resources/catalog/materials/materials.d.ts +6 -0
  24. package/resources/catalog/materials/materials.d.ts.map +1 -1
  25. package/resources/catalog/materials/materials.js.map +1 -1
  26. package/resources/catalog/materials/materials.mjs.map +1 -1
  27. package/resources/catalog/parts/parts.d.mts +6 -0
  28. package/resources/catalog/parts/parts.d.mts.map +1 -1
  29. package/resources/catalog/parts/parts.d.ts +6 -0
  30. package/resources/catalog/parts/parts.d.ts.map +1 -1
  31. package/resources/catalog/parts/parts.js.map +1 -1
  32. package/resources/catalog/parts/parts.mjs.map +1 -1
  33. package/resources/catalog/products/products.d.mts +6 -4
  34. package/resources/catalog/products/products.d.mts.map +1 -1
  35. package/resources/catalog/products/products.d.ts +6 -4
  36. package/resources/catalog/products/products.d.ts.map +1 -1
  37. package/resources/catalog/products/products.js.map +1 -1
  38. package/resources/catalog/products/products.mjs.map +1 -1
  39. package/resources/core/actions.d.mts +73 -0
  40. package/resources/core/actions.d.mts.map +1 -0
  41. package/resources/core/actions.d.ts +73 -0
  42. package/resources/core/actions.d.ts.map +1 -0
  43. package/resources/core/actions.js +36 -0
  44. package/resources/core/actions.js.map +1 -0
  45. package/resources/core/actions.mjs +32 -0
  46. package/resources/core/actions.mjs.map +1 -0
  47. package/resources/core/audit-events.d.mts +4 -4
  48. package/resources/core/audit-events.d.mts.map +1 -1
  49. package/resources/core/audit-events.d.ts +4 -4
  50. package/resources/core/audit-events.d.ts.map +1 -1
  51. package/resources/core/core.d.mts +6 -2
  52. package/resources/core/core.d.mts.map +1 -1
  53. package/resources/core/core.d.ts +6 -2
  54. package/resources/core/core.d.ts.map +1 -1
  55. package/resources/core/core.js +4 -0
  56. package/resources/core/core.js.map +1 -1
  57. package/resources/core/core.mjs +4 -0
  58. package/resources/core/core.mjs.map +1 -1
  59. package/resources/core/index.d.mts +1 -0
  60. package/resources/core/index.d.mts.map +1 -1
  61. package/resources/core/index.d.ts +1 -0
  62. package/resources/core/index.d.ts.map +1 -1
  63. package/resources/core/index.js +3 -1
  64. package/resources/core/index.js.map +1 -1
  65. package/resources/core/index.mjs +1 -0
  66. package/resources/core/index.mjs.map +1 -1
  67. package/resources/core/jobs.d.mts +1 -1
  68. package/resources/core/jobs.d.mts.map +1 -1
  69. package/resources/core/jobs.d.ts +1 -1
  70. package/resources/core/jobs.d.ts.map +1 -1
  71. package/resources/messaging/conversations/conversations.d.mts +3 -3
  72. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  73. package/resources/messaging/conversations/conversations.d.ts +3 -3
  74. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  75. package/resources/messaging/conversations/conversations.js.map +1 -1
  76. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  77. package/resources/messaging/conversations/links.d.mts +2 -2
  78. package/resources/messaging/conversations/links.d.mts.map +1 -1
  79. package/resources/messaging/conversations/links.d.ts +2 -2
  80. package/resources/messaging/conversations/links.d.ts.map +1 -1
  81. package/resources/messaging/conversations/messages.d.mts +2 -2
  82. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  83. package/resources/messaging/conversations/messages.d.ts +2 -2
  84. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  85. package/resources/messaging/notifications/notifications.d.mts +2 -2
  86. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  87. package/resources/messaging/notifications/notifications.d.ts +2 -2
  88. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  89. package/resources/messaging/notifications/notifications.js.map +1 -1
  90. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  91. package/resources/operations/index.d.mts +2 -1
  92. package/resources/operations/index.d.mts.map +1 -1
  93. package/resources/operations/index.d.ts +2 -1
  94. package/resources/operations/index.d.ts.map +1 -1
  95. package/resources/operations/index.js +9 -7
  96. package/resources/operations/index.js.map +1 -1
  97. package/resources/operations/index.mjs +1 -0
  98. package/resources/operations/index.mjs.map +1 -1
  99. package/resources/operations/machine-downtime-events.d.mts +56 -7
  100. package/resources/operations/machine-downtime-events.d.mts.map +1 -1
  101. package/resources/operations/machine-downtime-events.d.ts +56 -7
  102. package/resources/operations/machine-downtime-events.d.ts.map +1 -1
  103. package/resources/operations/machine-downtime-events.js +11 -7
  104. package/resources/operations/machine-downtime-events.js.map +1 -1
  105. package/resources/operations/machine-downtime-events.mjs +11 -7
  106. package/resources/operations/machine-downtime-events.mjs.map +1 -1
  107. package/resources/operations/operating-calendars/closures.d.mts +173 -0
  108. package/resources/operations/operating-calendars/closures.d.mts.map +1 -0
  109. package/resources/operations/operating-calendars/closures.d.ts +173 -0
  110. package/resources/operations/operating-calendars/closures.d.ts.map +1 -0
  111. package/resources/operations/operating-calendars/closures.js +81 -0
  112. package/resources/operations/operating-calendars/closures.js.map +1 -0
  113. package/resources/operations/operating-calendars/closures.mjs +77 -0
  114. package/resources/operations/operating-calendars/closures.mjs.map +1 -0
  115. package/resources/operations/operating-calendars/index.d.mts +3 -0
  116. package/resources/operations/operating-calendars/index.d.mts.map +1 -0
  117. package/resources/operations/operating-calendars/index.d.ts +3 -0
  118. package/resources/operations/operating-calendars/index.d.ts.map +1 -0
  119. package/resources/operations/operating-calendars/index.js +9 -0
  120. package/resources/operations/operating-calendars/index.js.map +1 -0
  121. package/resources/operations/operating-calendars/index.mjs +4 -0
  122. package/resources/operations/operating-calendars/index.mjs.map +1 -0
  123. package/resources/operations/operating-calendars/operating-calendars.d.mts +332 -0
  124. package/resources/operations/operating-calendars/operating-calendars.d.mts.map +1 -0
  125. package/resources/operations/operating-calendars/operating-calendars.d.ts +332 -0
  126. package/resources/operations/operating-calendars/operating-calendars.d.ts.map +1 -0
  127. package/resources/operations/operating-calendars/operating-calendars.js +129 -0
  128. package/resources/operations/operating-calendars/operating-calendars.js.map +1 -0
  129. package/resources/operations/operating-calendars/operating-calendars.mjs +124 -0
  130. package/resources/operations/operating-calendars/operating-calendars.mjs.map +1 -0
  131. package/resources/operations/operating-calendars.d.mts +2 -0
  132. package/resources/operations/operating-calendars.d.mts.map +1 -0
  133. package/resources/operations/operating-calendars.d.ts +2 -0
  134. package/resources/operations/operating-calendars.d.ts.map +1 -0
  135. package/resources/operations/operating-calendars.js +6 -0
  136. package/resources/operations/operating-calendars.js.map +1 -0
  137. package/resources/operations/operating-calendars.mjs +3 -0
  138. package/resources/operations/operating-calendars.mjs.map +1 -0
  139. package/resources/operations/operations.d.mts +6 -2
  140. package/resources/operations/operations.d.mts.map +1 -1
  141. package/resources/operations/operations.d.ts +6 -2
  142. package/resources/operations/operations.d.ts.map +1 -1
  143. package/resources/operations/operations.js +4 -0
  144. package/resources/operations/operations.js.map +1 -1
  145. package/resources/operations/operations.mjs +4 -0
  146. package/resources/operations/operations.mjs.map +1 -1
  147. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +43 -12
  148. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
  149. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +43 -12
  150. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
  151. package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
  152. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
  153. package/resources/operations/production-schedules/actions.d.mts +34 -1
  154. package/resources/operations/production-schedules/actions.d.mts.map +1 -1
  155. package/resources/operations/production-schedules/actions.d.ts +34 -1
  156. package/resources/operations/production-schedules/actions.d.ts.map +1 -1
  157. package/resources/operations/production-schedules/actions.js +8 -0
  158. package/resources/operations/production-schedules/actions.js.map +1 -1
  159. package/resources/operations/production-schedules/actions.mjs +8 -0
  160. package/resources/operations/production-schedules/actions.mjs.map +1 -1
  161. package/resources/operations/production-schedules/index.d.mts +1 -1
  162. package/resources/operations/production-schedules/index.d.mts.map +1 -1
  163. package/resources/operations/production-schedules/index.d.ts +1 -1
  164. package/resources/operations/production-schedules/index.d.ts.map +1 -1
  165. package/resources/operations/production-schedules/index.js.map +1 -1
  166. package/resources/operations/production-schedules/index.mjs.map +1 -1
  167. package/resources/operations/production-schedules/lines.d.mts +10 -6
  168. package/resources/operations/production-schedules/lines.d.mts.map +1 -1
  169. package/resources/operations/production-schedules/lines.d.ts +10 -6
  170. package/resources/operations/production-schedules/lines.d.ts.map +1 -1
  171. package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
  172. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
  173. package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
  174. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
  175. package/resources/operations/production-schedules/production-schedules.js +42 -0
  176. package/resources/operations/production-schedules/production-schedules.js.map +1 -1
  177. package/resources/operations/production-schedules/production-schedules.mjs +42 -0
  178. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
  179. package/resources/sales/account-groups.d.mts +2 -1
  180. package/resources/sales/account-groups.d.mts.map +1 -1
  181. package/resources/sales/account-groups.d.ts +2 -1
  182. package/resources/sales/account-groups.d.ts.map +1 -1
  183. package/resources/sales/account-prices/account-prices.d.mts +10 -1
  184. package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
  185. package/resources/sales/account-prices/account-prices.d.ts +10 -1
  186. package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
  187. package/resources/sales/account-prices/account-prices.js.map +1 -1
  188. package/resources/sales/account-prices/account-prices.mjs.map +1 -1
  189. package/resources/sales/addresses.d.mts +20 -0
  190. package/resources/sales/addresses.d.mts.map +1 -1
  191. package/resources/sales/addresses.d.ts +20 -0
  192. package/resources/sales/addresses.d.ts.map +1 -1
  193. package/resources/sales/customers/customers.d.mts +72 -14
  194. package/resources/sales/customers/customers.d.mts.map +1 -1
  195. package/resources/sales/customers/customers.d.ts +72 -14
  196. package/resources/sales/customers/customers.d.ts.map +1 -1
  197. package/resources/sales/customers/customers.js +10 -5
  198. package/resources/sales/customers/customers.js.map +1 -1
  199. package/resources/sales/customers/customers.mjs +10 -5
  200. package/resources/sales/customers/customers.mjs.map +1 -1
  201. package/resources/sales/customers/index.d.mts +1 -1
  202. package/resources/sales/customers/index.d.mts.map +1 -1
  203. package/resources/sales/customers/index.d.ts +1 -1
  204. package/resources/sales/customers/index.d.ts.map +1 -1
  205. package/resources/sales/customers/index.js.map +1 -1
  206. package/resources/sales/customers/index.mjs.map +1 -1
  207. package/resources/sales/index.d.mts +1 -1
  208. package/resources/sales/index.d.mts.map +1 -1
  209. package/resources/sales/index.d.ts +1 -1
  210. package/resources/sales/index.d.ts.map +1 -1
  211. package/resources/sales/index.js.map +1 -1
  212. package/resources/sales/index.mjs.map +1 -1
  213. package/resources/sales/sales-orders/actions.d.mts +217 -1
  214. package/resources/sales/sales-orders/actions.d.mts.map +1 -1
  215. package/resources/sales/sales-orders/actions.d.ts +217 -1
  216. package/resources/sales/sales-orders/actions.d.ts.map +1 -1
  217. package/resources/sales/sales-orders/actions.js +36 -0
  218. package/resources/sales/sales-orders/actions.js.map +1 -1
  219. package/resources/sales/sales-orders/actions.mjs +36 -0
  220. package/resources/sales/sales-orders/actions.mjs.map +1 -1
  221. package/resources/sales/sales-orders/index.d.mts +1 -1
  222. package/resources/sales/sales-orders/index.d.mts.map +1 -1
  223. package/resources/sales/sales-orders/index.d.ts +1 -1
  224. package/resources/sales/sales-orders/index.d.ts.map +1 -1
  225. package/resources/sales/sales-orders/index.js.map +1 -1
  226. package/resources/sales/sales-orders/index.mjs.map +1 -1
  227. package/resources/sales/sales-orders/sales-orders.d.mts +105 -9
  228. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  229. package/resources/sales/sales-orders/sales-orders.d.ts +105 -9
  230. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  231. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  232. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  233. package/resources/sales/sales.d.mts +2 -2
  234. package/resources/sales/sales.d.mts.map +1 -1
  235. package/resources/sales/sales.d.ts +2 -2
  236. package/resources/sales/sales.d.ts.map +1 -1
  237. package/resources/sales/sales.js.map +1 -1
  238. package/resources/sales/sales.mjs.map +1 -1
  239. package/src/resources/ai/memories.ts +6 -6
  240. package/src/resources/auth/api-keys/api-keys.ts +9 -0
  241. package/src/resources/catalog/items/attributes.ts +3 -0
  242. package/src/resources/catalog/materials/materials.ts +6 -0
  243. package/src/resources/catalog/parts/parts.ts +6 -0
  244. package/src/resources/catalog/products/products.ts +6 -4
  245. package/src/resources/core/actions.ts +89 -0
  246. package/src/resources/core/audit-events.ts +16 -0
  247. package/src/resources/core/core.ts +19 -0
  248. package/src/resources/core/index.ts +6 -0
  249. package/src/resources/core/jobs.ts +4 -0
  250. package/src/resources/messaging/conversations/conversations.ts +12 -0
  251. package/src/resources/messaging/conversations/links.ts +8 -0
  252. package/src/resources/messaging/conversations/messages.ts +8 -0
  253. package/src/resources/messaging/notifications/notifications.ts +8 -0
  254. package/src/resources/operations/index.ts +15 -0
  255. package/src/resources/operations/machine-downtime-events.ts +62 -7
  256. package/src/resources/operations/operating-calendars/closures.ts +223 -0
  257. package/src/resources/operations/operating-calendars/index.ts +23 -0
  258. package/src/resources/operations/operating-calendars/operating-calendars.ts +427 -0
  259. package/src/resources/operations/operating-calendars.ts +3 -0
  260. package/src/resources/operations/operations.ts +36 -0
  261. package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +49 -12
  262. package/src/resources/operations/production-schedules/actions.ts +37 -1
  263. package/src/resources/operations/production-schedules/index.ts +4 -0
  264. package/src/resources/operations/production-schedules/lines.ts +10 -6
  265. package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
  266. package/src/resources/sales/account-groups.ts +2 -1
  267. package/src/resources/sales/account-prices/account-prices.ts +11 -1
  268. package/src/resources/sales/addresses.ts +24 -0
  269. package/src/resources/sales/customers/customers.ts +90 -14
  270. package/src/resources/sales/customers/index.ts +1 -0
  271. package/src/resources/sales/index.ts +1 -0
  272. package/src/resources/sales/sales-orders/actions.ts +266 -0
  273. package/src/resources/sales/sales-orders/index.ts +4 -0
  274. package/src/resources/sales/sales-orders/sales-orders.ts +131 -7
  275. package/src/resources/sales/sales.ts +2 -0
  276. package/src/version.ts +1 -1
  277. package/version.d.mts +1 -1
  278. package/version.d.ts +1 -1
  279. package/version.js +1 -1
  280. package/version.mjs +1 -1
@@ -0,0 +1,332 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as APIKeysAPI from "../../auth/api-keys/api-keys.mjs";
3
+ import * as ClosuresAPI from "./closures.mjs";
4
+ import { ClosureCreateParams, ClosureDeleteParams, ClosureDeleteResponse, ClosureListParams, Closures, CreateOperatingCalendarClosureRequest, ListOperatingCalendarClosure, OperatingCalendarClosure } from "./closures.mjs";
5
+ import { APIPromise } from "../../../core/api-promise.mjs";
6
+ import { RequestOptions } from "../../../internal/request-options.mjs";
7
+ /**
8
+ * The days a plant tenders freight and a customer's dock accepts it, less the holidays and shutdowns either side is closed for. Every ship-by date is resolved against them, so an order is never committed to a day nobody can act on.
9
+ */
10
+ export declare class OperatingCalendars extends APIResource {
11
+ closures: ClosuresAPI.Closures;
12
+ /**
13
+ * Lists the operating calendars configured for the account.
14
+ *
15
+ * Both kinds are returned unless `kind` narrows it, ordered with each kind's
16
+ * default first.
17
+ *
18
+ * This endpoint requires the permission: `production_schedules:read`.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const listOperatingCalendar =
23
+ * await client.operations.operatingCalendars.list();
24
+ * ```
25
+ */
26
+ list(query?: OperatingCalendarListParams | null | undefined, options?: RequestOptions): APIPromise<ListOperatingCalendar>;
27
+ /**
28
+ * Retrieves one operating calendar by ID.
29
+ *
30
+ * This endpoint requires the permission: `production_schedules:read`.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const operatingCalendar =
35
+ * await client.operations.operatingCalendars.retrieve(
36
+ * 'occd_7f2m9qk4wzxb',
37
+ * );
38
+ * ```
39
+ */
40
+ retrieve(id: string, options?: RequestOptions): APIPromise<OperatingCalendar>;
41
+ /**
42
+ * Creates an operating calendar.
43
+ *
44
+ * The days govern every ship-by date resolved against this calendar: a plant that
45
+ * tenders freight Monday to Thursday never gets committed to a Friday shipment,
46
+ * and a customer's promised delivery date is worked back from a day they can
47
+ * actually receive on.
48
+ *
49
+ * A calendar starts with no closures. Add holidays and shutdowns to it separately.
50
+ *
51
+ * This endpoint requires the permission: `production_schedules:create`.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const operatingCalendar =
56
+ * await client.operations.operatingCalendars.create({
57
+ * code: 'default_ship',
58
+ * days_of_week: '1111000',
59
+ * kind: 'ship',
60
+ * name: 'Shipping days',
61
+ * cutoff_at: '15:00',
62
+ * is_default: true,
63
+ * timezone: 'America/Chicago',
64
+ * });
65
+ * ```
66
+ */
67
+ create(body: OperatingCalendarCreateParams, options?: RequestOptions): APIPromise<OperatingCalendar>;
68
+ /**
69
+ * Updates an operating calendar.
70
+ *
71
+ * A calendar's kind cannot change: a shipping calendar that became a receiving one
72
+ * would silently drop the pickup cutoff every commitment resolved against it
73
+ * depends on. Create a second calendar instead.
74
+ *
75
+ * Changes apply to commitments made from now on. Orders already issued keep the
76
+ * dates they were stamped with, so adding a holiday never retroactively makes a
77
+ * past order late.
78
+ *
79
+ * This endpoint requires the permission: `production_schedules:update`.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const operatingCalendar =
84
+ * await client.operations.operatingCalendars.update(
85
+ * 'occd_7f2m9qk4wzxb',
86
+ * );
87
+ * ```
88
+ */
89
+ update(id: string, body?: OperatingCalendarUpdateParams | null | undefined, options?: RequestOptions): APIPromise<OperatingCalendar>;
90
+ /**
91
+ * Deletes an operating calendar.
92
+ *
93
+ * Refused while any address, customer, customer group, or account setting still
94
+ * points at it. Deleting a calendar out from under its references would quietly
95
+ * return every affected order to a plain Monday-to-Friday week, which reads as the
96
+ * feature breaking rather than as a decision anybody made — so re-point them
97
+ * first.
98
+ *
99
+ * This endpoint requires the permission: `production_schedules:delete`.
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * const operatingCalendar =
104
+ * await client.operations.operatingCalendars.delete(
105
+ * 'occd_7f2m9qk4wzxb',
106
+ * );
107
+ * ```
108
+ */
109
+ delete(id: string, options?: RequestOptions): APIPromise<OperatingCalendarDeleteResponse>;
110
+ }
111
+ /**
112
+ * Request to create an operating calendar.
113
+ */
114
+ export interface CreateOperatingCalendarRequest {
115
+ /**
116
+ * Short stable identifier, unique per account.
117
+ */
118
+ code: string;
119
+ /**
120
+ * Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
121
+ * Monday to Friday; "1111000" is a Monday-to-Thursday plant. At least one day must
122
+ * be open.
123
+ */
124
+ days_of_week: string;
125
+ /**
126
+ * Which side of a shipment this calendar describes.
127
+ */
128
+ kind: 'ship' | 'receive';
129
+ /**
130
+ * Human-readable name.
131
+ */
132
+ name: string;
133
+ /**
134
+ * Local time freight has to be tendered by, as "15:00". Only a shipping calendar
135
+ * accepts one.
136
+ */
137
+ cutoff_at?: string;
138
+ /**
139
+ * Make this the calendar used when nothing more specific is linked. Setting it
140
+ * demotes whichever calendar of the same kind held the role.
141
+ */
142
+ is_default?: boolean;
143
+ /**
144
+ * IANA zone the cutoff is read in, such as "America/Chicago". On a receiving
145
+ * calendar, leave it unset to take the zone from the ship-to address.
146
+ */
147
+ timezone?: string;
148
+ }
149
+ /**
150
+ * A single page of resources, together with the metadata needed to page through
151
+ * the rest of the result set.
152
+ */
153
+ export interface ListOperatingCalendar {
154
+ /**
155
+ * Resources in this page.
156
+ */
157
+ data: Array<OperatingCalendar>;
158
+ /**
159
+ * Resource type identifier.
160
+ */
161
+ object: 'list';
162
+ /**
163
+ * PageInfo describes where the current page sits within a paginated result set and
164
+ * how to move to the adjacent pages.
165
+ *
166
+ * Page a list by following the URLs below rather than assembling cursors yourself.
167
+ * For a top-level list endpoint the URL repeats the original request's query
168
+ * string with only the cursor swapped, so following it preserves the same filters,
169
+ * search term, and page size.
170
+ */
171
+ page_info: APIKeysAPI.PageInfo;
172
+ }
173
+ /**
174
+ * OperatingCalendar is the set of days one party to a shipment operates.
175
+ *
176
+ * A `ship` calendar is the plant tendering freight to a carrier; a `receive`
177
+ * calendar is a customer's dock accepting it. Ship-by dates are resolved against
178
+ * both, so an order is never committed to a day nobody can act on.
179
+ */
180
+ export interface OperatingCalendar {
181
+ /**
182
+ * Unique identifier.
183
+ */
184
+ id: string;
185
+ /**
186
+ * Short stable identifier, unique per account.
187
+ */
188
+ code: string;
189
+ /**
190
+ * Creation timestamp.
191
+ */
192
+ created_at: string;
193
+ /**
194
+ * Local time freight has to be tendered by, as "15:00". Only a shipping calendar
195
+ * carries one.
196
+ */
197
+ cutoff_at: string | null;
198
+ /**
199
+ * Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
200
+ * Monday to Friday; "1111000" is a Monday-to-Thursday plant.
201
+ */
202
+ days_of_week: string;
203
+ /**
204
+ * Whether this is the calendar used when nothing more specific is linked. Exactly
205
+ * one per kind.
206
+ */
207
+ is_default: boolean;
208
+ /**
209
+ * Which side of a shipment this calendar describes.
210
+ */
211
+ kind: 'ship' | 'receive';
212
+ /**
213
+ * Human-readable name.
214
+ */
215
+ name: string;
216
+ /**
217
+ * Resource type identifier.
218
+ */
219
+ object: 'operating_calendar';
220
+ /**
221
+ * IANA zone the cutoff is read in. Null on a receiving calendar means it is taken
222
+ * from the ship-to address.
223
+ */
224
+ timezone: string | null;
225
+ /**
226
+ * Last updated timestamp.
227
+ */
228
+ updated_at: string;
229
+ }
230
+ /**
231
+ * Request to update an operating calendar.
232
+ */
233
+ export interface UpdateOperatingCalendarRequest {
234
+ /**
235
+ * Local time freight has to be tendered by. Clearing it leaves the ship-by date a
236
+ * day with no time of day attached.
237
+ */
238
+ cutoff_at?: string | null;
239
+ /**
240
+ * Open weekdays as seven characters of '0' or '1', Monday first. At least one day
241
+ * must be open.
242
+ */
243
+ days_of_week?: string;
244
+ /**
245
+ * Make this the calendar used when nothing more specific is linked. Setting it
246
+ * demotes whichever calendar of the same kind held the role.
247
+ */
248
+ is_default?: boolean;
249
+ /**
250
+ * Human-readable name.
251
+ */
252
+ name?: string;
253
+ /**
254
+ * IANA zone the cutoff is read in. Clearing it on a receiving calendar returns to
255
+ * taking the zone from the ship-to address.
256
+ */
257
+ timezone?: string | null;
258
+ }
259
+ export interface OperatingCalendarDeleteResponse {
260
+ }
261
+ export interface OperatingCalendarListParams {
262
+ /**
263
+ * Return only shipping or only receiving calendars.
264
+ */
265
+ kind?: 'ship' | 'receive';
266
+ }
267
+ export interface OperatingCalendarCreateParams {
268
+ /**
269
+ * Short stable identifier, unique per account.
270
+ */
271
+ code: string;
272
+ /**
273
+ * Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
274
+ * Monday to Friday; "1111000" is a Monday-to-Thursday plant. At least one day must
275
+ * be open.
276
+ */
277
+ days_of_week: string;
278
+ /**
279
+ * Which side of a shipment this calendar describes.
280
+ */
281
+ kind: 'ship' | 'receive';
282
+ /**
283
+ * Human-readable name.
284
+ */
285
+ name: string;
286
+ /**
287
+ * Local time freight has to be tendered by, as "15:00". Only a shipping calendar
288
+ * accepts one.
289
+ */
290
+ cutoff_at?: string;
291
+ /**
292
+ * Make this the calendar used when nothing more specific is linked. Setting it
293
+ * demotes whichever calendar of the same kind held the role.
294
+ */
295
+ is_default?: boolean;
296
+ /**
297
+ * IANA zone the cutoff is read in, such as "America/Chicago". On a receiving
298
+ * calendar, leave it unset to take the zone from the ship-to address.
299
+ */
300
+ timezone?: string;
301
+ }
302
+ export interface OperatingCalendarUpdateParams {
303
+ /**
304
+ * Local time freight has to be tendered by. Clearing it leaves the ship-by date a
305
+ * day with no time of day attached.
306
+ */
307
+ cutoff_at?: string | null;
308
+ /**
309
+ * Open weekdays as seven characters of '0' or '1', Monday first. At least one day
310
+ * must be open.
311
+ */
312
+ days_of_week?: string;
313
+ /**
314
+ * Make this the calendar used when nothing more specific is linked. Setting it
315
+ * demotes whichever calendar of the same kind held the role.
316
+ */
317
+ is_default?: boolean;
318
+ /**
319
+ * Human-readable name.
320
+ */
321
+ name?: string;
322
+ /**
323
+ * IANA zone the cutoff is read in. Clearing it on a receiving calendar returns to
324
+ * taking the zone from the ship-to address.
325
+ */
326
+ timezone?: string | null;
327
+ }
328
+ export declare namespace OperatingCalendars {
329
+ export { type CreateOperatingCalendarRequest as CreateOperatingCalendarRequest, type ListOperatingCalendar as ListOperatingCalendar, type OperatingCalendar as OperatingCalendar, type UpdateOperatingCalendarRequest as UpdateOperatingCalendarRequest, type OperatingCalendarDeleteResponse as OperatingCalendarDeleteResponse, type OperatingCalendarListParams as OperatingCalendarListParams, type OperatingCalendarCreateParams as OperatingCalendarCreateParams, type OperatingCalendarUpdateParams as OperatingCalendarUpdateParams, };
330
+ export { Closures as Closures, type CreateOperatingCalendarClosureRequest as CreateOperatingCalendarClosureRequest, type ListOperatingCalendarClosure as ListOperatingCalendarClosure, type OperatingCalendarClosure as OperatingCalendarClosure, type ClosureDeleteResponse as ClosureDeleteResponse, type ClosureListParams as ClosureListParams, type ClosureCreateParams as ClosureCreateParams, type ClosureDeleteParams as ClosureDeleteParams, };
331
+ }
332
+ //# sourceMappingURL=operating-calendars.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operating-calendars.d.mts","sourceRoot":"","sources":["../../../src/resources/operations/operating-calendars/operating-calendars.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,WAAW;OAChB,EACL,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,qCAAqC,EACrC,4BAA4B,EAC5B,wBAAwB,EACzB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAK,GAAE,2BAA2B,GAAG,IAAI,GAAG,SAAc,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAI7E;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CAAC,IAAI,EAAE,6BAA6B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAIpG;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,6BAA6B,GAAG,IAAI,GAAG,SAAc,EAC3D,OAAO,CAAC,EAAE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CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -0,0 +1,332 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import * as APIKeysAPI from "../../auth/api-keys/api-keys.js";
3
+ import * as ClosuresAPI from "./closures.js";
4
+ import { ClosureCreateParams, ClosureDeleteParams, ClosureDeleteResponse, ClosureListParams, Closures, CreateOperatingCalendarClosureRequest, ListOperatingCalendarClosure, OperatingCalendarClosure } from "./closures.js";
5
+ import { APIPromise } from "../../../core/api-promise.js";
6
+ import { RequestOptions } from "../../../internal/request-options.js";
7
+ /**
8
+ * The days a plant tenders freight and a customer's dock accepts it, less the holidays and shutdowns either side is closed for. Every ship-by date is resolved against them, so an order is never committed to a day nobody can act on.
9
+ */
10
+ export declare class OperatingCalendars extends APIResource {
11
+ closures: ClosuresAPI.Closures;
12
+ /**
13
+ * Lists the operating calendars configured for the account.
14
+ *
15
+ * Both kinds are returned unless `kind` narrows it, ordered with each kind's
16
+ * default first.
17
+ *
18
+ * This endpoint requires the permission: `production_schedules:read`.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const listOperatingCalendar =
23
+ * await client.operations.operatingCalendars.list();
24
+ * ```
25
+ */
26
+ list(query?: OperatingCalendarListParams | null | undefined, options?: RequestOptions): APIPromise<ListOperatingCalendar>;
27
+ /**
28
+ * Retrieves one operating calendar by ID.
29
+ *
30
+ * This endpoint requires the permission: `production_schedules:read`.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const operatingCalendar =
35
+ * await client.operations.operatingCalendars.retrieve(
36
+ * 'occd_7f2m9qk4wzxb',
37
+ * );
38
+ * ```
39
+ */
40
+ retrieve(id: string, options?: RequestOptions): APIPromise<OperatingCalendar>;
41
+ /**
42
+ * Creates an operating calendar.
43
+ *
44
+ * The days govern every ship-by date resolved against this calendar: a plant that
45
+ * tenders freight Monday to Thursday never gets committed to a Friday shipment,
46
+ * and a customer's promised delivery date is worked back from a day they can
47
+ * actually receive on.
48
+ *
49
+ * A calendar starts with no closures. Add holidays and shutdowns to it separately.
50
+ *
51
+ * This endpoint requires the permission: `production_schedules:create`.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const operatingCalendar =
56
+ * await client.operations.operatingCalendars.create({
57
+ * code: 'default_ship',
58
+ * days_of_week: '1111000',
59
+ * kind: 'ship',
60
+ * name: 'Shipping days',
61
+ * cutoff_at: '15:00',
62
+ * is_default: true,
63
+ * timezone: 'America/Chicago',
64
+ * });
65
+ * ```
66
+ */
67
+ create(body: OperatingCalendarCreateParams, options?: RequestOptions): APIPromise<OperatingCalendar>;
68
+ /**
69
+ * Updates an operating calendar.
70
+ *
71
+ * A calendar's kind cannot change: a shipping calendar that became a receiving one
72
+ * would silently drop the pickup cutoff every commitment resolved against it
73
+ * depends on. Create a second calendar instead.
74
+ *
75
+ * Changes apply to commitments made from now on. Orders already issued keep the
76
+ * dates they were stamped with, so adding a holiday never retroactively makes a
77
+ * past order late.
78
+ *
79
+ * This endpoint requires the permission: `production_schedules:update`.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const operatingCalendar =
84
+ * await client.operations.operatingCalendars.update(
85
+ * 'occd_7f2m9qk4wzxb',
86
+ * );
87
+ * ```
88
+ */
89
+ update(id: string, body?: OperatingCalendarUpdateParams | null | undefined, options?: RequestOptions): APIPromise<OperatingCalendar>;
90
+ /**
91
+ * Deletes an operating calendar.
92
+ *
93
+ * Refused while any address, customer, customer group, or account setting still
94
+ * points at it. Deleting a calendar out from under its references would quietly
95
+ * return every affected order to a plain Monday-to-Friday week, which reads as the
96
+ * feature breaking rather than as a decision anybody made — so re-point them
97
+ * first.
98
+ *
99
+ * This endpoint requires the permission: `production_schedules:delete`.
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * const operatingCalendar =
104
+ * await client.operations.operatingCalendars.delete(
105
+ * 'occd_7f2m9qk4wzxb',
106
+ * );
107
+ * ```
108
+ */
109
+ delete(id: string, options?: RequestOptions): APIPromise<OperatingCalendarDeleteResponse>;
110
+ }
111
+ /**
112
+ * Request to create an operating calendar.
113
+ */
114
+ export interface CreateOperatingCalendarRequest {
115
+ /**
116
+ * Short stable identifier, unique per account.
117
+ */
118
+ code: string;
119
+ /**
120
+ * Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
121
+ * Monday to Friday; "1111000" is a Monday-to-Thursday plant. At least one day must
122
+ * be open.
123
+ */
124
+ days_of_week: string;
125
+ /**
126
+ * Which side of a shipment this calendar describes.
127
+ */
128
+ kind: 'ship' | 'receive';
129
+ /**
130
+ * Human-readable name.
131
+ */
132
+ name: string;
133
+ /**
134
+ * Local time freight has to be tendered by, as "15:00". Only a shipping calendar
135
+ * accepts one.
136
+ */
137
+ cutoff_at?: string;
138
+ /**
139
+ * Make this the calendar used when nothing more specific is linked. Setting it
140
+ * demotes whichever calendar of the same kind held the role.
141
+ */
142
+ is_default?: boolean;
143
+ /**
144
+ * IANA zone the cutoff is read in, such as "America/Chicago". On a receiving
145
+ * calendar, leave it unset to take the zone from the ship-to address.
146
+ */
147
+ timezone?: string;
148
+ }
149
+ /**
150
+ * A single page of resources, together with the metadata needed to page through
151
+ * the rest of the result set.
152
+ */
153
+ export interface ListOperatingCalendar {
154
+ /**
155
+ * Resources in this page.
156
+ */
157
+ data: Array<OperatingCalendar>;
158
+ /**
159
+ * Resource type identifier.
160
+ */
161
+ object: 'list';
162
+ /**
163
+ * PageInfo describes where the current page sits within a paginated result set and
164
+ * how to move to the adjacent pages.
165
+ *
166
+ * Page a list by following the URLs below rather than assembling cursors yourself.
167
+ * For a top-level list endpoint the URL repeats the original request's query
168
+ * string with only the cursor swapped, so following it preserves the same filters,
169
+ * search term, and page size.
170
+ */
171
+ page_info: APIKeysAPI.PageInfo;
172
+ }
173
+ /**
174
+ * OperatingCalendar is the set of days one party to a shipment operates.
175
+ *
176
+ * A `ship` calendar is the plant tendering freight to a carrier; a `receive`
177
+ * calendar is a customer's dock accepting it. Ship-by dates are resolved against
178
+ * both, so an order is never committed to a day nobody can act on.
179
+ */
180
+ export interface OperatingCalendar {
181
+ /**
182
+ * Unique identifier.
183
+ */
184
+ id: string;
185
+ /**
186
+ * Short stable identifier, unique per account.
187
+ */
188
+ code: string;
189
+ /**
190
+ * Creation timestamp.
191
+ */
192
+ created_at: string;
193
+ /**
194
+ * Local time freight has to be tendered by, as "15:00". Only a shipping calendar
195
+ * carries one.
196
+ */
197
+ cutoff_at: string | null;
198
+ /**
199
+ * Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
200
+ * Monday to Friday; "1111000" is a Monday-to-Thursday plant.
201
+ */
202
+ days_of_week: string;
203
+ /**
204
+ * Whether this is the calendar used when nothing more specific is linked. Exactly
205
+ * one per kind.
206
+ */
207
+ is_default: boolean;
208
+ /**
209
+ * Which side of a shipment this calendar describes.
210
+ */
211
+ kind: 'ship' | 'receive';
212
+ /**
213
+ * Human-readable name.
214
+ */
215
+ name: string;
216
+ /**
217
+ * Resource type identifier.
218
+ */
219
+ object: 'operating_calendar';
220
+ /**
221
+ * IANA zone the cutoff is read in. Null on a receiving calendar means it is taken
222
+ * from the ship-to address.
223
+ */
224
+ timezone: string | null;
225
+ /**
226
+ * Last updated timestamp.
227
+ */
228
+ updated_at: string;
229
+ }
230
+ /**
231
+ * Request to update an operating calendar.
232
+ */
233
+ export interface UpdateOperatingCalendarRequest {
234
+ /**
235
+ * Local time freight has to be tendered by. Clearing it leaves the ship-by date a
236
+ * day with no time of day attached.
237
+ */
238
+ cutoff_at?: string | null;
239
+ /**
240
+ * Open weekdays as seven characters of '0' or '1', Monday first. At least one day
241
+ * must be open.
242
+ */
243
+ days_of_week?: string;
244
+ /**
245
+ * Make this the calendar used when nothing more specific is linked. Setting it
246
+ * demotes whichever calendar of the same kind held the role.
247
+ */
248
+ is_default?: boolean;
249
+ /**
250
+ * Human-readable name.
251
+ */
252
+ name?: string;
253
+ /**
254
+ * IANA zone the cutoff is read in. Clearing it on a receiving calendar returns to
255
+ * taking the zone from the ship-to address.
256
+ */
257
+ timezone?: string | null;
258
+ }
259
+ export interface OperatingCalendarDeleteResponse {
260
+ }
261
+ export interface OperatingCalendarListParams {
262
+ /**
263
+ * Return only shipping or only receiving calendars.
264
+ */
265
+ kind?: 'ship' | 'receive';
266
+ }
267
+ export interface OperatingCalendarCreateParams {
268
+ /**
269
+ * Short stable identifier, unique per account.
270
+ */
271
+ code: string;
272
+ /**
273
+ * Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
274
+ * Monday to Friday; "1111000" is a Monday-to-Thursday plant. At least one day must
275
+ * be open.
276
+ */
277
+ days_of_week: string;
278
+ /**
279
+ * Which side of a shipment this calendar describes.
280
+ */
281
+ kind: 'ship' | 'receive';
282
+ /**
283
+ * Human-readable name.
284
+ */
285
+ name: string;
286
+ /**
287
+ * Local time freight has to be tendered by, as "15:00". Only a shipping calendar
288
+ * accepts one.
289
+ */
290
+ cutoff_at?: string;
291
+ /**
292
+ * Make this the calendar used when nothing more specific is linked. Setting it
293
+ * demotes whichever calendar of the same kind held the role.
294
+ */
295
+ is_default?: boolean;
296
+ /**
297
+ * IANA zone the cutoff is read in, such as "America/Chicago". On a receiving
298
+ * calendar, leave it unset to take the zone from the ship-to address.
299
+ */
300
+ timezone?: string;
301
+ }
302
+ export interface OperatingCalendarUpdateParams {
303
+ /**
304
+ * Local time freight has to be tendered by. Clearing it leaves the ship-by date a
305
+ * day with no time of day attached.
306
+ */
307
+ cutoff_at?: string | null;
308
+ /**
309
+ * Open weekdays as seven characters of '0' or '1', Monday first. At least one day
310
+ * must be open.
311
+ */
312
+ days_of_week?: string;
313
+ /**
314
+ * Make this the calendar used when nothing more specific is linked. Setting it
315
+ * demotes whichever calendar of the same kind held the role.
316
+ */
317
+ is_default?: boolean;
318
+ /**
319
+ * Human-readable name.
320
+ */
321
+ name?: string;
322
+ /**
323
+ * IANA zone the cutoff is read in. Clearing it on a receiving calendar returns to
324
+ * taking the zone from the ship-to address.
325
+ */
326
+ timezone?: string | null;
327
+ }
328
+ export declare namespace OperatingCalendars {
329
+ export { type CreateOperatingCalendarRequest as CreateOperatingCalendarRequest, type ListOperatingCalendar as ListOperatingCalendar, type OperatingCalendar as OperatingCalendar, type UpdateOperatingCalendarRequest as UpdateOperatingCalendarRequest, type OperatingCalendarDeleteResponse as OperatingCalendarDeleteResponse, type OperatingCalendarListParams as OperatingCalendarListParams, type OperatingCalendarCreateParams as OperatingCalendarCreateParams, type OperatingCalendarUpdateParams as OperatingCalendarUpdateParams, };
330
+ export { Closures as Closures, type CreateOperatingCalendarClosureRequest as CreateOperatingCalendarClosureRequest, type ListOperatingCalendarClosure as ListOperatingCalendarClosure, type OperatingCalendarClosure as OperatingCalendarClosure, type ClosureDeleteResponse as ClosureDeleteResponse, type ClosureListParams as ClosureListParams, type ClosureCreateParams as ClosureCreateParams, type ClosureDeleteParams as ClosureDeleteParams, };
331
+ }
332
+ //# sourceMappingURL=operating-calendars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operating-calendars.d.ts","sourceRoot":"","sources":["../../../src/resources/operations/operating-calendars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