@epilot/sdk 2.18.18 → 2.18.20
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/definitions/billing-runtime.json +1 -1
- package/definitions/billing.json +195 -19
- package/definitions/calendar.json +18 -4
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +8 -8
- package/dist/apis/billing.d.cts +2 -2
- package/dist/apis/billing.d.ts +2 -2
- package/dist/apis/billing.js +2 -2
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.d.cts +2 -2
- package/dist/apis/calendar.d.ts +2 -2
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/billing-MN36KAKQ.cjs +7 -0
- package/dist/billing-UAVEPNBZ.js +7 -0
- package/dist/{billing-runtime-3OCFZU2K.js → billing-runtime-OSGDEA63.js} +1 -1
- package/dist/{billing-runtime-PKKLWPQY.cjs → billing-runtime-YZEHKRAZ.cjs} +2 -2
- package/dist/{billing.d-N_1F759g.d.cts → billing.d-Blv16_el.d.cts} +205 -34
- package/dist/{billing.d-N_1F759g.d.ts → billing.d-Blv16_el.d.ts} +205 -34
- package/dist/calendar-2H4RGMV3.js +7 -0
- package/dist/calendar-UADWQX7G.cjs +7 -0
- package/dist/{calendar.d-Cz8R-GJ5.d.cts → calendar.d-mk-ltGpk.d.cts} +10 -5
- package/dist/{calendar.d-Cz8R-GJ5.d.ts → calendar.d-mk-ltGpk.d.ts} +10 -5
- package/dist/{chunk-U5XZ4ERL.js → chunk-5SAISAQY.js} +1 -1
- package/dist/{chunk-WCF2QVZE.js → chunk-JH7NETLC.js} +3 -3
- package/dist/{chunk-4XOJVIUQ.cjs → chunk-PNVSKDMV.cjs} +1 -1
- package/dist/{chunk-GZMYWGJR.cjs → chunk-YGOX7IZC.cjs} +3 -3
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/docs/billing.md +553 -171
- package/docs/calendar.md +8 -2
- package/package.json +1 -1
- package/dist/billing-C45UEPBV.cjs +0 -7
- package/dist/billing-IV5ABNW4.js +0 -7
- package/dist/calendar-EMNHW6ME.cjs +0 -7
- package/dist/calendar-PZFEAXYE.js +0 -7
|
@@ -5,14 +5,26 @@ import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, Unkno
|
|
|
5
5
|
|
|
6
6
|
declare namespace Components {
|
|
7
7
|
namespace Parameters {
|
|
8
|
-
export type ConfigurationHistoryChangeType = "installment_amount_changed";
|
|
8
|
+
export type ConfigurationHistoryChangeType = "installment_amount_changed" | "contract_pricing_changed";
|
|
9
9
|
export type From = number;
|
|
10
|
+
/**
|
|
11
|
+
* example:
|
|
12
|
+
* installment_amount_changed,contract_pricing_changed
|
|
13
|
+
*/
|
|
14
|
+
export type HistoryChangeTypes = string; // ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$
|
|
15
|
+
export type IncludeHistory = boolean;
|
|
10
16
|
export type Size = number;
|
|
11
17
|
}
|
|
12
18
|
export interface QueryParameters {
|
|
13
19
|
From?: Parameters.From;
|
|
14
20
|
Size?: Parameters.Size;
|
|
15
21
|
ConfigurationHistoryChangeType?: Parameters.ConfigurationHistoryChangeType;
|
|
22
|
+
HistoryChangeTypes?: /**
|
|
23
|
+
* example:
|
|
24
|
+
* installment_amount_changed,contract_pricing_changed
|
|
25
|
+
*/
|
|
26
|
+
Parameters.HistoryChangeTypes /* ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$ */;
|
|
27
|
+
IncludeHistory?: Parameters.IncludeHistory;
|
|
16
28
|
}
|
|
17
29
|
namespace Responses {
|
|
18
30
|
export type BadRequest = /* Standard error response format */ Schemas.Error;
|
|
@@ -756,18 +768,26 @@ declare namespace Components {
|
|
|
756
768
|
}
|
|
757
769
|
export interface ConfigurationHistoryContext {
|
|
758
770
|
base_price?: PriceContext;
|
|
771
|
+
/**
|
|
772
|
+
* Canonically ordered base-price components. The singular base_price remains for compatibility.
|
|
773
|
+
*/
|
|
774
|
+
base_prices?: PriceContext[];
|
|
759
775
|
working_price?: PriceContext;
|
|
776
|
+
/**
|
|
777
|
+
* Canonically ordered working-price components, including separate HT and NT prices when present. The singular working_price remains for compatibility.
|
|
778
|
+
*/
|
|
779
|
+
working_prices?: PriceContext[];
|
|
760
780
|
}
|
|
761
781
|
export interface ConfigurationHistoryResponse {
|
|
762
782
|
history: ConfigurationHistoryRow[];
|
|
763
783
|
total: number;
|
|
764
784
|
}
|
|
765
|
-
export
|
|
785
|
+
export type ConfigurationHistoryRow = InstallmentAmountChangedHistoryRow | ContractPricingChangedHistoryRow;
|
|
786
|
+
export interface ConfigurationHistoryRowBase {
|
|
766
787
|
event_id: string;
|
|
767
788
|
org_id: string;
|
|
768
789
|
entity_type: "contract" | "billing_account";
|
|
769
790
|
entity_id: string;
|
|
770
|
-
change_type: "installment_amount_changed";
|
|
771
791
|
/**
|
|
772
792
|
* example:
|
|
773
793
|
* 1
|
|
@@ -780,30 +800,6 @@ declare namespace Components {
|
|
|
780
800
|
source_label?: string;
|
|
781
801
|
source_system?: string;
|
|
782
802
|
source_reference?: string;
|
|
783
|
-
previous_value?: {
|
|
784
|
-
/**
|
|
785
|
-
* Amount in cents when available or derivable.
|
|
786
|
-
* example:
|
|
787
|
-
* 10050
|
|
788
|
-
*/
|
|
789
|
-
amount?: number;
|
|
790
|
-
/**
|
|
791
|
-
* Decimal amount string when available or derivable.
|
|
792
|
-
* example:
|
|
793
|
-
* 100.50
|
|
794
|
-
*/
|
|
795
|
-
amount_decimal?: string;
|
|
796
|
-
currency?: /**
|
|
797
|
-
* Currency code in ISO 4217 format (Währungscode).
|
|
798
|
-
* Common values: EUR (Euro), CHF (Swiss Franc)
|
|
799
|
-
*
|
|
800
|
-
* example:
|
|
801
|
-
* EUR
|
|
802
|
-
*/
|
|
803
|
-
Currency;
|
|
804
|
-
} | null;
|
|
805
|
-
new_value: InstallmentAmountValue;
|
|
806
|
-
context?: ConfigurationHistoryContext;
|
|
807
803
|
}
|
|
808
804
|
/**
|
|
809
805
|
* Represents a customer contract (Vertrag) for billing purposes.
|
|
@@ -1232,6 +1228,77 @@ declare namespace Components {
|
|
|
1232
1228
|
*/
|
|
1233
1229
|
Currency;
|
|
1234
1230
|
}
|
|
1231
|
+
export interface ContractPricingChangedHistoryRow {
|
|
1232
|
+
event_id: string;
|
|
1233
|
+
org_id: string;
|
|
1234
|
+
entity_type: "contract" | "billing_account";
|
|
1235
|
+
entity_id: string;
|
|
1236
|
+
/**
|
|
1237
|
+
* example:
|
|
1238
|
+
* 1
|
|
1239
|
+
*/
|
|
1240
|
+
schema_version: number;
|
|
1241
|
+
effective_at?: string; // date-time
|
|
1242
|
+
changed_at: string; // date-time
|
|
1243
|
+
created_at: string; // date-time
|
|
1244
|
+
source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown";
|
|
1245
|
+
source_label?: string;
|
|
1246
|
+
source_system?: string;
|
|
1247
|
+
source_reference?: string;
|
|
1248
|
+
change_type: "contract_pricing_changed";
|
|
1249
|
+
previous_context: {
|
|
1250
|
+
base_price?: PriceContext;
|
|
1251
|
+
/**
|
|
1252
|
+
* Canonically ordered base-price components. The singular base_price remains for compatibility.
|
|
1253
|
+
*/
|
|
1254
|
+
base_prices?: PriceContext[];
|
|
1255
|
+
working_price?: PriceContext;
|
|
1256
|
+
/**
|
|
1257
|
+
* Canonically ordered working-price components, including separate HT and NT prices when present. The singular working_price remains for compatibility.
|
|
1258
|
+
*/
|
|
1259
|
+
working_prices?: PriceContext[];
|
|
1260
|
+
tariff?: ContractTariffContext;
|
|
1261
|
+
/**
|
|
1262
|
+
* Canonically ordered tariff products for composite Contracts. The singular tariff is populated when exactly one tariff product exists.
|
|
1263
|
+
*/
|
|
1264
|
+
tariffs?: ContractTariffContext[];
|
|
1265
|
+
} | null;
|
|
1266
|
+
new_context: {
|
|
1267
|
+
base_price?: PriceContext;
|
|
1268
|
+
/**
|
|
1269
|
+
* Canonically ordered base-price components. The singular base_price remains for compatibility.
|
|
1270
|
+
*/
|
|
1271
|
+
base_prices?: PriceContext[];
|
|
1272
|
+
working_price?: PriceContext;
|
|
1273
|
+
/**
|
|
1274
|
+
* Canonically ordered working-price components, including separate HT and NT prices when present. The singular working_price remains for compatibility.
|
|
1275
|
+
*/
|
|
1276
|
+
working_prices?: PriceContext[];
|
|
1277
|
+
tariff?: ContractTariffContext;
|
|
1278
|
+
/**
|
|
1279
|
+
* Canonically ordered tariff products for composite Contracts. The singular tariff is populated when exactly one tariff product exists.
|
|
1280
|
+
*/
|
|
1281
|
+
tariffs?: ContractTariffContext[];
|
|
1282
|
+
} | null;
|
|
1283
|
+
changed_fields: ("tariff" | "base_price" | "working_price" | "discount" | "dynamic_tariff_configuration")[];
|
|
1284
|
+
}
|
|
1285
|
+
export interface ContractPricingContext {
|
|
1286
|
+
base_price?: PriceContext;
|
|
1287
|
+
/**
|
|
1288
|
+
* Canonically ordered base-price components. The singular base_price remains for compatibility.
|
|
1289
|
+
*/
|
|
1290
|
+
base_prices?: PriceContext[];
|
|
1291
|
+
working_price?: PriceContext;
|
|
1292
|
+
/**
|
|
1293
|
+
* Canonically ordered working-price components, including separate HT and NT prices when present. The singular working_price remains for compatibility.
|
|
1294
|
+
*/
|
|
1295
|
+
working_prices?: PriceContext[];
|
|
1296
|
+
tariff?: ContractTariffContext;
|
|
1297
|
+
/**
|
|
1298
|
+
* Canonically ordered tariff products for composite Contracts. The singular tariff is populated when exactly one tariff product exists.
|
|
1299
|
+
*/
|
|
1300
|
+
tariffs?: ContractTariffContext[];
|
|
1301
|
+
}
|
|
1235
1302
|
export interface ContractPricingInformation {
|
|
1236
1303
|
entity_type: "contract";
|
|
1237
1304
|
entity_id: string;
|
|
@@ -1252,6 +1319,10 @@ declare namespace Components {
|
|
|
1252
1319
|
installments_per_year?: number;
|
|
1253
1320
|
inferred: boolean;
|
|
1254
1321
|
}
|
|
1322
|
+
export interface ContractTariffContext {
|
|
1323
|
+
product_id?: string;
|
|
1324
|
+
product_title?: string;
|
|
1325
|
+
}
|
|
1255
1326
|
/**
|
|
1256
1327
|
* Correction event (Korrekturbuchung).
|
|
1257
1328
|
* Represents an adjustment to a previous billing entry,
|
|
@@ -2047,6 +2118,49 @@ declare namespace Components {
|
|
|
2047
2118
|
*/
|
|
2048
2119
|
internal_note?: string;
|
|
2049
2120
|
}
|
|
2121
|
+
export interface InstallmentAmountChangedHistoryRow {
|
|
2122
|
+
event_id: string;
|
|
2123
|
+
org_id: string;
|
|
2124
|
+
entity_type: "contract" | "billing_account";
|
|
2125
|
+
entity_id: string;
|
|
2126
|
+
/**
|
|
2127
|
+
* example:
|
|
2128
|
+
* 1
|
|
2129
|
+
*/
|
|
2130
|
+
schema_version: number;
|
|
2131
|
+
effective_at?: string; // date-time
|
|
2132
|
+
changed_at: string; // date-time
|
|
2133
|
+
created_at: string; // date-time
|
|
2134
|
+
source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown";
|
|
2135
|
+
source_label?: string;
|
|
2136
|
+
source_system?: string;
|
|
2137
|
+
source_reference?: string;
|
|
2138
|
+
change_type: "installment_amount_changed";
|
|
2139
|
+
previous_value?: {
|
|
2140
|
+
/**
|
|
2141
|
+
* Amount in cents when available or derivable.
|
|
2142
|
+
* example:
|
|
2143
|
+
* 10050
|
|
2144
|
+
*/
|
|
2145
|
+
amount?: number;
|
|
2146
|
+
/**
|
|
2147
|
+
* Decimal amount string when available or derivable.
|
|
2148
|
+
* example:
|
|
2149
|
+
* 100.50
|
|
2150
|
+
*/
|
|
2151
|
+
amount_decimal?: string;
|
|
2152
|
+
currency?: /**
|
|
2153
|
+
* Currency code in ISO 4217 format (Währungscode).
|
|
2154
|
+
* Common values: EUR (Euro), CHF (Swiss Franc)
|
|
2155
|
+
*
|
|
2156
|
+
* example:
|
|
2157
|
+
* EUR
|
|
2158
|
+
*/
|
|
2159
|
+
Currency;
|
|
2160
|
+
} | null;
|
|
2161
|
+
new_value: InstallmentAmountValue;
|
|
2162
|
+
context?: ConfigurationHistoryContext;
|
|
2163
|
+
}
|
|
2050
2164
|
export interface InstallmentAmountValue {
|
|
2051
2165
|
/**
|
|
2052
2166
|
* Amount in cents when available or derivable.
|
|
@@ -2629,6 +2743,10 @@ declare namespace Components {
|
|
|
2629
2743
|
export interface PriceContext {
|
|
2630
2744
|
price_id?: string;
|
|
2631
2745
|
price_title?: string;
|
|
2746
|
+
/**
|
|
2747
|
+
* Semantic tariff register for the price component, such as HT or NT.
|
|
2748
|
+
*/
|
|
2749
|
+
tariff_type?: string;
|
|
2632
2750
|
pricing_model?: string;
|
|
2633
2751
|
unit_amount_gross_decimal?: string;
|
|
2634
2752
|
unit_amount_net_decimal?: string;
|
|
@@ -2944,8 +3062,13 @@ declare namespace Paths {
|
|
|
2944
3062
|
}
|
|
2945
3063
|
namespace GetBillingAccountConfigurationHistory {
|
|
2946
3064
|
namespace Parameters {
|
|
2947
|
-
export type ChangeType = "installment_amount_changed";
|
|
3065
|
+
export type ChangeType = "installment_amount_changed" | "contract_pricing_changed";
|
|
2948
3066
|
export type From = number;
|
|
3067
|
+
/**
|
|
3068
|
+
* example:
|
|
3069
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3070
|
+
*/
|
|
3071
|
+
export type HistoryChangeTypes = string; // ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$
|
|
2949
3072
|
export type Id = string;
|
|
2950
3073
|
export type Size = number;
|
|
2951
3074
|
}
|
|
@@ -2954,6 +3077,11 @@ declare namespace Paths {
|
|
|
2954
3077
|
}
|
|
2955
3078
|
export interface QueryParameters {
|
|
2956
3079
|
change_type?: Parameters.ChangeType;
|
|
3080
|
+
history_change_types?: /**
|
|
3081
|
+
* example:
|
|
3082
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3083
|
+
*/
|
|
3084
|
+
Parameters.HistoryChangeTypes /* ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$ */;
|
|
2957
3085
|
from?: Parameters.From;
|
|
2958
3086
|
size?: Parameters.Size;
|
|
2959
3087
|
}
|
|
@@ -2963,11 +3091,25 @@ declare namespace Paths {
|
|
|
2963
3091
|
}
|
|
2964
3092
|
namespace GetBillingAccountPricingInformation {
|
|
2965
3093
|
namespace Parameters {
|
|
3094
|
+
/**
|
|
3095
|
+
* example:
|
|
3096
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3097
|
+
*/
|
|
3098
|
+
export type HistoryChangeTypes = string; // ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$
|
|
2966
3099
|
export type Id = string;
|
|
3100
|
+
export type IncludeHistory = boolean;
|
|
2967
3101
|
}
|
|
2968
3102
|
export interface PathParameters {
|
|
2969
3103
|
id: Parameters.Id;
|
|
2970
3104
|
}
|
|
3105
|
+
export interface QueryParameters {
|
|
3106
|
+
history_change_types?: /**
|
|
3107
|
+
* example:
|
|
3108
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3109
|
+
*/
|
|
3110
|
+
Parameters.HistoryChangeTypes /* ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$ */;
|
|
3111
|
+
include_history?: Parameters.IncludeHistory;
|
|
3112
|
+
}
|
|
2971
3113
|
namespace Responses {
|
|
2972
3114
|
export type $200 = Components.Schemas.BillingAccountPricingInformation;
|
|
2973
3115
|
}
|
|
@@ -3124,8 +3266,13 @@ declare namespace Paths {
|
|
|
3124
3266
|
}
|
|
3125
3267
|
namespace GetContractConfigurationHistory {
|
|
3126
3268
|
namespace Parameters {
|
|
3127
|
-
export type ChangeType = "installment_amount_changed";
|
|
3269
|
+
export type ChangeType = "installment_amount_changed" | "contract_pricing_changed";
|
|
3128
3270
|
export type From = number;
|
|
3271
|
+
/**
|
|
3272
|
+
* example:
|
|
3273
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3274
|
+
*/
|
|
3275
|
+
export type HistoryChangeTypes = string; // ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$
|
|
3129
3276
|
export type Id = string;
|
|
3130
3277
|
export type Size = number;
|
|
3131
3278
|
}
|
|
@@ -3134,6 +3281,11 @@ declare namespace Paths {
|
|
|
3134
3281
|
}
|
|
3135
3282
|
export interface QueryParameters {
|
|
3136
3283
|
change_type?: Parameters.ChangeType;
|
|
3284
|
+
history_change_types?: /**
|
|
3285
|
+
* example:
|
|
3286
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3287
|
+
*/
|
|
3288
|
+
Parameters.HistoryChangeTypes /* ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$ */;
|
|
3137
3289
|
from?: Parameters.From;
|
|
3138
3290
|
size?: Parameters.Size;
|
|
3139
3291
|
}
|
|
@@ -3143,11 +3295,25 @@ declare namespace Paths {
|
|
|
3143
3295
|
}
|
|
3144
3296
|
namespace GetContractPricingInformation {
|
|
3145
3297
|
namespace Parameters {
|
|
3298
|
+
/**
|
|
3299
|
+
* example:
|
|
3300
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3301
|
+
*/
|
|
3302
|
+
export type HistoryChangeTypes = string; // ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$
|
|
3146
3303
|
export type Id = string;
|
|
3304
|
+
export type IncludeHistory = boolean;
|
|
3147
3305
|
}
|
|
3148
3306
|
export interface PathParameters {
|
|
3149
3307
|
id: Parameters.Id;
|
|
3150
3308
|
}
|
|
3309
|
+
export interface QueryParameters {
|
|
3310
|
+
history_change_types?: /**
|
|
3311
|
+
* example:
|
|
3312
|
+
* installment_amount_changed,contract_pricing_changed
|
|
3313
|
+
*/
|
|
3314
|
+
Parameters.HistoryChangeTypes /* ^(installment_amount_changed|contract_pricing_changed)(,(installment_amount_changed|contract_pricing_changed))*$ */;
|
|
3315
|
+
include_history?: Parameters.IncludeHistory;
|
|
3316
|
+
}
|
|
3151
3317
|
namespace Responses {
|
|
3152
3318
|
export type $200 = Components.Schemas.ContractPricingInformation;
|
|
3153
3319
|
}
|
|
@@ -3380,7 +3546,7 @@ interface OperationMethods {
|
|
|
3380
3546
|
* Get current pricing information and recent configuration history for a Contract.
|
|
3381
3547
|
*/
|
|
3382
3548
|
'getContractPricingInformation'(
|
|
3383
|
-
parameters?: Parameters<Paths.GetContractPricingInformation.PathParameters> | null,
|
|
3549
|
+
parameters?: Parameters<Paths.GetContractPricingInformation.QueryParameters & Paths.GetContractPricingInformation.PathParameters> | null,
|
|
3384
3550
|
data?: any,
|
|
3385
3551
|
config?: AxiosRequestConfig
|
|
3386
3552
|
): OperationResponse<Paths.GetContractPricingInformation.Responses.$200>
|
|
@@ -3390,7 +3556,7 @@ interface OperationMethods {
|
|
|
3390
3556
|
* Get current pricing information for the active Contracts linked to a Billing Account.
|
|
3391
3557
|
*/
|
|
3392
3558
|
'getBillingAccountPricingInformation'(
|
|
3393
|
-
parameters?: Parameters<Paths.GetBillingAccountPricingInformation.PathParameters> | null,
|
|
3559
|
+
parameters?: Parameters<Paths.GetBillingAccountPricingInformation.QueryParameters & Paths.GetBillingAccountPricingInformation.PathParameters> | null,
|
|
3394
3560
|
data?: any,
|
|
3395
3561
|
config?: AxiosRequestConfig
|
|
3396
3562
|
): OperationResponse<Paths.GetBillingAccountPricingInformation.Responses.$200>
|
|
@@ -3575,7 +3741,7 @@ interface PathsDictionary {
|
|
|
3575
3741
|
* Get current pricing information and recent configuration history for a Contract.
|
|
3576
3742
|
*/
|
|
3577
3743
|
'get'(
|
|
3578
|
-
parameters?: Parameters<Paths.GetContractPricingInformation.PathParameters> | null,
|
|
3744
|
+
parameters?: Parameters<Paths.GetContractPricingInformation.QueryParameters & Paths.GetContractPricingInformation.PathParameters> | null,
|
|
3579
3745
|
data?: any,
|
|
3580
3746
|
config?: AxiosRequestConfig
|
|
3581
3747
|
): OperationResponse<Paths.GetContractPricingInformation.Responses.$200>
|
|
@@ -3587,7 +3753,7 @@ interface PathsDictionary {
|
|
|
3587
3753
|
* Get current pricing information for the active Contracts linked to a Billing Account.
|
|
3588
3754
|
*/
|
|
3589
3755
|
'get'(
|
|
3590
|
-
parameters?: Parameters<Paths.GetBillingAccountPricingInformation.PathParameters> | null,
|
|
3756
|
+
parameters?: Parameters<Paths.GetBillingAccountPricingInformation.QueryParameters & Paths.GetBillingAccountPricingInformation.PathParameters> | null,
|
|
3591
3757
|
data?: any,
|
|
3592
3758
|
config?: AxiosRequestConfig
|
|
3593
3759
|
): OperationResponse<Paths.GetBillingAccountPricingInformation.Responses.$200>
|
|
@@ -3648,10 +3814,14 @@ type BonusEvent = Components.Schemas.BonusEvent;
|
|
|
3648
3814
|
type ConfigurationHistoryContext = Components.Schemas.ConfigurationHistoryContext;
|
|
3649
3815
|
type ConfigurationHistoryResponse = Components.Schemas.ConfigurationHistoryResponse;
|
|
3650
3816
|
type ConfigurationHistoryRow = Components.Schemas.ConfigurationHistoryRow;
|
|
3817
|
+
type ConfigurationHistoryRowBase = Components.Schemas.ConfigurationHistoryRowBase;
|
|
3651
3818
|
type Contract = Components.Schemas.Contract;
|
|
3652
3819
|
type ContractItem = Components.Schemas.ContractItem;
|
|
3820
|
+
type ContractPricingChangedHistoryRow = Components.Schemas.ContractPricingChangedHistoryRow;
|
|
3821
|
+
type ContractPricingContext = Components.Schemas.ContractPricingContext;
|
|
3653
3822
|
type ContractPricingInformation = Components.Schemas.ContractPricingInformation;
|
|
3654
3823
|
type ContractPricingSchedule = Components.Schemas.ContractPricingSchedule;
|
|
3824
|
+
type ContractTariffContext = Components.Schemas.ContractTariffContext;
|
|
3655
3825
|
type CorrectionEvent = Components.Schemas.CorrectionEvent;
|
|
3656
3826
|
type Currency = Components.Schemas.Currency;
|
|
3657
3827
|
type CustomEvent = Components.Schemas.CustomEvent;
|
|
@@ -3662,6 +3832,7 @@ type EntityRelationItem = Components.Schemas.EntityRelationItem;
|
|
|
3662
3832
|
type EntitySlug = Components.Schemas.EntitySlug;
|
|
3663
3833
|
type Error = Components.Schemas.Error;
|
|
3664
3834
|
type FinalBillEvent = Components.Schemas.FinalBillEvent;
|
|
3835
|
+
type InstallmentAmountChangedHistoryRow = Components.Schemas.InstallmentAmountChangedHistoryRow;
|
|
3665
3836
|
type InstallmentAmountValue = Components.Schemas.InstallmentAmountValue;
|
|
3666
3837
|
type InstallmentEvent = Components.Schemas.InstallmentEvent;
|
|
3667
3838
|
type InvoiceEvent = Components.Schemas.InvoiceEvent;
|
|
@@ -3670,4 +3841,4 @@ type PriceContext = Components.Schemas.PriceContext;
|
|
|
3670
3841
|
type PricingInformationBalance = Components.Schemas.PricingInformationBalance;
|
|
3671
3842
|
type ReimbursementEvent = Components.Schemas.ReimbursementEvent;
|
|
3672
3843
|
|
|
3673
|
-
export { type
|
|
3844
|
+
export { type InstallmentAmountValue as A, type Balance as B, type Client as C, type DunningFeeEvent as D, type EntityId as E, type FinalBillEvent as F, type InstallmentEvent as G, type InvoiceEvent as H, type InstallmentAmountChangedHistoryRow as I, type PaymentEvent as J, type PriceContext as K, type PricingInformationBalance as L, type OperationMethods as O, Paths as P, type ReimbursementEvent as R, Components as a, type PathsDictionary as b, type BaseBillingEvent as c, type BaseEntity as d, type BillingAccountPricingInformation as e, type BillingEvent as f, type BillingEventUpdate as g, type BonusEvent as h, type ConfigurationHistoryContext as i, type ConfigurationHistoryResponse as j, type ConfigurationHistoryRow as k, type ConfigurationHistoryRowBase as l, type Contract as m, type ContractItem as n, type ContractPricingChangedHistoryRow as o, type ContractPricingContext as p, type ContractPricingInformation as q, type ContractPricingSchedule as r, type ContractTariffContext as s, type CorrectionEvent as t, type Currency as u, type CustomEvent as v, type DynamicTariffPriceContext as w, type EntityRelationItem as x, type EntitySlug as y, type Error as z };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/calendar.json
|
|
4
|
+
var calendar_default = '# Calendar API\n\n- **Base URL:** `https://calendar.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/calendar](https://docs.epilot.io/api/calendar)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.calendar.listUsersAbsence(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/calendar\'\n\nconst calendarClient = getClient()\nauthorize(calendarClient, () => \'<token>\')\nconst { data } = await calendarClient.listUsersAbsence(...)\n```\n\n## Operations\n\n**Absence**\n- [`listUsersAbsence`](#listusersabsence)\n- [`searchAbsence`](#searchabsence)\n- [`searchNowAbsence`](#searchnowabsence)\n- [`listAbsenceAdjustments`](#listabsenceadjustments)\n- [`createAbsenceAdjustment`](#createabsenceadjustment)\n- [`getAbsenceAdjustment`](#getabsenceadjustment)\n- [`patchAbsenceAdjustment`](#patchabsenceadjustment)\n- [`deleteAbsenceAdjustment`](#deleteabsenceadjustment)\n- [`getUserAbsence`](#getuserabsence)\n\n**Working Hours**\n- [`getWorkingHours`](#getworkinghours)\n- [`putWorkingHours`](#putworkinghours)\n- [`deleteWorkingHours`](#deleteworkinghours)\n\n**Calendars**\n- [`listCalendars`](#listcalendars)\n- [`createCalendar`](#createcalendar)\n- [`addOutlookCalendar`](#addoutlookcalendar)\n- [`listOutlookCalendars`](#listoutlookcalendars)\n- [`deleteOutlookCalendar`](#deleteoutlookcalendar)\n- [`outlookWebhook`](#outlookwebhook)\n- [`getCalendar`](#getcalendar)\n- [`updateCalendar`](#updatecalendar)\n- [`deleteCalendar`](#deletecalendar)\n\n**Calendar Events**\n- [`listEvents`](#listevents)\n- [`createEvent`](#createevent)\n- [`getEvent`](#getevent)\n- [`updateEvent`](#updateevent)\n- [`deleteEvent`](#deleteevent)\n- [`shareEvent`](#shareevent)\n- [`unshareEvent`](#unshareevent)\n\n**Schemas**\n- [`AbsenceInterval`](#absenceinterval)\n- [`AbsenceIntervalSource`](#absenceintervalsource)\n- [`Error`](#error)\n- [`SearchAbsenceBody`](#searchabsencebody)\n- [`SearchNowAbsenceBody`](#searchnowabsencebody)\n- [`AbsenceAdjustment`](#absenceadjustment)\n- [`AbsenceStatus`](#absencestatus)\n- [`AbsenceType`](#absencetype)\n- [`CreateAbsenceAdjustmentBody`](#createabsenceadjustmentbody)\n- [`PatchAbsenceAdjustmentBody`](#patchabsenceadjustmentbody)\n- [`ExternalCalendar`](#externalcalendar)\n- [`WorkingHours`](#workinghours)\n- [`UpsertWorkingHoursBody`](#upsertworkinghoursbody)\n- [`TimeWindow`](#timewindow)\n- [`Calendar`](#calendar)\n- [`CalendarSource`](#calendarsource)\n- [`Provider`](#provider)\n- [`CalendarCreateBody`](#calendarcreatebody)\n- [`AddOutlookCalendarRequest`](#addoutlookcalendarrequest)\n- [`AvailableOutlookCalendar`](#availableoutlookcalendar)\n- [`CalendarPatchBody`](#calendarpatchbody)\n- [`CalendarEvent`](#calendarevent)\n- [`EventType`](#eventtype)\n- [`EventStatus`](#eventstatus)\n- [`Sensitivity`](#sensitivity)\n- [`Importance`](#importance)\n- [`ResponseStatus`](#responsestatus)\n- [`Attendee`](#attendee)\n- [`EventSource`](#eventsource)\n- [`CalendarEventCreateBody`](#calendareventcreatebody)\n- [`CalendarEventPatchBody`](#calendareventpatchbody)\n- [`ShareEventBody`](#shareeventbody)\n\n### `listUsersAbsence`\n\nList organization users with known absence metadata in the requested time window.\n\n`GET /v1/calendar/absence/users`\n\n```ts\nconst { data } = await client.listUsersAbsence({\n from: \'example\',\n to: \'example\',\n include_busy: true,\n working_hours_granularity: \'example\',\n query: \'example\',\n limit: 1,\n offset: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "hits": 0,\n "results": [\n {\n "absent": true,\n "absence_intervals": [\n {\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "original_from": "1970-01-01T00:00:00.000Z",\n "original_to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "source": "calendar_event",\n "calendar_event_id": "string",\n "absence_adjustment_id": "string",\n "reason": "string"\n }\n ],\n "user_id": "string",\n "display_name": "string",\n "email": "user@example.com",\n "status": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchAbsence`\n\nSearch known absence for candidate users in the requested time window.\n\n`POST /v1/calendar/absence:search`\n\n```ts\nconst { data } = await client.searchAbsence(\n null,\n {\n from: \'1970-01-01T00:00:00.000Z\',\n to: \'1970-01-01T00:00:00.000Z\',\n user_ids: [\'string\'],\n include_busy: false,\n working_hours_granularity: \'time\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "users": {}\n}\n```\n\n</details>\n\n---\n\n### `searchNowAbsence`\n\nSearch known absence for candidate users at the current server time.\n\n`POST /v1/calendar/absence:search-now`\n\n```ts\nconst { data } = await client.searchNowAbsence(\n null,\n {\n user_ids: [\'string\'],\n include_busy: false,\n working_hours_granularity: \'time\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "users": {}\n}\n```\n\n</details>\n\n---\n\n### `listAbsenceAdjustments`\n\nList absence adjustments for a user in a time window.\n\n`GET /v1/calendar/absence/users/{user_id}/adjustments`\n\n```ts\nconst { data } = await client.listAbsenceAdjustments({\n user_id: \'example\',\n from: \'example\',\n to: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "results": [\n {\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createAbsenceAdjustment`\n\nCreate a time-bound absence adjustment for a user in the caller organization.\n\n`POST /v1/calendar/absence/users/{user_id}/adjustments`\n\n```ts\nconst { data } = await client.createAbsenceAdjustment(\n {\n user_id: \'example\',\n },\n {\n from: \'1970-01-01T00:00:00.000Z\',\n to: \'1970-01-01T00:00:00.000Z\',\n absent: true,\n status: \'oof\',\n type: \'string\',\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getAbsenceAdjustment`\n\nGet an absence adjustment by ID.\n\n`GET /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`\n\n```ts\nconst { data } = await client.getAbsenceAdjustment({\n user_id: \'example\',\n adjustment_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `patchAbsenceAdjustment`\n\nUpdate an absence adjustment in the caller organization.\n\n`PATCH /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`\n\n```ts\nconst { data } = await client.patchAbsenceAdjustment(\n {\n user_id: \'example\',\n adjustment_id: \'example\',\n },\n {\n from: \'1970-01-01T00:00:00.000Z\',\n to: \'1970-01-01T00:00:00.000Z\',\n absent: true,\n status: \'oof\',\n type: \'string\',\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteAbsenceAdjustment`\n\nDelete an absence adjustment.\n\n`DELETE /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`\n\n```ts\nconst { data } = await client.deleteAbsenceAdjustment({\n user_id: \'example\',\n adjustment_id: \'example\',\n})\n```\n\n---\n\n### `getUserAbsence`\n\nGet known absence for a user in a time window. absent=false means no known absence, not guaranteed availability.\n\n`GET /v1/calendar/absence/users/{user_id}`\n\n```ts\nconst { data } = await client.getUserAbsence({\n user_id: \'example\',\n from: \'example\',\n to: \'example\',\n include_busy: true,\n working_hours_granularity: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "absent": true,\n "absence_intervals": [\n {\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "original_from": "1970-01-01T00:00:00.000Z",\n "original_to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "source": "calendar_event",\n "calendar_event_id": "string",\n "absence_adjustment_id": "string",\n "reason": "string"\n }\n ],\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "user_id": "string",\n "external_calendars": [\n {\n "provider": "outlook",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getWorkingHours`\n\nGet the recurring weekly working hours of a user. 404 means no record exists and the user is treated as always available.\n\n`GET /v1/calendar/working-hours/users/{user_id}`\n\n```ts\nconst { data } = await client.getWorkingHours({\n user_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "monday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "tuesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "wednesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "thursday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "friday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "saturday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "sunday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "timezone": "string",\n "user_id": "string",\n "updated_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `putWorkingHours`\n\nCreate or fully replace the working hours of a user in the caller organization. This is a full replace, not a merge.\n\n`PUT /v1/calendar/working-hours/users/{user_id}`\n\n```ts\nconst { data } = await client.putWorkingHours(\n {\n user_id: \'example\',\n },\n {\n monday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n tuesday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n wednesday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n thursday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n friday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n saturday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n sunday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n timezone: \'Europe/Berlin\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "monday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "tuesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "wednesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "thursday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "friday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "saturday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "sunday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "timezone": "string",\n "user_id": "string",\n "updated_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteWorkingHours`\n\nDelete the working hours of a user. The user is then treated as always available again.\n\n`DELETE /v1/calendar/working-hours/users/{user_id}`\n\n```ts\nconst { data } = await client.deleteWorkingHours({\n user_id: \'example\',\n})\n```\n\n---\n\n### `listCalendars`\n\nList calendars visible to the caller.\n\n`GET /v1/calendar`\n\n```ts\nconst { data } = await client.listCalendars({\n size: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `createCalendar`\n\nCreate a native epilot calendar.\n\n`POST /v1/calendar`\n\n```ts\nconst { data } = await client.createCalendar(\n null,\n {\n name: \'string\',\n description: \'string\',\n color: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `addOutlookCalendar`\n\nRegisters one of the caller\'s Outlook calendars as an epilot calendar.\n\n`POST /v1/calendar/sources/outlook`\n\n```ts\nconst { data } = await client.addOutlookCalendar(\n null,\n {\n provider_calendar_id: \'string\',\n name: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `listOutlookCalendars`\n\nLists the calling user\'s Outlook calendars available to import as epilot calendars.\n\n`GET /v1/calendar/sources/outlook/available`\n\n```ts\nconst { data } = await client.listOutlookCalendars()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "calendars": [\n {\n "provider_calendar_id": "string",\n "name": "string",\n "color": "string",\n "is_default": true,\n "can_edit": true,\n "owner": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deleteOutlookCalendar`\n\nDisconnects a previously registered Outlook calendar.\n\n`DELETE /v1/calendar/sources/outlook/{calendar_id}`\n\n```ts\nconst { data } = await client.deleteOutlookCalendar({\n calendar_id: \'example\',\n})\n```\n\n---\n\n### `outlookWebhook`\n\nPublic Microsoft Graph webhook receiver for per-user Outlook calendar\nsubscriptions. Unauthenticated by design (API Gateway `Authorizer: NONE`):\nGraph calls it with no epilot token.\n\n`POST /v1/calendar/outlook/webhook`\n\n```ts\nconst { data } = await client.outlookWebhook({\n validationToken: \'example\',\n})\n```\n\n---\n\n### `getCalendar`\n\nGet a single calendar by its epilot ID.\n\n`GET /v1/calendar/{calendar_id}`\n\n```ts\nconst { data } = await client.getCalendar({\n calendar_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateCalendar`\n\nUpdate local calendar details. Changes to synced calendars do not modify the provider calendar.\n\n`PATCH /v1/calendar/{calendar_id}`\n\n```ts\nconst { data } = await client.updateCalendar(\n {\n calendar_id: \'example\',\n },\n {\n name: \'string\',\n description: \'string\',\n color: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteCalendar`\n\nDelete a native epilot calendar or disconnect a synced calendar, including its locally stored events.\n\n`DELETE /v1/calendar/{calendar_id}`\n\n```ts\nconst { data } = await client.deleteCalendar({\n calendar_id: \'example\',\n})\n```\n\n---\n\n### `listEvents`\n\nList events in a time window. Recurring events are returned as expanded occurrences \u2013 each instance appears as its own event.\n\n`GET /v1/calendar/events`\n\n```ts\nconst { data } = await client.listEvents({\n from: \'example\',\n to: \'example\',\n calendar_id: \'example\',\n size: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `createEvent`\n\nCreate a native epilot calendar event. Omit `calendar_id` to use the caller\u2019s epilot default calendar.\n\n`POST /v1/calendar/events`\n\n```ts\nconst { data } = await client.createEvent(\n null,\n {\n calendar_id: \'string\',\n description: \'string\',\n start_time: \'1970-01-01T00:00:00.000Z\',\n end_time: \'1970-01-01T00:00:00.000Z\',\n timezone: \'string\',\n is_all_day: true,\n location: \'string\',\n status: \'free\',\n sensitivity: \'normal\',\n metadata: {},\n _title: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getEvent`\n\nGet a single event by its epilot ID.\n\n`GET /v1/calendar/events/{event_id}`\n\n```ts\nconst { data } = await client.getEvent({\n event_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateEvent`\n\nUpdate a native epilot calendar event.\n\n`PATCH /v1/calendar/events/{event_id}`\n\n```ts\nconst { data } = await client.updateEvent(\n {\n event_id: \'example\',\n },\n {\n description: \'string\',\n start_time: \'1970-01-01T00:00:00.000Z\',\n end_time: \'1970-01-01T00:00:00.000Z\',\n timezone: \'string\',\n is_all_day: true,\n location: \'string\',\n status: \'free\',\n is_cancelled: true,\n sensitivity: \'normal\',\n _title: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteEvent`\n\nDelete a native epilot calendar event.\n\n`DELETE /v1/calendar/events/{event_id}`\n\n```ts\nconst { data } = await client.deleteEvent({\n event_id: \'example\',\n})\n```\n\n---\n\n### `shareEvent`\n\nShare a calendar event with another user of the same organization, view-only. Owner-only: recipients of a share cannot re-share. Sharing an already-shared event is a no-op.\n\n`POST /v1/calendar/events/{event_id}/share`\n\n```ts\nconst { data } = await client.shareEvent(\n {\n event_id: \'example\',\n },\n {\n user_id: \'string\'\n },\n)\n```\n\n---\n\n### `unshareEvent`\n\nRevoke a per-event share. The recipient loses access immediately. Owner-only.\n\n`DELETE /v1/calendar/events/{event_id}/share/{user_id}`\n\n```ts\nconst { data } = await client.unshareEvent({\n event_id: \'example\',\n user_id: \'example\',\n})\n```\n\n---\n\n## Schemas\n\n### `AbsenceInterval`\n\n```ts\ntype AbsenceInterval = {\n from: string // date-time\n to: string // date-time\n original_from: string // date-time\n original_to: string // date-time\n absent: boolean\n source: "calendar_event" | "absence_adjustment" | "working_hours"\n calendar_event_id?: string\n absence_adjustment_id?: string\n reason?: string\n}\n```\n\n### `AbsenceIntervalSource`\n\n```ts\ntype AbsenceIntervalSource = "calendar_event" | "absence_adjustment" | "working_hours"\n```\n\n### `Error`\n\n```ts\ntype Error = {\n status: number\n error: string | unknown[]\n}\n```\n\n### `SearchAbsenceBody`\n\n```ts\ntype SearchAbsenceBody = {\n from: string // date-time\n to: string // date-time\n user_ids: string[]\n include_busy?: boolean\n working_hours_granularity?: "time" | "day"\n}\n```\n\n### `SearchNowAbsenceBody`\n\n```ts\ntype SearchNowAbsenceBody = {\n user_ids: string[]\n include_busy?: boolean\n working_hours_granularity?: "time" | "day"\n}\n```\n\n### `AbsenceAdjustment`\n\n```ts\ntype AbsenceAdjustment = {\n from: string // date-time\n to: string // date-time\n absent: boolean\n status: "oof" | "busy"\n type?: string\n reason?: string\n adjustment_id: string\n user_id: string\n created_by: string\n created_at: string // date-time\n updated_at: string // date-time\n}\n```\n\n### `AbsenceStatus`\n\nCalendar status targeted by the absence adjustment.\n\n```ts\ntype AbsenceStatus = "oof" | "busy"\n```\n\n### `AbsenceType`\n\nOptional producer-defined reference stored with an absence adjustment.\n\n```ts\ntype AbsenceType = string\n```\n\n### `CreateAbsenceAdjustmentBody`\n\n```ts\ntype CreateAbsenceAdjustmentBody = {\n from: string // date-time\n to: string // date-time\n absent: boolean\n status: "oof" | "busy"\n type?: string\n reason?: string\n}\n```\n\n### `PatchAbsenceAdjustmentBody`\n\n```ts\ntype PatchAbsenceAdjustmentBody = {\n from?: string // date-time\n to?: string // date-time\n absent?: boolean\n status?: "oof" | "busy"\n type?: string\n reason?: string\n}\n```\n\n### `ExternalCalendar`\n\n```ts\ntype ExternalCalendar = {\n provider: "outlook" | "google"\n last_synced_at: string // date-time\n}\n```\n\n### `WorkingHours`\n\nRecurring weekly working hours of a user. The absence of a record means the user is treated as always available.\n\n```ts\ntype WorkingHours = {\n monday: Array<{\n start: string\n end: string\n }>\n tuesday: Array<{\n start: string\n end: string\n }>\n wednesday: Array<{\n start: string\n end: string\n }>\n thursday: Array<{\n start: string\n end: string\n }>\n friday: Array<{\n start: string\n end: string\n }>\n saturday: Array<{\n start: string\n end: string\n }>\n sunday: Array<{\n start: string\n end: string\n }>\n timezone: string\n user_id: string\n updated_by: string\n created_at: string // date-time\n updated_at: string // date-time\n}\n```\n\n### `UpsertWorkingHoursBody`\n\nFull replacement of the working-hours record. All weekdays are required; an empty array means a day off. Users without a working-hours record are treated as always available.\n\n```ts\ntype UpsertWorkingHoursBody = {\n monday: Array<{\n start: string\n end: string\n }>\n tuesday: Array<{\n start: string\n end: string\n }>\n wednesday: Array<{\n start: string\n end: string\n }>\n thursday: Array<{\n start: string\n end: string\n }>\n friday: Array<{\n start: string\n end: string\n }>\n saturday: Array<{\n start: string\n end: string\n }>\n sunday: Array<{\n start: string\n end: string\n }>\n timezone?: string\n}\n```\n\n### `TimeWindow`\n\nA wall-clock working window within a single day.\n\n```ts\ntype TimeWindow = {\n start: string\n end: string\n}\n```\n\n### `Calendar`\n\n```ts\ntype Calendar = {\n _id: string\n _schema: "calendar"\n _org: string\n _title?: string\n name: string\n description?: string\n color?: string\n is_default: boolean\n is_epilot_default: boolean\n read_only: boolean\n owner_email?: string // email\n source: {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_calendar_id?: string\n last_synced_at?: string // date-time\n }\n _created_at?: string // date-time\n _updated_at?: string // date-time\n}\n```\n\n### `CalendarSource`\n\n```ts\ntype CalendarSource = {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_calendar_id?: string\n last_synced_at?: string // date-time\n}\n```\n\n### `Provider`\n\nNull for native epilot calendars\n\n```ts\ntype Provider = "outlook" | "google" | null\n```\n\n### `CalendarCreateBody`\n\n```ts\ntype CalendarCreateBody = {\n name: string\n description?: string\n color?: string\n}\n```\n\n### `AddOutlookCalendarRequest`\n\n```ts\ntype AddOutlookCalendarRequest = {\n provider_calendar_id: string\n name?: string\n}\n```\n\n### `AvailableOutlookCalendar`\n\n```ts\ntype AvailableOutlookCalendar = {\n provider_calendar_id: string\n name: string\n color?: string\n is_default?: boolean\n can_edit?: boolean\n owner?: string\n}\n```\n\n### `CalendarPatchBody`\n\n```ts\ntype CalendarPatchBody = {\n name?: string\n description?: string\n color?: string\n}\n```\n\n### `CalendarEvent`\n\n```ts\ntype CalendarEvent = {\n _id: string\n _schema: "calendar_event"\n _org: string\n _title?: string\n _tags?: string[]\n calendar_id: string\n event_type: "singleInstance" | "occurrence" | "exception" | "seriesMaster"\n description?: string\n start_time: string // date-time\n end_time: string // date-time\n timezone: string\n is_all_day: boolean\n location?: string\n status: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n busy: boolean\n is_cancelled: boolean\n is_draft: boolean\n sensitivity: "normal" | "personal" | "private" | "confidential"\n importance: "low" | "normal" | "high"\n is_online_meeting: boolean\n online_meeting_url?: string // uri\n web_link?: string // uri\n response_status: "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n organizer_email?: string // email\n attendees?: Array<{\n email: string // email\n name?: string\n response: "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n type: "required" | "optional" | "resource"\n }>\n metadata?: Record<string, unknown>\n is_recurring: boolean\n series_master_id?: string\n source: {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_event_id?: string\n provider_event_url?: string // uri\n last_synced_at?: string // date-time\n etag?: string\n }\n _created_at?: string // date-time\n _updated_at?: string // date-time\n}\n```\n\n### `EventType`\n\n```ts\ntype EventType = "singleInstance" | "occurrence" | "exception" | "seriesMaster"\n```\n\n### `EventStatus`\n\nFree/busy state derived from provider `showAs`\n\n```ts\ntype EventStatus = "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n```\n\n### `Sensitivity`\n\n```ts\ntype Sensitivity = "normal" | "personal" | "private" | "confidential"\n```\n\n### `Importance`\n\n```ts\ntype Importance = "low" | "normal" | "high"\n```\n\n### `ResponseStatus`\n\nCaller\'s response to the invite\n\n```ts\ntype ResponseStatus = "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n```\n\n### `Attendee`\n\n```ts\ntype Attendee = {\n email: string // email\n name?: string\n response: "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n type: "required" | "optional" | "resource"\n}\n```\n\n### `EventSource`\n\n```ts\ntype EventSource = {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_event_id?: string\n provider_event_url?: string // uri\n last_synced_at?: string // date-time\n etag?: string\n}\n```\n\n### `CalendarEventCreateBody`\n\n```ts\ntype CalendarEventCreateBody = {\n calendar_id?: string\n description?: string\n start_time: string // date-time\n end_time: string // date-time\n timezone: string\n is_all_day: boolean\n location?: string\n status: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n sensitivity: "normal" | "personal" | "private" | "confidential"\n metadata?: Record<string, unknown>\n _title: string\n}\n```\n\n### `CalendarEventPatchBody`\n\n```ts\ntype CalendarEventPatchBody = {\n description?: string\n start_time?: string // date-time\n end_time?: string // date-time\n timezone?: string\n is_all_day?: boolean\n location?: string\n status?: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n is_cancelled?: boolean\n sensitivity?: "normal" | "personal" | "private" | "confidential"\n _title?: string\n}\n```\n\n### `ShareEventBody`\n\n```ts\ntype ShareEventBody = {\n user_id: string\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
calendar_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/calendar.json
|
|
4
|
+
var calendar_default = '# Calendar API\n\n- **Base URL:** `https://calendar.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/calendar](https://docs.epilot.io/api/calendar)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.calendar.listUsersAbsence(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/calendar\'\n\nconst calendarClient = getClient()\nauthorize(calendarClient, () => \'<token>\')\nconst { data } = await calendarClient.listUsersAbsence(...)\n```\n\n## Operations\n\n**Absence**\n- [`listUsersAbsence`](#listusersabsence)\n- [`searchAbsence`](#searchabsence)\n- [`searchNowAbsence`](#searchnowabsence)\n- [`listAbsenceAdjustments`](#listabsenceadjustments)\n- [`createAbsenceAdjustment`](#createabsenceadjustment)\n- [`getAbsenceAdjustment`](#getabsenceadjustment)\n- [`patchAbsenceAdjustment`](#patchabsenceadjustment)\n- [`deleteAbsenceAdjustment`](#deleteabsenceadjustment)\n- [`getUserAbsence`](#getuserabsence)\n\n**Working Hours**\n- [`getWorkingHours`](#getworkinghours)\n- [`putWorkingHours`](#putworkinghours)\n- [`deleteWorkingHours`](#deleteworkinghours)\n\n**Calendars**\n- [`listCalendars`](#listcalendars)\n- [`createCalendar`](#createcalendar)\n- [`addOutlookCalendar`](#addoutlookcalendar)\n- [`listOutlookCalendars`](#listoutlookcalendars)\n- [`deleteOutlookCalendar`](#deleteoutlookcalendar)\n- [`outlookWebhook`](#outlookwebhook)\n- [`getCalendar`](#getcalendar)\n- [`updateCalendar`](#updatecalendar)\n- [`deleteCalendar`](#deletecalendar)\n\n**Calendar Events**\n- [`listEvents`](#listevents)\n- [`createEvent`](#createevent)\n- [`getEvent`](#getevent)\n- [`updateEvent`](#updateevent)\n- [`deleteEvent`](#deleteevent)\n- [`shareEvent`](#shareevent)\n- [`unshareEvent`](#unshareevent)\n\n**Schemas**\n- [`AbsenceInterval`](#absenceinterval)\n- [`AbsenceIntervalSource`](#absenceintervalsource)\n- [`Error`](#error)\n- [`SearchAbsenceBody`](#searchabsencebody)\n- [`SearchNowAbsenceBody`](#searchnowabsencebody)\n- [`AbsenceAdjustment`](#absenceadjustment)\n- [`AbsenceStatus`](#absencestatus)\n- [`AbsenceType`](#absencetype)\n- [`CreateAbsenceAdjustmentBody`](#createabsenceadjustmentbody)\n- [`PatchAbsenceAdjustmentBody`](#patchabsenceadjustmentbody)\n- [`ExternalCalendar`](#externalcalendar)\n- [`WorkingHours`](#workinghours)\n- [`UpsertWorkingHoursBody`](#upsertworkinghoursbody)\n- [`TimeWindow`](#timewindow)\n- [`Calendar`](#calendar)\n- [`CalendarSource`](#calendarsource)\n- [`Provider`](#provider)\n- [`CalendarCreateBody`](#calendarcreatebody)\n- [`AddOutlookCalendarRequest`](#addoutlookcalendarrequest)\n- [`AvailableOutlookCalendar`](#availableoutlookcalendar)\n- [`CalendarPatchBody`](#calendarpatchbody)\n- [`CalendarEvent`](#calendarevent)\n- [`EventType`](#eventtype)\n- [`EventStatus`](#eventstatus)\n- [`Sensitivity`](#sensitivity)\n- [`Importance`](#importance)\n- [`ResponseStatus`](#responsestatus)\n- [`Attendee`](#attendee)\n- [`EventSource`](#eventsource)\n- [`CalendarEventCreateBody`](#calendareventcreatebody)\n- [`CalendarEventPatchBody`](#calendareventpatchbody)\n- [`ShareEventBody`](#shareeventbody)\n\n### `listUsersAbsence`\n\nList organization users with known absence metadata in the requested time window.\n\n`GET /v1/calendar/absence/users`\n\n```ts\nconst { data } = await client.listUsersAbsence({\n from: \'example\',\n to: \'example\',\n include_busy: true,\n working_hours_granularity: \'example\',\n query: \'example\',\n limit: 1,\n offset: 1,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "hits": 0,\n "results": [\n {\n "absent": true,\n "absence_intervals": [\n {\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "original_from": "1970-01-01T00:00:00.000Z",\n "original_to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "source": "calendar_event",\n "calendar_event_id": "string",\n "absence_adjustment_id": "string",\n "reason": "string"\n }\n ],\n "user_id": "string",\n "display_name": "string",\n "email": "user@example.com",\n "status": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchAbsence`\n\nSearch known absence for candidate users in the requested time window.\n\n`POST /v1/calendar/absence:search`\n\n```ts\nconst { data } = await client.searchAbsence(\n null,\n {\n from: \'1970-01-01T00:00:00.000Z\',\n to: \'1970-01-01T00:00:00.000Z\',\n user_ids: [\'string\'],\n include_busy: false,\n working_hours_granularity: \'time\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "users": {}\n}\n```\n\n</details>\n\n---\n\n### `searchNowAbsence`\n\nSearch known absence for candidate users at the current server time.\n\n`POST /v1/calendar/absence:search-now`\n\n```ts\nconst { data } = await client.searchNowAbsence(\n null,\n {\n user_ids: [\'string\'],\n include_busy: false,\n working_hours_granularity: \'time\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "users": {}\n}\n```\n\n</details>\n\n---\n\n### `listAbsenceAdjustments`\n\nList absence adjustments for a user in a time window.\n\n`GET /v1/calendar/absence/users/{user_id}/adjustments`\n\n```ts\nconst { data } = await client.listAbsenceAdjustments({\n user_id: \'example\',\n from: \'example\',\n to: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "results": [\n {\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createAbsenceAdjustment`\n\nCreate a time-bound absence adjustment for a user in the caller organization.\n\n`POST /v1/calendar/absence/users/{user_id}/adjustments`\n\n```ts\nconst { data } = await client.createAbsenceAdjustment(\n {\n user_id: \'example\',\n },\n {\n from: \'1970-01-01T00:00:00.000Z\',\n to: \'1970-01-01T00:00:00.000Z\',\n absent: true,\n status: \'oof\',\n type: \'string\',\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getAbsenceAdjustment`\n\nGet an absence adjustment by ID.\n\n`GET /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`\n\n```ts\nconst { data } = await client.getAbsenceAdjustment({\n user_id: \'example\',\n adjustment_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `patchAbsenceAdjustment`\n\nUpdate an absence adjustment in the caller organization.\n\n`PATCH /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`\n\n```ts\nconst { data } = await client.patchAbsenceAdjustment(\n {\n user_id: \'example\',\n adjustment_id: \'example\',\n },\n {\n from: \'1970-01-01T00:00:00.000Z\',\n to: \'1970-01-01T00:00:00.000Z\',\n absent: true,\n status: \'oof\',\n type: \'string\',\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "status": "oof",\n "type": "string",\n "reason": "string",\n "adjustment_id": "string",\n "user_id": "string",\n "created_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteAbsenceAdjustment`\n\nDelete an absence adjustment.\n\n`DELETE /v1/calendar/absence/users/{user_id}/adjustments/{adjustment_id}`\n\n```ts\nconst { data } = await client.deleteAbsenceAdjustment({\n user_id: \'example\',\n adjustment_id: \'example\',\n})\n```\n\n---\n\n### `getUserAbsence`\n\nGet known absence for a user in a time window. absent=false means no known absence, not guaranteed availability.\n\n`GET /v1/calendar/absence/users/{user_id}`\n\n```ts\nconst { data } = await client.getUserAbsence({\n user_id: \'example\',\n from: \'example\',\n to: \'example\',\n include_busy: true,\n working_hours_granularity: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "absent": true,\n "absence_intervals": [\n {\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "original_from": "1970-01-01T00:00:00.000Z",\n "original_to": "1970-01-01T00:00:00.000Z",\n "absent": true,\n "source": "calendar_event",\n "calendar_event_id": "string",\n "absence_adjustment_id": "string",\n "reason": "string"\n }\n ],\n "from": "1970-01-01T00:00:00.000Z",\n "to": "1970-01-01T00:00:00.000Z",\n "user_id": "string",\n "external_calendars": [\n {\n "provider": "outlook",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getWorkingHours`\n\nGet the recurring weekly working hours of a user. 404 means no record exists and the user is treated as always available.\n\n`GET /v1/calendar/working-hours/users/{user_id}`\n\n```ts\nconst { data } = await client.getWorkingHours({\n user_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "monday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "tuesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "wednesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "thursday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "friday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "saturday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "sunday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "timezone": "string",\n "user_id": "string",\n "updated_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `putWorkingHours`\n\nCreate or fully replace the working hours of a user in the caller organization. This is a full replace, not a merge.\n\n`PUT /v1/calendar/working-hours/users/{user_id}`\n\n```ts\nconst { data } = await client.putWorkingHours(\n {\n user_id: \'example\',\n },\n {\n monday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n tuesday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n wednesday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n thursday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n friday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n saturday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n sunday: [\n {\n start: \'string\',\n end: \'string\'\n }\n ],\n timezone: \'Europe/Berlin\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "monday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "tuesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "wednesday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "thursday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "friday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "saturday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "sunday": [\n {\n "start": "string",\n "end": "string"\n }\n ],\n "timezone": "string",\n "user_id": "string",\n "updated_by": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteWorkingHours`\n\nDelete the working hours of a user. The user is then treated as always available again.\n\n`DELETE /v1/calendar/working-hours/users/{user_id}`\n\n```ts\nconst { data } = await client.deleteWorkingHours({\n user_id: \'example\',\n})\n```\n\n---\n\n### `listCalendars`\n\nList calendars visible to the caller.\n\n`GET /v1/calendar`\n\n```ts\nconst { data } = await client.listCalendars({\n size: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `createCalendar`\n\nCreate a native epilot calendar.\n\n`POST /v1/calendar`\n\n```ts\nconst { data } = await client.createCalendar(\n null,\n {\n name: \'string\',\n description: \'string\',\n color: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `addOutlookCalendar`\n\nRegisters one of the caller\'s Outlook calendars as an epilot calendar.\n\n`POST /v1/calendar/sources/outlook`\n\n```ts\nconst { data } = await client.addOutlookCalendar(\n null,\n {\n provider_calendar_id: \'string\',\n name: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `listOutlookCalendars`\n\nLists the calling user\'s Outlook calendars available to import as epilot calendars.\n\n`GET /v1/calendar/sources/outlook/available`\n\n```ts\nconst { data } = await client.listOutlookCalendars()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "calendars": [\n {\n "provider_calendar_id": "string",\n "name": "string",\n "color": "string",\n "is_default": true,\n "can_edit": true,\n "owner": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deleteOutlookCalendar`\n\nDisconnects a previously registered Outlook calendar.\n\n`DELETE /v1/calendar/sources/outlook/{calendar_id}`\n\n```ts\nconst { data } = await client.deleteOutlookCalendar({\n calendar_id: \'example\',\n})\n```\n\n---\n\n### `outlookWebhook`\n\nPublic Microsoft Graph webhook receiver for per-user Outlook calendar\nsubscriptions. Unauthenticated by design (API Gateway `Authorizer: NONE`):\nGraph calls it with no epilot token.\n\n`POST /v1/calendar/outlook/webhook`\n\n```ts\nconst { data } = await client.outlookWebhook({\n validationToken: \'example\',\n})\n```\n\n---\n\n### `getCalendar`\n\nGet a single calendar by its epilot ID.\n\n`GET /v1/calendar/{calendar_id}`\n\n```ts\nconst { data } = await client.getCalendar({\n calendar_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateCalendar`\n\nUpdate local calendar details. Changes to synced calendars do not modify the provider calendar.\n\n`PATCH /v1/calendar/{calendar_id}`\n\n```ts\nconst { data } = await client.updateCalendar(\n {\n calendar_id: \'example\',\n },\n {\n name: \'string\',\n description: \'string\',\n color: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar",\n "_org": "string",\n "_title": "string",\n "name": "string",\n "description": "string",\n "color": "string",\n "is_default": true,\n "is_epilot_default": true,\n "read_only": true,\n "owner_email": "user@example.com",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_calendar_id": "string",\n "last_synced_at": "1970-01-01T00:00:00.000Z"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteCalendar`\n\nDelete a native epilot calendar or disconnect a synced calendar, including its locally stored events.\n\n`DELETE /v1/calendar/{calendar_id}`\n\n```ts\nconst { data } = await client.deleteCalendar({\n calendar_id: \'example\',\n})\n```\n\n---\n\n### `listEvents`\n\nList events in a time window. Recurring events are returned as expanded occurrences \u2013 each instance appears as its own event.\n\n`GET /v1/calendar/events`\n\n```ts\nconst { data } = await client.listEvents({\n from: \'example\',\n to: \'example\',\n calendar_id: \'example\',\n size: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `createEvent`\n\nCreate a native epilot calendar event. Omit `calendar_id` to use the caller\u2019s epilot default calendar.\n\n`POST /v1/calendar/events`\n\n```ts\nconst { data } = await client.createEvent(\n null,\n {\n calendar_id: \'string\',\n description: \'string\',\n start_time: \'1970-01-01T00:00:00.000Z\',\n end_time: \'1970-01-01T00:00:00.000Z\',\n timezone: \'string\',\n is_all_day: true,\n location: \'string\',\n status: \'free\',\n sensitivity: \'normal\',\n metadata: {},\n _title: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getEvent`\n\nGet a single event by its epilot ID.\n\n`GET /v1/calendar/events/{event_id}`\n\n```ts\nconst { data } = await client.getEvent({\n event_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateEvent`\n\nUpdate a native epilot calendar event.\n\n`PATCH /v1/calendar/events/{event_id}`\n\n```ts\nconst { data } = await client.updateEvent(\n {\n event_id: \'example\',\n },\n {\n description: \'string\',\n start_time: \'1970-01-01T00:00:00.000Z\',\n end_time: \'1970-01-01T00:00:00.000Z\',\n timezone: \'string\',\n is_all_day: true,\n location: \'string\',\n status: \'free\',\n is_cancelled: true,\n sensitivity: \'normal\',\n _title: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "string",\n "_schema": "calendar_event",\n "_org": "string",\n "_title": "string",\n "_tags": ["string"],\n "calendar_id": "string",\n "event_type": "singleInstance",\n "description": "string",\n "start_time": "1970-01-01T00:00:00.000Z",\n "end_time": "1970-01-01T00:00:00.000Z",\n "timezone": "string",\n "is_all_day": true,\n "location": "string",\n "status": "free",\n "busy": true,\n "is_cancelled": true,\n "is_draft": true,\n "sensitivity": "normal",\n "importance": "low",\n "is_online_meeting": true,\n "online_meeting_url": "https://example.com/path",\n "web_link": "https://example.com/path",\n "response_status": "none",\n "organizer_email": "user@example.com",\n "attendees": [\n {\n "email": "user@example.com",\n "name": "string",\n "response": "none",\n "type": "required"\n }\n ],\n "metadata": {},\n "is_recurring": true,\n "series_master_id": "string",\n "source": {\n "type": "native",\n "provider": "outlook",\n "provider_event_id": "string",\n "provider_event_url": "https://example.com/path",\n "last_synced_at": "1970-01-01T00:00:00.000Z",\n "etag": "string"\n },\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteEvent`\n\nDelete a native epilot calendar event.\n\n`DELETE /v1/calendar/events/{event_id}`\n\n```ts\nconst { data } = await client.deleteEvent({\n event_id: \'example\',\n})\n```\n\n---\n\n### `shareEvent`\n\nShare a calendar event with another user of the same organization, view-only. Owner-only: recipients of a share cannot re-share. Sharing an already-shared event is a no-op.\n\n`POST /v1/calendar/events/{event_id}/share`\n\n```ts\nconst { data } = await client.shareEvent(\n {\n event_id: \'example\',\n },\n {\n user_id: \'string\'\n },\n)\n```\n\n---\n\n### `unshareEvent`\n\nRevoke a per-event share. The recipient loses access immediately. Owner-only.\n\n`DELETE /v1/calendar/events/{event_id}/share/{user_id}`\n\n```ts\nconst { data } = await client.unshareEvent({\n event_id: \'example\',\n user_id: \'example\',\n})\n```\n\n---\n\n## Schemas\n\n### `AbsenceInterval`\n\n```ts\ntype AbsenceInterval = {\n from: string // date-time\n to: string // date-time\n original_from: string // date-time\n original_to: string // date-time\n absent: boolean\n source: "calendar_event" | "absence_adjustment" | "working_hours"\n calendar_event_id?: string\n absence_adjustment_id?: string\n reason?: string\n}\n```\n\n### `AbsenceIntervalSource`\n\n```ts\ntype AbsenceIntervalSource = "calendar_event" | "absence_adjustment" | "working_hours"\n```\n\n### `Error`\n\n```ts\ntype Error = {\n status: number\n error: string | unknown[]\n}\n```\n\n### `SearchAbsenceBody`\n\n```ts\ntype SearchAbsenceBody = {\n from: string // date-time\n to: string // date-time\n user_ids: string[]\n include_busy?: boolean\n working_hours_granularity?: "time" | "day"\n}\n```\n\n### `SearchNowAbsenceBody`\n\n```ts\ntype SearchNowAbsenceBody = {\n user_ids: string[]\n include_busy?: boolean\n working_hours_granularity?: "time" | "day"\n}\n```\n\n### `AbsenceAdjustment`\n\n```ts\ntype AbsenceAdjustment = {\n from: string // date-time\n to: string // date-time\n absent: boolean\n status: "oof" | "busy"\n type?: string\n reason?: string\n adjustment_id: string\n user_id: string\n created_by: string\n created_at: string // date-time\n updated_at: string // date-time\n}\n```\n\n### `AbsenceStatus`\n\nCalendar status targeted by the absence adjustment.\n\n```ts\ntype AbsenceStatus = "oof" | "busy"\n```\n\n### `AbsenceType`\n\nOptional producer-defined reference stored with an absence adjustment.\n\n```ts\ntype AbsenceType = string\n```\n\n### `CreateAbsenceAdjustmentBody`\n\n```ts\ntype CreateAbsenceAdjustmentBody = {\n from: string // date-time\n to: string // date-time\n absent: boolean\n status: "oof" | "busy"\n type?: string\n reason?: string\n}\n```\n\n### `PatchAbsenceAdjustmentBody`\n\n```ts\ntype PatchAbsenceAdjustmentBody = {\n from?: string // date-time\n to?: string // date-time\n absent?: boolean\n status?: "oof" | "busy"\n type?: string\n reason?: string\n}\n```\n\n### `ExternalCalendar`\n\n```ts\ntype ExternalCalendar = {\n provider: "outlook" | "google"\n last_synced_at: string // date-time\n}\n```\n\n### `WorkingHours`\n\nRecurring weekly working hours of a user. The absence of a record means the user is treated as always available.\n\n```ts\ntype WorkingHours = {\n monday: Array<{\n start: string\n end: string\n }>\n tuesday: Array<{\n start: string\n end: string\n }>\n wednesday: Array<{\n start: string\n end: string\n }>\n thursday: Array<{\n start: string\n end: string\n }>\n friday: Array<{\n start: string\n end: string\n }>\n saturday: Array<{\n start: string\n end: string\n }>\n sunday: Array<{\n start: string\n end: string\n }>\n timezone: string\n user_id: string\n updated_by: string\n created_at: string // date-time\n updated_at: string // date-time\n}\n```\n\n### `UpsertWorkingHoursBody`\n\nFull replacement of the working-hours record. All weekdays are required; an empty array means a day off. Users without a working-hours record are treated as always available.\n\n```ts\ntype UpsertWorkingHoursBody = {\n monday: Array<{\n start: string\n end: string\n }>\n tuesday: Array<{\n start: string\n end: string\n }>\n wednesday: Array<{\n start: string\n end: string\n }>\n thursday: Array<{\n start: string\n end: string\n }>\n friday: Array<{\n start: string\n end: string\n }>\n saturday: Array<{\n start: string\n end: string\n }>\n sunday: Array<{\n start: string\n end: string\n }>\n timezone?: string\n}\n```\n\n### `TimeWindow`\n\nA wall-clock working window within a single day.\n\n```ts\ntype TimeWindow = {\n start: string\n end: string\n}\n```\n\n### `Calendar`\n\n```ts\ntype Calendar = {\n _id: string\n _schema: "calendar"\n _org: string\n _title?: string\n name: string\n description?: string\n color?: string\n is_default: boolean\n is_epilot_default: boolean\n read_only: boolean\n owner_email?: string // email\n source: {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_calendar_id?: string\n last_synced_at?: string // date-time\n }\n _created_at?: string // date-time\n _updated_at?: string // date-time\n}\n```\n\n### `CalendarSource`\n\n```ts\ntype CalendarSource = {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_calendar_id?: string\n last_synced_at?: string // date-time\n}\n```\n\n### `Provider`\n\nNull for native epilot calendars\n\n```ts\ntype Provider = "outlook" | "google" | null\n```\n\n### `CalendarCreateBody`\n\n```ts\ntype CalendarCreateBody = {\n name: string\n description?: string\n color?: string\n}\n```\n\n### `AddOutlookCalendarRequest`\n\n```ts\ntype AddOutlookCalendarRequest = {\n provider_calendar_id: string\n name?: string\n}\n```\n\n### `AvailableOutlookCalendar`\n\n```ts\ntype AvailableOutlookCalendar = {\n provider_calendar_id: string\n name: string\n color?: string\n is_default?: boolean\n can_edit?: boolean\n owner?: string\n}\n```\n\n### `CalendarPatchBody`\n\n```ts\ntype CalendarPatchBody = {\n name?: string\n description?: string\n color?: string\n}\n```\n\n### `CalendarEvent`\n\n```ts\ntype CalendarEvent = {\n _id: string\n _schema: "calendar_event"\n _org: string\n _title?: string\n _tags?: string[]\n calendar_id: string\n event_type: "singleInstance" | "occurrence" | "exception" | "seriesMaster"\n description?: string\n start_time: string // date-time\n end_time: string // date-time\n timezone: string\n is_all_day: boolean\n location?: string\n status: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n busy: boolean\n is_cancelled: boolean\n is_draft: boolean\n sensitivity: "normal" | "personal" | "private" | "confidential"\n importance: "low" | "normal" | "high"\n is_online_meeting: boolean\n online_meeting_url?: string // uri\n web_link?: string // uri\n response_status: "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n organizer_email?: string // email\n attendees?: Array<{\n email: string // email\n name?: string\n response: "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n type: "required" | "optional" | "resource"\n }>\n metadata?: Record<string, unknown>\n is_recurring: boolean\n series_master_id?: string\n source: {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_event_id?: string\n provider_event_url?: string // uri\n last_synced_at?: string // date-time\n etag?: string\n }\n _created_at?: string // date-time\n _updated_at?: string // date-time\n}\n```\n\n### `EventType`\n\n```ts\ntype EventType = "singleInstance" | "occurrence" | "exception" | "seriesMaster"\n```\n\n### `EventStatus`\n\nFree/busy state derived from provider `showAs`\n\n```ts\ntype EventStatus = "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n```\n\n### `Sensitivity`\n\n```ts\ntype Sensitivity = "normal" | "personal" | "private" | "confidential"\n```\n\n### `Importance`\n\n```ts\ntype Importance = "low" | "normal" | "high"\n```\n\n### `ResponseStatus`\n\nCaller\'s response to the invite\n\n```ts\ntype ResponseStatus = "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n```\n\n### `Attendee`\n\n```ts\ntype Attendee = {\n email: string // email\n name?: string\n response: "none" | "organizer" | "tentativelyAccepted" | "accepted" | "declined" | "notResponded"\n type: "required" | "optional" | "resource"\n}\n```\n\n### `EventSource`\n\n```ts\ntype EventSource = {\n type: "native" | "synced"\n provider?: "outlook" | "google" | null\n provider_event_id?: string\n provider_event_url?: string // uri\n last_synced_at?: string // date-time\n etag?: string\n}\n```\n\n### `CalendarEventCreateBody`\n\n```ts\ntype CalendarEventCreateBody = {\n calendar_id?: string\n description?: string\n start_time: string // date-time\n end_time: string // date-time\n timezone: string\n is_all_day: boolean\n location?: string\n status: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n sensitivity: "normal" | "personal" | "private" | "confidential"\n metadata?: Record<string, unknown>\n _title: string\n}\n```\n\n### `CalendarEventPatchBody`\n\n```ts\ntype CalendarEventPatchBody = {\n description?: string\n start_time?: string // date-time\n end_time?: string // date-time\n timezone?: string\n is_all_day?: boolean\n location?: string\n status?: "free" | "tentative" | "busy" | "oof" | "workingElsewhere" | "unknown"\n is_cancelled?: boolean\n sensitivity?: "normal" | "personal" | "private" | "confidential"\n _title?: string\n}\n```\n\n### `ShareEventBody`\n\n```ts\ntype ShareEventBody = {\n user_id: string\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = calendar_default;
|