@zinn-digital/sdk 0.1.1529 → 0.1.1530

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.
@@ -16928,6 +16928,54 @@ export interface paths {
16928
16928
  patch?: never;
16929
16929
  trace?: never;
16930
16930
  };
16931
+ "/v1/ads/connect/chatgpt": {
16932
+ parameters: {
16933
+ query?: never;
16934
+ header?: never;
16935
+ path?: never;
16936
+ cookie?: never;
16937
+ };
16938
+ get?: never;
16939
+ put?: never;
16940
+ /**
16941
+ * Connect ChatGPT Ads with an Advertiser API key (za-318).
16942
+ * @description Gated on `ads.manage`. ChatGPT Ads (OpenAI) has no OAuth app open to us (OpenAI publishes no client registration for its `AdsOAuth` scheme; it is the API-partner path), so the customer pastes an Advertiser API key made at https://ads.openai.com/settings. One key reaches ONE ad account. The key is read against OpenAI's `GET /v1/ad_account` at once and kept in Vault as the grant (never in the database, never echoed); the answer is the grant id the ordinary account picker reads (`listAdsConnectChatGPTAccounts`). A value that cannot be a key is a `422` `netBadKey` before any call. A key OpenAI refuses still answers a grant whose picker carries the §2.57 `failure` (a rejected key links the keys page). Not gated on "Coming soon" (that gates the dashboard's offer). ChatGPT Ads writes (an ad group paused, a campaign's daily spend limit) stay OFF until `ZINN_ADS_CHATGPT_WRITES=on` (an owner decision): an approved change is refused `chatgptWritesOff` and nothing reaches OpenAI.
16943
+ */
16944
+ post: operations["connectAdsChatGPTKey"];
16945
+ delete?: never;
16946
+ options?: never;
16947
+ head?: never;
16948
+ patch?: never;
16949
+ trace?: never;
16950
+ };
16951
+ "/v1/ads/connect/chatgpt/grants/{grant_id}": {
16952
+ parameters: {
16953
+ query?: {
16954
+ org_id?: string;
16955
+ };
16956
+ header?: never;
16957
+ path: {
16958
+ grant_id: string;
16959
+ };
16960
+ cookie?: never;
16961
+ };
16962
+ /**
16963
+ * The ChatGPT Ads account one Advertiser API key reaches.
16964
+ * @description Gated on `ads.manage`. The one ad account the key reaches (`GET /v1/ad_account`), with its currency, time zone, status and brand `review_status` (an account cannot serve until OpenAI approves its brand). `connected` marks an account the organisation already has.
16965
+ */
16966
+ get: operations["listAdsConnectChatGPTAccounts"];
16967
+ put?: never;
16968
+ /**
16969
+ * Connect the key's ChatGPT Ads account and start reading its figures.
16970
+ * @description Gated on `ads.manage`; audit action `ads.connection_create`. `customer_ids` is the account id the picker listed (`adacct_…`, lower case). The new connection's day figures (spend, clicks, impressions and conversions per ad group and day, money as integer micros of the account currency) start reading on their own (Temporal), READ ONLY, then the history backfill.
16971
+ */
16972
+ post: operations["addAdsConnectChatGPTAccounts"];
16973
+ delete?: never;
16974
+ options?: never;
16975
+ head?: never;
16976
+ patch?: never;
16977
+ trace?: never;
16978
+ };
16931
16979
  "/v1/ads/connect/google": {
16932
16980
  parameters: {
16933
16981
  query?: never;
@@ -66507,9 +66555,13 @@ export interface components {
66507
66555
  parent_id?: string;
66508
66556
  /** @description Google only (za-52): that manager's name. */
66509
66557
  parent_name?: string;
66558
+ /** @description ChatGPT Ads only (za-318): OpenAI's brand review of the account (`in_review`, `rejected`, `approved`); an account serves only once it is `approved`. */
66559
+ review_status?: string;
66510
66560
  /** @description X Ads only (XADS1): a SANDBOX account (`ads-api-sandbox`), which runs no ads and spends nothing. Its `customer_id` is `sbx-<id>`. */
66511
66561
  sandbox?: boolean;
66512
66562
  status: string;
66563
+ /** @description ChatGPT Ads only (za-318): the account's IANA time zone. */
66564
+ timezone?: string;
66513
66565
  };
66514
66566
  /** @description za-97: what Disconnect did with the person's grant at the network (docs/1006 §Connect). */
66515
66567
  AdsGrantRevokeOutcome: {
@@ -67807,7 +67859,7 @@ export interface components {
67807
67859
  * @description An advertising platform (docs/1006 §4.1).
67808
67860
  * @enum {string}
67809
67861
  */
67810
- AdsPlatform: "google" | "microsoft" | "meta" | "linkedin" | "tiktok" | "x" | "pinterest" | "amazon";
67862
+ AdsPlatform: "google" | "microsoft" | "meta" | "linkedin" | "tiktok" | "x" | "pinterest" | "amazon" | "chatgpt";
67811
67863
  /** @description The plugin conversion feed on one ad account (za-96, docs/1006 §PLUGINFEED). */
67812
67864
  AdsPluginFeed: {
67813
67865
  /**
@@ -69130,7 +69182,7 @@ export interface components {
69130
69182
  * @description PLACEGUARD2: the connection's network. A Meta exclusion is only ever `listed`.
69131
69183
  * @enum {string}
69132
69184
  */
69133
- platform: "google" | "microsoft" | "meta" | "linkedin" | "tiktok" | "x" | "pinterest" | "amazon";
69185
+ platform: "google" | "microsoft" | "meta" | "linkedin" | "tiktok" | "x" | "pinterest" | "amazon" | "chatgpt";
69134
69186
  /**
69135
69187
  * @description Why a placement was proposed: it spent with no result (`waste`) or belongs to a junk class (`junk`).
69136
69188
  * @enum {string}
@@ -141774,6 +141826,117 @@ export interface operations {
141774
141826
  429: components["responses"]["TooManyRequests"];
141775
141827
  };
141776
141828
  };
141829
+ connectAdsChatGPTKey: {
141830
+ parameters: {
141831
+ query?: never;
141832
+ header?: never;
141833
+ path?: never;
141834
+ cookie?: never;
141835
+ };
141836
+ requestBody: {
141837
+ content: {
141838
+ "application/json": {
141839
+ /** @description The Advertiser API key (a secret; never returned). */
141840
+ api_key: string;
141841
+ /** Format: uuid */
141842
+ org_id?: string;
141843
+ };
141844
+ };
141845
+ };
141846
+ responses: {
141847
+ /** @description The grant the account picker reads. */
141848
+ 201: {
141849
+ headers: {
141850
+ [name: string]: unknown;
141851
+ };
141852
+ content: {
141853
+ "application/json": {
141854
+ /** Format: uuid */
141855
+ grant_id: string;
141856
+ };
141857
+ };
141858
+ };
141859
+ 401: components["responses"]["Unauthorized"];
141860
+ 403: components["responses"]["Forbidden"];
141861
+ 404: components["responses"]["NotFound"];
141862
+ 422: components["responses"]["UnprocessableEntity"];
141863
+ 429: components["responses"]["TooManyRequests"];
141864
+ };
141865
+ };
141866
+ listAdsConnectChatGPTAccounts: {
141867
+ parameters: {
141868
+ query?: {
141869
+ org_id?: string;
141870
+ };
141871
+ header?: never;
141872
+ path: {
141873
+ grant_id: string;
141874
+ };
141875
+ cookie?: never;
141876
+ };
141877
+ requestBody?: never;
141878
+ responses: {
141879
+ /** @description The account. */
141880
+ 200: {
141881
+ headers: {
141882
+ [name: string]: unknown;
141883
+ };
141884
+ content: {
141885
+ "application/json": {
141886
+ data: components["schemas"]["AdsGrantAccount"][];
141887
+ /** @description Why the list is empty when OpenAI REFUSED the key (the §2.57 class, never the raw vendor text). `null` when OpenAI answered. */
141888
+ failure?: components["schemas"]["VendorFailure"] | null;
141889
+ };
141890
+ };
141891
+ };
141892
+ 401: components["responses"]["Unauthorized"];
141893
+ 403: components["responses"]["Forbidden"];
141894
+ 404: components["responses"]["NotFound"];
141895
+ 422: components["responses"]["UnprocessableEntity"];
141896
+ 429: components["responses"]["TooManyRequests"];
141897
+ };
141898
+ };
141899
+ addAdsConnectChatGPTAccounts: {
141900
+ parameters: {
141901
+ query?: {
141902
+ org_id?: string;
141903
+ };
141904
+ header?: never;
141905
+ path: {
141906
+ grant_id: string;
141907
+ };
141908
+ cookie?: never;
141909
+ };
141910
+ requestBody: {
141911
+ content: {
141912
+ "application/json": {
141913
+ /** Format: uuid */
141914
+ client_org_id?: string | null;
141915
+ customer_ids: string[];
141916
+ /** Format: uuid */
141917
+ org_id?: string;
141918
+ };
141919
+ };
141920
+ };
141921
+ responses: {
141922
+ /** @description The connections. */
141923
+ 201: {
141924
+ headers: {
141925
+ [name: string]: unknown;
141926
+ };
141927
+ content: {
141928
+ "application/json": {
141929
+ data: components["schemas"]["AdsAccountConnection"][];
141930
+ };
141931
+ };
141932
+ };
141933
+ 401: components["responses"]["Unauthorized"];
141934
+ 403: components["responses"]["Forbidden"];
141935
+ 404: components["responses"]["NotFound"];
141936
+ 422: components["responses"]["UnprocessableEntity"];
141937
+ 429: components["responses"]["TooManyRequests"];
141938
+ };
141939
+ };
141777
141940
  startAdsConnectGoogle: {
141778
141941
  parameters: {
141779
141942
  query?: never;
@@ -147509,7 +147672,7 @@ export interface operations {
147509
147672
  /** Format: uuid */
147510
147673
  grant_id: string | null;
147511
147674
  /** @enum {string} */
147512
- platform: "google" | "microsoft" | "x" | "meta";
147675
+ platform: "google" | "microsoft" | "x" | "meta" | "chatgpt";
147513
147676
  };
147514
147677
  };
147515
147678
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1529",
3
+ "version": "0.1.1530",
4
4
  "description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",