@augno/sdk 0.11.0 → 0.12.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 (97) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/package.json +1 -1
  3. package/resources/core/audit-events.d.mts +3 -3
  4. package/resources/core/audit-events.d.mts.map +1 -1
  5. package/resources/core/audit-events.d.ts +3 -3
  6. package/resources/core/audit-events.d.ts.map +1 -1
  7. package/resources/core/core.d.mts +2 -2
  8. package/resources/core/core.d.mts.map +1 -1
  9. package/resources/core/core.d.ts +2 -2
  10. package/resources/core/core.d.ts.map +1 -1
  11. package/resources/core/core.js.map +1 -1
  12. package/resources/core/core.mjs.map +1 -1
  13. package/resources/messaging/conversations/conversations.d.mts +3 -3
  14. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  15. package/resources/messaging/conversations/conversations.d.ts +3 -3
  16. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  17. package/resources/messaging/conversations/conversations.js.map +1 -1
  18. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  19. package/resources/messaging/conversations/links.d.mts +2 -2
  20. package/resources/messaging/conversations/links.d.mts.map +1 -1
  21. package/resources/messaging/conversations/links.d.ts +2 -2
  22. package/resources/messaging/conversations/links.d.ts.map +1 -1
  23. package/resources/messaging/conversations/messages.d.mts +2 -2
  24. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  25. package/resources/messaging/conversations/messages.d.ts +2 -2
  26. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  27. package/resources/messaging/notifications/notifications.d.mts +2 -2
  28. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  29. package/resources/messaging/notifications/notifications.d.ts +2 -2
  30. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  31. package/resources/messaging/notifications/notifications.js.map +1 -1
  32. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  33. package/resources/settings/index.d.mts +1 -0
  34. package/resources/settings/index.d.mts.map +1 -1
  35. package/resources/settings/index.d.ts +1 -0
  36. package/resources/settings/index.d.ts.map +1 -1
  37. package/resources/settings/index.js +3 -1
  38. package/resources/settings/index.js.map +1 -1
  39. package/resources/settings/index.mjs +1 -0
  40. package/resources/settings/index.mjs.map +1 -1
  41. package/resources/settings/portal-domains/actions.d.mts +28 -0
  42. package/resources/settings/portal-domains/actions.d.mts.map +1 -0
  43. package/resources/settings/portal-domains/actions.d.ts +28 -0
  44. package/resources/settings/portal-domains/actions.d.ts.map +1 -0
  45. package/resources/settings/portal-domains/actions.js +33 -0
  46. package/resources/settings/portal-domains/actions.js.map +1 -0
  47. package/resources/settings/portal-domains/actions.mjs +29 -0
  48. package/resources/settings/portal-domains/actions.mjs.map +1 -0
  49. package/resources/settings/portal-domains/index.d.mts +3 -0
  50. package/resources/settings/portal-domains/index.d.mts.map +1 -0
  51. package/resources/settings/portal-domains/index.d.ts +3 -0
  52. package/resources/settings/portal-domains/index.d.ts.map +1 -0
  53. package/resources/settings/portal-domains/index.js +9 -0
  54. package/resources/settings/portal-domains/index.js.map +1 -0
  55. package/resources/settings/portal-domains/index.mjs +4 -0
  56. package/resources/settings/portal-domains/index.mjs.map +1 -0
  57. package/resources/settings/portal-domains/portal-domains.d.mts +208 -0
  58. package/resources/settings/portal-domains/portal-domains.d.mts.map +1 -0
  59. package/resources/settings/portal-domains/portal-domains.d.ts +208 -0
  60. package/resources/settings/portal-domains/portal-domains.d.ts.map +1 -0
  61. package/resources/settings/portal-domains/portal-domains.js +93 -0
  62. package/resources/settings/portal-domains/portal-domains.js.map +1 -0
  63. package/resources/settings/portal-domains/portal-domains.mjs +88 -0
  64. package/resources/settings/portal-domains/portal-domains.mjs.map +1 -0
  65. package/resources/settings/portal-domains.d.mts +2 -0
  66. package/resources/settings/portal-domains.d.mts.map +1 -0
  67. package/resources/settings/portal-domains.d.ts +2 -0
  68. package/resources/settings/portal-domains.d.ts.map +1 -0
  69. package/resources/settings/portal-domains.js +6 -0
  70. package/resources/settings/portal-domains.js.map +1 -0
  71. package/resources/settings/portal-domains.mjs +3 -0
  72. package/resources/settings/portal-domains.mjs.map +1 -0
  73. package/resources/settings/settings.d.mts +4 -0
  74. package/resources/settings/settings.d.mts.map +1 -1
  75. package/resources/settings/settings.d.ts +4 -0
  76. package/resources/settings/settings.d.ts.map +1 -1
  77. package/resources/settings/settings.js +4 -0
  78. package/resources/settings/settings.js.map +1 -1
  79. package/resources/settings/settings.mjs +4 -0
  80. package/resources/settings/settings.mjs.map +1 -1
  81. package/src/resources/core/audit-events.ts +6 -0
  82. package/src/resources/core/core.ts +4 -0
  83. package/src/resources/messaging/conversations/conversations.ts +6 -0
  84. package/src/resources/messaging/conversations/links.ts +4 -0
  85. package/src/resources/messaging/conversations/messages.ts +4 -0
  86. package/src/resources/messaging/notifications/notifications.ts +4 -0
  87. package/src/resources/settings/index.ts +10 -0
  88. package/src/resources/settings/portal-domains/actions.ts +33 -0
  89. package/src/resources/settings/portal-domains/index.ts +13 -0
  90. package/src/resources/settings/portal-domains/portal-domains.ts +256 -0
  91. package/src/resources/settings/portal-domains.ts +3 -0
  92. package/src/resources/settings/settings.ts +24 -0
  93. package/src/version.ts +1 -1
  94. package/version.d.mts +1 -1
  95. package/version.d.ts +1 -1
  96. package/version.js +1 -1
  97. package/version.mjs +1 -1
@@ -1,10 +1,14 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as IntegrationsAPI from "./integrations.js";
3
3
  import { AccountIntegration, CreateAccountIntegrationRequest, IntegrationCreateParams, IntegrationListParams, IntegrationUpdateParams, Integrations, ListAccountIntegration, UpdateAccountIntegrationRequest } from "./integrations.js";
4
+ import * as PortalDomainsAPI from "./portal-domains/portal-domains.js";
5
+ import { CreatePortalDomainRequest, DNSRecord, ListDNSRecord, ListPortalDomain, PortalDomain, PortalDomainCreateParams, PortalDomainDeleteResponse, PortalDomains } from "./portal-domains/portal-domains.js";
4
6
  export declare class Settings extends APIResource {
7
+ portalDomains: PortalDomainsAPI.PortalDomains;
5
8
  integrations: IntegrationsAPI.Integrations;
6
9
  }
7
10
  export declare namespace Settings {
11
+ export { PortalDomains as PortalDomains, type CreatePortalDomainRequest as CreatePortalDomainRequest, type DNSRecord as DNSRecord, type ListDNSRecord as ListDNSRecord, type ListPortalDomain as ListPortalDomain, type PortalDomain as PortalDomain, type PortalDomainDeleteResponse as PortalDomainDeleteResponse, type PortalDomainCreateParams as PortalDomainCreateParams, };
8
12
  export { Integrations as Integrations, type AccountIntegration as AccountIntegration, type CreateAccountIntegrationRequest as CreateAccountIntegrationRequest, type ListAccountIntegration as ListAccountIntegration, type UpdateAccountIntegrationRequest as UpdateAccountIntegrationRequest, type IntegrationListParams as IntegrationListParams, type IntegrationCreateParams as IntegrationCreateParams, type IntegrationUpdateParams as IntegrationUpdateParams, };
9
13
  }
10
14
  //# sourceMappingURL=settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/resources/settings/settings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,sBAAsB,EACtB,+BAA+B,EAChC;AAED,qBAAa,QAAS,SAAQ,WAAW;IACvC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;CAC7F;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/resources/settings/settings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,sBAAsB,EACtB,+BAA+B,EAChC;OACM,KAAK,gBAAgB;OACrB,EACL,yBAAyB,EACzB,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,wBAAwB,EACxB,0BAA0B,EAC1B,aAAa,EACd;AAED,qBAAa,QAAS,SAAQ,WAAW;IACvC,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;IACjG,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;CAC7F;AAKD,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,aAAa,IAAI,aAAa,EAC9B,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
@@ -6,12 +6,16 @@ const tslib_1 = require("../../internal/tslib.js");
6
6
  const resource_1 = require("../../core/resource.js");
7
7
  const IntegrationsAPI = tslib_1.__importStar(require("./integrations.js"));
8
8
  const integrations_1 = require("./integrations.js");
9
+ const PortalDomainsAPI = tslib_1.__importStar(require("./portal-domains/portal-domains.js"));
10
+ const portal_domains_1 = require("./portal-domains/portal-domains.js");
9
11
  class Settings extends resource_1.APIResource {
10
12
  constructor() {
11
13
  super(...arguments);
14
+ this.portalDomains = new PortalDomainsAPI.PortalDomains(this._client);
12
15
  this.integrations = new IntegrationsAPI.Integrations(this._client);
13
16
  }
14
17
  }
15
18
  exports.Settings = Settings;
19
+ Settings.PortalDomains = portal_domains_1.PortalDomains;
16
20
  Settings.Integrations = integrations_1.Integrations;
17
21
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/resources/settings/settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2EAAkD;AAClD,oDASwB;AAExB,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9F,CAAC;CAAA;AAFD,4BAEC;AAED,QAAQ,CAAC,YAAY,GAAG,2BAAY,CAAC"}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/resources/settings/settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2EAAkD;AAClD,oDASwB;AACxB,6FAAoE;AACpE,uEASyC;AAEzC,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9F,CAAC;CAAA;AAHD,4BAGC;AAED,QAAQ,CAAC,aAAa,GAAG,8BAAa,CAAC;AACvC,QAAQ,CAAC,YAAY,GAAG,2BAAY,CAAC"}
@@ -2,11 +2,15 @@
2
2
  import { APIResource } from "../../core/resource.mjs";
3
3
  import * as IntegrationsAPI from "./integrations.mjs";
4
4
  import { Integrations, } from "./integrations.mjs";
5
+ import * as PortalDomainsAPI from "./portal-domains/portal-domains.mjs";
6
+ import { PortalDomains, } from "./portal-domains/portal-domains.mjs";
5
7
  export class Settings extends APIResource {
6
8
  constructor() {
7
9
  super(...arguments);
10
+ this.portalDomains = new PortalDomainsAPI.PortalDomains(this._client);
8
11
  this.integrations = new IntegrationsAPI.Integrations(this._client);
9
12
  }
10
13
  }
14
+ Settings.PortalDomains = PortalDomains;
11
15
  Settings.Integrations = Integrations;
12
16
  //# sourceMappingURL=settings.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.mjs","sourceRoot":"","sources":["../../src/resources/settings/settings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAML,YAAY,GAGb;AAED,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9F,CAAC;CAAA;AAED,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"settings.mjs","sourceRoot":"","sources":["../../src/resources/settings/settings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAML,YAAY,GAGb;OACM,KAAK,gBAAgB;OACrB,EAQL,aAAa,GACd;AAED,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9F,CAAC;CAAA;AAED,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;AACvC,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC"}
@@ -259,6 +259,8 @@ export interface AuditEvent {
259
259
  | 'email_log'
260
260
  | 'email_domain'
261
261
  | 'email_inbox'
262
+ | 'portal_domain'
263
+ | 'dns_record'
262
264
  | 'inventory_change_log'
263
265
  | 'invoice'
264
266
  | 'invoice_summary'
@@ -582,6 +584,8 @@ export interface ListObjectType {
582
584
  | 'email_log'
583
585
  | 'email_domain'
584
586
  | 'email_inbox'
587
+ | 'portal_domain'
588
+ | 'dns_record'
585
589
  | 'inventory_change_log'
586
590
  | 'invoice'
587
591
  | 'invoice_summary'
@@ -905,6 +909,8 @@ export interface AuditEventListParams {
905
909
  | 'email_log'
906
910
  | 'email_domain'
907
911
  | 'email_inbox'
912
+ | 'portal_domain'
913
+ | 'dns_record'
908
914
  | 'inventory_change_log'
909
915
  | 'invoice'
910
916
  | 'invoice_summary'
@@ -219,6 +219,8 @@ export interface Entity {
219
219
  | 'email_log'
220
220
  | 'email_domain'
221
221
  | 'email_inbox'
222
+ | 'portal_domain'
223
+ | 'dns_record'
222
224
  | 'inventory_change_log'
223
225
  | 'invoice'
224
226
  | 'invoice_summary'
@@ -515,6 +517,8 @@ export interface CoreRetrieveSearchParams {
515
517
  | 'email_log'
516
518
  | 'email_domain'
517
519
  | 'email_inbox'
520
+ | 'portal_domain'
521
+ | 'dns_record'
518
522
  | 'inventory_change_log'
519
523
  | 'invoice'
520
524
  | 'invoice_summary'
@@ -1108,6 +1108,8 @@ export interface CreateConversationRequest {
1108
1108
  | 'email_log'
1109
1109
  | 'email_domain'
1110
1110
  | 'email_inbox'
1111
+ | 'portal_domain'
1112
+ | 'dns_record'
1111
1113
  | 'inventory_change_log'
1112
1114
  | 'invoice'
1113
1115
  | 'invoice_summary'
@@ -1911,6 +1913,8 @@ export interface ConversationCreateParams {
1911
1913
  | 'email_log'
1912
1914
  | 'email_domain'
1913
1915
  | 'email_inbox'
1916
+ | 'portal_domain'
1917
+ | 'dns_record'
1914
1918
  | 'inventory_change_log'
1915
1919
  | 'invoice'
1916
1920
  | 'invoice_summary'
@@ -2220,6 +2224,8 @@ export interface ConversationListParams {
2220
2224
  | 'email_log'
2221
2225
  | 'email_domain'
2222
2226
  | 'email_inbox'
2227
+ | 'portal_domain'
2228
+ | 'dns_record'
2223
2229
  | 'inventory_change_log'
2224
2230
  | 'invoice'
2225
2231
  | 'invoice_summary'
@@ -201,6 +201,8 @@ export interface AddConversationLinkRequest {
201
201
  | 'email_log'
202
202
  | 'email_domain'
203
203
  | 'email_inbox'
204
+ | 'portal_domain'
205
+ | 'dns_record'
204
206
  | 'inventory_change_log'
205
207
  | 'invoice'
206
208
  | 'invoice_summary'
@@ -504,6 +506,8 @@ export interface LinkCreateParams {
504
506
  | 'email_log'
505
507
  | 'email_domain'
506
508
  | 'email_inbox'
509
+ | 'portal_domain'
510
+ | 'dns_record'
507
511
  | 'inventory_change_log'
508
512
  | 'invoice'
509
513
  | 'invoice_summary'
@@ -325,6 +325,8 @@ export interface SendMessageRequest {
325
325
  | 'email_log'
326
326
  | 'email_domain'
327
327
  | 'email_inbox'
328
+ | 'portal_domain'
329
+ | 'dns_record'
328
330
  | 'inventory_change_log'
329
331
  | 'invoice'
330
332
  | 'invoice_summary'
@@ -685,6 +687,8 @@ export interface MessageCreateParams {
685
687
  | 'email_log'
686
688
  | 'email_domain'
687
689
  | 'email_inbox'
690
+ | 'portal_domain'
691
+ | 'dns_record'
688
692
  | 'inventory_change_log'
689
693
  | 'invoice'
690
694
  | 'invoice_summary'
@@ -533,6 +533,8 @@ export interface SendNotificationRequest {
533
533
  | 'email_log'
534
534
  | 'email_domain'
535
535
  | 'email_inbox'
536
+ | 'portal_domain'
537
+ | 'dns_record'
536
538
  | 'inventory_change_log'
537
539
  | 'invoice'
538
540
  | 'invoice_summary'
@@ -827,6 +829,8 @@ export interface NotificationCreateParams {
827
829
  | 'email_log'
828
830
  | 'email_domain'
829
831
  | 'email_inbox'
832
+ | 'portal_domain'
833
+ | 'dns_record'
830
834
  | 'inventory_change_log'
831
835
  | 'invoice'
832
836
  | 'invoice_summary'
@@ -10,4 +10,14 @@ export {
10
10
  type IntegrationCreateParams,
11
11
  type IntegrationUpdateParams,
12
12
  } from './integrations';
13
+ export {
14
+ PortalDomains,
15
+ type CreatePortalDomainRequest,
16
+ type DNSRecord,
17
+ type ListDNSRecord,
18
+ type ListPortalDomain,
19
+ type PortalDomain,
20
+ type PortalDomainDeleteResponse,
21
+ type PortalDomainCreateParams,
22
+ } from './portal-domains/index';
13
23
  export { Settings } from './settings';
@@ -0,0 +1,33 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as PortalDomainsAPI from './portal-domains';
5
+ import { APIPromise } from '../../../core/api-promise';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+ import { path } from '../../../internal/utils/path';
8
+
9
+ /**
10
+ * Connect a custom domain to the account's customer portal, verify its DNS, and resolve custom hosts to portal accounts.
11
+ */
12
+ export class Actions extends APIResource {
13
+ /**
14
+ * Re-checks the domain's DNS configuration and flips it to `verified` once the
15
+ * published records are confirmed.
16
+ *
17
+ * Returns the updated domain (still `pending` if DNS has not propagated yet) along
18
+ * with the currently required DNS records.
19
+ *
20
+ * This endpoint requires the permission: `self:update`.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const portalDomain =
25
+ * await client.settings.portalDomains.actions.verify(
26
+ * 'podn_018e88072d1320808dc9aab42',
27
+ * );
28
+ * ```
29
+ */
30
+ verify(id: string, options?: RequestOptions): APIPromise<PortalDomainsAPI.PortalDomain> {
31
+ return this._client.post(path`/v1/settings/portal-domains/${id}/actions/verify`, options);
32
+ }
33
+ }
@@ -0,0 +1,13 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Actions } from './actions';
4
+ export {
5
+ PortalDomains,
6
+ type CreatePortalDomainRequest,
7
+ type DNSRecord,
8
+ type ListDNSRecord,
9
+ type ListPortalDomain,
10
+ type PortalDomain,
11
+ type PortalDomainDeleteResponse,
12
+ type PortalDomainCreateParams,
13
+ } from './portal-domains';
@@ -0,0 +1,256 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as APIKeysAPI from '../../auth/api-keys/api-keys';
5
+ import * as ActionsAPI from './actions';
6
+ import { Actions } from './actions';
7
+ import { APIPromise } from '../../../core/api-promise';
8
+ import { RequestOptions } from '../../../internal/request-options';
9
+ import { path } from '../../../internal/utils/path';
10
+
11
+ /**
12
+ * Connect a custom domain to the account's customer portal, verify its DNS, and resolve custom hosts to portal accounts.
13
+ */
14
+ export class PortalDomains extends APIResource {
15
+ actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
16
+
17
+ /**
18
+ * Connects a custom domain to the account's customer portal and returns the DNS
19
+ * records to publish.
20
+ *
21
+ * Each account can have one custom domain. The domain starts in `pending` until
22
+ * its DNS is verified.
23
+ *
24
+ * This endpoint requires the permission: `self:update`.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const portalDomain =
29
+ * await client.settings.portalDomains.create({
30
+ * domain: 'shop.acme.com',
31
+ * });
32
+ * ```
33
+ */
34
+ create(body: PortalDomainCreateParams, options?: RequestOptions): APIPromise<PortalDomain> {
35
+ return this._client.post('/v1/settings/portal-domains', { body, ...options });
36
+ }
37
+
38
+ /**
39
+ * Lists the account's portal domains.
40
+ *
41
+ * Accounts currently have at most one custom portal domain.
42
+ *
43
+ * This endpoint requires the permission: `self:read`.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const listPortalDomain =
48
+ * await client.settings.portalDomains.list();
49
+ * ```
50
+ */
51
+ list(options?: RequestOptions): APIPromise<ListPortalDomain> {
52
+ return this._client.get('/v1/settings/portal-domains', options);
53
+ }
54
+
55
+ /**
56
+ * Returns a single portal domain, including the DNS records the customer must
57
+ * publish.
58
+ *
59
+ * This endpoint requires the permission: `self:read`.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const portalDomain =
64
+ * await client.settings.portalDomains.retrieve(
65
+ * 'podn_018e88072d1320808dc9aab42',
66
+ * );
67
+ * ```
68
+ */
69
+ retrieve(id: string, options?: RequestOptions): APIPromise<PortalDomain> {
70
+ return this._client.get(path`/v1/settings/portal-domains/${id}`, options);
71
+ }
72
+
73
+ /**
74
+ * Disconnects the custom domain from the account's customer portal.
75
+ *
76
+ * The domain is detached from the serving infrastructure and immediately stops
77
+ * serving the portal.
78
+ *
79
+ * This endpoint requires the permission: `self:update`.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const portalDomain =
84
+ * await client.settings.portalDomains.delete(
85
+ * 'podn_018e88072d1320808dc9aab42',
86
+ * );
87
+ * ```
88
+ */
89
+ delete(id: string, options?: RequestOptions): APIPromise<PortalDomainDeleteResponse> {
90
+ return this._client.delete(path`/v1/settings/portal-domains/${id}`, options);
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Request to connect a custom domain to the account's customer portal.
96
+ */
97
+ export interface CreatePortalDomainRequest {
98
+ /**
99
+ * The fully-qualified domain name to connect (e.g. `shop.acme.com`). Subdomains
100
+ * are recommended; apex domains are supported via an A record.
101
+ */
102
+ domain: string;
103
+ }
104
+
105
+ /**
106
+ * A DNS record the customer must publish for their portal domain.
107
+ */
108
+ export interface DNSRecord {
109
+ /**
110
+ * Record name (host) to publish.
111
+ */
112
+ name: string;
113
+
114
+ /**
115
+ * Resource type identifier.
116
+ */
117
+ object: 'dns_record';
118
+
119
+ /**
120
+ * Why the record is needed.
121
+ *
122
+ * Routing records point traffic at the portal's serving infrastructure; ownership
123
+ * records prove control of a domain that is claimed elsewhere.
124
+ */
125
+ reason: 'routing' | 'ownership';
126
+
127
+ /**
128
+ * Record type.
129
+ */
130
+ type: 'CNAME' | 'A' | 'TXT';
131
+
132
+ /**
133
+ * Record value to publish.
134
+ */
135
+ value: string;
136
+ }
137
+
138
+ /**
139
+ * List represents a paginated list of resources.
140
+ */
141
+ export interface ListDNSRecord {
142
+ /**
143
+ * Resources in this page.
144
+ */
145
+ data: Array<DNSRecord>;
146
+
147
+ /**
148
+ * Resource type identifier.
149
+ */
150
+ object: 'list';
151
+
152
+ /**
153
+ * PageInfo contains URL-based pagination metadata.
154
+ */
155
+ page_info: APIKeysAPI.PageInfo;
156
+ }
157
+
158
+ /**
159
+ * List represents a paginated list of resources.
160
+ */
161
+ export interface ListPortalDomain {
162
+ /**
163
+ * Resources in this page.
164
+ */
165
+ data: Array<PortalDomain>;
166
+
167
+ /**
168
+ * Resource type identifier.
169
+ */
170
+ object: 'list';
171
+
172
+ /**
173
+ * PageInfo contains URL-based pagination metadata.
174
+ */
175
+ page_info: APIKeysAPI.PageInfo;
176
+ }
177
+
178
+ /**
179
+ * A custom domain that serves the account's customer portal (e.g.
180
+ * `shop.acme.com`).
181
+ *
182
+ * After creation the domain starts in `pending`; publish the returned DNS records,
183
+ * then poll the verify action until it flips to `verified`. Once verified, the
184
+ * customer portal is served on the domain with TLS provisioned automatically.
185
+ */
186
+ export interface PortalDomain {
187
+ /**
188
+ * Portal domain ID.
189
+ */
190
+ id: string;
191
+
192
+ /**
193
+ * Creation timestamp.
194
+ */
195
+ created_at: string;
196
+
197
+ /**
198
+ * List represents a paginated list of resources.
199
+ */
200
+ dns_records: ListDNSRecord | null;
201
+
202
+ /**
203
+ * The fully-qualified domain name (e.g. `shop.acme.com`).
204
+ */
205
+ domain: string;
206
+
207
+ /**
208
+ * Resource type identifier.
209
+ */
210
+ object: 'portal_domain';
211
+
212
+ /**
213
+ * Verification status.
214
+ *
215
+ * - pending domains await DNS configuration
216
+ * - verified domains serve the portal
217
+ * - failed domains were rejected and cannot be used
218
+ */
219
+ status: 'pending' | 'verified' | 'failed';
220
+
221
+ /**
222
+ * Last updated timestamp.
223
+ */
224
+ updated_at: string;
225
+
226
+ /**
227
+ * When the domain's DNS configuration was confirmed.
228
+ */
229
+ verified_at: string | null;
230
+ }
231
+
232
+ export interface PortalDomainDeleteResponse {}
233
+
234
+ export interface PortalDomainCreateParams {
235
+ /**
236
+ * The fully-qualified domain name to connect (e.g. `shop.acme.com`). Subdomains
237
+ * are recommended; apex domains are supported via an A record.
238
+ */
239
+ domain: string;
240
+ }
241
+
242
+ PortalDomains.Actions = Actions;
243
+
244
+ export declare namespace PortalDomains {
245
+ export {
246
+ type CreatePortalDomainRequest as CreatePortalDomainRequest,
247
+ type DNSRecord as DNSRecord,
248
+ type ListDNSRecord as ListDNSRecord,
249
+ type ListPortalDomain as ListPortalDomain,
250
+ type PortalDomain as PortalDomain,
251
+ type PortalDomainDeleteResponse as PortalDomainDeleteResponse,
252
+ type PortalDomainCreateParams as PortalDomainCreateParams,
253
+ };
254
+
255
+ export { Actions as Actions };
256
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './portal-domains/index';
@@ -12,14 +12,38 @@ import {
12
12
  ListAccountIntegration,
13
13
  UpdateAccountIntegrationRequest,
14
14
  } from './integrations';
15
+ import * as PortalDomainsAPI from './portal-domains/portal-domains';
16
+ import {
17
+ CreatePortalDomainRequest,
18
+ DNSRecord,
19
+ ListDNSRecord,
20
+ ListPortalDomain,
21
+ PortalDomain,
22
+ PortalDomainCreateParams,
23
+ PortalDomainDeleteResponse,
24
+ PortalDomains,
25
+ } from './portal-domains/portal-domains';
15
26
 
16
27
  export class Settings extends APIResource {
28
+ portalDomains: PortalDomainsAPI.PortalDomains = new PortalDomainsAPI.PortalDomains(this._client);
17
29
  integrations: IntegrationsAPI.Integrations = new IntegrationsAPI.Integrations(this._client);
18
30
  }
19
31
 
32
+ Settings.PortalDomains = PortalDomains;
20
33
  Settings.Integrations = Integrations;
21
34
 
22
35
  export declare namespace Settings {
36
+ export {
37
+ PortalDomains as PortalDomains,
38
+ type CreatePortalDomainRequest as CreatePortalDomainRequest,
39
+ type DNSRecord as DNSRecord,
40
+ type ListDNSRecord as ListDNSRecord,
41
+ type ListPortalDomain as ListPortalDomain,
42
+ type PortalDomain as PortalDomain,
43
+ type PortalDomainDeleteResponse as PortalDomainDeleteResponse,
44
+ type PortalDomainCreateParams as PortalDomainCreateParams,
45
+ };
46
+
23
47
  export {
24
48
  Integrations as Integrations,
25
49
  type AccountIntegration as AccountIntegration,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.11.0'; // x-release-please-version
1
+ export const VERSION = '0.12.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.0";
1
+ export declare const VERSION = "0.12.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.0";
1
+ export declare const VERSION = "0.12.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.11.0'; // x-release-please-version
4
+ exports.VERSION = '0.12.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.11.0'; // x-release-please-version
1
+ export const VERSION = '0.12.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map