@getbrevo/brevo 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/cjs/BaseClient.d.ts +10 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +6 -0
  4. package/dist/cjs/Client.js +68 -58
  5. package/dist/cjs/api/errors/BadRequestError.js +1 -1
  6. package/dist/cjs/api/errors/ConflictError.js +1 -1
  7. package/dist/cjs/api/errors/ExpectationFailedError.js +1 -1
  8. package/dist/cjs/api/errors/FailedDependencyError.js +1 -1
  9. package/dist/cjs/api/errors/ForbiddenError.js +1 -1
  10. package/dist/cjs/api/errors/InternalServerError.js +1 -1
  11. package/dist/cjs/api/errors/MethodNotAllowedError.js +1 -1
  12. package/dist/cjs/api/errors/NotFoundError.js +1 -1
  13. package/dist/cjs/api/errors/PaymentRequiredError.js +1 -1
  14. package/dist/cjs/api/errors/PreconditionFailedError.js +1 -1
  15. package/dist/cjs/api/errors/TooEarlyError.js +1 -1
  16. package/dist/cjs/api/errors/TooManyRequestsError.js +1 -1
  17. package/dist/cjs/api/errors/UnauthorizedError.js +1 -1
  18. package/dist/cjs/api/errors/UnprocessableEntityError.js +1 -1
  19. package/dist/cjs/api/errors/UnsupportedMediaTypeError.js +1 -1
  20. package/dist/cjs/api/resources/balance/client/Client.d.ts +1 -1
  21. package/dist/cjs/api/resources/consentGroups/client/Client.d.ts +108 -0
  22. package/dist/cjs/api/resources/consentGroups/client/Client.js +383 -0
  23. package/dist/cjs/api/resources/consentGroups/client/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/consentGroups/client/index.js +17 -0
  25. package/dist/cjs/api/resources/consentGroups/client/requests/CreateConsentGroupRequest.d.ts +25 -0
  26. package/dist/cjs/api/resources/consentGroups/client/requests/CreateConsentGroupRequest.js +12 -0
  27. package/dist/cjs/api/resources/consentGroups/client/requests/DeleteConsentGroupRequest.d.ts +10 -0
  28. package/dist/cjs/api/resources/consentGroups/client/requests/DeleteConsentGroupRequest.js +3 -0
  29. package/dist/cjs/api/resources/consentGroups/client/requests/GetConsentGroupRequest.d.ts +10 -0
  30. package/dist/cjs/api/resources/consentGroups/client/requests/GetConsentGroupRequest.js +3 -0
  31. package/dist/cjs/api/resources/consentGroups/client/requests/GetConsentGroupsRequest.d.ts +17 -0
  32. package/dist/cjs/api/resources/consentGroups/client/requests/GetConsentGroupsRequest.js +3 -0
  33. package/dist/cjs/api/resources/consentGroups/client/requests/UpdateConsentGroupRequest.d.ts +24 -0
  34. package/dist/cjs/api/resources/consentGroups/client/requests/UpdateConsentGroupRequest.js +12 -0
  35. package/dist/cjs/api/resources/consentGroups/client/requests/index.d.ts +5 -0
  36. package/dist/cjs/api/resources/consentGroups/client/requests/index.js +7 -0
  37. package/dist/cjs/api/resources/consentGroups/exports.d.ts +2 -0
  38. package/dist/cjs/api/resources/consentGroups/exports.js +21 -0
  39. package/dist/cjs/api/resources/consentGroups/index.d.ts +2 -0
  40. package/dist/cjs/api/resources/consentGroups/index.js +18 -0
  41. package/dist/cjs/api/resources/consentGroups/types/GetConsentGroupsRequestSignupMode.d.ts +5 -0
  42. package/dist/cjs/api/resources/consentGroups/types/GetConsentGroupsRequestSignupMode.js +8 -0
  43. package/dist/cjs/api/resources/consentGroups/types/index.d.ts +1 -0
  44. package/dist/cjs/api/resources/consentGroups/types/index.js +17 -0
  45. package/dist/cjs/api/resources/contacts/client/requests/ImportContactsRequest.d.ts +2 -0
  46. package/dist/cjs/api/resources/contacts/types/GetContactInfoResponse.d.ts +4 -1
  47. package/dist/cjs/api/resources/contacts/types/GetContactStatsResponse.d.ts +1 -1
  48. package/dist/cjs/api/resources/deals/client/Client.js +4 -1
  49. package/dist/cjs/api/resources/deals/client/requests/GetCrmDealsRequest.d.ts +6 -0
  50. package/dist/cjs/api/resources/ecommerce/types/CreateBatchOrderResponse.d.ts +2 -2
  51. package/dist/cjs/api/resources/index.d.ts +5 -0
  52. package/dist/cjs/api/resources/index.js +6 -1
  53. package/dist/cjs/api/resources/transactionalEmails/types/GetTransacBlockedContactsResponse.d.ts +1 -1
  54. package/dist/cjs/api/resources/wallet/client/Client.d.ts +34 -0
  55. package/dist/cjs/api/resources/wallet/client/Client.js +126 -0
  56. package/dist/cjs/api/resources/wallet/client/index.d.ts +1 -0
  57. package/dist/cjs/api/resources/wallet/client/index.js +17 -0
  58. package/dist/cjs/api/resources/wallet/client/requests/GetWalletPassInstallUrlRequest.d.ts +13 -0
  59. package/dist/cjs/api/resources/wallet/client/requests/GetWalletPassInstallUrlRequest.js +3 -0
  60. package/dist/cjs/api/resources/wallet/client/requests/index.d.ts +1 -0
  61. package/dist/cjs/api/resources/wallet/client/requests/index.js +2 -0
  62. package/dist/cjs/api/resources/wallet/exports.d.ts +2 -0
  63. package/dist/cjs/api/resources/wallet/exports.js +21 -0
  64. package/dist/cjs/api/resources/wallet/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/wallet/index.js +17 -0
  66. package/dist/cjs/api/types/ConsentGroup.d.ts +29 -0
  67. package/dist/cjs/api/types/ConsentGroup.js +12 -0
  68. package/dist/cjs/api/types/ConsentGroupItem.d.ts +17 -0
  69. package/dist/cjs/api/types/ConsentGroupItem.js +12 -0
  70. package/dist/cjs/api/types/ConsentGroupsListResponse.d.ts +14 -0
  71. package/dist/cjs/api/types/ConsentGroupsListResponse.js +3 -0
  72. package/dist/cjs/api/types/GetCampaignStats.d.ts +11 -11
  73. package/dist/cjs/api/types/GetContactDetails.d.ts +3 -0
  74. package/dist/cjs/api/types/WalletPassInstallUrl.d.ts +4 -0
  75. package/dist/cjs/api/types/WalletPassInstallUrl.js +3 -0
  76. package/dist/cjs/api/types/index.d.ts +4 -0
  77. package/dist/cjs/api/types/index.js +4 -0
  78. package/dist/cjs/core/fetcher/getResponseBody.js +11 -0
  79. package/dist/cjs/core/fetcher/signals.js +9 -1
  80. package/dist/cjs/core/url/qs.js +2 -2
  81. package/dist/cjs/errors/BrevoError.d.ts +1 -0
  82. package/dist/cjs/errors/BrevoError.js +5 -1
  83. package/dist/cjs/errors/BrevoTimeoutError.d.ts +2 -2
  84. package/dist/cjs/errors/BrevoTimeoutError.js +40 -6
  85. package/dist/cjs/version.d.ts +1 -1
  86. package/dist/cjs/version.js +1 -1
  87. package/dist/esm/BaseClient.d.mts +10 -0
  88. package/dist/esm/BaseClient.mjs +2 -2
  89. package/dist/esm/Client.d.mts +6 -0
  90. package/dist/esm/Client.mjs +10 -0
  91. package/dist/esm/api/errors/BadRequestError.mjs +1 -1
  92. package/dist/esm/api/errors/ConflictError.mjs +1 -1
  93. package/dist/esm/api/errors/ExpectationFailedError.mjs +1 -1
  94. package/dist/esm/api/errors/FailedDependencyError.mjs +1 -1
  95. package/dist/esm/api/errors/ForbiddenError.mjs +1 -1
  96. package/dist/esm/api/errors/InternalServerError.mjs +1 -1
  97. package/dist/esm/api/errors/MethodNotAllowedError.mjs +1 -1
  98. package/dist/esm/api/errors/NotFoundError.mjs +1 -1
  99. package/dist/esm/api/errors/PaymentRequiredError.mjs +1 -1
  100. package/dist/esm/api/errors/PreconditionFailedError.mjs +1 -1
  101. package/dist/esm/api/errors/TooEarlyError.mjs +1 -1
  102. package/dist/esm/api/errors/TooManyRequestsError.mjs +1 -1
  103. package/dist/esm/api/errors/UnauthorizedError.mjs +1 -1
  104. package/dist/esm/api/errors/UnprocessableEntityError.mjs +1 -1
  105. package/dist/esm/api/errors/UnsupportedMediaTypeError.mjs +1 -1
  106. package/dist/esm/api/resources/balance/client/Client.d.mts +1 -1
  107. package/dist/esm/api/resources/consentGroups/client/Client.d.mts +108 -0
  108. package/dist/esm/api/resources/consentGroups/client/Client.mjs +346 -0
  109. package/dist/esm/api/resources/consentGroups/client/index.d.mts +1 -0
  110. package/dist/esm/api/resources/consentGroups/client/index.mjs +1 -0
  111. package/dist/esm/api/resources/consentGroups/client/requests/CreateConsentGroupRequest.d.mts +25 -0
  112. package/dist/esm/api/resources/consentGroups/client/requests/CreateConsentGroupRequest.mjs +9 -0
  113. package/dist/esm/api/resources/consentGroups/client/requests/DeleteConsentGroupRequest.d.mts +10 -0
  114. package/dist/esm/api/resources/consentGroups/client/requests/DeleteConsentGroupRequest.mjs +2 -0
  115. package/dist/esm/api/resources/consentGroups/client/requests/GetConsentGroupRequest.d.mts +10 -0
  116. package/dist/esm/api/resources/consentGroups/client/requests/GetConsentGroupRequest.mjs +2 -0
  117. package/dist/esm/api/resources/consentGroups/client/requests/GetConsentGroupsRequest.d.mts +17 -0
  118. package/dist/esm/api/resources/consentGroups/client/requests/GetConsentGroupsRequest.mjs +2 -0
  119. package/dist/esm/api/resources/consentGroups/client/requests/UpdateConsentGroupRequest.d.mts +24 -0
  120. package/dist/esm/api/resources/consentGroups/client/requests/UpdateConsentGroupRequest.mjs +9 -0
  121. package/dist/esm/api/resources/consentGroups/client/requests/index.d.mts +5 -0
  122. package/dist/esm/api/resources/consentGroups/client/requests/index.mjs +2 -0
  123. package/dist/esm/api/resources/consentGroups/exports.d.mts +2 -0
  124. package/dist/esm/api/resources/consentGroups/exports.mjs +3 -0
  125. package/dist/esm/api/resources/consentGroups/index.d.mts +2 -0
  126. package/dist/esm/api/resources/consentGroups/index.mjs +2 -0
  127. package/dist/esm/api/resources/consentGroups/types/GetConsentGroupsRequestSignupMode.d.mts +5 -0
  128. package/dist/esm/api/resources/consentGroups/types/GetConsentGroupsRequestSignupMode.mjs +5 -0
  129. package/dist/esm/api/resources/consentGroups/types/index.d.mts +1 -0
  130. package/dist/esm/api/resources/consentGroups/types/index.mjs +1 -0
  131. package/dist/esm/api/resources/contacts/client/requests/ImportContactsRequest.d.mts +2 -0
  132. package/dist/esm/api/resources/contacts/types/GetContactInfoResponse.d.mts +4 -1
  133. package/dist/esm/api/resources/contacts/types/GetContactStatsResponse.d.mts +1 -1
  134. package/dist/esm/api/resources/deals/client/Client.mjs +4 -1
  135. package/dist/esm/api/resources/deals/client/requests/GetCrmDealsRequest.d.mts +6 -0
  136. package/dist/esm/api/resources/ecommerce/types/CreateBatchOrderResponse.d.mts +2 -2
  137. package/dist/esm/api/resources/index.d.mts +5 -0
  138. package/dist/esm/api/resources/index.mjs +5 -0
  139. package/dist/esm/api/resources/transactionalEmails/types/GetTransacBlockedContactsResponse.d.mts +1 -1
  140. package/dist/esm/api/resources/wallet/client/Client.d.mts +34 -0
  141. package/dist/esm/api/resources/wallet/client/Client.mjs +89 -0
  142. package/dist/esm/api/resources/wallet/client/index.d.mts +1 -0
  143. package/dist/esm/api/resources/wallet/client/index.mjs +1 -0
  144. package/dist/esm/api/resources/wallet/client/requests/GetWalletPassInstallUrlRequest.d.mts +13 -0
  145. package/dist/esm/api/resources/wallet/client/requests/GetWalletPassInstallUrlRequest.mjs +2 -0
  146. package/dist/esm/api/resources/wallet/client/requests/index.d.mts +1 -0
  147. package/dist/esm/api/resources/wallet/client/requests/index.mjs +1 -0
  148. package/dist/esm/api/resources/wallet/exports.d.mts +2 -0
  149. package/dist/esm/api/resources/wallet/exports.mjs +3 -0
  150. package/dist/esm/api/resources/wallet/index.d.mts +1 -0
  151. package/dist/esm/api/resources/wallet/index.mjs +1 -0
  152. package/dist/esm/api/types/ConsentGroup.d.mts +29 -0
  153. package/dist/esm/api/types/ConsentGroup.mjs +9 -0
  154. package/dist/esm/api/types/ConsentGroupItem.d.mts +17 -0
  155. package/dist/esm/api/types/ConsentGroupItem.mjs +9 -0
  156. package/dist/esm/api/types/ConsentGroupsListResponse.d.mts +14 -0
  157. package/dist/esm/api/types/ConsentGroupsListResponse.mjs +2 -0
  158. package/dist/esm/api/types/GetCampaignStats.d.mts +11 -11
  159. package/dist/esm/api/types/GetContactDetails.d.mts +3 -0
  160. package/dist/esm/api/types/WalletPassInstallUrl.d.mts +4 -0
  161. package/dist/esm/api/types/WalletPassInstallUrl.mjs +2 -0
  162. package/dist/esm/api/types/index.d.mts +4 -0
  163. package/dist/esm/api/types/index.mjs +4 -0
  164. package/dist/esm/core/fetcher/getResponseBody.mjs +11 -0
  165. package/dist/esm/core/fetcher/signals.mjs +9 -1
  166. package/dist/esm/core/url/qs.mjs +2 -2
  167. package/dist/esm/errors/BrevoError.d.mts +1 -0
  168. package/dist/esm/errors/BrevoError.mjs +5 -1
  169. package/dist/esm/errors/BrevoTimeoutError.d.mts +2 -2
  170. package/dist/esm/errors/BrevoTimeoutError.mjs +7 -6
  171. package/dist/esm/version.d.mts +1 -1
  172. package/dist/esm/version.mjs +1 -1
  173. package/package.json +23 -1
  174. package/reference.md +403 -1
@@ -0,0 +1,383 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.ConsentGroupsClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
59
+ const headers_js_1 = require("../../../../core/headers.js");
60
+ const core = __importStar(require("../../../../core/index.js"));
61
+ const environments = __importStar(require("../../../../environments.js"));
62
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
63
+ const errors = __importStar(require("../../../../errors/index.js"));
64
+ const Brevo = __importStar(require("../../../index.js"));
65
+ class ConsentGroupsClient {
66
+ constructor(options) {
67
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
+ }
69
+ /**
70
+ * Returns a paginated list of consent groups for the account.
71
+ *
72
+ * <Note>This endpoint is only available when the Consent Groups feature is enabled for your account. Returns `403` if the feature is not activated.</Note>
73
+ *
74
+ * @param {Brevo.GetConsentGroupsRequest} request
75
+ * @param {ConsentGroupsClient.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link Brevo.BadRequestError}
78
+ * @throws {@link Brevo.ForbiddenError}
79
+ * @throws {@link Brevo.TooManyRequestsError}
80
+ *
81
+ * @example
82
+ * await client.consentGroups.getConsentGroups()
83
+ */
84
+ getConsentGroups(request = {}, requestOptions) {
85
+ return core.HttpResponsePromise.fromPromise(this.__getConsentGroups(request, requestOptions));
86
+ }
87
+ __getConsentGroups() {
88
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
89
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
90
+ const { limit, offset, id, name, signupMode } = request;
91
+ const _queryParams = {
92
+ limit,
93
+ offset,
94
+ id,
95
+ name,
96
+ signupMode: signupMode != null ? signupMode : undefined,
97
+ };
98
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
99
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
100
+ const _response = yield core.fetcher({
101
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, "contacts/consent-groups"),
102
+ method: "GET",
103
+ headers: _headers,
104
+ queryString: core.url
105
+ .queryBuilder()
106
+ .addMany(_queryParams)
107
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
108
+ .build(),
109
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
110
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
111
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
112
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
113
+ logging: this._options.logging,
114
+ });
115
+ if (_response.ok) {
116
+ return { data: _response.body, rawResponse: _response.rawResponse };
117
+ }
118
+ if (_response.error.reason === "status-code") {
119
+ switch (_response.error.statusCode) {
120
+ case 400:
121
+ throw new Brevo.BadRequestError(_response.error.body, _response.rawResponse);
122
+ case 403:
123
+ throw new Brevo.ForbiddenError(_response.error.body, _response.rawResponse);
124
+ case 429:
125
+ throw new Brevo.TooManyRequestsError(_response.error.body, _response.rawResponse);
126
+ default:
127
+ throw new errors.BrevoError({
128
+ statusCode: _response.error.statusCode,
129
+ body: _response.error.body,
130
+ rawResponse: _response.rawResponse,
131
+ });
132
+ }
133
+ }
134
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/contacts/consent-groups");
135
+ });
136
+ }
137
+ /**
138
+ * Creates a new consent group for the account.
139
+ *
140
+ * <Note>This endpoint is only available when the Consent Groups feature is enabled for your account.</Note>
141
+ *
142
+ * @param {Brevo.CreateConsentGroupRequest} request
143
+ * @param {ConsentGroupsClient.RequestOptions} requestOptions - Request-specific configuration.
144
+ *
145
+ * @throws {@link Brevo.BadRequestError}
146
+ * @throws {@link Brevo.ForbiddenError}
147
+ * @throws {@link Brevo.ConflictError}
148
+ *
149
+ * @example
150
+ * await client.consentGroups.createConsentGroup({
151
+ * name: "Newsletter EU",
152
+ * signupMode: "manual"
153
+ * })
154
+ */
155
+ createConsentGroup(request, requestOptions) {
156
+ return core.HttpResponsePromise.fromPromise(this.__createConsentGroup(request, requestOptions));
157
+ }
158
+ __createConsentGroup(request, requestOptions) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
161
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
162
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
163
+ const _response = yield core.fetcher({
164
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, "contacts/consent-groups"),
165
+ method: "POST",
166
+ headers: _headers,
167
+ contentType: "application/json",
168
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
169
+ requestType: "json",
170
+ body: request,
171
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
172
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
173
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
174
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
175
+ logging: this._options.logging,
176
+ });
177
+ if (_response.ok) {
178
+ return { data: _response.body, rawResponse: _response.rawResponse };
179
+ }
180
+ if (_response.error.reason === "status-code") {
181
+ switch (_response.error.statusCode) {
182
+ case 400:
183
+ throw new Brevo.BadRequestError(_response.error.body, _response.rawResponse);
184
+ case 403:
185
+ throw new Brevo.ForbiddenError(_response.error.body, _response.rawResponse);
186
+ case 409:
187
+ throw new Brevo.ConflictError(_response.error.body, _response.rawResponse);
188
+ default:
189
+ throw new errors.BrevoError({
190
+ statusCode: _response.error.statusCode,
191
+ body: _response.error.body,
192
+ rawResponse: _response.rawResponse,
193
+ });
194
+ }
195
+ }
196
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/contacts/consent-groups");
197
+ });
198
+ }
199
+ /**
200
+ * Returns a single consent group by ID for the account.
201
+ *
202
+ * <Note>This endpoint is only available when the Consent Groups feature is enabled for your account.</Note>
203
+ *
204
+ * @param {Brevo.GetConsentGroupRequest} request
205
+ * @param {ConsentGroupsClient.RequestOptions} requestOptions - Request-specific configuration.
206
+ *
207
+ * @throws {@link Brevo.BadRequestError}
208
+ * @throws {@link Brevo.ForbiddenError}
209
+ * @throws {@link Brevo.NotFoundError}
210
+ *
211
+ * @example
212
+ * await client.consentGroups.getConsentGroup({
213
+ * id: 1000000
214
+ * })
215
+ */
216
+ getConsentGroup(request, requestOptions) {
217
+ return core.HttpResponsePromise.fromPromise(this.__getConsentGroup(request, requestOptions));
218
+ }
219
+ __getConsentGroup(request, requestOptions) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
222
+ const { id } = request;
223
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
224
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
225
+ const _response = yield core.fetcher({
226
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `contacts/consent-groups/${core.url.encodePathParam(id)}`),
227
+ method: "GET",
228
+ headers: _headers,
229
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
230
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
231
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
232
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
233
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
234
+ logging: this._options.logging,
235
+ });
236
+ if (_response.ok) {
237
+ return { data: _response.body, rawResponse: _response.rawResponse };
238
+ }
239
+ if (_response.error.reason === "status-code") {
240
+ switch (_response.error.statusCode) {
241
+ case 400:
242
+ throw new Brevo.BadRequestError(_response.error.body, _response.rawResponse);
243
+ case 403:
244
+ throw new Brevo.ForbiddenError(_response.error.body, _response.rawResponse);
245
+ case 404:
246
+ throw new Brevo.NotFoundError(_response.error.body, _response.rawResponse);
247
+ default:
248
+ throw new errors.BrevoError({
249
+ statusCode: _response.error.statusCode,
250
+ body: _response.error.body,
251
+ rawResponse: _response.rawResponse,
252
+ });
253
+ }
254
+ }
255
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/contacts/consent-groups/{id}");
256
+ });
257
+ }
258
+ /**
259
+ * Updates name, description, or signupMode of a consent group. At least one field must be provided.
260
+ *
261
+ * <Note>This endpoint is only available when the Consent Groups feature is enabled for your account.</Note>
262
+ *
263
+ * @param {Brevo.UpdateConsentGroupRequest} request
264
+ * @param {ConsentGroupsClient.RequestOptions} requestOptions - Request-specific configuration.
265
+ *
266
+ * @throws {@link Brevo.BadRequestError}
267
+ * @throws {@link Brevo.ForbiddenError}
268
+ * @throws {@link Brevo.NotFoundError}
269
+ * @throws {@link Brevo.ConflictError}
270
+ *
271
+ * @example
272
+ * await client.consentGroups.updateConsentGroup({
273
+ * id: 1000000
274
+ * })
275
+ */
276
+ updateConsentGroup(request, requestOptions) {
277
+ return core.HttpResponsePromise.fromPromise(this.__updateConsentGroup(request, requestOptions));
278
+ }
279
+ __updateConsentGroup(request, requestOptions) {
280
+ return __awaiter(this, void 0, void 0, function* () {
281
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
282
+ const { id } = request, _body = __rest(request, ["id"]);
283
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
284
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
285
+ const _response = yield core.fetcher({
286
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `contacts/consent-groups/${core.url.encodePathParam(id)}`),
287
+ method: "PUT",
288
+ headers: _headers,
289
+ contentType: "application/json",
290
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
291
+ requestType: "json",
292
+ body: _body,
293
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
294
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
295
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
296
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
297
+ logging: this._options.logging,
298
+ });
299
+ if (_response.ok) {
300
+ return { data: _response.body, rawResponse: _response.rawResponse };
301
+ }
302
+ if (_response.error.reason === "status-code") {
303
+ switch (_response.error.statusCode) {
304
+ case 400:
305
+ throw new Brevo.BadRequestError(_response.error.body, _response.rawResponse);
306
+ case 403:
307
+ throw new Brevo.ForbiddenError(_response.error.body, _response.rawResponse);
308
+ case 404:
309
+ throw new Brevo.NotFoundError(_response.error.body, _response.rawResponse);
310
+ case 409:
311
+ throw new Brevo.ConflictError(_response.error.body, _response.rawResponse);
312
+ default:
313
+ throw new errors.BrevoError({
314
+ statusCode: _response.error.statusCode,
315
+ body: _response.error.body,
316
+ rawResponse: _response.rawResponse,
317
+ });
318
+ }
319
+ }
320
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/contacts/consent-groups/{id}");
321
+ });
322
+ }
323
+ /**
324
+ * Deletes a consent group by ID and removes it from all associated contacts.
325
+ *
326
+ * <Note>This endpoint is only available when the Consent Groups feature is enabled for your account.</Note>
327
+ *
328
+ * @param {Brevo.DeleteConsentGroupRequest} request
329
+ * @param {ConsentGroupsClient.RequestOptions} requestOptions - Request-specific configuration.
330
+ *
331
+ * @throws {@link Brevo.BadRequestError}
332
+ * @throws {@link Brevo.ForbiddenError}
333
+ * @throws {@link Brevo.NotFoundError}
334
+ *
335
+ * @example
336
+ * await client.consentGroups.deleteConsentGroup({
337
+ * id: 1000000
338
+ * })
339
+ */
340
+ deleteConsentGroup(request, requestOptions) {
341
+ return core.HttpResponsePromise.fromPromise(this.__deleteConsentGroup(request, requestOptions));
342
+ }
343
+ __deleteConsentGroup(request, requestOptions) {
344
+ return __awaiter(this, void 0, void 0, function* () {
345
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
346
+ const { id } = request;
347
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
348
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
349
+ const _response = yield core.fetcher({
350
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrevoEnvironment.Default, `contacts/consent-groups/${core.url.encodePathParam(id)}`),
351
+ method: "DELETE",
352
+ headers: _headers,
353
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
354
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
355
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
356
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
357
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
358
+ logging: this._options.logging,
359
+ });
360
+ if (_response.ok) {
361
+ return { data: undefined, rawResponse: _response.rawResponse };
362
+ }
363
+ if (_response.error.reason === "status-code") {
364
+ switch (_response.error.statusCode) {
365
+ case 400:
366
+ throw new Brevo.BadRequestError(_response.error.body, _response.rawResponse);
367
+ case 403:
368
+ throw new Brevo.ForbiddenError(_response.error.body, _response.rawResponse);
369
+ case 404:
370
+ throw new Brevo.NotFoundError(_response.error.body, _response.rawResponse);
371
+ default:
372
+ throw new errors.BrevoError({
373
+ statusCode: _response.error.statusCode,
374
+ body: _response.error.body,
375
+ rawResponse: _response.rawResponse,
376
+ });
377
+ }
378
+ }
379
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/contacts/consent-groups/{id}");
380
+ });
381
+ }
382
+ }
383
+ exports.ConsentGroupsClient = ConsentGroupsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * name: "Newsletter EU",
5
+ * signupMode: "manual"
6
+ * }
7
+ */
8
+ export interface CreateConsentGroupRequest {
9
+ /** Unique name for the consent group (max 255 characters) */
10
+ name: string;
11
+ /** Optional description (max 500 characters) */
12
+ description?: string;
13
+ /** Controls how contacts are added to the group. `manual` — contacts are added explicitly via the API. `automatic` — contacts are added automatically at signup. */
14
+ signupMode: CreateConsentGroupRequest.SignupMode;
15
+ /** Optional list of contact list IDs. Contacts from these lists will be copied once into this consent group at creation time. */
16
+ listIds?: number[];
17
+ }
18
+ export declare namespace CreateConsentGroupRequest {
19
+ /** Controls how contacts are added to the group. `manual` — contacts are added explicitly via the API. `automatic` — contacts are added automatically at signup. */
20
+ const SignupMode: {
21
+ readonly Manual: "manual";
22
+ readonly Automatic: "automatic";
23
+ };
24
+ type SignupMode = (typeof SignupMode)[keyof typeof SignupMode];
25
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CreateConsentGroupRequest = void 0;
5
+ var CreateConsentGroupRequest;
6
+ (function (CreateConsentGroupRequest) {
7
+ /** Controls how contacts are added to the group. `manual` — contacts are added explicitly via the API. `automatic` — contacts are added automatically at signup. */
8
+ CreateConsentGroupRequest.SignupMode = {
9
+ Manual: "manual",
10
+ Automatic: "automatic",
11
+ };
12
+ })(CreateConsentGroupRequest || (exports.CreateConsentGroupRequest = CreateConsentGroupRequest = {}));
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: 1000000
5
+ * }
6
+ */
7
+ export interface DeleteConsentGroupRequest {
8
+ /** ID of the consent group to delete */
9
+ id: number;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: 1000000
5
+ * }
6
+ */
7
+ export interface GetConsentGroupRequest {
8
+ /** ID of the consent group */
9
+ id: number;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import type * as Brevo from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface GetConsentGroupsRequest {
7
+ /** Maximum number of results to return (default 10, max 50) */
8
+ limit?: number;
9
+ /** Number of results to skip (default 0) */
10
+ offset?: number;
11
+ /** Filter by consent group ID */
12
+ id?: number;
13
+ /** Filter by name (case-insensitive partial match) */
14
+ name?: string;
15
+ /** Filter by signup mode */
16
+ signupMode?: Brevo.GetConsentGroupsRequestSignupMode;
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: 1000000
5
+ * }
6
+ */
7
+ export interface UpdateConsentGroupRequest {
8
+ /** ID of the consent group to update */
9
+ id: number;
10
+ /** New name for the consent group (max 255 characters) */
11
+ name?: string;
12
+ /** New description (max 500 characters) */
13
+ description?: string;
14
+ /** New signup mode */
15
+ signupMode?: UpdateConsentGroupRequest.SignupMode;
16
+ }
17
+ export declare namespace UpdateConsentGroupRequest {
18
+ /** New signup mode */
19
+ const SignupMode: {
20
+ readonly Manual: "manual";
21
+ readonly Automatic: "automatic";
22
+ };
23
+ type SignupMode = (typeof SignupMode)[keyof typeof SignupMode];
24
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UpdateConsentGroupRequest = void 0;
5
+ var UpdateConsentGroupRequest;
6
+ (function (UpdateConsentGroupRequest) {
7
+ /** New signup mode */
8
+ UpdateConsentGroupRequest.SignupMode = {
9
+ Manual: "manual",
10
+ Automatic: "automatic",
11
+ };
12
+ })(UpdateConsentGroupRequest || (exports.UpdateConsentGroupRequest = UpdateConsentGroupRequest = {}));
@@ -0,0 +1,5 @@
1
+ export { CreateConsentGroupRequest } from "./CreateConsentGroupRequest.js";
2
+ export type { DeleteConsentGroupRequest } from "./DeleteConsentGroupRequest.js";
3
+ export type { GetConsentGroupRequest } from "./GetConsentGroupRequest.js";
4
+ export type { GetConsentGroupsRequest } from "./GetConsentGroupsRequest.js";
5
+ export { UpdateConsentGroupRequest } from "./UpdateConsentGroupRequest.js";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateConsentGroupRequest = exports.CreateConsentGroupRequest = void 0;
4
+ var CreateConsentGroupRequest_js_1 = require("./CreateConsentGroupRequest.js");
5
+ Object.defineProperty(exports, "CreateConsentGroupRequest", { enumerable: true, get: function () { return CreateConsentGroupRequest_js_1.CreateConsentGroupRequest; } });
6
+ var UpdateConsentGroupRequest_js_1 = require("./UpdateConsentGroupRequest.js");
7
+ Object.defineProperty(exports, "UpdateConsentGroupRequest", { enumerable: true, get: function () { return UpdateConsentGroupRequest_js_1.UpdateConsentGroupRequest; } });
@@ -0,0 +1,2 @@
1
+ export { ConsentGroupsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ConsentGroupsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "ConsentGroupsClient", { enumerable: true, get: function () { return Client_js_1.ConsentGroupsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,5 @@
1
+ export declare const GetConsentGroupsRequestSignupMode: {
2
+ readonly Manual: "manual";
3
+ readonly Automatic: "automatic";
4
+ };
5
+ export type GetConsentGroupsRequestSignupMode = (typeof GetConsentGroupsRequestSignupMode)[keyof typeof GetConsentGroupsRequestSignupMode];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.GetConsentGroupsRequestSignupMode = void 0;
5
+ exports.GetConsentGroupsRequestSignupMode = {
6
+ Manual: "manual",
7
+ Automatic: "automatic",
8
+ };
@@ -0,0 +1 @@
1
+ export * from "./GetConsentGroupsRequestSignupMode.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./GetConsentGroupsRequestSignupMode.js"), exports);