@unified-api/typescript-sdk 2.83.42 → 2.83.43

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 (144) hide show
  1. package/README.md +4 -0
  2. package/dist/commonjs/funcs/adsGetAdsPromoted.d.ts +15 -0
  3. package/dist/commonjs/funcs/adsGetAdsPromoted.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/adsGetAdsPromoted.js +126 -0
  5. package/dist/commonjs/funcs/adsGetAdsPromoted.js.map +1 -0
  6. package/dist/commonjs/funcs/adsGetAdsTarget.d.ts +15 -0
  7. package/dist/commonjs/funcs/adsGetAdsTarget.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/adsGetAdsTarget.js +126 -0
  9. package/dist/commonjs/funcs/adsGetAdsTarget.js.map +1 -0
  10. package/dist/commonjs/funcs/adsListAdsCampaigns.js +2 -0
  11. package/dist/commonjs/funcs/adsListAdsCampaigns.js.map +1 -1
  12. package/dist/commonjs/funcs/adsListAdsGroups.js +2 -0
  13. package/dist/commonjs/funcs/adsListAdsGroups.js.map +1 -1
  14. package/dist/commonjs/lib/config.d.ts +2 -2
  15. package/dist/commonjs/lib/config.js +2 -2
  16. package/dist/commonjs/sdk/ads.d.ts +8 -0
  17. package/dist/commonjs/sdk/ads.d.ts.map +1 -1
  18. package/dist/commonjs/sdk/ads.js +14 -0
  19. package/dist/commonjs/sdk/ads.js.map +1 -1
  20. package/dist/commonjs/sdk/models/operations/getadspromoted.d.ts +40 -0
  21. package/dist/commonjs/sdk/models/operations/getadspromoted.d.ts.map +1 -0
  22. package/dist/commonjs/sdk/models/operations/getadspromoted.js +65 -0
  23. package/dist/commonjs/sdk/models/operations/getadspromoted.js.map +1 -0
  24. package/dist/commonjs/sdk/models/operations/getadstarget.d.ts +42 -0
  25. package/dist/commonjs/sdk/models/operations/getadstarget.d.ts.map +1 -0
  26. package/dist/commonjs/sdk/models/operations/getadstarget.js +67 -0
  27. package/dist/commonjs/sdk/models/operations/getadstarget.js.map +1 -0
  28. package/dist/commonjs/sdk/models/operations/index.d.ts +2 -0
  29. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/models/operations/index.js +2 -0
  31. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  32. package/dist/commonjs/sdk/models/operations/listadscampaigns.d.ts +10 -0
  33. package/dist/commonjs/sdk/models/operations/listadscampaigns.d.ts.map +1 -1
  34. package/dist/commonjs/sdk/models/operations/listadscampaigns.js +4 -0
  35. package/dist/commonjs/sdk/models/operations/listadscampaigns.js.map +1 -1
  36. package/dist/commonjs/sdk/models/operations/listadsgroups.d.ts +10 -0
  37. package/dist/commonjs/sdk/models/operations/listadsgroups.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/models/operations/listadsgroups.js +4 -0
  39. package/dist/commonjs/sdk/models/operations/listadsgroups.js.map +1 -1
  40. package/dist/commonjs/sdk/models/operations/listadspromoteds.d.ts +1 -0
  41. package/dist/commonjs/sdk/models/operations/listadspromoteds.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/models/operations/listadspromoteds.js +1 -0
  43. package/dist/commonjs/sdk/models/operations/listadspromoteds.js.map +1 -1
  44. package/dist/commonjs/sdk/models/operations/listadstargets.d.ts +2 -1
  45. package/dist/commonjs/sdk/models/operations/listadstargets.d.ts.map +1 -1
  46. package/dist/commonjs/sdk/models/operations/listadstargets.js +2 -1
  47. package/dist/commonjs/sdk/models/operations/listadstargets.js.map +1 -1
  48. package/dist/commonjs/sdk/models/shared/adspromoted.d.ts +6 -0
  49. package/dist/commonjs/sdk/models/shared/adspromoted.d.ts.map +1 -1
  50. package/dist/commonjs/sdk/models/shared/adspromoted.js +2 -0
  51. package/dist/commonjs/sdk/models/shared/adspromoted.js.map +1 -1
  52. package/dist/commonjs/sdk/models/shared/adstarget.d.ts +17 -13
  53. package/dist/commonjs/sdk/models/shared/adstarget.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/models/shared/adstarget.js +23 -13
  55. package/dist/commonjs/sdk/models/shared/adstarget.js.map +1 -1
  56. package/dist/commonjs/sdk/promoted.d.ts +4 -0
  57. package/dist/commonjs/sdk/promoted.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/promoted.js +7 -0
  59. package/dist/commonjs/sdk/promoted.js.map +1 -1
  60. package/dist/commonjs/sdk/target.d.ts +4 -0
  61. package/dist/commonjs/sdk/target.d.ts.map +1 -1
  62. package/dist/commonjs/sdk/target.js +7 -0
  63. package/dist/commonjs/sdk/target.js.map +1 -1
  64. package/dist/esm/funcs/adsGetAdsPromoted.d.ts +15 -0
  65. package/dist/esm/funcs/adsGetAdsPromoted.d.ts.map +1 -0
  66. package/dist/esm/funcs/adsGetAdsPromoted.js +90 -0
  67. package/dist/esm/funcs/adsGetAdsPromoted.js.map +1 -0
  68. package/dist/esm/funcs/adsGetAdsTarget.d.ts +15 -0
  69. package/dist/esm/funcs/adsGetAdsTarget.d.ts.map +1 -0
  70. package/dist/esm/funcs/adsGetAdsTarget.js +90 -0
  71. package/dist/esm/funcs/adsGetAdsTarget.js.map +1 -0
  72. package/dist/esm/funcs/adsListAdsCampaigns.js +2 -0
  73. package/dist/esm/funcs/adsListAdsCampaigns.js.map +1 -1
  74. package/dist/esm/funcs/adsListAdsGroups.js +2 -0
  75. package/dist/esm/funcs/adsListAdsGroups.js.map +1 -1
  76. package/dist/esm/lib/config.d.ts +2 -2
  77. package/dist/esm/lib/config.js +2 -2
  78. package/dist/esm/sdk/ads.d.ts +8 -0
  79. package/dist/esm/sdk/ads.d.ts.map +1 -1
  80. package/dist/esm/sdk/ads.js +14 -0
  81. package/dist/esm/sdk/ads.js.map +1 -1
  82. package/dist/esm/sdk/models/operations/getadspromoted.d.ts +40 -0
  83. package/dist/esm/sdk/models/operations/getadspromoted.d.ts.map +1 -0
  84. package/dist/esm/sdk/models/operations/getadspromoted.js +28 -0
  85. package/dist/esm/sdk/models/operations/getadspromoted.js.map +1 -0
  86. package/dist/esm/sdk/models/operations/getadstarget.d.ts +42 -0
  87. package/dist/esm/sdk/models/operations/getadstarget.d.ts.map +1 -0
  88. package/dist/esm/sdk/models/operations/getadstarget.js +30 -0
  89. package/dist/esm/sdk/models/operations/getadstarget.js.map +1 -0
  90. package/dist/esm/sdk/models/operations/index.d.ts +2 -0
  91. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  92. package/dist/esm/sdk/models/operations/index.js +2 -0
  93. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  94. package/dist/esm/sdk/models/operations/listadscampaigns.d.ts +10 -0
  95. package/dist/esm/sdk/models/operations/listadscampaigns.d.ts.map +1 -1
  96. package/dist/esm/sdk/models/operations/listadscampaigns.js +4 -0
  97. package/dist/esm/sdk/models/operations/listadscampaigns.js.map +1 -1
  98. package/dist/esm/sdk/models/operations/listadsgroups.d.ts +10 -0
  99. package/dist/esm/sdk/models/operations/listadsgroups.d.ts.map +1 -1
  100. package/dist/esm/sdk/models/operations/listadsgroups.js +4 -0
  101. package/dist/esm/sdk/models/operations/listadsgroups.js.map +1 -1
  102. package/dist/esm/sdk/models/operations/listadspromoteds.d.ts +1 -0
  103. package/dist/esm/sdk/models/operations/listadspromoteds.d.ts.map +1 -1
  104. package/dist/esm/sdk/models/operations/listadspromoteds.js +1 -0
  105. package/dist/esm/sdk/models/operations/listadspromoteds.js.map +1 -1
  106. package/dist/esm/sdk/models/operations/listadstargets.d.ts +2 -1
  107. package/dist/esm/sdk/models/operations/listadstargets.d.ts.map +1 -1
  108. package/dist/esm/sdk/models/operations/listadstargets.js +2 -1
  109. package/dist/esm/sdk/models/operations/listadstargets.js.map +1 -1
  110. package/dist/esm/sdk/models/shared/adspromoted.d.ts +6 -0
  111. package/dist/esm/sdk/models/shared/adspromoted.d.ts.map +1 -1
  112. package/dist/esm/sdk/models/shared/adspromoted.js +2 -0
  113. package/dist/esm/sdk/models/shared/adspromoted.js.map +1 -1
  114. package/dist/esm/sdk/models/shared/adstarget.d.ts +17 -13
  115. package/dist/esm/sdk/models/shared/adstarget.d.ts.map +1 -1
  116. package/dist/esm/sdk/models/shared/adstarget.js +23 -13
  117. package/dist/esm/sdk/models/shared/adstarget.js.map +1 -1
  118. package/dist/esm/sdk/promoted.d.ts +4 -0
  119. package/dist/esm/sdk/promoted.d.ts.map +1 -1
  120. package/dist/esm/sdk/promoted.js +7 -0
  121. package/dist/esm/sdk/promoted.js.map +1 -1
  122. package/dist/esm/sdk/target.d.ts +4 -0
  123. package/dist/esm/sdk/target.d.ts.map +1 -1
  124. package/dist/esm/sdk/target.js +7 -0
  125. package/dist/esm/sdk/target.js.map +1 -1
  126. package/jsr.json +1 -1
  127. package/package.json +1 -1
  128. package/src/funcs/adsGetAdsPromoted.ts +174 -0
  129. package/src/funcs/adsGetAdsTarget.ts +174 -0
  130. package/src/funcs/adsListAdsCampaigns.ts +2 -0
  131. package/src/funcs/adsListAdsGroups.ts +2 -0
  132. package/src/lib/config.ts +2 -2
  133. package/src/sdk/ads.ts +30 -0
  134. package/src/sdk/models/operations/getadspromoted.ts +73 -0
  135. package/src/sdk/models/operations/getadstarget.ts +75 -0
  136. package/src/sdk/models/operations/index.ts +2 -0
  137. package/src/sdk/models/operations/listadscampaigns.ts +14 -0
  138. package/src/sdk/models/operations/listadsgroups.ts +14 -0
  139. package/src/sdk/models/operations/listadspromoteds.ts +1 -0
  140. package/src/sdk/models/operations/listadstargets.ts +2 -1
  141. package/src/sdk/models/shared/adspromoted.ts +4 -0
  142. package/src/sdk/models/shared/adstarget.ts +25 -14
  143. package/src/sdk/promoted.ts +15 -0
  144. package/src/sdk/target.ts +15 -0
@@ -0,0 +1,174 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { UnifiedToCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../sdk/models/errors/httpclienterrors.js";
21
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
22
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
23
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
24
+ import * as operations from "../sdk/models/operations/index.js";
25
+ import * as shared from "../sdk/models/shared/index.js";
26
+ import { APICall, APIPromise } from "../sdk/types/async.js";
27
+ import { Result } from "../sdk/types/fp.js";
28
+
29
+ /**
30
+ * Retrieve a target
31
+ */
32
+ export function adsGetAdsTarget(
33
+ client: UnifiedToCore,
34
+ request: operations.GetAdsTargetRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ shared.AdsTarget,
39
+ | UnifiedToError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ request,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: UnifiedToCore,
58
+ request: operations.GetAdsTargetRequest,
59
+ options?: RequestOptions,
60
+ ): Promise<
61
+ [
62
+ Result<
63
+ shared.AdsTarget,
64
+ | UnifiedToError
65
+ | ResponseValidationError
66
+ | ConnectionError
67
+ | RequestAbortedError
68
+ | RequestTimeoutError
69
+ | InvalidRequestError
70
+ | UnexpectedClientError
71
+ | SDKValidationError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed = safeParse(
77
+ request,
78
+ (value) => operations.GetAdsTargetRequest$outboundSchema.parse(value),
79
+ "Input validation failed",
80
+ );
81
+ if (!parsed.ok) {
82
+ return [parsed, { status: "invalid" }];
83
+ }
84
+ const payload = parsed.value;
85
+ const body = null;
86
+
87
+ const pathParams = {
88
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
89
+ explode: false,
90
+ charEncoding: "percent",
91
+ }),
92
+ id: encodeSimple("id", payload.id, {
93
+ explode: false,
94
+ charEncoding: "percent",
95
+ }),
96
+ };
97
+ const path = pathToFunc("/ads/{connection_id}/target/{id}")(pathParams);
98
+
99
+ const query = encodeFormQuery({
100
+ "fields": payload.fields,
101
+ "raw": payload.raw,
102
+ });
103
+
104
+ const headers = new Headers(compactMap({
105
+ Accept: "application/json",
106
+ }));
107
+
108
+ const securityInput = await extractSecurity(client._options.security);
109
+ const requestSecurity = resolveGlobalSecurity(securityInput);
110
+
111
+ const context = {
112
+ options: client._options,
113
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
114
+ operationID: "getAdsTarget",
115
+ oAuth2Scopes: null,
116
+
117
+ resolvedSecurity: requestSecurity,
118
+
119
+ securitySource: client._options.security,
120
+ retryConfig: options?.retries
121
+ || client._options.retryConfig
122
+ || { strategy: "none" },
123
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
124
+ };
125
+
126
+ const requestRes = client._createRequest(context, {
127
+ security: requestSecurity,
128
+ method: "GET",
129
+ baseURL: options?.serverURL,
130
+ path: path,
131
+ headers: headers,
132
+ query: query,
133
+ body: body,
134
+ userAgent: client._options.userAgent,
135
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req = requestRes.value;
141
+
142
+ const doResult = await client._do(req, {
143
+ context,
144
+ isErrorStatusCode: (statusCode: number) =>
145
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
146
+ retryConfig: context.retryConfig,
147
+ retryCodes: context.retryCodes,
148
+ });
149
+ if (!doResult.ok) {
150
+ return [doResult, { status: "request-error", request: req }];
151
+ }
152
+ const response = doResult.value;
153
+
154
+ const [result] = await M.match<
155
+ shared.AdsTarget,
156
+ | UnifiedToError
157
+ | ResponseValidationError
158
+ | ConnectionError
159
+ | RequestAbortedError
160
+ | RequestTimeoutError
161
+ | InvalidRequestError
162
+ | UnexpectedClientError
163
+ | SDKValidationError
164
+ >(
165
+ M.json(200, shared.AdsTarget$inboundSchema),
166
+ M.fail("4XX"),
167
+ M.fail("5XX"),
168
+ )(response, req);
169
+ if (!result.ok) {
170
+ return [result, { status: "complete", request: req, response }];
171
+ }
172
+
173
+ return [result, { status: "complete", request: req, response }];
174
+ }
@@ -94,6 +94,7 @@ async function $do(
94
94
  const path = pathToFunc("/ads/{connection_id}/campaign")(pathParams);
95
95
 
96
96
  const query = encodeFormQuery({
97
+ "end_lt": payload.end_lt,
97
98
  "fields": payload.fields,
98
99
  "limit": payload.limit,
99
100
  "offset": payload.offset,
@@ -102,6 +103,7 @@ async function $do(
102
103
  "query": payload.query,
103
104
  "raw": payload.raw,
104
105
  "sort": payload.sort,
106
+ "start_gte": payload.start_gte,
105
107
  "updated_gte": payload.updated_gte,
106
108
  });
107
109
 
@@ -95,6 +95,7 @@ async function $do(
95
95
 
96
96
  const query = encodeFormQuery({
97
97
  "campaign_id": payload.campaign_id,
98
+ "end_lt": payload.end_lt,
98
99
  "fields": payload.fields,
99
100
  "io_id": payload.io_id,
100
101
  "limit": payload.limit,
@@ -105,6 +106,7 @@ async function $do(
105
106
  "query": payload.query,
106
107
  "raw": payload.raw,
107
108
  "sort": payload.sort,
109
+ "start_gte": payload.start_gte,
108
110
  "updated_gte": payload.updated_gte,
109
111
  });
110
112
 
package/src/lib/config.ts CHANGED
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "1.0",
76
- sdkVersion: "2.83.42",
76
+ sdkVersion: "2.83.43",
77
77
  genVersion: "2.881.4",
78
78
  userAgent:
79
- "speakeasy-sdk/typescript 2.83.42 2.881.4 1.0 @unified-api/typescript-sdk",
79
+ "speakeasy-sdk/typescript 2.83.43 2.881.4 1.0 @unified-api/typescript-sdk",
80
80
  } as const;
package/src/sdk/ads.ts CHANGED
@@ -12,6 +12,8 @@ import { adsGetAdsCampaign } from "../funcs/adsGetAdsCampaign.js";
12
12
  import { adsGetAdsCreative } from "../funcs/adsGetAdsCreative.js";
13
13
  import { adsGetAdsGroup } from "../funcs/adsGetAdsGroup.js";
14
14
  import { adsGetAdsInsertionorder } from "../funcs/adsGetAdsInsertionorder.js";
15
+ import { adsGetAdsPromoted } from "../funcs/adsGetAdsPromoted.js";
16
+ import { adsGetAdsTarget } from "../funcs/adsGetAdsTarget.js";
15
17
  import { adsListAdsAds } from "../funcs/adsListAdsAds.js";
16
18
  import { adsListAdsCampaigns } from "../funcs/adsListAdsCampaigns.js";
17
19
  import { adsListAdsCreatives } from "../funcs/adsListAdsCreatives.js";
@@ -215,6 +217,34 @@ export class Ads extends ClientSDK {
215
217
  ));
216
218
  }
217
219
 
220
+ /**
221
+ * Retrieve a promoted
222
+ */
223
+ async getAdsPromoted(
224
+ request: operations.GetAdsPromotedRequest,
225
+ options?: RequestOptions,
226
+ ): Promise<shared.AdsPromoted> {
227
+ return unwrapAsync(adsGetAdsPromoted(
228
+ this,
229
+ request,
230
+ options,
231
+ ));
232
+ }
233
+
234
+ /**
235
+ * Retrieve a target
236
+ */
237
+ async getAdsTarget(
238
+ request: operations.GetAdsTargetRequest,
239
+ options?: RequestOptions,
240
+ ): Promise<shared.AdsTarget> {
241
+ return unwrapAsync(adsGetAdsTarget(
242
+ this,
243
+ request,
244
+ options,
245
+ ));
246
+ }
247
+
218
248
  /**
219
249
  * List all ads
220
250
  */
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+
9
+ export const GetAdsPromotedQueryParamFields = {
10
+ Id: "id",
11
+ Name: "name",
12
+ Type: "type",
13
+ Raw: "raw",
14
+ } as const;
15
+ export type GetAdsPromotedQueryParamFields = ClosedEnum<
16
+ typeof GetAdsPromotedQueryParamFields
17
+ >;
18
+
19
+ export type GetAdsPromotedRequest = {
20
+ /**
21
+ * ID of the connection
22
+ */
23
+ connectionId: string;
24
+ /**
25
+ * Fields to return
26
+ */
27
+ fields?: Array<GetAdsPromotedQueryParamFields> | undefined;
28
+ /**
29
+ * ID of the Promoted
30
+ */
31
+ id: string;
32
+ /**
33
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
34
+ */
35
+ raw?: string | undefined;
36
+ };
37
+
38
+ /** @internal */
39
+ export const GetAdsPromotedQueryParamFields$outboundSchema: z.ZodNativeEnum<
40
+ typeof GetAdsPromotedQueryParamFields
41
+ > = z.nativeEnum(GetAdsPromotedQueryParamFields);
42
+
43
+ /** @internal */
44
+ export type GetAdsPromotedRequest$Outbound = {
45
+ connection_id: string;
46
+ fields?: Array<string> | undefined;
47
+ id: string;
48
+ raw?: string | undefined;
49
+ };
50
+
51
+ /** @internal */
52
+ export const GetAdsPromotedRequest$outboundSchema: z.ZodType<
53
+ GetAdsPromotedRequest$Outbound,
54
+ z.ZodTypeDef,
55
+ GetAdsPromotedRequest
56
+ > = z.object({
57
+ connectionId: z.string(),
58
+ fields: z.array(GetAdsPromotedQueryParamFields$outboundSchema).optional(),
59
+ id: z.string(),
60
+ raw: z.string().optional(),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ connectionId: "connection_id",
64
+ });
65
+ });
66
+
67
+ export function getAdsPromotedRequestToJSON(
68
+ getAdsPromotedRequest: GetAdsPromotedRequest,
69
+ ): string {
70
+ return JSON.stringify(
71
+ GetAdsPromotedRequest$outboundSchema.parse(getAdsPromotedRequest),
72
+ );
73
+ }
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+
9
+ export const GetAdsTargetQueryParamFields = {
10
+ Id: "id",
11
+ Name: "name",
12
+ Type: "type",
13
+ IsActive: "is_active",
14
+ ParentId: "parent_id",
15
+ Raw: "raw",
16
+ } as const;
17
+ export type GetAdsTargetQueryParamFields = ClosedEnum<
18
+ typeof GetAdsTargetQueryParamFields
19
+ >;
20
+
21
+ export type GetAdsTargetRequest = {
22
+ /**
23
+ * ID of the connection
24
+ */
25
+ connectionId: string;
26
+ /**
27
+ * Fields to return
28
+ */
29
+ fields?: Array<GetAdsTargetQueryParamFields> | undefined;
30
+ /**
31
+ * ID of the Target
32
+ */
33
+ id: string;
34
+ /**
35
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
36
+ */
37
+ raw?: string | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const GetAdsTargetQueryParamFields$outboundSchema: z.ZodNativeEnum<
42
+ typeof GetAdsTargetQueryParamFields
43
+ > = z.nativeEnum(GetAdsTargetQueryParamFields);
44
+
45
+ /** @internal */
46
+ export type GetAdsTargetRequest$Outbound = {
47
+ connection_id: string;
48
+ fields?: Array<string> | undefined;
49
+ id: string;
50
+ raw?: string | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const GetAdsTargetRequest$outboundSchema: z.ZodType<
55
+ GetAdsTargetRequest$Outbound,
56
+ z.ZodTypeDef,
57
+ GetAdsTargetRequest
58
+ > = z.object({
59
+ connectionId: z.string(),
60
+ fields: z.array(GetAdsTargetQueryParamFields$outboundSchema).optional(),
61
+ id: z.string(),
62
+ raw: z.string().optional(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ connectionId: "connection_id",
66
+ });
67
+ });
68
+
69
+ export function getAdsTargetRequestToJSON(
70
+ getAdsTargetRequest: GetAdsTargetRequest,
71
+ ): string {
72
+ return JSON.stringify(
73
+ GetAdsTargetRequest$outboundSchema.parse(getAdsTargetRequest),
74
+ );
75
+ }
@@ -131,6 +131,8 @@ export * from "./getadscreative.js";
131
131
  export * from "./getadsgroup.js";
132
132
  export * from "./getadsinsertionorder.js";
133
133
  export * from "./getadsorganization.js";
134
+ export * from "./getadspromoted.js";
135
+ export * from "./getadstarget.js";
134
136
  export * from "./getassessmentpackage.js";
135
137
  export * from "./getatsactivity.js";
136
138
  export * from "./getatsapplication.js";
@@ -38,6 +38,10 @@ export type ListAdsCampaignsRequest = {
38
38
  * ID of the connection
39
39
  */
40
40
  connectionId: string;
41
+ /**
42
+ * The end date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
43
+ */
44
+ endLt?: string | undefined;
41
45
  /**
42
46
  * Fields to return
43
47
  */
@@ -58,6 +62,10 @@ export type ListAdsCampaignsRequest = {
58
62
  */
59
63
  raw?: string | undefined;
60
64
  sort?: string | undefined;
65
+ /**
66
+ * The start date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
67
+ */
68
+ startGte?: string | undefined;
61
69
  /**
62
70
  * Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
63
71
  */
@@ -72,6 +80,7 @@ export const ListAdsCampaignsQueryParamFields$outboundSchema: z.ZodNativeEnum<
72
80
  /** @internal */
73
81
  export type ListAdsCampaignsRequest$Outbound = {
74
82
  connection_id: string;
83
+ end_lt?: string | undefined;
75
84
  fields?: Array<string> | undefined;
76
85
  limit?: number | undefined;
77
86
  offset?: number | undefined;
@@ -80,6 +89,7 @@ export type ListAdsCampaignsRequest$Outbound = {
80
89
  query?: string | undefined;
81
90
  raw?: string | undefined;
82
91
  sort?: string | undefined;
92
+ start_gte?: string | undefined;
83
93
  updated_gte?: string | undefined;
84
94
  };
85
95
 
@@ -90,6 +100,7 @@ export const ListAdsCampaignsRequest$outboundSchema: z.ZodType<
90
100
  ListAdsCampaignsRequest
91
101
  > = z.object({
92
102
  connectionId: z.string(),
103
+ endLt: z.string().optional(),
93
104
  fields: z.array(ListAdsCampaignsQueryParamFields$outboundSchema).optional(),
94
105
  limit: z.number().optional(),
95
106
  offset: z.number().optional(),
@@ -98,11 +109,14 @@ export const ListAdsCampaignsRequest$outboundSchema: z.ZodType<
98
109
  query: z.string().optional(),
99
110
  raw: z.string().optional(),
100
111
  sort: z.string().optional(),
112
+ startGte: z.string().optional(),
101
113
  updatedGte: z.string().optional(),
102
114
  }).transform((v) => {
103
115
  return remap$(v, {
104
116
  connectionId: "connection_id",
117
+ endLt: "end_lt",
105
118
  orgId: "org_id",
119
+ startGte: "start_gte",
106
120
  updatedGte: "updated_gte",
107
121
  });
108
122
  });
@@ -50,6 +50,10 @@ export type ListAdsGroupsRequest = {
50
50
  * ID of the connection
51
51
  */
52
52
  connectionId: string;
53
+ /**
54
+ * The end date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
55
+ */
56
+ endLt?: string | undefined;
53
57
  /**
54
58
  * Fields to return
55
59
  */
@@ -78,6 +82,10 @@ export type ListAdsGroupsRequest = {
78
82
  */
79
83
  raw?: string | undefined;
80
84
  sort?: string | undefined;
85
+ /**
86
+ * The start date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
87
+ */
88
+ startGte?: string | undefined;
81
89
  /**
82
90
  * Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
83
91
  */
@@ -93,6 +101,7 @@ export const ListAdsGroupsQueryParamFields$outboundSchema: z.ZodNativeEnum<
93
101
  export type ListAdsGroupsRequest$Outbound = {
94
102
  campaign_id?: string | undefined;
95
103
  connection_id: string;
104
+ end_lt?: string | undefined;
96
105
  fields?: Array<string> | undefined;
97
106
  io_id?: string | undefined;
98
107
  limit?: number | undefined;
@@ -103,6 +112,7 @@ export type ListAdsGroupsRequest$Outbound = {
103
112
  query?: string | undefined;
104
113
  raw?: string | undefined;
105
114
  sort?: string | undefined;
115
+ start_gte?: string | undefined;
106
116
  updated_gte?: string | undefined;
107
117
  };
108
118
 
@@ -114,6 +124,7 @@ export const ListAdsGroupsRequest$outboundSchema: z.ZodType<
114
124
  > = z.object({
115
125
  campaignId: z.string().optional(),
116
126
  connectionId: z.string(),
127
+ endLt: z.string().optional(),
117
128
  fields: z.array(ListAdsGroupsQueryParamFields$outboundSchema).optional(),
118
129
  ioId: z.string().optional(),
119
130
  limit: z.number().optional(),
@@ -124,14 +135,17 @@ export const ListAdsGroupsRequest$outboundSchema: z.ZodType<
124
135
  query: z.string().optional(),
125
136
  raw: z.string().optional(),
126
137
  sort: z.string().optional(),
138
+ startGte: z.string().optional(),
127
139
  updatedGte: z.string().optional(),
128
140
  }).transform((v) => {
129
141
  return remap$(v, {
130
142
  campaignId: "campaign_id",
131
143
  connectionId: "connection_id",
144
+ endLt: "end_lt",
132
145
  ioId: "io_id",
133
146
  orgId: "org_id",
134
147
  parentId: "parent_id",
148
+ startGte: "start_gte",
135
149
  updatedGte: "updated_gte",
136
150
  });
137
151
  });
@@ -10,6 +10,7 @@ export const ListAdsPromotedsQueryParamFields = {
10
10
  Id: "id",
11
11
  Name: "name",
12
12
  Type: "type",
13
+ Raw: "raw",
13
14
  } as const;
14
15
  export type ListAdsPromotedsQueryParamFields = ClosedEnum<
15
16
  typeof ListAdsPromotedsQueryParamFields
@@ -9,8 +9,9 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  export const ListAdsTargetsQueryParamFields = {
10
10
  Id: "id",
11
11
  Name: "name",
12
- Value: "value",
13
12
  Type: "type",
13
+ IsActive: "is_active",
14
+ ParentId: "parent_id",
14
15
  Raw: "raw",
15
16
  } as const;
16
17
  export type ListAdsTargetsQueryParamFields = ClosedEnum<
@@ -34,6 +34,7 @@ export type AdsPromotedType = OpenEnum<typeof AdsPromotedType>;
34
34
  export type AdsPromoted = {
35
35
  id: string;
36
36
  name?: string | undefined;
37
+ raw?: { [k: string]: any } | undefined;
37
38
  type: AdsPromotedType;
38
39
  };
39
40
 
@@ -58,12 +59,14 @@ export const AdsPromoted$inboundSchema: z.ZodType<
58
59
  > = z.object({
59
60
  id: z.string(),
60
61
  name: z.string().optional(),
62
+ raw: z.record(z.any()).optional(),
61
63
  type: AdsPromotedType$inboundSchema,
62
64
  });
63
65
  /** @internal */
64
66
  export type AdsPromoted$Outbound = {
65
67
  id: string;
66
68
  name?: string | undefined;
69
+ raw?: { [k: string]: any } | undefined;
67
70
  type: string;
68
71
  };
69
72
 
@@ -75,6 +78,7 @@ export const AdsPromoted$outboundSchema: z.ZodType<
75
78
  > = z.object({
76
79
  id: z.string(),
77
80
  name: z.string().optional(),
81
+ raw: z.record(z.any()).optional(),
78
82
  type: AdsPromotedType$outboundSchema,
79
83
  });
80
84
 
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
6
7
  import { safeParse } from "../../../lib/schemas.js";
7
8
  import * as openEnums from "../../types/enums.js";
8
9
  import { OpenEnum } from "../../types/enums.js";
@@ -10,18 +11,21 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
12
 
12
13
  export const AdsTargetType = {
13
- Interests: "INTERESTS",
14
- Behaviors: "BEHAVIORS",
15
- Locales: "LOCALES",
16
- Countries: "COUNTRIES",
17
- Regions: "REGIONS",
18
- Cities: "CITIES",
19
- Zips: "ZIPS",
20
- UsDmas: "US_DMAS",
21
- Topics: "TOPICS",
22
- UserLists: "USER_LISTS",
23
- AgeRanges: "AGE_RANGES",
24
- Genders: "GENDERS",
14
+ Interest: "INTEREST",
15
+ Behavior: "BEHAVIOR",
16
+ Locale: "LOCALE",
17
+ Country: "COUNTRY",
18
+ Region: "REGION",
19
+ City: "CITY",
20
+ Zip: "ZIP",
21
+ UsDma: "US_DMA",
22
+ Topic: "TOPIC",
23
+ UserList: "USER_LIST",
24
+ AgeRange: "AGE_RANGE",
25
+ Gender: "GENDER",
26
+ Carrier: "CARRIER",
27
+ DeviceModel: "DEVICE_MODEL",
28
+ OsVersion: "OS_VERSION",
25
29
  } as const;
26
30
  export type AdsTargetType = OpenEnum<typeof AdsTargetType>;
27
31
 
@@ -30,10 +34,11 @@ export type AdsTargetType = OpenEnum<typeof AdsTargetType>;
30
34
  */
31
35
  export type AdsTarget = {
32
36
  id: string;
37
+ isActive?: boolean | undefined;
33
38
  name?: string | undefined;
39
+ parentId?: string | undefined;
34
40
  raw?: { [k: string]: any } | undefined;
35
41
  type?: AdsTargetType | undefined;
36
- value: string;
37
42
  };
38
43
 
39
44
  /** @internal */
@@ -50,10 +55,16 @@ export const AdsTarget$inboundSchema: z.ZodType<
50
55
  unknown
51
56
  > = z.object({
52
57
  id: z.string(),
58
+ is_active: z.boolean().optional(),
53
59
  name: z.string().optional(),
60
+ parent_id: z.string().optional(),
54
61
  raw: z.record(z.any()).optional(),
55
62
  type: AdsTargetType$inboundSchema.optional(),
56
- value: z.string(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ "is_active": "isActive",
66
+ "parent_id": "parentId",
67
+ });
57
68
  });
58
69
 
59
70
  export function adsTargetFromJSON(