@arbol-ai/sdk 5.66.0 → 5.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/account/billing/client.d.ts +13 -2
  2. package/dist/account/billing/client.js +8 -0
  3. package/dist/account/billing/index.d.ts +2 -2
  4. package/dist/account/billing/models.d.ts +107 -3
  5. package/dist/account/billing/models.js +2 -0
  6. package/dist/account/billingPortalSessions/client.d.ts +2 -2
  7. package/dist/account/billingPortalSessions/models.d.ts +1 -1
  8. package/dist/account/client.d.ts +4 -0
  9. package/dist/account/client.js +10 -0
  10. package/dist/account/index.d.ts +1 -1
  11. package/dist/account/invitations/client.d.ts +3 -1
  12. package/dist/account/invitations/client.js +1 -1
  13. package/dist/account/invoices/client.d.ts +36 -0
  14. package/dist/account/invoices/client.js +19 -0
  15. package/dist/account/invoices/index.d.ts +5 -0
  16. package/dist/account/invoices/index.js +4 -0
  17. package/dist/account/invoices/models.d.ts +75 -0
  18. package/dist/account/invoices/models.js +14 -0
  19. package/dist/account/members/client.d.ts +6 -2
  20. package/dist/account/members/client.js +2 -2
  21. package/dist/account/models.d.ts +38 -0
  22. package/dist/account/paymentMethodSetups/client.d.ts +25 -0
  23. package/dist/account/paymentMethodSetups/client.js +18 -0
  24. package/dist/account/paymentMethodSetups/index.d.ts +5 -0
  25. package/dist/account/paymentMethodSetups/index.js +4 -0
  26. package/dist/account/paymentMethodSetups/models.d.ts +33 -0
  27. package/dist/account/paymentMethodSetups/models.js +3 -0
  28. package/dist/account/permissions/models.d.ts +1 -1
  29. package/dist/account/usageSummary/client.d.ts +12 -5
  30. package/dist/account/usageSummary/client.js +1 -1
  31. package/dist/account/usageSummary/models.d.ts +16 -3
  32. package/dist/account/usageSummary/models.js +2 -1
  33. package/dist/account/walletTopUps/client.d.ts +3 -2
  34. package/dist/account/walletTopUps/models.d.ts +1 -1
  35. package/dist/account/walletTransactions/client.d.ts +4 -3
  36. package/dist/account/walletTransactions/models.d.ts +21 -6
  37. package/dist/famisanar/affiliations/client.d.ts +5 -4
  38. package/dist/famisanar/affiliations/index.d.ts +1 -1
  39. package/dist/famisanar/affiliations/models.d.ts +19 -191
  40. package/dist/famisanar/client.d.ts +2 -0
  41. package/dist/famisanar/client.js +5 -0
  42. package/dist/famisanar/connections/client.d.ts +28 -0
  43. package/dist/famisanar/connections/client.js +18 -0
  44. package/dist/famisanar/connections/index.d.ts +5 -0
  45. package/dist/famisanar/connections/index.js +4 -0
  46. package/dist/famisanar/connections/models.d.ts +85 -0
  47. package/dist/famisanar/connections/models.js +9 -0
  48. package/dist/famisanar/index.d.ts +1 -0
  49. package/dist/famisanar/models.d.ts +205 -0
  50. package/dist/famisanar/models.js +3 -0
  51. package/dist/raiz/campaigns/client.d.ts +12 -6
  52. package/dist/raiz/campaigns/client.js +1 -1
  53. package/dist/raiz/campaigns/index.d.ts +1 -1
  54. package/dist/raiz/campaigns/models.d.ts +39 -3
  55. package/dist/raiz/channels/client.js +3 -3
  56. package/dist/raiz/conversations/index.d.ts +1 -1
  57. package/dist/raiz/conversations/models.d.ts +33 -0
  58. package/dist/raiz/index.d.ts +1 -1
  59. package/dist/raiz/models.d.ts +38 -0
  60. package/dist/raiz/organization/models.d.ts +2 -2
  61. package/dist/raiz/reports/client.d.ts +5 -2
  62. package/dist/raiz/reports/models.d.ts +21 -0
  63. package/dist/raiz/reports/models.js +1 -1
  64. package/dist/sanitas/affiliations/models.d.ts +2 -2
  65. package/dist/sanitas/connections/models.d.ts +2 -2
  66. package/dist/sanitas/index.d.ts +1 -1
  67. package/dist/sanitas/models.d.ts +21 -0
  68. package/package.json +3 -3
@@ -0,0 +1,33 @@
1
+ import type { ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { AccountBillingNotConfiguredFailure, AccountBillingUnavailableFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface AccountCreatePaymentMethodSetupServiceUnavailableError {
7
+ data: null;
8
+ error: AccountCreatePaymentMethodSetupServiceUnavailableFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: ResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type AccountCreatePaymentMethodSetupServiceUnavailableFailure = UpstreamUnavailableFailure | AccountBillingNotConfiguredFailure | AccountBillingUnavailableFailure;
16
+ export interface AccountPaymentMethodSetup {
17
+ /**
18
+ * The payment processor's page to add or change the card, with no purchase.
19
+ */
20
+ url: string;
21
+ }
22
+ /**
23
+ * A successful answer.
24
+ */
25
+ export interface AccountPaymentMethodSetupResponse {
26
+ data: AccountPaymentMethodSetup;
27
+ error: null;
28
+ /**
29
+ * What every answer carries besides its data or error.
30
+ */
31
+ metadata: ResponseMetadata;
32
+ success: true;
33
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -22,7 +22,7 @@ export interface AccountPermission {
22
22
  /**
23
23
  * The product or integration the permission belongs to.
24
24
  */
25
- group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "salud-total" | "nueva-eps" | "comfachoco" | "oficlinic" | "pijaos-salud" | "sanitas" | "gmedic" | "account";
25
+ group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "salud-total" | "nueva-eps" | "comfachoco" | "oficlinic" | "pijaos-salud" | "famisanar" | "sanitas" | "gmedic" | "account";
26
26
  value: string;
27
27
  }
28
28
  export interface AccountPermissionPage {
@@ -10,9 +10,11 @@ export interface Client {
10
10
  /**
11
11
  * Get the usage summary
12
12
  *
13
- * What the organization used in a range, the current month by default: each
14
- * metered feature in its own units (minutes, conversations, lookups…), broken
15
- * down by product or channel, and the credits its wallet paid.
13
+ * What the organization used in a range (the current month by default, at
14
+ * most 366 days): each metered feature in its own units (minutes,
15
+ * conversations, lookups…) and its value in credits at the organization's own
16
+ * rates, broken down by product, channel, Agent or campaign, a series by day
17
+ * in the organization's time zone, and the credits its wallet paid.
16
18
  */
17
19
  get(request?: GetRequest, options?: RequestOptions): Promise<GetResponse>;
18
20
  }
@@ -24,12 +26,17 @@ export interface GetRequest {
24
26
  */
25
27
  from?: Temporal.Instant;
26
28
  /**
27
- * End of the range; now by default.
29
+ * End of the range; now by default. At most 366 days after `from`.
28
30
  */
29
31
  to?: Temporal.Instant;
30
32
  /**
31
33
  * Breaks each feature down; by product by default.
32
34
  */
33
- groupBy?: "product" | "channel";
35
+ groupBy?: "product" | "channel" | "agent" | "campaign";
36
+ /**
37
+ * An IANA time zone (`America/Bogota`) that days and the default month
38
+ * follow; UTC by default.
39
+ */
40
+ timezone?: string;
34
41
  }
35
42
  export type GetResponse = AccountUsageSummaryResponse;
@@ -13,7 +13,7 @@ export function bind(transport) {
13
13
  const GetOperation = {
14
14
  method: "GET",
15
15
  route: "/v1/account/usage-summary",
16
- query: { from: "from", to: "to", groupBy: "groupBy" },
16
+ query: { from: "from", to: "to", groupBy: "groupBy", timezone: "timezone" },
17
17
  response: AccountUsageSummaryResponseCodec,
18
18
  errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
19
  };
@@ -14,18 +14,23 @@ export interface AccountGetUsageSummaryServiceUnavailableError {
14
14
  }
15
15
  export type AccountGetUsageSummaryServiceUnavailableFailure = UpstreamUnavailableFailure | AccountBillingNotConfiguredFailure | AccountBillingUnavailableFailure;
16
16
  export interface AccountUsageFeature {
17
+ /**
18
+ * Its value at the organization's own rates.
19
+ */
20
+ credits: number;
17
21
  /**
18
22
  * How many reports made it up.
19
23
  */
20
24
  events: number;
21
- feature: "voice_minutes" | "telephony_minutes" | "whatsapp_conversations" | "whatsapp_messages" | "whatsapp_templates" | "tool_calls" | "ai_cost" | "phone_numbers" | "sisben_lookups" | "postconsultations" | "agenda_plan" | "agenda_users" | "support_fee";
25
+ feature: "voice_minutes" | "telephony_minutes" | "telephony_cost" | "whatsapp_conversations" | "whatsapp_messages" | "whatsapp_templates" | "tool_calls" | "ai_cost" | "phone_numbers" | "sisben_lookups" | "adres_lookups" | "policia_colombia_lookups" | "postconsultations" | "agenda_users" | "sms_messages" | "agenda_plan" | "support_fee";
22
26
  groups: {
27
+ credits: number;
23
28
  key: string;
24
29
  units: number;
25
30
  }[];
26
31
  /**
27
32
  * What was used, in the feature's units: minutes, conversations, lookups… For
28
- * `ai_cost`, the model calls.
33
+ * `ai_cost` and `telephony_cost`, the reports.
29
34
  */
30
35
  units: number;
31
36
  }
@@ -34,9 +39,17 @@ export interface AccountUsageSummary {
34
39
  * Credits the wallet paid in the range.
35
40
  */
36
41
  credits: number;
42
+ days: {
43
+ credits: number;
44
+ date: Temporal.PlainDate;
45
+ units: {
46
+ [key: string]: unknown;
47
+ };
48
+ }[];
37
49
  features: AccountUsageFeature[];
38
50
  from: Temporal.Instant;
39
- groupBy: "product" | "channel";
51
+ groupBy: "product" | "channel" | "agent" | "campaign";
52
+ timezone: string;
40
53
  to: Temporal.Instant;
41
54
  }
42
55
  /**
@@ -1,7 +1,8 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { instant, object } from "../../_/index.js";
3
+ import { array, date, instant, object } from "../../_/index.js";
4
4
  export const AccountUsageSummaryCodec = object([
5
+ ["days", null, array(object([["date", null, date]]))],
5
6
  ["from", null, instant],
6
7
  ["to", null, instant],
7
8
  ]);
@@ -12,8 +12,9 @@ export interface Client {
12
12
  *
13
13
  * Buys credits at one US dollar each. The organization's saved card is
14
14
  * charged at once; without one, or when the bank asks to confirm, the answer
15
- * is Stripe's page to pay on. Never repeated on its own: a lost answer is
16
- * OUTCOME_UNKNOWN, and the wallet's transactions say whether it was paid.
15
+ * is the payment processor's page to pay on. Never repeated on its own: a
16
+ * lost answer is OUTCOME_UNKNOWN, and the wallet's transactions say whether
17
+ * it was paid.
17
18
  */
18
19
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
19
20
  }
@@ -57,7 +57,7 @@ export interface AccountTopUpDeclinedFailure {
57
57
  }
58
58
  export interface AccountWalletTopUp {
59
59
  /**
60
- * Stripe's page to pay on, for `checkout`.
60
+ * The payment processor's page to pay on, for `checkout`.
61
61
  */
62
62
  checkoutUrl: string | null;
63
63
  /**
@@ -10,9 +10,10 @@ export interface Client {
10
10
  /**
11
11
  * List wallet transactions
12
12
  *
13
- * What moved the organization's wallet, newest first: top-ups, plan grants
14
- * and renewals, adjustments Arbol made, and the credits spent, one entry per
15
- * UTC day, each with the balance right after it. Listed forward only.
13
+ * What moved the organization's wallet, newest first: top-ups, transfers,
14
+ * credits Arbol gave (by name), plan grants and renewals, adjustments, and
15
+ * the credits spent, one entry per UTC day, each with whether it was paid or
16
+ * granted and the balance right after it. Listed forward only.
16
17
  */
17
18
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
18
19
  }
@@ -15,12 +15,12 @@ export interface AccountListWalletTransactionsServiceUnavailableError {
15
15
  export type AccountListWalletTransactionsServiceUnavailableFailure = UpstreamUnavailableFailure | AccountBillingNotConfiguredFailure | AccountBillingUnavailableFailure;
16
16
  export interface AccountWalletTransaction {
17
17
  /**
18
- * Credits it added (positive) or took (negative); null when Autumn could not
18
+ * Credits it added (positive) or took (negative); null when billing could not
19
19
  * tell.
20
20
  */
21
21
  amount: number | null;
22
22
  /**
23
- * Its amounts are Autumn’s estimate, not an exact record.
23
+ * Its amounts are an estimate, not an exact record.
24
24
  */
25
25
  approximate: boolean;
26
26
  /**
@@ -35,13 +35,28 @@ export interface AccountWalletTransaction {
35
35
  * For a day of usage, its last use.
36
36
  */
37
37
  endsAt: Temporal.Instant | null;
38
+ /**
39
+ * `paid`: money came in; `granted`: Arbol gave the credits; null for spending
40
+ * and renewals.
41
+ */
42
+ funding: "paid" | "granted" | null;
43
+ /**
44
+ * For a `grant`, what Arbol gave it as; its name when `label` is null.
45
+ */
46
+ grantKind: "promo" | "subsidy" | "courtesy" | "correction" | null;
38
47
  id: string;
39
48
  /**
40
- * `usage`: credits spent, one entry per UTC day; `top_up`: credits bought;
41
- * `plan`: a plan's grant or change; `reset`: the plan's period renewed;
42
- * `adjustment`: a change Arbol made.
49
+ * `usage`: credits spent, one entry per UTC day; `top_up`: credits bought by
50
+ * card; `transfer`: credits paid by bank transfer, which Arbol recorded;
51
+ * `grant`: credits Arbol gave, named by `label`; `plan`: a plan's grant or
52
+ * change; `reset`: the plan's period renewed; `adjustment`: another change
53
+ * Arbol made.
54
+ */
55
+ kind: "usage" | "top_up" | "transfer" | "grant" | "plan" | "reset" | "adjustment";
56
+ /**
57
+ * The name Arbol gave a grant or a transfer ("Arbol promo", "Bank transfer").
43
58
  */
44
- kind: "usage" | "top_up" | "plan" | "reset" | "adjustment";
59
+ label: string | null;
45
60
  /**
46
61
  * When it happened; for a day of usage, its first use.
47
62
  */
@@ -10,10 +10,11 @@ export interface Client {
10
10
  /**
11
11
  * Look up affiliation
12
12
  *
13
- * Look up one document using an active IPS connection. The document type
14
- * defaults to CC. Observations retain their original checkedAt for at most
15
- * seven days. Set maxAgeDays to zero to refresh. The provider combines
16
- * missing and invalid records into one outcome.
13
+ * Look up one document using the organization’s active IPS connection. Omit
14
+ * connectionId when exactly one is active. The document type defaults to CC
15
+ * and may be supplied explicitly. Observations retain their original
16
+ * checkedAt for at most seven days. Set maxAgeDays to zero to refresh. The
17
+ * provider combines missing and invalid records into one outcome.
17
18
  */
18
19
  lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
19
20
  }
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
- export type { FamisanarAccountUnavailableFailure, FamisanarAffiliationUnresolvedFailure, FamisanarConnectionUnavailableError, FamisanarConnectionUnavailableFailure, FamisanarCredentialsRejectedFailure, FamisanarLookupAffiliationBadGatewayError, FamisanarLookupAffiliationBadGatewayFailure, FamisanarLookupAffiliationBody, FamisanarLookupAffiliationForbiddenError, FamisanarLookupAffiliationForbiddenFailure, FamisanarLookupAffiliationResult, FamisanarLookupAffiliationResultResponse, FamisanarLookupAffiliationServiceUnavailableError, FamisanarLookupAffiliationServiceUnavailableFailure, FamisanarProviderAccessDeniedFailure, FamisanarProviderNotConfiguredFailure, FamisanarProviderUnavailableFailure, FamisanarSelectionRequiredError, FamisanarSelectionRequiredFailure, } from "./models.js";
5
+ export type { FamisanarLookupAffiliationBadGatewayError, FamisanarLookupAffiliationBadGatewayFailure, FamisanarLookupAffiliationBody, FamisanarLookupAffiliationConflictError, FamisanarLookupAffiliationConflictFailure, FamisanarLookupAffiliationForbiddenError, FamisanarLookupAffiliationForbiddenFailure, FamisanarLookupAffiliationResult, FamisanarLookupAffiliationResultResponse, FamisanarLookupAffiliationServiceUnavailableError, FamisanarLookupAffiliationServiceUnavailableFailure, } from "./models.js";
@@ -1,122 +1,49 @@
1
- import type { Empty, ForbiddenFailure, OutcomeUnknownFailure, ResponseMetadata, SessionExpiredFailure, UpstreamUnavailableFailure } from "../../models.js";
2
- /**
3
- * Account could not verify this connection.
4
- */
5
- export interface FamisanarAccountUnavailableFailure {
6
- /**
7
- * The failure code, stable across releases.
8
- */
9
- code: "ACCOUNT_UNAVAILABLE";
10
- /**
11
- * No fields.
12
- */
13
- data: Empty;
14
- /**
15
- * What went wrong, for people; it never contains input values.
16
- */
17
- message: string;
18
- /**
19
- * Whether repeating the same request may succeed.
20
- */
21
- retryable: false;
22
- }
23
- /**
24
- * The provider returned no confirmed observation.
25
- */
26
- export interface FamisanarAffiliationUnresolvedFailure {
27
- /**
28
- * The failure code, stable across releases.
29
- */
30
- code: "AFFILIATION_UNRESOLVED";
31
- /**
32
- * No fields.
33
- */
34
- data: Empty;
35
- /**
36
- * What went wrong, for people; it never contains input values.
37
- */
38
- message: string;
39
- /**
40
- * Whether repeating the same request may succeed.
41
- */
42
- retryable: false;
43
- }
1
+ import type { ForbiddenFailure, OutcomeUnknownFailure, ResponseMetadata, SessionExpiredFailure, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { FamisanarAccountUnavailableFailure, FamisanarAffiliationUnresolvedFailure, FamisanarConnectionRequiredFailure, FamisanarCredentialsRejectedFailure, FamisanarProviderAccessDeniedFailure, FamisanarProviderNotConfiguredFailure, FamisanarProviderUnavailableFailure, FamisanarSelectionRequiredFailure } from "../models.js";
44
3
  /**
45
4
  * A failed answer.
46
5
  */
47
- export interface FamisanarConnectionUnavailableError {
6
+ export interface FamisanarLookupAffiliationBadGatewayError {
48
7
  data: null;
49
- /**
50
- * No active Famisanar connection is available.
51
- */
52
- error: FamisanarConnectionUnavailableFailure;
8
+ error: FamisanarLookupAffiliationBadGatewayFailure;
53
9
  /**
54
10
  * What every answer carries besides its data or error.
55
11
  */
56
12
  metadata: ResponseMetadata;
57
13
  success: false;
58
14
  }
59
- /**
60
- * No active Famisanar connection is available.
61
- */
62
- export interface FamisanarConnectionUnavailableFailure {
63
- /**
64
- * The failure code, stable across releases.
65
- */
66
- code: "CONNECTION_UNAVAILABLE";
67
- /**
68
- * No fields.
69
- */
70
- data: Empty;
71
- /**
72
- * What went wrong, for people; it never contains input values.
73
- */
74
- message: string;
75
- /**
76
- * Whether repeating the same request may succeed.
77
- */
78
- retryable: false;
79
- }
80
- /**
81
- * The provider rejected these credentials.
82
- */
83
- export interface FamisanarCredentialsRejectedFailure {
84
- /**
85
- * The failure code, stable across releases.
86
- */
87
- code: "CREDENTIALS_REJECTED";
15
+ export type FamisanarLookupAffiliationBadGatewayFailure = OutcomeUnknownFailure | FamisanarAffiliationUnresolvedFailure;
16
+ export interface FamisanarLookupAffiliationBody {
88
17
  /**
89
- * No fields.
18
+ * Omit when the organization has exactly one active Famisanar connection.
19
+ * Required to choose among multiple active connections.
90
20
  */
91
- data: Empty;
21
+ connectionId?: string;
22
+ documentNumber: string;
92
23
  /**
93
- * What went wrong, for people; it never contains input values.
24
+ * Identity document type. Defaults to CC; send another supported type
25
+ * explicitly.
94
26
  */
95
- message: string;
27
+ documentType?: "CC" | "CD" | "CE" | "CN" | "ME" | "NT" | "PC" | "PE" | "PS" | "PT" | "RC" | "SC" | "TI";
96
28
  /**
97
- * Whether repeating the same request may succeed.
29
+ * Maximum age in days of an observation from this IPS connection. Zero
30
+ * contacts the provider and refreshes the saved result.
98
31
  */
99
- retryable: false;
32
+ maxAgeDays?: number;
100
33
  }
101
34
  /**
102
35
  * A failed answer.
103
36
  */
104
- export interface FamisanarLookupAffiliationBadGatewayError {
37
+ export interface FamisanarLookupAffiliationConflictError {
105
38
  data: null;
106
- error: FamisanarLookupAffiliationBadGatewayFailure;
39
+ error: FamisanarLookupAffiliationConflictFailure;
107
40
  /**
108
41
  * What every answer carries besides its data or error.
109
42
  */
110
43
  metadata: ResponseMetadata;
111
44
  success: false;
112
45
  }
113
- export type FamisanarLookupAffiliationBadGatewayFailure = OutcomeUnknownFailure | FamisanarAffiliationUnresolvedFailure;
114
- export interface FamisanarLookupAffiliationBody {
115
- connectionId: string;
116
- documentNumber: string;
117
- documentType?: "CC" | "CD" | "CE" | "CN" | "ME" | "NT" | "PC" | "PE" | "PS" | "PT" | "RC" | "SC" | "TI";
118
- maxAgeDays?: number;
119
- }
46
+ export type FamisanarLookupAffiliationConflictFailure = FamisanarConnectionRequiredFailure | FamisanarSelectionRequiredFailure;
120
47
  /**
121
48
  * A failed answer.
122
49
  */
@@ -165,104 +92,5 @@ export interface FamisanarLookupAffiliationServiceUnavailableError {
165
92
  success: false;
166
93
  }
167
94
  export type FamisanarLookupAffiliationServiceUnavailableFailure = UpstreamUnavailableFailure | FamisanarAccountUnavailableFailure | FamisanarProviderNotConfiguredFailure | FamisanarProviderUnavailableFailure | SessionExpiredFailure;
168
- /**
169
- * The provider declined this request.
170
- */
171
- export interface FamisanarProviderAccessDeniedFailure {
172
- /**
173
- * The failure code, stable across releases.
174
- */
175
- code: "PROVIDER_ACCESS_DENIED";
176
- /**
177
- * No fields.
178
- */
179
- data: Empty;
180
- /**
181
- * What went wrong, for people; it never contains input values.
182
- */
183
- message: string;
184
- /**
185
- * Whether repeating the same request may succeed.
186
- */
187
- retryable: false;
188
- }
189
- /**
190
- * The authorized source has not been connected.
191
- */
192
- export interface FamisanarProviderNotConfiguredFailure {
193
- /**
194
- * The failure code, stable across releases.
195
- */
196
- code: "PROVIDER_NOT_CONFIGURED";
197
- /**
198
- * No fields.
199
- */
200
- data: Empty;
201
- /**
202
- * What went wrong, for people; it never contains input values.
203
- */
204
- message: string;
205
- /**
206
- * Whether repeating the same request may succeed.
207
- */
208
- retryable: false;
209
- }
210
- /**
211
- * The provider is unavailable.
212
- */
213
- export interface FamisanarProviderUnavailableFailure {
214
- /**
215
- * The failure code, stable across releases.
216
- */
217
- code: "PROVIDER_UNAVAILABLE";
218
- /**
219
- * No fields.
220
- */
221
- data: Empty;
222
- /**
223
- * What went wrong, for people; it never contains input values.
224
- */
225
- message: string;
226
- /**
227
- * Whether repeating the same request may succeed.
228
- */
229
- retryable: false;
230
- }
231
- /**
232
- * A failed answer.
233
- */
234
- export interface FamisanarSelectionRequiredError {
235
- data: null;
236
- /**
237
- * Choose an unambiguous IPS and active branch for this account.
238
- */
239
- error: FamisanarSelectionRequiredFailure;
240
- /**
241
- * What every answer carries besides its data or error.
242
- */
243
- metadata: ResponseMetadata;
244
- success: false;
245
- }
246
- /**
247
- * Choose an unambiguous IPS and active branch for this account.
248
- */
249
- export interface FamisanarSelectionRequiredFailure {
250
- /**
251
- * The failure code, stable across releases.
252
- */
253
- code: "SELECTION_REQUIRED";
254
- /**
255
- * No fields.
256
- */
257
- data: Empty;
258
- /**
259
- * What went wrong, for people; it never contains input values.
260
- */
261
- message: string;
262
- /**
263
- * Whether repeating the same request may succeed.
264
- */
265
- retryable: false;
266
- }
267
95
  export declare const FamisanarLookupAffiliationResultCodec: import("../../_/codec.js").Codec;
268
96
  export declare const FamisanarLookupAffiliationResultResponseCodec: import("../../_/codec.js").Codec;
@@ -1,5 +1,6 @@
1
1
  import { type BaseClientOptions, Transport } from "../_/index.js";
2
2
  import { type Client as AffiliationsClient } from "./affiliations/client.js";
3
+ import { type Client as ConnectionsClient } from "./connections/client.js";
3
4
  export interface ClientOptions extends BaseClientOptions {
4
5
  /**
5
6
  * The URL the paths of the API are relative to.
@@ -8,6 +9,7 @@ export interface ClientOptions extends BaseClientOptions {
8
9
  }
9
10
  export interface Client {
10
11
  readonly affiliations: AffiliationsClient;
12
+ readonly connections: ConnectionsClient;
11
13
  }
12
14
  export declare function createClient(options: ClientOptions): Client;
13
15
  export declare function bind(transport: Transport): Client;
@@ -2,14 +2,19 @@
2
2
  /* eslint-disable */
3
3
  import { Transport } from "../_/index.js";
4
4
  import { bind as bindAffiliations, } from "./affiliations/client.js";
5
+ import { bind as bindConnections, } from "./connections/client.js";
5
6
  export function createClient(options) {
6
7
  return bind(new Transport(options));
7
8
  }
8
9
  export function bind(transport) {
9
10
  let affiliationsClient;
11
+ let connectionsClient;
10
12
  return {
11
13
  get affiliations() {
12
14
  return (affiliationsClient ??= bindAffiliations(transport));
13
15
  },
16
+ get connections() {
17
+ return (connectionsClient ??= bindConnections(transport));
18
+ },
14
19
  };
15
20
  }
@@ -0,0 +1,28 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import { type FamisanarGetConnectionResultResponse } from "./models.js";
3
+ export interface ClientOptions extends BaseClientOptions {
4
+ /**
5
+ * The URL the paths of the API are relative to.
6
+ */
7
+ baseUrl: string;
8
+ }
9
+ export interface Client {
10
+ /**
11
+ * Get a Famisanar connection
12
+ *
13
+ * Read session availability and observed expiry without signing in. An
14
+ * undisclosed provider deadline is null. Credentials, cookies and session
15
+ * handles are never returned. Expired sessions reconnect automatically on the
16
+ * next uncached affiliation lookup.
17
+ */
18
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
19
+ }
20
+ export declare function createClient(options: ClientOptions): Client;
21
+ export declare function bind(transport: Transport): Client;
22
+ export interface GetRequest {
23
+ /**
24
+ * The IPS connection saved in Account. This is not a provider session ID.
25
+ */
26
+ connectionId: string;
27
+ }
28
+ export type GetResponse = FamisanarGetConnectionResultResponse;
@@ -0,0 +1,18 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { FamisanarGetConnectionResultResponseCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ get: (request, options) => transport.send(GetOperation, request, options),
11
+ };
12
+ }
13
+ const GetOperation = {
14
+ method: "GET",
15
+ route: "/v1/famisanar/connections/{connectionId}",
16
+ response: FamisanarGetConnectionResultResponseCodec,
17
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, } from "./client.js";
5
+ export type { FamisanarGetConnectionBadGatewayError, FamisanarGetConnectionBadGatewayFailure, FamisanarGetConnectionConflictError, FamisanarGetConnectionConflictFailure, FamisanarGetConnectionForbiddenError, FamisanarGetConnectionForbiddenFailure, FamisanarGetConnectionResult, FamisanarGetConnectionResultResponse, FamisanarGetConnectionServiceUnavailableError, FamisanarGetConnectionServiceUnavailableFailure, } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";